svn commit: r258415 - in stable/10: release release/amd64 release/i386 release/scripts share/man/man7
Glen Barber
gjb at FreeBSD.org
Thu Nov 21 02:45:38 UTC 2013
Author: gjb
Date: Thu Nov 21 02:45:36 2013
New Revision: 258415
URL: http://svnweb.freebsd.org/changeset/base/258415
Log:
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
Added:
stable/10/release/amd64/pkg-stage.conf
- copied, changed from r258307, head/release/amd64/pkg-stage.conf
stable/10/release/i386/pkg-stage.conf
- copied, changed from r258307, head/release/i386/pkg-stage.conf
stable/10/release/scripts/pkg-stage.sh
- copied unchanged from r258307, head/release/scripts/pkg-stage.sh
Modified:
stable/10/release/Makefile
stable/10/release/release.sh
stable/10/share/man/man7/release.7
Directory Properties:
stable/10/release/ (props changed)
stable/10/share/man/man7/ (props changed)
Modified: stable/10/release/Makefile
==============================================================================
--- stable/10/release/Makefile Thu Nov 21 02:45:07 2013 (r258414)
+++ stable/10/release/Makefile Thu Nov 21 02:45:36 2013 (r258415)
@@ -71,6 +71,10 @@ IMAGES=
.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
RELEASE_TARGETS+= cdrom
IMAGES+= disc1.iso bootonly.iso
+. if(!defined(NODVD))
+RELEASE_TARGETS+= dvdrom
+IMAGES+= dvd1.iso
+. endif
.endif
.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
RELEASE_TARGETS+= memstick.img
@@ -160,10 +164,32 @@ bootonly: packagesystem
echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf
cp ${.CURDIR}/rc.local bootonly/etc
+dvd:
+# Install system
+ mkdir -p ${.TARGET}
+ cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
+ DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1
+# Copy distfiles
+ mkdir -p ${.TARGET}/usr/freebsd-dist
+ cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist
+# Copy documentation, if generated
+.if !defined(NODOC)
+ cp reldoc/* ${.TARGET}
+.endif
+# Set up installation environment
+ ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
+ echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
+ echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
+ cp ${.CURDIR}/rc.local ${.TARGET}/etc
+ touch ${.TARGET}
+
release.iso: disc1.iso
disc1.iso: system
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release
+dvd1.iso: dvd pkg-stage
+ sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd
+
bootonly.iso: bootonly
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly
@@ -175,7 +201,14 @@ packagesystem: base.txz kernel.txz ${EXT
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
touch ${.TARGET}
+pkg-stage:
+.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf))
+ sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \
+ ${REVISION}
+.endif
+
cdrom: disc1.iso bootonly.iso
+dvdrom: dvd1.iso
ftp: packagesystem
rm -rf ftp
mkdir -p ftp
@@ -191,8 +224,8 @@ clean:
rm -f packagesystem
rm -f *.txz MANIFEST
rm -f system
- rm -rf release bootonly
- rm -f disc1.iso bootonly.iso memstick.img
+ rm -rf release bootonly dvd
+ rm -f ${IMAGES}
install:
.if defined(DESTDIR) && !empty(DESTDIR)
Copied and modified: stable/10/release/amd64/pkg-stage.conf (from r258307, head/release/amd64/pkg-stage.conf)
==============================================================================
--- head/release/amd64/pkg-stage.conf Mon Nov 18 15:22:55 2013 (r258307, copy source)
+++ stable/10/release/amd64/pkg-stage.conf Thu Nov 21 02:45:36 2013 (r258415)
@@ -3,14 +3,14 @@
# $FreeBSD$
#
-export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:64"
+export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:64"
export ASSUME_ALWAYS_YES=1
export __PKG_CONF="/etc/pkg/FreeBSD.conf"
export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest"
export MIRROR_TYPE="SRV"
export REPO_AUTOUPDATE="NO"
export PKG_DBDIR="/tmp/pkg"
-export PKG_CACHEDIR="release/packages/${PKG_ABI}"
+export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
export PERMISSIVE="YES"
export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}"
Copied and modified: stable/10/release/i386/pkg-stage.conf (from r258307, head/release/i386/pkg-stage.conf)
==============================================================================
--- head/release/i386/pkg-stage.conf Mon Nov 18 15:22:55 2013 (r258307, copy source)
+++ stable/10/release/i386/pkg-stage.conf Thu Nov 21 02:45:36 2013 (r258415)
@@ -3,14 +3,14 @@
# $FreeBSD$
#
-export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:32"
+export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:32"
export ASSUME_ALWAYS_YES=1
export __PKG_CONF="/etc/pkg/FreeBSD.conf"
export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest"
export MIRROR_TYPE="SRV"
export REPO_AUTOUPDATE="NO"
export PKG_DBDIR="/tmp/pkg"
-export PKG_CACHEDIR="release/packages/${PKG_ABI}"
+export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
export PERMISSIVE="YES"
export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}"
Modified: stable/10/release/release.sh
==============================================================================
--- stable/10/release/release.sh Thu Nov 21 02:45:07 2013 (r258414)
+++ stable/10/release/release.sh Thu Nov 21 02:45:36 2013 (r258415)
@@ -159,6 +159,7 @@ if [ "x${NOPORTS}" = "x" ]; then
svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
+cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
cd ${CHROOTDIR}/usr/src
make ${CHROOT_WMAKEFLAGS} buildworld
make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR}
@@ -193,7 +194,6 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO
fi
if [ -d ${CHROOTDIR}/usr/ports ]; then
- cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
build_doc_ports ${CHROOTDIR}
fi
Copied: stable/10/release/scripts/pkg-stage.sh (from r258307, head/release/scripts/pkg-stage.sh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/release/scripts/pkg-stage.sh Thu Nov 21 02:45:36 2013 (r258415, copy of r258307, head/release/scripts/pkg-stage.sh)
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+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
+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/sbin/pkg bootstrap
+fi
+
+/bin/mkdir -p ${PKG_CACHEDIR}
+
+${PKGCMD} update -f
+${PKGCMD} fetch -d ${DVD_PACKAGES}
+
+${PKGCMD} repo ${PKG_CACHEDIR}
+
+# Always exit '0', even if pkg(8) complains about conflicts.
+exit 0
Modified: stable/10/share/man/man7/release.7
==============================================================================
--- stable/10/share/man/man7/release.7 Thu Nov 21 02:45:07 2013 (r258414)
+++ stable/10/share/man/man7/release.7 Thu Nov 21 02:45:36 2013 (r258415)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 14, 2013
+.Dd November 18, 2013
.Dt RELEASE 7
.Os
.Sh NAME
@@ -230,6 +230,10 @@ When set,
will prevent the
.Fa doc.txz
distribution package from being created.
+.It Va NODVD
+Set to a non-empty value to skip the
+.Cm dvdrom
+target.
.It Va NOPORTS
Set to a non-empty value to skip the
.Li ports/
@@ -270,6 +274,15 @@ This target produces files called
and
.Pa bootonly.iso
as its output.
+.It Cm dvdrom
+Builds installation DVD-ROM images.
+This may require the
+.Xr md 4
+(memory disk) device driver be present in the kernel
+(either by being compiled in or available as a module).
+This target produces the
+.Pa dvd1.iso
+file as its output.
.It Cm memstick
Builds an installation memory stick image named
.Pa memstick.img .
@@ -297,7 +310,8 @@ Builds a bootable installation system co
packaged by the
.Cm packagesystem
target, and suitable for imaging by the
-.Cm cdrom
+.Cm cdrom ,
+.Cm dvdrom
and
.Cm memstick
targets.
More information about the svn-src-stable
mailing list