Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420585 - sys-kernel/dracut-019 has missing pkgconfig RDEPEND
Summary: sys-kernel/dracut-019 has missing pkgconfig RDEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-10 21:06 UTC by Nikoli
Modified: 2013-10-06 15:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2012-06-10 21:06:28 UTC
/usr/lib/dracut/dracut-functions.sh: line 534: pkg-config: command not found
I: *** Including module: dash ***
I: *** Including module: i18n ***
I: *** Including module: kernel-modules ***
I: *** Including module: resume ***
I: *** Including module: rootfs-block ***
I: *** Including module: terminfo ***
I: *** Including module: udev-rules ***
/usr/lib/dracut/modules.d/95udev-rules/module-setup.sh: line 8: pkg-config: co
/usr/lib/dracut/modules.d/95udev-rules/module-setup.sh: line 14: pkg-config: command not found
I: Skipping udev rule: 50-udev.rules
I: Skipping udev rule: 95-late.rules
I: Skipping udev rule: 50-firmware.rules
I: *** Including module: base ***
I: *** Including module: fs-lib ***
I: *** Including module: shutdown ***
I: Skipping program kexec as it cannot be found and is flagged to be optional
I: *** Including modules done ***


Also there are now var/lock/lock and var/run/run dirs, both seem wrong.
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-06-11 09:48:34 UTC
(In reply to comment #0)
> /usr/lib/dracut/dracut-functions.sh: line 534: pkg-config: command not found
> [...]

Thanks!


> Also there are now var/lock/lock and var/run/run dirs, both seem wrong.

I don't have such dirs.  Are these created in an initramfs?
Comment 2 Nikoli 2012-06-11 19:52:15 UTC
> I don't have such dirs.  Are these created in an initramfs?
# lsinitrd /boot/initramfs-3.3.8-hardened.img |grep -e var/lock/lock -e var/run/run
lrwxrwxrwx   1 root     root            9 Jun 11 01:02 var/lock/lock -> /run/lock
lrwxrwxrwx   1 root     root            4 Jun 11 01:02 var/run/run -> /run

After reboot i do not have such dirs in /var:
# LANG=C ls /var/lock/lock /var/run/run
ls: cannot access /var/lock/lock: No such file or directory
ls: cannot access /var/run/run: No such file or directory


What do you plan to do with pkgconfig? For most packages it's DEPEND, but not RDEPEND. I do not want to have it constantly installed in all systems.

Seems it is used only for detecting 2 paths and has fallback:
 # grep -Ri pkg-config . -A5
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:    systemdutildir=$(pkg-config systemd --variable=systemdutildir)
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-    if ! [[ -d "$systemdutildir" ]]; then
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-        [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-        [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-    fi
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:    udevdir=$(pkg-config udev --variable=udevdir)
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-    if ! [[ -d "$udevdir" ]]; then
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-        [[ -d /lib/udev ]] && udevdir=/lib/udev
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-        [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-    fi
./usr/lib/dracut/modules.d/95udev-rules/module-setup.sh-
--
./usr/lib/dracut/dracut-functions:udevdir=$(pkg-config udev --variable=udevdir)
./usr/lib/dracut/dracut-functions-if ! [[ -d "$udevdir" ]]; then
./usr/lib/dracut/dracut-functions-    [[ -d /lib/udev ]] && udevdir=/lib/udev
./usr/lib/dracut/dracut-functions-    [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
./usr/lib/dracut/dracut-functions-fi
./usr/lib/dracut/dracut-functions-
--
./usr/lib/dracut/dracut-functions.sh:udevdir=$(pkg-config udev --variable=udevdir)
./usr/lib/dracut/dracut-functions.sh-if ! [[ -d "$udevdir" ]]; then
./usr/lib/dracut/dracut-functions.sh-    [[ -d /lib/udev ]] && udevdir=/lib/udev
./usr/lib/dracut/dracut-functions.sh-    [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
./usr/lib/dracut/dracut-functions.sh-fi
./usr/lib/dracut/dracut-functions.sh-

Fallback seems correct, but if it not, patching is simple.


Also what about '/usr/lib/dracut/modules.d/95virtfs/'? Please make virtfs module optional, it is not required for most systems.
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-06-12 14:32:44 UTC
(In reply to comment #2)
> > I don't have such dirs.  Are these created in an initramfs?
> # lsinitrd /boot/initramfs-3.3.8-hardened.img |grep -e var/lock/lock -e
> var/run/run
> lrwxrwxrwx   1 root     root            9 Jun 11 01:02 var/lock/lock ->
> /run/lock
> lrwxrwxrwx   1 root     root            4 Jun 11 01:02 var/run/run -> /run

Hm, I cannot reproduce that.

# dracut -H /tmp/test.img
# lsinitrd test.img | grep var
drwxr-xr-x   3 root     root            0 Jun 12 16:19 var
lrwxrwxrwx   1 root     root            9 Jun 12 16:19 var/lock -> /run/lock
lrwxrwxrwx   1 root     root            4 Jun 12 16:19 var/run -> /run
drwxr-xr-x   2 root     root            0 Jun 12 16:18 var/log


> After reboot i do not have such dirs in /var:
> # LANG=C ls /var/lock/lock /var/run/run
> ls: cannot access /var/lock/lock: No such file or directory
> ls: cannot access /var/run/run: No such file or directory

You mean in initramfs, yes?


> What do you plan to do with pkgconfig? For most packages it's DEPEND, but
> not RDEPEND. I do not want to have it constantly installed in all systems.

I've added it to RDEPEND, because it is runtime dependency.


> Also what about '/usr/lib/dracut/modules.d/95virtfs/'? Please make virtfs
> module optional, it is not required for most systems.

It is installed by default by the ebuild, because it doesn't need any new dependencies. And dracut doesn't include this module in hostonly mode if you don't needed. For generic initramfs just use -o option to omit this module.
Comment 4 Nikoli 2012-06-13 03:01:10 UTC
> You mean in initramfs, yes?

Nо, in my ext4 filesystem mounted to /var

> I've added it to RDEPEND, because it is runtime dependency.

I hope, dracut will not have automake, cmake, rake, scons, etc in RDEPEND.
pkgconfig is small, but a lot packages are missing it in DEPEND, and now it is harder to detect such mistakes. When app-portage/autodep will be used by default, it will not matter, but now it does.
Comment 5 cyberbat 2012-06-13 19:57:33 UTC
I also think it's a bad idea to make pkg-config RDEPEND of something. May be there is another way?
Comment 6 Nikoli 2012-07-05 10:59:43 UTC
Updated to dracut-019 again, problem with dirs exist:
# lsinitrd /boot/initramfs.img | grep var
drwxr-xr-x   5 root     root            0 Jul  5 14:33 var
drwxr-xr-x   2 root     root            0 Jul  5 14:33 var/lock
lrwxrwxrwx   1 root     root            9 Jul  5 14:33 var/lock/lock -> /run/lock
drwxr-xr-x   2 root     root            0 Jul  5 14:33 var/run
lrwxrwxrwx   1 root     root            4 Jul  5 14:33 var/run/run -> /run
drwxr-xr-x   2 root     root            0 Jul  5 14:33 var/log
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-07-25 17:35:00 UTC
I've applied patch removing warnings if pkg-config is not installed.

+*dracut-019-r2 (25 Jul 2012)
+
+  25 Jul 2012; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-019-r2.ebuild,
+  +files/dracut-019-no-pkg-config-warnings.patch:
+  Make virtual/pkgconfig optional.  Fixes bug #420585 in better way than
+  previous commit.
+

(In reply to comment #4)
> > You mean in initramfs, yes?
> 
> Nо, in my ext4 filesystem mounted to /var

I am confused with this.  Is it really bug caused by dracut?  Do symlinks /var/lock and /var/run target to /run/lock and /run?  If this problem still occurs please sum it up in another bug, please, because it is separate issue.  I'm closing this bug because main pkgconfig issue is fixed.