Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2017 06:02:24 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r446867 - in head/ports-mgmt/pkg_jail: . files
Message-ID:  <201707290602.v6T62O74092531@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Sat Jul 29 06:02:24 2017
New Revision: 446867
URL: https://svnweb.freebsd.org/changeset/ports/446867

Log:
  - update to 1.92
  - fix LICENSE
  - rename README
  - move URL

Added:
  head/ports-mgmt/pkg_jail/files/README.txt
     - copied unchanged from r446866, head/ports-mgmt/pkg_jail/files/README
Deleted:
  head/ports-mgmt/pkg_jail/files/README
Modified:
  head/ports-mgmt/pkg_jail/Makefile
  head/ports-mgmt/pkg_jail/files/pkg_jail
  head/ports-mgmt/pkg_jail/files/pkg_update
  head/ports-mgmt/pkg_jail/pkg-descr

Modified: head/ports-mgmt/pkg_jail/Makefile
==============================================================================
--- head/ports-mgmt/pkg_jail/Makefile	Sat Jul 29 05:19:56 2017	(r446866)
+++ head/ports-mgmt/pkg_jail/Makefile	Sat Jul 29 06:02:24 2017	(r446867)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	pkg_jail
-PORTVERSION=	1.89
+PORTVERSION=	1.92
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# empty
 DISTFILES=	# empty
@@ -9,15 +9,14 @@ DISTFILES=	# empty
 MAINTAINER=	dinoex@FreeBSD.org
 COMMENT=	Manage your own package jail
 
-LICENSE=	BSD3CLAUSE NONE
-LICENSE_COMB=	multi
+LICENSE=	BSD3CLAUSE
 
 NO_BUILD=	yes
 NO_ARCH=	yes
 
 PLIST_FILES=	bin/pkg_jail bin/pkg_update \
 		man/man1/pkg_jail.1.gz man/man1/pkg_update.1.gz
-PORTDOCS=	README
+PORTDOCS=	README.txt
 LMAN1=		pkg_jail.1 pkg_update.1
 
 OPTIONS_DEFINE=	DOCS
@@ -31,11 +30,11 @@ do-install:
 
 do-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${FILESDIR}/README ${STAGEDIR}${DOCSDIR}/
+	${INSTALL_DATA} ${FILESDIR}/README.txt ${STAGEDIR}${DOCSDIR}/
 
 install-ports:
 	-${MKDIR} ${PORTSDIR}/local/update/data
-	${LN} -s ${FILESDIR}/README ${PORTSDIR}/local/update/
+	${LN} -s ${FILESDIR}/README.txt ${PORTSDIR}/local/update/
 	${LN} -s ${FILESDIR}/pkg_update ${PORTSDIR}/local/update/
 	${LN} -s ${FILESDIR}/pkg_jail ${PORTSDIR}/local/update/
 

