pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem building fail2ban with PKG_SYSCONFBASE=/etc



At Fri, 19 Dec 2025 18:05:17 +0100 (CET), Jarle Greipsland <jarle.greipsland%norid.no@localhost> wrote:
Subject: Re: Problem building fail2ban with PKG_SYSCONFBASE=/etc
>
> Greg Troxel <gdt%lexort.com@localhost> writes:
> >
> > I wonder why you have chose PKG_SYSCONFBASE to be /etc.  I
> > leave it at LOCALBASE/etc.
>
> Two reasons: It's the default in the pkg_comp-installation, I
> think.  And also, I intend to try and share the /usr/pkg-tree
> with multiple hosts over NFS, and then it makes (some) sense to
> have the configuration files individually configurable per host.
> It may not work out, though.

I too have _always_ made sure pkgsrc things put their config files in
the _system_ /etc configuration directory, and that most especially
applies to rc.d scripts.

In general it makes absolutely no sense to me to ever have multiple /etc
directories.  I want to look in one place and one place only for config
files.

I also want to be able to share /usr/pkg, e.g. with NFS, or maybe vio9p,
to machines/vm's with disparate configuration requirements.  I've done
this successfully in the past _only_ with PKG_SYSCONFBASE=/etc.

There's also a chicken&egg problem if you ever have a separate /usr/pkg
filesystem (shared or not), and you have packages installed that have
rc.d scripts.

The only way those pkg rc.d scripts can depend on "mountall", or
"DAEMON", or something even later, e.g. "LOGIN", to be sure they can run
is if those scripts are readable at boot time without any extra
filesystems mounted.  I.e. rcorder must read all rc.d scripts early
enough with only the root filesystem (and /etc, if it is separate)
mounted to get things right.

The very fact this was ever a choice, and why anyone who ever thought
critically about it for more than a moment wanted a /usr/pkg/etc,
befuddles me.

The fact there are still packages which expect to find their config
things, or leave other detritus, in a hard-coded location of
/usr/pkg/etc also befuddles me (e.g. rfcutil, nsd, nut).

The one thing that might be nice is if there was a pkg_* tool that could
run all the INSTALL scripts on a client host that shares a /usr/pkg so
that any post-install actions could be done, e.g. copying sample config
files and rc.d scripts to the client's /etc.  This could be run by
postinstall, for example.

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpMOpthGRRNA.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index