Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150351 - Gentoo/FreeBSD compatibility patch for catalyst
Summary: Gentoo/FreeBSD compatibility patch for catalyst
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-10-07 00:46 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-12-06 13:46 UTC (History)
1 user (show)

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


Attachments
catalyst-2.0-fbsd.patch (catalyst-2.0-fbsd.patch,3.82 KB, patch)
2006-10-07 00:47 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-07 00:46:50 UTC
The attached patch is the complete patch I've written to be able to generate stage1, 2 and 3 for Gentoo/FreeBSD:

- the /dev/pts mounts does not exists for *BSD, so I've added it only for Linux;
- mount --bind on FreeBSD is achieved by mount_nullfs, and /dev has to be mounted on its own because it is setup in a special way every time (there's no static /dev for FreeBSD that could work);
- on umount, we need to avoid the // on the joining between mypath and the mountpoint or it will fail to find the point;
- when cleaning up, chflags removes the immutable flag so that the freebsd base ebuilds can be remove correctly (there's no easy way to do this in Python, the only way to set flags is either with the portage module (that's half an hack) or with py-freebsd module (that does not have a recursive function anyway));
- the find command is used in a BSD-compatible way, by specifying the path where it has to look;
- as readlink -f does not work on *BSD, if realpath is present (it is part of FreeBSD's base system) it uses that instead of readlink -f (this has a slight impact on Linux in theory, as app-admin/realpath could be used, but it's unlikely to happen inside a stage).

I didn't put the code to remove freebsd-sources from the stage2 as rebuilding it with pkgcache enabled should solve that (like emerge --with-bdeps=n --depclean could do).

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-07 00:47:35 UTC
Created attachment 99025 [details, diff]
catalyst-2.0-fbsd.patch
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2006-10-11 06:52:18 UTC
I've added this to catalyst SVN... it'll be in the next catalyst release.
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-06 13:46:29 UTC
Fixed in 2.0.1