summaryrefslogtreecommitdiff
path: root/mk/install
AgeCommit message (Collapse)AuthorFilesLines
2004-01-08fix minor formatting funny in lastgrant1-3/+2
2003-12-21tweak a message and some formatting.grant1-14/+16
2003-12-20Handle removal of fonts databases properly if the package is usingjmmv1-4/+4
{MAKE,OWN}_DIRS (i.e., the .pkgsrc file exists in them).
2003-12-20Define LS in install scripts (needed by install/fonts).jmmv1-1/+2
2003-12-19Handle font (de)installation before bsd.pkg.install.mk handles OWN_DIRS.jmmv1-4/+1
This way font directories are not automatically removed; the package must define OWN_DIRS if it wants them to be deleted during deinstallation. This is done to avoid removal of standard font directories (those that appear in *.dist files).
2003-12-19Use ${CD}, ${GREP}, ${RM} and ${RMDIR} instead of directly calling commands.jmmv1-10/+10
2003-11-23In the overwrite package case:jlam4-11/+38
* Ensure that VIEW-INSTALL is called after _all_ POST-INSTALL actions (including any in the INSTALL_EXTRA_TMPL file) by moving the call to a file that is included after all other INSTALL templates. * Ensure that VIEW-DEINSTALL is called before _all_ DEINSTALL actions (including any in the DEINSTALL_EXTRA_TMPL file) by moving the call to a file that is included before all other DEINSTALL templates.
2003-11-23Add some whitespace.jlam1-1/+2
2003-11-21Back out part of rev. 1.20: rc.d scripts aren't really view files.jlam1-2/+1
2003-11-21Back out part of rev. 1.24: we don't need to add config files to the viewjlam1-4/+6
if only rc.d scripts are present. rc.d scripts always live in ${PREFIX} regardless of the setting for ${PKG_SYSCONFBASE}.
2003-09-27Add CVS signature. Noted by reed@.seb1-1/+1
2003-09-18fix regex when updating /etc/shells so that eg. "/bin/tcsh" doesn'tgrant2-4/+4
mistakenly cause the removal of eg. "/usr/pkg/bin/tcsh". PKG_SHELL should be an absolute path, anyway.
2003-09-17Introduce a new variable "CONF_DEPENDS" for pkgviews: a package'sjlam3-12/+46
config directory matches the config directory for the dependency listed in CONF_DEPENDS. Use symlinks to physically point the package's config directory to the dependency's config directory, and handle all of this in the INSTALL/DEINSTALL scripts. Also make the INSTALL/DEINSTALL scripts a bit smarter about not copying files and not removing files if the source and destination file locations point to the same thing.
2003-09-13Add the config files to the view also when there are rc.d scripts present.jlam3-6/+13
Ignore any .pkgsrc files as those aren't meaningful for views.
2003-09-12Make adding config files to views other than the default view work ifjlam3-10/+20
PKG_SYSCONFBASE points outside of ${PREFIX}.
2003-09-05Package Makefiles should refer to PKG_SYSCONFBASEDIR instead ofjlam3-18/+22
PKG_SYSCONFBASE when they want PKG_SYSCONFDIR stripped of PKG_SYSCONFSUBDIR. This makes PKG_SYSCONFBASE=/etc work with pkgviews by installing all config files into /etc/packages/<pkg> instead of occasionally putting some directly into /etc. Also only create PKG_SYSCONFDIR if we're actually going to copy config files.
2003-09-02Merge pkgviews-mk branch into the HEAD by running:jlam4-25/+82
cd pkgsrc/mk cvs update -Pd -A cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
2003-08-30Add for use by the INSTALL/DEINSTALL scripts.jlam1-1/+2
2003-08-22Try to deal with empty or "corrupted" Info directory file: if theseb1-0/+7
file exist when installing a package and it does not contain at least one line starting with '*' then remove it and let install-info create a new one. This should address PR pkg/22555 from reed@.
2003-06-25Better error handling.seb1-2/+2
2003-06-25At DEINSTALL time after un-registering info files from the Infoseb1-0/+4
directory file remove it if it is empty i.e. if it contains only one menu/entry line i.e. only one line starting with '*'. This allow INFO_DIR to be set to a package specific directory while not registering in the PLIST the Info directory file (${INFOR_DIR}/dir). Registering such an Info directory file in the PLIST is not really possible as a md5 signature of it holding the registered info entries would be stored in PKG_DBDIR. At deinstall time this signature would not be matched because the DEINSTALL script would have modified it by un-registering the info files from it. Hence the package removal would be reported as incomplete... You are probably right if this looks like a hack to you...
2003-06-25Only change the owner/group/mode of a directory tree if it's notjlam1-4/+4
pre-existing. This should fix pkg/21975 by Matthias Scheler.
2003-06-19Introduce a new framework to handle info files, install-info andseb1-0/+25
makeinfo commands. The goal of the new framework is twofold: - reduce the number of '@exec' and '@unexec' in PLIST by using INSTALL/DEINSTALL scripts to handle entries addition/removal Info directory file. - achieve lighter dependencies by avoiding unnecessary run-time dependency on the gtexinfo package and if needed with the help of the standalone install-info command provided by the recently imported package pkgtools/pkg_install-info. A package must be sightly updated to use this new framework and must define the variable USE_NEW_TEXINFO. This variable will be removed from the pkgsrc tree when all package would have been updated. For details see section 10.24 of Packages.txt, comments in mk/{texinfo.mk,buildlink2/bsd.buildlink2.mk} and upcoming mail to <tech-pkg at netbsd dot org>.
2003-05-06Drop trailing whitespace. Ok'ed by wiz.jmmv1-2/+2
2003-02-16Implement a simple framework to handle font databases. It regenerates thejmmv1-0/+50
fonts.dir, fonts.scale and Fontmap files (depending on the font type) in the right directories at (de)install time. Support included for TrueType, Type1 and standard X11 fonts. Reviewed by jlam.
2003-01-29Create directories at pre-install time instead of post-install so thatjlam1-14/+38
we can more accurately determine if we "own" a directory. Ownership is determined by seeing if the directory doesn't exist before the package is installed.
2002-11-21Don't blindly assume that directores listed in OWN_DIRS* and MAKE_DIRS*jlam2-7/+17
that are outside of ${LOCALBASE} belong to the package that lists them. If the directory already exists before the package is installed, then we don't presume ownership of the directory. This addresses pkg/18383 by Grant Beattie.
2002-11-17Introduce new framework which unifies registering packages providing loginsalo3-3/+19
shells to /etc/shells. This feature can be disabled by setting PKG_REGISTER_SHELLS to NO in /etc/mk.conf. An excerpt from Packages.txt, section 10.28: 10.28 Packages providing login shells ===================================== If the purpose of the package is to provide a login shell, the variable PKG_SHELL should contain the full pathname of the shell executable installed by this package. The package Makefile also must include "../../mk/bsd.pkg.install.mk" prior to the inclusion of bsd.pkg.mk to use the automatically generated INSTALL/DEINSTALL scripts. An example taken from shells/zsh: PKG_SHELL= ${PREFIX}/bin/zsh .include "../../mk/bsd.pkg.install.mk" The shell is registered into /etc/shells file automatically in the post-install target by the INSTALL script generated by bsd.pkg.install.mk and removed in the deinstall target by the DEINSTALL script.
2002-10-23Unless PKG_RCD_SCRIPTS=YES and RCD_SCRIPTS is non-empty, don't createjlam2-4/+9
${RCD_SCRIPTS_DIR} as it's not used at all.
2002-10-17Only delete scripts in RCD_SCRIPTS_DIR if PKG_RCD_SCRIPTS is YESheinz1-8/+10
(approved by jlam).
2002-10-08Recognize ${FIND} and ${XARGS}.jlam1-1/+3
2002-10-04Add new bsd.pkg.install.mk tunable variable: SPECIAL_PERMS.jlam1-1/+18
SPECIAL_PERMS are lists that look like: file user group mode At post-install time, file (it may be a directory) is changed to be owned by user:group with mode permissions. SPECIAL_PERMS should be used primarily to change permissions of files or directories listed in the PLIST. This may be used to make certain files set-uid or to change the ownership or a directory. Packages that install setuid executables should list them in SPECIAL_PERMS so that the correct user and group will be used for file ownership, even if the uid/gid changes between the package creation and the package installation.
2002-10-04Instead of the incredibly dense _print_* stuff, use a (hopefully) morejlam2-135/+107
readable way of print messages.
2002-09-19Restore the ability to not automatically install the rc.d script intojlam2-4/+15
/etc/rc.d. This is controlled by the new variable PKG_RCD_SCRIPTS which may be set in /etc/mk.conf or in the shell environment in which the INSTALL script is executed. PKG_RCD_SCRIPTS only takes effect if ${PKG_CONFIG} == "YES" and defaults to NO.
2002-08-22Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.jlam3-3/+3
2002-07-24Create a new variable "RCD_SCRIPTS_EXAMPLEDIR" that contains the locationjlam3-5/+6
of the example rc.d scripts for a package. This defaults to ${PREFIX}/etc/rc.d, but may be reset for those odd packages, e.g. qmail, that set LOCALBASE=/.
2002-06-27Don't bother the admin to create a directory from MAKE_DIRS if it alreadyjlam1-1/+4
exists on the system. We still make noise about directories in MAKE_DIRS_PERMS because those directories must have special permissions that the admin should check, even if they do exist.
2002-06-27Don't bother the admin about the ${PKG_SYSCONFBASE} and ${RCD_SCRIPTS_DIR}jlam1-4/+14
directories if they still exist after we try to remove them.
2002-06-27Put PKG_SYSCONFBASE and PKG_SYSCONFDIR in the header so that they may bejlam1-1/+4
used in the scripts.
2002-06-24let mk.conf's PKG_CREATE_USERGROUP and PKG_CONFIG take advantage oflukem1-9/+3
the same case insensitive multiple choice that the equivalents from the environment support
2002-06-22Change PKG_CREATE_USERGROUP and PKG_CONFIG so that their values are merelyjlam1-3/+3
defaults for the INSTALL/DEINSTALL scripts. The environment variables of the same name take precedence during installation of a binary package.
2002-06-20In order to solve the following problems:jlam3-186/+349
(1) Admins want to create users/groups on their own (pkg/17183). (2) Admins don't want packages to setup an initial configuration. The bsd.pkg.install.mk-generated INSTALL/DEINSTALL scripts have been modified to check certain PKG_* environment variables to tune their behaviour. This works whether installing from "make install" or from a binary package. PKG_CREATE_USERGROUP indicates whether the INSTALL script should automatically add any needed users/groups to the system using useradd/groupadd. It is either YES or NO, and defaults to YES. PKG_CONFIG indicates whether the INSTALL/DEINSTALL scripts should do automatic config file and directory handling, or if it should merely inform the admin of the list of required files and directories needed to use the package. It is either YES or NO, and defaults to YES. The make(1) variable INSTALL_RCD_SCRIPTS is removed. The package rc.d script is now handled like other config files for the package, and is copied into place if PKG_CONFIG=YES. The default values above reflect the current behaviour. Setting PKG_CREATE_USERGROUP=NO solves problem (1), and setting PKG_CONFIG=NO solves problem (2). To simply matters for users installing directly from pkgsrc, these variables may also be defined in /etc/mk.conf, but behaviour at deinstall time may be surprising. It is *HIGHLY* recommended that these values be set in the shell environment instead.
2002-01-23Be more pervasive with previous change.jlam1-4/+7
2002-01-23When copying config files, if the destination file already exists, thenjlam1-2/+3
tell user where the example file is located. Patch provided by Stoned Elipot <seb@netbsd.org> in private e-mail.
2002-01-10bsd.pkg.install.mk lists many things in FILES_SUBST, and we should havejlam1-1/+7
something to replace for each of those things in the header.
2001-12-04Fix of commands invoking {USER,GROUP}ADD so that '-{u,g}' and '{user,group}id'seb1-5/+5
are two distinct shell words. Reviewed by Johnny C. Lam.
2001-11-26Replace PKG_{USER,GROUP} with PKG_USERS and PKG_GROUPS:jlam3-80/+146
PKG_USERS represents the users to create for the package. It is a space-separated list of elements of the form user:group[:[userid][:[descr][:[home][:shell]]]] Only the user and group are required; everything else is optional, but the colons must be in the right places when specifying optional bits. Note that if the description contains spaces, then spaces should be double backslash-escaped, e.g. foo:foogrp::The\\ Foomister PKG_GROUPS represents the groups to create for the package. It is a space-separated list of elements of the form group[:groupid] Only the group is required; the groupid is optional. This solves the problem of what to do when there is more than one user or group needed for a package, e.g. qmail. Also add a bit more error-checking to the INSTALL/DEINSTALL scripts.
2001-11-26In fit of paranoia after reading about the iTunes installer and given wejlam2-82/+99
now work on Darwin, and then the discussion about allowing spaces in user/group names, make these scripts work even if the inputs contain spaces. Yes, this is overkill, but after doing all of the work, I didn't want to waste it.
2001-11-25Fix pasto: PKG_GROUP -> PKG_USERID.jlam1-2/+2
2001-11-25Allow ALL_{DIRS,FILES,MAKE_DIRS} to be appended to by the extra templatesjlam2-5/+9
so that the general INSTALL/DEINSTALL scripts can manage these extra files and directories.