The attached patches are an attempt to get the service scripts working in the prefixed portage. Besides patches to the baselayout-prefix, patches to the individual service scripts would be required. I have been testing with the apache service scripts that have been contributed earlier. Some patches have some implications. These implications are documented with the patch (if the patch got updated, then with the initial contribution of it ;).
Created attachment 133760 [details, diff] patch to the ebuild to add two patches and reactivate commented out portions This is the patch to the ebuild. It adds application of two patches and reactivates commented out portions.
Created attachment 133761 [details, diff] Patch to the source distribution comming with the baselayout-prefix This patch adds the @GENTOO_PORTAGE_EPREFIX@ to all filesystem locations. It also patches the Makefile to exclude the "consoletype" application. This application uses Linux specific logic to determine the nature of a terminal device and makes use of Linux specific headers as part of that magic. The Makefile modification may sit better in a separate patch that is activated on non-Linux architectures only.
Created attachment 133762 [details, diff] Patch to certain shell scripts for the prefixed portage This patch adds @GENTOO_PORTAGE_EPREFIX@ to filesystem locations.
Created attachment 133766 [details, diff] Updated patch to the baselayout-prefix ebuild Just thought again about everything. The updated ebuild contains Darwin (and possibly other systems) specifc /bin/pidof replacement separately. The updated ebuild contains non-Linux tool deactivation patch separetely.
Created attachment 133767 [details, diff] Updated shell script patch to contain only things related to prefixed portage
Created attachment 133768 [details, diff] Updated source distrib patch to only contain things related to prefixed portage (non-Linux specific stuff taken out)
Created attachment 133770 [details, diff] Patch against the runleven related scripts to replace /bin/pidof if it doesn't exist
Created attachment 133772 [details, diff] Disable building 'consoletype' application on non-Linux systems
For the service script to work (at least on Darwin), the patches from bug 196292 have to be applied.
Hmmm... so what needs to be applied when and where now?
(In reply to comment #10) > Hmmm... so what needs to be applied when and where now? You apply the ebuild patch on the ebuild and put the remaining ones in ${FILESDIR}
This looks promising..Will these patches be in soon or should I create an overlay to test em out?
new year's resolution: let's look at it, would be cool to have it.
in baselayout-1.12.5-pidof.patch, how about replacing this: + eval ps -Ao 'pid,command'|grep "^ *[0-9]* *${args}"|sed 's!^ *\([0-9]*\) .*$!\1!'|xargs echo -n with + ps -Ao 'pid,command' | gawk -v args="${args}" '$0 == $1 FS args {buf=buf " " $1} END {print substr(buf,2)}' which only uses one pipe (to gawk) instead of three (to grep, sed, xargs echo), should perform better and is much clearer.
this would work as well: ps -Ao 'pid,command' | sed -n "/^ *[0-9]\+ ${args}/p" | cut -d " " -f 1 | xargs echo -n
I don't want to spoil the fun, but... solaris% ps -Ao 'pid,command' ps: unknown output format: -o command usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ] [ -u userlist ] [ -U userlist ] [ -G grouplist ] [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ] 'format' is one or more of: user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid f s c lwp nlwp psr tty addr wchan fname comm args projid project pset (I'd love to have GNU ps on Solaris, but it doesn't compile...)
pid, comm and args are recognized but treated very much differently on solaris and darwin. on solaris, args is the command and the arguments, whereas on darwin args is only the arguments macbook% ps -o 'args' -f =default maddison% ps -o 'args' ps -o args what is exactly the same though, is the behavior of COMM maddison% ps -o 'comm' /usr/bin/zsh macbook% ps -o 'comm' /g/bin/zsh soo.... `ps -o 'pid,comm' should work, the question is what we're supporting at the point -- can ${args} only hold '/bin/zsh' or '/bin/zsh -l' as well? because in the latter case we'd have to thing of something...
(In reply to comment #17) > macbook% ps -o 'args' > -f =default > maddison% ps -o 'args' > ps -o args > > what is exactly the same though, is the behavior of COMM > > maddison% ps -o 'comm' > /usr/bin/zsh > macbook% ps -o 'comm' > /g/bin/zsh I don't think that will work right on linux, if I am reading the bug correctly. % ps -o 'args' COMMAND -bash ps -o args % ps -o 'comm' COMMAND bash ps % ps -o 'command' COMMAND -bash ps -o command However, I did play around with linux and solaris and instead of "ps -Ao 'pid,command'" in the original patch, you will get the correct results if you put "ps -Ao 'pid,args'" in there instead. This also solves grobian's problem in comment #16. Can someone confirm this for me so I am not confused.
Created attachment 190244 [details, diff] Updated patch against baselayout-prefix Just merged the latest modifications to the ebuild into the file. Since quite a while there's a pidof tool in the prefix tree and this ebuild depends on it to get rid of some of the problems that were uncovered by Pipping back then. I'm not up to date what the correct way is to depend on an architecture, but I suspect this patch will have to see a few more generations anyways.
Created attachment 190245 [details, diff] Refactured pidof patch Here we basically keep the old behaviour. We're having a pidof tool in place now through bsd-pidof.
We had this discussion the other day on the gentoo-alt ML about startup scripts: http://comments.gmane.org/gmane.linux.gentoo.alt/4871 I thought a good approach to get baselayout-prefix ahead without requiring time from the developer end in the beginning might be to give this modified version a minor version bump in the prefix tree (i.e. baselayout-prefix-1.12.6-r6.1). We hard mask the package with a comment pointing to this bug. That should make sure nobody gets surprised by a beta level ebuild. Whoever wants to use it mounts the offroad bumpers, unmasks and emerges it. Any bugs we report back here. That would allow some folks to test it on MacOS, some other folks to test it on Solaris, on IRIX and on the toaster. When one platform according to the reports appears somewhat stable and the Gentoo developers can't prove it wrong either, we unmask it and live happily thereafter.
this will eventually require a Portage change as soon Portage will remove the startscripts, as workaround until this bug is fixed
This change (removal of functions.sh link) broke ecopy as well. grobian -- is there a write-up I can reference as to what the game plan with start-up scripts (init.d, launchd) is? I'm less concerned about 'doing it my way', but I'd like to not divorce my changes too far from Prefix proper.
functions.sh should not be removed I guess, what package is it removed for?
(In reply to comment #24) > functions.sh should not be removed I guess, what package is it removed for? > baselayout-prefix.sh owns the symlink but I already fixed ecopy.
Sorry, can't type. sys-apps/baselayout-prefix
I see now. That's unintended behaviour.
=sys-apps/portage-2.2.00.14277 masked
Please tell me what can I do about this. * QA Notice: the following files are outside of the prefix: * /sbin * /sbin/runscript * /sbin/consoletype * /sbin/start-stop-daemon * /bin * /lib * /lib/rcscripts * /lib/rcscripts/conf.d * /lib/rcscripts/conf.d/env_whitelist * ERROR: sys-apps/baselayout-prefix-1.12.5-r7 failed: * Aborting due to QA concerns: there are files installed outside the prefix * * Call stack: * misc-functions.sh, line 1487: Called install_qa_check * misc-functions.sh, line 94: Called install_qa_check_prefix * misc-functions.sh, line 596: Called die * The specific snippet of code: * die "Aborting due to QA concerns: there are files installed outside the prefix" *
You have to make it prefix aware at certain points, but without your ebuild and modifications there is little we can do to try and help you.
I just patch the baselayout-prefix-1.12.5-r6.ebuild.diff to the latest baselayout-prefix ebuild. Here is my patched ebuild: http://gist.github.com/372420
The diff file attached 2009-05-03 is no longer suit the latest ebuild. Is there any one just attach a working ebuild pack here? Thanks.
Portage currently removes startup scripts with the comment: " * removed /etc/init.d and /etc/conf.d directories until bug #196294 has been resolved" I was wondering what exactly needs to be done to resolve this bug. I like Gentoo Prefix, but it has (at least for me) a relatively large maintenance overhead. Fixing things on my system only makes me the only beneficiary and seems a waste considering the amount of time spent. If anything could be done from my end to move resolving this bug forward, I'd very much appreciate any directions from your ends. Thanks and Best regards.
I added your patches to -r7, that should give a start. The obvious problems are the runscripts of the various packages. Before you start fixing them, it may be a good idea to reevaluate the current version of baselayout-prefix regarding what's in mainline Gentoo.
No update of this bug for a long time. Really hope this
Hi, I have got a plan to introduce openrc to baselayout for services. Some early thoughts are gathered here: http://www.awa.tohoku.ac.jp/~benda/projects/openrc.html
Hi, please help test OpenRC for this task. A guide is at https://wiki.gentoo.org/wiki/OpenRC/Prefix File new bug to me or just comment on this bug for feedback.
Hi Benda -- thanks for taking this on! My goal here is to get MythTV running in a x86 prefix (running on a ReadyNAS Ultra 4). I have everything compiled and have followed the https://wiki.gentoo.org/wiki/OpenRC/Prefix guide up to the init script part. I note some services complaining about the lack of a service that provides net: * Caching service dependencies ... Service `git-daemon' needs non existent service `net' Service `mythbackend' needs non existent service `net' Service `pydoc-2.7' needs non existent service `net' Service `sshd' needs non existent service `net' What is the suggested method of resolving this? Also, I see a lot of init scripts in init.d that a prefix would have no use for, like fsck and devfs. Would it be reasonable to mask some of those services from being installed? note: the shebangs in the init scripts already seem to be eprixified during installation, so no manual fixes were required there
Sorry for the late reply, don't know why I missed your excellent commet :( (In reply to Myk Taylor from comment #38) > Hi Benda -- thanks for taking this on! My goal here is to get MythTV > running in a x86 prefix (running on a ReadyNAS Ultra 4). I have everything > compiled and have followed the https://wiki.gentoo.org/wiki/OpenRC/Prefix > guide up to the init script part. nice! > I note some services complaining about the lack of a service that provides > net: > > * Caching service dependencies ... > Service `git-daemon' needs non existent service `net' > Service `mythbackend' needs non existent service `net' > Service `pydoc-2.7' needs non existent service `net' > Service `sshd' needs non existent service `net' > > What is the suggested method of resolving this? in $EPREIFX/etc/rc.conf, set rc_sys="prefix" will do. > Also, I see a lot of init scripts in init.d that a prefix would have no use > for, like fsck and devfs. Would it be reasonable to mask some of those > services from being installed? > > note: the shebangs in the init scripts already seem to be eprixified during > installation, so no manual fixes were required there Thanks, wiki updated :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47adf3b360d2ae37d1c18aa27c25cd218db0cb95 commit 47adf3b360d2ae37d1c18aa27c25cd218db0cb95 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2022-09-05 12:40:05 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2022-09-05 12:40:46 +0000 sys-apps/baselayout-prefix: remove last-rited package Closes: https://bugs.gentoo.org/836114 Closes: https://bugs.gentoo.org/196294 Signed-off-by: Fabian Groffen <grobian@gentoo.org> profiles/package.mask | 4 - sys-apps/baselayout-prefix/Manifest | 8 - .../baselayout-prefix-2.6-r3.ebuild | 344 --------------------- sys-apps/baselayout-prefix/metadata.xml | 10 - 4 files changed, 366 deletions(-)