summaryrefslogtreecommitdiffstats
path: root/source/l/glibc
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/glibc')
-rw-r--r--source/l/glibc/doinst.sh-glibc47
-rw-r--r--source/l/glibc/doinst.sh-glibc-solibs9
-rwxr-xr-xsource/l/glibc/glibc.SlackBuild54
-rw-r--r--source/l/glibc/glibc.pkey_get.56170e0.diff28
4 files changed, 49 insertions, 89 deletions
diff --git a/source/l/glibc/doinst.sh-glibc b/source/l/glibc/doinst.sh-glibc
index 4ce7c1a08..e2c7d3ef1 100644
--- a/source/l/glibc/doinst.sh-glibc
+++ b/source/l/glibc/doinst.sh-glibc
@@ -84,7 +84,7 @@ if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
done
)
) 9> run/lock/pkgtools/ldconfig.lock
-else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+else # no ldconfig? This is a broken situation, but we will do what we can:
( cd lib/incoming
for file in * ; do
cp -a $file ..
@@ -114,6 +114,11 @@ config etc/profile.d/glibc.sh.new
rm -f etc/profile.d/glibc.csh.new
rm -f etc/profile.d/glibc.sh.new
+# This block below *should* be dead code, but it's probably safer to leave it
+# here as a fallback. It no longer has complete coverage of all the links
+# that would be needed in /lib${LIBDIRSUFFIX}, but it covers enough that if
+# we did fall back on this the machine would boot until it reached the boot
+# time call to ldconfig, which would then take care of any missing links.
# In case there's no ldconfig, make the links manually:
if [ ! -x /sbin/ldconfig ]; then
( cd lib ; rm -rf libnss_nis.so.2 )
@@ -157,43 +162,3 @@ if [ ! -x /sbin/ldconfig ]; then
fi
# More links:
-( cd usr/lib ; rm -rf libnss_nisplus.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_nisplus.so.2 libnss_nisplus.so )
-# This is now a linker script:
-#( cd usr/lib ; rm -rf libpthread.so )
-#( cd usr/lib ; ln -sf ../../lib/libpthread.so.0 libpthread.so )
-( cd usr/lib ; rm -rf libresolv.so )
-( cd usr/lib ; ln -sf ../../lib/libresolv.so.2 libresolv.so )
-( cd usr/lib ; rm -rf libnsl.so )
-( cd usr/lib ; ln -sf ../../lib/libnsl.so.1 libnsl.so )
-( cd usr/lib ; rm -rf libnss_hesiod.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_hesiod.so.2 libnss_hesiod.so )
-( cd usr/lib ; rm -rf libnss_files.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_files.so.2 libnss_files.so )
-# This is now a linker script:
-#( cd usr/lib ; rm -rf libm.so )
-#( cd usr/lib ; ln -sf ../../lib/libm.so.6 libm.so )
-( cd usr/lib ; rm -rf libutil.so )
-( cd usr/lib ; ln -sf ../../lib/libutil.so.1 libutil.so )
-( cd usr/lib ; rm -rf libnss_compat.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_compat.so.2 libnss_compat.so )
-( cd usr/lib ; rm -rf libthread_db.so )
-( cd usr/lib ; ln -sf ../../lib/libthread_db.so.1 libthread_db.so )
-( cd usr/lib ; rm -rf libcrypt.so )
-( cd usr/lib ; ln -sf ../../lib/libcrypt.so.1 libcrypt.so )
-( cd usr/lib ; rm -rf libBrokenLocale.so )
-( cd usr/lib ; ln -sf ../../lib/libBrokenLocale.so.1 libBrokenLocale.so )
-( cd usr/lib ; rm -rf libdl.so )
-( cd usr/lib ; ln -sf ../../lib/libdl.so.2 libdl.so )
-( cd usr/lib ; rm -rf libnss_dns.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_dns.so.2 libnss_dns.so )
-( cd usr/lib ; rm -rf librt.so )
-( cd usr/lib ; ln -sf ../../lib/librt.so.1 librt.so )
-( cd usr/lib ; rm -rf libanl.so )
-( cd usr/lib ; ln -sf ../../lib/libanl.so.1 libanl.so )
-( cd usr/lib ; rm -rf libnss_nis.so )
-( cd usr/lib ; ln -sf ../../lib/libnss_nis.so.2 libnss_nis.so )
-( cd usr/share/zoneinfo ; rm -rf localtime )
-( cd usr/share/zoneinfo ; ln -sf /etc/localtime localtime )
-( cd bin ; rm -rf sln )
-( cd bin ; ln -sf /sbin/sln sln )
diff --git a/source/l/glibc/doinst.sh-glibc-solibs b/source/l/glibc/doinst.sh-glibc-solibs
index 570f427d7..3d4466043 100644
--- a/source/l/glibc/doinst.sh-glibc-solibs
+++ b/source/l/glibc/doinst.sh-glibc-solibs
@@ -84,7 +84,7 @@ if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
done
)
) 9> run/lock/pkgtools/ldconfig.lock
-else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+else # no ldconfig? This is a broken situation, but we will do what we can:
( cd lib/incoming
for file in * ; do
cp -a $file ..
@@ -113,7 +113,11 @@ config etc/profile.d/glibc.sh.new
rm -f etc/profile.d/glibc.csh.new
rm -f etc/profile.d/glibc.sh.new
-# In case there's no ldconfig, make the links manually:
+# This block below *should* be dead code, but it's probably safer to leave it
+# here as a fallback. It no longer has complete coverage of all the links
+# that would be needed in /lib${LIBDIRSUFFIX}, but it covers enough that if
+# we did fall back on this the machine would boot until it reached the boot
+# time call to ldconfig, which would then take care of any missing links.
if [ ! -x /sbin/ldconfig ]; then
( cd lib ; rm -rf libnss_nis.so.2 )
( cd lib ; ln -sf libnss_nis-@@VERSION@@.so libnss_nis.so.2 )
@@ -154,3 +158,4 @@ if [ ! -x /sbin/ldconfig ]; then
( cd lib ; rm -rf librt.so.1 )
( cd lib ; ln -sf librt-@@VERSION@@.so librt.so.1 )
fi
+
diff --git a/source/l/glibc/glibc.SlackBuild b/source/l/glibc/glibc.SlackBuild
index 4bb09e632..33b4c6021 100755
--- a/source/l/glibc/glibc.SlackBuild
+++ b/source/l/glibc/glibc.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=glibc
VERSION=${VERSION:-$(echo glibc-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
CHECKOUT=${CHECKOUT:-""}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-2}
# I was considering disabling NSCD, but MoZes talked me out of it. :)
#DISABLE_NSCD=" --disable-nscd "
@@ -155,8 +155,6 @@ apply_patches() {
zcat $CWD/glibc.ru_RU.CP1251.diff.gz | patch -p1 --verbose || exit 1
# Add a C.UTF-8 locale:
zcat $CWD/glibc-c-utf8-locale.patch.gz | patch -p1 --verbose || exit 1
- # Linux: use reserved name __key in pkey_get [BZ #22797]:
- zcat $CWD/glibc.pkey_get.56170e0.diff.gz | patch -p1 --verbose || exit 1
}
# This is going to be the initial $DESTDIR:
@@ -249,6 +247,25 @@ make $NUMJOBS || make || exit 1
make install install_root=$PKG || exit 1
make localedata/install-locales install_root=$PKG || exit 1
+# We've always had an sln symlink in /bin, so let's make sure it
+# remains there so as not to break any scripts that might need it:
+mkdir -p $PKG/bin
+( cd $PKG/bin ; ln -sf /sbin/sln sln )
+
+# This bit was mostly copped from Fedora Rawhide's .spec file. I'm not
+# entirely sure how important it is, since I'm not aware of anything
+# we ship trying to link libpthread as static. What it does is make sure
+# that anything linking libpthread static includes all of the functions
+# so that the resulting binary doesn't rely on parts of the library that
+# were not linked in. Optimizing actually working over binary size, so
+# to speak.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ gcc -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
+ rm libpthread.a
+ ar rcs libpthread.a libpthread.o
+ rm libpthread.o
+)
+
# The prevailing standard seems to be putting unstripped libraries in
# /usr/lib/debug/ and stripping the debugging symbols from all the other
# libraries.
@@ -392,9 +409,6 @@ mkdir -p usr/lib${LIBDIRSUFFIX}
# The gconv directory has a lot of stuff, but including it here will save some problems.
# Seems standard elsewhere.
cp -a $PKG/usr/lib${LIBDIRSUFFIX}/gconv usr/lib${LIBDIRSUFFIX}
-# Another manpage abandoned by GNU...
-#mkdir -p usr/man/man1
-#cp -a $PKG/usr/man/man1/ldd.1.gz usr/man/man1
mkdir -p usr/libexec
cp -a $PKG/usr/libexec/pt_chown usr/libexec
# Same usr.bin deal:
@@ -405,10 +419,15 @@ mv ldconfig sbin
mkdir install
cp -a $CWD/slack-desc.glibc-solibs install/slack-desc
cp -a $CWD/doinst.sh-glibc-solibs install/doinst.sh
-fix_doinst
+# Fix specific versioning for the symlink creation script. This part of the
+# script would only be used in the case where there is no ldconfig on the
+# running system that's used to install the package. That should never be the
+# case, but we'll leave the code in place anyway just in case.
sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
-# Ditch links:
-find . -type l -exec rm {} \;
+# Call the function to fix doinst.sh where $LIBDIRSUFFIX is needed:
+fix_doinst
+# Only scrub the links in /lib{,64} that will be created by ldconfig:
+find lib${LIBDIRSUFFIX} -type l -exec rm {} \;
# Build the package:
makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
@@ -420,18 +439,18 @@ mkdir -p etc/profile.d
cp -a $CWD/profile.d/* etc/profile.d
chown -R root:root etc
chmod 755 etc/profile.d/*
-# Ditch links (these are in doinst.sh-glibc):
-find . -type l -exec rm {} \;
-# libm.so is *not* a linker script on all $ARCH.
-# If it's missing now, replace the symlink:
-if [ ! -r usr/lib${LIBDIRSUFFIX}/libm.so ]; then
- ( cd usr/lib${LIBDIRSUFFIX} ; ln -sf ../../lib${LIBDIRSUFFIX}/libm.so.6 libm.so )
-fi
+# Only scrub the links in /lib{,64} that will be created by ldconfig:
+find lib${LIBDIRSUFFIX} -type l -exec rm {} \;
mkdir install
cp -a $CWD/slack-desc.glibc install/slack-desc
cp -a $CWD/doinst.sh-glibc install/doinst.sh
-fix_doinst
+# Fix specific versioning for the symlink creation script. This part of the
+# script would only be used in the case where there is no ldconfig on the
+# running system that's used to install the package. That should never be the
+# case, but we'll leave the code in place anyway just in case.
sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
+# Call the function to fix doinst.sh where $LIBDIRSUFFIX is needed:
+fix_doinst
( cd lib${LIBDIRSUFFIX}
mkdir incoming
mv *so* incoming
@@ -443,4 +462,3 @@ sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
# Done!
echo
echo "glibc packages built in $TMP!"
-
diff --git a/source/l/glibc/glibc.pkey_get.56170e0.diff b/source/l/glibc/glibc.pkey_get.56170e0.diff
deleted file mode 100644
index d7111fbae..000000000
--- a/source/l/glibc/glibc.pkey_get.56170e0.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-From 56170e064e2b21ce204f0817733e92f1730541ea Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <ignatenko@redhat.com>
-Date: Wed, 7 Feb 2018 13:53:10 +0100
-Subject: [PATCH] Linux: use reserved name __key in pkey_get [BZ #22797]
-
-_key is not reserved name and we should avoid using that. It seems that
-it was simple typo when pkey_* was implemented.
-
-(cherry picked from commit 388ff7bd0d57d7061fdd39a2f26f65687e8058da)
----
- sysdeps/unix/sysv/linux/bits/mman-shared.h | 2 +-
- 1 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
-index 7715e68..d15ba95 100644
---- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
-+++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
-@@ -61,7 +61,7 @@ int pkey_set (int __key, unsigned int __access_rights) __THROW;
-
- /* Return the access rights for the current thread for KEY, which must
- have been allocated using pkey_alloc. */
--int pkey_get (int _key) __THROW;
-+int pkey_get (int __key) __THROW;
-
- /* Free an allocated protection key, which must have been allocated
- using pkey_alloc. */
---
-2.9.3