Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure util_Linux gets replaced as intended #2424

Merged
merged 2 commits into from
Oct 13, 2023
Merged

Conversation

drwetter
Copy link
Owner

@drwetter drwetter commented Oct 13, 2023

There were some discussions in #2420 whether the zypper install commend worked as intended. While there's liitle doubt that those packages weren't installed this PR makes really sure that this is and will be always the case.

Also it does an update via zypper up as the image provided from dockerhub seemed to be somewhat behind.

There were some discussions in #2420 whether the zypper install
commend worked as intended. While there's liitle doubt that those
packages weren't installed this PR makes really sure that this is the case.

Also it does an update via ``zypper up`` as the image provided from
dockerhub seemed to be somewhat behind.
@drwetter
Copy link
Owner Author

Long story short:

util-linux needs to be removed before zypper in the other rpms . And a zypper up seems needed.

Long version:

8a3288a210a:/ # zypper rm -y util-linux
Reading installed packages...
Resolving package dependencies...

The following 2 packages are going to be REMOVED:
aaa_base util-linux

2 packages to remove.
After the operation, 5.8 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): y
(1/2) Removing aaa_base-84.87+git20180409.04c9dae-150300.10.3.1.x86_64 .............................................................................[done]
(2/2) Removing util-linux-2.37.4-150500.7.16.x86_64 ................................................................................................[done]

88a3288a210a:/ # zypper  --non-interactive install -y --download-in-advance --no-recommends bash procps grep gawk sed coreutils busybox-util-linux busybox-vi ldns libidn2-0 socat openssl curl
Retrieving repository 'Update repository of openSUSE Backports' metadata ...........................................................................[done]
Building repository 'Update repository of openSUSE Backports' cache ................................................................................[done]
Retrieving repository 'Non-OSS Repository' metadata ................................................................................................[done]
Building repository 'Non-OSS Repository' cache .....................................................................................................[done]
Retrieving repository 'Open H.264 Codec (openSUSE Leap)' metadata ..................................................................................[done]
Building repository 'Open H.264 Codec (openSUSE Leap)' cache .......................................................................................[done]
Retrieving repository 'Main Repository' metadata ...................................................................................................[done]
Building repository 'Main Repository' cache ........................................................................................................[done]
Retrieving repository 'Update repository with updates from SUSE Linux Enterprise 15' metadata ---------------------------------------------------------[\]^C
Trying to exit gracefully...
^C
Zypper is currently cleaning up, exiting as soon as possible.
^C
Zypper is currently cleaning up, exiting as soon as possible.
88a3288a210a:/ # exit

So, just removing open package removes another one we may not want to be removed --> aaa_base

sudo docker run -ti --rm opensuse/leap:15.5 /bin/bash
7e9b5e1466ff:/ # rpm -ev util-linux
error: Failed dependencies:
/bin/login is needed by (installed) aaa_base-84.87+git20180409.04c9dae-150300.10.3.1.x86_64
7e9b5e1466ff:/ # rpm -ev util-linux --nodeps
Preparing packages...
util-linux-2.37.4-150500.7.16.x86_64
7e9b5e1466ff:/ # zypper  --non-interactive install -y --download-in-advance --no-recommends bash procps grep gawk sed coreutils busybox-util-linux busybox-vi ldns libidn2-0 socat openssl curl
Retrieving repository 'Update repository of openSUSE Backports' metadata ...........................................................................[done]
Building repository 'Update repository of openSUSE Backports' cache ................................................................................[done]
Retrieving repository 'Non-OSS Repository' metadata ................................................................................................[done]
Building repository 'Non-OSS Repository' cache .....................................................................................................[done]
Retrieving repository 'Open H.264 Codec (openSUSE Leap)' metadata ..................................................................................[done]
Building repository 'Open H.264 Codec (openSUSE Leap)' cache .......................................................................................[done]
Retrieving repository 'Main Repository' metadata ...................................................................................................[done]
Building repository 'Main Repository' cache ........................................................................................................[done]
Retrieving repository 'Update repository with updates from SUSE Linux Enterprise 15' metadata ......................................................[done]
Building repository 'Update repository with updates from SUSE Linux Enterprise 15' cache ...........................................................[done]
Retrieving repository 'Main Update Repository' metadata ............................................................................................[done]
Building repository 'Main Update Repository' cache .................................................................................................[done]
Retrieving repository 'Update Repository (Non-Oss)' metadata .......................................................................................[done]
Building repository 'Update Repository (Non-Oss)' cache ............................................................................................[done]
Loading repository data...
Reading installed packages...
'grep' is already installed.
No update candidate for 'grep-3.1-150000.4.6.1.x86_64'. The highest available version is already installed.
'coreutils' is already installed.
No update candidate for 'coreutils-8.32-150400.7.5.x86_64'. The highest available version is already installed.
'bash' is already installed.
No update candidate for 'bash-4.4-150400.25.22.x86_64'. The highest available version is already installed.
'gawk' is already installed.
No update candidate for 'gawk-4.2.1-150000.3.3.1.x86_64'. The highest available version is already installed.
'sed' is already installed.
No update candidate for 'sed-4.4-11.6.x86_64'. The highest available version is already installed.
'procps' is already installed.
No update candidate for 'procps-3.3.15-150000.7.34.1.x86_64'. The highest available version is already installed.
'libidn2-0' is already installed.
No update candidate for 'libidn2-0-2.2.0-3.6.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

