Граф коммитов

1511 Коммитов

Автор SHA1 Сообщение Дата
Sebastiaan van Stijn 90ffcbe8d0
Merge pull request #1159 from thaJeztah/dockerd_manpages
[master] deb,rpm: include dockerd man-page in docker-ce package
2025-01-27 16:52:05 +01:00
Sebastiaan van Stijn 3ded61e6d7
deb,rpm: include dockerd man-page in docker-ce package
When splitting the docker CLI from the moby/moby repository, the dockerd
documentation and man-pages were moved to the CLI repository. This was a
bit of a bad choice, as now the documentation and code lived in separate
repositories, but when the CLI and dockerd packages were split, the man
page for dockerd ended up in the CLI package.

Starting with [moby@d6e9b5f], the dockerd man-page has been reintegrated
into the moby repository, which means that we can build the man-page
from that repository, and remove it from the CLI repository.

This patch updates the packing to do so:

Before this patch;

    dpkg-deb -c docker-ce_0.0.0~20250124134141.b8879a4-1~ubuntu.24.04~noble_arm64.deb | grep -E '^-'
    -rw-r--r-- root/root       642 2025-01-24 14:29 ./etc/default/docker
    -rwxr-xr-x root/root      2946 2025-01-24 14:29 ./etc/init.d/docker
    -rwxr-xr-x root/root   2741336 2025-01-24 19:54 ./usr/bin/docker-proxy
    -rw-r--r-- root/root      1727 2025-01-24 14:29 ./usr/lib/systemd/system/docker.service
    -rw-r--r-- root/root       295 2025-01-24 14:29 ./usr/lib/systemd/system/docker.socket
    -rwxr-xr-x root/root    604336 2025-01-24 19:54 ./usr/libexec/docker/docker-init
    -rw-r--r-- root/root      2248 2025-01-24 14:29 ./usr/share/doc/docker-ce/README.md
    -rw-r--r-- root/root       168 2025-01-24 19:54 ./usr/share/doc/docker-ce/changelog.Debian.gz

    rpm -qpl ./docker-ce-0.0.0~20250124134141.b8879a4-0.fc41.aarch64.rpm
    /etc/docker
    /usr/bin/docker-proxy
    /usr/bin/dockerd
    /usr/lib/systemd/system/docker.service
    /usr/lib/systemd/system/docker.socket
    /usr/libexec/docker/docker-init

With this patch:

    dpkg-deb -c docker-ce_0.0.0~20250124134141.b8879a4-1~ubuntu.24.04~noble_arm64.deb | grep -E '^-'
    -rw-r--r-- root/root       642 2025-01-24 14:29 ./etc/default/docker
    -rwxr-xr-x root/root      2946 2025-01-24 14:29 ./etc/init.d/docker
    -rwxr-xr-x root/root   2741336 2025-01-24 20:55 ./usr/bin/docker-proxy
    -rwxr-xr-x root/root  79458592 2025-01-24 20:55 ./usr/bin/dockerd
    -rw-r--r-- root/root      1727 2025-01-24 14:29 ./usr/lib/systemd/system/docker.service
    -rw-r--r-- root/root       295 2025-01-24 14:29 ./usr/lib/systemd/system/docker.socket
    -rwxr-xr-x root/root    604336 2025-01-24 20:55 ./usr/libexec/docker/docker-init
    -rw-r--r-- root/root      2248 2025-01-24 14:29 ./usr/share/doc/docker-ce/README.md
    -rw-r--r-- root/root       166 2025-01-24 20:55 ./usr/share/doc/docker-ce/changelog.Debian.gz
    -rw-r--r-- root/root      6561 2025-01-24 20:55 ./usr/share/man/man8/dockerd.8.gz

    rpm -qpl ./docker-ce-0.0.0~20250124134141.b8879a4-0.fc41.aarch64.rpm
    /etc/docker
    /usr/bin/docker-proxy
    /usr/bin/dockerd
    /usr/lib/systemd/system/docker.service
    /usr/lib/systemd/system/docker.socket
    /usr/libexec/docker/docker-init
    /usr/share/man/man8/dockerd.8.gz

