From c19c746b9da52912a7724b99ce34aa6f982df6a4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 9 Feb 2009 09:31:57 -0800 Subject: [PATCH] Release Engineering: nrelease work, more didbootstrap, include pkgsrcs, and more * Include full sources on the DVD release (tar cz'd) - 90M * Include the full pkgsrc tree on both the CD and DVD release (tar cz'd) - 26M * More cleanups * Hack fixed for .didbootstrap. clean target combinations were not resolving the .if tests in the expected way. --- nrelease/Makefile | 53 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index f24c4ef206..9fe8cbcad9 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -260,11 +260,22 @@ buildiso: mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev -# Include kernel sources on the release CD (~14MB) +# Release CD: Kernel sources (~16M) and the full pkgsrc tree (~26M) +# Release DVD: Full sources (~90M) and the full pkgsrctree (~27M) # syssrcs: + cd ${PKGSRC_PATH} && tar --exclude work --exclude CVS --exclude .git \ + -czf ${ISOROOT}/usr/pkgsrc-all.tgz . +.if make(gui) + rm -f ${ISOROOT}/usr/src-sys.tgz + cd ${.CURDIR}/../.. && tar --exclude .git --exclude CVS \ + -czf ${ISOROOT}/usr/src-all.tgz src +.else .if !defined(WITHOUT_SRCS) - ( cd ${.CURDIR}/../..; tar -cf - src/Makefile src/Makefile.inc1 src/sys | bzip2 -9 > ${ISOROOT}/usr/src-sys.tar.bz2 ) + rm -f ${ISOROOT}/usr/src-all.tgz + cd ${.CURDIR}/../.. && tar --exclude .git --exclude CVS \ + -czf ${ISOROOT}/usr/src-sys.tgz src/Makefile src/Makefile.inc1 src/sys +.endif .endif # Customize the ISO by copying rootskels in reverse priority order, @@ -308,9 +319,6 @@ customizeiso: -@umount ${ISOROOT}/usr/pkgsrc mkdir -p ${ISODIR}/distfiles rm -rf ${ISOROOT}/usr/pkgobj - test -e ${ISODIR}/.didbootstrap || \ - rm -rf ${ISOROOT}/usr/pkg ${ISOROOT}/var/db/pkg \ - ${ISOROOT}/var/db/pkg.refcount # # Mount /usr/pkgsrc, make sure /usr/pkgsrc/distfiles is writable # @@ -324,20 +332,26 @@ customizeiso: # Bootstrap, if not already installed, and add licenses needed # for the gui release # -.if !exists (${ISODIR}/.didbootstrap) - ${CHROOT_CMD} "cd /usr/pkgsrc/bootstrap; \ + test -e ${ISODIR}/.didbootstrap || \ + rm -rf ${ISOROOT}/usr/pkg ${ISOROOT}/var/db/pkg \ + ${ISOROOT}/var/db/pkg.refcount + test -e ${ISODIR}/.didbootstrap || \ + ${CHROOT_CMD} "cd /usr/pkgsrc/bootstrap; \ ./bootstrap --workdir /usr/pkgobj/bootstrap/work" - echo ".ifdef BSD_PKG_MK # added by nrelease" \ + test -e ${ISODIR}/.didbootstrap || \ + echo ".ifdef BSD_PKG_MK # added by nrelease" \ >> ${ISOROOT}/usr/pkg/etc/mk.conf - echo "ACCEPTABLE_LICENSES+=openmotif-license" \ + test -e ${ISODIR}/.didbootstrap || \ + echo "ACCEPTABLE_LICENSES+=openmotif-license" \ >> ${ISOROOT}/usr/pkg/etc/mk.conf - echo "ACCEPTABLE_LICENSES+=vim-license" \ + test -e ${ISODIR}/.didbootstrap || \ + echo "ACCEPTABLE_LICENSES+=vim-license" \ >> ${ISOROOT}/usr/pkg/etc/mk.conf - echo ".endif # added by nrelease" \ + test -e ${ISODIR}/.didbootstrap || \ + echo ".endif # added by nrelease" \ >> ${ISOROOT}/usr/pkg/etc/mk.conf - sync - touch ${ISODIR}/.didbootstrap -.endif + test -e ${ISODIR}/.didbootstrap || sync + test -e ${ISODIR}/.didbootstrap || touch ${ISODIR}/.didbootstrap # # Build and install packages, skip packages already installed # @@ -417,11 +431,11 @@ mkimg: .endif clean: - -umount ${ISOROOT}/usr/pkgsrc/distfiles - -umount ${ISOROOT}/usr/pkgsrc + -umount ${ISOROOT}/usr/pkgsrc/distfiles > /dev/null 2>&1 + -umount ${ISOROOT}/usr/pkgsrc > /dev/null 2>&1 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi - if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}/*; fi - if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi + rm -rf ${ISOROOT} + rm -rf ${NRLOBJDIR}/nrelease rm -f ${ISODIR}/.didbootstrap realclean: clean @@ -430,7 +444,8 @@ realclean: clean # do not use PKGSRC_PKG_PATH here, we do not want to destroy an # override location. # - if [ -d ${ISODIR}/packages ]; then rm -rf ${ISODIR}/packages; fi + rm -rf ${ISODIR}/packages + rm -rf ${ISODIR}/distfiles fetch: @if [ ! -d ${PKGSRC_PKG_PATH} ]; then mkdir -p ${PKGSRC_PKG_PATH}; fi -- 2.11.4.GIT