NetBSD Problem Report #59482

From h.fath@spg.tu-darmstadt.de  Tue Jun 24 11:37:33 2025
Return-Path: <h.fath@spg.tu-darmstadt.de>
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BD9451A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Jun 2025 11:37:33 +0000 (UTC)
Message-Id: <202506241137.55OBbCcC006299@Hochobir.nt.e-technik.tu-darmstadt.de>
Date: Tue, 24 Jun 2025 13:37:12 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: mail/squirrelmail update problems
X-Send-Pr-Version: 3.95

>Number:         59482
>Category:       pkg
>Synopsis:       mail/squirrelmail update problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    taca
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 24 11:40:01 +0000 2025
>Last-Modified:  Sun Jun 29 14:25:01 +0000 2025
>Originator:     Hauke Fath
>Release:        NetBSD 9.4_STABLE
>Organization:
Technische Universitaet Darmstadt
>Environment:


System: NetBSD Hochobir 9.4_STABLE NetBSD 9.4_STABLE (DMZ_DOMU) #0: Tue Jul 2 05:02:44 CEST 2024 hf4kh@Hochstuhl:/var/obj/netbsd-builds/9/amd64/sys/arch/amd64/compile/DMZ_DOMU amd64
Architecture: x86_64
Machine: amd64
>Description:

	After a php upgrade (8.1 -> 8.2) I found the machine's
	squirrelmail installation had lost its configuration.

	There are several aspects to that:

	(1) The package name has a php prefix, implying installation
	under PREFIX/share/php/<version>/squirrelmail.
	I have been wondering about whether it makes sense to version
	applications that way (as opposed to libraries/modules), and
	now am convinced that it does not. Switching a foo based
	application from foo-N to foo-N+1 does not change the
	application, so there is no reason to move it.

	(2) squirrelmail recommends local configuration go into
	config/config_local.php which is then included by
	config/config.php. I did that, and the file was removed with
	the php81 package. It either should not be in PLIST (not
	pkgsrc managed) and thus left alone during a package removal,
	or, even better, should move to PKG_SYSCONFDIR.

	Having been tripped up like this before, I had
	config_local.php under rcs control. I was able to move the RCS
	directory, check out config_local.php, and back in business.


>How-To-Repeat:

	Upgrade php, find your squirrelmail installation broken.


>Fix:

	Move config_local.php to PKG_SYSCONFDIR.

	Consider removing the php prefix from the package name.



>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->taca
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Tue, 24 Jun 2025 11:41:09 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59482 CVS commit: pkgsrc/mail/squirrelmail
Date: Sun, 29 Jun 2025 14:09:04 +0000

 Module Name:	pkgsrc
 Committed By:	taca
 Date:		Sun Jun 29 14:09:04 UTC 2025

 Modified Files:
 	pkgsrc/mail/squirrelmail: Makefile PLIST

 Log Message:
 mail/squirrelmail: clean up configuration files handling

 Make proper handling of configuration files, especially do not overwrite
 config_local.php.  Fix PR pkg/59482 (2).

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.149 -r1.150 pkgsrc/mail/squirrelmail/Makefile
 cvs rdiff -u -r1.43 -r1.44 pkgsrc/mail/squirrelmail/PLIST

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Takahiro Kambe <taca@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/59482: mail/squirrelmail update problems
Date: Sun, 29 Jun 2025 23:20:39 +0900 (JST)

 In message <20250624114001.53C8B1A9239@mollari.NetBSD.org>
 	on Tue, 24 Jun 2025 11:40:01 +0000 (UTC),
 	Hauke Fath <hf@spg.tu-darmstadt.de> wrote:
 > 	There are several aspects to that:
 > 
 > 	(1) The package name has a php prefix, implying installation
 > 	under PREFIX/share/php/<version>/squirrelmail.
 > 	I have been wondering about whether it makes sense to version
 > 	applications that way (as opposed to libraries/modules), and
 > 	now am convinced that it does not. Switching a foo based
 > 	application from foo-N to foo-N+1 does not change the
 > 	application, so there is no reason to move it.
 Including <version> has an aspect of safety updating of PHP.

 Installing foo package of PHP 8.3 and 8.4 at the same time and running
 PHP 8.3 base package for production and PHP 8.4 for testing.

 It might help to create an option to control <version> inclusion
 on/off to each package.

 > 	(2) squirrelmail recommends local configuration go into
 > 	config/config_local.php which is then included by
 > 	config/config.php. I did that, and the file was removed with
 > 	the php81 package. It either should not be in PLIST (not
 > 	pkgsrc managed) and thus left alone during a package removal,
 > 	or, even better, should move to PKG_SYSCONFDIR.
 > 
 > 	Having been tripped up like this before, I had
 > 	config_local.php under rcs control. I was able to move the RCS
 > 	directory, check out config_local.php, and back in business.
 This is simply wrong (or out dated) handling of configuration files
 and should fixed with squirrelmail-1.4.23pre15037nb1.

 -- 
 Takahiro Kambe <taca@NetBSD.org>

>Unformatted:

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-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.