|
|
|
|
|
|
| Author |
Message |
Ruslan Ermilov *nix forums addict
Joined: 01 Jul 2002
Posts: 65
|
Posted: Thu Jul 25, 2002 7:01 am Post subject:
Re: Call for Review: more pristine environment for release build
|
|
|
On Thu, Jul 25, 2002 at 03:54:08PM +0900, Makoto Matsushita wrote:
| Quote: |
ru> This had only one disadvantage so far. I could no longer pass NO_WERROR
ru> globally through the environment; passing it with WORLD_FLAGS/KERNEL_FLAGS
ru> does not make it propagate to release.5. JFYI.
Ya, that's right, thanks.
Quick workaround is to put NO_WERROR to ${CHROOT}/etc/make.conf
(LOCAL_PATCHES can be used). However, maybe it is better to describe
explicitly in ${CHROOT}/mk if parent environment defines NO_WRROR.
I'll make a patch later (maybe this evening).
One possible thing (that I tried) is to add ${WORLD_FLAGS} to the |
release.5's ${WMAKE} calls for crunchgen(1) generated binaries.
I don't recall if this broke -j there (if WORLD_FLAGS is supplied
with -j) or not, need to re-check.
Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age |
|
| Back to top |
|
 |
Makoto Matsushita *nix forums beginner
Joined: 21 Mar 2002
Posts: 9
|
Posted: Thu Jul 25, 2002 4:54 am Post subject:
Re: Call for Review: more pristine environment for release build
|
|
|
ru> This had only one disadvantage so far. I could no longer pass NO_WERROR
ru> globally through the environment; passing it with WORLD_FLAGS/KERNEL_FLAGS
ru> does not make it propagate to release.5. JFYI.
Ya, that's right, thanks.
Quick workaround is to put NO_WERROR to ${CHROOT}/etc/make.conf
(LOCAL_PATCHES can be used). However, maybe it is better to describe
explicitly in ${CHROOT}/mk if parent environment defines NO_WRROR.
I'll make a patch later (maybe this evening).
-- -
Makoto `MAR' Matsushita
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Ruslan Ermilov *nix forums addict
Joined: 01 Jul 2002
Posts: 65
|
Posted: Thu Jul 25, 2002 4:42 am Post subject:
Re: Call for Review: more pristine environment for release build
|
|
|
On Sat, Jun 08, 2002 at 06:00:49PM +0900, Makoto Matsushita wrote:
| Quote: |
Current chroot sandbox inherits parent's environment variables.
However, there is only 'PATH' environment variable which should be
inherited from the parent. Since there are several _fixed_
directories to be listed in PATH, we can safely listed directories in
static.
Following patch enables that:
* PATH list is set statically.
* Use 'env -i' to eliminate parent environment variables when
starting chroot( sandbox.
Note:
1) '/sbin' should be listed in PATH (/sbin/{u,}mount will be
there). I don't know about '/usr/sbin', but it is safe for
us IMHO.
2) 'chroot' should be full-path, since /bin/sh's default PATH
is "/bin:/usr/bin"; without full-path, env can't start chroot.
If there are no problems, I'll commit it later (maybe several days
after or so). Any comments, suggestions, and objections are welcome.
This had only one disadvantage so far. I could no longer pass NO_WERROR |
globally through the environment; passing it with WORLD_FLAGS/KERNEL_FLAGS
does not make it propagate to release.5. JFYI.
Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age |
|
| Back to top |
|
 |
Makoto Matsushita *nix forums beginner
Joined: 21 Mar 2002
Posts: 9
|
Posted: Sat Jun 08, 2002 7:00 am Post subject:
Call for Review: more pristine environment for release build
|
|
|
Current chroot sandbox inherits parent's environment variables.
However, there is only 'PATH' environment variable which should be
inherited from the parent. Since there are several _fixed_
directories to be listed in PATH, we can safely listed directories in
static.
Following patch enables that:
* PATH list is set statically.
* Use 'env -i' to eliminate parent environment variables when
starting chroot( sandbox.
Note:
1) '/sbin' should be listed in PATH (/sbin/{u,}mount will be
there). I don't know about '/usr/sbin', but it is safe for
us IMHO.
2) 'chroot' should be full-path, since /bin/sh's default PATH
is "/bin:/usr/bin"; without full-path, env can't start chroot.
If there are no problems, I'll commit it later (maybe several days
after or so). Any comments, suggestions, and objections are welcome.
Thanks in advance,
-- -
Makoto `MAR' Matsushita
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/release/Makefile,v
retrieving revision 1.686
diff -u -r1.686 Makefile
--- Makefile 8 Jun 2002 03:15:50 -0000 1.686
+++ Makefile 8 Jun 2002 08:44:07 -0000
@@ -392,7 +392,7 @@
.endif
# Don't remove this, or the build will fall over!
echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk
- echo "export PATH=$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk
+ echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${CHROOTDIR}/mk
echo "export TMPDIR=/tmp" >> ${CHROOTDIR}/mk
echo "export MAKEOBJDIRPREFIX=/usr/obj" >> ${CHROOTDIR}/mk
echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk
@@ -406,7 +406,7 @@
echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk
echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
chmod 755 ${CHROOTDIR}/mk
- chroot ${CHROOTDIR} /mk
+ env -i /usr/sbin/chroot ${CHROOTDIR} /mk
clean:
rm -rf boot_crunch release.[0-9]
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 5:35 am | All times are GMT
|
|
Payday Loans | Loans | Online Advertising | Problem Mortgage | Free Advertising
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|