Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.
Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.
Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.
This change has been applied to code which is likely not in other
repositories.
ok board@, reviewed by riastradh@
Introduce Icon Theme cache handling framework
Icon Theme cache files are used by GTK+ and maintained with the
gtk-update-icon-cache tool. Each Icon Theme package duplicates
its own maintainance scripts: only the specified icon theme directory
differs. With this framework, if packages have ICON_THEMES=yes,
associated icon themes will be detected and their cache files will
be maintained automatically.
Change cache handling behaviour as follows:
* Icon theme caches will be updated if either gtk2+ or gtk3+
gtk-update-icon-cache tool is available.
* With installation of gtk2+ package, not only hicolor icon theme but
also any other icon theme cache files will be updated.
* Prevent removal of icon caches at deinstall, gtk3+ may be installed and
using them.
* Ditto with gtk3+, gtk2+ may not be installed now, so caches must be
maintained by gtk3+.
- set a sensible default for OCAML_FINDLIB_DIRS (and factorise out
OCAML_SITELIBDIR)
- make it possible not to register any directory by setting
OCAML_FINDLIB_REGISTER to no
script included in the ocaml-findlib package) and removes the need to call
said script explicitly from PLIST.
Packages that use findlib will now automatically add directories that are
in OCAML_FINDLIB_DIRS (set by default to $(OCAML_SITELIBDIR)/${PKGBASE})
to the file ${PREFIX}/lib/ocaml/ld.conf. This behaviour can be disabled by
undefining OCAML_FINDLIB_REGISTER.
This commit introduces an INIT_SYSTEM variable which will determine the
type of init system to be used on the target system, supporting "rc.d"
at this time.
The pkginstall infrastructure is changed to only install RCD_SCRIPTS if
INIT_SYSTEM is set to "rc.d", and PLIST entries for rc.d scripts are
now handled automatically based on RCD_SCRIPTS.
can't be disabled by setting it to "no" like the other variables.
Besides, flavor/pkg/metadata.mk has been expecting for a long time that "no"
is a valid value.
Make PKG_DEVELOPER DWIM.
* Introduce USE_GAMESGROUP, which causes the games user and group to
be made available.
* Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as
deprecated.
* Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and
GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not.
* Define these variables in defaults/mk.conf instead of separately in
every platform/*.mk file. The definitions used to be the same for each
of these platforms anyway, except for some where they were randomly
missing or commented out for no clear reason, leading to broken game
packages.
* Handle all these variables properly when unprivileged.
* Update the comments/documentation for these variables.
* Describe GAMEOWN and GAMEGRP as deprecated. These need to be
retained as aliases for GAMES_USER and GAMES_GROUP respectively for
supporting packages that use bsd.*.mk but should otherwise not be
used.
* Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and
GAMEDIRMODE respectively.
* Fix a bug I noticed that was improperly mixing the "games" group
and "games" user.
Things this does *not* do:
- get rid of GAMES_USER, for which there should ultimately be no need.
- move the declaration/documentation/default value of USE_GAMESGROUP
to a suitable place. (It is currently where SETGIDGAME was, which is
suboptimal.)
- touch any of the games, all of which need updating with at least
s/SETGIDGAME/USE_GAMESGROUP/ and probably more.
- update the guide to explain how to handle games properly.
Also, it would be nice if using GAMES_GROUP without setting
USE_GAMESGROUP=yes caused an error but as far as I know there isn't
any particularly good way to arrange this right now.
Note that these changes may alter the build/install behavior of broken
game packages, e.g. some may silently become setgid when they weren't
before or things like that. If you run into any of this file a PR.
While one might arguably bump the PKGREVISION of all games or other
packages using any of these variables as a precaution, that seems like
a bad idea. Instead, I think I will be bumping each game once it
itself has been fixed up to do everything the right way.
hardcoding the logic into the pkginstall scripts. As discussed in
tech-pkg@.
Note: The current pkginstall/shell code is overly complicated. It looks
like it can be simplified but, at the moment, given that I do not understand
the need for such complexity, I'm just doing this tiny change.
Note 2: The ability to update /etc/services, which was also discussed, will
come later once this change proves to be stable.
distributions, useradd will create the home directory by default and
there is support for an option to disable that. Other Linux
distrubutions either lack the option in login.defs or the support for
-M. As workaround look for the option and if it is set, force -M.
Tested by Jens Rehsack. Addresses PR 40737.
support for creating empty files as CONF_FILES.
The usual way is to add
CONF_FILES= /dev/null /some/file
However, some parts of the infrastructure check if the "source" is a
file -- this fails for /dev/null obviously (other parts accept
character devices already).
Fix this. Will follow up with PKGREVISION bumps for affected packages.
Ok during freeze: agc@
files. These variables are currently usable if ${SETGIDGAME} == yes.
These variables should be used when describing ownership of files
and directories to the pkginstall framework, e.g.
SPECIAL_PERMS= bin/foogame ${GAMES_USER} ${GAMES_GROUP} 2555
+ Rename SETGID_GAME_PERMS to SETGID_GAMES_PERMS because the default
group name is "games".
+ Define SETGID_GAMES_PERMS in terms of GAMES_USER and GAMES_GROUP so
that these names are protected from the normal flow of unprivileged.mk.
This fixes the +INSTALL scripts in "user-destdir" packages to
correctly refer to the games:games instead of the user:group of the
user that built the packages.
CONF_FILES, CONF_FILES_PERMS, REQD_FILES, REQD_FILES_PERMS is wrong.
NB: The code doesn't read like "shift 5 || error_out" since NetBSD's
shell exits if a shift fails in this case, instead of just reporting an
error.
Fixes PR 37489.
I didn't fix the code in pkglint (which was suggested in the PR) since
it seems too complicated to me. There is no support for a
"MultipleShellWords" data type by now, and pkglint would have to know
that SETUID_ROOT_PERMS is of type "ThreeShellWords: Username, Groupname,
Filemode". That's too much work and doesn't look nicely.