Copied: head/ports-mgmt/pkg_jail/files/README.txt (from r446866, head/ports-mgmt/pkg_jail/files/README)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg_jail/files/README.txt	Sat Jul 29 06:02:24 2017	(r446867, copy of r446866, head/ports-mgmt/pkg_jail/files/README)
@@ -0,0 +1,198 @@
+#
+# /usr/ports/local/update/
+#
+#	Scripts reside here.
+#	install then here with:
+#	cd /usr/ports/ports-mgmt/pkg_jail && make install-ports
+#	/usr/ports should be shared with buildjail and hosts.
+#
+#
+#	Intended to run within a jailed System:
+#	---------------------------------------
+#
+#
+#	pkg_update update-ports
+#		Starts "make update" for the ports tree.
+#
+#
+#	pkg_update make-packages
+#		Builds a port and its dependencies in a clean /usr/local.
+#		You should not run this on a server with configuration.
+#		Existing packages are used.
+#		Extra files in "${PREFIX}" are detected and reported.
+#		The default list of ports is "data/make-packages.${hostname}"
+#
+#
+#	pkg_update clean-distfiles
+#		Checks all distinfo files and moves the disfiles not found
+#		to "/usr/ports/distfiles/Old/".
+#
+#
+#	pkg_update merge-distfiles
+#		Copy all disfiles found that do not yet exist on the master
+#		directory "/media/ports/distfiles/".
+#
+#
+#	pkg_update clean-packages
+#		Synopsis:
+#		Find obsolete packages and move them out of the way
+#
+#		Problem:
+#		Installation of a package with multiple dependencys.
+#		pkg_add installs the depended package, and its requirements.
+#		When the depended package has been updated,
+#		The packages that require this are no longer up to date.
+#
+#		Solution:
+#		Use pkg_info on each package and compare the versions
+#		with the new versions in the ports tree, if they don't
+#		match report it, and move it out of the "All" directory
+#		"/usr/ports/packages/All/" into a seperate directory
+#		"/usr/ports/packages/Old/" for later cleanup.
+#		Then remove all stale links to the moved packages.
+#
+#	pkg_update clean-openssl-packages
+#		Find packages that use openssl and move them out of the way
+#
+#	pkg_update full-update-jail
+#		do full update cycle
+#		1) "update-ports" to update the ports tree
+#		2) "clean-distfiles" to keep only current distfiles
+#		3) "clean-packages" to keep only good packages
+#		4) remove all old error logs
+#		5) "make-packages" to rebuild missing packages
+#
+#	pkg_update full-update-jail retry
+#		Skip "update-ports" and procced as above.
+#
+#
+#	clean-usr-lib.sh:
+#		Cleans the base system after installworld.
+#		move old libs to comapt, so old applications keep running,
+#		but new applications can only link to up-to-date libs.
+#
+#
+#
+#	Intended to everywhere:
+#	-----------------------
+#
+#	pkg_update fetch-distfiles
+#		Fetch distfiles for list of ports.
+#
+#	pkg_update fetch-recursive-distfiles
+#		Fetch distfiles for list of ports and their dependecies.
+#
+#	pkg_update show-extra-files
+#		list files in portsdir that are not updated by update-ports
+#
+#
+#
+#	Intended to run on a host:
+#	--------------------------
+#
+#	pkg_update dependency-update
+#		Try to fix as much dependecy problens in installed ports.
+#
+#	pkg_update fix-moved-ports
+#		Check installed packages for moved ports. Then register
+#		the new dir in the old installed package.
+#
+#	pkg_update add-packages
+#		Build a missing port and its missing dpendencies
+#		/usr/local is not deleted, on success the port is installed.
+#		Existing packages will be used.
+#
+#	pkg_update list-installed-ports
+#		List all installed ports.
+#
+#	pkg_update show-version-list
+#		List installed packages that are not in correct version
+#
+#	pkg_update show-packages
+#		List build packages or report missing for each port
+#		recorded in "data/install-packages.${hostname}".
+#
+#	pkg_update show-missing-installed
+#		List build packages or report missing for each port
+#		installed on this host.
+#
+#	pkg_update check-installed-ports
+#		Compare the list of installed ports with the list
+#		recorded in data/install-packages.${hostname}".
+#
+#	pkg_update check-update
+#		pkg_update check-installed-ports
+#		pkg_update show-missing-packages
+#		pkg_update show-missing-installed
+#
+#
+#
+#	Intended to update a host:
+#	--------------------------
+#
+#	pkg_update show-missing-packages
+#		Warn if no package is found for each port
+#		recorded in "data/install-packages.${hostname}"
+#
+#	pkg_update clean
+#		Clean all cached information.
+#
+#	pkg_update make-version-list
+#		Make new list of packages that are not in correct version
+#
+#	pkg_update make-deinstall-list
+#		Make new list of ports that are not in correct version
+#		and create a script "deinstall.${hostname}" to deinstall
+#		all the old ports and the dependend ports in order.
+#
+#	pkg_update check-reinstall
+#		For each package deleted by "make-deinstall-list" warn
+#		if no new package is found.
+#
+#	pkg_update reinstall
+#		For each package deleted by "make-deinstall-list" try
+#		to install the new package if it exists.
+#
+#	pkg_update install-packages
+#		For each port recorded in "data/install-packages.${hostname}"
+#		try to to install the new package if it exists.
+#
+#	pkg_update show-missing-reinstall
+#		For each port recorded from "make-deinstall-list" warn
+#		if no new package is found.
+#
+#	pkg_update make-easy-update
+#		Try to generate the ordered sequence of pkg_deinstall
+#		and pkg_add commands to update your old packages.
+#
+#	pkg_update replace-package
+#		Overwrite the installed package with a new one and
+#		register dependencies and dependant packages.
+#		Warning: Don't do this when the ABI of the this
+#		package or the ABI of its dependencies has changed.
+#
+#	pkg_update clean-reinstall
+#		For each port recorded from "make-deinstall-list",
+#		keep only the ports that have no package installed.
+#
+#	pkg_update deinstall-packages
+#		For each port recorded in "data/install-packages.${hostname}"
+#		try to to deinstall the installed port.
+#
+#
+#
+#	Files:
+#	------
+#
+#
+# /usr/ports/local/update/data/
+#
+#	Configuration files reside here.
+#	create your initial configuration for a build jail:
+#	pkg_update list-installed-ports \
+#		> /usr/ports/local/update/data/make-packages.jailname
+#
+# /usr/ports/local/update/log-${host}
+#
+#	Buildlogs and errorlogs reside here.
+#

