pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_comp Update to 1.10:
details: https://anonhg.NetBSD.org/pkgsrc/rev/7d54589f90c7
branches: trunk
changeset: 460929:7d54589f90c7
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Sun Sep 07 22:31:18 2003 +0000
description:
Update to 1.10:
* Sync with audit-packages: use the new pkg-vulnerabilities file.
* Check if the version of pkg_install inside the chroot is up to date before
building anything. If not, force a rebuild automatically.
* Disable all those ugly sync's after fsumount (were added because I had
some strange problems, IIRC). You can reenabled them by setting
SYNC_UMOUNT=yes in the configuration file.
diffstat:
pkgtools/pkg_comp/Makefile | 4 +-
pkgtools/pkg_comp/files/pkg_comp.8 | 17 ++++++++--
pkgtools/pkg_comp/files/pkg_comp.sh | 59 +++++++++++++++++++++++++++---------
3 files changed, 59 insertions(+), 21 deletions(-)
diffs (179 lines):
diff -r b5b1e6da2d3a -r 7d54589f90c7 pkgtools/pkg_comp/Makefile
--- a/pkgtools/pkg_comp/Makefile Sun Sep 07 21:53:02 2003 +0000
+++ b/pkgtools/pkg_comp/Makefile Sun Sep 07 22:31:18 2003 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.13 2003/08/30 21:11:30 jmmv Exp $
+# $NetBSD: Makefile,v 1.14 2003/09/07 22:31:18 jmmv Exp $
-DISTNAME= pkg_comp-1.9
+DISTNAME= pkg_comp-1.10
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools
MASTER_SITES= # empty
diff -r b5b1e6da2d3a -r 7d54589f90c7 pkgtools/pkg_comp/files/pkg_comp.8
--- a/pkgtools/pkg_comp/files/pkg_comp.8 Sun Sep 07 21:53:02 2003 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.8 Sun Sep 07 22:31:18 2003 +0000
@@ -1,7 +1,7 @@
-.\" $NetBSD: pkg_comp.8,v 1.12 2003/08/30 23:17:31 wiz Exp $
+.\" $NetBSD: pkg_comp.8,v 1.13 2003/09/07 22:31:18 jmmv Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
-.\" Copyright (c) 2002, 2003, Julio Merino <jmmv%netbsd.org@localhost>
+.\" Copyright (c) 2002, 2003, Julio M. Merino Vidal <jmmv%netbsd.org@localhost>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 30, 2003
+.Dd September 7, 2003
.Dt PKG_COMP 8
.Os
.Sh NAME
@@ -220,6 +220,14 @@
jail and no other X variables take effect.
Defaults to
.Ql xbase.tgz xcomp.tgz xcontrib.tgz xfont.tgz xmisc.tgz xserver.tgz .
+.It SYNC_UMOUNT
+If set to
+.Ql yes ,
+run
+.Xr sync 8
+three times after all file systems have been unmounted.
+Defaults to
+.Ql no .
.It USE_AUDIT_PACKAGES
If set to
.Ql yes ,
@@ -395,6 +403,7 @@
.Xr pkg_delete 1 ,
.Xr packages 7 ,
.Xr mount_null 8 ,
+.Xr sync 8 ,
.Xr sysctl 8
.Sh AUTHORS
-.An Julio Merino Aq jmmv%netbsd.org@localhost
+.An Julio M. Merino Vidal Aq jmmv%netbsd.org@localhost
diff -r b5b1e6da2d3a -r 7d54589f90c7 pkgtools/pkg_comp/files/pkg_comp.sh
--- a/pkgtools/pkg_comp/files/pkg_comp.sh Sun Sep 07 21:53:02 2003 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh Sun Sep 07 22:31:18 2003 +0000
@@ -1,9 +1,9 @@
#!/bin/sh
#
-# $NetBSD: pkg_comp.sh,v 1.10 2003/08/30 21:11:31 jmmv Exp $
+# $NetBSD: pkg_comp.sh,v 1.11 2003/09/07 22:31:18 jmmv Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
-# Copyright (c) 2002, 2003, Julio Merino <jmmv%netbsd.org@localhost>
+# Copyright (c) 2002, 2003, Julio M. Merino Vidal <jmmv%netbsd.org@localhost>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -47,7 +47,7 @@
SETS_X11 USE_XPKGWEDGE REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
REAL_PKGSRC_OPTS REAL_DISTFILES REAL_DISTFILES_OPTS \
REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \
- NETBSD_RELEASE MOUNT_SCRIPT UMOUNT_SCRIPT"
+ NETBSD_RELEASE MOUNT_SCRIPT UMOUNT_SCRIPT SYNC_UMOUNT"
env_clean()
{
@@ -102,6 +102,7 @@
: ${NETBSD_RELEASE:=no}
: ${MOUNT_SCRIPT:=}
: ${UMOUNT_SCRIPT:=}
+ : ${SYNC_UMOUNT:=no}
}
# ----------------------------------------------------------------------
@@ -123,12 +124,12 @@
copy_vulnerabilities()
{
if [ "$USE_AUDIT_PACKAGES" = "yes" ]; then
- echo "PKG_COMP ==> Installing new \`vulnerabilities' file"
- if [ ! -f "$REAL_PKGVULNDIR/vulnerabilities" ]; then
- echo "$REAL_PKGVULNDIR/vulnerabilities not found."
+ echo "PKG_COMP ==> Installing new \`pkg-vulnerabilities' file"
+ if [ ! -f "$REAL_PKGVULNDIR/pkg-vulnerabilities" ]; then
+ echo "$REAL_PKGVULNDIR/pkg-vulnerabilities not found."
else
mkdir -p $DESTDIR/$PKGVULNDIR
- cp $REAL_PKGVULNDIR/vulnerabilities $DESTDIR/$PKGVULNDIR
+ cp $REAL_PKGVULNDIR/pkg-vulnerabilities $DESTDIR/$PKGVULNDIR
fi
fi
}
@@ -243,13 +244,16 @@
echo " done."
- printf "Syncing: 1"
- sync ; sleep 1
- printf " 2"
- sync ; sleep 1
- printf " 3"
- sync ; sleep 1
- echo " done."
+ if [ "$SYNC_UMOUNT" != "no" ]; then
+ printf "Syncing: 1"
+ sync ; sleep 1
+ printf " 2"
+ sync ; sleep 1
+ printf " 3"
+ sync ; sleep 1
+ echo " done."
+ fi
+
if [ "$fsfailed" = "yes" ]; then
err "FATAL: failed to umount all filesystems"
else
@@ -390,6 +394,8 @@
# signals to umount them.
trap "echo \"*** Process aborted ***\" ; fsumount ; exit 1" INT QUIT
+ check_pkg_install
+
if [ "$USE_AUDIT_PACKAGES" = "yes" ]; then
pkg_build security/audit-packages
fi
@@ -505,7 +511,7 @@
err "invalid packages:$invalid"
fi
- copy_vulnerabilities
+ check_pkg_install # executes copy_vulnerabilities too
# Build them
fsmount
@@ -543,6 +549,29 @@
fi
}
+check_pkg_install()
+{
+ copy_vulnerabilities
+
+ echo "PKG_COMP ==> Checking that pkg_install is up to date"
+ fsmount
+ script=`mktemp $DESTDIR/pkg_comp/tmp/pkg_comp-XXXX`.sh
+ cat > $script <<EOF
+#!/bin/sh
+cd /usr/pkgsrc/pkgtools/pkg_comp
+fail=\$(make show-var VARNAME=PKG_FAIL_REASON)
+if echo \$fail | grep "package tools need to be updated" >/dev/null; then
+ echo "PKG_COMP ==> pkg_install is out of date; rebuilding"
+ cd /usr/pkgsrc/pkgtools/pkg_install
+ make && make install && make clean
+fi
+EOF
+ chmod +x $script
+ chroot $DESTDIR /pkg_comp/tmp/`basename $script`
+ rm $script
+ fsumount
+}
+
# ----------------------------------------------------------------------
# install target
# ----------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index