I'm finally getting around to doing 1.12 upgrades, and have setup a
separate machine to do my bulk package builds / upgrades etc,
so as not to disrupt my 'dev server' while things are being
built / testedHowever, this seems kind of wasteful - the only purpose of this machine
is to build packages against a specific release..And since building packages for a particular release generally requires
only the userland, appropriate headers and correct 'uname' output - so:it seems like if spoofing uname is configured inside a jail,
the next (or previous..) release can be installed into a jail and
used for building / testing packages without the overhead of a VM or
maintaining a separate physical hostI did a quick scan of the tree to see what this would take, and, high
level, it seems like only the following changes would need to be made:- update struct jail to add a 'osrelease' string
(implies bumping 'jail api' to 2?)
- update jail(8) to actually pass this information along
- update sys_uname to test ucred for jailed processes, and
use the struct jail osrelease if appropriate
- similarly update sysctl kern.osrelease to support jail spoofing
(if possible - didn't get this far in the research yet)
could be less of a problem for builds, as I think most things use
uname(1) ... but good to keep the environment consistent I suppose..I'm still a bit confused as to how 'osrelease' is defined - everything
I'm finding is showing up as extern char[] .. perhaps this is something
in the build I'm not familiar with?also,
is the so-called 'stupid hackery' in sys_uname needed still?
Before I start any coding, does this:
- sound like something useful
- sound like the right approachThinking this could have wider useful implications e.g. for pkgbox
& so on - for example setting up automated bulks w/various combinations
of pkgsrc and releases, etc.Cheers,
- Chris
If you don't need a jail to spoof uname, as others posted, you can
installworld into a chroot and build everything you want there using
Joerg's spiffy pbulk. That's what I'm doing on pkgbox now; I can hand you
my somewhat terse notes if you want. It would be relatively easy to set
up the configuration you're talking about.
cheers - I guess I thought incorrectly that something 'special' was
needed to get the uname to change .. have been using the legacy bulks in
chroots / jails (for 'same os' builds) as I haven't quite migrated to
pbulk yet ..thanks for the help offer - I'll ask if I run into trouble.
brave investigation. but you could also simply set UNAME_r :)
sweatshorts % uname -r
1.13.0-DEVELOPMENT
sweatshorts % UNAME_r=1.12-RELEASE uname -r
1.12-RELEASEI think that's good enough :D
cheers
simon--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
Doh! Thanks for the tip!
they should change the phrase from RTFM to 'Carefully RTFM' :)
well.. scratch that change then. 1 less patch to write.
- Chris
RTFMAI -- Read The Fine Manual Again, Idiot.
Joerg
On Mon, Mar 24, 2008 at 2:14 AM, Joerg Sonnenberger
--
Live Free or Die
for the record - if anyone's interested - adding a line e.g.:
ALL_ENV+= UNAME_r=1.12-RELEASE
to mk.conf looks like it -might- work ..
(unless wants to chime in & verify)
| Linus Torvalds | Linux 2.6.27-rc5 |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Trent Piepho | Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| Christoph Hellwig | Re: [PATCH 06/32] IGET: Mark iget() and read_inode() as being obsolete [try #2] |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
