Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2021 01:12:32 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 96a692ed6ff4 - stable/12 - pkg: use specific CONFSNAME_${file} for FreeBSD.conf
Message-ID:  <202108270112.17R1CWoW037876@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=96a692ed6ff41d4f20ce40f6e250b03c606fb986

commit 96a692ed6ff41d4f20ce40f6e250b03c606fb986
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2021-02-18 04:10:46 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-08-27 01:10:58 +0000

    pkg: use specific CONFSNAME_${file} for FreeBSD.conf
    
    Setting CONFSNAME directly is a little more complicated for downstream
    consumers, as any additional CONFS that are added here will inherit the
    group name by default.  This is perhaps arguably a design flaw in CONFS
    because inheriting NAME will never give a good result when additional
    files are added, but this is a low-effort change.
    
    While we're here, pull FreeBSD.conf.${branch} out into a PKGCONF
    variable so one can just drop a new repo config in entirely with a new
    naming scheme. CONFSNAME gets set based on chopping anything off after
    ".conf", so that, e.g.:
    
    - FooBSD.conf => FooBSD.conf
    - FooBSD.conf.internal => FooBSD.conf
    
    (cherry picked from commit d35164539b14a6d14fb587e58a0c7a1668d7643a)
---
 usr.sbin/pkg/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile
index 725367ad4485..3e3b99372786 100644
--- a/usr.sbin/pkg/Makefile
+++ b/usr.sbin/pkg/Makefile
@@ -15,8 +15,9 @@ PKGCONFBRANCH?=	latest
 .  endif
 . endif
 .endif
-CONFS=		FreeBSD.conf.${PKGCONFBRANCH}
-CONFSNAME=	FreeBSD.conf
+PKGCONF?=	FreeBSD.conf.${PKGCONFBRANCH}
+CONFS=		${PKGCONF}
+CONFSNAME_${PKGCONF}=	${PKGCONF:C/\.conf.+$/.conf/}
 CONFSDIR=	/etc/pkg
 CONFSMODE=	644
 PROG=	pkg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108270112.17R1CWoW037876>