Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 06:00:07 +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: r372430 - in head/ports-mgmt/pkg_jail: . files
Message-ID:  <201411110600.sAB607CZ055818@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Tue Nov 11 06:00:06 2014
New Revision: 372430
URL: https://svnweb.freebsd.org/changeset/ports/372430
QAT: https://qat.redports.org/buildarchive/r372430/

Log:
  - update to 1.79
  - use new jail syntax
  - ease migration to pkg

Modified:
  head/ports-mgmt/pkg_jail/Makefile
  head/ports-mgmt/pkg_jail/files/pkg_jail   (contents, props changed)
  head/ports-mgmt/pkg_jail/files/pkg_update
  head/ports-mgmt/pkg_jail/files/pkg_update.1

Modified: head/ports-mgmt/pkg_jail/Makefile
==============================================================================
--- head/ports-mgmt/pkg_jail/Makefile	Tue Nov 11 00:08:53 2014	(r372429)
+++ head/ports-mgmt/pkg_jail/Makefile	Tue Nov 11 06:00:06 2014	(r372430)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	pkg_jail
-PORTVERSION=	1.78
+PORTVERSION=	1.79
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# empty
 DISTFILES=	# empty

Modified: head/ports-mgmt/pkg_jail/files/pkg_jail
==============================================================================
--- head/ports-mgmt/pkg_jail/files/pkg_jail	Tue Nov 11 00:08:53 2014	(r372429)
+++ head/ports-mgmt/pkg_jail/files/pkg_jail	Tue Nov 11 06:00:06 2014	(r372430)
@@ -167,7 +167,11 @@ pkg_jail_start()
 	pkg_jail_create_devfs
 	pkg_jail_create_jail_mount "${pkg_jail_dir}"
 	sysctl security.jail.sysvipc_allowed=1
-	/usr/sbin/jail -n "${pkg_jail_short}" "${pkg_jail_dir}" "${pkg_jail_hostname}" "${pkg_jail_ip}" /bin/sh /etc/rc
+	/usr/sbin/jail -c name="${pkg_jail_short}" path="${pkg_jail_dir}" \
+		host.hostname="${pkg_jail_hostname}" \
+		allow.sysvipc allow.raw_sockets \
+		ip4.addr="${pkg_jail_ip}"\
+		command=/bin/sh /etc/rc
 }
 pkg_jail_status()
 {
@@ -215,8 +219,11 @@ pkg_jail_init()
 		pkg_jail_setup
 		pkg_jail_create_devfs
 		pkg_jail_create_jail_mount "${pkg_jail_dir}"
-		/usr/sbin/jail -n "${pkg_jail_short}" "${pkg_jail_dir}" "${pkg_jail_hostname}" "${pkg_jail_ip}" \
-			/bin/sh -c "cd /usr/ports/ports-mgmt/pkg_jail && make install-ports"
+		/usr/sbin/jail -c name="${pkg_jail_short}" path="${pkg_jail_dir}" \
+			host.hostname="${pkg_jail_hostname}" \
+			allow.sysvipc allow.raw_sockets \
+			ip4.addr="${pkg_jail_ip}"\
+			command=/bin/sh -c "cd /usr/ports/ports-mgmt/pkg_jail && make install-ports"
 		pkg_jail_umount
 	fi
 }
@@ -227,7 +234,11 @@ pkg_jail_shell()
 		echo "Shell in jail-${pkg_jail_hostname}-${pkg_jail_ip}"
 		pkg_jail_create_devfs
 		pkg_jail_create_jail_mount "${pkg_jail_dir}"
-		/usr/sbin/jail -n "${pkg_jail_short}" "${pkg_jail_dir}" "${pkg_jail_hostname}" "${pkg_jail_ip}" /bin/csh
+		/usr/sbin/jail -c name="${pkg_jail_short}" path="${pkg_jail_dir}" \
+			host.hostname="${pkg_jail_hostname}" \
+			allow.sysvipc allow.raw_sockets \
+			ip4.addr="${pkg_jail_ip}"\
+			command=/bin/csh
 		pkg_jail_umount
 	fi
 }

