summaryrefslogtreecommitdiff
path: root/mk/pkginstall
AgeCommit message (Collapse)AuthorFilesLines
2009-10-29Make sure that MV is properly defined. From PR 42247.joerg1-1/+2
2009-03-08Try to work around the mess called useradd on Linux. On Red Hat derivedjoerg1-13/+30
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-02-02Create users with -M. On Linux this gives the same behavior as NetBSD'sjoerg1-9/+3
useradd without -M, e.g. allows creation of users without home directory. Tested on RHEL4. From Jens Rehsack.
2008-09-25Fix a longstanding bug in the pkginstall infrastructure: incompletewiz1-4/+4
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-03-04Automatically add ${GAMES_USER} and ${GAMES_GROUP} to PKG_USERS andjlam1-1/+7
PKG_GROUPS when SETGIDGAMES == yes.
2008-03-04+ Conditionally add GAMES_USER and GAMES_GROUP to the platform *.mkjlam1-5/+5
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-04Use ${GAMEMODE} and not hardcoded 2755.jlam1-2/+2
2008-03-04Add SETGID_GAME_PERMS convenience definition that defaults to owner=game,jlam1-1/+8
group=game, mode=0775.
2008-01-29Reverted my last change. I was completely wrong. The real fault reportedrillig1-7/+6
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-29Disabled the check for missing example configuration files, sincerillig1-6/+7
according to PR 37905, it gets called too early.
2008-01-23Replaced unreadable code with readable code by doing a littlerillig1-7/+9
substitution.
2008-01-23Replaced _PKG_SILENT and _PKG_DEBUG with RUN, after making sure that therillig1-82/+79
additional error checking won't break anything that isn't intended to break.
2008-01-04In the CHECK-PERMS case, moved test of exit code one line up, so theheinz2-4/+4
removal of tmpdir does not overwrite the exit code to be tested.
2007-12-13Added information about the interface to this file, which can be queriedrillig1-1/+37
with "bmake show-all-pkginstall".
2007-12-06Print an understandable error message if the number of arguments forrillig1-1/+6
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-11-23The last change didn't receive enough testing. Now it is ok to haverillig1-16/+12
/dev/null as an example file, and the proper file names are checked.
2007-11-23After a package is installed, make sure that the example files forrillig1-1/+36
CONF_FILES and similar exist, since the pkginstall framework skips them silently, which is not a good idea. For example I just installed dovecot, and there was neither a configuration file installed nor a message that a configuration file exists at all.
2007-10-10Rewrote the comments on REQD_FILES to be accessible via "bmake help".rillig1-11/+22
2007-10-09typorillig1-2/+2
2007-09-16Fixed typos in comments.heinz1-3/+3
2007-08-23Do not check that RCD_SCRIPTS_SRC.foo exists, assume so.joerg1-3/+1
This unbreaks DESTDIR installation for mail/spamassassin, when extract and install phase are part of the same make run.
2007-08-02Don't bother using environment variables to pass info the shlib-typejlam1-3/+3
shell script. Just specify everything on the command line. Also, since shlib-type is a plain-old shell script with no bells and whistles, we can safely run it with "sh" and not "${SH}", which is necessary because "${SH}" isn't defined at this point.
2007-07-27Move the +SHLIBS generation code back into the pkginstall module. In thejlam2-1/+92
plist module, it was being "defined" too late, and the pkginstall module never created any +SHLIBS scripts. Sidestep the tools problems with SHLIB_TYPE by pretending they don't exist (for now). XXX SHLIB_TYPE needs to be re-thought or removed altogether.
2007-07-23Putting bsd.pkginstall.mk under bsd.tools.mk was a bad idea -- thejlam2-82/+1
former set several USE_TOOLS lines that were being missed by bsd.tools.mk. Rearrange the +SHLIBS code so that bsd.tools.mk can now be included after bsd.pkginstall.mk again. The +SHLIBS code has now been moved over to the plist module, which is so far the repository for all of the shlib-type handling. This should fix the problem with fonts handling being broken.
2007-07-18Reversed file descriptors 1 and 2... time for a coffee break...jlam1-3/+3
2007-07-18Ignore the result of the ldconfig command.jlam1-3/+4
2007-07-18PKG_METADATADIR is the *second* argument.jlam1-2/+2
2007-07-18Add missing definition for "$ACTION", which is the first argument to thejlam1-1/+2
+SHLIBS script.
2007-07-18Add back a facility to rebuild the run-time library search paths databasejlam4-3/+92
on platforms that need it. XXX Right now, if the platform needs it, then it runs for every package. XXX This needs to be fixed to only run for packages that install shared XXX libraries. * Move mk/plist/shlib-type to mk/scripts. * Move definition of SHLIB_TYPE from mk/plist/plist.mk to bsd.pkg.mk. * Move inclusion of bsd.pkginstall.mk below bsd.tools.mk so that it can use SHLIB_TYPE. This is necessary because SHLIB_TYPE's value is the result of evaluating a command, and the command needs "TOOL" definitions provided by bsd.tools.mk.
2007-07-12* Add a user-settable variable to tune the default verbosity of thejlam10-132/+84
+INSTALL and +DEINSTALL scripts: PKGINSTALL_VERBOSE A list of scriptlets that will be verbose and output a message noting the actions taken. * "all" is a special value that implies all of the other items * "fonts" for +FONTS * "info-files" for +INFO_FILES Default value: "all" for PKG_DEVELOPERs, empty otherwise. * Be "one-liner brief" when doing the default actions. For example, the info files output now looks like: gmake-3.81: registering info file /usr/pkg/info/make.info We retain the current verbosity for the CHECK-* actions.
2007-06-15On second thought, maybe the rest of the world's software isn't asjlam1-2/+2
well-audited as NetBSD's /usr/bin/su. Change the default SETUID_ROOT_PERMS to 4511 to raise the bar slightly on finding vulnerabilities in setuid-root binaries.
2007-06-15Change the default setuid-root permissions from 4711 to 4555. Thisjlam1-2/+2
strips off the write bit for root and gets rid of the unnecessary lack of read permissions for "group" and "other". Inspired by /usr/bin/su on NetBSD.
2007-06-15Document PKG_SYSCONFDIR_PERMS, which has existed for quite some time.jlam1-1/+7
2007-03-13Added keywords for SPECIAL_PERMS, so it is found byrillig1-1/+3
"bmake help topic=setuid".
2007-01-24... and quote the $ for subst so that ${RM} ends up in the final file.joerg1-2/+2
2007-01-24*blush* Fix variable substituation to not substitute the same stringjoerg1-2/+2
twice.
2007-01-02Reformatted the documentation of INFO_DIR to make it suitable for "makerillig1-2/+4
help".
2007-01-02Add fonts magic for TrueType and Type1 fonts.joerg2-9/+26
XXX Do we want to prefer mkfontscale on other installations as well?
2006-12-29Relative $infodir is allowed, so if it's relative, add ${PREFIX}.obache1-3/+9
2006-12-15Remove trailing tabs.martti5-14/+14
2006-12-15Remove trailing spaces.martti2-4/+4
2006-11-05Rename _INSTALL_ROOT_USER to REAL_ROOT_USER. Use it as default forjoerg1-2/+2
SETUID_ROOT_PERMS.
2006-11-05RC scripts should be installed relative to DESTDIR as well.joerg1-3/+3
2006-10-12Linux shadow-utils provides a useradd that fails when creating a homeben1-0/+146
directory under a base directory hat does not exist. Add workaround to ensure that the base directory does exist. This addresses PR#34779
2006-09-22- Compute CHEKCK_FILES filter on the entries requested and keep itjoerg2-7/+15
as tight as possible. Files we don't handle shouldn't be skipped. - fonts.alias is not created automatically, so don't remove it. - create fonts.encoding with mkfontdir using -e X11_ENCODINGSDIR. On platforms not following the X11R6 loayout this might need to be overriden. - Fix type1inst calls. - Modify packages which installed fonts.alias before to actually include it in the PLIST and bump the revisions accordingly. - Modify xorg-fonts* packages to use FONTS_DIRS.* to build indices at run time. Discussed with wiz and jlam.
2006-07-19Be more conservative and avoid possible shell implementation differencesjlam8-16/+28
by not using `...` inside ${...#...}.
2006-07-19Add messages noting when the PRE-INSTALL and POST-INSTALL actions are run.jlam1-1/+3
2006-07-11Fix grammar in messages. From David A. Holland in PR 33975.wiz1-3/+3
2006-07-05Flatten out recursive makes into a single re-invocation of make byjlam1-10/+2
introducing the concept of a "barrier". We separate the user-invokable targets into ones that must happen before the barrier, and ones that must happen after the barrier. The ones that happen after the barrier are run in a sub-make process. In this case, the targets that must be run after the barrier are from the "wrapper" step and beyond. We rewrite the various "flow" targets, e.g. wrapper, configure, build, etc., so that they of the right form to use the barrier target. This now completely removes the concept of PKG_PHASE from pkgsrc. It is replaced with the concept of "before" and "after" the barrier, and this state can be checked by testing for the existence of the barrier cookie file. Because we've removed most of the recursive makes, there is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove them for now. As part of this commit, put back the logic that conditionalized the sources for the various cookie files. Because the sources are all "phony" targets, they were always run, regardless of whether or not the cookie file already existed. Now, if a cookie file exists, then that entire phase associated with that cookie file is skipped. Lastly, fix a thinko in configure/bsd.configure.mk where setting NO_CONFIGURE in a package Makefile would manage to skip the "wrapper" step altogether. Fix this by correctly noting "wrapper" and not "patch" as the preceding step to "configure".
2006-07-05Refactor configure, build, test and wrapper phases out of bsd.pkg.mkjlam1-2/+1
and into their own directories. Also do some cleanups with build/_build and pkginstall -- we get rid of _build and simply run pkginstall as part of the "build" target. Introduce a new mechanism to handle varying directory depths under ${WRKSRC} in which we find files to override, e.g. configure, config.*, libtool, etc. OVERRIDE_DIRDEPTH is a package-settable variable that specifies how far under ${WRKSRC} the various targets should look, and it defaults to "2". We preserve the meaning of the various *_OVERRIDE variables, so if they are defined, then their values supersede the OVERRIDE_DIRDEPTH mechanism. devel/tla will need to specially set OVERRIDE_DIRDEPTH to 3 (see log for revision 1.1857 for bsd.pkg.mk -- to be done in a separate commit.