aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-10-26 20:01:00 +0000
committerXin LI <delphij@FreeBSD.org>2013-10-26 20:01:00 +0000
commit337b0b5de86bb09db3d1bb318a79992d31a59a72 (patch)
treead7080204b78b02f4cca7ab0ed00cb46e33298d0
parent772e608bdc472eeb1e92841230515892b162e512 (diff)
downloadsrc-337b0b5de86bb09db3d1bb318a79992d31a59a72.tar.gz
src-337b0b5de86bb09db3d1bb318a79992d31a59a72.zip
MFC r256646, r256767, r257038:
When installing updates, install new directories first and remove old directories last. Allow ~ in file names so libtool droppings in contrib don't break updates. It has happened twice now, and is likely to happen again. Be more selective when filtering for lib*.so.N files. These are deleted at the end of the upgrade process, after warning users to upgrade any 3rd party software (e.g., from the ports tree) which might link to the libraries being removed. Errata Notice: FreeBSD-EN-13:04.freebsd-update Approved by: so
Notes
Notes: svn path=/releng/9.1/; revision=257194
-rw-r--r--UPDATING4
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh33
3 files changed, 30 insertions, 9 deletions
diff --git a/UPDATING b/UPDATING
index 9c19ed33f4a4..c1fa3d5cf3d3 100644
--- a/UPDATING
+++ b/UPDATING
@@ -9,6 +9,10 @@ handbook.
Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running portupgrade.
+20131026: p8 FreeBSD-EN-13:04.freebsd-update
+ Fix multiple freebsd-update bugs that break upgrading to
+ FreeBSD 10.0.
+
20130910: p7 FreeBSD-SA-13:12.ifioctl
FreeBSD-SA-13:13.nullfs
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 6c5335500846..cd4f41b9ab2d 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="9.1"
-BRANCH="RELEASE-p7"
+BRANCH="RELEASE-p8"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index ea4099a0a688..e41bac59192d 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -1200,7 +1200,7 @@ fetch_metadata_sanity () {
# Some aliases to save space later: ${P} is a character which can
# appear in a path; ${M} is the four numeric metadata fields; and
# ${H} is a sha256 hash.
- P="[-+./:=%@_[[:alnum:]]"
+ P="[-+./:=%@_[~[:alnum:]]"
M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
H="[0-9a-f]{64}"
@@ -2814,16 +2814,24 @@ Kernel updates have been installed. Please reboot and run
# If we haven't already dealt with the world, deal with it.
if ! [ -f $1/worlddone ]; then
+ # Create any necessary directories first
+ grep -vE '^/boot/' $1/INDEX-NEW |
+ grep -E '^[^|]+\|d\|' > INDEX-NEW
+ install_from_index INDEX-NEW || return 1
+
# Install new shared libraries next
grep -vE '^/boot/' $1/INDEX-NEW |
- grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
+ grep -vE '^[^|]+\|d\|' |
+ grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1
# Deal with everything else
grep -vE '^/boot/' $1/INDEX-OLD |
- grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
+ grep -vE '^[^|]+\|d\|' |
+ grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD
grep -vE '^/boot/' $1/INDEX-NEW |
- grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
+ grep -vE '^[^|]+\|d\|' |
+ grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1
install_delete INDEX-OLD INDEX-NEW || return 1
@@ -2844,11 +2852,11 @@ Kernel updates have been installed. Please reboot and run
# Do we need to ask the user to portupgrade now?
grep -vE '^/boot/' $1/INDEX-NEW |
- grep -E '/lib/.*\.so\.[0-9]+\|' |
+ grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' |
cut -f 1 -d '|' |
sort > newfiles
if grep -vE '^/boot/' $1/INDEX-OLD |
- grep -E '/lib/.*\.so\.[0-9]+\|' |
+ grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' |
cut -f 1 -d '|' |
sort |
join -v 1 - newfiles |
@@ -2868,9 +2876,18 @@ again to finish installing updates.
# Remove old shared libraries
grep -vE '^/boot/' $1/INDEX-NEW |
- grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
+ grep -vE '^[^|]+\|d\|' |
+ grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
grep -vE '^/boot/' $1/INDEX-OLD |
- grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
+ grep -vE '^[^|]+\|d\|' |
+ grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD
+ install_delete INDEX-OLD INDEX-NEW || return 1
+
+ # Remove old directories
+ grep -vE '^/boot/' $1/INDEX-OLD |
+ grep -E '^[^|]+\|d\|' > INDEX-OLD
+ grep -vE '^/boot/' $1/INDEX-OLD |
+ grep -E '^[^|]+\|d\|' > INDEX-OLD
install_delete INDEX-OLD INDEX-NEW || return 1
# Remove temporary files