Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410245 - Add 'emerge --oneshot virtual/os-headers' to bootstrap instructions
Summary: Add 'emerge --oneshot virtual/os-headers' to bootstrap instructions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard: WAS: sys-apps/net-tools-1.60_p2012012...
Keywords:
: 410705 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-30 15:12 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2012-04-05 12:41 UTC (History)
1 user (show)

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


Attachments
sys-apps/net-tools-1.60_p20120127084908 build.log (build.log,23.08 KB, text/plain)
2012-03-30 15:12 UTC, Jeremy Olexa (darkside) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-03-30 15:12:37 UTC
Created attachment 307189 [details]
sys-apps/net-tools-1.60_p20120127084908 build.log

(or maybe virtual/os-headers?)

The problem: Even though os-headers is in @system. The depgraph generated by portage pulls in net-tools BEFORE linux-headers when bootstrapping Gentoo Prefix. This is a formal request to add a {R,}DEPEND atom to net-tools so that the depgraph is correct.

I have verified this is the problem by emerging linux-headers when net-tools fails with undefined references.

depgraph:

Calculating dependencies... done!
[ebuild  N     ] sys-apps/net-tools-1.60_p20120127084908  USE="nls -old-output -static" 
[ebuild  N     ] sys-process/procps-3.2.8_p11  USE="unicode" 
[ebuild  N     ] sys-apps/diffutils-3.2  USE="nls -static" 
[ebuild  N     ] sys-process/psmisc-22.16  USE="ipv6 nls -X (-selinux)" 
[ebuild  N     ] app-arch/gzip-1.4  USE="nls -pic -static" 
[ebuild  NS    ] sys-devel/gcc-4.5.3-r1 [4.2.4-r01.4] USE="cxx fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk (-hardened) (-libssp) -lto (-multilib) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test (-vanilla)" 
[ebuild  N     ] virtual/package-manager-0 
[ebuild  N     ] sys-kernel/linux-headers-3.3 
[ebuild  N     ] virtual/os-headers-0 
<snip>
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-03-30 15:18:18 UTC
Dang, we bring the pain onto ourselves. Can I commit this:

Index: net-tools-1.60_p20120127084908.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/net-tools/net-tools-1.60_p20120127084908.ebuild,v
retrieving revision 1.4
diff -u -r1.4 net-tools-1.60_p20120127084908.ebuild
--- net-tools-1.60_p20120127084908.ebuild       13 Mar 2012 15:55:56 -0000     1.4
+++ net-tools-1.60_p20120127084908.ebuild       30 Mar 2012 15:17:28 -0000
@@ -24,7 +24,12 @@
 SLOT="0"
 IUSE="nls old-output static"
 
-RDEPEND="!prefix? ( >=sys-apps/openrc-0.9.9.3 )"
+# For Gentoo Prefix: not openrc because that doesn't work in prefix and add
+# os-headers because openrc actually depends on os-headers and net-tools needs
+# it (bug 410245)
+RDEPEND="
+       !prefix? ( >=sys-apps/openrc-0.9.9.3 )
+       prefix? ( virtual/os-headers )"
 DEPEND="${RDEPEND}
        app-arch/xz-utils"
Comment 2 SpanKY gentoo-dev 2012-03-30 21:04:22 UTC
i changed openrc to a blocker

http://sources.gentoo.org/sys-apps/net-tools/net-tools-1.60_p20120127084908.ebuild?r1=1.4&r2=1.5

otherwise, i don't think having packages depend on os-headers generally makes sense.  the C library cannot work without those already installed.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-02 15:05:57 UTC
(In reply to comment #2)
> i changed openrc to a blocker
> 
> http://sources.gentoo.org/sys-apps/net-tools/net-tools-1.60_p20120127084908.
> ebuild?r1=1.4&r2=1.5
> 

Please revert. openrc does not make sense for Gentoo Prefix for a number of reasons, 1) we don't have root access, 2) we don't support any init scripts. The first !prefix? statement was what we wanted!

> otherwise, i don't think having packages depend on os-headers generally
> makes sense.  the C library cannot work without those already installed.

Well, I have confirmed that net-tools WORKS once linux-headers is installed. How else can I convince you?
Comment 4 SpanKY gentoo-dev 2012-04-02 17:57:27 UTC
(In reply to comment #3)

your request makes no sense.  a blocker does not force openrc to be installed.

the kernel headers are part of the toolchain.  many headers in glibc cannot be used without kernel headers.  pretty much all compiled code can't work without glibc.  are you suggesting we add sys-libs/glibc to every package that compiles code ?
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-02 18:01:11 UTC
(In reply to comment #4)
> (In reply to comment #3)
> 
> your request makes no sense.  a blocker does not force openrc to be
> installed.

I see. Good, thanks.

> 
> the kernel headers are part of the toolchain.  many headers in glibc cannot
> be used without kernel headers.  pretty much all compiled code can't work
> without glibc.  are you suggesting we add sys-libs/glibc to every package
> that compiles code ?

No, I'm not suggesting that. With Gentoo Prefix, @system pulls in virtual/os-headers AFTER net-tools so net-tools will fail to build. I'm simply looking for a fix for this issue.
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-02 18:23:07 UTC
With that said, we could just kludge up the installation instructions as well. That is, if a prefix dep is ill-advised.
Comment 7 SpanKY gentoo-dev 2012-04-02 18:47:55 UTC
(In reply to comment #5)

i think it's sane to special case the toolchain as @system expects the toolchain to be in place.  otherwise, we have to add toolchain deps to all the pkgs in @system and i think that's a losing goal.

maybe we need a @system-system set ;)
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-02 19:05:41 UTC
Ok. Creating a Prefix team action item here.
Comment 9 Benda Xu gentoo-dev 2012-04-03 02:59:46 UTC
(In reply to comment #3)
> Please revert. openrc does not make sense for Gentoo Prefix for a number of
> reasons, 1) we don't have root access, 2) we don't support any init scripts.
> The first !prefix? statement was what we wanted!

Sorry to hijack, darkside. Do you think 1) is intrinsic? openRC works towards an independent RC system. I suppose it not too complex to port openRC to work with normal user and call the openRC in prefix via host initrc system, e.g. /etc/rc.local?

if 1) is resolved, 2) is just a consequence.
Comment 10 Fabian Groffen gentoo-dev 2012-04-03 06:32:01 UTC
openrc has recently dropped the prefix bits:

http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3247184d

Maybe a project for someone to jump on?
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-03 12:28:07 UTC
Bah, don't discuss it here. Talk about openrc progress on bug 196294
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-03 19:53:18 UTC
*** Bug 410705 has been marked as a duplicate of this bug. ***
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-05 12:41:29 UTC
added instructions to bootstrap-solaris.xml