Given that the dockerd man-page was previously packaged as part of docker-ce-cli,
we need to add a "Replaces:" condition to the package, to prevent dpkg from
detecting it as a conflict when an older version of the docker-ce-cli package
was installed that contains the manpage;

    Unpacking docker-ce (5:0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm) ...
    dpkg: error processing archive ./deb/debbuild/raspbian-bookworm/docker-ce_0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm_armhf.deb (--install):
    trying to overwrite '/usr/share/man/man8/dockerd.8.gz', which is also in package docker-ce-cli 5:0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm

From the [Debian manual][1]

> 7.6.1. Overwriting files in other packages
>
> It is usually an error for a package to contain files which are on the
> system in another package. However, if the overwriting package declares
> that it Replaces the one containing the file being overwritten, then dpkg
> will replace the file from the old package with that from the new. The
> file will no longer be listed as “owned” by the old package and will be
> taken over by the new package.

[1]: https://www.debian.org/doc/debian-policy/ch-relationships.html
[moby@d6e9b5f]: d6e9b5fe30

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-27 16:19:54 +01:00
Paweł Gronowski 6f3090691d
Merge pull request #1158 from thaJeztah/kmod_suggests
[master] deb, rpm: make kmod "suggests" instead of "recommends"
2025-01-27 15:46:35 +01:00
Sebastiaan van Stijn e755876f21
rpm: adjust spec to account for varying list of man-page sections
The CLI currently builds man-pages for sections 1, 5, and 8, but this
list may change; for example, the dockerd man-page is currently built
from the CLI repository but intended to be removed.

This patch changes the code to check all (1..9) secions, and install the
man-pages found in them.

This patch also updates the %doc and %files section; from the Fedora packaging
guide (see [1]);

> The %files section holds a list of all the files that RPM should install
> from the package. **This list should be exhaustive**, so that the RPM system
> knows exactly what your package installs. There are some options, though,
> to name all the files within a directory to help with packages containing
> hundreds of files.
> (...)
> In addition to naming each file on a line, you can use glob-style wildcards.

But also worth noting that it's NOT needed to mark manpages as %doc, see [2];

> Note also that files installed in %{_mandir} are automatically marked by RPM
> as documentation. Thus it is not necessary to use %doc.

So this patch:

- uses wildcards to enumerate all manpages in all sections
- removes the %doc for manpages, as this is automatic.

