From: Thomas Nikolajsen Date: Wed, 11 Feb 2009 22:02:08 +0000 (+0100) Subject: nrelease: clean up Makefile and sync man pages & Makefile.usr X-Git-Url: https://gitweb.dragonflybsd.org/~corecode/dragonfly.git/commitdiff_plain/e2dbfa0b27115fb42f19993d441ce7fbd3acf7c0 nrelease: clean up Makefile and sync man pages & Makefile.usr * nrelease/Makefile: fix a few typos, change name of `syssrcs` target to `srcs`, to reflect current use and remove traces of old installer_* targets. * etc/Makefile: update name of src-sys tar file from nrelease and add targets for newly added src-all and pkgsrc-all tar files. * release.7: update to current method: only binary package downloaded is cvsup and add description of a few more variables. * development.7: add short description of /usr/Makefile. --- diff --git a/etc/Makefile.usr b/etc/Makefile.usr index be8d8b15dd..9bba5e204c 100644 --- a/etc/Makefile.usr +++ b/etc/Makefile.usr @@ -9,13 +9,15 @@ CVSROOT_PKGSRC_WIP?= anoncvs@anoncvs.NetBSD.se:/cvsroot GIT_DRAGONFLY?= git://chlamydia.fs.ei.tum.de/dragonfly.git GIT_BRANCH?= master -all: - @echo "Install or update /usr/pkgsrc using NetBSDs anoncvs" +help all: + @echo "Extract /usr/pkgsrc from pkgsrc-all.tgz" + @echo " make release-pkgsrc-extract" + @echo "Or, install or update /usr/pkgsrc using NetBSDs anoncvs" @echo " make pkgsrc-checkout" @echo " make pkgsrc-update" @echo "" @echo "These targets download/update the DragonFly git repository into" - @echo "/usr/src." + @echo "/usr/src" @echo " make git-clone" @echo " make git-update" @echo "" @@ -23,8 +25,10 @@ all: @echo " make pkgsrc-wip-checkout" @echo " make pkgsrc-wip-update" @echo "" - @echo "Extract kernel sources from src-sys.tar.bz2 in this directory." + @echo "Extract kernel sources from src-sys.tgz in this directory" @echo " make release-sys-extract" + @echo "Extract full DragonFly sources from src-all.tgz in this directory" + @echo " make release-src-extract" @echo "" @echo "If automating please restrict updates from the NetBSD anoncvs" @echo "server to no more than once a week and run gits no more often" @@ -48,8 +52,19 @@ pkgsrc-wip-update: cd ${.CURDIR}/pkgsrc; \ cvs -d ${CVSROOT_PKGSRC_WIP} update -Pd wip +release-pkgsrc-extract: + cd ${.CURDIR}; \ + mkdir -p pkgsrc; \ + cd pkgsrc; \ + tar xvpzf pkgsrc-all.tgz + +release-src-extract: + cd ${.CURDIR}; \ + tar xvpzf src-all.tgz + release-sys-extract: - bunzip2 < src-sys.tar.bz2 | tar xvpf - + cd ${.CURDIR}; \ + tar xvpzf src-sys.tgz git-clone: @if [ -z "`which git`" ]; then \ diff --git a/nrelease/Makefile b/nrelease/Makefile index f6343d3e1a..62b9288124 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -38,6 +38,7 @@ CVSUP_BOOTSTRAP_KIT?= cvsup-bootstrap-20070716 # We use env -i in the chroot, so that environment variables won't # disturb any (pkgsrc) build. This has happened for TARGET_ARCH, # which is used by gmake in completely different context. +# CHROOT_CMD?= env -i CCVER=${CCVER:Q} /usr/sbin/chroot ${ISOROOT} sh -c # User may specify extra packages in addition to the defaults @@ -83,7 +84,7 @@ OLD_PKGSRC_PACKAGES?= cdrtools-2.01.01.27nb1 \ isc-dhcp-server-4.0.0 # Specify which root skeletons are required, and let the user include -# their own. They are copied into ISODIR during the `pkgcustomizeiso' +# their own. They are copied into ISODIR during the `customizeiso' # target; each overwrites the last. # REQ_ROOTSKELS= ${.CURDIR}/root \ @@ -143,14 +144,14 @@ NRLOBJDIR?= /usr/obj ######################################################################### release: check clean buildworld1 buildkernel1 \ - buildiso syssrcs customizeiso mkaliases mklocatedb \ + buildiso srcs customizeiso mkaliases mklocatedb \ mkiso mkimg quickrel: check clean buildworld2 buildkernel2 \ - buildiso syssrcs customizeiso mkaliases mklocatedb \ + buildiso srcs customizeiso mkaliases mklocatedb \ mkiso mkimg -realquickrel: check clean buildiso syssrcs customizeiso \ +realquickrel: check clean buildiso srcs customizeiso \ mkaliases mklocatedb \ mkiso mkimg @@ -260,19 +261,20 @@ buildiso: mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev -# Release CD: Kernel sources (~16M) and the full pkgsrc tree (~26M) -# Release DVD: Full sources (~90M) and the full pkgsrctree (~27M) +# Release CD: Kernel sources (~16M) and the full pkgsrc tree (~27M) +# Release DVD: Full sources (~90M) and the full pkgsrc tree (~27M) # -syssrcs: - cd ${PKGSRC_PATH} && tar --exclude distfiles --exclude work --exclude CVS --exclude .git \ +srcs: +.if !defined(WITHOUT_SRCS) + rm -f ${ISOROOT}/usr/pkgsrc-all.tgz + cd ${PKGSRC_PATH} && tar --exclude distfiles --exclude packages --exclude work --exclude CVS --exclude .git \ -czf ${ISOROOT}/usr/pkgsrc-all.tgz . .if make(gui) - rm -f ${ISOROOT}/usr/src-sys.tgz + rm -f ${ISOROOT}/usr/src-all.tgz cd ${.CURDIR}/../.. && tar --exclude .git --exclude CVS \ -czf ${ISOROOT}/usr/src-all.tgz src .else -.if !defined(WITHOUT_SRCS) - rm -f ${ISOROOT}/usr/src-all.tgz + rm -f ${ISOROOT}/usr/src-sys.tgz cd ${.CURDIR}/../.. && tar --exclude .git --exclude CVS \ -czf ${ISOROOT}/usr/src-sys.tgz src/Makefile src/Makefile.inc1 src/sys .endif @@ -464,7 +466,7 @@ pkgsrc_cdrecord: (cd ${PKGSRC_PATH}/sysutils/cdrtools; bmake clean build install) .endif -help: +help all: @echo "make [gui] release - complete build from scratch" @echo "make [gui] quick - attempt to do an incremental rebuild" @echo "make [gui] realquick - attempt to restart after world & kernel" @@ -472,11 +474,11 @@ help: @echo "" @echo "Extra packages may be specified with PKGSRC_EXTRA_PACKAGES" -.PHONY: all release installer_release quickrel installer_quickrel realquickrel -.PHONY: installer_fetch installer +.PHONY: release quickrel realquickrel +.PHONY: installer .PHONY: quick realquick -.PHONY: installer_realquickrel check buildworld1 buildworld2 +.PHONY: check buildworld1 buildworld2 .PHONY: buildkernel1 buildkernel2 buildiso customizeiso mklocatedb mkiso mkimg -.PHONY: clean realclean fetch help mkaliases +.PHONY: clean realclean fetch help all mkaliases srcs .include diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index b9038fb329..9d9e5f4d0b 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -31,7 +31,7 @@ .\" .\" $DragonFly: src/share/man/man7/development.7,v 1.12 2008/07/27 22:23:42 thomas Exp $ .\" -.Dd December 1, 2008 +.Dd February 11, 2009 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -68,6 +68,19 @@ Note that the directory to clone into in the following example) must not exist, so all previous work in this directory has to be saved and the directory be removed prior to cloning. .Pp +Simple setup and updating of local repository is done using +.Pa /usr/Makefile : +.Pp +.Bd -literal -offset 4n +cd /usr +make help # get help +make git-clone # initial setup +make git-update +.Ed +.Pp +Somewhat finer control can be achieved using +.Xr git 1 +directly: To clone the repository and check out the master branch (this will take some time): .Bd -literal -offset 4n diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 467e9bf7c5..4a86b66083 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -31,7 +31,7 @@ .\" $FreeBSD: src/share/man/man7/release.7,v 1.3.2.6 2003/04/12 20:42:30 murray Exp $ .\" $DragonFly: src/share/man/man7/release.7,v 1.12 2008/04/01 21:10:26 swildner Exp $ .\" -.Dd January 15, 2009 +.Dd February 11, 2009 .Dt NRELEASE 7 .Os .Sh NAME @@ -59,6 +59,8 @@ The release Makefile defines a number of targets which are roughly modeled after the targets used for building the system. .Bl -tag -width ".Cm realquickrel" +.It Cm help +Offer some help. .It Cm release Builds world and kernel, installs them, adds packages and prepares the ISO image. @@ -83,7 +85,7 @@ Same as .Cm clean but also removes external packages. .It Cm fetch -Downloads the bootstrap kit and binary packages using +Downloads binary packages using .Xr fetch 1 . .El .Pp @@ -116,19 +118,21 @@ drive, will be created. .El .Pp During the process of rolling a release a check is performed to find -out if a number of external packages to be put on the CD exist on -your system. +out if external packages to be put on the CD exist on your system. If they cannot be found, the release process will stop and give proper commands for downloading and setting up these packages. .Sh ENVIRONMENT -.Bl -tag -width ".Va PKGBIN_PKG_DELETE" +.Bl -tag -width ".Va PKGSRC_EXTRA_PACKAGES" .It Va ISODIR Default prefix of .Va ISOFILE and -.Va ISOROOT . +.Va ISOROOT +(default is +.Pa /usr/release ) . .It Va ISOFILE -Name of the ISO image to generate. +Name of the ISO image to generate (default is +.Pa /usr/release/dfly.iso ) . .It Va ISOROOT Location where the image contents are installed to before the ISO is prepared. .It Va KERNCONF @@ -151,14 +155,21 @@ Location of the utility which is to be used during the build. .It Va PKGSRC_PACKAGES List of packages to be added to the ISO. +.It Va PKGSRC_EXTRA_PACKAGES +List of packages, in addition to +.Va PKGSRC_PACKAGES , +to be added to the ISO. +.It Va PKGSRC_PATH +Location of +.Xr pkgsrc 7 +tree to be used for package building. .It Va PKGSRC_PKG_PATH Specifies the location where binary .Xr pkgsrc 7 packages are kept. .It Va WITHOUT_SRCS -If set, this variable will prevent kernel source code from being copied to -.Pa /usr/src-sys.tar.bz2 -on the ISO image. +If set, this variable will prevent source code from being copied to +the ISO image. .It Va IMGFILE The name of the image file (default is .Pa /usr/release/dfly.img ) . @@ -182,7 +193,9 @@ The disk device to use in the image's The following sequence of commands is used to build a standard .Dx 2.0 installation CD image (assuming that a local git repository is -available): +available, see +.Xr development 7 +for how to get this): .Bd -literal -offset indent cd /usr/src git checkout -b rel2_0 crater/DragonFly_RELEASE_2_0