Commit db352ed4 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded glibc to 2.31

parent 6b118698
all: nsswitch.conf ld.so.conf all: nsswitch.conf ld.so.conf
tar xf glibc-2.29.tar.xz tar xf glibc-2.31.tar.xz
patch -Np1 -d glibc-2.29 < glibc-2.29-fhs-1.patch patch -Np1 -d glibc-2.31 < glibc-2.31-fhs-1.patch
patch -Np1 -d glibc-2.29 < glibc-2.29-no_lib64_and_libx32.patch patch -Np1 -d glibc-2.31 < glibc-2.31-no_lib64_and_libx32.patch
$(eval LINKER=$(shell readelf -l /tools/bin/bash | sed -n 's@.*interpret.*/tools\(.*\)\]$$@\1@p')) $(eval LINKER=$(shell readelf -l /tools/bin/bash | sed -n 's@.*interpret.*/tools\(.*\)\]$$@\1@p'))
cd glibc-2.29 && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$(LINKER) -o|' scripts/test-installation.pl cd glibc-2.31 && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$(LINKER) -o|' scripts/test-installation.pl
cd glibc-2.29 && sed -i 's/\\$$$$(pwd)/`pwd`/' timezone/Makefile cd glibc-2.31 && sed -i 's/\\$$$$(pwd)/`pwd`/' timezone/Makefile
mkdir glibc-build mkdir glibc-build
cd glibc-build && ../glibc-2.29/configure --build=$(CLFS_TARGET) --host=$(CLFS_TARGET) --prefix=/usr --disable-werror --enable-kernel=$$(uname -r) --enable-stack-protector=strong libc_cv_slibdir=/lib cd glibc-build && ../glibc-2.31/configure --build=$(CLFS_TARGET) --host=$(CLFS_TARGET) --prefix=/usr --disable-werror --enable-kernel=$$(uname -r) --enable-stack-protector=strong libc_cv_slibdir=/lib
$(MAKE) -C glibc-build $(MAKE) -C glibc-build
# FIXME: glibc tests fail, we should exclude tests which are known to fail and beyond our control # FIXME: glibc tests fail, we should exclude tests which are known to fail and beyond our control
-if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \ -if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
$(MAKE) -C glibc-build -k check ; \ $(MAKE) -C glibc-build -k check ; \
fi fi
touch /etc/ld.so.conf touch /etc/ld.so.conf
sed '/test-installation/s@$$(PERL)@echo not running@' -i glibc-2.29/Makefile sed '/test-installation/s@$$(PERL)@echo not running@' -i glibc-2.31/Makefile
$(MAKE) -C glibc-build install $(MAKE) -C glibc-build install
cp -v glibc-2.29/nscd/nscd.conf /etc/nscd.conf cp -v glibc-2.31/nscd/nscd.conf /etc/nscd.conf
mkdir -pv /var/cache/nscd mkdir -pv /var/cache/nscd
install -v -Dm644 glibc-2.29/nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf install -v -Dm644 glibc-2.31/nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
install -v -Dm644 glibc-2.29/nscd/nscd.service /lib/systemd/system/nscd.service install -v -Dm644 glibc-2.31/nscd/nscd.service /lib/systemd/system/nscd.service
$(MAKE) -C glibc-build localedata/install-locales $(MAKE) -C glibc-build localedata/install-locales
@echo "$$NSSWITCH" > /etc/nsswitch.conf @echo "$$NSSWITCH" > /etc/nsswitch.conf
mkdir tzdata mkdir tzdata
tar xf tzdata2019b.tar.gz -C tzdata tar xf tzdata2020a.tar.gz -C tzdata
$(eval ZONEINFO=/usr/share/zoneinfo) $(eval ZONEINFO=/usr/share/zoneinfo)
mkdir -pv $(ZONEINFO)/posix mkdir -pv $(ZONEINFO)/posix
mkdir -pv $(ZONEINFO)/right mkdir -pv $(ZONEINFO)/right
...@@ -44,7 +44,7 @@ all: nsswitch.conf ld.so.conf ...@@ -44,7 +44,7 @@ all: nsswitch.conf ld.so.conf
@echo "$$LDSOCONF" > /etc/ld.so.conf @echo "$$LDSOCONF" > /etc/ld.so.conf
rm -rf glibc-2.29 rm -rf glibc-2.31
rm -rf glibc-build rm -rf glibc-build
rm -rf tzdata rm -rf tzdata
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<property name="makedir" value="${builddir}/glibc-build"/> <property name="makedir" value="${builddir}/glibc-build"/>
<mkdir dir="${makedir}"/> <mkdir dir="${makedir}"/>
<exec executable="tar" failonerror="true"> <exec executable="tar" failonerror="true">
<arg line="xf packages/glibc/glibc-2.29.tar.xz -C ${builddir}"/> <arg line="xf packages/glibc/glibc-2.31.tar.xz -C ${builddir}"/>
</exec> </exec>
<exec executable="${builddir}/glibc-2.29/configure" dir="${makedir}" failonerror="true"> <exec executable="${builddir}/glibc-2.31/configure" dir="${makedir}" failonerror="true">
<env key="PATH" path="${PATH}"/> <env key="PATH" path="${PATH}"/>
<env key="LD_LIBRARY_PATH" path=""/> <env key="LD_LIBRARY_PATH" path=""/>
<env key="BUILD_CC" value="gcc"/> <env key="BUILD_CC" value="gcc"/>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<env key="DESTDIR" value="${sysrootdir}"/> <env key="DESTDIR" value="${sysrootdir}"/>
<arg line="install"/> <arg line="install"/>
</exec> </exec>
<delete dir="${builddir}/glibc-2.29"/> <delete dir="${builddir}/glibc-2.31"/>
<delete dir="${makedir}"/> <delete dir="${makedir}"/>
</target> </target>
......
This diff is collapsed.
Submitted By: Armin K. <krejzi at email dot com>
Date: 2013-02-11
Initial Package Version: 2.17
Upstream Status: Not Applicable
Origin: Self
Description: This patch removes references to /var/db directory which is not part
of FHS and replaces them with more suitable directories in /var
hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
+++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
@@ -250,7 +250,7 @@
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
-vardbdir = $(localstatedir)/db
+vardbdir = $(localstatedir)/lib/nss_db
endif
inst_vardbdir = $(install_root)$(vardbdir)
--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
+++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
@@ -112,11 +112,11 @@
/* Paths of the file for the persistent storage. */
-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd"
-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup"
+#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd"
+#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group"
+#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts"
+#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services"
+#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup"
/* Path used when not using persistent storage. */
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
+++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
@@ -22,7 +22,7 @@
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
/etc/netgroup)
-VAR_DB = /var/db
+VAR_DB = /var/lib/nss_db
AWK = awk
MAKEDB = makedb --quiet
--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
+++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/nss_db/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
+++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/nss_db/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/64/configure 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure 2019-08-31 23:27:04.483150131 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure 2020-07-02 17:08:45.602246026 +0930
@@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
test -n "$libc_cv_slibdir" || test -n "$libc_cv_slibdir" ||
case "$prefix" in case "$prefix" in
...@@ -15,18 +15,18 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.29-no_l ...@@ -15,18 +15,18 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.29-no_l
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_complocaledir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure.ac glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/64/configure.ac glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2019-08-31 23:27:05.876153108 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2020-07-02 17:08:45.606246041 +0930
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/x86_64/64. # Local configure fragment for sysdeps/unix/sysv/linux/x86_64/64.
-LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) -LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
+LIBC_SLIBDIR_RTLDDIR([lib], [lib]) +LIBC_SLIBDIR_RTLDDIR([lib], [lib])
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2019-08-31 23:27:05.876153108 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2020-07-02 17:08:45.606246041 +0930
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
#define SYSDEP_KNOWN_INTERPRETER_NAMES \ #define SYSDEP_KNOWN_INTERPRETER_NAMES \
...@@ -38,17 +38,17 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.29-no_lib ...@@ -38,17 +38,17 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.29-no_lib
#define SYSDEP_KNOWN_LIBRARY_NAMES \ #define SYSDEP_KNOWN_LIBRARY_NAMES \
{ "libc.so.6", FLAG_ELF_LIBC6 }, \ { "libc.so.6", FLAG_ELF_LIBC6 }, \
{ "libm.so.6", FLAG_ELF_LIBC6 }, { "libm.so.6", FLAG_ELF_LIBC6 },
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2019-08-31 23:27:05.876153108 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2020-07-02 17:08:45.608246048 +0930
@@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
/LD_TRACE_LOADED_OBJECTS=1/a\ /LD_TRACE_LOADED_OBJECTS=1/a\
add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_ -s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \2\4-x86-64\6 \2\4-x32\6"_ +s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \2\4-x86-64\6 \2\4-x32\6"_
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/x32/configure 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure 2019-08-31 23:27:05.876153108 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure 2020-07-02 17:08:45.609246052 +0930
@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
test -n "$libc_cv_slibdir" || test -n "$libc_cv_slibdir" ||
case "$prefix" in case "$prefix" in
...@@ -63,9 +63,9 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.29-no_ ...@@ -63,9 +63,9 @@ diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.29-no_
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_complocaledir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
diff -uNr glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac
--- glibc-2.29/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2019-02-01 03:15:36.000000000 +1030 --- glibc-2.31/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.29-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2019-08-31 23:27:05.877153110 +0930 +++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2020-07-02 17:08:45.609246052 +0930
@@ -3,4 +3,4 @@ @@ -3,4 +3,4 @@
arch_minimum_kernel=3.4.0 arch_minimum_kernel=3.4.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment