Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 06:13:00 -0400
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-pkgbase@freebsd.org
Subject:   Re: Existing passwd and group files overwritten by pkgbase upgrade
Message-ID:  <e32fa91c-9c82-4685-6d0a-09cfa12f64aa@FreeBSD.org>
In-Reply-To: <00a80a0e-b71a-4d71-9f19-25db34d1d906@www.fastmail.com>
References:  <trinity-4cdcf66c-108d-4070-a589-654d4dcb4179-1557581001370@3c-app-gmx-bs17> <20190511154410.1a74fecbd8cecef669bb6acf@bidouilliste.com> <20190513032404.7iwcnu4kkfqsiok4@eris.lan> <20190513143917.fbdb507a97741a98e0eb823e@bidouilliste.com> <58083f9a-f51a-4094-a728-fde6a2ec5442@www.fastmail.com> <00a80a0e-b71a-4d71-9f19-25db34d1d906@www.fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--2lXVAi8HgtnA2rHvr5q7NL0ubDp8ULBwB
Content-Type: multipart/mixed; boundary="bB2StglsbLe1lABNTQiNeIgAE9Nir1DPx";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-pkgbase@freebsd.org
Message-ID: <e32fa91c-9c82-4685-6d0a-09cfa12f64aa@FreeBSD.org>
Subject: Re: Existing passwd and group files overwritten by pkgbase upgrade
References: <trinity-4cdcf66c-108d-4070-a589-654d4dcb4179-1557581001370@3c-app-gmx-bs17>
 <20190511154410.1a74fecbd8cecef669bb6acf@bidouilliste.com>
 <20190513032404.7iwcnu4kkfqsiok4@eris.lan>
 <20190513143917.fbdb507a97741a98e0eb823e@bidouilliste.com>
 <58083f9a-f51a-4094-a728-fde6a2ec5442@www.fastmail.com>
 <00a80a0e-b71a-4d71-9f19-25db34d1d906@www.fastmail.com>
In-Reply-To: <00a80a0e-b71a-4d71-9f19-25db34d1d906@www.fastmail.com>

--bB2StglsbLe1lABNTQiNeIgAE9Nir1DPx
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 15/05/2019 21:11, Brad Davis wrote:
> On Wed, May 15, 2019, at 1:39 PM, Brad Davis wrote:
>> On Mon, May 13, 2019, at 8:39 AM, Emmanuel Vadot wrote:
>>> On Sun, 12 May 2019 20:24:04 -0700
>>> Ashley Chase <erisianash@gmail.com> wrote:
>>>
>>>> On Sat, May 11, 2019 at 03:44:10PM +0200, Emmanuel Vadot wrote:
>>>>> On Sat, 11 May 2019 15:23:21 +0200
>>>>> mj-mailinglist@gmx.de wrote:
>>>>>
>>>>>> Hi Ashley,
>>>>>>
>>>>>> I guess this=C2=A0change=C2=A0is=C2=A0the cause:=C2=A0https://revi=
ews.freebsd.org/D20173
>>>>>> It marks the group and=C2=A0the master.passwd file for inclusion i=
n the=C2=A0
>>>>>> FreebSD-runtime package.
>>>>>> I tried this change on my 12 system,=C2=A0the files are included i=
n the
>>>>>> package. You also see them in the runtime.plist=C2=A0file, but as =
regular file,
>>>>>> not marked as a config file, like the motd file for example.
>>>>>> =C2=A0
>>>>>> ...
>>>>>> @(root,wheel,0644,) /etc/group
>>>>>> @(root,wheel,0600,) /etc/master.passwd
>>>>>> @config(root,wheel,0644,) /etc/motd
>>>>>> ...
>>>>>> =C2=A0
>>>>>> i guess now the existing file is replaced by the new file, instead=
 of beeing
>>>>>> merged with it.
>>>>>> i think,=C2=A0the tag "config" must be added to the above patch. B=
ut i am not sure,
>>>>>> what the sytnax looks like for this.
>>>>>> =C2=A0
>>>>>> --
>>>>>> Martin
>>>>>> =C2=A0
>>>>>>> After building and installing -CURRENT r347469 using in-tree pkgb=
ase, I
>>>>>>> discovered that my /etc/group, /etc/passwd, /etc/master.passwd,
>>>>>>> /etc/pwd.db and /etc/spwd.db had been overwritten.
>>>>>>> =C2=A0
>>>>>>> I encountered this after running 'make packages', installing into=
 a
