Commit Graph
616 Commits
Author SHA1 Message Date
Sebastiaan van Stijn ff176bbc41 rootless: update test version to 27.5.0-rc.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-23 12:45:50 +01:00
Sebastiaan van Stijn dd67be240a Merge pull request #461 from vvoland/update-rootless-27.4.1
rootless: update to 27.4.1
2024-12-18 12:39:20 +01:00
Paweł Gronowski ef63d35d8e rootless: update to 27.4.1
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-12-18 12:36:34 +01:00
Bjorn Neergaard c84dd77e3b Merge pull request #458 from thaJeztah/dnf_replace
rpm: always replace existing repo-configuration
2024-12-10 06:59:57 -07:00
Paweł Gronowski edaa91db14 Merge pull request #460 from thaJeztah/bump_rootless
rootless-install.sh: bump up to 27.4.0
2024-12-09 16:02:25 +00:00
Sebastiaan van Stijn 84143ead4c rootless-install.sh: bump up to 27.4.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-09 16:57:11 +01:00
Sebastiaan van Stijn 8c7ed6bd84 rpm: always replace existing repo-configuration
The installation script's main purpose is to perform a fresh install, because
it's not guaranteed to work correctly when updating an existing installation,
and we print a warning if we find docker is already installed. However, it's
known that the script is used to update existing installations.

The current script has some limitations for the update scenario;

- When using the script for installing from the staging domain, the existing
  repo configuration is not overwritten. When using `yum`, or older `dnf` versions
  this resulted in 2 separate repo files to be created (docker-ce.repo and
  docker-ce-staging.repo), which resulted in errors due to duplicate repo
  definitions with the same name.
- When using `dnf5`, we specified the filename to store the configuration,
  which resulted in an error;

        + sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --from-repofile='\''https://download-stage.docker.com/linux/fedora/docker-ce-staging.repo'\'''
          File "/etc/yum.repos.d/docker-ce.repo" already exists and configures repositories with IDs "docker-ce-stable docker-ce-stable-debuginfo docker-ce-stable-source docker-ce-test docker-ce-test-debuginfo docker-ce-test-source docker-ce-nightly docker-ce-nightly-debuginfo docker-ce-nightly-source". Add "--overwrite" to overwrite.

  - On SLES, it would result in a similar error;

        + sh -c 'zypper addrepo https://download-stage.docker.com/linux/sles/docker-ce-staging.repo'
          Adding repository 'Docker CE Nightly - s390x' ......................................................................................[error]
          Repository named 'docker-ce-nightly' already exists. Please use another alias.
          Adding repository 'Docker CE Nightly - Debuginfo s390x' ............................................................................[error]
          Repository named 'docker-ce-nightly-debuginfo' already exists. Please use another alias.

This patch updates the script to overwrite / replace the existing repo config.
This brings the rpm-based installations in line with the Debian approach, which
unconditionally overwrites `/etc/apt/sources.list.d/docker.list`.