The following package is going to be upgraded:
curl

The following 12 NEW packages are going to be installed:
busybox busybox-util-linux busybox-vi ldns libdbus-1-3 libldns2 libnl-config libnl3-200 libpcap1 libwrap0 openssl socat

1 package to upgrade, 12 new.
Overall download size: 2.3 MiB. Already cached: 0 B. After the operation, additional 4.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: busybox-1.35.0-150500.8.2.x86_64 (Main Repository)                                                                       (1/13), 601.3 KiB
Retrieving: busybox-1.35.0-150500.8.2.x86_64.rpm .......................................................................................[done (4.0 MiB/s)]
Retrieving: libldns2-1.7.0-150000.4.8.1.x86_64 (Main Repository)                                                                     (2/13), 142.4 KiB
Retrieving: libldns2-1.7.0-150000.4.8.1.x86_64.rpm .....................................................................................[done (1.1 MiB/s)]
Retrieving: libnl-config-3.3.0-1.29.noarch (Main Repository)                                                                         (3/13),  14.4 KiB
Retrieving: libnl-config-3.3.0-1.29.noarch.rpm .....................................................................................................[done]
Retrieving: libwrap0-7.6-1.433.x86_64 (Main Repository)                                                                              (4/13),  24.6 KiB
Retrieving: libwrap0-7.6-1.433.x86_64.rpm .............................................................................................[done (24.6 KiB/s)]
Retrieving: openssl-1.1.1l-150400.1.5.noarch (Main Repository)                                                                       (5/13),  25.7 KiB
Retrieving: openssl-1.1.1l-150400.1.5.noarch.rpm ......................................................................................[done (25.7 KiB/s)]
Retrieving: libnl3-200-3.3.0-1.29.x86_64 (Main Repository)                                                                           (6/13), 277.6 KiB
Retrieving: libnl3-200-3.3.0-1.29.x86_64.rpm .......................................................................................................[done]
Retrieving: socat-1.7.3.2-4.10.x86_64 (Main Repository)                                                                              (7/13), 227.4 KiB
Retrieving: socat-1.7.3.2-4.10.x86_64.rpm ..............................................................................................[done (3.7 MiB/s)]
Retrieving: curl-8.0.1-150400.5.32.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                           (8/13), 548.9 KiB
Retrieving: curl-8.0.1-150400.5.32.1.x86_64.rpm ........................................................................................[done (4.2 MiB/s)]
Retrieving: libdbus-1-3-1.12.2-150400.18.8.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                   (9/13), 151.4 KiB
Retrieving: libdbus-1-3-1.12.2-150400.18.8.1.x86_64.rpm ............................................................................................[done]
Retrieving: busybox-vi-1.35.0-150400.4.5.1.noarch (Update repository with updates from SUSE Linux Enterprise 15)                    (10/13),  10.4 KiB
Retrieving: busybox-vi-1.35.0-150400.4.5.1.noarch.rpm ..............................................................................................[done]
Retrieving: busybox-util-linux-1.35.0-150400.4.5.1.noarch (Update repository with updates from SUSE Linux Enterprise 15)            (11/13),  14.3 KiB
Retrieving: busybox-util-linux-1.35.0-150400.4.5.1.noarch.rpm ......................................................................................[done]
Retrieving: libpcap1-1.10.1-150400.1.7.x86_64 (Main Repository)                                                                     (12/13), 163.6 KiB
Retrieving: libpcap1-1.10.1-150400.1.7.x86_64.rpm ..................................................................................................[done]
Retrieving: ldns-1.7.0-150000.4.8.1.x86_64 (Main Repository)                                                                        (13/13), 161.9 KiB
Retrieving: ldns-1.7.0-150000.4.8.1.x86_64.rpm .........................................................................................[done (2.5 KiB/s)]

