Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2012 00:46:14 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Robert Watson <rwatson@freebsd.org>, Ken Smith <kensmith@freebsd.org>
Subject:   Re: please add auditdistd user/group to -stable and the 9.1-release?
Message-ID:  <CAGH67wSJjk=WxKOAvn7xT6psWJ9hegexg=Os2iK2XAV5vfUy-Q@mail.gmail.com>
In-Reply-To: <CAGH67wQknTn1x2aU1HtgC=HweVe8i3qedCo1Tq2wtVOJW2og-Q@mail.gmail.com>
References:  <CAJ-VmokK6-3qtPid0ZszRnEKoN4oy7ZHiB5dVcAa8K4XhVbtOg@mail.gmail.com> <CAGH67wT4=9mpWHFxbJZ7DSzKD3%2B6POtxDjQqVm98hVx2yFUXcw@mail.gmail.com> <CAGH67wQknTn1x2aU1HtgC=HweVe8i3qedCo1Tq2wtVOJW2og-Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--bcaec54b4a0e2bb86c04cfeec8ec
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 2, 2012 at 11:06 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Sun, Dec 2, 2012 at 9:20 PM, Garrett Cooper <yanegomi@gmail.com> wrote=
:
>> On Sun, Dec 2, 2012 at 9:08 PM, Adrian Chadd <adrian@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
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- etc/Makefile        (revision 243802)
> +++ etc/Makefile        (working copy)
> @@ -293,7 +293,7 @@
>
>  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 a=
s
                        the ownership, mode, flags, or time when creating n=
ew
                        directories or changing existing entries.  This opt=
ion
                        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=3D/scratch/fbsd-destdir

...

=3D=3D=3D> 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
=3D=3D=3D> libcrypto/engines (install)
=3D=3D=3D> libcrypto/engines/lib4758cca (install)
install -s -o root -g wheel -m 444     lib4758cca.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libaep (install)
install -s -o root -g wheel -m 444     libaep.so /scratch/fbsd-destdir/usr/=
lib32
=3D=3D=3D> libcrypto/engines/libatalla (install)
install -s -o root -g wheel -m 444     libatalla.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libchil (install)
install -s -o root -g wheel -m 444     libchil.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libcswift (install)
install -s -o root -g wheel -m 444     libcswift.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libgost (install)
install -s -o root -g wheel -m 444     libgost.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libnuron (install)
install -s -o root -g wheel -m 444     libnuron.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> libcrypto/engines/libsureware (install)
install -s -o root -g wheel -m 444     libsureware.so
/scratch/fbsd-destdir/usr/lib32
=3D=3D=3D> 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
=3D=3D=3D> libssl (install)
install -C -o root -g wheel -m 444   libssl.a /scratch/fbsd-destdir/usr/lib=
32
install -C -o root -g wheel -m 444   libssl_p.a /scratch/fbsd-destdir/usr/l=
ib32
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
=3D=3D=3D> libssh (install)
install -C -o root -g wheel -m 444   libssh.a /scratch/fbsd-destdir/usr/lib=
32
install -C -o root -g wheel -m 444   libssh_p.a /scratch/fbsd-destdir/usr/l=
ib32
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=3Dld-elf32.so.1
MACHINE=3Di386 MACHINE_ARCH=3Di386 MACHINE_CPU=3D"i686 mmx sse sse2"
MAKEOBJDIRPREFIX=3D/usr/obj/lib32
_SHLIBDIRPREFIX=3D/usr/obj/store/freebsd/head/lib32 VERSION=3D"FreeBSD
9.1-PRERELEASE amd64 901501"
PATH=3D/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freeb=
sd/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/u=
sr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/usr/obj/store/freebsd/hea=
d/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/o=
bj/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/hea=
d/tmp/usr/games:/tmp/install.yw3nUN4i
LIBDIR=3D/usr/lib32 SHLIBDIR=3D/usr/lib32 COMPILER_TYPE=3Dgcc
/usr/obj/store/freebsd/head/make.amd64/make AS=3D"as --32" LD=3D"ld -m
elf_i386_fbsd -Y P,/usr/obj/store/freebsd/head/lib32/usr/lib32" CC=3D"cc
-m32 -march=3Dcore2 -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=3D"c++ -m32
-march=3Dcore2 -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=3Dldd32 MACHINE=3Di386
MACHINE_ARCH=3Di386 MACHINE_CPU=3D"i686 mmx sse sse2"
MAKEOBJDIRPREFIX=3D/usr/obj/lib32
_SHLIBDIRPREFIX=3D/usr/obj/store/freebsd/head/lib32 VERSION=3D"FreeBSD
9.1-PRERELEASE amd64 901501"
PATH=3D/usr/obj/store/freebsd/head/tmp/legacy/usr/sbin:/usr/obj/store/freeb=
sd/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/u=
sr/bin:/usr/obj/store/freebsd/head/tmp/usr/games:/usr/obj/store/freebsd/hea=
d/tmp/legacy/usr/sbin:/usr/obj/store/freebsd/head/tmp/legacy/usr/bin:/usr/o=
bj/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/hea=
d/tmp/usr/games:/tmp/install.yw3nUN4i
LIBDIR=3D/usr/lib32 SHLIBDIR=3D/usr/lib32 COMPILER_TYPE=3Dgcc
/usr/obj/store/freebsd/head/make.amd64/make AS=3D"as --32" LD=3D"ld -m
elf_i386_fbsd -Y P,/usr/obj/store/freebsd/head/lib32/usr/lib32" CC=3D"cc
-m32 -march=3Dcore2 -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=3D"c++ -m32
-march=3Dcore2 -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@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA
amd64

