Commit 17a29645 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded glibc to 2.33

parent 51b78813
all: nsswitch.conf ld.so.conf
tar xf glibc-2.31.tar.xz
patch -Np1 -d glibc-2.31 < glibc-2.31-fhs-1.patch
patch -Np1 -d glibc-2.31 < glibc-2.31-no_lib64_and_libx32.patch
tar xf glibc-2.33.tar.xz
patch -Np1 -d glibc-2.33 < glibc-2.33-fhs-1.patch
patch -Np1 -d glibc-2.33 < glibc-2.33-no_lib64_and_libx32.patch
$(eval LINKER=$(shell readelf -l /tools/bin/bash | sed -n 's@.*interpret.*/tools\(.*\)\]$$@\1@p'))
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.31 && sed -i 's/\\$$$$(pwd)/`pwd`/' timezone/Makefile
cd glibc-2.33 && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$(LINKER) -o|' scripts/test-installation.pl
cd glibc-2.33 && sed -i 's/\\$$$$(pwd)/`pwd`/' timezone/Makefile
mkdir glibc-build
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
cd glibc-build && ../glibc-2.33/configure --build=$(CLFS_TARGET) --host=$(CLFS_TARGET) --prefix=/usr --disable-werror --enable-kernel=$$(uname -r) --enable-stack-protector=strong libc_cv_slibdir=/lib libc_cv_include_x86_isa_level=no
$(MAKE) -C glibc-build
# FIXME: glibc tests fail, we should exclude tests which are known to fail and beyond our control
-if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
$(MAKE) -C glibc-build -k check ; \
fi
touch /etc/ld.so.conf
sed '/test-installation/s@$$(PERL)@echo not running@' -i glibc-2.31/Makefile
sed '/test-installation/s@$$(PERL)@echo not running@' -i glibc-2.33/Makefile
$(MAKE) -C glibc-build install
cp -v glibc-2.31/nscd/nscd.conf /etc/nscd.conf
cp -v glibc-2.33/nscd/nscd.conf /etc/nscd.conf
mkdir -pv /var/cache/nscd
install -v -Dm644 glibc-2.31/nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
install -v -Dm644 glibc-2.31/nscd/nscd.service /lib/systemd/system/nscd.service
install -v -Dm644 glibc-2.33/nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
install -v -Dm644 glibc-2.33/nscd/nscd.service /lib/systemd/system/nscd.service
$(MAKE) -C glibc-build localedata/install-locales
@echo "$$NSSWITCH" > /etc/nsswitch.conf
mkdir tzdata
tar xf tzdata2020a.tar.gz -C tzdata
tar xf tzdata2021a.tar.gz -C tzdata
$(eval ZONEINFO=/usr/share/zoneinfo)
mkdir -pv $(ZONEINFO)/posix
mkdir -pv $(ZONEINFO)/right
$(eval TZ=etcetera southamerica northamerica europe africa antarctica asia australasia backward pacificnew systemv)
$(eval TZ=etcetera southamerica northamerica europe africa antarctica asia australasia backward)
cd tzdata && \
for tz in $(TZ) ; do \
zic -L /dev/null -d $(ZONEINFO) -y "sh yearistype.sh" $$tz && \
zic -L /dev/null -d $(ZONEINFO)/posix -y "sh yearistype.sh" $$tz && \
zic -L leapseconds -d $(ZONEINFO)/right -y "sh yearistype.sh" $$tz ; \
zic -L /dev/null -d $(ZONEINFO) $$tz ; \
zic -L /dev/null -d $(ZONEINFO)/posix $$tz ; \
zic -L leapseconds -d $(ZONEINFO)/right $$tz ; \
done
cd tzdata && cp -v zone.tab iso3166.tab $(ZONEINFO)
cd tzdata && cp -v zone.tab zone1970.tab iso3166.tab $(ZONEINFO)
cd tzdata && zic -d $(ZONEINFO) -p America/New_York
ln -sv /usr/share/zoneinfo/GMT /etc/localtime
@echo "$$LDSOCONF" > /etc/ld.so.conf
rm -rf glibc-2.31
rm -rf glibc-2.33
rm -rf glibc-build
rm -rf tzdata
......
......@@ -4,16 +4,16 @@
<property name="makedir" value="${builddir}/glibc-build"/>
<mkdir dir="${makedir}"/>
<exec executable="tar" failonerror="true">
<arg line="xf packages/glibc/glibc-2.31.tar.xz -C ${builddir}"/>
<arg line="xf packages/glibc/glibc-2.33.tar.xz -C ${builddir}"/>
</exec>
<exec executable="${builddir}/glibc-2.31/configure" dir="${makedir}" failonerror="true">
<exec executable="${builddir}/glibc-2.33/configure" dir="${makedir}" failonerror="true">
<env key="PATH" path="${PATH}"/>
<env key="LD_LIBRARY_PATH" path=""/>
<env key="BUILD_CC" value="gcc"/>
<env key="CC" value="${CLFS_TARGET}-gcc"/>
<env key="AR" value="${CLFS_TARGET}-ar"/>
<env key="RANLIB" value="${CLFS_TARGET}-ranlib"/>
<arg line="--prefix=/tools --disable-werror --host=${CLFS_TARGET} --build=${CLFS_HOST} --with-binutils=${sysrootdir}/cross-tools/bin --with-headers=${sysrootdir}/tools/include"/>
<arg line="--prefix=/tools --disable-werror --host=${CLFS_TARGET} --build=${CLFS_HOST} --with-binutils=${sysrootdir}/cross-tools/bin --with-headers=${sysrootdir}/tools/include libc_cv_include_x86_isa_level=no"/>
</exec>
<exec executable="make" dir="${makedir}" failonerror="true">
<env key="PATH" path="${PATH}"/>
......@@ -25,7 +25,7 @@
<env key="DESTDIR" value="${sysrootdir}"/>
<arg line="install"/>
</exec>
<delete dir="${builddir}/glibc-2.31"/>
<delete dir="${builddir}/glibc-2.33"/>
<delete dir="${makedir}"/>
</target>
......
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/"
This diff is collapsed.
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.31/sysdeps/unix/sysv/linux/x86_64/64/configure 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure 2020-07-02 17:08:45.602246026 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/64/configure 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure 2022-10-01 21:34:41.796344749 +0930
@@ -4,10 +4,10 @@
test -n "$libc_cv_slibdir" ||
case "$prefix" in
......@@ -15,18 +15,18 @@ diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.31-no_l
# Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi
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.31/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2020-07-02 17:08:45.606246041 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/64/configure.ac glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/64/configure.ac 2022-10-01 21:34:41.796344749 +0930
@@ -1,4 +1,4 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/x86_64/64.
-LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
+LIBC_SLIBDIR_RTLDDIR([lib], [lib])
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.31/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2020-07-02 17:08:45.606246041 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2022-10-01 21:34:41.796344749 +0930
@@ -19,8 +19,8 @@
#define SYSDEP_KNOWN_INTERPRETER_NAMES \
......@@ -38,17 +38,17 @@ diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.31-no_lib
#define SYSDEP_KNOWN_LIBRARY_NAMES \
{ "libc.so.6", FLAG_ELF_LIBC6 }, \
{ "libm.so.6", FLAG_ELF_LIBC6 },
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.31/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2020-07-02 17:08:45.608246048 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2022-10-01 21:34:41.796344749 +0930
@@ -1,3 +1,3 @@
/LD_TRACE_LOADED_OBJECTS=1/a\
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 \2\4-x86-64\6 \2\4-x32\6"_
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.31/sysdeps/unix/sysv/linux/x86_64/x32/configure 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure 2020-07-02 17:08:45.609246052 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/x32/configure 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure 2022-10-01 21:34:41.796344749 +0930
@@ -6,10 +6,10 @@
test -n "$libc_cv_slibdir" ||
case "$prefix" in
......@@ -63,9 +63,9 @@ diff -uNr glibc-2.31/sysdeps/unix/sysv/linux/x86_64/x32/configure glibc-2.31-no_
# Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi
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.31/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2020-02-01 22:22:50.000000000 +1030
+++ glibc-2.31-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2020-07-02 17:08:45.609246052 +0930
diff -uNr glibc-2.33/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac
--- glibc-2.33/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2021-02-02 03:45:33.000000000 +1030
+++ glibc-2.33-no_lib64_and_libx32/sysdeps/unix/sysv/linux/x86_64/x32/configure.ac 2022-10-01 21:34:41.796344749 +0930
@@ -3,4 +3,4 @@
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