From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LOKxU-0005jU-27 for garchives@archives.gentoo.org; Sat, 17 Jan 2009 23:52:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F30B1E0431; Sat, 17 Jan 2009 23:52:05 +0000 (UTC) Received: from v32062.1blu.de (v32062.1blu.de [88.84.153.122]) by pigeon.gentoo.org (Postfix) with ESMTP id AD9B5E0431 for ; Sat, 17 Jan 2009 23:52:05 +0000 (UTC) Received: from ppp-88-217-43-53.dynamic.mnet-online.de ([88.217.43.53] helo=[10.254.3.50]) by v32062.1blu.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LOKxO-0004iw-Dk for gentoo-dev@lists.gentoo.org; Sun, 18 Jan 2009 00:52:04 +0100 Message-ID: <49726F21.8010004@gentoo.org> Date: Sun, 18 Jan 2009 00:52:01 +0100 From: Friedrich Oslage User-Agent: Thunderbird 2.0.0.19 (X11/20090104) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Detecting Baselayout2/openrc - no-symlink profiles leading to breakage References: <20090117230733.GV7944@curie-int.orbis-terrarum.net> In-Reply-To: <20090117230733.GV7944@curie-int.orbis-terrarum.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: bluebird@porno-bullen.de X-Archives-Salt: c2e89f47-7fca-4605-8c32-368b00a440be X-Archives-Hash: 185ead7e3860a9078e2e74f40b5c9cd4 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robin H. Johnson schrieb: > I'm raising this as an extension of bug 253076, but also because I see > the potential for danger. > > To date, for an init script that has baselayout2-specific behavior, we > have had some variant of [ -e /lib/librc.so ] in the init script. > > On a multilib profile with no symlinks and a 64-bit userspace, the .so > file would be installed in /lib64/librc.so, and the check would > mistakenly have the wrong result. > > There's one fix that has started to turn up already, but I'm not sure if > it's going to be safe always: [ -f /etc/init.d/sysfs ] > This happens to work as openrc installs that init script. > > As a long term solution, can we just consume an inode and have some file > like /etc/baselayout2? The file must reside on the / partition even when > the major trees /usr, /var, /tmp, /opt, /boot, /home, /dev, /root are > separate mountpoints. Using a file in /etc would break if someone would downgrade from baselayout2/openrc to baselayout1. Why not teach /sbin/runscript it's own version? With something like this we could also do stuff depending on a specific version of openrc: - --- src/rc/runscript.c +++ src/rc/runscript.c @@ -1244,6 +1244,7 @@ runscript(int argc, char **argv) setenv("EINFO_LOG", service, 1); setenv("RC_SVCNAME", applet, 1); + setenv("OPENRC_VERSION", "0.4.2", 1); /* Set an env var so that we always know our pid regardless of any subshells the init script may create so that our mark_service_* and in the ebuild: [ -n "${OPENRC_VERSION}" ] > > Affected and broken profiles: > - amd64's 2005.0/no-symlink (it was very widely deployed. It's not > supported or in the tree anymore, but there ARE still people using it) > - default/linux/sparc/2008.0 (unconfirmed) That one should be fine. It has a pure 32bit userland, no lib64 or lib32, just plain lib as libdir. > - Any profile that sets SYMLINK_LIB="no" AND the userspace is 64-bit. > - Wouldn't surprise me if some of the N32 style mips stuff was broken > too. > > Affected, but not broken profiles: > These are multilib, but with the default as 32-bit causes the lib to be > in right place. > - arch/powerpc/ppc64/32ul > - hardened/linux/powerpc/ppc64/2008.0/32bit-userland > - Any other profile that inherits features/32bit-userland > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklybyAACgkQknxn9PmJ76VL5QCfXLgKLtrObX2FzbQ3XMHhAqZi nT8An1zTWYJSmdRs30eLfDIy4LpqslRp =80mR -----END PGP SIGNATURE-----