NetBSD Problem Report #55477

From jruohone@gmail.com  Fri Jul 10 13:09:03 2020
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 878A51A9213
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 Jul 2020 13:09:03 +0000 (UTC)
Message-Id: <20200710130848.7EFD91AECC4@kafka.localdomain>
Date: Fri, 10 Jul 2020 16:08:48 +0300 (EEST)
From: jruohonen@iki.fi
Sender: j ruohonen <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@NetBSD.org
Subject: The rationale of /etc/pkgpath.conf is unclear and undocumented
X-Send-Pr-Version: 3.95

>Number:         55477
>Category:       bin
>Synopsis:       The rationale of /etc/pkgpath.conf is unclear and undocumented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 10 13:10:00 +0000 2020
>Closed-Date:    Mon Jul 13 11:15:32 +0000 2020
>Last-Modified:  Mon Jul 13 11:15:32 +0000 2020
>Originator:     Jukka Ruohonen
>Release:        NetBSD 9.99.68
>Organization:
>Environment:
System: NetBSD kafka 9.99.68 NetBSD 9.99.68 (CUSTOM) #0: Tue Jun 23 11:22:56 EEST 2020 jruoho@kafka:/tmp/obj/sys/arch/amd64/compile/CUSTOM amd64
Architecture: x86_64
Machine: amd64
>Description:
The file /etc/pkgpath.conf is undocumented and its rationale is unclear.
>How-To-Repeat:
man pkgpath.conf
jmacs /etc/pkgpath.conf
jmacs /etc/defaults/pkgpath.conf
>Fix:
I don't understand the purpose of the following trivial definitions:

  pkg_admin=/usr/sbin/pkg_admin
  pkg_info=/usr/sbin/pkg_info

If these are really needed, why not use which(1) or something alike?

>Release-Note:

>Audit-Trail:
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/55477: The rationale of /etc/pkgpath.conf is unclear and undocumented
Date: Fri, 10 Jul 2020 15:30:11 +0200

 Hello Jukka,

 jruohonen@iki.fi writes:
 > [...]
 > >Fix:
 > I don't understand the purpose of the following trivial definitions:
 >
 >   pkg_admin=/usr/sbin/pkg_admin
 >   pkg_info=/usr/sbin/pkg_info
 >
 > If these are really needed, why not use which(1) or something alike?
 > [...]

 Because PATH could depends of possible user's preferences.

 E.g. imagine the scenario when someone enable the installation of binary
 packages in sysinst(8) and `pkgin' is installed.  In that case pkg_path.conf
 will be adjusted to use pkg_install from pkgsrc by sysinst(8).

 If the root PATH does not have `/usr/pkg/sbin' or does not have before
 `/usr/sbin' the wrong pkg_admin(1) and pkg_info(1) will be picked up
 giving possible empty or incorrect results for daily(5) and
 security.conf(5) cronjobs.

From: Jukka Ruohonen <jruohonen@iki.fi>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, jruohonen@iki.fi
Subject: Re: bin/55477: The rationale of /etc/pkgpath.conf is unclear and
 undocumented
Date: Fri, 10 Jul 2020 16:49:37 +0300

 On Fri, Jul 10, 2020 at 01:35:01PM +0000, Leonardo Taccari wrote:
 >  Because PATH could depends of possible user's preferences.

 So there is a rationale, but the documentation part of the PR still applies.
 (After running Linux for a while, I am kind of allergic to random
 undocumented files in /etc/...).

 - Jukka

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/55477: The rationale of /etc/pkgpath.conf is unclear and
 undocumented
Date: Fri, 10 Jul 2020 19:26:23 +0300

 On Fri, Jul 10, 2020 at 13:10:00 +0000, jruohonen@iki.fi wrote:

 > I don't understand the purpose of the following trivial definitions:
 > 
 >   pkg_admin=/usr/sbin/pkg_admin
 >   pkg_info=/usr/sbin/pkg_info
 > 
 > If these are really needed, why not use which(1) or something alike?

 See security/36746, misc/47645 (as the commit log mentiones)

 -uwe

From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55477 CVS commit: src
Date: Mon, 13 Jul 2020 09:10:35 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Mon Jul 13 09:10:35 UTC 2020

 Modified Files:
 	src/distrib/sets/lists/man: mi
 	src/share/man/man5: Makefile
 Added Files:
 	src/share/man/man5: changelist.5 pkgpath.conf.5

 Log Message:
 Add stub manual pages for /etc/changelist and /etc/pkgpath.conf.
 Fixes PR bin/55477.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1694 -r1.1695 src/distrib/sets/lists/man/mi
 cvs rdiff -u -r1.72 -r1.73 src/share/man/man5/Makefile
 cvs rdiff -u -r0 -r1.1 src/share/man/man5/changelist.5 \
     src/share/man/man5/pkgpath.conf.5

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

State-Changed-From-To: open->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Mon, 13 Jul 2020 11:15:32 +0000
State-Changed-Why:
Fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.