aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-12-28 04:07:00 +0800
committerjhb <jhb@FreeBSD.org>2013-12-28 04:07:00 +0800
commit8a19bf3162bd69ee6e11527880d79b78a7669429 (patch)
treeab98c7c8967e603bb5be38e2ee5de873e63213cf
parent4a83e9c7837224012ba3ff5d3ef8f7337535fb47 (diff)
downloadfreebsd-ports-gnome-8a19bf3162bd69ee6e11527880d79b78a7669429.tar.gz
freebsd-ports-gnome-8a19bf3162bd69ee6e11527880d79b78a7669429.tar.zst
freebsd-ports-gnome-8a19bf3162bd69ee6e11527880d79b78a7669429.zip
Update to the latest version in HEAD including:
- Add a pre-world mode of updating similar to the -p option that can be passed to mergemaster. - Fix a couple of issues with -F. - Refresh /etc/localtime after each update using tzsetup -r. - Regenerate /var/db/services.db when /etc/services changes. Bump to 1.1. Reviewed by: kwm
-rw-r--r--sysutils/etcupdate/Makefile2
-rw-r--r--sysutils/etcupdate/src/etcupdate.823
-rw-r--r--sysutils/etcupdate/src/etcupdate.sh76
3 files changed, 86 insertions, 15 deletions
diff --git a/sysutils/etcupdate/Makefile b/sysutils/etcupdate/Makefile
index 77734b47f880..283d989d8c3c 100644
--- a/sysutils/etcupdate/Makefile
+++ b/sysutils/etcupdate/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= etcupdate
-PORTVERSION= 1.0
+PORTVERSION= 1.1
CATEGORIES= sysutils
MASTER_SITES= # none
DISTFILES= # none
diff --git a/sysutils/etcupdate/src/etcupdate.8 b/sysutils/etcupdate/src/etcupdate.8
index 91e9e1af15eb..ffd051607312 100644
--- a/sysutils/etcupdate/src/etcupdate.8
+++ b/sysutils/etcupdate/src/etcupdate.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2010-2012 Advanced Computing Technologies LLC
+.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC
.\" Written by: John H. Baldwin <jhb@FreeBSD.org>
.\" All rights reserved.
.\"
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 12, 2013
+.Dd December 9, 2013
.Dt ETCUPDATE 8
.Os
.Sh NAME
@@ -695,6 +695,25 @@ has been removed from the
tree,
but it has been locally modified.
The modified version of the file remains in the destination directory.
+.It "Needs update: /etc/localtime (required manual update via tzsetup(1))"
+The
+.Fa /var/db/zoneinfo
+file does not exist,
+so
+.Nm
+was not able to refresh
+.Fa /etc/localtime
+from its source file in
+.Fa /usr/share/zoneinfo .
+Running
+.Xr tzsetup 1
+will both refresh
+.Fa /etc/localtime
+and generate
+.Fa /var/db/zoneinfo
+permitting future updates to refresh
+.Fa /etc/localtime
+automatically.
.It "Needs update: /etc/mail/aliases.db (required manual update via newaliases(1))"
The file
.Pa /etc/mail/aliases
diff --git a/sysutils/etcupdate/src/etcupdate.sh b/sysutils/etcupdate/src/etcupdate.sh
index 96e507e4388f..addcc14e5366 100644
--- a/sysutils/etcupdate/src/etcupdate.sh
+++ b/sysutils/etcupdate/src/etcupdate.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2010 Advanced Computing Technologies LLC
+# Copyright (c) 2010-2013 Advanced Computing Technologies LLC
# Written by: John H. Baldwin <jhb@FreeBSD.org>
# All rights reserved.
#
@@ -486,6 +486,39 @@ diffnode()
esac
}
+# Run one-off commands after an update has completed. These commands
+# are not tied to a specific file, so they cannot be handled by
+# post_install_file().
+post_update()
+{
+ local args
+
+ # None of these commands should be run for a pre-world update.
+ if [ -n "$preworld" ]; then
+ return
+ fi
+
+ # If /etc/localtime exists and is not a symlink and /var/db/zoneinfo
+ # exists, run tzsetup -r to refresh /etc/localtime.
+ if [ -f ${DESTDIR}/etc/localtime -a \
+ ! -L ${DESTDIR}/etc/localtime ]; then
+ if [ -f ${DESTDIR}/var/db/zoneinfo ]; then
+ if [ -n "${DESTDIR}" ]; then
+ args="-C ${DESTDIR}"
+ else
+ args=""
+ fi
+ log "tzsetup -r ${args}"
+ if [ -z "$dryrun" ]; then
+ tzsetup -r ${args} >&3 2>&1
+ fi
+ else
+ warn "Needs update: /etc/localtime (required" \
+ "manual update via tzsetup(1))"
+ fi
+ fi
+}
+
# Create missing parent directories of a node in a target tree
# preserving the owner, group, and permissions from a specified
# template tree.
@@ -583,6 +616,14 @@ post_install_file()
fi
fi
;;
+ /etc/services)
+ log "services_mkdb -q -o $DESTDIR/var/db/services.db" \
+ "${DESTDIR}$1"
+ if [ -z "$dryrun" ]; then
+ services_mkdb -q -o $DESTDIR/var/db/services.db \
+ ${DESTDIR}$1 >&3 2>&1
+ fi
+ ;;
esac
}
@@ -1026,16 +1067,6 @@ handle_modified_file()
fi
fi
- # If the only change in the new file versus the old file is a
- # change in the FreeBSD ID string and -F is specified, just
- # update the FreeBSD ID string in the local file.
- if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \
- fbsdid_only $OLDTREE/$file $NEWTREE/$file; then
- if update_freebsdid $file; then
- continue
- fi
- fi
-
# If the file was removed from the dest tree, just whine.
if [ $newdestcmp -eq $COMPARE_ONLYFIRST ]; then
# If the removed file matches an ALWAYS_INSTALL glob,
@@ -1050,6 +1081,14 @@ handle_modified_file()
return
fi
+ # If the only change in the new file versus the old
+ # file is a change in the FreeBSD ID string and -F is
+ # specified, don't warn.
+ if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \
+ fbsdid_only $OLDTREE/$file $NEWTREE/$file; then
+ return
+ fi
+
case $cmp in
$COMPARE_DIFFTYPE)
old=`file_type $OLDTREE/$file`
@@ -1080,6 +1119,16 @@ handle_modified_file()
fi
fi
+ # If the only change in the new file versus the old file is a
+ # change in the FreeBSD ID string and -F is specified, just
+ # update the FreeBSD ID string in the local file.
+ if [ -n "$FREEBSD_ID" -a $cmp -eq $COMPARE_DIFFFILES ] && \
+ fbsdid_only $OLDTREE/$file $NEWTREE/$file; then
+ if update_freebsdid $file; then
+ continue
+ fi
+ fi
+
# If the file changed types between the old and new trees but
# the files in the new and dest tree are both of the same
# type, treat it like an added file just comparing the new and
@@ -1498,6 +1547,9 @@ EOF
"(requires manual update via newaliases(1))"
fi
+ # Run any special one-off commands after an update has completed.
+ post_update
+
if [ -s $WARNINGS ]; then
echo "Warnings:"
cat $WARNINGS
@@ -1698,7 +1750,7 @@ case $command in
fi
;;
build|diff|status)
- if [ -n "$dryrun" -o -n "$rerun" -o -n "$tarball" -o
+ if [ -n "$dryrun" -o -n "$rerun" -o -n "$tarball" -o \
-n "$preworld" ]; then
usage
fi
d16c7c85a32c9'>- Pass maintainership to submitterchinsan2008-09-061-1/+1 * The KDE FreeBSD team is proud to announce the release of KDE 4.1.1miwi2008-09-034-18/+11 * - Connect chinese/gcin-devel to buildchinsan2008-08-311-0/+1 * - Update to 1.4chinsan2008-08-314-17/+8 * - Remove deprecated port (due to the upstream unmaintan anymore).chinsan2008-08-304-48/+0 * - set PORTSCOUT variablechinsan2008-08-301-0/+2 * - Update to gcin-1.4.3.pre6chinsan2008-08-293-13/+15 * The KDE FreeBSD team is proud to announce the releasemiwi2008-08-292-6/+6 * - Update to 0.12clsung2008-08-272-4/+4 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-212-2/+0 * Conversion from (now defunct) autoconf-2.61 to autoconf-2.62ade2008-08-205-9/+9 * The KDE FreeBSD team is proud to announce the releasemiwi2008-08-184-21/+131 * - Mark ONLY_FOR_ARCHS=i386.chinsan2008-08-151-0/+2 * - Tarball has been rerolled.chinsan2008-08-132-3/+10 * - Update to 1.4.3.pre5chinsan2008-08-125-10/+85 * - Change distinfo and pkg-plist from kde-l10n-zh_CN to kde-l10n-zh_TW.miwi2008-08-112-515/+518 * - Add conflicts with chinese/gcin-develchinsan2008-08-111-0/+3 * - Fix duplicate INDEX entry.miwi2008-08-101-3/+3 * - Fix INDEXmiwi2008-08-108-108/+1056 * - Update to 0.3.8chinsan2008-08-102-5/+4 * The KDE FreeBSD team is proud to announce the release of KDE 4.1.0miwi2008-08-109-1176/+86 * - Pass maintainership to last pr submmitter as his request via private mail.chinsan2008-08-091-1/+1 * - Update to 2.0.23chinsan2008-08-085-79/+44 * - Update to qt 4.4.1miwi2008-08-056-32/+30 * PHP Documentation in these language has been removed from the distribution.edwin2008-08-044-42/+0 * - Remove USE_GCC where it can be satisfied with base compiler on followingpav2008-07-252-2/+0 * Fix USE_XORG for the upcoming bsd.port.mk changes (ports/122340).flz2008-07-231-1/+1 * Update to 8.1.2 Security Update 1. Quoted from the advisory:hrs2008-07-212-6/+6 * foxfair's commit bit has been taken in for safekeeping.linimon2008-07-141-1/+1 * Delete chinese/links port, it has been IGNORE'd for past 15 monthspav2008-07-0610-1094/+0 * Fix pkg-plist, missing share/applicationsedwin2008-07-051-0/+1 * [New port] chinese/fqterm: a Chinese BBS clientedwin2008-07-0513-0/+354 * - Update to 1.4.2.chinsan2008-06-214-10/+8 * - Update to 1.4.1.chinsan2008-06-204-10/+8 * Standardize placement and style of WWW: lines, and in some casesdougb2008-06-191-1/+1 * - Mark as DEPRECATED, schedule for removal.chinsan2008-06-141-0/+3 * - remove unnecessary dependencyleeym2008-06-081-2/+0 * - Respect PREFIX and LOCALBASErafan2008-06-072-3/+15 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-0627-19/+27 * - Respect PREFIXrafan2008-06-041-0/+2 * - This has been marked BROKEN/IGNORE for 15 months now; deorbit in 30 dayspav2008-06-011-0/+2 * - Fix the pkg-plist if defined(NOPORTDOCS).chinsan2008-05-302-2/+6 * - Update for 1.5.18rafan2008-05-223-37/+501 * - Update to 0.2.20080216.1.chinsan2008-05-183-17/+27 * - Update to 1.4.0.chinsan2008-05-18