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
This commit is contained in:
ru 2004-11-03 18:01:21 +00:00
parent 002936f9ab
commit f0fbc30e0d
17 changed files with 23 additions and 16 deletions

View File

@ -7,6 +7,6 @@ CFLAGS+=-DBINDIR=${BINDIR}
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -3,7 +3,7 @@
PROG= ksu PROG= ksu
.if defined(ENABLE_SUID_K5SU) .if defined(ENABLE_SUID_K5SU)
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.endif .endif
NOMAN= NOMAN=
SRCS= su.c SRCS= su.c

View File

@ -9,7 +9,8 @@ LDFLAGS+=-nostdlib -Wl,-Bshareable,-Bsymbolic,-assert,nosymbolic
ASFLAGS+=-k ASFLAGS+=-k
DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/} DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
LDADD+= -lc_pic -lgcc_pic 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 MLINKS= rtld.1aout ld.so.1aout
.PATH: ${.CURDIR}/${MACHINE_ARCH} .PATH: ${.CURDIR}/${MACHINE_ARCH}

View File

@ -9,7 +9,8 @@ CSTD?= gnu99
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}
LDFLAGS+= -nostdlib -e .rtld_start LDFLAGS+= -nostdlib -e .rtld_start
INSTALLFLAGS= -fschg -C -b INSTALLFLAGS= -C -b
PRECIOUSPROG=
BINDIR= /libexec BINDIR= /libexec
SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG}
MLINKS= rtld.1 ld-elf.so.1.1 \ MLINKS= rtld.1 ld-elf.so.1.1 \

View File

@ -20,6 +20,6 @@ LDADD+= ${MINUSLPAM}
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -5,7 +5,8 @@ PROG= init
MAN= init.8 MAN= init.8
MLINKS= init.8 securelevel.8 MLINKS= init.8 securelevel.8
BINMODE=500 BINMODE=500
INSTALLFLAGS=-fschg -b -B.bak PRECIOUSPROG=
INSTALLFLAGS=-b -B.bak
CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT
WARNS?= 0 WARNS?= 0
DPADD= ${LIBUTIL} ${LIBCRYPT} DPADD= ${LIBUTIL} ${LIBCRYPT}

View File

@ -115,6 +115,10 @@ _EXTRADEPEND:
.if !target(install) .if !target(install)
.if defined(PRECIOUSPROG) && !defined(NOFSCHG)
INSTALLFLAGS+= -fschg
.endif
_INSTALLFLAGS:= ${INSTALLFLAGS} _INSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT} .for ie in ${INSTALLFLAGS_EDIT}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}

View File

@ -10,7 +10,7 @@ MAN= login.1 login.access.5
.if !defined(NO_SETUID_LOGIN) .if !defined(NO_SETUID_LOGIN)
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.endif .endif
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -6,7 +6,7 @@ LDADD= -lcrypt -lutil
.if defined(ENABLE_SUID_NEWGRP) .if defined(ENABLE_SUID_NEWGRP)
BINMODE= 4555 BINMODE= 4555
INSTALLFLAGS= -fschg PRECIOUSPROG=
.endif .endif
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -13,7 +13,7 @@ LDADD= -lopie -lmd
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.PATH: ${OPIE_DIST} .PATH: ${OPIE_DIST}

View File

@ -13,7 +13,7 @@ LDADD= -lopie -lmd
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.PATH: ${OPIE_DIST} .PATH: ${OPIE_DIST}

View File

@ -6,6 +6,6 @@ SRCS= rlogin.c
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -7,6 +7,6 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rlogind
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -8,6 +8,6 @@ LDADD= -lutil ${MINUSLPAM}
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -6,7 +6,7 @@ PROG= crontab
MAN= crontab.1 crontab.5 MAN= crontab.1 crontab.5
BINOWN= root BINOWN= root
BINMODE=4555 BINMODE=4555
INSTALLFLAGS=-fschg PRECIOUSPROG=
CFLAGS+= -I${.CURDIR}/../cron CFLAGS+= -I${.CURDIR}/../cron

View File

@ -4,6 +4,6 @@ PROG= moused
MAN= moused.8 MAN= moused.8
#BINMODE=4555 #BINMODE=4555
#INSTALLFLAGS=-fschg #PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -6,6 +6,6 @@ MAN= sliplogin.8
BINOWN= root BINOWN= root
BINGRP= network BINGRP= network
BINMODE=4550 BINMODE=4550
INSTALLFLAGS=-fschg PRECIOUSPROG=
.include <bsd.prog.mk> .include <bsd.prog.mk>