| Newsgroups |
gmane.linux.lfs.support |
| Message-ID |
<[email protected]> |
On 1/6/25 01:35, tjoen ([email protected] via lfs-support Mailing List) wrote:
> On 1/5/25 8:40 PM, Pocket ([email protected] via lfs-support
> Mailing List) wrote:
> ..
>>> On 1/5/25 10:18 AM, tjoen ([email protected] via lfs-support Mailing
>>> List) wrote:
> >>> 1. add in %pr0yWe
> >>> rpm -e --justdb --nodeps glibc
>>>> 2. add in %install
>>>> cd $RPM_BUILD_ROOT/
>>>> mkdir usr/lib64/glibc
>>>> mv lib64/*.so.* usr/lib64/glibc/
> >>> 3. add in %post
> >>> install /usr/lib64/glibc/*.so.* /lib64/
> ...
>> Doing so risks breaking the system completely.
>>
>> When doing glibc upgrades using rpm you need to compile the entire
>> tool chain including bash before you do the update.
>>
>> Are you using the latest rpm?
>> The later rpm version’s do a better job updating packages
>>
>> You should have tried to work with/ around rpm but what you did was to
>> compromise rpm’s installed database.
>
> Yes I discovered that twice.
> The %pre script didn't work
> But point #2 did the job
> Performing the %pre script manually works
> Point #2 is essential for
> rpm -i --noscripts
> After that point #3 manually
>
> Not tested all programs but it looks like everything works
> Even rpm querying the database. Not tested with newer rpms
> except the toolchains which were built with glibc-2.39
> Need confirmation by others
>
I was not talking about whether you had newer versions of packages.
What version of rpm are you using?
RPM 4.20.0 released (Oct 07 2024) is the latest.
I don't think you understand. You compromised the rpm database so it is
not accurate and no longer represents what is actually installed. This
usually results in failures down the road, but hey it's your system.
In a proper controlled/installed system glibc should update just fine
just like all the other packages. There isn't any differences.
From my last build, no longer maintained because I am an old fart so I
am now using Archlinuxarm and also using pacman as the package manager.
Git repository:
http://git.home.arpa/?p=builderbob.git;a=blob;f=SPECS/glibc.spec;h=c1e55780733814e45ae0eeea5266d893f3baac15;hb=HEAD
1 Summary: GNU C Library
2 Name: glibc
3 Version: 2.37
4 Release: 1
5 License: GPL
6 Group: Core
7 URL: http://www.gnu.org/software/libc
8 # Source
9 Source0: http://source.home.arpa/Packages/glibc/glibc-2.37.tar.xz
10 Source1: http://source.home.arpa/Packages/glibc/locale-gen
11 Source2: http://source.home.arpa/Packages/glibc/locale.gen.txt
12 Source3: http://source.home.arpa/Packages/glibc/sdt.h
13 Source4: http://source.home.arpa/Packages/glibc/sdt-config.h
14 Source5: http://source.home.arpa/Packages/glibc/reenable_DT_HASH.patch
15 Source6: http://source.home.arpa/Packages/glibc/tmpfiles
16 #Source7:
http://source.home.arpa/Packages/glibc/glibc-nscd-time_t.patch
17 #Source7: http://source.home.arpa/Packages/glibc/glibc-nscd.patch
18 Provides: rtld(GNU_HASH)
19 BuildRequires: linux-api-headers
20 %description
21 GNU C Library
22
23 %prep
24 %setup -q -n %{name}-%{version}
25 cp %{SOURCE3} include/
26 cp %{SOURCE4} include/
27 sed '/MAKEFLAGS :=/s/)r/) -r/' -i Makerules
28 #sed '/installed-modules/s/nscd//' -i Makeconfig
29 # reenable_DT_HASH.patch
30 patch -Np1 -i %{SOURCE5}
31 # fix nscd to use 64 bit time_t
32 # patch -Np1 -i %{SOURCE7}
33 mkdir build
34
35 %build
36 cd build
37 _options=(--prefix=/usr
38 --with-headers=/usr/include
39 # --with-bugurl=https://bugs.home.arpa/
40 --enable-bind-now
41 # --enable-cet
42 # --enable-kernel=4.4
43 --enable-kernel=5.10
44 # --enable-multi-arch
45 --enable-stack-protector=strong
46 # --enable-systemtap
47 --disable-crypt
48 --disable-profile
49 --disable-werror
50 #
51 --sysconfdir=/etc
52 --libdir=/usr/lib
53 --libexecdir=/usr/lib
54 --disable-multi-arch
55 # --disable-timezone-tools
56 --enable-memory-tagging
57 --disable-bootstrap)
58 echo "slibdir=/usr/lib" >> configparms
59 echo "rtlddir=/usr/lib" >> configparms
60 echo "sbindir=/usr/bin" >> configparms
61 echo "rootsbindir=/usr/bin" >> configparms
62 ../configure "${_options[@]}"
63 # make
64 %{make_build}
65 # pregenerate C.UTF-8 locale until it is built into glibc
66 # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8,
FS#74864)-
67 elf/ld.so --library-path "$PWD" locale/localedef -c -f
../localedata/charmaps/UTF-8 -i ../localedata/locales/C ./C.UTF-8/
68
69 %install
70 cd build
71 make install_root=%{buildroot} install
72 unlink %{buildroot}/etc/ld.so.cache
73 # Shipped in tzdata
74 rm -f %{buildroot}/usr/bin/{tzselect,zdump,zic}
75 install -dm755 %{buildroot}/usr/lib/{locale,systemd/system,tmpfiles.d}
76 install -m644 ../nscd/nscd.conf %{buildroot}/etc/nscd.conf
77 install -m644 ../nscd/nscd.service %{buildroot}/usr/lib/systemd/system
78 install -m644 ../nscd/nscd.tmpfiles
%{buildroot}/usr/lib/tmpfiles.d/nscd.conf
79 install -m644 ../posix/gai.conf %{buildroot}/etc/gai.conf
80 # LOCALES
81 install -m755 %{SOURCE1} %{buildroot}/usr/bin
82 install -m644 %{SOURCE2} %{buildroot}/etc/locale-gen.conf
83 sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g'
../localedata/SUPPORTED >> %{buildroot}/etc/locale-gen.conf
84 sed 's/^#en_US/en_US/' -i %{buildroot}/etc/locale-gen.conf
85 # Add SUPPORTED file to pkg
86 sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' ../localedata/SUPPORTED >
%{buildroot}/usr/share/i18n/SUPPORTED
87 # install C.UTF-8 so that it is always available
88 install -dm755 %{buildroot}/usr/lib/locale
89 cp -r ./C.UTF-8 -t %{buildroot}/usr/lib/locale
90 sed -i '/#C\.UTF-8 /d' -i %{buildroot}/etc/locale-gen.conf
91 # Provide tracing probes to libstdc++ for exceptions,
possibly for other
92 # libraries too. Useful for gdb's catch command.
93 #install -Dm644 %{SOURCE3} %{buildroot}/usr/include/sys/sdt.h
94 #install -Dm644 %{SOURCE4} %{buildroot}/usr/include/sys/sdt-config.h
95 # Add tempfiles
96 install -D -m644 %{SOURCE6}
%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf
97 # Strip and remove la files
98 %strip_libs
99 %strip_binaries
100 %rm_info_dir
101 %rm_la_files
102 # Create empty directory list
103 find %{buildroot} -type d -empty -print >
"%{_topdir}/EMPTY/%{NAME}-%{VERSION}-%{RELEASE}"
104 sed 's|^%{buildroot}||' -i
%{_topdir}/EMPTY/%{NAME}-%{VERSION}-%{RELEASE}
105 # Create filelist.rpm
106 find '%{buildroot}' -ls -not -type d -print >
%{_builddir}/filelist.rpm
107 sed 's|^%{buildroot}||' -i %{_builddir}/filelist.rpm
108 sed '/ /d' -i %{_builddir}/filelist.rpm
109 # Fix files listed twice in filelist.rpm
110 backup="\/usr\/bin\/locale-gen
111 \/etc\/locale-gen.conf
112 \/etc\/gai.conf
113 \/etc\/nscd.conf"
114 for i in ${backup};do sed "/${i}/d" -i %{_builddir}/filelist.rpm;done
115
116 %files -f %{_builddir}/filelist.rpm
117 %defattr(-,root,root)
118 %attr(755,root,root) /usr/bin/locale-gen
119 %config(noreplace) /etc/locale-gen.conf
120 %config(noreplace) /etc/gai.conf
121 %config(noreplace) /etc/nscd.conf
122
123 %changelog
124 * Thu Apr 27 2023 pocket <[email protected]> 2.37-1
Notice no tom foolery is needed, it just works
--
Hindi madali ang maging ako
--
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page