Commit graph

96 commits

Author SHA1 Message Date
rillig
858c6cfd69 mk/misc: make configuration for show-all targets more configurable
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).
2018-11-30 18:38:19 +00:00
maya
6c25dec844 Remove clauses 3,4 from TNF-only copyright blocks.
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@
2018-08-22 20:48:36 +00:00
prlw1
5c827f6f0e Essentially from OBATA Akio in private mail, June 2015:
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+.
2017-06-14 16:23:09 +00:00
jlam
b47434aa08 SHLIB_TYPE definition has moved to bsd.prefs.mk. 2017-06-01 13:29:18 +00:00
jaapb
8bf82f0dd4 Updated pkginstall framework to correct bug in findlib registration.
Discussed on packages@ and okayed by jperkin.
2016-06-25 13:52:28 +00:00
jaapb
5b9387d7eb Two fixes to the ocaml-findlib-register pkginstall fragment:
- 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
2016-06-17 08:53:42 +00:00
jaapb
02746ce69d Added a ${RUN} to the UNPACK line for the ocaml-findlib-register script 2016-04-12 16:01:06 +00:00
jaapb
e712e0e4d8 Added a pkginstall fragment that takes over from ocaml-findlib-register (a
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.
2016-04-12 15:52:29 +00:00
joerg
639d5b402f Remove support for USE_DESTDIR=no. 2016-04-10 15:58:02 +00:00
joerg
738c342050 Adjust USRGROUP_PHASE handling for USE_DESTDIR=no removal. Update
documentation to reflect the pre-install option.
2016-04-10 15:33:42 +00:00
leot
aff1d75674 Fix a typo in a comment. 2015-11-08 03:21:46 +00:00
dholland
78c137ddf2 Construct rc.d scripts in a subdirectory of WRKDIR (.rc.d/) instead of
right in it, to avoid name conflicts. PR 39271.
2015-08-10 05:41:10 +00:00
wiz
35c16540aa Fix typo in comment. 2015-02-24 09:46:09 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00
joerg
a96412f45e Retire PKGINSTALL_VERBOSE, split it into independent variables
FONTS_VERBOSE and INFO_FILES_VERBOSE.
2014-10-12 23:44:32 +00:00
joerg
c6e1b83d1b Simplify PKG_DEVELOPER checks. 2014-10-12 23:39:17 +00:00
wiz
43b4ee8119 Update default font path reference. 2014-06-01 16:56:47 +00:00
jperkin
b3106a0b77 Add initial support for alternative init systems.
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.
2014-03-11 13:45:07 +00:00
sbd
9d8345a50e Add the '-r' option to useradd/groupadd when no uid/git is given so that
a system account/group (differance id range) will be created.
2013-04-05 03:30:40 +00:00
jperkin
4423fb7775 Fix typo in comment. 2013-04-03 09:35:19 +00:00
wiz
304b30e8af Add GAMES_GROUP GAMES_USER GAMEDATAMODE GAMEDIRMODE GAMEMODE to BUILD_DEFS. 2012-07-09 21:56:38 +00:00
wiz
934f098ead Move USE_GAMESGROUP and SETGIDGAME defaults out of mk.conf, where they
don't belong (package-setable, not user-setable).
2012-07-09 15:44:06 +00:00
bsiegert
4f8de70118 Add user and group management functions for MirBSD to unbreak packages
that need to create new users. No effect for other platforms.

ok wiz
2012-06-19 05:43:24 +00:00
wiz
cf875fa1c8 Revert previous: Patch submitter reports it's not necessary after all
since -f usually follows symlinks.
2012-04-21 10:22:32 +00:00
wiz
89a31b1d10 Check for existing symlinks before overwriting config files in
PKG_SYSCONFDIR. From Edgar Fuß <ef@math.uni-bonn.de> on tech-pkg.
2012-04-17 11:55:33 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
dholland
dfc53f692a Revert unintended hunk in previous commit. (caught by wiz, thanks) 2011-04-30 23:58:29 +00:00
dholland
f7498956be typo in comment 2011-04-30 21:58:37 +00:00
bad
89f715edf7 I'm fed up with having to waste time because PKG_DEVELOPER is "special" and
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.
2010-08-24 19:08:28 +00:00
dholland
4424b4c08b Begin cleanup of setgid game infrastructure.
* 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.
2010-07-08 04:57:36 +00:00
joerg
66cab93c7e Allow pre-install for USERGROUP_PHASE. This is intended for
PKG_DESTDIR_SUPPORT=destdir packages, that don't otherwise need the
user/group during build.

Export USERGROUP_PHASE for the sake of pbulk.
2010-06-15 19:23:55 +00:00
jmmv
356178f94b Previous change breaks platforms with need_ksh. Reported by joerg@.
Let's revert it for now and think about a way to proceed with this idea
later.
2010-05-07 14:29:36 +00:00
jmmv
f7027e7ba1 Use shells(8) from sysutils/etcutils to update /etc/shells instead of
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.
2010-05-07 12:00:36 +00:00
jmmv
21d13ddec9 pkgsrc now deletes empty directories automatically. Fix the fonts
deinstallation script to follow this convention and purge empty directories
when there are no fonts left (and after their database has been removed).
2010-04-23 12:47:14 +00:00
rillig
c9b5181017 Clarified the documentation. 2010-03-10 15:01:42 +00:00
joerg
82ddc9f5cc Make sure that MV is properly defined. From PR 42247. 2009-10-29 20:19:27 +00:00
joerg
e1659a7b56 Try to work around the mess called useradd on Linux. On Red Hat derived
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.
2009-03-08 19:39:03 +00:00
joerg
6daf419fa5 Create users with -M. On Linux this gives the same behavior as NetBSD's
useradd without -M, e.g. allows creation of users without home
directory. Tested on RHEL4. From Jens Rehsack.
2009-02-02 19:54:22 +00:00
wiz
7bb527e6f7 Fix a longstanding bug in the pkginstall infrastructure: incomplete
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@
2008-09-25 14:01:46 +00:00
jlam
4e56d99aca Automatically add ${GAMES_USER} and ${GAMES_GROUP} to PKG_USERS and
PKG_GROUPS when SETGIDGAMES == yes.
2008-03-04 06:51:41 +00:00
jlam
26a6bb9ac4 + Conditionally add GAMES_USER and GAMES_GROUP to the platform *.mk
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.
2008-03-04 06:45:33 +00:00
jlam
810c83eb14 Use ${GAMEMODE} and not hardcoded 2755. 2008-03-04 05:55:42 +00:00
jlam
80ac108053 Add SETGID_GAME_PERMS convenience definition that defaults to owner=game,
group=game, mode=0775.
2008-03-04 05:11:18 +00:00
rillig
93cc59aaae Reverted my last change. I was completely wrong. The real fault reported
in PR 37905 is exactly what I wanted to prevent using this check: A
configuration file was mentioned via CONF_FILES but does not exist in
the PLIST.
2008-01-29 19:18:26 +00:00
rillig
1b87d175f8 Disabled the check for missing example configuration files, since
according to PR 37905, it gets called too early.
2008-01-29 19:14:45 +00:00
rillig
ddf74e4220 Replaced unreadable code with readable code by doing a little
substitution.
2008-01-23 14:46:33 +00:00
rillig
aa66ac5ffb Replaced _PKG_SILENT and _PKG_DEBUG with RUN, after making sure that the
additional error checking won't break anything that isn't intended to
break.
2008-01-23 14:12:32 +00:00
heinz
79a03c3697 In the CHECK-PERMS case, moved test of exit code one line up, so the
removal of tmpdir does not overwrite the exit code to be tested.
2008-01-04 21:50:27 +00:00
rillig
173c29312a Added information about the interface to this file, which can be queried
with "bmake show-all-pkginstall".
2007-12-13 11:10:42 +00:00
rillig
2e6521f63c Print an understandable error message if the number of arguments for
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.
2007-12-06 22:03:22 +00:00