Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58106 - baselayout virtual needed for macos
Summary: baselayout virtual needed for macos
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC All
: High major (vote)
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 57448 57596 58892 59230 61638 63050 65295 73170 73217 79368 79911 80032 87499
  Show dependency tree
 
Reported: 2004-07-23 12:25 UTC by Lina Pezzella (RETIRED)
Modified: 2007-03-26 19:59 UTC (History)
0 users

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


Attachments
darwin-initd.eclass (darwin-initd.eclass,3.35 KB, text/plain)
2004-11-10 07:20 UTC, Mamoru KOMACHI (RETIRED)
Details
Hacked to compile on darwin (start-stop-daemon.c,33.24 KB, text/plain)
2005-01-21 11:10 UTC, Kito (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lina Pezzella (RETIRED) gentoo-dev 2004-07-23 12:25:56 UTC
baselayout contains runscript.sh, which is needed for init scripts.  Emerging baselayout in its current form would break MacOSX.

14:40 <@j4rg0n> also, what about packages like baselayout?
14:40 <@j4rg0n> that happens to contain runscript, which is needed for most 
                ebuilds with an init script
14:40 <@pvdabeel> we need a virtual vor that:
14:40 <@j4rg0n> but it also contains things we don't want to overwrite
14:40 <@j4rg0n> like passwd
14:40 <@pvdabeel> virtual/Baselayout -> sys-apps/baselayout in linux
14:40 <@pvdabeel> virtual/Baselayout -> sys-apps/baselayout-macos for macos
14:41 <@pvdabeel> indeed
14:41 <@j4rg0n> okay, so the baselayout-macos version would take out the stuff 
                we don't wanna overwrite
14:41 <@pvdabeel> indeed
14:41 <@pvdabeel> it also takes care of installing in a directory like /gentoo
14:41 <@j4rg0n> are you the appropriate person to make such magic happen?
14:41 <@pvdabeel> or /opt/local or something
Comment 1 Stephen Bennett (RETIRED) gentoo-dev 2004-07-23 14:56:38 UTC
Methinks Gentoo/*BSD could benefit from this too...
Comment 2 Joe Jezak (RETIRED) gentoo-dev 2004-10-01 07:22:42 UTC
I've started work on this, pvdabeel, can you comment further on what you mean by having baselayout install into a seperate directory?  I thought that was part of pathspec?  I realize baselayout does setup the directory structure, but I'm not sure how that works with pathspec.

Right now I've got an ebuild that will install the environment related stuff, I'm working on making sure that the init scripts work as well.  I'll post an ebuild when it's finished.
Comment 3 Ciaran McCreesh 2004-10-22 07:31:22 UTC
Does anything non-profile actually have an explicit baselayout dep? If not, no need for a virtual.
Comment 4 Lina Pezzella (RETIRED) gentoo-dev 2004-10-22 08:47:55 UTC
Just a few examples from a quick grep:

/usr/portage/app-sci/foldingathome/foldingathome-4.0.0-r1.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0
/usr/portage/app-sci/foldingathome/foldingathome-4.0.0-r2.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0
/usr/portage/app-sci/foldingathome/foldingathome-4.0.0.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0
/usr/portage/app-sci/gimps/gimps-23.5.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0
/usr/portage/app-sci/gimps/gimps-23.9.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0
/usr/portage/app-sci/setiathome/setiathome-3.03-r1.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0"
/usr/portage/app-sci/setiathome/setiathome-3.08-r3.ebuild:DEPEND=">=sys-apps/baselayout-1.8.0"
Comment 5 Ciaran McCreesh 2004-10-22 08:55:43 UTC
Hrm, all of those are binary only, no?
Comment 6 Lina Pezzella (RETIRED) gentoo-dev 2004-10-24 14:09:36 UTC
Good question. We need baselayout anyways for runscript.sh though...
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-10 07:20:48 UTC
Created attachment 43657 [details]
darwin-initd.eclass

I played with Gentoo init.d few hours to
get some Japanese input methods work but
finally I noticed that we need /sbin/runscript
(and /sbin/start-stop-daemon, both are
in baselayout package) to execute Gentoo 
init.d script :(

I attach a sample eclass to convert
Gentoo init.d into StartupItems. I couldn't
test more as we don't have baselayout
package available for Mac OS X. Is there
anybody working on this issue?
Comment 8 Kito (RETIRED) gentoo-dev 2004-11-10 08:07:29 UTC
usata: just last night i was hacking on the bsd scripts that spb did.  I managed to get most of it working, but with a few caveats:

requires either gawk or a complete install of awk , as apple does not ship all the awk headers with os x(not a 'supported' api' )

i havent been able to get depcache working yet

some functions in /lib/rcscripts/awk/functions.awk might need to be re-written

But the basics seem to be working, rc-{status,update} , start-stop-daemon, etc.

I'll look at it more tonight....
Comment 9 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-10 08:26:51 UTC
Thanks for your speedy response. 

Do we really need depcache for Mac OS X?
We already have SystemStarter based
service dependency check, so if converting
Gentoo init.d script to Mac OS X StartupItems
has no problem I don't think we need it.

/etc/init.d/somedaemon start

might be broken, but if

SystemStarter SomeDaemon start

works I think it's okay. (Because most of
Gentoo /etc/init.d scripts are useless for
Mac OS X, and we typically add several
daemons to Mac OS X services)

Any comments on this?
Comment 10 Kito (RETIRED) gentoo-dev 2004-11-10 09:52:27 UTC
I guess depcache isn't a necessity, I was looking for a way to do it without having to modify any ebuilds,  and also having a scalable solution that could work for {o}darwin as well. I've heard/read conflicting reports as to the future of SystemStarter, some have said it is deprecated and will go away in the near future...

/etc/mach_init_per_user.d is now the 'preferred' way to deal with daemons AFAICT.
Comment 11 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-10 10:07:46 UTC
Using /etc/mach_init.d is much easier to convert,
but how can we express complex syntax like
"need" and "use"? 
Comment 12 Kito (RETIRED) gentoo-dev 2004-11-10 10:21:04 UTC
well, I'm thinking that the ideal solution is to just have the normal mach startup kickstart the gentoo init.d scripts, as opposed to converting all init.d scripts to mach_init*, but that brings us back to porting depcache, etc.

i could be making this more complex than it really is though...
Comment 13 Ciaran McCreesh 2004-11-10 10:28:16 UTC
Meh. Not using the standard Gentoo init system is gonna cause a hell of a mess...
Comment 14 Lina Pezzella (RETIRED) gentoo-dev 2004-12-31 22:11:16 UTC
I vote for solution #12. So do we take a vote or something? This has been sitting here a while...
Comment 15 Hasan Khalil (RETIRED) gentoo-dev 2005-01-20 03:01:29 UTC
looks like having the gentoo init system kickstarted by the mach one is what we're after.
any implementation on this?
Comment 16 Kito (RETIRED) gentoo-dev 2005-01-21 11:10:51 UTC
Created attachment 49123 [details]
Hacked to compile on darwin
Comment 17 Lina Pezzella (RETIRED) gentoo-dev 2005-01-30 12:58:06 UTC
In addition to an init system, baselayout should provide a libtool wrapper directory as follows (in pseudocode):

mkdir some-dir/libtool-wrap
ln -sf /usr/bin/glibtool some-dir/libtool-wrap/libtool
export PATH=/usr/local/libtool-wrap:$PATH >> profile_bashrc

This will force packages that use their own version of libtool to use ours instead.
For instance, this fixes the jpeg and ttmkfdir bugs, which have been patched quite hackishly in the meantime.
Comment 18 Kito (RETIRED) gentoo-dev 2005-01-31 07:28:11 UTC
Don't think baselayout would be the right place for that. Maybe a darwin-centric libtool ebuild? Or maybe somehow use the libtool eclass?
Comment 19 Lina Pezzella (RETIRED) gentoo-dev 2005-02-01 08:08:04 UTC
If the libtool wrapper actually installed some sort of binary I'd say to go for a separate ebuild,
but it's just a symlink and a directory. So if you really think of it, it's more of a layout issue.
Additionally, providing this in baselayout will allow us to require baselayout as a part of the system
profile, meaning that we won't have to depend on the libtool ebuild in every package that needs
the fix (quite a few). Sure, we could depend on the libtool ebuild as a part of system profile too,
but it just needlessly complicates things imho.
Comment 20 Joe Jezak (RETIRED) gentoo-dev 2005-05-11 23:36:27 UTC
I've added a very basic baselayout-darwin and coreutils-darwin that fix enough stuff to get env.d and profile stuff working correctly.  Next up we'll get init working on darwin. (perhaps we can look into backporting launchd if it isn't already being done?)  As for the libtool fix, we definitely could include it in baselayout, has the above solution been tested?  We could easily just include that fix in the layout and add the profile stuff to the profile.gentoo.
Comment 21 Hasan Khalil (RETIRED) gentoo-dev 2005-05-12 04:22:54 UTC
Awesome work, Joe.

I'm fairly certain that we no longer need a libtool wrapper since we now have profile.bashrc.
Can anyone confirm this?
Comment 22 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-14 18:25:52 UTC
We (bsd) shouldn't be interested anymore in this :)
The virtual is there and the rest is osx things I think.
Comment 23 Fabian Groffen gentoo-dev 2005-09-02 11:25:27 UTC
Is this bug still relevant?
Can it be closed/resolved?
Is it worth putting some time in before we get some better solution?
Comment 24 Fabian Groffen gentoo-dev 2007-03-26 19:59:16 UTC
close this piece of pain.