Checking for file conflicts: .......................................................................................................................[done]
( 1/13) Installing: busybox-1.35.0-150500.8.2.x86_64 ...............................................................................................[done]
( 2/13) Installing: libldns2-1.7.0-150000.4.8.1.x86_64 .............................................................................................[done]
( 3/13) Installing: libnl-config-3.3.0-1.29.noarch .................................................................................................[done]
( 4/13) Installing: libwrap0-7.6-1.433.x86_64 ......................................................................................................[done]
( 5/13) Installing: openssl-1.1.1l-150400.1.5.noarch ...............................................................................................[done]
( 6/13) Installing: libnl3-200-3.3.0-1.29.x86_64 ...................................................................................................[done]
( 7/13) Installing: socat-1.7.3.2-4.10.x86_64 ......................................................................................................[done]
( 8/13) Installing: curl-8.0.1-150400.5.32.1.x86_64 ................................................................................................[done]
( 9/13) Installing: libdbus-1-3-1.12.2-150400.18.8.1.x86_64 ........................................................................................[done]
(10/13) Installing: busybox-vi-1.35.0-150400.4.5.1.noarch ..........................................................................................[done]
(11/13) Installing: busybox-util-linux-1.35.0-150400.4.5.1.noarch ..................................................................................[done]
(12/13) Installing: libpcap1-1.10.1-150400.1.7.x86_64 ..............................................................................................[done]
(13/13) Installing: ldns-1.7.0-150000.4.8.1.x86_64 .................................................................................................[done]

7e9b5e1466ff:/ #

So, rpm -e --nodeps saves us.

But here again is one thing: The docker image lags behind:

e9b5e1466ff:/ # zypper up
Loading repository data...
Reading installed packages...

The following 3 packages are going to be upgraded:
libcurl4 login_defs shadow

3 packages to upgrade.
Overall download size: 1.1 MiB. Already cached: 0 B. After the operation, additional 32.0 B will be used.
Continue? [y/n/v/...? shows all options] (y):
Retrieving: libcurl4-8.0.1-150400.5.32.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                        (1/3), 486.0 KiB
Retrieving: libcurl4-8.0.1-150400.5.32.1.x86_64.rpm ....................................................................................[done (6.4 MiB/s)]
Retrieving: login_defs-4.8.1-150400.10.12.1.noarch (Update repository with updates from SUSE Linux Enterprise 15)                     (2/3),  33.3 KiB
Retrieving: login_defs-4.8.1-150400.10.12.1.noarch.rpm .............................................................................................[done]
Retrieving: shadow-4.8.1-150400.10.12.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                         (3/3), 613.9 KiB
Retrieving: shadow-4.8.1-150400.10.12.1.x86_64.rpm .................................................................................................[done]

Checking for file conflicts: .......................................................................................................................[done]
(1/3) Installing: libcurl4-8.0.1-150400.5.32.1.x86_64 ..............................................................................................[done]
(2/3) Installing: login_defs-4.8.1-150400.10.12.1.noarch ...........................................................................................[done]
(3/3) Installing: shadow-4.8.1-150400.10.12.1.x86_64 ...............................................................................................[done]
Executing %posttrans scripts .......................................................................................................................[done]

7e9b5e1466ff:/ #

That's why we need a zypper up here.

@drwetter drwetter merged commit f3c7eb4 into 3.2 Oct 13, 2023
2 checks passed
@drwetter drwetter deleted the fix_utilLinux_Dockerfile branch October 13, 2023 15:33
@polarathene
Copy link
Contributor

For reference if anyone lands on this PR, I commented why:

  • util-linux does not need to be removed
  • zypper up is not required.
  • Better approach to removing unwanted repos.

@drwetter had a misunderstanding by running the commands without the zypper options that the Dockerfile explicitly uses (notably --installroot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants