summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/glibc/glibc.install
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/glibc/glibc.install
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core-testing/glibc/glibc.install')
-rw-r--r--abs/core-testing/glibc/glibc.install122
1 files changed, 122 insertions, 0 deletions
diff --git a/abs/core-testing/glibc/glibc.install b/abs/core-testing/glibc/glibc.install
new file mode 100644
index 0000000..2a35040
--- /dev/null
+++ b/abs/core-testing/glibc/glibc.install
@@ -0,0 +1,122 @@
+pre_upgrade() {
+if [ "`uname -m`" = "x86_64" ]; then
+ if [ "`vercmp $2 2.4`" -lt 0 ]; then
+ cat << _EOF
+ ==> glibc oldpkgver < 2.4 detected!
+ ==>
+ ==> ATTENTION x86_64 USERS:
+ ==>
+ ==> We now switch from the former lib-linking to pure /lib support. To get rid
+ ==> of all lib64 directories we have removed the link /lib -> /lib64 and
+ ==> /usr/lib -> /usr/lib64.
+ ==>
+ ==> We have also rebuilt all packages we know that still used lib64 directories.
+ ==> Now all should go to /lib directories.
+ ==>
+ ==> Internally we have removed the link and then mv /lib64 /lib. Same to /usr/lib64.
+ ==> /lib64 and /usr/lib64 shouldn't exist anymore. If any package still installs to
+ ==> /lib64 or /usr/lib64 let us know.
+ ==>
+_EOF
+
+# now the moving
+rm -rf /lib/tls && echo "/lib/tls removed"
+ldconfig -r .
+rm -f /usr/lib
+mv /usr/lib64 /usr/lib && echo "/usr/lib64 moved"
+rm -f /lib
+mv /lib64 /lib && echo "/lib64 moved"
+
+ fi
+fi
+}
+
+
+post_upgrade() {
+ echo -n "reloading init: "
+ ldconfig -r .
+ init u
+ echo "done."
+ cat << _EOF
+ ==> ATTENTION INTERNATIONAL USERS:
+ ==>
+ ==> Locales are no longer included in the glibc package.
+ ==> They are generated by /usr/sbin/locale-gen depending on the contents
+ ==> of /etc/locale.gen.
+ ==> glibc will try to autodetect the required locales now, if you need
+ ==> additional locales, please enable them in /etc/locale.gen and run
+ ==> /usr/sbin/locale-gen
+ ==>
+ ==> Check /etc/locale.gen.pacnew for new supported locales
+ ==>
+_EOF
+ # Check active locales, enable the ones that are in use
+ loc=("$LANG"
+ "`grep '^LOCALE=' etc/rc.conf | awk -F '=' '{ print $2 }'`")
+ for l in "${loc[@]}"; do
+ if [ ! -z "${l}" ]; then
+ line="`grep -i "^#${l}[[:space:]]" etc/locale.gen`"
+ if [ ! -z "${line}" ]; then
+ sed -i -e "s|${line}|${line/\#/}|" etc/locale.gen
+ fi
+ fi
+ done
+
+ usr/sbin/locale-gen
+
+# fix CHOST for arch64
+if [ "`uname -m`" = "x86_64" ]; then
+ if [ "`vercmp $2 2.4`" -lt 0 ]; then
+ sed -i s/'x86_64-pc-linux-gnu'/'x86_64-unknown-linux-gnu'/ /etc/makepkg.conf && \
+ echo "in /etc/makepkg.conf CHOST has been changed to \"x86_64-unknown-linux-gnu\""
+
+ # we remove files from glibc 2.3.6 that are not removed automatically
+ rm -f /lib/ld-2.3.* && echo "removing unneeded old files"
+ rm -f /lib/libBrokenLocale-2.3.*
+ rm -f /lib/libNoVersion*
+ rm -f /lib/libanl-2.3.*
+ rm -f /lib/libc-2.3.*
+ rm -f /lib/libcidn-2.3.*
+ rm -f /lib/libcrypt-2.3.*
+ rm -f /lib/libdl-2.3.*
+ rm -f /lib/libm-2.3.*
+ rm -f /lib/libnsl-2.3.*
+ rm -f /lib/libnss1*
+ rm -f /lib/libnss_compat-2.3.*
+ rm -f /lib/libnss_dns-2.3.*
+ rm -f /lib/libnss_dns.so.1
+ rm -f /lib/libnss_files-2.3.*
+ rm -f /lib/libnss_files.so.1
+ rm -f /lib/libnss_hesiod-2.3.*
+ rm -f /lib/libnss_nis-2.3.*
+ rm -f /lib/libnss_nis.so.1
+ rm -f /lib/libnss_nisplus-2.3.*
+ rm -f /lib/libpthread-0.10.so
+ rm -f /lib/libresolv-2.3.*
+ rm -f /lib/librt-2.3.*
+ rm -f /lib/libutil-2.3.*
+ rm -fR /lib/nosegneg
+ #rm -fR /usr/include/asm
+ #rm -fR /usr/include/linux
+ rm -fR /usr/include/ntpl
+ rm -f /usr/lib/libNoVersion*
+ rm -f /usr/lib/libc_stubs.a
+ rm -f /usr/lib/libnss1*
+ rm -f /usr/lib/libnss_compat.so.1
+ rm -f /usr/lib/libnss_dns.so.1
+ rm -f /usr/lib/libnss_files.so.1
+ rm -f /usr/lib/libnss_nis.so.1
+ rm -fR /usr/lib/nptl
+ rm -f /usr/sbin/nscd_nischeck
+ rm -fR /usr/share/zoneinfo/SystemV
+ rm -fR /usr/share/zoneinfo/posix/SystemV
+ rm -fR /usr/share/zoneinfo/right/SystemV
+ ldconfig -r .
+ fi
+fi
+
+}
+
+op=$1
+shift
+$op $*