It's worth noting that this change will therefore overwrite any customisations
made to the repo-configurations, so a warning is added for that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-05 14:04:30 +01:00
Sebastiaan van Stijn 15dfae02a4 Merge pull request #457 from thaJeztah/bump_rootless
rootless: update test version to 27.4.0-rc.4
2024-12-05 10:18:07 +01:00
Sebastiaan van Stijn a2068401df rootless: update test version to 27.4.0-rc.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-05 09:46:26 +01:00
Sebastiaan van Stijn 6b775c426f Merge pull request #456 from thaJeztah/bump_rootless
rootless: update test version to 27.4.0-rc.3
2024-12-02 09:22:39 +01:00
Sebastiaan van Stijn 7ee73f352a rootless: update test version to 27.4.0-rc.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-29 23:19:33 +01:00
Sebastiaan van Stijn f852aa471b Merge pull request #454 from thaJeztah/bump_rootless
rootless: update test version to 27.4.0-rc.2
2024-11-19 21:03:13 +01:00
Sebastiaan van Stijn 6391099694 rootless: update test version to 27.4.0-rc.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-19 20:41:42 +01:00
Paweł Gronowski 91c6b4f822 Merge pull request #452 from thaJeztah/bump_rootless
rootless: update test version to 27.4.0-rc.1
2024-11-15 09:24:41 +00:00
Sebastiaan van Stijn 6acd8e9a6d rootless: update test version to 27.4.0-rc.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-14 23:17:54 +01:00
Sebastiaan van Stijn 72c567a5b5 Merge pull request #451 from thaJeztah/remove_fedora_39
add deprecation warning for Fedora 39 and older
2024-11-14 17:50:00 +01:00
Sebastiaan van Stijn 103814e385 add deprecation warning for Fedora 39 and older
Fedora 39 and older reached EOL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-14 14:27:29 +01:00
Sebastiaan van Stijn 711a0d4121 Merge pull request #450 from thaJeztah/remove_dnf5_workaround
Remove workaround for dnf5 addrepo bug
2024-11-05 12:23:13 +01:00
Sebastiaan van Stijn c8e03d723e Remove workaround for dnf5 addrepo bug
This reverts commit 27f47c592a.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-04 16:43:33 +01:00
Sebastiaan van Stijn 6d51e2cd8c Merge pull request #448 from singhsegv/fix/yum
Broken yum config-manager command on CentOS 7
2024-09-24 10:05:03 +02:00
rajdeep1008 83b23cede1 "yum config-manager" to "yum-config-manager"
Signed-off-by: rajdeep1008 <iamrajdeep1008@gmail.com>
2024-09-24 12:16:27 +05:30
Laura Brehm 596f30d7c0 Merge pull request #447 from thaJeztah/bump_rootless
rootless: update test+stable versions to 27.3.1
2024-09-23 10:53:19 +01:00
Sebastiaan van Stijn d17913dd3f rootless: update test+stable versions to 27.3.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-23 11:43:16 +02:00
Sebastiaan van Stijn d9f9777e5d Merge pull request #446 from laurazard/27.3.0-rootless
rootless: update test+stable versions to 27.3.0
2024-09-19 23:16:19 +02:00
Laura Brehm 2ca04bbf48 rootless: update test+stable versions to 27.3.0
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-09-19 22:13:23 +01:00
Sebastiaan van Stijn 39040d838e Merge pull request #445 from thaJeztah/bump_rootless_test
rootless: update test version to 27.3.0-rc.2
2024-09-18 16:10:36 +02:00
Sebastiaan van Stijn 75f5d501b8 rootless: update test version to 27.3.0-rc.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-18 16:04:33 +02:00
Sebastiaan van Stijn 4bf098d43a Merge pull request #443 from thaJeztah/improve_readability
use double-quotes to make output more readable
2024-09-12 11:40:42 +02:00
Sebastiaan van Stijn 65cca2fde3 use double-quotes to make output more readable
commit 766b70c5be quoted these values to
prevent globbing, but used single quotes. However, these commands are
executed with `sh -c` using single quotes, which makes the output hard
to read because of the embedded quotes being escaped.

This patch changes to use double-quotes, which should still prevent
globbing to happen, but make the output more readable.

Before:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled '\''docker-ce-*'\'''
    + sh -c 'dnf config-manager --set-enabled '\''docker-ce-test'\'''
    + sh -c 'dnf makecache'

After:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled "docker-ce-*"'
    + sh -c 'dnf config-manager --set-enabled "docker-ce-test"'
    + sh -c 'dnf makecache'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-12 10:15:43 +02:00
Sebastiaan van Stijn 992da633fd Merge pull request #441 from thaJeztah/add_dnf5_support
add support for dnf5 (in preparation of fedora 41)
2024-09-12 09:48:01 +02:00
Sebastiaan van Stijn 27f47c592a add workaround for dnf5 addrepo bug
The addrepo command has a bug that causes it to fail if the `.repo` file
contains empty lines, causing it to fail;

    dnf config-manager addrepo --from-repofile="https://download.docker.com/linux/fedora/docker-ce.repo"
    Error in added repository configuration file. Cannot set repository option "#1=
    ": Option "#1" not found

Use a temporary file and strip empty lines as a workaround until the bug
is fixed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:01:16 +02:00
Sebastiaan van Stijn 5cf619df82 don't install weak-dependencies for dnf-core-utils
We only need the config-manager, but it comes with a large number of weak
dependencies;

    dnf -q install dnf-plugins-core
    Transaction Summary:
    Installing:       78 packages

Disable weak dependencies to skip those, as they're not essential for this
script;

    dnf -q --setopt=install_weak_deps=False install dnf-plugins-core
    Transaction Summary:
    Installing:       32 packages

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:00:07 +02:00
Sebastiaan van Stijn b9824740ec add support for dnf5
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;

    + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
      Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
      make: *** [Makefile:95: verify] Error 2
      script returned exit code 2

This patch:

- adds a check for dnf5
- removes some indirection through env-vars, and instead inlines the code

Note that with CentOS 7 being EOL, we can probably remove the `yum` variant
from the script, but I left those in place for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 12:59:10 +02:00
Paweł Gronowski 4ebfeb7744 Merge pull request #442 from vvoland/update-rootless-27.2.1
rootless: update to 27.2.1
2024-09-09 12:44:24 +00:00
Paweł Gronowski 685f1ad192 rootless: update to 27.2.1
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-09-09 13:59:14 +02:00
Sebastiaan van Stijn 4e6553081c apt-get: set global options before command
The `-y` and `-q` options are global options, and can be set before the
command that's run;

    apt-get --help
    ...
    Usage: apt-get [options] command
           apt-get [options] install|remove pkg1 [pkg2 ...]
           apt-get [options] source pkg1 [pkg2 ...]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 16:12:23 +02:00
