Skip to content

Add license copy for DEB files #312

@thompson-shaun

Description

@thompson-shaun

It appears we aren't copying license files when install via .deb files. I think we need to copy a LICENSE file to /usr/share/doc/packagename/ to be compliant. Added a copyright to /usr/share/doc/packagename/

Example:

install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-buildx debian/docker-buildx-plugin/usr/libexec/docker/cli-plugins/docker-buildx

Pulling license info with dpkg-licenses after installation from the official repos.

./dpkg-licenses  | grep docker
ii  docker-buildx-plugin           0.30.0-1~ubuntu.24.04~noble    arm64  Docker Buildx plugin extends build capabilities with BuildKi unknown
ii  docker-ce                      5:29.0.1-1~ubuntu.24.04~noble  arm64  Docker: the open-source application container engine         unknown
ii  docker-ce-cli                  5:29.0.1-1~ubuntu.24.04~noble  arm64  Docker CLI: the open-source application container engine     unknown
ii  docker-ce-rootless-extras      5:29.0.1-1~ubuntu.24.04~noble  arm64  Rootless support for Docker.                                 unknown
ii  docker-compose-plugin          2.40.3-1~ubuntu.24.04~noble    arm64  Docker Compose (V2) plugin for the Docker CLI.               unknown
Sample copyright file
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: buildx
Upstream-Contact: Docker <[email protected]>
Source: https://github.com/docker/buildx

Files: *
Copyright: 2017-2025 Docker, Inc.
           2017-2025 The Buildx Authors
License: Apache-2.0

Files: debian/*
Copyright: 2025 Your Name <[email protected]>
License: Apache-2.0

License: Apache-2.0
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 .
     http://www.apache.org/licenses/LICENSE-2.0
 .
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 .
 On Debian systems, the complete text of the Apache License version 2.0
 can be found in "/usr/share/common-licenses/Apache-2.0".

Desired output

ii  docker-buildx-plugin           0.30.0-1~ubuntu.24.04~noble    arm64  Docker Buildx plugin extends build capabilities with BuildKi Apache-2.0
ii  docker-ce                      5:29.0.1-1~ubuntu.24.04~noble  arm64  Docker: the open-source application container engine         unknown
ii  docker-ce-cli                  5:29.0.1-1~ubuntu.24.04~noble  arm64  Docker CLI: the open-source application container engine     unknown
ii  docker-ce-rootless-extras      5:29.0.1-1~ubuntu.24.04~noble  arm64  Rootless support for Docker.                                 unknown
ii  docker-compose-plugin          2.40.3-1~ubuntu.24.04~noble    arm64  Docker Compose (V2) plugin for the Docker CLI.               unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions