Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487324 - sys-kernel/dracut-033-r3 creates broken /var/log symlink in img
Summary: sys-kernel/dracut-033-r3 creates broken /var/log symlink in img
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: 2013-10-08 15:06 UTC by Nikoli
Modified: 2013-11-18 19:10 UTC (History)
1 user (show)

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 2013-10-08 15:06:49 UTC
# ls -la run/ var
run/:
итого 0
drwxr-xr-x  4 root root  80 окт.   8 18:42 .
drwxr-xr-x 15 root root 380 окт.   8 18:42 ..
drwxr-xr-x  2 root root  40 окт.   8 18:42 initramfs
drwxr-xr-x  2 root root  40 окт.   8 18:42 lock

var:
итого 0
drwxr-xr-x  2 root root 100 окт.   8 18:42 .
drwxr-xr-x 15 root root 380 окт.   8 18:42 ..
lrwxrwxrwx  1 root root  11 окт.   8 18:42 lock -> ../run/lock
lrwxrwxrwx  1 root root  10 окт.   8 18:42 log -> ../run/log
lrwxrwxrwx  1 root root   6 окт.   8 18:42 run -> ../run


/run/ has dir for /var/lock symlink, but not for /var/log.
I am not sure why these dirs even are created in /run/, it should be tmpfs.
Comment 1 Alexander Tsoy 2013-10-09 12:43:19 UTC
(In reply to Nikoli from comment #0)
> I am not sure why these dirs even are created in /run/, it should be tmpfs.

I don't see the problem. /run is mounted as tmpfs and all these dirs are created automatically on boot. For example /run/log (needed for journald):

./modules.d/98systemd/dracut-cmdline.sh:[ -d /run/log ] || mkdir -p -m 0755 /run/log
./modules.d/99base/init.sh:[ -d /run/log ] || mkdir -p -m 0755 /run/log
Comment 2 Nikoli 2013-10-10 10:45:07 UTC
initramfs.img is minimal, there should not be any broken or unused file or dir.
Comment 3 Alexander Tsoy 2013-10-12 20:50:37 UTC
Ah.. Sorry, I misunderstood you. I thought the bug is about symlinks. :)

I believe this patch will not break anything:

diff --git a/dracut.sh b/dracut.sh
index d9533dd..49ee34f 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1081,7 +1081,7 @@ if [[ $kernel_only != yes ]]; then
         fi
     done
 
-    for d in dev proc sys sysroot root run run/lock run/initramfs; do
+    for d in dev proc sys sysroot root run; do
         if [ -L "/$d" ]; then
             inst_symlink "/$d"
         else
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-11-18 19:10:59 UTC
Thanks!

+  18 Nov 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> dracut-034-r1.ebuild,
+  +files/034-0007-dracut.sh-also-mkdir-run-lock-which-is.patch,
+  +files/034-0008-dracut.sh-no-need-to-make-subdirs-in-r.patch,
+  +files/034-0009-lvm-install-thin-utils-for-non-hostonl.patch,
+  +files/034-0010-module-setup.sh-add-comments-for-dracu.patch,
+  +files/034-0011-lvm-fix-thin-recognition.patch,
+  +files/034-0012-lvm-always-install-thin-utils-for-lvm.patch:
+  Fixed bug #487324 (redundant dirs) and bug #490098 (thin provisioning).
+