Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 584256 - =sys-fs/udev writes to '/ /var/tmp/portage/sys-fs/udev-230/image/etc' upon merge
Summary: =sys-fs/udev writes to '/ /var/tmp/portage/sys-fs/udev-230/image/etc' upon merge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-05-26 21:23 UTC by Coacher
Modified: 2016-06-04 03:22 UTC (History)
1 user (show)

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


Attachments
emerge --info sys-fs/udev (info,5.15 KB, text/plain)
2016-05-26 21:23 UTC, Coacher
Details
steps.log (steps.log,6.07 KB, text/plain)
2016-05-26 21:23 UTC, Coacher
Details
/var/db/pkg/sys-fs/udev-230/CONTENTS (CONTENTS,4.51 KB, text/plain)
2016-05-26 21:25 UTC, Coacher
Details
build.log.gz (build.log.gz,43.85 KB, application/x-gzip)
2016-05-26 21:26 UTC, Coacher
Details
/var/db/pkg/sys-fs/udev-230/CONTENTS with fixed ebuild (CONTENTS,4.12 KB, text/plain)
2016-05-26 22:17 UTC, Coacher
Details
ebuild.patch (ebuild.patch,646 bytes, patch)
2016-05-26 22:22 UTC, Coacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2016-05-26 21:23:05 UTC
Created attachment 435492 [details]
emerge --info sys-fs/udev

Hello.

After =sys-fs/udev-230 is successfully merged a wild ' ' directory appears in /
with contents that are usually meant for TMPDIR. See the attached file 'steps.log' for directory contents and steps to reproduce.

Please fix.
Comment 1 Coacher 2016-05-26 21:23:23 UTC
Created attachment 435494 [details]
steps.log
Comment 2 Coacher 2016-05-26 21:25:51 UTC
Created attachment 435496 [details]
/var/db/pkg/sys-fs/udev-230/CONTENTS
Comment 3 Coacher 2016-05-26 21:26:39 UTC
Created attachment 435498 [details]
build.log.gz
Comment 4 Coacher 2016-05-26 22:04:25 UTC
I believe the problem is here:

INSTALL_DIRS='$(sysconfdir)/udev/rules.d \
		$(sysconfdir)/udev/hwdb.d \
		$(sysconfdir)/systemd/network'

You don't break lines with \ in single quotes, it results in literal backslash-linefeed.
Comment 5 Coacher 2016-05-26 22:15:54 UTC
(In reply to Coacher from comment #4)
> I believe the problem is here:
> 
> INSTALL_DIRS='$(sysconfdir)/udev/rules.d \
> 		$(sysconfdir)/udev/hwdb.d \
> 		$(sysconfdir)/systemd/network'
> 
> You don't break lines with \ in single quotes, it results in literal
> backslash-linefeed.
I can confirm that with the following changes to ebuild the problem is gone:

diff --git a/sys-fs/udev/udev-230.ebuild b/sys-fs/udev/udev-230.ebuild
index 298e12b..eacb01d 100644
--- a/sys-fs/udev/udev-230.ebuild
+++ b/sys-fs/udev/udev-230.ebuild
@@ -278,8 +278,8 @@ multilib_src_install() {
                        lib_LTLIBRARIES="${lib_LTLIBRARIES}"
                        pkgconfiglib_DATA="${pkgconfiglib_DATA}"
                        pkgconfigdata_DATA="src/udev/udev.pc"
-                       INSTALL_DIRS='$(sysconfdir)/udev/rules.d \
-                                       $(sysconfdir)/udev/hwdb.d \
+                       INSTALL_DIRS='$(sysconfdir)/udev/rules.d
+                                       $(sysconfdir)/udev/hwdb.d
                                        $(sysconfdir)/systemd/network'
                        dist_bashcompletion_DATA="shell-completion/bash/udevadm"
                        dist_network_DATA="network/99-default.link"
Comment 6 Coacher 2016-05-26 22:17:05 UTC
Created attachment 435504 [details]
/var/db/pkg/sys-fs/udev-230/CONTENTS with fixed ebuild
Comment 7 Coacher 2016-05-26 22:22:40 UTC
Created attachment 435506 [details, diff]
ebuild.patch
Comment 8 Toralf Förster gentoo-dev 2016-06-03 21:23:08 UTC
and much more mess is created in / :
tinderbox@ms-magpie ~ $ sudo chroot amd64-13.0-unstable_20160522-215403 
ms-magpie / # ls -al /
total 4
drwxr-xr-x   1 root   root      6 May 25 16:52 ' '
drwxr-xr-x   1 root   root    274 Jun  3 23:02 .
drwxr-xr-x   1 root   root    274 Jun  3 23:02 ..
drwxr-xr-x   1 root   root     20 May 29 23:07 backend
drwxr-xr-x   1 root   root   4368 Jun  3 20:38 bin
drwxr-xr-x   1 root   root    372 Jun  3 07:33 boot
drwxr-xr-x  10 root   root   2980 May 31 20:02 dev
drwxr-xr-x   1 root   root  12562 Jun  3 23:19 etc
drwxr-xr-x   1 root   root     36 May 31 02:51 home
lrwxrwxrwx   1 root   root      5 May 22 22:48 lib -> lib64
drwxr-xr-x   1 root   root   1366 May 22 22:48 lib32
drwxr-xr-x   1 root   root   6942 Jun  3 20:14 lib64
drwxr-xr-x   1 root   root     56 May 27 08:29 media
drwxr-xr-x   1 root   root     10 May 19 03:30 mnt
drwxr-xr-x   1 root   root     28 May 23 09:42 no
drwxr-xr-x   1 syslog root      0 May 25 23:50 nonexistent
drwxr-xr-x   1 root   root   1062 Jun  3 19:14 opt
dr-xr-xr-x 290 root   wheel     0 May 30 20:57 proc
drwx------   1 root   root     96 Jun  3 19:19 root
drwxr-xr-x   1 root   root    256 Jun  3 17:42 run
drwxr-xr-x   1 root   root   6222 Jun  3 13:02 sbin
drwxr-xr-x   1 root   root     62 May 23 10:03 service
drwxr-xr-x   1 root   root      6 Jun  1 16:40 share
dr-xr-xr-x  12 root   root      0 May 30 20:57 sys
drwxrwxrwt   1 root   root  14168 Jun  3 23:19 tmp
drwxr-xr-x   1 root   root     20 Jun  1 20:43 %{_tmpfilesdir}
drwxr-xr-x   1 root   root     26 Jun  1 20:43 %{_unitdir}
drwxr-xr-x   1 root   root    390 Jun  3 17:42 usr
drwxr-xr-x   1 root   root     20 Jun  3 23:02 usrlib64
drwxr-xr-x   1 root   root    250 Jun  3 21:17 var
drwxr-xr-x   1 root   root     54 May 27 21:34 vz
Comment 9 Mike Gilbert gentoo-dev 2016-06-04 03:05:07 UTC
Interesting. I can event reproduce this with udev-225 (stable).

floppym@naomi image % pwd
/tmp/portage/sys-fs/udev-225/image
floppym@naomi image % ls -l
total 0
drwxr-xr-x 3 root root  60 Jun  3 22:54 ' '
drwxr-xr-x 2 root root  60 Jun  3 22:54 bin
drwxr-xr-x 3 root root  60 Jun  3 22:54 etc
drwxr-xr-x 4 root root  80 Jun  3 22:54 lib
drwxr-xr-x 2 root root  80 Jun  3 22:54 lib64
drwxr-xr-x 6 root root 120 Jun  3 22:54 usr
Comment 10 Mike Gilbert gentoo-dev 2016-06-04 03:22:43 UTC
commit 1dc1195271f1723ea1708dd29133106a57c11258
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Fri Jun 3 23:20:36 2016 -0400

    sys-fs/udev: eliminate pointless backslashes
    
    Overuse of backslash escapes led to a weird directory named ' ' being
    installed in the root directory.
    
    Thanks to Coacher for spotting the weird directory.
    
    Bug: https://bugs.gentoo.org/584256
    
    Package-Manager: portage-2.3.0_rc1_p14

 sys-fs/udev/{udev-225.ebuild => udev-225-r1.ebuild} | 19 ++++++++-----------
 sys-fs/udev/{udev-230.ebuild => udev-230-r1.ebuild} | 19 ++++++++-----------
 sys-fs/udev/udev-9999.ebuild                        | 19 ++++++++-----------
 3 files changed, 24 insertions(+), 33 deletions(-)