Bug 23488

Summary: /var/tmp/rpm-tmp.NrfiN6: line 5: mount: command not found
Product: Mageia Reporter: Bit Twister <bittwister2>
Component: RPM PackagesAssignee: Base system maintainers <basesystem>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Normal CC: isobuild, kernel, laidlaws, mageiatools, marja11, ngompa13, pterjan, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: makedev CVE:
Status comment:

Description Bit Twister 2018-08-27 15:54:06 CEST
Description of problem:  mga7 dev0

Snippet from /root/drakx/install.log

nstalling gawk-4.2.1-1.mga7.x86_64.rpm mageia-repos-keys-7-0.0.2.mga7.noarch.rpm lib64ext2fs2-1.44.4-1.mga7.x86_64.rpm e2fsprogs-1.44.4-1.mga7.x86_64.rpm lib64tcb0-1.1-8.mga7.x86_64.rpm iproute2-4.18.0-1.mga7.x86_64.rpm lib64fuse2-2.9.8-2.mga7.x86_64.rpm lib64procps6-3.3.12-1.mga6.x86_64.rpm traceroute-2.1.0-1.mga6.x86_64.rpm cracklib-dicts-2.9.6-5.mga6.x86_64.rpm ipcalc-0.2.0-4.mga7.x86_64.rpm lib64smartcols1-2.32-6.mga7.x86_64.rpm lib64gmp10-6.1.2-2.mga7.x86_64.rpm lib64nettle6-3.4-1.mga7.x86_64.rpm lib64idn12-1.35-1.mga7.x86_64.rpm xz-5.2.4-1.mga7.x86_64.rpm lib64user1-0.62-12.mga7.x86_64.rpm kmod-24-2.mga6.x86_64.rpm iputils-20161105-3.mga7.x86_64.rpm diffutils-3.6-1.mga7.x86_64.rpm lsb-release-2.0-53.mga7.noarch.rpm info-install-6.5-3.mga7.x86_64.rpm gettext-base-0.19.8.1-2.mga7.x86_64.rpm libuser-0.62-12.mga7.x86_64.rpm psmisc-22.21-8.mga7.x86_64.rpm mageia-repos-pkgprefs-7-0.0.2.mga7.noarch.rpm chkconfig-1.10-1.mga7.x86_64.rpm makedev-4.4-23.mga7.noarch.rpm lib64iptables12-1.6.1-3.mga7.x86_64.rpm perl-File-Sync-0.110.0-25.mga7.x86_64.rpm lib64cap2-2.25-1.mga6.x86_64.rpm lib64ncursesw6-6.1-20180728.1.mga7.x86_64.rpm mageia-release-Default-7-0.4.mga7.x86_64.rpm mageia-repos-7-0.0.2.mga7.x86_64.rpm pam_tcb-1.1-8.mga7.x86_64.rpm mageia-repos-cauldron-7-0.0.2.mga7.x86_64.rpm shadow-utils-4.4-5.mga7.x86_64.rpm perl-MDK-Common-1.2.34.2-2.mga7.noarch.rpm mageia-release-common-7-0.4.mga7.x86_64.rpm lib64devmapper-event1.02-1.02.137-3.mga7.x86_64.rpm sed-4.5-1.mga7.x86_64.rpm lib64popt0-1.16-13.mga6.x86_64.rpm coreutils-8.29-1.mga7.x86_64.rpm findutils-4.6.0-1.mga6.x86_64.rpm lib64fdisk1-2.32-6.mga7.x86_64.rpm ifmetric-0.3-17.mga6.x86_64.rpm lib64attr1-2.4.48-1.mga7.x86_64.rpm lib64acl1-2.2.52-8.mga7.x86_64.rpm lib64intl8-0.19.8.1-2.mga7.x86_64.rpm popt-data-1.16-13.mga6.noarch.rpm from /mnt/var/cache/urpmi/rpms
starting installing packages


libuser-0.62-12.mga7.x86_64
shadow-utils-4.4-5.mga7.x86_64
/var/tmp/rpm-tmp.NrfiN6: line 5: mount: command not found
makedev-4.4-23.mga7.noarch
info-install-6.5-3.mga7.x86_64



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. see bug 23485 
2.  grep 'not found' /root/drakx/install.log
Comment 1 Marja Van Waes 2018-08-27 22:01:47 CEST
At the beginning of the installation the mount command must have been found and used. I don't understand why it isn't found when the packages get installed.