[1]: https://jfearn.fedorapeople.org/en-US/RPM/4/html/RPM_Guide/ch09s05.html
[2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-27 14:50:35 +01:00
Sebastiaan van Stijn bb09b29f54
Merge pull request #1150 from Benehiko/cobra-cli-completions
[master] deb,rpm: use cobra generated completions
2025-01-27 10:28:51 +01:00
Sebastiaan van Stijn 940ff3960c
deb, rpm: make kmod "suggests" instead of "recommends"
This was added in deed8d9df8, as the docker
engine depended on modprobe to enable br_netfilter. Docker Engine no longer
requires this since [moby/moby@4b8c720], and [moby/moby@8a8ab0d] (docker\
engine v27.4.1), so we can reduce this to a "suggests"

[moby/moby@4b8c720]: 4b8c72060d
[moby/moby@8a8ab0d]: 8a8ab0d567

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 18:42:15 +01:00
Alano Terblanche 6c19ca1cea
deb,rpm: use cobra generated completions
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-01-24 17:56:21 +01:00
Sebastiaan van Stijn 2f96f03149
Merge pull request #1157 from thaJeztah/nopop
[master]  deb, rpm: reduce uses of "cd", "popd", "pushd"
2025-01-24 17:54:02 +01:00
Sebastiaan van Stijn 61fb900088
deb, rpm: reduce uses of "cd", "popd", "pushd"
For make commands, we can just pass the directory through "-C", and for
"install" we can pass the full path of the source.

There's some remaining uses for targets that build through a script
or using "go build", which may still require changing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 16:16:08 +01:00
Sebastiaan van Stijn 989f44246f
Merge pull request #1154 from thaJeztah/build_cleanups
[master] deb, rpm:  slight refactor / cleanup
2025-01-24 12:24:21 +01:00
Sebastiaan van Stijn f9f36d4945
deb: stop using dh_bash-completion for bash completions
The dh_bash-completion debhelper provides an easy way to install the
shell-completion scripts for Bash. Unfortunately there is no stable
equivalent yet for the other shells (zsh, fish, powershell), which
resulted in two out of three shells requiring manual install.

Given that the installation path for Bash is [well-documented][1],
we can align Bash with the other shells to make this less confusing.

This patch makes that change, and adds a code-comment to outline
the reasoning (and possible future options) for future readers.

[1]: 79fd051907/README.md

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:47:42 +01:00
Sebastiaan van Stijn 59ca4ac5ff
deb: put installing completions in a separate block
Makes it slightly clearer where installing the CLI itself
ends, and where installing completion scripts start.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:38:44 +01:00
Sebastiaan van Stijn 5b91b48be1
deb: consistently use "install -p" (--preserve-timestamps)
This unlikely makes a big difference, as some files may have timestamps
based on checkout date or being generated, but it doesn't hurt doing
either.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 503bad1b88
rpm: consistently use "install -p" (--preserve-timestamps)
This unlikely makes a big difference, as some files may have timestamps
based on checkout date or being generated, but it doesn't hurt doing
either.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 6d05ae6039
rpm: use install -D where possible
The "-D" option creates parent directories if missing; we
can use it in most places, except for one where we're using
wildcards, as installing multiple files requires the target
directory to exist.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 9cbbf7a6c1
deb, rpm: use "make dynbinary" instead of ./scripts/build/binary
The "make dynbinary" target calls ./scripts/build/binary with the
right options set, and does not use docker to build (so can be
run as part of our deb/rpm build scripts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:39 +01:00
Sebastiaan van Stijn 0a4c885b7a
Merge pull request #1155 from thaJeztah/obsolete_the_obsolete
rpm: remove Obsoletes for obsolete (selinux) packages
2025-01-24 10:13:37 +01:00
Sebastiaan van Stijn 4608bdfb23
rpm: remove Obsoletes for obsolete (selinux) packages
Remove the obsoletes for `docker-ce-selinux`, `docker-engine-selinux`, and
`docker-engine`.

These were obsoleted in 2017 through 94943b4752

> Mark docker-*-selinux pkgs as obsolete
>
> These are replaced by `container-selinux` on fedora-25 and centos-7.
> Marking these packages as obsolete makes the installation process a bit
> smoother, otherwise the user will have to manually uninstall the older
> packages to install the new one.
>
> Also makes fedora24 use container-selinux which is now supports labeling
> the `dockerd` binary correctly.

Both CentOS 6/7 and Fedora 25 are EOL now, and these packages have not been
published for a long time. Time to remove them, also to reduce some noise
during builds;

    RPM build warnings:
        line 51: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-ce-selinux
        line 52: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-engine-selinux
        line 53: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-engine

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-23 22:21:13 +01:00
Paweł Gronowski 5987b68311
Merge pull request #1151 from tonistiigi/update-buildx-v0.20.1
[master] update buildx to v0.20.1
2025-01-23 10:57:31 +01:00
Tonis Tiigi ac25375122
update buildx to v0.20.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-01-22 15:09:49 -08:00
Paweł Gronowski 5029f6d721
Merge pull request #1146 from thaJeztah/bump_golang_1.23.5
[master] update to go1.23.5 (fix CVE-2024-45341, CVE-2024-45336)
2025-01-21 15:05:12 +01:00
Sebastiaan van Stijn b46595a6db
Merge pull request #1148 from crazy-max/buildx-0.20.0
[master] update buildx to v0.20.0
2025-01-20 22:09:28 +01:00
CrazyMax 32893402a3
update buildx to v0.20.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-20 20:32:53 +01:00
Sebastiaan van Stijn 77181fd596
update to go1.23.5 (fix CVE-2024-45341, CVE-2024-45336)
go1.23.5 (released 2025-01-16) includes security fixes to the crypto/x509 and
net/http packages, as well as bug fixes to the compiler, the runtime, and the
net package. See the Go 1.23.5 milestone on our issue tracker for details;

- https://github.com/golang/go/issues?q=milestone%3AGo1.23.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.4...go1.23.5

Hello gophers,

We have just released Go versions 1.23.5 and 1.22.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- crypto/x509: usage of IPv6 zone IDs can bypass URI name constraints

  A certificate with a URI which has a IPv6 address with a zone ID may
  incorrectly satisfy a URI name constraint that applies to the certificate
  chain.

  Certificates containing URIs are not permitted in the web PKI, so this
  only affects users of private PKIs which make use of URIs.

  Thanks to Juho Forsén of Mattermost for reporting this issue.

  This is CVE-2024-45341 and Go issue https://go.dev/issue/71156.

- net/http: sensitive headers incorrectly sent after cross-domain redirect

  The HTTP client drops sensitive headers after following a cross-domain redirect.
  For example, a request to a.com/ containing an Authorization header which is
  redirected to b.com/ will not send that header to b.com.

  In the event that the client received a subsequent same-domain redirect, however,
  the sensitive headers would be restored. For example, a chain of redirects from
  a.com/, to b.com/1, and finally to b.com/2 would incorrectly send the Authorization
  header to b.com/2.

  Thanks to Kyle Seely for reporting this issue.

  This is CVE-2024-45336 and Go issue https://go.dev/issue/70530.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-20 16:11:40 +01:00
Paweł Gronowski 12adf2337f
Merge pull request #1143 from glours/bump-compose-v2.32.4
[master] bump compose verstion to v2.32.4
2025-01-16 10:34:11 +01:00
Guillaume Lours 74cd8cf0c1
bump compose verstion to v2.32.4
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-16 09:50:30 +01:00
Paweł Gronowski 039ad7f033
Merge pull request #1141 from glours/bump-compose-v2.32.3
[master] bump compose verstion to v2.32.3
2025-01-13 15:59:23 +01:00
Guillaume Lours 93a866aedb
bump compose verstion to v2.32.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-13 15:39:29 +01:00
Paweł Gronowski a512c309cc
Merge pull request #1139 from glours/bump-compose-v2.32.2
[master] bump compose verstion to v2.32.2
2025-01-07 16:31:46 +01:00
Guillaume Lours 1d13f0e4b9
bump compose verstion to v2.32.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-07 15:31:52 +01:00
Sebastiaan van Stijn f950f47310
Merge pull request #1135 from thaJeztah/update_spdx_identifier
[master] rpm: use SPDX identifier for License fields
2025-01-07 11:08:54 +01:00
Paweł Gronowski 3719514261
Merge pull request #1136 from thaJeztah/debian_stable
[master] Jenkinsfile: update Debian EOL dates
2025-01-07 09:12:40 +01:00
Sebastiaan van Stijn a522405b75
Jenkinsfile: update Debian EOL dates
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-02 00:22:24 +01:00
Sebastiaan van Stijn e72df489f1
rpm: use SPDX identifier for License fields
Update the license fields to use the (now recommented) SPDX identifier;

> https://docs.fedoraproject.org/en-US/legal/allowed-licenses/ lists
> Apache-2.0 as the SPDX identifier and ASL 2.0 as a "Legacy Abbreviation"
> for Apache License 2.0.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-26 15:43:41 +01:00
Sebastiaan van Stijn e47d6372bc
Merge pull request #1010 from neersighted/builddep_test
rpm: drop unnecessary build-deps
2024-12-26 14:12:42 +01:00
Bjorn Neergaard ddf1042427
rpm: drop unnecessary "which" build-dep
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-12-26 13:34:29 +01:00
Sebastiaan van Stijn 579aab665e
remove libarchive build-dep (was: fix missing archive_write_add_filter_zstd)
This reverts commit 78242140d7.

That change was  added to fix a missing archive_write_add_filter_zstd  when
compiling tini, but it's no longer needed;

> Add libarchive build-dep to fix missing archive_write_add_filter_zstd
>
> Trying to fix
>
>     + echo 'Install tini version de40ad007797e0dcd8b7126f27bb87401d224240'
>     + git clone https://github.com/krallin/tini.git /go/tini
>     Install tini version de40ad007797e0dcd8b7126f27bb87401d224240
>     Cloning into '/go/tini'...
>     + cd /go/tini
>     + git checkout -q de40ad007797e0dcd8b7126f27bb87401d224240
>     + cmake .
>     cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd
>     error: Bad exit status from /var/tmp/rpm-tmp.Dl5CDf (%build)
>
> According to https://bugs.centos.org/view.php?id=18212, upgrading to libarchive-3.3.3-1.el8.x86_64
> should resolve the problem.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-26 13:30:38 +01:00
Sebastiaan van Stijn 2f0c865a12
Merge pull request #1131 from crazy-max/update-buildx
update buildx to v0.19.3
2024-12-17 16:09:27 +01:00
CrazyMax 0275e8974e
update buildx to v0.19.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 13:34:14 +01:00
Sebastiaan van Stijn 74f28621e3
Merge pull request #1129 from ndeloof/compose-v2.32.1
Bump compose to v2.32.1
2024-12-16 18:58:46 +01:00
Nicolas De Loof 14af66f1cf
Bump compose to v2.32.1
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-16 16:23:14 +01:00
Sebastiaan van Stijn 6ce299537c
Merge pull request #1125 from ndeloof/bump_compose_v2.32.0
Bump Compose v2.32.0
2024-12-13 17:35:15 +01:00
Sebastiaan van Stijn 44476ef4f1
Merge pull request #1127 from vvoland/verify-remove-software-properties-common
verify: Remove `software-properties-common` package install
2024-12-13 17:14:07 +01:00
Paweł Gronowski 3e7dc9e5ac
verify: Remove `software-properties-common` package install
It's no longer needed

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-12-13 16:50:54 +01:00
Nicolas De Loof f52613ab54
Bump Compose v2.32.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-13 15:43:59 +01:00
Sebastiaan van Stijn 9abf4a979f
Merge pull request #1124 from thaJeztah/prune_dependencies
deb, rpm: remove libseccomp-dev, libseccomp2, libselinux-devel, selinux-policy-devel, aufs-tools dependenciies
2024-12-12 11:55:24 +01:00
Sebastiaan van Stijn ffad9399d5
deb: remove aufs-tools
The AuFS storage driver was deprecated and removed, so we can remove it
as a suggested dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 19:04:58 +01:00
Sebastiaan van Stijn 85327c1b86
rpm: remove version-constraint for container-selinux
The version constraint was added in e4b1c10a6b,
later updated in a246b19b07 to prevent old
versions to be used, as they had some issues.

Current version on RHEL8 (which is the oldest rpm distro we build for) is
2:2.229, so we can remove this explicit constraint.

    Installing:
     container-selinux                noarch           2:2.229.0-2.module+el8.10.0+22417+2fb00970          ubi-8-appstream-rpms           71 k

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 19:04:37 +01:00
Sebastiaan van Stijn c684248e59
rpm: remove selinux-policy-devel
This dependency was added in [docker@42d8fe6], at which time we were building
a docker-selinux policy with additional policies, but we're now depending
on the distro's `container-selinux` package and it was removed in the moby
repository in [docker@bfe5cab], so we can remove it here as well.

[docker@42d8fe6]: 42d8fe6105
[docker@bfe5cab]: bfe5cab13b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 18:43:04 +01:00
Sebastiaan van Stijn fee28deafa
rpm: remove libselinux-devel dependency
The selinux code we use is purely a go implementation, and nothing links
libselinux.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 18:42:56 +01:00