upgrading glibc-2.40 -> 2.41

"tjoen" ([email protected] via blfs-support Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.support
Organization dds.nl
Message-ID <[email protected]>
rpm based (B)LFS
I installed it on a chrooted /mnt/
But after chroot only segfaults
Is it really necessary to rebuild all packages?
Below are the two versions of glibc

%define debug_package %{nil}
%define gccver 14.2.0
Release: 2
Version: 2.40
Group: System Environment/Libraries
License: GPL
Name: glibc
Patch0: glibc-2.40-fhs-1.patch
Provides: rtld(GNU_HASH)
Source0: ftp.gnu.org/pub/gnu/glibc/%name-%version.tar.xz
Summary: GNU C Library
%description

%prep
%setup -q
%patch 0 -p1
mkdir build

%build
cd build/
../configure --prefix=/usr --disable-static --enable-kernel=4.19 \
   --enable-stack-protector=strong --disable-nscd
make

%install
[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf 
$RPM_BUILD_ROOT
cd build/
make install_root=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT/
cat > etc/hosts <<EOF
# NAG 5.6; Net HOWTO 5.5.5
127.0.0.1      localhost localhost.localdomain
EOF
rm etc/ld.so.cache
install -d usr/lib/locale
rm -f usr/share/info/dir
mkdir lib64/glibc
mv lib64/*.so.* lib64/glibc/

%clean
[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf 
$RPM_BUILD_ROOT

%pre
rpm -e --justdb --nodeps glibc

%post
install-info --info-dir=/usr/share/info /usr/share/info/libc.info.gz
localedef -i nl_NL -f UTF-8 nl_NL.UTF-8
localedef -i en_US -f UTF-8 en_US.UTF-8
touch /var/log/wtmp
install lib64/glibc/*.so.* lib64/

%files
%defattr(-,root,root)
%config(noreplace) /etc/hosts
%config /etc/rpc
/lib64/*
/sbin/*
/usr/bin/*
/usr/include/*
/usr/lib/*
/usr/libexec/getconf
/usr/sbin/*
%doc COPYING.LIB LICENSES localedata/SUPPORTED
/usr/share/i18n
%doc /usr/share/info/libc.info*.gz
/usr/share/locale/locale.alias
/usr/share/locale/*/LC_MESSAGES/libc.mo
/var/lib/nss_db

%changelog
* Wed Jan  8 2025 tjoen
- patch
...
************
%define debug_package %{nil}
%define gccver 14.2.0
Release: 1
Version: 2.41
Group: System Environment/Libraries
License: GPL
Name: glibc
Patch0: glibc-%version-fhs-1.patch
Provides: rtld(GNU_HASH)
Source0: ftp.gnu.org/pub/gnu/glibc/%name-%version.tar.xz
Summary: GNU C Library
%description

%prep
%setup -q
%patch 0 -p1
mkdir build

%build
cd build/
../configure --prefix=/usr --disable-static --enable-kernel=5.4 \
   --enable-stack-protector=strong --disable-nscd
make

#scriplet failed
#%pre
#rpm -e --justdb --nodeps glibc

%install
[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf 
$RPM_BUILD_ROOT
cd build/
make install_root=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT/
cat > etc/hosts <<EOF
# NAG 5.6; Net HOWTO 5.5.5
127.0.0.1      localhost localhost.localdomain
EOF
rm etc/ld.so.cache
install -d usr/lib/locale
rm -f usr/share/info/dir
mkdir lib64/glibc
mv lib64/*.so.* lib64/glibc/

%post
install-info --info-dir=/usr/share/info /usr/share/info/libc.info.gz
localedef -i nl_NL -f UTF-8 nl_NL.UTF-8
localedef -i en_US -f UTF-8 en_US.UTF-8
touch /var/log/wtmp
cd /usr/lib/
chmod a+x audit/sotruss-lib.so gconv/*.so lib*.so
cd /lib64/
chmod a+x libmemusage.so libpcprofile.so
install glibc/*.so.* .

%clean
[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf 
$RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%config(noreplace) /etc/hosts
%config /etc/rpc
/lib64/*
/sbin/*
/usr/bin/*
/usr/include/*
/usr/lib/*
/usr/libexec/getconf
/usr/sbin/*
%doc COPYING.LIB LICENSES localedata/SUPPORTED
/usr/share/i18n
%doc /usr/share/info/libc.info*.gz
/usr/share/locale/locale.alias
/usr/share/locale/*/LC_MESSAGES/libc.mo
/var/lib/nss_db

%changelog
* Tue Jun 24 2025 tjoen
- 2.40 kernel-6.13.6

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.