Bug#1012492: /etc/adduser.conf.dpkg-save created by postinst
On Wed, Jun 08, 2022 at 12:49:01PM -0400, Jason Franklin wrote: > If we're on the same page here, should I put a patch together? We are. Please go ahead. I apologize for not seeing this or losing focus. Greetings Marc
Bug#1012492: /etc/adduser.conf.dpkg-save created by postinst
On Wed, Jun 08, 2022 at 06:01:11PM +0200, Marc Haber wrote: > On Wed, Jun 08, 2022 at 10:11:48AM -0400, Jason Franklin wrote: > > Personally, I think we should simply install a default adduser.conf file > > and remove all of the debconf stuff from the post install script. > > That was like the gist of a short discussion I initiated in March, see > https://lists.debian.org/debian-boot/2022/03/msg00099.html Aha! Wonderful. There is precedent for this idea. This thread also explains the context in which this debconf question had been useful (i.e., the installer). I had not been able to guess this. We would also be able to finally close this one: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541620 > We just need to make sure to make a smooth transitoin, testing > installation and upgrades from a system with a locally changed > adduser.conf, a locally removed adduser.conf and adduser.conf unchanged > from the package. Local changes must be preserved. I had thought this would be gracefully handled by Dpkg, but maybe my understanding is not complete here. Simply changing the debian/install file to properly install the default /etc/adduser.conf file would work, I had thought (also removing all of the newly obsolete stuff in the maintscripts). The result would be that installing/upgrading adduser would prompt for whether or not you want to keep the local version or take the maintainer's version, etc. This prompt would depend on whether, for example, --force-confmiss or --force-conf{old,new} are passed to Dpkg, usually via apt. At least I thought that's how it would work. If we're on the same page here, should I put a patch together? -- Jason Franklin
Bug#1012492: /etc/adduser.conf.dpkg-save created by postinst
On Wed, Jun 08, 2022 at 10:11:48AM -0400, Jason Franklin wrote: > Personally, I think we should simply install a default adduser.conf file > and remove all of the debconf stuff from the post install script. That was like the gist of a short discussion I initiated in March, see https://lists.debian.org/debian-boot/2022/03/msg00099.html We just need to make sure to make a smooth transitoin, testing installation and upgrades from a system with a locally changed adduser.conf, a locally removed adduser.conf and adduser.conf unchanged from the package. Local changes must be preserved. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Bug#1012492: /etc/adduser.conf.dpkg-save created by postinst
On Wed, Jun 08, 2022 at 11:50:53AM +0200, Tomáš Virtus wrote: > Adduser's postinst script creates /etc/adduser.conf.dpkg-save file on > debootstrap's root filesystem, that is, even if /etc/adduser.conf > doesn't exist prior to package installation. Greetings: Personally, I think we should simply install a default adduser.conf file and remove all of the debconf stuff from the post install script. By installing the file directly, we will cause the adduser package to own the conffile as one would expect. Debsums will work, dpkg -S will work, etc. This would also lead to a resolution of this bug: https://bugs.launchpad.net/ubuntu/+source/adduser/+bug/1873519 I have never used the debconf settings that adduser has, but the ability to use config-package-dev would be fantastic. How impactful would it be to remove the debconf stuff? I'd be happy to whip up a patch to do this, but I don't want to just blow away debconf settings that people rely upon. -- Jason Franklin
Bug#1012492: /etc/adduser.conf.dpkg-save created by postinst
Package: adduser Version: 3.121 Adduser's postinst script creates /etc/adduser.conf.dpkg-save file on debootstrap's root filesystem, that is, even if /etc/adduser.conf doesn't exist prior to package installation. $ sudo debootstrap sid debian-root/ http://deb.debian.org/debian/ ... $ sudo chroot debian-root/ /bin/bash # dpkg -s adduser|grep Version: Version: 3.121 # ls -l /etc/adduser.conf* -rw-r--r-- 1 root root 3185 Jun 8 09:31 /etc/adduser.conf -rw-r--r-- 1 root root 3171 Jun 8 09:31 /etc/adduser.conf.dpkg-save # diff -u /etc/adduser.conf* --- /etc/adduser.conf 2022-06-08 09:31:37.278453722 + +++ /etc/adduser.conf.dpkg-save 2022-06-08 09:31:37.278453722 + @@ -86,4 +86,3 @@ # check user and group names also against this regular expression. #NAME_REGEX="^[a-z][-a-z0-9_]*$" -DIR_MODE=0755 The .dpkg-save file shouldn't be present on debootstrapped system. I believe this is caused by commit 9cef72b09[1]. First reported in Ubuntu[2]. [1] https://salsa.debian.org/debian/adduser/-/commit/9cef72b09 [2] https://bugs.launchpad.net/ubuntu/+source/adduser/+bug/1977710