CC: (none) => isobuild, mageiatools, marja11

Comment 2 Pascal Terjan 2018-08-27 22:16:08 CEST
Package scripts are run from the system being installed, the package calling mount needs a proper dependency to have it installed before .

CC: (none) => pterjan

Comment 3 Marja Van Waes 2018-08-28 14:45:43 CEST
(In reply to Pascal Terjan from comment #2)
> Package scripts are run from the system being installed, the package calling
> mount needs a proper dependency to have it installed before .

Thanks for the explanation :-)

The error appeared just before makedev was installed. Does that mean that makedev needs 

  Requires(pre): util-linux

Or can't the culprit have been installed with the dependency missing?



CC'ing the kernel maintainers, because makedev is a "System/Kernel and hardware" package. 

Btw, what is the new upstream for makedev? We still have 

  URL:            http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/makedev/

in the spec file :-/

Source RPM: (none) => makedev??

Comment 4 David Walser 2018-08-28 22:13:31 CEST
(In reply to Marja Van Waes from comment #3)
> The error appeared just before makedev was installed. Does that mean that
> makedev needs 
> 
>   Requires(pre): util-linux

Looking at the SPEC file, it actually calls mount in %post, not %pre (not sure why the error appears first), so it'd be Requires(post), so you had the right idea.

The other problem with this kind of issue, especially with basesystem packages is dependency loops, so hopefully that fix would be enough, but if there's a dependency loop, it might not be until the loop is broken.
Comment 5 Marja Van Waes 2018-08-30 21:02:47 CEST
(In reply to David Walser from comment #4)
> (In reply to Marja Van Waes from comment #3)
> > The error appeared just before makedev was installed. Does that mean that
> > makedev needs 
> > 
> >   Requires(pre): util-linux
> 
> Looking at the SPEC file, it actually calls mount in %post, not %pre (not
> sure why the error appears first), so it'd be Requires(post), so you had the
> right idea.
> 
> The other problem with this kind of issue, especially with basesystem
> packages is dependency loops, so hopefully that fix would be enough, but if
> there's a dependency loop, it might not be until the loop is broken.

Thanks, David.

Assigning to the basesystem maintainers (or is makedev, as "System/Kernel and hardware" package, maintained by the kernel maintainers?)

Component: Installer => RPM Packages
Source RPM: makedev?? => makedev
Assignee: bugsquad => basesystem
CC: (none) => kernel

Comment 6 Pascal Terjan 2018-08-30 22:21:14 CEST
A better fix would be to not call mount (I wonder if I wrote that code, it seems familiar /o\)

The script tries to find out if it should create devices or not in an ugly way:

if ! df /dev | grep -q /dev$ || ! mount | grep -q ' /dev type devtmpfs '; then

It would probably be better to do something like:

if ! df /dev | grep -q '^devtmpfs .* /dev$' ; then

But this seems a bit wrong to create them in all other cases, like if there is a bind mount.

Maybe it could just be something like if [ ! -c /dev/null ].
Comment 7 Doug Laidlaw 2018-11-13 17:11:31 CET
This may be OT, but nettle is mentioned, and nettle-devel "does not verify."  The SHA256 does not match.

CC: (none) => laidlaws

Comment 8 Thierry Vignaud 2018-11-13 17:27:24 CET
Or maybe it's time to stop installing it?
Eg, FC stopped installing MAKEDEV a while ago...
chroots users could still manuall installing it.
(or learn to use mount --bind /dev/ /some/chroot/dev -o ro)

I've stopped maintaining both the code & the conf a looong time ago...
(Also we lost the VC sources...)

CC: (none) => thierry.vignaud

Comment 9 Pascal Terjan 2018-11-13 17:37:50 CET
One of the users in iurt :)
Comment 10 Neal Gompa 2018-11-24 15:30:51 CET
(In reply to Pascal Terjan from comment #9)
> One of the users in iurt :)

Mock doesn't use makedev, but as it's pulled in and used by basesystem-minimal, it's installed in the chroot/container.

CC: (none) => ngompa13

Comment 11 Doug Laidlaw 2018-11-25 01:41:25 CET
Further to Comment 7, the problem with nettle-devel was different, and is now fixed. Vide Bug 23842.