Renamed some more flavor-specific targets to have the form _flavor-*.
Split check-vulnerable into a general an a flavor-specific part, for consistence with all the other targets.
This commit is contained in:
parent
18851a0799
commit
8dd9cf3d41
11 changed files with 82 additions and 148 deletions
|
@ -1,17 +1,22 @@
|
|||
# $NetBSD: check-vulnerable.mk,v 1.3 2006/07/05 09:08:35 jlam Exp $
|
||||
|
||||
###########################################################################
|
||||
### check-vulnerable (PRIVATE, override)
|
||||
###########################################################################
|
||||
### check-vulnerable checks for vulnerabilities in the package. This
|
||||
### should be overridden per package system flavor.
|
||||
# $NetBSD: check-vulnerable.mk,v 1.4 2007/03/09 00:39:54 rillig Exp $
|
||||
#
|
||||
.PHONY: check-vulnerable
|
||||
.if !target(check-vulnerable)
|
||||
check-vulnerable:
|
||||
. if defined(ALLOW_VULNERABLE_PACKAGES)
|
||||
# Public targets:
|
||||
#
|
||||
# check-vulnerable:
|
||||
# Checks for vulnerabilities in the package.
|
||||
#
|
||||
|
||||
.if defined(ALLOW_VULNERABLE_PACKAGES)
|
||||
check-vulnerable: .PHONY
|
||||
@${DO_NADA}
|
||||
. else
|
||||
@${PHASE_MSG} "Skipping vulnerability checks."
|
||||
. endif
|
||||
check-vulnerable: .PHONY _flavor-check-vulnerable
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
# A package flavor does not need to implement this target, so provide a
|
||||
# default implementation.
|
||||
.if !target(_flavor-check-vulnerable)
|
||||
_flavor-check-vulnerable:
|
||||
@${PHASE_MSG} "Skipping vulnerability checks."
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.depends.mk,v 1.10 2007/03/02 05:58:34 wiz Exp $
|
||||
# $NetBSD: bsd.depends.mk,v 1.11 2007/03/09 00:39:54 rillig Exp $
|
||||
#
|
||||
# This Makefile fragment is included by bsd.pkg.mk and provides all
|
||||
# variables and targets related to dependencies.
|
||||
|
@ -77,6 +77,9 @@ depends-clean:
|
|||
### depends-cookie creates the depends "cookie" state file. This should
|
||||
### be overridden per package system flavor.
|
||||
###
|
||||
### XXX: Why? The other cookies are also created by pkgsrc, not by the
|
||||
### flavor.
|
||||
###
|
||||
.PHONY: depends-cookie
|
||||
.if !target(depends-cookie)
|
||||
depends-cookie:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: depends.mk,v 1.11 2007/01/02 17:23:41 rillig Exp $
|
||||
# $NetBSD: depends.mk,v 1.12 2007/03/09 00:39:54 rillig Exp $
|
||||
|
||||
######################################################################
|
||||
### depends (PUBLIC)
|
||||
|
@ -39,7 +39,7 @@ ${_COOKIE.depends}: real-depends
|
|||
###
|
||||
_REAL_DEPENDS_TARGETS+= depends-message
|
||||
_REAL_DEPENDS_TARGETS+= pre-depends-hook
|
||||
_REAL_DEPENDS_TARGETS+= depends-install
|
||||
_REAL_DEPENDS_TARGETS+= _flavor-install-dependencies
|
||||
_REAL_DEPENDS_TARGETS+= depends-cookie
|
||||
_REAL_DEPENDS_TARGETS+= error-check
|
||||
|
||||
|
@ -50,24 +50,11 @@ real-depends: ${_REAL_DEPENDS_TARGETS}
|
|||
depends-message:
|
||||
@${PHASE_MSG} "Installing dependencies for ${PKGNAME}"
|
||||
|
||||
######################################################################
|
||||
### depends-install (PRIVATE, override)
|
||||
######################################################################
|
||||
### depends-install checks that all dependencies are installed, and will
|
||||
### install any missing dependencies. This should be overridden per
|
||||
### package system flavor.
|
||||
###
|
||||
.if !target(depends-install)
|
||||
.PHONY: depends-install
|
||||
depends-install:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
######################################################################
|
||||
### pre-depends-hook (PRIVATE, override, hook)
|
||||
######################################################################
|
||||
### pre-depends-hook is a generic hook target that is run just before
|
||||
### dependencies are installed for depends-install.
|
||||
### dependencies are installed for _flavor-install-dependencies.
|
||||
###
|
||||
.PHONY: pre-depends-hook
|
||||
pre-depends-hook:
|
||||
|
|
|
@ -45,12 +45,12 @@ XXX: Why isn't this variable in the previous list?
|
|||
|
||||
The following make targets must be implemented:
|
||||
|
||||
* check-vulnerable
|
||||
* deinstall-pkg
|
||||
* _flavor-check-vulnerable
|
||||
* _flavor-deinstall
|
||||
* show-depends
|
||||
* depends-install
|
||||
* _flavor-install-dependencies
|
||||
* bootstrap-depends
|
||||
* register-pkg
|
||||
* _flavor-register
|
||||
* tarup (XXX: This doesn't sound like a target that should be defined
|
||||
here.)
|
||||
* tarup-pkg
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
# $NetBSD: check.mk,v 1.2 2006/07/05 09:08:35 jlam Exp $
|
||||
# $NetBSD: check.mk,v 1.3 2007/03/09 00:39:54 rillig Exp $
|
||||
#
|
||||
|
||||
######################################################################
|
||||
### check-vulnerable (PUBLIC, pkgsrc/mk/check/check.mk)
|
||||
######################################################################
|
||||
### check-vulnerable checks for any vulnerabilities in the package
|
||||
### without needing audit-packages to be installed.
|
||||
###
|
||||
### XXX This should really be invoking audit-packages directly. Having
|
||||
### XXX a separately maintained piece of code that inspects the
|
||||
### XXX vulnerabilities database is poor.
|
||||
###
|
||||
.PHONY: check-vulnerable
|
||||
check-vulnerable:
|
||||
.if defined(ALLOW_VULNERABLE_PACKAGES)
|
||||
@${DO_NADA}
|
||||
.else
|
||||
# _flavor-check-vulnerable:
|
||||
# Checks for known vulnerabilities in the package without needing
|
||||
# audit-packages to be installed.
|
||||
#
|
||||
# XXX: This should really be invoking audit-packages directly.
|
||||
# Having separately maintained piece of code that inspects the
|
||||
# vulnerabilities database is poor.
|
||||
#
|
||||
_flavor-check-vulnerable: .PHONY
|
||||
${_PKG_SILENT}${_PKG_DEBUG} \
|
||||
vulnfile=${PKGVULNDIR:Q}/pkg-vulnerabilities; \
|
||||
if ${TEST} ! -f "$$vulnfile"; then \
|
||||
|
@ -51,4 +46,3 @@ check-vulnerable:
|
|||
${ERROR_MSG} "Define ALLOW_VULNERABLE_PACKAGES if this package is absolutely essential"; \
|
||||
${FALSE}; \
|
||||
fi
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: deinstall.mk,v 1.2 2006/06/05 17:21:55 jlam Exp $
|
||||
# $NetBSD: deinstall.mk,v 1.3 2007/03/09 00:39:55 rillig Exp $
|
||||
|
||||
# Set the appropriate flags to pass to pkg_delete(1) based on the value
|
||||
# of DEINSTALLDEPENDS (see pkgsrc/mk/install/deinstall.mk).
|
||||
|
@ -23,12 +23,13 @@ _PKG_ARGS_DEINSTALL+= -N -f # update w/o removing any files
|
|||
. endif
|
||||
.endif
|
||||
|
||||
######################################################################
|
||||
### deinstall-pkg (PRIVATE, pkgsrc/mk/install/deinstall.mk)
|
||||
######################################################################
|
||||
### deinstall-pkg removes the package from the system.
|
||||
###
|
||||
deinstall-pkg:
|
||||
# _flavor-deinstall:
|
||||
# Removes a package from the system.
|
||||
#
|
||||
# See also:
|
||||
# deinstall
|
||||
#
|
||||
_flavor-deinstall:
|
||||
${_PKG_SILENT}${_PKG_DEBUG} \
|
||||
found="`${PKG_INFO} -e \"${PKGNAME}\" || ${TRUE}`"; \
|
||||
case "$$found" in \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: depends.mk,v 1.21 2007/03/08 15:38:47 rillig Exp $
|
||||
# $NetBSD: depends.mk,v 1.22 2007/03/09 00:39:55 rillig Exp $
|
||||
|
||||
_DEPENDS_FILE= ${WRKDIR}/.depends
|
||||
_REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \
|
||||
|
@ -64,13 +64,10 @@ ${_DEPENDS_FILE}:
|
|||
done >> ${.TARGET}.tmp
|
||||
${RUN} ${MV} ${.TARGET}.tmp ${.TARGET}
|
||||
|
||||
######################################################################
|
||||
### depends-install (PRIVATE, pkgsrc/mk/depends/depends.mk)
|
||||
######################################################################
|
||||
### depends-install installs any missing dependencies.
|
||||
###
|
||||
.PHONY: depends-install
|
||||
depends-install: ${_DEPENDS_FILE}
|
||||
# _flavor-install-dependencies:
|
||||
# Installs any missing dependencies.
|
||||
#
|
||||
_flavor-install-dependencies: .PHONY ${_DEPENDS_FILE}
|
||||
${RUN} \
|
||||
while read type pattern dir rest; do \
|
||||
{ [ "$$dir" ] && [ ! "$$rest" ]; } \
|
||||
|
|
|
@ -1,13 +1,22 @@
|
|||
# $NetBSD: install.mk,v 1.8 2006/07/07 21:24:28 jlam Exp $
|
||||
# $NetBSD: install.mk,v 1.9 2007/03/09 00:39:55 rillig Exp $
|
||||
#
|
||||
# _flavor-check-conflicts:
|
||||
# Checks for conflicts between the package and installed packages.
|
||||
#
|
||||
# XXX: Needs WRKDIR.
|
||||
#
|
||||
# _flavor-check-installed:
|
||||
# Checks if the package (or an older version of it) is already
|
||||
# installed on the system.
|
||||
#
|
||||
# XXX: Needs WRKDIR.
|
||||
#
|
||||
# _flavor-register:
|
||||
# Populates the package database with the appropriate entries to
|
||||
# register the package as being installed on the system.
|
||||
#
|
||||
|
||||
######################################################################
|
||||
### install-check-conflicts (PRIVATE, pkgsrc/mk/install/install.mk)
|
||||
######################################################################
|
||||
### install-check-conflicts checks for conflicts between the package
|
||||
### and and installed packages.
|
||||
###
|
||||
.PHONY: install-check-conflicts
|
||||
install-check-conflicts: error-check
|
||||
_flavor-check-conflicts: .PHONY error-check
|
||||
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${WRKDIR}/.CONFLICTS
|
||||
.for _conflict_ in ${CONFLICTS}
|
||||
${_PKG_SILENT}${_PKG_DEBUG} \
|
||||
|
@ -26,14 +35,7 @@ install-check-conflicts: error-check
|
|||
${ECHO} "Please remove conflicts first with pkg_delete(1)."; \
|
||||
${RM} -f ${WRKDIR}/.CONFLICTS
|
||||
|
||||
######################################################################
|
||||
### install-check-installed (PRIVATE, pkgsrc/mk/install/install.mk)
|
||||
######################################################################
|
||||
### install-check-installed checks if the package (perhaps an older
|
||||
### version) is already installed on the system.
|
||||
###
|
||||
.PHONY: install-check-installed
|
||||
install-check-installed: error-check
|
||||
_flavor-check-installed: .PHONY error-check
|
||||
${_PKG_SILENT}${_PKG_DEBUG} \
|
||||
found="`${_PKG_BEST_EXISTS} ${PKGWILDCARD:Q} || ${TRUE}`"; \
|
||||
${TEST} -n "$$found" || exit 0; \
|
||||
|
@ -47,20 +49,13 @@ install-check-installed: error-check
|
|||
${ECHO} " - \"${MAKE} replace\" to replace only the package without"; \
|
||||
${ECHO} " re-linking dependencies, risking various problems."
|
||||
|
||||
######################################################################
|
||||
### register-pkg (PRIVATE, pkgsrc/mk/install/install.mk)
|
||||
######################################################################
|
||||
### register-pkg populates the package database with the appropriate
|
||||
### entries to register the package as being installed on the system.
|
||||
###
|
||||
_REGISTER_DEPENDENCIES= \
|
||||
${SETENV} PKG_DBDIR=${_PKG_DBDIR:Q} \
|
||||
AWK=${TOOLS_AWK:Q} \
|
||||
PKG_ADMIN=${PKG_ADMIN_CMD:Q} \
|
||||
${SH} ${PKGSRCDIR}/mk/flavor/pkg/register-dependencies
|
||||
|
||||
.PHONY: register-pkg
|
||||
register-pkg: generate-metadata ${_COOKIE.depends}
|
||||
_flavor-register: .PHONY generate-metadata ${_COOKIE.depends}
|
||||
@${STEP_MSG} "Registering installation for ${PKGNAME}"
|
||||
${_PKG_SILENT}${_PKG_DEBUG}${RM} -fr ${_PKG_DBDIR}/${PKGNAME}
|
||||
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_PKG_DBDIR}/${PKGNAME}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: metadata.mk,v 1.14 2007/03/02 09:08:33 wiz Exp $
|
||||
# $NetBSD: metadata.mk,v 1.15 2007/03/09 00:39:55 rillig Exp $
|
||||
|
||||
######################################################################
|
||||
### The targets below are all PRIVATE.
|
||||
|
@ -233,7 +233,7 @@ ${_MESSAGE_FILE}: ${MESSAGE_SRC}
|
|||
# PKGSRC_MESSAGE_RECIPIENTS.
|
||||
#
|
||||
.PHONY: install-display-message
|
||||
register-pkg: install-display-message
|
||||
_flavor-register: install-display-message
|
||||
install-display-message: ${_MESSAGE_FILE}
|
||||
@${STEP_MSG} "Please note the following:"
|
||||
@${ECHO_MSG} ""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: deinstall.mk,v 1.7 2006/11/03 08:04:06 joerg Exp $
|
||||
# $NetBSD: deinstall.mk,v 1.8 2007/03/09 00:39:55 rillig Exp $
|
||||
|
||||
# DEINSTALLDEPENDS controls whether dependencies and dependents are also
|
||||
# removed when a package is de-installed. The valid values are:
|
||||
|
@ -22,7 +22,7 @@ deinstall: su-target
|
|||
.endif
|
||||
|
||||
_SU_DEINSTALL_TARGETS= acquire-deinstall-lock
|
||||
_SU_DEINSTALL_TARGETS+= deinstall-pkg
|
||||
_SU_DEINSTALL_TARGETS+= _flavor-deinstall
|
||||
_SU_DEINSTALL_TARGETS+= release-deinstall-lock
|
||||
.if ${_USE_DESTDIR} == "no"
|
||||
_SU_DEINSTALL_TARGETS+= install-clean
|
||||
|
@ -45,14 +45,3 @@ MAKEFLAGS.su-deinstall= DEINSTALLDEPENDS=${DEINSTALLDEPENDS}
|
|||
.if !target(reinstall)
|
||||
reinstall: install-clean install
|
||||
.endif
|
||||
|
||||
######################################################################
|
||||
### deinstall-pkg (PRIVATE, override)
|
||||
######################################################################
|
||||
### deinstall-pkg removes the package from the system. This should
|
||||
### be overridden per package system flavor.
|
||||
###
|
||||
.if !target(deinstall-pkg)
|
||||
deinstall-pkg:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: install.mk,v 1.35 2007/03/02 09:08:33 wiz Exp $
|
||||
# $NetBSD: install.mk,v 1.36 2007/03/09 00:39:55 rillig Exp $
|
||||
#
|
||||
# This file provides the code for the "install" phase.
|
||||
#
|
||||
|
@ -138,8 +138,8 @@ release-install-localbase-lock: release-localbase-lock
|
|||
_INSTALL_ALL_TARGETS+= acquire-install-localbase-lock
|
||||
.endif
|
||||
.if ${_USE_DESTDIR} == "no"
|
||||
_INSTALL_ALL_TARGETS+= install-check-conflicts
|
||||
_INSTALL_ALL_TARGETS+= install-check-installed
|
||||
_INSTALL_ALL_TARGETS+= _flavor-check-conflicts
|
||||
_INSTALL_ALL_TARGETS+= _flavor-check-installed
|
||||
.endif
|
||||
_INSTALL_ALL_TARGETS+= install-check-umask
|
||||
.if empty(CHECK_FILES:M[nN][oO]) && !empty(CHECK_FILES_SUPPORTED:M[Yy][Ee][Ss])
|
||||
|
@ -165,7 +165,7 @@ _INSTALL_ALL_TARGETS+= check-files-post
|
|||
_INSTALL_ALL_TARGETS+= post-install-script
|
||||
.endif
|
||||
.if ${_USE_DESTDIR} == "no"
|
||||
_INSTALL_ALL_TARGETS+= register-pkg
|
||||
_INSTALL_ALL_TARGETS+= _flavor-register
|
||||
.endif
|
||||
_INSTALL_ALL_TARGETS+= privileged-install-hook
|
||||
.if ${_USE_DESTDIR} != "user-destdir"
|
||||
|
@ -181,32 +181,6 @@ install-all: su-install-all
|
|||
. endif
|
||||
su-install-all: ${_INSTALL_ALL_TARGETS}
|
||||
|
||||
######################################################################
|
||||
### install-check-conflicts (PRIVATE, override)
|
||||
######################################################################
|
||||
### install-check-conflicts check for conflicts between the package and
|
||||
### any installed packages. This should be overridden per package
|
||||
### system flavor.
|
||||
###
|
||||
.PHONY: install-check-conflicts
|
||||
.if !target(install-check-conflicts)
|
||||
install-check-conflicts:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
######################################################################
|
||||
### install-check-installed (PRIVATE, override)
|
||||
######################################################################
|
||||
### install-check-installed checks if the package (perhaps an older
|
||||
### version) is already installed on the system. This should be
|
||||
### overridden per package system flavor.
|
||||
###
|
||||
.PHONY: install-check-installed
|
||||
.if !target(install-check-installed)
|
||||
install-check-installed:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
######################################################################
|
||||
### install-check-umask (PRIVATE)
|
||||
######################################################################
|
||||
|
@ -352,17 +326,6 @@ install-doc-handling: plist
|
|||
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${PLIST} | ${GREP} -v "^@" | \
|
||||
${EGREP} ${_PLIST_REGEXP.man:Q} | ${_DOC_COMPRESS}
|
||||
|
||||
######################################################################
|
||||
### register-pkg (PRIVATE, override)
|
||||
######################################################################
|
||||
### register-pkg registers the package as being installed on the system.
|
||||
###
|
||||
.PHONY: register-pkg
|
||||
.if !target(register-pkg)
|
||||
register-pkg:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
privileged-install-hook: .PHONY
|
||||
@${DO_NADA}
|
||||
|
||||
|
@ -381,5 +344,5 @@ install-clean: package-clean check-clean
|
|||
### bootstrap-register registers "bootstrap" packages that are installed
|
||||
### by the pkgsrc/bootstrap/bootstrap script.
|
||||
###
|
||||
bootstrap-register: register-pkg clean
|
||||
bootstrap-register: _flavor-register clean
|
||||
@${DO_NADA}
|
||||
|
|
Loading…
Reference in a new issue