--bcaec54b4a0e2bb86c04cfeec8ec
Content-Type: text/plain; charset=US-ASCII; 
	name="ignore-BSD.var.dist-uid-and-gid-set-errors.patch.txt"
Content-Disposition: attachment; 
	filename="ignore-BSD.var.dist-uid-and-gid-set-errors.patch.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ha9craov0

SW5kZXg6IGV0Yy9NYWtlZmlsZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBldGMvTWFrZWZpbGUJKHJldmlzaW9u
IDI0MzgwMikKKysrIGV0Yy9NYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMjkzLDcgKzI5Myw3
IEBACiAKIGRpc3RyaWItZGlyczoKIAltdHJlZSAtZVUgJHtNVFJFRV9GT0xMT1dTX1NZTUxJTktT
fSAtZiAkey5DVVJESVJ9L210cmVlL0JTRC5yb290LmRpc3QgLXAgJHtERVNURElSfS8KLQltdHJl
ZSAtZVUgJHtNVFJFRV9GT0xMT1dTX1NZTUxJTktTfSAtZiAkey5DVVJESVJ9L210cmVlL0JTRC52
YXIuZGlzdCAtcCAke0RFU1RESVJ9L3ZhcgorCW10cmVlIC1lVXcgJHtNVFJFRV9GT0xMT1dTX1NZ
TUxJTktTfSAtZiAkey5DVVJESVJ9L210cmVlL0JTRC52YXIuZGlzdCAtcCAke0RFU1RESVJ9L3Zh
cgogCW10cmVlIC1lVSAke01UUkVFX0ZPTExPV1NfU1lNTElOS1N9IC1mICR7LkNVUkRJUn0vbXRy
ZWUvQlNELnVzci5kaXN0IC1wICR7REVTVERJUn0vdXNyCiAJbXRyZWUgLWVVICR7TVRSRUVfRk9M
TE9XU19TWU1MSU5LU30gLWYgJHsuQ1VSRElSfS9tdHJlZS9CU0QuaW5jbHVkZS5kaXN0IFwKIAkJ
LXAgJHtERVNURElSfS91c3IvaW5jbHVkZQo=
--bcaec54b4a0e2bb86c04cfeec8ec
Content-Type: application/octet-stream; 
	name="mimic-netbsd-mtree-by-ignoring-user-and-group-set-errors.patch"
Content-Disposition: attachment; 
	filename="mimic-netbsd-mtree-by-ignoring-user-and-group-set-errors.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ha9crkx01

SW5kZXg6IHVzci5zYmluL210cmVlL3NwZWMuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3Iuc2Jpbi9tdHJl
ZS9zcGVjLmMJKHJldmlzaW9uIDI0MzgwMikKKysrIHVzci5zYmluL210cmVlL3NwZWMuYwkod29y
a2luZyBjb3B5KQpAQCAtMjE2LDYgKzIxNiw4IEBACiAJCQkJZXJyeCgxLCAibGluZSAlZDogaW52
YWxpZCBnaWQgJXMiLCBsaW5lbm8sIHZhbCk7CiAJCQlicmVhazsKIAkJY2FzZSBGX0dOQU1FOgor
CQkJaWYgKHdmbGFnKQkvKiBkb24ndCBwYXJzZSBpZiB3aGFja2luZyAqLworCQkJCWJyZWFrOwog
CQkJaWYgKChnciA9IGdldGdybmFtKHZhbCkpID09IE5VTEwpCiAJCQkgICAgZXJyeCgxLCAibGlu
ZSAlZDogdW5rbm93biBncm91cCAlcyIsIGxpbmVubywgdmFsKTsKIAkJCWlwLT5zdF9naWQgPSBn
ci0+Z3JfZ2lkOwpAQCAtMzA1LDYgKzMwNyw4IEBACiAJCQkJZXJyeCgxLCAibGluZSAlZDogaW52
YWxpZCB1aWQgJXMiLCBsaW5lbm8sIHZhbCk7CiAJCQlicmVhazsKIAkJY2FzZSBGX1VOQU1FOgor
CQkJaWYgKHdmbGFnKQkvKiBkb24ndCBwYXJzZSBpZiB3aGFja2luZyAqLworCQkJCWJyZWFrOwog
CQkJaWYgKChwdyA9IGdldHB3bmFtKHZhbCkpID09IE5VTEwpCiAJCQkgICAgZXJyeCgxLCAibGlu
ZSAlZDogdW5rbm93biB1c2VyICVzIiwgbGluZW5vLCB2YWwpOwogCQkJaXAtPnN0X3VpZCA9IHB3
LT5wd191aWQ7Cg==
--bcaec54b4a0e2bb86c04cfeec8ec--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wSJjk=WxKOAvn7xT6psWJ9hegexg=Os2iK2XAV5vfUy-Q>