NetBSD Problem Report #57852

From www@netbsd.org  Sun Jan 14 16:23:59 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1BAC01A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Jan 2024 16:23:59 +0000 (UTC)
Message-Id: <20240114162357.92E2F1A9239@mollari.NetBSD.org>
Date: Sun, 14 Jan 2024 16:23:57 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pkg_install should manage three-way merge of conf files on update
X-Send-Pr-Version: www-1.0

>Number:         57852
>Category:       pkg
>Synopsis:       pkg_install should manage three-way merge of conf files on update
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 14 16:25:00 +0000 2024
>Last-Modified:  Sun Jan 14 20:15:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBS3 Pkginstallation
>Environment:
>Description:
Config files under PKG_SYSCONFBASE, e.g. /usr/pkg/etc, are always installed under /usr/pkg/share/examples first and then copied to /usr/pkg/etc, via the CONF_FILES machinery in pkgsrc.  So we always have the pristine version of each config file.

pkg_add should take advantage of this on updates to provide three-way merges of config files, since it always has the old and new pristine files under /usr/pkg/share/examples, and the locally modified config file in /usr/pkg/etc.
>How-To-Repeat:
update packages and deal with config file changes
>Fix:
Yes, please!

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/57852: pkg_install should manage three-way merge of conf
 files on update
Date: Sun, 14 Jan 2024 21:14:26 +0100

 On Sun, Jan 14, 2024 at 04:25:00PM +0000, campbell+netbsd@mumble.net wrote:
 > >Number:         57852
 > >Category:       pkg
 > >Synopsis:       pkg_install should manage three-way merge of conf files on update

 Take a look at the gsoc, gsoc_review or gsoc_final branch of
 https://github.com/kmotavalli/pkgsrc/ which added SCM support for the
 config files.
  Thomas

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.