Modified: head/ports-mgmt/pkg_jail/files/pkg_jail
==============================================================================
--- head/ports-mgmt/pkg_jail/files/pkg_jail	Sat Jul 29 05:19:56 2017	(r446866)
+++ head/ports-mgmt/pkg_jail/files/pkg_jail	Sat Jul 29 06:02:24 2017	(r446867)
@@ -2,6 +2,36 @@
 #
 #	$FreeBSD$
 #
+# Copyright (c) 2001-2017 by Dirk Meyer. All rights reserved.
+#   Im Grund 4, 34317 Habichtswald, Germany
+#   Email: dirk.meyer@dinoex.sub.org
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the author nor the names of any co-contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# -------------------------------------------------------------------------
+#
 . /etc/rc.subr
 #
 case "$0" in
@@ -200,12 +230,12 @@ pkg_jail_umount()
 		"${pkg_jail_dir}/dev" \
 
 	do
-		fstab=`fgrep "${dir}" /etc/fstab` 
+		fstab=`fgrep "${dir}" /etc/fstab`
 		if test -n "${fstab}"
 		then
 			continue
 		fi
-		mount=`mount | fgrep "${dir}"` 
+		mount=`mount | fgrep "${dir}"`
 		if test -n "${mount}"
 		then
 			umount "${dir}"

Modified: head/ports-mgmt/pkg_jail/files/pkg_update
==============================================================================
--- head/ports-mgmt/pkg_jail/files/pkg_update	Sat Jul 29 05:19:56 2017	(r446866)
+++ head/ports-mgmt/pkg_jail/files/pkg_update	Sat Jul 29 06:02:24 2017	(r446867)
@@ -1,11 +1,10 @@
 #!/bin/sh
-#	$Id: pkg_update,v 1.89 2016/03/19 10:56:41 cvs Exp $
+#	$Id: pkg_update,v 1.92 2017/07/29 05:50:19 cvs Exp $
 #	$FreeBSD$
 #
-# Copyright (c) 2001-2006
-#	by Dirk Meyer, All rights reserved.
-#	Im Grund 4, 34317 Habichtswald, Germany
-#	Email: dirk.meyer@dinoex.sub.org
+# Copyright (c) 2001-2017 by Dirk Meyer. All rights reserved.
+#   Im Grund 4, 34317 Habichtswald, Germany
+#   Email: dirk.meyer@dinoex.sub.org
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -353,6 +352,42 @@ run_pkg_info_requiredby() {
 	fi
 }
 
+dependency_is_good() {
+	if test ! -d "${fulldir}"
+	then
+		echo "Directory not found: ${fulldir}"
+		echo "Directory not found: ${fulldir}" >> ${tmpupdated}
+		return 1
+	fi
+	dir="${fulldir##${portsdir}/}"
+	dir="${dir##${localdir}/}"
+	if test "${dir}" = ""
+	then
+		echo "Directory bad: ${fulldir}"
+		echo "Directory bad: ${fulldir}" >> ${tmpupdated}
+		return 1
+	fi
+	pkgname=`cd ${fulldir} && make -V PKGNAME`
+	if run_pkg_installed
+	then
+		return 2
+	fi
+	pkgfile=`cd ${fulldir} && make -V PKGFILE`
+	if test -e ${pkgfile}
+	then
+		return 0
+	fi
+	noinstall=`cd "${fulldir}" && make -V NO_INSTALL`
+	case "${noinstall}" in
+	yes|YES)
+		return 2
+		;;
+	esac
+	echo "# missing package: ${pkgname} from ${dir}"
+	echo "# missing package: ${pkgname} from ${dir}" >> ${tmpupdated}
+	return 3
+}
+
 # check dependencies and decides if a ports needs to be rebuild
 # Usage: port_uptodate show
 # Usage: port_uptodate make
