From owner-freebsd-pkg@freebsd.org Thu Feb 18 18:57:04 2021 Return-Path: Delivered-To: freebsd-pkg@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16A24545730 for ; Thu, 18 Feb 2021 18:57:04 +0000 (UTC) (envelope-from gerrit.kuehn@aei.mpg.de) Received: from mailgate2.uni-hannover.de (mailgate2.uni-hannover.de [130.75.2.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhP8H4Fbgz3HkD for ; Thu, 18 Feb 2021 18:57:03 +0000 (UTC) (envelope-from gerrit.kuehn@aei.mpg.de) Received: from intranet.aei.uni-hannover.de (ahin1.aei.uni-hannover.de [130.75.117.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailgate2.uni-hannover.de (Postfix) with ESMTPS id 8039E1BD7 for ; Thu, 18 Feb 2021 19:51:37 +0100 (CET) Received: from comet2.terra.ger ([130.75.117.49]) by intranet.aei.uni-hannover.de (IBM Domino Release 9.0.1FP8) with ESMTP id 2021021819513703-89251 ; Thu, 18 Feb 2021 19:51:37 +0100 Date: Thu, 18 Feb 2021 19:51:36 +0100 From: Gerrit Kuehn To: freebsd-pkg@freebsd.org Subject: Re: config file installation/removal Message-ID: <20210218195136.6d3b6117@comet2.terra.ger> In-Reply-To: <20210216122238.4057cde9@comet2.terra.ger> References: <20210216122238.4057cde9@comet2.terra.ger> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd12.1) MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on intranet/aei-hannover(Release 9.0.1FP8|February 23, 2017) at 18/02/2021 19:51:37, Serialize by Router on intranet/aei-hannover(Release 9.0.1FP8|February 23, 2017) at 18/02/2021 19:51:37, Serialize complete at 18/02/2021 19:51:37 X-TNEFEvaluated: 1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: clamav-milter 0.102.4 at mailgate2 X-Virus-Status: Clean X-Rspamd-Queue-Id: 4DhP8H4Fbgz3HkD X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of gerrit.kuehn@aei.mpg.de has no SPF policy when checking 130.75.2.114) smtp.mailfrom=gerrit.kuehn@aei.mpg.de X-Spamd-Result: default: False [6.67 / 15.00]; ARC_NA(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[130.75.2.114:from]; RECEIVED_SPAMHAUS_XBL(5.00)[130.75.117.49:received]; GREYLIST(0.00)[pass,body]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-pkg@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[mpg.de]; RCVD_IN_DNSWL_MED(-0.20)[130.75.2.114:from]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-0.93)[-0.931]; NEURAL_SPAM_MEDIUM(0.91)[0.905]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:130.75.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-pkg] X-Spam: Yes X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 18:57:04 -0000 On Tue, 16 Feb 2021 12:22:38 +0100 Gerrit Kuehn wrote: Hello, I think I finally found the trigger for this: It happens on systems where I had moved /usr/local/etc to /etc/local and put a link in /usr/local instead: lrwxr-xr-x 1 root wheel 10 Aug 31 2018 etc@ -> /etc/local Moving the directory back to /usr/local/etc makes pkg behave as before. I've been using this for many years on many systems, but something in file handling must have changed in the pkg/ports recently causing this strange behaviour with sample files installation/removal. Any ideas why this changed? Is this a bug or a feature? cu Gerrit > Hello, > > I have a question concerning the handling of config files by pkg. Is > the following the intended behaviour? > > > --- > root@crest:~ # pkg delete rsync > Checking integrity... done (0 conflicting) > Deinstallation has been requested for the following 1 packages (of 0 > packages in the universe): > > Installed packages to be REMOVED: > rsync: 3.2.3 > > Number of packages to be removed: 1 > > Proceed with deinstalling packages? [y/N]: y > [1/1] Deinstalling rsync-3.2.3... > [1/1] Deleting files for rsync-3.2.3: 100% > You may need to manually remove /usr/local/etc/rsync/rsyncd.conf if it > is no longer needed. > --- > > Note that there is no rsyncd.conf file to remove at this point, but > never mind. So let's re-install rsync: > > --- > root@crest:~ # pkg install rsync > [...] > Proceed with this action? [y/N]: y > [1/1] Fetching rsync-3.2.3.txz: 100% 355 KiB 363.1kB/s 00:01 > Checking integrity... done (0 conflicting) > [1/1] Installing rsync-3.2.3... > [1/1] Extracting rsync-3.2.3: 100% > root@crest:~ # ll /usr/local/etc/rsync/ > total 4 > -rw-r--r-- 1 root wheel 772 Feb 4 11:31 rsyncd.conf.sample > --- > > > > So my basic issue is that apparently any config files (rsync is just > serving as an example here) don't get removed, even if they are > identical to their .sample files, and (worse!) no default configs get > installed anymore, I get just the .sample files. Is this intended? I'm > pretty sure this used to be different in the past. It is also > described differently in the handbook: > https://docs.freebsd.org/en_US.ISO8859-1/books/porters-handbook/plist-keywords.html#plist-keywords-sample > > --- > Then, on installation, if the actual file is not found, copy the > sample file to the actual file. And finally, on deinstallation, > remove the actual file if it has not been modified. > --- > > > This is what I expected and was used to until recently. However, I see > the behaviour described in the rsync example above instead on several > systems now after (binary) updating to 12.2 (but it may have crept in > earlier). Any thoughts/ideas? > > > cu > Gerrit > _______________________________________________ > freebsd-pkg@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-pkg > To unsubscribe, send any mail to "freebsd-pkg-unsubscribe@freebsd.org"