>>>>>>> ZFS Boot Environment using bectl to create and mount a new BE, ru=
nning
>>>>>>> 'pkg -r $mounpoint upgrade -y' and 'pkg -r $mountpoint -yg "FreeB=
SD-*"'
>>>>>>> to upgrade the packages and insure that new base packages got ins=
talled,
>>>>>>> and finally unmounting and activating the BE.
>>>>>>> =C2=A0
>>>>>>> ~Ashley Chase
>>>>>>> _______________________________________________
>>>>>>> freebsd-pkgbase@freebsd.org mailing list
>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-pkgbase[https:=
//lists.freebsd.org/mailman/listinfo/freebsd-pkgbase]
>>>>>>> To unsubscribe, send any mail to "freebsd-pkgbase-unsubscribe@fre=
ebsd.org"
>>>>>>> =C2=A0
>>>>>> _______________________________________________
>>>>>> freebsd-pkgbase@freebsd.org mailing list
>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-pkgbase
>>>>>> To unsubscribe, send any mail to "freebsd-pkgbase-unsubscribe@free=
bsd.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.
>>>>
>>>> This resolved the issue. Thank you.
>>>
>>>  I'll come up with a different version of the patch, the problem with=

>>> this one is that we install rc.bsdextended as a config file while it'=
s
>>> not one.
>>>  I also think that we should use CONFS for those file so the metadata=

>>> will be added automatically.
>>>  I've reverted the commits for now.
>>
>> Unfortunately this is going to break again when I commit this:=20
>> https://reviews.freebsd.org/D16728
>>
>> But once this goes in, the files will be properly tagged as a config=20
>> file and merged properly in the future.
>>
>> Sorry in advance.
>=20
> HEADS UP: This was committed as r347638.

So, I'm getting this in the nightly e-mails from my pkgbase VM (now that
I've fixed the mail system on it...):

Checking for packages with mismatched checksums:
FreeBSD-clibs-13.0.s20190515185144: /etc/hosts
FreeBSD-clibs-13.0.s20190515185144: /etc/shells
FreeBSD-runtime-13.0.s20190515185144: /etc/motd
FreeBSD-runtime-13.0.s20190515185144: /etc/syslog.conf
FreeBSD-ssh-13.0.s20190515185144: /etc/ssh/moduli
FreeBSD-ssh-13.0.s20190515185144: /etc/ssh/sshd_config

which I guess are just some more files that should be marked as config
files?  It make no sense for 'pkg check -s' to complain about
mis-matched checksums here, as these files are meant to be user modified.=


	Cheers,

	Matthew





--bB2StglsbLe1lABNTQiNeIgAE9Nir1DPx--

--2lXVAi8HgtnA2rHvr5q7NL0ubDp8ULBwB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAlzdN6xfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE5
RjE1NEVDQkYxMTJFNTA1NDRFM0YzMDAwNTEzRjEwRTBBOUU0RTcACgkQAFE/EOCp
5OcOihAAmAsKGHF40FKNROWTb3KOaK9gYwqXQmKmxdDAAHD+TRMpFmkx+XU/mc82
nBXDyRNWLhlSzH0qp5sVAiSS1CbXWgueItIUBA7IZNVVKW4AYVMLoM2b63xhXbYZ
RDtk2TX0bEi2m9Y4Bfz919/IzgF7c1PJWHKIrxVadynzb6oMgsbsWW0ZfUFgtvtU
wcN7O+0O6nWbJ1W/IZodfVskqUvssA27ExQkzX2Qe4VnFFEUZXxD3aylVcpPG3R8
6RhA/hJQCmt/A3+QROyIrRmpRvz2SSqZjZiLFEWWVmYd+t3QfPtiTOtHjuul1RlW
SUbFrSCnMOaq2Wnzwl7CXkLcWQFZo0rpv4eevXZF24+OpwzM3FEELVWbxCOGdhxz
t22ya2WSqyxc9etoDlEIligzkfctq/8PxV0+wkf76UYV9ZJ9YX67DukWsYgIIspN
Dx+DLhTGczUGSqSHwJfNZ6oeJFaxotIG7E0Hp7EHS6BPK/HyeDN8WuJSfYD+ymhj
laSF81yAcNrVX7QhdBJX39CTIZnq1E/kNNxhy9nvb3A77G1sj3jsMt/KCuV+8/Zt
oMCXondOfUrZWh0CfaC4Bp/1xuaT75kV1LcV8HOpTCXWuITjBoIrdEivke93Ix7G
ucv2tAoiacXUE7LpFFnd7wFQFw+Rh9lgf+BbOBXDGF829dCzYfA=
=kGf4
-----END PGP SIGNATURE-----

--2lXVAi8HgtnA2rHvr5q7NL0ubDp8ULBwB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e32fa91c-9c82-4685-6d0a-09cfa12f64aa>