summaryrefslogtreecommitdiff
path: root/mk/install
AgeCommit message (Collapse)AuthorFilesLines
2007-03-09Fixed pkglint warnings.rillig3-23/+24
2007-03-09Replaced PKG_SILENT/PKG_DEBUG with RUN.rillig2-10/+7
2007-03-09Replaced the remaining PKG_SILENT/PKG_DEBUG pairs with RUN.rillig1-6/+9
2007-03-09Fixed the quoting in INSTALLATION_DIRS and install-dirs-from-PLIST.rillig1-33/+32
In install-dirs-from-PLIST, all directories that don't contain an '@' or '$' character are automatically installed.
2007-03-09Added MAKEFLAGS to the RECURSIVE_MAKE call. Almost all other callsrillig1-2/+3
already have it.
2007-03-09Renamed some more flavor-specific targets to have the form _flavor-*.rillig2-55/+7
Split check-vulnerable into a general an a flavor-specific part, for consistence with all the other targets.
2007-03-08Renamed replace-pkg to _flavor-replace and undo-replace-pkg torillig1-6/+6
_flavor-undo-replace. The leading underscore makes it obvious that these targets are private, which saves redundant comments.
2007-03-02Make MTREE_FILE and MTREE_ARGS internal by prefixing them with '_'.wiz1-5/+5
They are not supposed to be set by the user.
2007-03-02Desupport unused FORCE_PKG_REGISTER.wiz1-2/+2
2007-03-02Remove support for obsolete and unused NO_PKG_REGISTER.wiz1-3/+3
2007-02-20Cleaned up the code:rillig1-41/+30
- Targets that are not intended to be defined here (replace-pkg and undo-replace-pkg) are not defined here. (Sounds obvious, but apparently isn't.) - Targets that are intended to be defined here and only here (replace and undo-replace) do not need a multiple-definition protection. - Moved all comments to the top of the file.
2007-01-06Moved the code that installs check-files on the hook from install.mk torillig1-5/+1
check-files.mk, for two reasons: 1. It belongs there. 2. Now check-files is run before check-perms and check-interpreter.
2006-12-15Set NO_MTREE for packages flagged as allowing DESTDIR. They are supposedjoerg1-1/+8
to work without precreated directories anyway.
2006-11-21Only set BINPKG_SITES to ftp.netbsd.org, if the OS is actually NetBSD.joerg1-1/+5
2006-11-12Removed the tests for CHECK_INTERPRETER and CHECK_PERMS. They are now inrillig1-7/+1
../checks/*.mk.
2006-11-12Moved the check for whether check-wrkref should be run fromrillig1-4/+1
install/install.mk to check/check-wrkref.mk. Renamed the check-wrkref target to _check-wrkref.
2006-11-11Added some documentation.rillig1-19/+23
Since hooks should not be overwritten, removed the !target() check. That way, one gets a warning when attempting to add some code to the hook.
2006-11-11Moved the check whether check-shlibs should be run fromrillig1-4/+1
install/install.mk to check/check-shlibs.mk. Renamed check-shlibs to _check-shlibs. Since it had been declared as "private" before, this will not break anything.
2006-11-07Just make the PREFIX with INSTALL_DATA_DIR. Drop the conditional andjoerg1-2/+2
don't use mkdir, as the latter uses the group permissions of the parent directory under BSDs, resulting in group leaks for USE_DESTDIR=yes. Discussed with agc@.
2006-11-04When a package sets INSTALLATION_DIRS_FROM_PLIST to "yes", it does notrillig2-2/+45
need to specify INSTALLATION_DIRS itself. Instead, the list is generated from the static PLIST files. Like for INSTALLATION_DIRS, mtree is disabled when this variable is set.
2006-11-03Fix thinko: INSTALLATION_DIRS entries don't have ${DESTDIR} as prefix,joerg1-3/+3
just ${PREFIX}.
2006-11-03Don't reset the "installed" state when using DESTDIR operations onjoerg1-1/+3
deinstall. The semantic of deinstall should stay as "remove the installed version" and the old behaviour force a repackaging.
2006-11-03Add package-install. For non-DESTDIR builds, package and package-installjoerg1-2/+2
are identical. For DESTDIR builds, the package is not installed to PREFIX as part of the build, so package-install does exactly that after package is done. Change bin-install to call package-install.
2006-10-26Change INSTALL_MAKE_FLAGS to be _appended_ to MAKE_FLAGS when runningrillig1-3/+3
"make install". That way, packages don't have to say: INSTALL_MAKE_FLAGS+= ${MAKE_FLAGS} foo=bar, instead it suffices to say INSTALL_MAKE_FLAGS+= foo=bar, which is also more appropriate since multiple files (Makefile, Makefile.common, options.mk, *.mk) don't need to care about whether INSTALL_MAKE_FLAGS already includes MAKE_FLAGS or not. Note: It is no longer possible to override MAKE_FLAGS completely. But except for some exotic platforms, the default value is empty anyway.
2006-10-13Added a new post-installation check to see whether the files have theirrillig1-1/+4
permissions properly set. See mk/check/check-perms.mk and sysutils/checkperms for details.
2006-10-09Main infrastructure for DESTDIR support.joerg1-13/+26
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or "user-destdir" to flag support for this, following the same rules as PKG_INSTALLATION_TYPES (e.g. define before first include of bsd.prefs.mk). The user activates it via USE_DESTDIR. When set to "yes", packages with "user-destdir" are handled as "destdir". The installation of the package will not go to ${LOCALBASE}, but a subdirectory of ${WRKDIR} instead. pre/post install scripts are not run and the package is not registered either. A binary package can be created instead to be installed normally with pkg_add. For "user-destdir" packages, everything is run as normal user and ownership is supposed to be correctled by pkg_create later. Since the current pkg_install code uses pax and it doesn't allow overwriting owners, this does not work yet. For "destdir" packages, installation, packaging and cleaning is run as root. This commit does not change the handling of DEPENDS_TARGET or bin-install to allow recursive usage.
2006-10-09Add variable to control whether the install target is run as root.joerg1-1/+5
2006-10-06Added more error checking: If a directory is specified inrillig1-1/+5
INSTALLATION_DIRS but a regular file of the same name already exists, the BSD install(1) program doesn't care but exits successfully. To avoid much more confusing error messages, this is checked here, and a _good_ error message is printed.
2006-10-05Both, the pkgsrc user and the package maintainer must agree that thisrillig1-3/+3
package should run the CHECK_FILES test. Otherwise we cannot prevent the broken shells/standalone-tcsh from scanning the whole filesystem. (hi agc!)
2006-10-03Rewrote the bin-install target so that it doesn't lock LOCALBASErillig1-20/+31
recursively. This bug was reported by Hans Rosenfeld in http://mail-index.netbsd.org/tech-pkg/2006/10/03/0002.html As a side effect, when bin-install fails to install a binary package, the package is still built from source, but not as a privileged user.
2006-09-09Rename variable MAKEFILE to MAKE_FILE, as suggested in PR 28392.obache1-2/+2
2006-08-09Drop .ORDER declarations since pkgsrc doesn't support "make -j ...".jlam2-4/+2
2006-08-09Only acquire the localbase lock after acquiring root privileges. Thisjlam1-3/+9
fixes "make install" using just-in-time su-to-root.
2006-08-04Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.rillig3-8/+17
Added two targets acquire-localbase-lock and release-localbase-lock, which mark the complete LOCALBASE directory as locked, so that multiple packages cannot run the install, deinstall or bin-install targets at the same time. The install target aquires locks in both WRKSRC and LOCALBASE, the other two targets only need the LOCALBASE lock, since they may be run without WRKSRC being present on the system. locking.mk must be included before tools.mk and the PKG_FAIL_REASON check.
2006-08-04Rewrote the header comment so that "bin-install" can be found by "bmakerillig1-4/+6
help".
2006-08-04Moved the bin-install target from bsd.pkg.mk to install/bin-install.mk.rillig1-0/+64
Added documentation. Added locking around the real installation.
2006-08-03When installing or deinstalling a package, it is not enough to lock therillig1-2/+2
WRKDIR against foreign processes. Instead, the PKG_DBDIR is locked, preventing other (pkgsrc) processes from modifying the set of installed packages while another one is doing that. This allows to use "bmake update" efficiently on multi-processor machines by just running it in four different package directories. Note that the pkg_add and pkg_delete tools may still interfere with this locking when they are directly run.
2006-07-27Whenever we invoke a recursive make, we need to ensure that the properjlam1-2/+2
environment ${PKGSRC_MAKE_ENV} is also passed along. Create a convenience variable RECURSIVE_MAKE that does exactly this and that can be used in place of MAKE when invoking make recursively. Use RECURSIVE_MAKE everywhere in pkgsrc/mk that we invoke make recursively.
2006-07-22Modify the barrier so that we always invoke the recursive make processjlam3-6/+6
when passing through the barrier. This ensures the PATH (passed via PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier. This fixes a bug in "interactive" pkgsrc use, where if you have no work directory and type "make build && make install", then the "install" step does not have a PATH set to include all the wrapper and tools directories.
2006-07-20The package directory path is "PKGPATH", not "PKG_PATH", which is usedjlam1-2/+2
by pkg_add(1).
2006-07-14Add a "bootstrap-register" target used specially by the bootstrap scriptjlam1-1/+10
to register packages that were installed by the bootstrap script.
2006-07-13* Add a new stage "bootstrap-depends" that happens before all otherjlam1-4/+3
stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS. The bootstrap-depends step works just like the normal depends step and honors the value of DEPENDS_TARGET. It's now possible to add dependencies solely to facilitate fetching the distfiles, e.g. BOOTSTRAP_DEPENDS+= curl-[0-9]*:../../www/curl * Teach the tools framework about ":bootstrap" as a tools modifier which indicates the tool should be added as a dependency via BOOTSTRAP_DEPENDS. * Add "digest" to the tools framework. * Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest before anything else. Get rid of unused "uptodate-digest" target and related digest version-checking code. * Finish the refactoring work: split checksum-related code out of bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum" target command list with a script that does all the real work. * Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private variables by prepending them with an underscore. Also, rename _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the makepatchsum target to allow that variable to contain a list of algorithms, all of which are used when creating the patch checksums for ${DISTINFO_FILE}.
2006-07-07Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are privatejlam3-19/+19
variables so there are no user-visible changes. This change just makes it a little easier to write for loops.
2006-07-07Make configure, install, and package barrier-aware even if NO_CONFIGURE,jlam1-2/+4
NO_INSTALL, or NO_PACKAGE are defined.
2006-07-06The cookie files are indirectly made using *-cookie targets, so verifyjlam1-1/+3
that they are never being created more than once by inserting a check into the *-cookie targets.
2006-07-05Flatten out recursive makes into a single re-invocation of make byjlam3-16/+28
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-05Make the check-vulnerable target more self-sufficient, by moving somejlam2-8/+9
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that check-vulnerable can be used as a source target. Make check-vulnerable a source target for every phase of the build workflow, which ensures that it is always run if the user starts a new phase from the command line. Fix the cookie-generation targets so that they don't append, only overwrite to the cookie file. This works around potential problems due to recursive makes. Move the cookie checks so that they surround the corresponding phase target. The presence of the cookie should now inform the make process to avoid doing any processing of phases that occur before the phase corresponding to the cookie.
2006-06-14Insert cookie checks into the "real-install" and "real-package" targets,jlam1-1/+3
which are invoked in recursive make calls for the "install" and "package" targets respectvely. These recursive make calls prevent the top-level make from seeing all of the targets and computing a full dependency graph, so it becomes possible for some targets to be invoked more than once. This change passes enough information along to the recursive make calls and ensures that the source targets for the real-* targets are only invoked once.
2006-06-10Restore missing ${SETENV} ${BUILD_ENV} that was dropped during the initialjlam1-2/+2
package system flavors commit.
2006-06-09Introduce the capability to gather all the warnings and errors thatjlam1-1/+2
are generated for a target and output them all at once at the conclusion of the target's invocation. The implementation is in bsd.pkg.error.mk, which defines a macro target "error-check" that will print out any non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR} and exit appropriately if there were errors. Convert some targets that were just long sequences of ${ERROR_MSG} or ${WARNING_MSG} within a single shell statement to use the new delayed error output via error-check. Modify the compiler "fail" wrappers for C++ and Fortran to be less verbose during invocation. Instead collect the warnings and only print them at the end of the completed phase, e.g. after "configure" and/or "build" completes.