Commit graph

8 commits

Author SHA1 Message Date
jlam
66030afca0 Define new variables for package Makefile use:
REQD_FILES, REQD_FILES_PERMS, REQD_FILES_MODE
	REQD_DIRS, REQD_DIRS_PERMS

These are the same as the CONF_* variables, except the files and
directories listed in REQD_* are always copied over, created or removed
(taking into account if there are user modifications from the originals,
etc.) regardless of the value of PKG_CONFIG.

The implementation involved pushing the knowledge of PKG_CONFIG,
PKG_RCD_SCRIPTS, PKG_CREATE_USERGROUP, and PKG_REGISTER_SHELLS into
the individual helper scripts.  The helper scripts are now always
invoked by the +INSTALL and +DEINSTALL scripts.  The +DIRS and +FILES
script have been enhanced to understand a new "f" flag that means
"force" to ignore the value of PKG_CONFIG and PKG_RCD_SCRIPTS.

Lastly, the +FILES script has been taught a new "r" flag just for rc.d
scripts and the +RCD_SCRIPTS script is now unnecessary.
2005-08-19 22:24:09 +00:00
jlam
fcf2722f04 When using pkginstall to create INSTALL/DEINSTALL scripts to handle
config files, directories, rc.d scripts, etc., use relative paths as
much as possible to avoid hard-coding the ${PREFIX}-location in which
the files should be installed.  Where full paths are specified, if
the path is within ${PREFIX}, then automatically strip off the ${PREFIX}
part when creating the entries for the helper scripts.  Also, modify
the helper scripts to understand that relative paths should be considered
to be relative to ${PKG_PREFIX}.
2005-07-29 21:41:04 +00:00
jlam
3de5d86818 Rewrite scripts to be more resilient to shells that exit immediately
if an untested command fails (see sh(1), "-e errexit").  Do this by
changing lines that look like:

	test expression && command
to
	test ! expression || command

so that the statement list always returns 0.  Also, back out revision
1.38 of pkgsrc/mk/install/install and modify the if-test to branch
correctly if +USERGROUP doesn't exist.
2005-07-27 16:18:54 +00:00
seb
5858a961c1 Execute chmod(1) after chown(1)/chgrp(1) so NetBSD's chown(2) does
not reset any set-user-id or set-group-id bits we may want to set.

Approved by jlam@.
2005-04-20 17:13:28 +00:00
jmmv
1fa01b25e7 Fix typo. 2005-04-10 11:01:29 +00:00
tv
7573aa3be5 Fix typo in previous (should have ended the line with &&). 2005-02-14 16:31:41 +00:00
tv
ded6da1cc5 Remove "test ... -ef ...", which is unportable. Currently this is causing
syntax errors (and unchanged example files to be left behind) on Interix;
it probably causes a problem on others.

(This test appears to work around a case where two files were exactly the
same by inode, and have the script *not* delete the file in that case.
I'm not exactly sure why that is desirable at all.)
2005-02-14 16:30:35 +00:00
jlam
a6f8c45bfc Next round of install script cleanup -- we now create +FILES,
+RCD_SCRIPTS, and +PERMS subscripts to handle copying config files
and rc.d scripts, and setting special permissions on files.  The +FILES
and +RCD_SCRIPTS are basically identical except for different embedded
packets of data, and they feature reference-counting for the files in
case multiple packages share the same config file.

Garbage-collect unused functions and definitions in the install scripts
now that the subscripts are self-contained.
2005-02-02 10:33:01 +00:00