@@ -383,25 +418,19 @@ port_uptodate() {
 		mainpkg="${pkgname}"
 		for=""
 		found=""
-		lastpkgfile=""
+		mainpkgfile=""
 		rm -f "${tmpupdated}" "${tmpfailed}"
-		while test "${found}" = ""
-		do
-			if run_pkg_installed
-			then
-				found="1"
-				break
-			fi
+		if run_pkg_installed
+		then
+			found="1"
+		else
 			if test -e ${pkgfile}
 			then
 				echo "pkg_add ${pkgfile}"
-				lastpkgfile="${pkgfile}"
+				mainpkgfile="${pkgfile}"
 				found="1"
-				break
 			fi
-			#
-			break
-		done
+		fi
 		;;
 	*)
 		echo "port_uptodate: bad arguments" >&2
@@ -425,21 +454,15 @@ port_uptodate() {
 	) |
 	sed -f "${depends}"`
 	do
-		dir="${fulldir##${portsdir}/}"
-		dir="${dir##${localdir}/}"
-		if test "${dir}" = ""
-		then
-			continue
-		fi
-		log=`echo "${dir}" | sed -e 's=/=,=g'`
-		pkgname=`cd ${fulldir} && make -V PKGNAME`
-		if run_pkg_installed
-		then
-			continue
-		fi
-		pkgfile=`cd ${fulldir} && make -V PKGFILE`
-		if test -e ${pkgfile}
-		then
+		dir=""
+		pkgname=""
+		pkgfile=""
+		dependency_is_good "$1"
+		err="${?}"
+		case "${err}" in
+		0) # exist
+			echo "dependency_is_good"
+			log=`echo "${dir}" | sed -e 's=/=,=g'`
 			case "$1" in
 			xshow*)
 				if test ! -f "${logdir}/show,${log}"
@@ -463,12 +486,12 @@ port_uptodate() {
 				;;
 			esac
 
-			if test "${lastpkgfile}" != ""
+			if test "${mainpkgfile}" != ""
 			then
-				if test "${pkgfile}" -nt "${lastpkgfile}"
+				if test "${pkgfile}" -nt "${mainpkgfile}"
 				then
-					echo "# dependend package newer: ${pkgfile} ${lastpkgfile}"
-					echo "# dependend package newer: ${pkgfile} ${lastpkgfile}" >> ${tmpupdated}
+					echo "# dependend package newer: ${pkgfile} ${mainpkgfile}"
+					echo "# dependend package newer: ${pkgfile} ${mainpkgfile}" >> ${tmpupdated}
 				fi
 			fi
 			echo "#existing package:	${pkgname} from ${dir}${for}"
@@ -487,28 +510,30 @@ port_uptodate() {
 				;;
 			esac
 			continue
-		fi
-		noinstall=`cd "${fulldir}" && make -V NO_INSTALL`
-		case "${noinstall}" in
-		yes|YES)
-			continue
 			;;
-		esac
-		echo "# missing package: ${pkgname} from ${dir}"
-		echo "# missing package: ${pkgname} from ${dir}" >> ${tmpupdated}
-		case "$1" in
-		make*)
-			echo "cd ${fulldir} && port_uptodate $1+"
-			( cd ${fulldir} && port_uptodate $1+ )
-			if run_pkg_installed
-			then
-				continue
-			fi
-			echo "=== package ${pkgname} error dependency" >&2
-			echo "=== package ${pkgname} error dependency" >> ${tmpfailed}
-			echo "=== package ${pkgname} error dependency" >> ${logdir}/err,${log}
+		1) # abort
 			break
 			;;
+		2) # installed
+			continue
+			;;
+		3) # missing
+			log=`echo "${dir}" | sed -e 's=/=,=g'`
+			case "$1" in
+			make*)
+				echo "cd ${fulldir} && port_uptodate $1+"
+				( cd ${fulldir} && port_uptodate $1+ )
+				if run_pkg_installed
+				then
+					continue
+				fi
+				echo "=== package ${pkgname} error dependency" >&2
+				echo "=== package ${pkgname} error dependency" >> ${tmpfailed}
+				echo "=== package ${pkgname} error dependency" >> ${logdir}/err,${log}
+				break
+				;;
+			esac
+			;;
 		esac
 	done
 	pkgname="${mainpkg}"
@@ -557,6 +582,7 @@ port_uptodate() {
 				then
 					mv -f "${logdir}/build,${log}" "${logdir}/last,${log}"
 				fi
+				( cd ${base} && env ${pkg_env} make stage-qa check-orphans check-sanity </dev/null >> "${logdir}/err,${log}" 2>&1 )
 				mv -f "${logdir}/err,${log}" "${logdir}/build,${log}"
 				( cd ${base} && env ${pkg_env} make clean NOCLEANDEPENDS=yes )
 				if run_pkg_installed
@@ -1431,10 +1457,10 @@ dependency_update() {
 					echo "${find} is required by ${neu} (not installed)"
 					if test -f "${edit}.bak"
 					then
-						grep -v "^${neu}$" "${edit}.bak" > "${edit}.neu" 
+						grep -v "^${neu}$" "${edit}.bak" > "${edit}.neu"
 						mv -f "${edit}.neu" "${edit}.bak"
 					else
-						grep -v "^${neu}$" "${edit}" > "${edit}.bak" 
+						grep -v "^${neu}$" "${edit}" > "${edit}.bak"
 					fi
 				fi
 			done
@@ -1526,7 +1552,7 @@ fix_moved_ports() {
 #
 # check recursive for deinstall
 delete_dependent_package() {
-	local installed 
+	local installed
 	installed="${1}"
 	run_pkg_info_requiredby "${installed}" |
 	while read requiredby
@@ -1846,7 +1872,7 @@ easy_required_package() {
 		touch "${inrequired}/${pkgname}"
 		if test ! -d "${pkg_dbdir}/${pkgname}"
 		then
-			echo "# missing dependency ${pkgname}" 
+			echo "# missing dependency ${pkgname}"
 			touch "${failed}/${pkgname}"
 			set_fail_count up
 		fi
@@ -2439,7 +2465,7 @@ show-missing-reinstall)
 			continue
 		fi
 		pkgname=`cd "${portsdir}/${movedto}" && make -V PKGNAME`
-		if test -d "${pkg_dbdir}/${pkgname}" 
+		if test -d "${pkg_dbdir}/${pkgname}"
 		then
 			echo "new     ${pkgname} installed"
 			continue
@@ -2489,7 +2515,7 @@ clean-reinstall)
 			continue
 		fi
 		pkgname=`cd "${portsdir}/${movedto}" && make -V PKGNAME`
-		if test -d "${pkg_dbdir}/${pkgname}" 
+		if test -d "${pkg_dbdir}/${pkgname}"
 		then
 			remove_from_file "${todolist}" "${origin}"
 			continue
@@ -2510,7 +2536,12 @@ clean-reinstall)
 	done
 	;;
 show-missing-installed)
-	/bin/sh "${0}" show-missing-packages `run_pkg_info_origin_all`
+	if test "${pkgng}" = ""
+	then
+		/bin/sh "${0}" show-missing-packages `run_pkg_info_origin_all`
+	else
+		env ${pkg_env} ${local_env} pkg version -qo -Rl '?'
+	fi
 	;;
 reinstall)
 	exec /bin/sh "${0}" install-packages "${todolist}"

Modified: head/ports-mgmt/pkg_jail/pkg-descr
==============================================================================
--- head/ports-mgmt/pkg_jail/pkg-descr	Sat Jul 29 05:19:56 2017	(r446866)
+++ head/ports-mgmt/pkg_jail/pkg-descr	Sat Jul 29 06:02:24 2017	(r446867)
@@ -8,4 +8,4 @@ is served to the production systems and desktops.
 On a system you can update installed ports with
 the clean build packages from the build system.
 
-WWW: https://people.freebsd.org/~dinoex/batch/README
+WWW: https://people.freebsd.org/~dinoex/batch/README.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707290602.v6T62O74092531>