Re: please add auditdistd user/group to -stable and the 9.1-release?

From: Garrett Cooper <yanegomi_at_gmail.com>
Date: Mon, 3 Dec 2012 00:46:14 -0800
On Sun, Dec 2, 2012 at 11:06 PM, Garrett Cooper <yanegomi_at_gmail.com> wrote:
> On Sun, Dec 2, 2012 at 9:20 PM, Garrett Cooper <yanegomi_at_gmail.com> wrote:
>> On Sun, Dec 2, 2012 at 9:08 PM, Adrian Chadd <adrian_at_freebsd.org> wrote:
>>> Hi,
>>>
>>> Would you guys please add the auditdistd user/group info to
>>> 9.1-release, so people doing crossbuilds of -HEAD on a fresh
>>> 9.1-RELEASE won't get an install error?
>>
>> Or mtree could just use -w instead in Makefile.inc1 and distribute.
>> Let me do some investigation to determine whether or not this is a
>> valid solution to this problem.
>
>     I've done some digging in the source tree and this seems like a
> potentially workable solution for the issue reported -- in part
> because auditdistd is only present in BSD.var.dist, /etc/rc.d/var runs
> BSD.var.dist at boot, etc:
>
> Index: etc/Makefile
> ===================================================================
> --- etc/Makefile        (revision 243802)
> +++ etc/Makefile        (working copy)
> _at__at_ -293,7 +293,7 _at__at_
>
>  distrib-dirs:
>         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f
> ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
> -       mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f
> ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
> +       mtree -eUw ${MTREE_FOLLOWS_SYMLINKS} -f
> ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
>         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f
> ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
>         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f
> ${.CURDIR}/mtree/BSD.include.dist \
>                 -p ${DESTDIR}/usr/include
>
>     I'm running a build still to confirm this.
>     I'll look into a more generic solution, but this should get people
> past r243752 without having to install a master.passwd file everywhere
> with auditdistd in it. A better solution would potentially be to delay
> processing the mtree files until later and run it via another script
> which could handle sequencing things properly (either directly via
> mtree, or better, via a make target). I have other ideas for this but
> I need to sleep on them because they might not seem workable later.

    Spoke a bit too soon. Our -w flag isn't as universally useful as
NetBSD mtree's -W flag:

     -W                 Don't attempt to set various file attributes such as
                        the ownership, mode, flags, or time when creating new
                        directories or changing existing entries.  This option
                        will be most useful when used in conjunction with -U
                        or -u.

    This patch matches what NetBSD does in their version of mtree (and
combined with the beforementioned change to etc/Makefile -- which I've
rolled into the attached patch), makes installworld possible on my
9/stable machine.
Thanks,
-Garrett

$ sudo make installworld DESTDIR=/scratch/fbsd-destdir

...

