Gentoo Archives: gentoo-dev

From: Friedrich Oslage <bluebird@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Detecting Baselayout2/openrc - no-symlink profiles leading to breakage
Date: Sat, 17 Jan 2009 23:52:10
Message-Id: 49726F21.8010004@gentoo.org
In Reply to: [gentoo-dev] Detecting Baselayout2/openrc - no-symlink profiles leading to breakage by "Robin H. Johnson"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Robin H. Johnson schrieb:
5 > I'm raising this as an extension of bug 253076, but also because I see
6 > the potential for danger.
7 >
8 > To date, for an init script that has baselayout2-specific behavior, we
9 > have had some variant of [ -e /lib/librc.so ] in the init script.
10 >
11 > On a multilib profile with no symlinks and a 64-bit userspace, the .so
12 > file would be installed in /lib64/librc.so, and the check would
13 > mistakenly have the wrong result.
14 >
15 > There's one fix that has started to turn up already, but I'm not sure if
16 > it's going to be safe always: [ -f /etc/init.d/sysfs ]
17 > This happens to work as openrc installs that init script.
18 >
19 > As a long term solution, can we just consume an inode and have some file
20 > like /etc/baselayout2? The file must reside on the / partition even when
21 > the major trees /usr, /var, /tmp, /opt, /boot, /home, /dev, /root are
22 > separate mountpoints.
23
24 Using a file in /etc would break if someone would downgrade from
25 baselayout2/openrc to baselayout1.
26
27 Why not teach /sbin/runscript it's own version? With something like this
28 we could also do stuff depending on a specific version of openrc:
29
30 - --- src/rc/runscript.c
31 +++ src/rc/runscript.c
32 @@ -1244,6 +1244,7 @@ runscript(int argc, char **argv)
33
34 setenv("EINFO_LOG", service, 1);
35 setenv("RC_SVCNAME", applet, 1);
36 + setenv("OPENRC_VERSION", "0.4.2", 1);
37
38 /* Set an env var so that we always know our pid regardless of
39 any
40 subshells the init script may create so that our mark_service_*
41
42
43 and in the ebuild:
44
45 [ -n "${OPENRC_VERSION}" ]
46
47 >
48 > Affected and broken profiles:
49 > - amd64's 2005.0/no-symlink (it was very widely deployed. It's not
50 > supported or in the tree anymore, but there ARE still people using it)
51 > - default/linux/sparc/2008.0 (unconfirmed)
52
53 That one should be fine. It has a pure 32bit userland, no lib64 or
54 lib32, just plain lib as libdir.
55
56 > - Any profile that sets SYMLINK_LIB="no" AND the userspace is 64-bit.
57 > - Wouldn't surprise me if some of the N32 style mips stuff was broken
58 > too.
59 >
60 > Affected, but not broken profiles:
61 > These are multilib, but with the default as 32-bit causes the lib to be
62 > in right place.
63 > - arch/powerpc/ppc64/32ul
64 > - hardened/linux/powerpc/ppc64/2008.0/32bit-userland
65 > - Any other profile that inherits features/32bit-userland
66 >
67
68 -----BEGIN PGP SIGNATURE-----
69 Version: GnuPG v2.0.9 (GNU/Linux)
70 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
71
72 iEYEARECAAYFAklybyAACgkQknxn9PmJ76VL5QCfXLgKLtrObX2FzbQ3XMHhAqZi
73 nT8An1zTWYJSmdRs30eLfDIy4LpqslRp
74 =80mR
75 -----END PGP SIGNATURE-----

Replies