Provide more information how to use the script, its intended purpose, and
limitations of the script.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The edge channel was already deprecated; the nightly channel has not been
updated for a long time, so (for now) mark it as deprecated as well.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Some users confuse "YY.04" versions for LTS versions, and not all users
pay close attention to versions reaching EOL. Print a warning for those
as well, because we no longer publish packages for these.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
While I haven't found cases where this caused issues, it probably doesn't
hurt to use single-quotes for these to prevent globbing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
I ran into this when I ran the script from within `/etc/yum.repos.d`:
+ sh -c 'dnf config-manager --set-disabled docker-ce-*'
Error: No matching repo to modify: docker-ce-staging.repo.
Took me a bit to understand why the script was failing, and then realized
the shell was expanding `docker-ce-*` to filenames in my current directory;
ls -l docker-ce-*
-rw-r--r--. 1 root root 2027 May 6 09:32 docker-ce-staging.repo
This patch quotes the channel name to prevent globbing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This step in the installation script was added to take non-standard umasks
into account (which is sometimes the case on some cloud providers).
The existing command was changing modes a bit too eagerly, as it recursively
set the "execute" bit, which would not only affect the /etc/apt/keyrings
directory, but also any file inside it (including files we don't own);
mkdir -m 0700 keyrings
touch keyrings/one.sh
touch keyrings/docker.gpg
ls -al keyrings/
total 8
drwx------ 4 root root 128 May 7 11:43 .
drwx------ 17 root root 544 May 7 11:43 ..
-rw-r--r-- 1 root root 0 May 7 11:43 docker.gpg
-rw-r--r-- 1 root root 0 May 7 11:43 one.sh
chmod -R a+rx keyrings
ls -al keyrings/
total 0
drwxr-xr-x 4 root root 128 May 7 11:43 .
drwx------ 17 root root 544 May 7 11:43 ..
-rwxr-xr-x 1 root root 0 May 7 11:43 docker.gpg
-rwxr-xr-x 1 root root 0 May 7 11:43 one.sh
This patch changes the script to use `install`, which creates the directory
if it doesn't exist, and sets the permissions on the directory itself, without
recursing to files inside it:
mkdir -m 0700 keyrings2
touch keyrings2/one.sh
touch keyrings2/docker.gpg
ls -al keyrings2/
total 8
drwx------ 2 root root 4096 May 7 11:44 .
drwxr-xr-x 1 root root 4096 May 7 11:44 ..
-rw-r--r-- 1 root root 0 May 7 11:44 docker.gpg
-rw-r--r-- 1 root root 0 May 7 11:44 one.sh
install -m 0755 -d keyrings2/
total 8
drwxr-xr-x 2 root root 4096 May 7 11:44 .
drwxr-xr-x 1 root root 4096 May 7 11:44 ..
-rw-r--r-- 1 root root 0 May 7 11:44 docker.gpg
-rw-r--r-- 1 root root 0 May 7 11:44 one.sh
Changing permissions of the `docker.gpg` file itself is already handled
separately through `chmod a+r /etc/apt/keyrings/docker.gpg`.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The script strips leading zeros to accommodate CalVer versions, which
led to an empty when passing a SemVer(ish) version:
VERSION=23.0.0 ./install.sh --dry-run
...
./install.sh: 118: [: Illegal number:
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Looks like their package repositories are having a bad day, or changes
were made (again);
# Executing docker install script, commit: 60327925bf2a9c6f81084661b0c05edc8263a3c9
+ sh -c 'yum install -y -q yum-utils'
Error: Failed to download metadata for repo 'baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>