===> libcrypto (install)
install -C -o root -g wheel -m 444   libcrypto.a /scratch/fbsd-destdir/usr/lib32
install -C -o root -g wheel -m 444   libcrypto_p.a
/scratch/fbsd-destdir/usr/lib32
install -s -o root -g wheel -m 444     libcrypto.so.7
/scratch/fbsd-destdir/usr/lib32
ln -fs libcrypto.so.7 /scratch/fbsd-destdir/usr/lib32/libcrypto.so
===> libcrypto/engines (install)
===> libcrypto/engines/lib4758cca (install)
install -s -o root -g wheel -m 444     lib4758cca.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libaep (install)
install -s -o root -g wheel -m 444     libaep.so /scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libatalla (install)
install -s -o root -g wheel -m 444     libatalla.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libchil (install)
install -s -o root -g wheel -m 444     libchil.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libcswift (install)
install -s -o root -g wheel -m 444     libcswift.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libgost (install)
install -s -o root -g wheel -m 444     libgost.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libnuron (install)
install -s -o root -g wheel -m 444     libnuron.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libsureware (install)
install -s -o root -g wheel -m 444     libsureware.so
/scratch/fbsd-destdir/usr/lib32
===> libcrypto/engines/libubsec (install)
install -s -o root -g wheel -m 444     libubsec.so
/scratch/fbsd-destdir/usr/lib32
Removing stale symlinks.
rm -f /scratch/fbsd-destdir/usr/include/des.h
rm -f /scratch/fbsd-destdir/usr/lib32/libdes.a
rm -f /scratch/fbsd-destdir/usr/lib32/libdes.so
rm -f /scratch/fbsd-destdir/usr/lib32/libdes.so.3
rm -f /scratch/fbsd-destdir/usr/lib32/libdes_p.a
===> libssl (install)
install -C -o root -g wheel -m 444   libssl.a /scratch/fbsd-destdir/usr/lib32
install -C -o root -g wheel -m 444   libssl_p.a /scratch/fbsd-destdir/usr/lib32
install -s -o root -g wheel -m 444     libssl.so.7
/scratch/fbsd-destdir/usr/lib32
ln -fs libssl.so.7 /scratch/fbsd-destdir/usr/lib32/libssl.so
===> libssh (install)
install -C -o root -g wheel -m 444   libssh.a /scratch/fbsd-destdir/usr/lib32
install -C -o root -g wheel -m 444   libssh_p.a /scratch/fbsd-destdir/usr/lib32
install -s -o root -g wheel -m 444     libssh.so.5
/scratch/fbsd-destdir/usr/lib32
ln -fs libssh.so.5 /scratch/fbsd-destdir/usr/lib32/libssh.so
cd /store/freebsd/head/libexec/rtld-elf;  PROG=ld-elf32.so.1
MACHINE=i386 MACHINE_ARCH=i386 MACHINE_CPU="i686 mmx sse sse2"
MAKEOBJDIRPREFIX=/usr/obj/lib32
_SHLIBDIRPREFIX=/usr/obj/store/freebsd/head/lib32 VERSION="FreeBSD
9.1-PRERELEASE amd64 901501"
PATH=/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/obj/store/freebsd/head/tmp/legacy/usr/games:/usr/obj/store/freebsd/head/tmp/usr/sbin:/usr/obj/store/freebsd/head/tmp/usr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/obj/store/freebsd/head/tmp/legacy/usr/games:/usr/obj/store/freebsd/head/tmp/usr/sbin:/usr/obj/store/freebsd/head/tmp/usr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/tmp/install.yw3nUN4i
LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 COMPILER_TYPE=gcc
/usr/obj/store/freebsd/head/make.amd64/make AS="as --32" LD="ld -m
elf_i386_fbsd -Y P,/usr/obj/store/freebsd/head/lib32/usr/lib32" CC="cc
-m32 -march=core2 -DCOMPAT_32BIT  -isystem
/usr/obj/store/freebsd/head/lib32/usr/include/
-L/usr/obj/store/freebsd/head/lib32/usr/lib32
-B/usr/obj/store/freebsd/head/lib32/usr/lib32" CXX="c++ -m32
-march=core2 -DCOMPAT_32BIT  -isystem
/usr/obj/store/freebsd/head/lib32/usr/include/
-L/usr/obj/store/freebsd/head/lib32/usr/lib32
-B/usr/obj/store/freebsd/head/lib32/usr/lib32" -DCOMPAT_32BIT
-DNO_CPU_CFLAGS -DNO_CTF -DNO_LINT -DWITHOUT_BIND -DWITHOUT_MAN
-DWITHOUT_INFO -DWITHOUT_HTML -DNO_INCS install
install -s -o root -g wheel -m 555  -C -b -fschg -S ld-elf32.so.1
/scratch/fbsd-destdir/libexec
/scratch/fbsd-destdir/usr/libexec/ld-elf32.so.1 -> /libexec/ld-elf32.so.1
cd /store/freebsd/head/usr.bin/ldd; PROG=ldd32 MACHINE=i386
MACHINE_ARCH=i386 MACHINE_CPU="i686 mmx sse sse2"
MAKEOBJDIRPREFIX=/usr/obj/lib32
_SHLIBDIRPREFIX=/usr/obj/store/freebsd/head/lib32 VERSION="FreeBSD
9.1-PRERELEASE amd64 901501"
PATH=/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/obj/store/freebsd/head/tmp/legacy/usr/games:/usr/obj/store/freebsd/head/tmp/usr/sbin:/usr/obj/store/freebsd/head/tmp/usr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/obj/store/freebsd/head/tmp/legacy/usr/games:/usr/obj/store/freebsd/head/tmp/usr/sbin:/usr/obj/store/freebsd/head/tmp/usr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/tmp/install.yw3nUN4i
LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 COMPILER_TYPE=gcc
/usr/obj/store/freebsd/head/make.amd64/make AS="as --32" LD="ld -m
elf_i386_fbsd -Y P,/usr/obj/store/freebsd/head/lib32/usr/lib32" CC="cc
-m32 -march=core2 -DCOMPAT_32BIT  -isystem
/usr/obj/store/freebsd/head/lib32/usr/include/
-L/usr/obj/store/freebsd/head/lib32/usr/lib32
-B/usr/obj/store/freebsd/head/lib32/usr/lib32" CXX="c++ -m32
-march=core2 -DCOMPAT_32BIT  -isystem
/usr/obj/store/freebsd/head/lib32/usr/include/
-L/usr/obj/store/freebsd/head/lib32/usr/lib32
-B/usr/obj/store/freebsd/head/lib32/usr/lib32" -DCOMPAT_32BIT
-DNO_CPU_CFLAGS -DNO_CTF -DNO_LINT -DWITHOUT_BIND -DWITHOUT_MAN
-DWITHOUT_INFO -DWITHOUT_HTML -DNO_INCS install
install -s -o root -g wheel -m 555   ldd32 /scratch/fbsd-destdir/usr/bin
$ echo $?
0
$ svnversion
243802M
$ uname -a
FreeBSD bayonetta.local 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0
r240836M: Sat Sep 22 12:30:11 PDT 2012
gcooper_at_bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA
amd64

Received on Mon Dec 03 2012 - 07:46:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC