Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2014 18:33:10 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r260787 - in releng/10.0/release: . amd64 i386 pkg_repos scripts
Message-ID:  <201401161833.s0GIXAID038753@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Thu Jan 16 18:33:10 2014
New Revision: 260787
URL: http://svnweb.freebsd.org/changeset/base/260787

Log:
  MFreleng10 r259582 (reverse), MFstable10 r259491, r259492, r260781:
  
  r259582 (reverted):
    Set PACKAGESITE to 'release/0' for the pkg-stage target to pull
    the release set of packages.  (Required to eliminate conflicts.)
  
  r259491:
    Prevent release build errors found during snapshot builds where if
    NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if
    WITH_DVD=1.
  
  r259492:
    Add NOPKG to disable pkg-stage.
  
  r260781:
    Update the pkg-stage target to be more compatible with pkg-1.2:
  
   - Add a release-dvd.conf pkg(8) configuration file to override
     the default FreeBSD.conf configuration.
   - Remove architecture-specific pkg-stage.conf files, consolidate,
     and move their contents to scripts/pkg-stage.sh.
   - Use 'pkg -vv' to determine the ABI, which is used as the
     cache directory.
  
    Prior to these changes, it would be possible for pkg-stage to fetch
    conflicting binary packages from multiple repositories.
  
    A change local to releng/10.0 sets the package fetch URL to
    'release/0'.
  
  Approved by:	re (delphij)
  Sponsored by:	The FreeBSD Foundation

Added:
  releng/10.0/release/pkg_repos/
     - copied from r260781, stable/10/release/pkg_repos/
Deleted:
  releng/10.0/release/amd64/pkg-stage.conf
  releng/10.0/release/i386/pkg-stage.conf
Modified:
  releng/10.0/release/Makefile
  releng/10.0/release/pkg_repos/release-dvd.conf
  releng/10.0/release/scripts/pkg-stage.sh
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/release/Makefile
==============================================================================
--- releng/10.0/release/Makefile	Thu Jan 16 18:15:59 2014	(r260786)
+++ releng/10.0/release/Makefile	Thu Jan 16 18:33:10 2014	(r260787)
@@ -15,6 +15,7 @@
 #            (by default, the directory above this one) 
 #  PORTSDIR: location of ports tree to distribute (default: /usr/ports)
 #  DOCDIR:   location of doc tree (default: /usr/doc)
+#  NOPKG:    if set, do not distribute third-party packages
 #  NOPORTS:  if set, do not distribute ports tree
 #  NOSRC:    if set, do not distribute source tree
 #  NODOC:    if set, do not generate release documentation
@@ -214,9 +215,9 @@ packagesystem: base.txz kernel.txz ${EXT
 	touch ${.TARGET}
 
 pkg-stage:
-.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf))
-	sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \
-		${REVISION}
+.if !defined(NOPKG)
+	env REPOS_DIR=${.CURDIR}/pkg_repos/ \
+		sh ${.CURDIR}/scripts/pkg-stage.sh
 	mkdir -p ${.OBJDIR}/dvd/packages/repos/
 	cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \
 		${.OBJDIR}/dvd/packages/repos/

Modified: releng/10.0/release/pkg_repos/release-dvd.conf
==============================================================================
--- stable/10/release/pkg_repos/release-dvd.conf	Thu Jan 16 16:44:23 2014	(r260781)
+++ releng/10.0/release/pkg_repos/release-dvd.conf	Thu Jan 16 18:33:10 2014	(r260787)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 release: {
-  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/release/0",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",

Modified: releng/10.0/release/scripts/pkg-stage.sh
==============================================================================
--- releng/10.0/release/scripts/pkg-stage.sh	Thu Jan 16 18:15:59 2014	(r260786)
+++ releng/10.0/release/scripts/pkg-stage.sh	Thu Jan 16 18:33:10 2014	(r260787)
@@ -5,31 +5,48 @@
 
 set -e
 
-usage() {
-	echo "$(basename ${0}) /path/to/pkg-stage.conf revision"
-	exit 1
-}
-
-if [ ! -e "${1}" ]; then
-	echo "Configuration file not specified."
-	echo
-	usage
+export ASSUME_ALWAYS_YES=1
+export PKG_DBDIR="/tmp/pkg"
+export PERMISSIVE="YES"
+export REPO_AUTOUPDATE="NO"
+export PKGCMD="/usr/sbin/pkg -d"
+
+DVD_PACKAGES="archivers/unzip
+devel/subversion
+devel/subversion-static
+emulators/linux_base-f10
+misc/freebsd-doc-all
+net/mpd5
+net/rsync
+ports-mgmt/pkg
+ports-mgmt/portmaster
+shells/bash
+shells/zsh
+security/sudo
+sysutils/screen
+www/firefox
+www/links
+x11-drivers/xf86-video-vmware
+x11/gnome2
+x11/kde4
+x11/xorg"
+
+# If NOPORTS is set for the release, do not attempt to build pkg(8).
+if [ ! -f /usr/ports/Makefile ]; then
+	exit 0
 fi
 
-if [ "$#" -lt 2 ]; then
-	usage
-fi
-
-# Source config file for this architecture.
-REVISION="${2}"
-. "${1}" || exit 1
-
 if [ ! -x /usr/local/sbin/pkg ]; then
 	/usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
 fi
 
+export PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}')
+export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
+
 /bin/mkdir -p ${PKG_CACHEDIR}
 
+# Print pkg(8) information to make debugging easier.
+${PKGCMD} -vv
 ${PKGCMD} update -f
 ${PKGCMD} fetch -d ${DVD_PACKAGES}
 



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