From f0fbc30e0dfc83a5c6603f34bc585944a923a608 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 3 Nov 2004 18:01:21 +0000 Subject: Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver --- bin/rcp/Makefile | 2 +- kerberos5/usr.bin/ksu/Makefile | 2 +- libexec/rtld-aout/Makefile | 3 ++- libexec/rtld-elf/Makefile | 3 ++- release/picobsd/tinyware/login/Makefile | 2 +- sbin/init/Makefile | 3 ++- share/mk/bsd.prog.mk | 4 ++++ usr.bin/login/Makefile | 2 +- usr.bin/newgrp/Makefile | 2 +- usr.bin/opieinfo/Makefile | 2 +- usr.bin/opiepasswd/Makefile | 2 +- usr.bin/rlogin/Makefile | 2 +- usr.bin/rsh/Makefile | 2 +- usr.bin/su/Makefile | 2 +- usr.sbin/cron/crontab/Makefile | 2 +- usr.sbin/moused/Makefile | 2 +- usr.sbin/sliplogin/Makefile | 2 +- 17 files changed, 23 insertions(+), 16 deletions(-) diff --git a/bin/rcp/Makefile b/bin/rcp/Makefile index a9a4da5..1c156a2 100644 --- a/bin/rcp/Makefile +++ b/bin/rcp/Makefile @@ -7,6 +7,6 @@ CFLAGS+=-DBINDIR=${BINDIR} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/kerberos5/usr.bin/ksu/Makefile b/kerberos5/usr.bin/ksu/Makefile index 93f9e21..cccf559 100644 --- a/kerberos5/usr.bin/ksu/Makefile +++ b/kerberos5/usr.bin/ksu/Makefile @@ -3,7 +3,7 @@ PROG= ksu .if defined(ENABLE_SUID_K5SU) BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .endif NOMAN= SRCS= su.c diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile index 9bee501..9aa7d74 100644 --- a/libexec/rtld-aout/Makefile +++ b/libexec/rtld-aout/Makefile @@ -9,7 +9,8 @@ LDFLAGS+=-nostdlib -Wl,-Bshareable,-Bsymbolic,-assert,nosymbolic ASFLAGS+=-k DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/} LDADD+= -lc_pic -lgcc_pic -INSTALLFLAGS= -fschg -C # -C to install as atomically as possible +INSTALLFLAGS= -C # -C to install as atomically as possible +PRECIOUSPROG= MLINKS= rtld.1aout ld.so.1aout .PATH: ${.CURDIR}/${MACHINE_ARCH} diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 68d6363..e5235a9 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -9,7 +9,8 @@ CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} LDFLAGS+= -nostdlib -e .rtld_start -INSTALLFLAGS= -fschg -C -b +INSTALLFLAGS= -C -b +PRECIOUSPROG= BINDIR= /libexec SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ diff --git a/release/picobsd/tinyware/login/Makefile b/release/picobsd/tinyware/login/Makefile index 2bd2a34..cf13442 100644 --- a/release/picobsd/tinyware/login/Makefile +++ b/release/picobsd/tinyware/login/Makefile @@ -20,6 +20,6 @@ LDADD+= ${MINUSLPAM} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/sbin/init/Makefile b/sbin/init/Makefile index ce2e618..61752e9 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -5,7 +5,8 @@ PROG= init MAN= init.8 MLINKS= init.8 securelevel.8 BINMODE=500 -INSTALLFLAGS=-fschg -b -B.bak +PRECIOUSPROG= +INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT WARNS?= 0 DPADD= ${LIBUTIL} ${LIBCRYPT} diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 792b49c..c379b2b 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -115,6 +115,10 @@ _EXTRADEPEND: .if !target(install) +.if defined(PRECIOUSPROG) && !defined(NOFSCHG) +INSTALLFLAGS+= -fschg +.endif + _INSTALLFLAGS:= ${INSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile index e473aae..9ddda36 100644 --- a/usr.bin/login/Makefile +++ b/usr.bin/login/Makefile @@ -10,7 +10,7 @@ MAN= login.1 login.access.5 .if !defined(NO_SETUID_LOGIN) BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .endif .include diff --git a/usr.bin/newgrp/Makefile b/usr.bin/newgrp/Makefile index 546fcf7..8195348 100644 --- a/usr.bin/newgrp/Makefile +++ b/usr.bin/newgrp/Makefile @@ -6,7 +6,7 @@ LDADD= -lcrypt -lutil .if defined(ENABLE_SUID_NEWGRP) BINMODE= 4555 -INSTALLFLAGS= -fschg +PRECIOUSPROG= .endif .include diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile index 38fa246..0375111 100644 --- a/usr.bin/opieinfo/Makefile +++ b/usr.bin/opieinfo/Makefile @@ -13,7 +13,7 @@ LDADD= -lopie -lmd BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .PATH: ${OPIE_DIST} diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile index b25b54a..0d75a21 100644 --- a/usr.bin/opiepasswd/Makefile +++ b/usr.bin/opiepasswd/Makefile @@ -13,7 +13,7 @@ LDADD= -lopie -lmd BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .PATH: ${OPIE_DIST} diff --git a/usr.bin/rlogin/Makefile b/usr.bin/rlogin/Makefile index 2cc2e5c..e8f4dd4 100644 --- a/usr.bin/rlogin/Makefile +++ b/usr.bin/rlogin/Makefile @@ -6,6 +6,6 @@ SRCS= rlogin.c BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.bin/rsh/Makefile b/usr.bin/rsh/Makefile index fd4644e..4281ed3 100644 --- a/usr.bin/rsh/Makefile +++ b/usr.bin/rsh/Makefile @@ -7,6 +7,6 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rlogind BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile index 90b3123..109b551 100644 --- a/usr.bin/su/Makefile +++ b/usr.bin/su/Makefile @@ -8,6 +8,6 @@ LDADD= -lutil ${MINUSLPAM} BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 2c1bfc0..6b9486d 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -6,7 +6,7 @@ PROG= crontab MAN= crontab.1 crontab.5 BINOWN= root BINMODE=4555 -INSTALLFLAGS=-fschg +PRECIOUSPROG= CFLAGS+= -I${.CURDIR}/../cron diff --git a/usr.sbin/moused/Makefile b/usr.sbin/moused/Makefile index c9c1b31..07a3892 100644 --- a/usr.sbin/moused/Makefile +++ b/usr.sbin/moused/Makefile @@ -4,6 +4,6 @@ PROG= moused MAN= moused.8 #BINMODE=4555 -#INSTALLFLAGS=-fschg +#PRECIOUSPROG= .include diff --git a/usr.sbin/sliplogin/Makefile b/usr.sbin/sliplogin/Makefile index 860b9b0..0236f1e 100644 --- a/usr.sbin/sliplogin/Makefile +++ b/usr.sbin/sliplogin/Makefile @@ -6,6 +6,6 @@ MAN= sliplogin.8 BINOWN= root BINGRP= network BINMODE=4550 -INSTALLFLAGS=-fschg +PRECIOUSPROG= .include -- cgit v1.1