Sebastiaan van Stijn d56da2bc4b dnf, yum: set global options before command
The `-y` and `-q` options are global options, and can be set before the
command that's run. There's some ambiguity in the USAGE output of different
versions (`yum`, `dnf`, `dnf5`)

yum always outputs the same usage, but shows that options go _before_
the command;

    yum --help
    Usage: yum [options] COMMAND

    yum install --help
    Usage: yum [options] COMMAND

dnf (dnf4) is ambiguous; when showing usage for `install` it shows the
options to be set _after_ the command;

    dnf install --help
    usage: dnf install [-c [config file]] [-q] [-v] [--version] ....

but the global `--help` shows them to be before the command;

    dnf --help
    usage: dnf [options] COMMAND

    General DNF options:
      ...
      -q, --quiet           quiet operation
      -v, --verbose         verbose operation
      ,,,
      --setopt SETOPTS      set arbitrary config and repo options

dnf5 is more explicit about global vs per-command options;

    dnf --help
    Usage:
      dnf5 [GLOBAL OPTIONS] <COMMAND> ...

    dnf install --help
    Usage:
      dnf5 [GLOBAL OPTIONS] install [OPTIONS] [ARGUMENTS]

Testing shows that older versions (`dnf4` and `yum`) handle both fine,
and because `dnf5` (per the above) prefers global options to go before
the command, we can use that convention in this script.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 16:09:29 +02:00
Paweł Gronowski 0d6f72e671 Merge pull request #439 from thaJeztah/deprecate_ubuntu_23.10
add deprecation warning for Ubuntu 23.10 (Mantic Minotaur) (EOL: July 11, 2024)
2024-07-24 16:57:36 +02:00
Sebastiaan van Stijn 5f7139b2bc add deprecation warning for Ubuntu 23.10 (Mantic Minotaur) (EOL: July 11, 2024)
Ubuntu 23.10 reached EOL on July 11, 2024: https://fridge.ubuntu.com/2024/07/17/ubuntu-23-10-mantic-minotaur-reached-end-of-life-on-july-11-2024/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-24 10:04:22 +02:00
Sebastiaan van Stijn 7bfc22cf0f Merge pull request #438 from thaJeztah/rootless_27.1.1
rootless: update to 27.1.1
2024-07-24 00:57:42 +02:00
Sebastiaan van Stijn 7e6c2da853 rootless: update to 27.1.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-23 23:59:39 +02:00
Sebastiaan van Stijn 1ce4e39c95 Merge pull request #437 from thaJeztah/rootless_27.1
rootless: update to 27.1.0
2024-07-22 23:38:32 +02:00
Sebastiaan van Stijn 5fe266f60c rootless: update to 27.1.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-22 23:35:36 +02:00
Sebastiaan van Stijn 0692978b95 Merge pull request #435 from thaJeztah/update_deprecated_distros
add deprecation warnings for Ubuntu 18.04 (bionic), Debian, Raspbian 10 Buster, Fedora <= 38, and CentOS (Stream) 8
2024-07-22 23:26:43 +02:00
Sebastiaan van Stijn c10af070c5 Merge pull request #434 from thaJeztah/remove_apt_transport_https
remove apt-transport-https from pre_reqs
2024-07-22 23:25:39 +02:00
Sebastiaan van Stijn 475fb604fa Merge pull request #433 from thaJeztah/rootless_unify
rootless: move versions together
2024-07-22 23:25:04 +02:00
Sebastiaan van Stijn a6952b8e9c Merge pull request #436 from thaJeztah/rhel_other_arches
remove check for RHEL only being available on s390x
2024-07-22 23:24:32 +02:00
Sebastiaan van Stijn 9f22ef3ba5 remove check for RHEL only being available on s390x
This check was added in 63fb2060c9, at which
time we did not provide packages fro RHEL on architectures other than s390x.

We now provide packages for RHEL 8 and 9 for amd64 (x86), arm64, and s390x,
so we can remove this check.

Note that we do not (yet?) provide packages for ppc64le, but this is more
of a niche use-case, so not adding a special condition for that, as we
don't provide that check for other distros.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-22 12:01:50 +02:00
Sebastiaan van Stijn 2f4367846e add deprecation warning for CentOS (Stream) 8 (EOL: 2024-05-31)
CentOS 8 stream reached EOL, and we're no longer building packages for it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-20 19:21:39 +02:00
Sebastiaan van Stijn 59ae94ae67 add deprecation warning for Fedora 38 and older
Fedora 38 and older reached EOL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-20 19:12:17 +02:00