Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2019 15:44:10 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        mj-mailinglist@gmx.de
Cc:        freebsd-pkgbase@freebsd.org
Subject:   Re: Existing passwd and group files overwritten by pkgbase upgrade
Message-ID:  <20190511154410.1a74fecbd8cecef669bb6acf@bidouilliste.com>
In-Reply-To: <trinity-4cdcf66c-108d-4070-a589-654d4dcb4179-1557581001370@3c-app-gmx-bs17>
References:  <trinity-4cdcf66c-108d-4070-a589-654d4dcb4179-1557581001370@3c-app-gmx-bs17>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 11 May 2019 15:23:21 +0200
mj-mailinglist@gmx.de wrote:

> Hi Ashley,
>=20
> I guess this=A0change=A0is=A0the cause:=A0https://reviews.freebsd.org/D20=
173
> It marks the group and=A0the master.passwd file for inclusion in the=A0
> FreebSD-runtime package.
> I tried this change on my 12 system,=A0the files are included in the
> package. You also see them in the runtime.plist=A0file, but as regular fi=
le,
> not marked as a config file, like the motd file for example.
> =A0
> ...
> @(root,wheel,0644,) /etc/group
> @(root,wheel,0600,) /etc/master.passwd
> @config(root,wheel,0644,) /etc/motd
> ...
> =A0
> i guess now the existing file is replaced by the new file, instead of bee=
ing
> merged with it.
> i think,=A0the tag "config" must be added to the above patch. But i am no=
t sure,
> what the sytnax looks like for this.
> =A0
> --
> Martin
> =A0
> > After building and installing -CURRENT r347469 using in-tree pkgbase, I
> > discovered that my /etc/group, /etc/passwd, /etc/master.passwd,
> > /etc/pwd.db and /etc/spwd.db had been overwritten.
> >=A0
> > I encountered this after running 'make packages', installing into a
> > ZFS Boot Environment using bectl to create and mount a new BE, running
> > 'pkg -r $mounpoint upgrade -y' and 'pkg -r $mountpoint -yg "FreeBSD-*"'
> > to upgrade the packages and insure that new base packages got installed,
> > and finally unmounting and activating the BE.
> >=A0
> > ~Ashley Chase
> > _______________________________________________
> > freebsd-pkgbase@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-pkgbase[https://list=
s.freebsd.org/mailman/listinfo/freebsd-pkgbase]
> > To unsubscribe, send any mail to "freebsd-pkgbase-unsubscribe@freebsd.o=
rg"
> >=A0
> _______________________________________________
> freebsd-pkgbase@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-pkgbase
> To unsubscribe, send any mail to "freebsd-pkgbase-unsubscribe@freebsd.org"

 Yes sorry that's my fault.
 I beleive the included patch should work but I don't have time to test
right now.

 diff --git a/etc/Makefile b/etc/Makefile
index ab70a94bc761..4b60868fe3dc 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -69,9 +69,9 @@ distribution:
 		rc.firewall ${DESTDIR}/etc;
 .endif
 	cd ${.CURDIR}; \
-	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T
"tags=3Dpackage=3Druntime"\
+	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T
"tags=3Dpackage=3Druntime,config"\ ${BIN1} ${DESTDIR}/etc; \
-	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 -T
"tags=3Dpackage=3Druntime"\
+	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 -T
"tags=3Dpackage=3Druntime,config"\ master.passwd ${DESTDIR}/etc;
=20
 .if ${MK_TCSH} =3D=3D "no"

 I'll try to test soon and commit.

--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190511154410.1a74fecbd8cecef669bb6acf>