From nobody Sat Aug 23 13:38:19 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4c8J6S2rSNz65wBj for ; Sat, 23 Aug 2025 13:38:24 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 4c8J6R51LRz460c; Sat, 23 Aug 2025 13:38:23 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (124-18-6-240.area1c.commufa.jp [124.18.6.240]) (authenticated bits=0) by www121.sakura.ne.jp (8.18.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 57NDcKhP052769; Sat, 23 Aug 2025 22:38:20 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1755956300; bh=U/u4IiTiBG/PdSE3ok9fh2V25diJw6SIV+OYH1houqo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=BNJQWIqfwf5Oh1JmdTpVe+UVpOvuEUgJ0XxGGiM3n+OADlcBq5wR4LuwiOO39TAVn xnpsf/YfA1D29R2A5+0iOVJiD69UveNAQlv79ZwzNErUets8f0CMkd3tIkaA8/bHxr 0sltnQWi2Wl2B8Pi5If1ND+M1aFys94q0PfRFfwk= Date: Sat, 23 Aug 2025 22:38:19 +0900 From: Tomoaki AOKI To: Michael Gmelin Cc: Graham Perrin , freebsd-current@freebsd.org Subject: Re: /etc/pkg/FreeBSD.conf and /usr/local/etc/pkg/FreeBSD.conf (not repo names) Message-Id: <20250823223819.770855ed793c34221e2bb12c@dec.sakura.ne.jp> In-Reply-To: References: <20250823213830.310f51c1c7d241dc3bc81963@dec.sakura.ne.jp> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.3) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4c8J6R51LRz460c On Sat, 23 Aug 2025 15:04:05 +0200 Michael Gmelin wrote: > > > > On 23. Aug 2025, at 14:39, Tomoaki AOKI wrote: > > > > On Sat, 23 Aug 2025 11:40:27 +0100 > > Graham Perrin wrote: > > > >>> On 23/08/2025 10:28, Tomoaki AOKI wrote: > >>> … /etc/pkg is described as "default configuration for the package > >>> manager, pkg(8)". > >> > >> > >> Indeed, and pkg(8) is _not_ base, so what's described is not consistent > >> with /etc/ for base system software configuration files. > >> > >> > >> > >> A single repo e.g. FreeBSD-ports in /etc/pkg/FreeBSD.conf is used by pkg > >> (7, not 8) for bootstrap. > >> > >> Then: > >> > >> - /etc/pkg.conf does not exist > >> > >> - /usr/local/etc/pkg.conf is explicitly the system-wide configuration > >> file for pkg(8). > >> > >> So, I might expect /usr/local/etc/pkg/repos/FreeBSD.conf to be the > >> system-wide〓FreeBSD repository configuration file for pkg(8). > >> > >> > >> REPOS_DIR does have the default list of two directories to search. > >> > >> When I first saw pkgbasify write a FreeBSD-base configuration to > >> /usr/local/etc/pkg/repos/ I thought that the path was, somehow, unexpected. > > > > I think it should be a fatal mistake and should be in under /etc, > > not under /usr/local/etc. If it is still as such, it should be fixed > > before any release primarily use PkgBase for installs/updates. > > Maybe at 15.0? > > > > > >> After looking at intro(5) and hier(7), /usr/local/etc/pkg/repos/ seems > >> proper (a change of mind). > > > > Again, I think /usr/local/etc/pkg should be the place for > > local ones, anything not updated on PkgBase, bsdinstall nor > > freebsd-update. Anything possibly updated by them should be in > > under /etc. > > > > What allowed to be created and/or edited by admins in /etc > > should better limited to anything essential for boot. > > fstab, rc.conf, firewall configs and so on that any of boot process > > (including rc scripts in /etc/rc.conf.d) requires. > > > > > >> for pkgbasify in base 〓 without > >> pkg(8) in base 〓 will probably change my mind, again. > > > > I think pkg is quite irregular corner case. > > Indeed, it SHALL be the part of base, but as it is still under active > > developement, need to be in ports "until the spec prolerly fixed up". > > So exists /usr/sbin/pkg for bootstrapping. > > > > If pkg is NOT an irregular corner case, why ALL ports are NOT forced > > to have corresponding bootstraps in base? > > > > And IMHO, PkgBase SHALL NOT BE ALLOWED unless pkg is considered > > as the part of base, even though actual part is "currently" placed > > in ports tree. > > > > "PkgBase is coming to true.", I believe this is why configs for pkg > > is placed under /etc, not /usr/local/etc. > > > > -- > > Tomoaki AOKI > > > > In an ideal world, pkg would be in base, its default config would be /etc/defaults/pkg.conf, users could override in /etc/pkg.conf and/or /etc/pkg.d/*.conf > > But there’s history and making progress sometimes comes with compromises. > > -m IMHO, actual (non-bootstrap) pkg is in ports because it's still under more active developement than others in base. And as in some cases, users of *-Release wants latest instead of quarterly (OTOH, there seem to be some want to use quarterly on stable or main, usually forced to do so as of device compatibilities), if placing defaults under /etc/defaults/, it would be better placing all 3 templates in /usr/src/usr.sbin/pkg/ (latest, quarterly, quarterly-release) under /etc/defaults/pkg/ and symlink (or copy) to default one as /etc/FreeBSD.conf. Regards. -- Tomoaki AOKI