Modified: head/ports-mgmt/pkg_jail/files/pkg_update
==============================================================================
--- head/ports-mgmt/pkg_jail/files/pkg_update	Tue Nov 11 00:08:53 2014	(r372429)
+++ head/ports-mgmt/pkg_jail/files/pkg_update	Tue Nov 11 06:00:06 2014	(r372430)
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$Id: pkg_update,v 1.78 2014/09/05 07:42:04 cvs Exp $
+#	$Id: pkg_update,v 1.79 2014/10/27 05:32:25 cvs Exp $
 #	$FreeBSD$
 #
 # Copyright (c) 2001-2006
@@ -2071,11 +2071,15 @@ nowarn="COMMENT=0 CATEGORIES=0 PORTVERSI
 portsdir=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PORTSDIR`
 pkg_dbdir=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PKG_DBDIR`
 packages=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PACKAGES`
-if test -e /usr/sbin/pkg
+pkgng="yes"
+if test ! -e /usr/sbin/pkg
 then
-	pkgng="yes"
-else
 	pkgng=""
+else
+	if test ! -e /var/db/pkg/local.sqlite
+	then
+		pkgng=""
+	fi
 fi
 quiet_mkdir "${pkginfo_cache}"
 #
@@ -2107,6 +2111,10 @@ make-packages)
 			make_packages_in_dir "${i}"
 		fi
 	done
+	if test "${pkgng}" != ""
+	then
+		pkg repo "${packages}/All"
+	fi
 	;;
 add-packages)
 	shift
@@ -2542,12 +2550,24 @@ check-update)
 	next_target "${@}"
 	;;
 update-pkg)
-	cd "${portsdir}/ports-mgmt/pkg" && make clean deinstall PREFIX=/usr/pkgng package install
+	defaultdata="${localdir}/data/make-packages.${hostname}"
+	if test ! -f "${defaultdata}"
+	then
+		echo "!!WARNNING!! Such a file should only exist for your build jail" >&2
+		echo "!!WARNNING!! This will uninstall all packages." >&2
+		echo "!!WARNNING!! This will delete your config in /usr/local." >&2
+		exit 64
+	fi
+	pkg delete -y -a -f
+	/etc/rc.d/ldconfig start
+	cd "${portsdir}/ports-mgmt/pkg" && make clean deinstall PREFIX=/usr/pkgng PKGNAMESUFFIX=-pkgng package install
 	if test ! -h /usr/sbin/pkg
 	then
 		mv -f /usr/sbin/pkg /usr/sbin/pkg.orig
 		ln -s "${pkg_prefix}/sbin/pkg" /usr/sbin/pkg
 	fi
+	cd "${portsdir}/ports-mgmt/pkg" && make clean package install
+	pkg delete -y -f pkg
 	;;
 *)
 	usage

Modified: head/ports-mgmt/pkg_jail/files/pkg_update.1
==============================================================================
--- head/ports-mgmt/pkg_jail/files/pkg_update.1	Tue Nov 11 00:08:53 2014	(r372429)
+++ head/ports-mgmt/pkg_jail/files/pkg_update.1	Tue Nov 11 06:00:06 2014	(r372430)
@@ -10,9 +10,8 @@ pkg_update \- Easy handling of jailed pa
 is a script to handle an clean jail for package-builds.
 .SH ARGUMENTS
 .TP
-.B cvsup
-Installs a copy of cvsup-without-gui package and start
-"make update" for the ports tree.
+.B update-ports
+Start "make update" for the ports tree.
 .TP
 .B make-packages
 Builds a port and its dependencies in a clean /usr/local.
@@ -37,13 +36,13 @@ Find packages that use openssl and move 
 .TP
 .B full-update-jail
 Do full update cycle:
-1. "cvsup" to update the ports tree
+1. "update-ports" to update the ports tree
 2. "clean-packages" to keep only good packages
 3. remove all old error logs
 4. "make-packages" to rebuild missing packages
 .TP
 .B full-update-jail retry
-Skip "cvsup" and procced as above.
+Skip "update-ports" and procced as above.
 .TP
 .B fetch-distfiles
 Fetch distfiles for list of ports.



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