Skip to content

Commit

Permalink
When upgrading, install the ELF runtime linkers before libraries.
Browse files Browse the repository at this point in the history
This is required to prevent problems with nss modules that use libthr when
upgrading from releases prior to 10.1.

PR:		197366
Sponsored by:	DARPA, AFRL
Differential Revision:	D1790
Reviewed by:	cperciva
MFC after:	3 days
  • Loading branch information
brooksdavis committed Feb 6, 2015
1 parent dfbf568 commit f7b7391
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions usr.sbin/freebsd-update/freebsd-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2828,18 +2828,27 @@ Kernel updates have been installed. Please reboot and run
grep -E '^[^|]+\|d\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1

# Install new runtime linker
grep -vE '^/boot/' $1/INDEX-NEW |
grep -vE '^[^|]+\|d\|' |
grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1

# Install new shared libraries next
grep -vE '^/boot/' $1/INDEX-NEW |
grep -vE '^[^|]+\|d\|' |
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
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 '^[^|]+\|d\|' |
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD
grep -vE '^/boot/' $1/INDEX-NEW |
grep -vE '^[^|]+\|d\|' |
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1
install_delete INDEX-OLD INDEX-NEW || return 1
Expand Down

0 comments on commit f7b7391

Please sign in to comment.