Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409385 - sys-apps/baselayout should be init agnostic
Summary: sys-apps/baselayout should be init agnostic
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 473274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-23 00:28 UTC by Canek Peláez Valdés
Modified: 2013-07-28 00:25 UTC (History)
7 users (show)

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


Attachments
service-manager-0.ebuild.patch (service-manager-0.ebuild.patch,544 bytes, patch)
2013-07-19 07:12 UTC, Nikoli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Canek Peláez Valdés 2012-03-23 00:28:13 UTC
Right now, sys-apps/baselayout depends on sys-apps/openrc, and since baselayout is in the @system set, openrc gets installed always by default, no matter what init system the user is using.

sys-apps/baselayout should be init agnostic, and I don't see (please tell me if I'm wrong) any technical reason why it PDEPENDs on sys-apps/openrc.

Reproducible: Always
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2012-04-26 20:56:15 UTC
baselayout has to depend on something, what should it depend on?

A virtual for "init" perhaps?  That would work, care to make up patches that do that which I can incorporate?
Comment 2 Canek Peláez Valdés 2012-04-26 21:18:54 UTC
(In reply to comment #1)
> baselayout has to depend on something, what should it depend on?

It's that really true? Baselayout only installs some standard configuration files. I think it should work as the root of the dependency tree, and therefore it should have no dependencies at all.
 
> A virtual for "init" perhaps?  That would work, care to make up patches that
> do that which I can incorporate?

There is a virtual/init, which depends on either sys-apps/sysvinit or sys-process/runit (if using the Linux kernel) or sys-freebsd/freebsd-sbin (if using the FreeBSD kernel). We would need to either expand this virtual/init to include both OpenRC and systemd, or create a virtual/modern-init or something.

And the patch for baselayout-2.1.ebuild would be:


--- baselayout-2.1.ebuild	2012-04-26 16:14:42.382540506 -0500
+++ baselayout-2.1-new.ebuild	2012-04-26 16:14:56.261540408 -0500
@@ -14,7 +14,6 @@
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
 IUSE="build"
 
-PDEPEND="sys-apps/openrc"
 
 pkg_setup() {
 	multilib_layout

I can attach a copy, but really, it's just one line.
Comment 3 Canek Peláez Valdés 2012-04-26 21:23:08 UTC
By the way, this is awesome: the *only* package in the whole tree depending on virtual/init, is OpenRC:

# grep virtual/init $(find . -name "*.ebuild")
./sys-apps/openrc/openrc-0.9.9.2.ebuild:RDEPEND="virtual/init
./sys-apps/openrc/openrc-0.9.9.1.ebuild:RDEPEND="virtual/init
./sys-apps/openrc/openrc-0.9.9.3.ebuild:RDEPEND="virtual/init
./sys-apps/openrc/openrc-0.9.8.4.ebuild:RDEPEND="virtual/init
./sys-apps/openrc/openrc-9999.ebuild:RDEPEND="virtual/init
./sys-apps/openrc/openrc-0.9.9.ebuild:RDEPEND="virtual/init
./virtual/init/init-0.ebuild:# $Header: /var/cvsroot/gentoo-x86/virtual/init/init-0.ebuild,v 1.13 2010/01/11 11:02:32 ulm Exp $
Comment 4 William Hubbs gentoo-dev 2012-04-27 14:16:44 UTC
I agree that baselayout should not depend on anything.

My thought is that we can add virtual/init to the system set, then I
have also been looking at another virtual called
virtual/service-manager. This would include things that manage
processes, like openrc and systemd, but not sysvinit, because you need
both sysvinit and openrc to bring up your system. Once that is in we
could add it to the system set also then drop the pdepend from openrc.

systemd would also need to be added to virtual/init I think since it
provides an init program.
Comment 5 SpanKY gentoo-dev 2012-04-29 02:52:15 UTC
(In reply to comment #2)

this breaks all default installs.  nothing else pulls in openrc.

(In reply to comment #4)

adding virtual/init to the system set, and making a new virtual/service-manager makes sense.
Comment 6 William Hubbs gentoo-dev 2013-06-15 22:58:07 UTC
*** Bug 473274 has been marked as a duplicate of this bug. ***
Comment 7 Nikoli 2013-07-19 07:12:32 UTC
Created attachment 353632 [details, diff]
service-manager-0.ebuild.patch

service-manager-0.ebuild,v 1.2 seems broken: it does not let to install systemd only.
Comment 8 William Hubbs gentoo-dev 2013-07-28 00:25:50 UTC
The following changes have been made:

1) virtual/service-manager has been added to the tree and added to
@system.

2) the pdepend on OpenRc has been dropped from baselayout-2.2.

Now OpenRc should be pulled in because it is the first provider in
virtual/service-manager instead of being the pdepend in baselayout.

Let me know if there are any issues.