make installworld for non-root user
Hi all, is there an easy way for a non-root user to test the installworld target? I came up with make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ installworld but that one breaks in libexec/pt_chown (which has a hard-coded BINOWN=root). Perhaps I can't see the obvious solution? harti ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: make installworld for non-root user
On Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: Hi all, is there an easy way for a non-root user to test the installworld target? I came up with make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ installworld but that one breaks in libexec/pt_chown (which has a hard-coded BINOWN=root). Perhaps I can't see the obvious solution? Many bits hardcode owners/groups/modes/flags, but it's still possible to install as non-root. In fact, buildworld already does this for you -- it uses src/tools/install.sh as INSTALL to do it (see the BMAKEENV setting in Makefile.inc1). Cheers, -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer pgpCsKkhv5F4s.pgp Description: PGP signature
Re: make installworld for non-root user
On Wed, 7 Jul 2004, Ruslan Ermilov wrote: REOn Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: RE RE Hi all, RE RE is there an easy way for a non-root user to test the installworld target? RE I came up with RE RE make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ RE NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ RE MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ RE installworld RE RE but that one breaks in libexec/pt_chown (which has a hard-coded RE BINOWN=root). RE RE Perhaps I can't see the obvious solution? RE REMany bits hardcode owners/groups/modes/flags, but it's still REpossible to install as non-root. In fact, buildworld already REdoes this for you -- it uses src/tools/install.sh as INSTALL REto do it (see the BMAKEENV setting in Makefile.inc1). So it seems that: make SHAREOWN=harti SHAREGRP=harti INSTALL=sh `pwd`/release/install.sh \ DESTDIR=/somewhere installworld almost works. Almost, because bsd.lib.mk contains SHLINSTALLFLAGS += -fschg That case is not handled in install.sh and should probably read SHLINSTALLFLAGS += -f schg Additionally I had to add -fschg) shift;; to install.sh, because it seems that the installworld target uses the currently installed mk files not those from src/share/mk. The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes these directly to zic. This could probably be fixed by calling zic during buildworld and just install the compiled files during installworld. Thanks for your help, harti ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: make installworld for non-root user
On Wed, Jul 07, 2004 at 11:17:00AM +0200, Harti Brandt wrote: On Wed, 7 Jul 2004, Ruslan Ermilov wrote: REOn Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: RE RE Hi all, RE RE is there an easy way for a non-root user to test the installworld target? RE I came up with RE RE make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ RE NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ RE MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ RE installworld RE RE but that one breaks in libexec/pt_chown (which has a hard-coded RE BINOWN=root). RE RE Perhaps I can't see the obvious solution? RE REMany bits hardcode owners/groups/modes/flags, but it's still REpossible to install as non-root. In fact, buildworld already REdoes this for you -- it uses src/tools/install.sh as INSTALL REto do it (see the BMAKEENV setting in Makefile.inc1). So it seems that: make SHAREOWN=harti SHAREGRP=harti INSTALL=sh `pwd`/release/install.sh \ DESTDIR=/somewhere installworld almost works. Almost, because bsd.lib.mk contains SHLINSTALLFLAGS += -fschg That case is not handled in install.sh and should probably read SHLINSTALLFLAGS += -f schg Rather I've fixed install.sh (committed): %%% Index: install.sh === RCS file: /home/ncvs/src/tools/install.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- install.sh 6 Feb 2004 11:00:13 - 1.6 +++ install.sh 7 Jul 2004 09:38:14 - 1.7 @@ -33,6 +33,7 @@ case $1 in -[bCcMpSs]) shift;; -[Bfgmo]) shift; shift;; +-[Bfgmo]*) shift;; *) break; esac done %%% Additionally I had to add -fschg) shift;; to install.sh, because it seems that the installworld target uses the currently installed mk files not those from src/share/mk. Not until you call installworld with make -fMakefile.inc1 Normally, src/Makefile is used and it calls installworld with -m${.CURDIR}/share/mk. You can verify with ``make -n installworld''. The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes these directly to zic. This could probably be fixed by calling zic during buildworld and just install the compiled files during installworld. Yes, I've been thinking of doing this for some years now. I will see if I can fix it easily, now that I have a good reason for it. ;) Cheers, -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer pgpvD3HWRjNKh.pgp Description: PGP signature
Re: make installworld for non-root user
On Wed, 7 Jul 2004, Ruslan Ermilov wrote: REOn Wed, Jul 07, 2004 at 11:17:00AM +0200, Harti Brandt wrote: RE to install.sh, because it seems that the installworld target uses the RE currently installed mk files not those from src/share/mk. RE RENot until you call installworld with make -fMakefile.inc1 RENormally, src/Makefile is used and it calls installworld with RE-m${.CURDIR}/share/mk. You can verify with ``make -n installworld''. So that was probably just a pilot error from me. RE The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes RE these directly to zic. This could probably be fixed by calling zic RE during buildworld and just install the compiled files during installworld. RE REYes, I've been thinking of doing this for some years now. I will see if REI can fix it easily, now that I have a good reason for it. ;) Would be nice.. I'm currently stuck to use panther to test my patches for sparc (my sparcs are still in Berlin) and I want to make sure that I don't break installworld at least. Thanks, harti ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]