source: projects/specs/trunk/g/glibc/glibc-vl.spec @ 12398

Revision 12398, 65.2 KB checked in by tomop, 4 years ago (diff)

updated 3 packages

glibc-2.31-2

gnome-terminal-3.30.3-1

libsoup-2.70.0-1

Line 
1%bcond_with gcc5
2%bcond_with systemd
3
4%define glibcversion 2.31
5%define glibcsrcdir glibc-%{glibcversion}
6%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
7### glibc.spec.in follows:
8%define run_glibc_tests 1
9%define auxarches athlon sparcv9v sparc64v alphaev6
10%if %{build_compat32}
11%define auxarches i586 athlon sparcv9 alphaev6
12%endif
13%define xenarches i686 athlon
14%ifarch %{xenarches}
15%define buildxen 1
16%define xenpackage 0
17%else
18%define buildxen 0
19%define xenpackage 0
20%endif
21%ifarch ppc64
22%define buildpower6 1
23%else
24%define buildpower6 0
25%endif
26%define biarcharches %{ix86} x86_64 ppc ppc64 s390 s390x
27%global _enable_debug_packages 1
28%define debuginfocommonarches %{biarcharches} alpha alphaev6
29%define multiarcharches ppc ppc64 %{ix86} x86_64 %{sparc}
30# Remove -s to get verbose output.
31%define silentrules PARALLELMFLAGS=-s
32
33Summary: The GNU libc libraries
34Summary(ja): GNU libc ライブラリ
35Name: glibc
36Version: %{glibcversion}
37Release: 2%{?_dist_release}%{?with_systemd:.systemd}
38# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
39# Things that are linked directly into dynamically linked programs
40# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
41# exception which allows linking it into any kind of programs or shared
42# libraries without restrictions.
43License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
44Group: System Environment/Libraries
45URL: http://www.gnu.org/software/glibc/
46Source0: https://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz
47Source1: build-locale-archive.c
48Source4: nscd.conf
49Source7: nsswitch.conf.vine
50Source8: power6emul.c
51Source9: bench.mk
52Source10: glibc-bench-compare
53# A copy of localedata/SUPPORTED in the Source0 tarball.  The
54# SUPPORTED file is used below to generate the list of locale
55# packages, using a Lua snippet.
56Source11: SUPPORTED
57
58Source1000: rpm-old-changelog.txt
59
60# patched form upstream
61Patch0: glibc-2.31-20200508.patch
62
63# patches from Fedora
64Patch1: glibc-post_upgrade.patch
65Patch2: glibc-fedora-nscd.patch
66Patch3: glibc-rh697421.patch
67Patch4: glibc-fedora-linux-tcsetattr.patch
68Patch5: glibc-rh741105.patch
69Patch6: glibc-fedora-localedef.patch
70Patch7: glibc-fedora-nis-rh188246.patch
71Patch8: glibc-fedora-manual-dircategory.patch
72Patch9: glibc-rh827510.patch
73# needed by build-locale-archive.c
74Patch10: glibc-fedora-locarchive.patch
75Patch12: glibc-rh819430.patch
76Patch13: glibc-fedora-localedata-rh61908.patch
77Patch14: glibc-fedora-__libc_multiple_libcs.patch
78Patch15: glibc-rh1070416.patch
79Patch16: glibc-nscd-sysconfig.patch
80Patch17: glibc-cs-path.patch
81Patch18: glibc-c-utf8-locale.patch
82Patch23: glibc-python3.patch
83#Patch28: glibc-rh1615608.patch
84Patch29: glibc-fedora-nsswitch.patch
85
86# patch for Vine
87#Patch10001: glibc-2.18-vine-build-env.patch
88
89# security
90
91Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
92Obsoletes: glibc-profile < 2.4
93Provides: ldconfig
94# The dynamic linker supports DT_GNU_HASH
95Provides: rtld(GNU_HASH)
96Requires: glibc-common = %{version}-%{release}
97# Require libgcc in case some program calls pthread_cancel in its %%post
98Requires(pre): basesystem, libgcc
99# This is for building auxiliary programs like memusage, nscd
100# For initial glibc bootstraps it can be commented out
101BuildRequires: gd-devel libpng-devel zlib-devel texinfo
102BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel
103BuildRequires: python3-devel
104BuildRequires: bison
105BuildRequires: /bin/ps, /bin/kill, /bin/awk
106# This is to ensure that __frame_state_for is exported by glibc
107# will be compatible with egcs 1.x.y
108BuildRequires: gcc >= 3.2
109%define enablekernel 3.2
110Conflicts: kernel < %{enablekernel}
111%ifarch i386
112%define target_cpu i486
113%else
114%define target_cpu %{_target_cpu}
115%endif
116
117%define target %{_target_cpu}-vine-linux
118%ifarch %{arm}
119%define target %{_target_cpu}-vine-linuxeabi
120%endif
121%ifarch %{power64}
122%define target ppc64-vine-linux
123%endif
124
125%ifarch %{multiarcharches}
126# Need STT_IFUNC support
127%ifarch ppc ppc64
128BuildRequires: binutils >= 2.20.51.0.2
129Conflicts: binutils < 2.20.51.0.2
130%else
131BuildRequires: binutils >= 2.19.51.0.10
132Conflicts: binutils < 2.19.51.0.10
133%endif
134# Earlier releases have broken support for IRELATIVE relocations
135Conflicts: prelink < 0.4.2
136%else
137# Need AS_NEEDED directive
138# Need --hash-style=* support
139BuildRequires: binutils >= 2.17.50.0.2-5
140%endif
141BuildRequires: gcc >= 3.2.1-5
142%ifarch ppc s390 s390x
143BuildRequires: gcc >= 4.1.0-0.17
144%endif
145%if 0%{?_enable_debug_packages}
146BuildRequires: elfutils >= 0.72
147BuildRequires: rpm >= 4.2-0.56
148%endif
149
150# The testsuite builds static C++ binaries that require a static
151# C++ runtime from libstdc++-static.
152BuildRequires: libstdc++-static
153
154BuildRequires: tzdata
155
156%define __find_provides %{SOURCE10}
157%define __find_requires %{SOURCE11}
158%define _filter_GLIBC_PRIVATE 1
159
160Vendor: Project Vine
161Distribution: Vine Linux
162
163%description
164The glibc package contains standard libraries which are used by
165multiple programs on the system. In order to save disk space and
166memory, as well as to make upgrading easier, common system code is
167kept in one place and shared between programs. This particular package
168contains the most important sets of shared libraries: the standard C
169library and the standard math library. Without these two libraries, a
170Linux system will not function.
171
172%description -l ja
173glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを
174ふくみます。ディスクスペースとメモリを節約したり、アップグレードを
175用意にするために、共通のシステムコードは一つの場所におかれ、プログラム
176間で共有されます。この部分的なパッケージはシェアドライブラリのかなり
177重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。
178この二つのライブラリ抜きでは、Linux システムは機能しません。
179
180%package -n compat32-%{name}
181Summary: The GNU libc libraries.
182Summary(ja): GNU libc ライブラリ
183Group: System Environment/Libraries
184Requires: %{name} >= %{version}-%{release}
185
186%description -n compat32-%{name}
187The glibc package contains standard libraries which are used by
188multiple programs on the system. In order to save disk space and
189memory, as well as to make upgrading easier, common system code is
190kept in one place and shared between programs. This particular package
191contains the most important sets of shared libraries: the standard C
192library and the standard math library. Without these two libraries, a
193Linux system will not function.
194
195%description -n compat32-%{name} -l ja
196glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを
197ふくみます。ディスクスペースとメモリを節約したり、アップグレードを
198用意にするために、共通のシステムコードは一つの場所におかれ、プログラム
199間で共有されます。この部分的なパッケージはシェアドライブラリのかなり
200重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。
201この二つのライブラリ抜きでは、Linux システムは機能しません。
202
203%if %{xenpackage}
204%package xen
205Summary: The GNU libc libraries (optimized for running under Xen)
206Group: System Environment/Libraries
207Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release}
208
209%description xen
210The standard glibc package is optimized for native kernels and does not
211perform as well under the Xen hypervisor.  This package provides alternative
212library binaries that will be selected instead when running under Xen.
213
214Install glibc-xen if you might run your system under the Xen hypervisor.
215%endif
216
217%package devel
218Summary: Object files for development using standard C libraries.
219Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル
220Group: Development/Libraries
221Requires(pre): /sbin/install-info
222Requires(pre): %{name}-headers
223Requires: %{name}-headers = %{version}-%{release}
224Requires: %{name} = %{version}-%{release}
225
226%description devel
227The glibc-devel package contains the object files necessary
228for developing programs which use the standard C libraries (which are
229used by nearly all programs).  If you are developing programs which
230will use the standard C libraries, your system needs to have these
231standard object files available in order to create the
232executables.
233
234Install glibc-devel if you are going to develop programs which will
235use the standard C libraries.
236
237%description devel -l ja
238glibc-devel パッケージには (ほとんどすべてのプログラムで使われる)
239標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが
240含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
241これらオブジェクトファイルを使用して実行ファイルを作成できます。
242
243標準 C ライブラリを使用するプログラムを開発するなら glibc-devel
244をインストールしてください。
245
246%package -n compat32-%{name}-devel
247Summary: Object files for development using standard C libraries.
248Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル
249Group: Development/Libraries
250Requires: %{name}-devel = %{version}-%{release}
251Requires: compat32-%{name} = %{version}-%{release}
252
253%description -n compat32-%{name}-devel
254The glibc-devel package contains the object files necessary
255for developing programs which use the standard C libraries (which are
256used by nearly all programs).  If you are developing programs which
257will use the standard C libraries, your system needs to have these
258standard object files available in order to create the
259executables.
260
261Install glibc-devel if you are going to develop programs which will
262use the standard C libraries.
263
264%description -n compat32-%{name}-devel -l ja
265glibc-devel パッケージには (ほとんどすべてのプログラムで使われる)
266標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが
267含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
268これらオブジェクトファイルを使用して実行ファイルを作成できます。
269
270標準 C ライブラリを使用するプログラムを開発するなら glibc-devel
271をインストールしてください。
272
273%package static
274Summary: C library static libraries for -static linking.
275Summary(ja): -static リンクのための静的 C ライブラリ
276Group: Development/Libraries
277Requires: %{name}-devel = %{version}-%{release}
278
279%description static
280The glibc-static package contains the C library static libraries
281for -static linking.  You don't need these, unless you link statically,
282which is highly discouraged.
283
284%description static -l ja
285glibc-static パッケージには -static リンクで使用する静的 C ライブラリが
286入っています。
287静的ライブラリが必要な場合でなければ、このパッケージをインストールする
288ことは避けて下さい。
289
290%package -n compat32-%{name}-static
291Summary: C library static libraries for -static linking.
292Summary(ja): -static リンクのための静的 C ライブラリ
293Group: Development/Libraries
294Requires: %{name}-devel = %{version}-%{release}
295Requires: %{name}-static = %{version}-%{release}
296Requires: compat32-%{name}-devel = %{version}-%{release}
297
298%description -n compat32-%{name}-static
299The glibc-static package contains the C library static libraries
300for -static linking.  You don't need these, unless you link statically,
301which is highly discouraged.
302
303%description -n compat32-%{name}-static -l ja
304glibc-static パッケージには -static リンクで使用する静的 C ライブラリが
305入っています。
306静的ライブラリが必要な場合でなければ、このパッケージをインストールする
307ことは避けて下さい。
308
309%package headers
310Summary: Header files for development using standard C libraries.
311Summary(ja): 標準 C ライブラリで使われるヘッダーファイル
312Group: Development/Libraries
313Provides: %{name}-headers(%{_target_cpu})
314%ifarch x86_64
315# If both -m32 and -m64 is to be supported on AMD64, x86_64 glibc-headers
316# have to be installed, not i586 ones.
317Obsoletes: %{name}-headers(i586)
318Obsoletes: %{name}-headers(i686)
319%endif
320Requires(pre): kernel-headers
321Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release}
322BuildRequires: kernel-headers >= 2.6.22
323
324%description headers
325The glibc-headers package contains the header files necessary
326for developing programs which use the standard C libraries (which are
327used by nearly all programs).  If you are developing programs which
328will use the standard C libraries, your system needs to have these
329standard header files available in order to create the
330executables.
331
332Install glibc-headers if you are going to develop programs which will
333use the standard C libraries.
334
335%description headers -l ja
336glibc-headers パッケージには (ほとんどすべてのプログラムで使われる)
337標準 C ライブラリを使用したプログラムを開発するためのヘッダーファイルが
338含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
339これら標準ヘッダーファイルを使用して実行ファイルを作成できます。
340
341標準 C ライブラリを使用するプログラムを開発するなら glibc-headers
342をインストールしてください。
343
344%package common
345Summary: Common binaries and locale data for glibc
346Summary(ja): glibc 用共通バイナリとロケールデータ
347Requires: %{name} = %{version}-%{release}
348Requires: tzdata >= 2003a
349Group: System Environment/Base
350
351%description common
352The glibc-common package includes common binaries for the GNU libc
353libraries, as well as national language (locale) support.
354This package include ja and en locale-archive.
355
356%description common -l ja
357glibc-common パッケージには GNU libc ライブラリ用の共用バイナリに
358加えて、言語(ロケール)サポートや時間帯データベースが収められています。
359このパッケージには日本語と英語のみの locale-archive が含まれます。
360
361%package common-extra
362Summary: Extra Locale data for glibc
363Summary(ja): glibc 用ロケールデータ(日本語以外)
364Autoreq: false
365Requires(pre): %{name}-common = %{version}-%{release}
366Group: System Environment/Base
367
368%description common-extra
369The glibc-common-extra package includes national language (locale)
370support except for English and Japanese.
371
372%description common-extra -l ja
373glibc-common-extra パッケージには GNU libc ライブラリ用の英語と
374日本語以外の言語(ロケール)が収められています。
375
376%package locale-source
377Summary: The sources for the locales of glibc
378Summary(ja): glibc 用ロケールデータのソース
379Requires: %{name} = %{version}-%{release}
380Requires: %{name}-common = %{version}-%{release}
381
382%description locale-source
383The sources for all locales provided in glibc. If you are building
384custom locales you will most likely use these sources as the basis
385for your new locale.
386
387%package -n nscd
388Summary: A Name Service Caching Daemon (nscd).
389Summary(ja): ネームサービスキャッシングデーモン (nscd)
390Group: System Environment/Daemons
391Requires: %{name} = %{version}-%{release}
392Requires: audit-libs >= 1.1.3
393Requires(pre): /usr/sbin/useradd, coreutils
394Requires(postun): /usr/sbin/userdel
395%if %{with systemd}
396Requires(post): systemd
397Requires(preun): systemd
398Requires(postun): systemd
399%else
400Requires(pre): /sbin/chkconfig
401%endif
402
403%description -n nscd
404Nscd caches name service lookups and can dramatically improve
405performance with NIS+, and may help with DNS as well.
406
407%description -n nscd -l ja
408nscd はネームサービス参照をキャッシュし、NIS+ のパフォーマンスを
409劇的にに改善することができます。DNS のパフォーマンス向上にも同様に寄与します。
410
411%package utils
412Summary: Development utilities from GNU C library
413Summary(ja): GNU C ライブラリの開発ユーティリティ
414Group: Development/Tools
415Requires: %{name} = %{version}-%{release}
416
417%description utils
418The glibc-utils package contains memusage, a memory usage profiler,
419mtrace, a memory leak tracer and xtrace, a function call tracer
420which can be helpful during program debugging.
421
422If unsure if you need this, don't install this package.
423
424%description utils -l ja
425glibc-utils にはプログラムのデバッグに便利な以下のツールが収録されています:
426memusage (メモリ使用量プロファイラ)、mtrace (メモリリークトレーサ)、
427xtrace (関数呼出しトレーサ)。
428
429これらが必要かどうか分からない場合は、インストールする必要はありません。
430
431%if 0%{?_enable_debug_packages}
432%define debug_package %{nil}
433%define __debug_install_post %{nil}
434%global __debug_package 1
435
436%package debuginfo
437Summary: Debug information for package %{name}
438Group: Development/Debug
439AutoReqProv: no
440%ifarch %{debuginfocommonarches}
441Requires: glibc-debuginfo-common = %{version}-%{release}
442%else
443%ifarch %{ix86}
444Obsoletes: glibc-debuginfo-common
445%endif
446%endif
447
448%description debuginfo
449This package provides debug information for package %{name}.
450Debug information is useful when developing applications that use this
451package or when debugging this package.
452
453This package also contains static standard C libraries with
454debugging information.  You need this only if you want to step into
455C library routines during debugging programs statically linked against
456one or more of the standard C libraries.
457To use this debugging information, you need to link binaries
458with -static -L%{_prefix}/lib/debug%{_prefix}/%{_lib} compiler options.
459
460%ifarch %{debuginfocommonarches}
461
462%package debuginfo-common
463Summary: Debug information for package %{name}
464Group: Development/Debug
465AutoReqProv: no
466
467%description debuginfo-common
468This package provides debug information for package %{name}.
469Debug information is useful when developing applications that use this
470package or when debugging this package.
471
472%endif
473%endif
474
475%prep
476%autosetup -n %{glibcsrcdir} -p1
477
478# Make benchmark scripts executable
479chmod +x benchtests/scripts/*.py scripts/pylint
480
481# Remove all files generated from patching.
482find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
483
484# Ensure timestamps on configure files are current to prevent
485# regenerating them.
486touch `find . -name configure`
487
488# Ensure *-kw.h files are current to prevent regenerating them.
489touch locale/programs/*-kw.h
490
491# Verify that our copy of localedata/SUPPORTED matches the glibc
492# version.
493#
494# The separate file copy is used by the Lua parser above.
495# Patches or new upstream versions may change the list of locales,
496# which changes the set of langpacks we need to build.  Verify the
497# differences then update the copy of SUPPORTED.  This approach has
498# two purposes: (a) avoid spurious changes to the set of langpacks,
499# and (b) the Lua snippet can use a fully patched-up version
500# of the localedata/SUPPORTED file.
501diff -u %{SOURCE11} localedata/SUPPORTED
502
503cp -f %{SOURCE1000} ./
504
505%build
506
507# We build using the native system compilers.
508GCC=gcc
509GXX=g++
510
511# Part of rpm_inherit_flags.  Is overridden below.
512rpm_append_flag ()
513{
514    BuildFlags="$BuildFlags $*"
515}
516
517# Propagates the listed flags to rpm_append_flag if supplied by
518# redhat-rpm-config.
519BuildFlags="-O2 -g"
520rpm_inherit_flags ()
521{
522        local reference=" $* "
523        local flag
524        for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do
525                if echo "$reference" | grep -q -F " $flag " ; then
526                        rpm_append_flag "$flag"
527                fi
528        done
529}
530
531# Propgate select compiler flags from redhat-rpm-config.  These flags
532# are target-dependent, so we use only those which are specified in
533# redhat-rpm-config.  We keep the -m32/-m32/-m64 flags to support
534# multilib builds.
535#
536# Note: For building alternative run-times, care is required to avoid
537# overriding the architecture flags which go into CC/CXX.  The flags
538# below are passed in CFLAGS.
539
540rpm_inherit_flags \
541        "-Wp,-D_GLIBCXX_ASSERTIONS" \
542        "-fasynchronous-unwind-tables" \
543%if %{without gcc5}
544        "-fstack-clash-protection" \
545%endif
546        "-funwind-tables" \
547        "-m31" \
548        "-m32" \
549        "-m64" \
550        "-march=i686" \
551        "-march=x86-64" \
552        "-march=z13" \
553        "-march=z14" \
554        "-march=zEC12" \
555        "-mfpmath=sse" \
556        "-msse2" \
557        "-mstackrealign" \
558        "-mtune=generic" \
559        "-mtune=z13" \
560        "-mtune=z14" \
561        "-mtune=zEC12" \
562        "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
563
564# Propagate additional build flags to BuildFlagsNonshared.  This is
565# very special because some of these files are part of the startup
566# code.  We essentially hope that these flags have little effect
567# there, and only specify the, for consistency, so that annobin
568# records the expected compiler flags.
569BuildFlagsNonshared=
570rpm_append_flag () {
571    BuildFlagsNonshared="$BuildFlagsNonshared $*"
572}
573rpm_inherit_flags \
574        "-Wp,-D_FORTIFY_SOURCE=2" \
575
576# Special flag to enable annobin annotations for statically linked
577# assembler code.  Needs to be passed to make; not preserved by
578# configure.
579%define glibc_make_flags_as ASFLAGS="-g -Wa,--generate-missing-build-notes=yes"
580%define glibc_make_flags %{glibc_make_flags_as}
581
582##############################################################################
583# %%build - Generic options.
584##############################################################################
585EnableKernel="--enable-kernel=%{enablekernel}"
586# Save the used compiler and options into the file "Gcc" for use later
587# by %%install.
588echo "$GCC" > Gcc
589
590##############################################################################
591# build()
592#       Build glibc in `build-%{target}$1', passing the rest of the arguments
593#       as CFLAGS to the build (not the same as configure CFLAGS). Several
594#       global values are used to determine build flags, kernel version,
595#       system tap support, etc.
596##############################################################################
597build()
598{
599        local builddir=build-%{target}${1:+-$1}
600        ${1+shift}
601        rm -rf $builddir
602        mkdir $builddir
603        pushd $builddir
604        ../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \
605                --prefix=%{_prefix} \
606                --with-headers=%{_prefix}/include $EnableKernel \
607                --with-nonshared-cflags="$BuildFlagsNonshared" \
608                --enable-bind-now \
609                --build=%{target} \
610                --enable-stack-protector=strong \
611%ifarch %{pie_arches}
612                --enable-static-pie \
613%endif
614                --enable-tunables \
615%if 0
616                --enable-systemtap \
617%endif
618                ${core_with_options} \
619%ifarch x86_64 %{ix86}
620%if %{without gcc5}
621               --enable-cet \
622%endif
623%endif
624%ifarch %{ix86}
625                --disable-multi-arch \
626%endif
627%if %{without werror}
628                --disable-werror \
629%endif
630                --disable-profile \
631                --without-selinux \
632                --disable-crypt ||
633                { cat config.log; false; }
634
635        make %{?_smp_mflags} -O -r %{glibc_make_flags}
636        popd
637}
638
639# Default set of compiler options.
640build
641
642
643%install
644rm -rf %{buildroot}
645# The built glibc is installed into a subdirectory of $RPM_BUILD_ROOT.
646# For a system glibc that subdirectory is "/" (the root of the filesystem).
647# This is called a sysroot (system root) and can be changed if we have a
648# distribution that supports multiple installed glibc versions.
649%define glibc_sysroot $RPM_BUILD_ROOT
650
651# Remove existing file lists.
652find . -type f -name '*.filelist' -exec rm -rf {} \;
653
654# Ensure the permissions of errlist.c do not change.  When the file is
655# regenerated the Makefile sets the permissions to 444. We set it to 644
656# to match what comes out of git. The tarball of the git archive won't have
657# correct permissions because git doesn't track all of the permissions
658# accurately (see git-cache-meta if you need that). We also set it to 644 to
659# match pre-existing rpms. We do this *after* the build because the build
660# might regenerate the file and set the permissions to 444.
661chmod 644 sysdeps/gnu/errlist.c
662
663# Reload compiler and build options that were used during %%build.
664GCC=`cat Gcc`
665
666# Build and install:
667make -j1 install_root=%{glibc_sysroot} install -C build-%{target}
668
669# If we are not building an auxiliary arch then install all of the supported
670# locales.
671%ifnarch %{auxarches}
672pushd build-%{target}
673# Do not use a parallel make here because the hardlink optimization in
674# localedef is not fully reproducible when running concurrently.
675make install_root=%{glibc_sysroot} \
676        install-locales -C ../localedata objdir=`pwd`
677popd
678%endif
679
680
681# install_different:
682#       Install all core libraries into DESTDIR/SUBDIR. Either the file is
683#       installed as a copy or a symlink to the default install (if it is the
684#       same). The path SUBDIR_UP is the prefix used to go from
685#       DESTDIR/SUBDIR to the default installed libraries e.g.
686#       ln -s SUBDIR_UP/foo.so DESTDIR/SUBDIR/foo.so.
687#       When you call this function it is expected that you are in the root
688#       of the build directory, and that the default build directory is:
689#       "../build-%{target}" (relatively).
690#       The primary use of this function is to install alternate runtimes
691#       into the build directory and avoid duplicating this code for each
692#       runtime.
693install_different()
694{
695        local lib libbase libbaseso dlib
696        local destdir="$1"
697        local subdir="$2"
698        local subdir_up="$3"
699        local libdestdir="$destdir/$subdir"
700        # All three arguments must be non-zero paths.
701        if ! [ "$destdir" \
702               -a "$subdir" \
703               -a "$subdir_up" ]; then
704                echo "One of the arguments to install_different was emtpy."
705                exit 1
706        fi
707        # Create the destination directory and the multilib directory.
708        mkdir -p "$destdir"
709        mkdir -p "$libdestdir"
710        # Walk all of the libraries we installed...
711        for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
712        do
713                libbase=${lib#*/}
714                # Take care that `libbaseso' has a * that needs expanding so
715                # take care with quoting.
716                libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so)
717                # Only install if different from default build library.
718                if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
719                        ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
720                else
721                        cp -a ${lib}.so $libdestdir/$libbaseso
722                fi
723                dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
724                ln -sf $libbaseso $dlib
725        done
726}
727
728##############################################################################
729# Remove the files we don't want to distribute
730##############################################################################
731
732# Remove the libNoVersion files.
733# XXX: This looks like a bug in glibc that accidentally installed these
734#      wrong files. We probably don't need this today.
735rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion*
736rm -f %{glibc_sysroot}/%{_lib}/libNoVersion*
737
738# Remove the old nss modules.
739rm -f %{glibc_sysroot}/%{_lib}/libnss1-*
740rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1
741
742# This statically linked binary is no longer necessary in a world where
743# the default Fedora install uses an initramfs, and further we have rpm-ostree
744# which captures the whole userspace FS tree.
745# Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583
746rm -f %{glibc_sysroot}/{usr/,}sbin/sln
747
748######################################################################
749# Run ldconfig to create all the symbolic links we need
750######################################################################
751
752# Note: This has to happen before creating /etc/ld.so.conf.
753
754mkdir -p %{glibc_sysroot}/var/cache/ldconfig
755truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache
756
757# ldconfig is statically linked, so we can use the new version.
758%{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot}
759
760##############################################################################
761# Install info files
762##############################################################################
763
764%if %{with docs}
765# Move the info files if glibc installed them into the wrong location.
766if [ -d %{glibc_sysroot}%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
767  mkdir -p %{glibc_sysroot}%{_infodir}
768  mv -f %{glibc_sysroot}%{_prefix}/info/* %{glibc_sysroot}%{_infodir}
769  rm -rf %{glibc_sysroot}%{_prefix}/info
770fi
771
772# Compress all of the info files.
773gzip -9nvf %{glibc_sysroot}%{_infodir}/libc*
774
775%else
776rm -f %{glibc_sysroot}%{_infodir}/dir
777rm -f %{glibc_sysroot}%{_infodir}/libc.info*
778%endif
779
780##############################################################################
781# Create locale sub-package file lists
782##############################################################################
783
784rm -f %{glibc_sysroot}/etc/localtime
785cp -f %{_datadir}/zoneinfo/Asia/Tokyo %{glibc_sysroot}/etc/localtime
786
787%ifnarch %{auxarches}
788olddir=`pwd`
789pushd %{glibc_sysroot}%{_prefix}/lib/locale
790rm -f locale-archive
791# Intentionally we do not pass --alias-file=, aliases will be added
792# by build-locale-archive.
793$olddir/build-%{target}/elf/ld.so \
794        --library-path $olddir/build-%{target}/ \
795        $olddir/build-%{target}/locale/localedef \
796        --prefix %{glibc_sysroot} --add-to-archive \
797        eo *_*
798# Setup the locale-archive template for use by glibc-all-langpacks.
799mv locale-archive{,-extra.tmpl}
800$olddir/build-%{target}/elf/ld.so \
801        --library-path $olddir/build-%{target}/ \
802        $olddir/build-%{target}/locale/localedef \
803        --prefix %{glibc_sysroot} --add-to-archive \
804        ja_JP* en_US*
805mv locale-archive{,.tmpl}
806cp -a locale-archive{.tmpl,-ja.tmpl}
807# Create the file lists for the language specific sub-packages:
808for i in eo *_*
809do
810    lang=${i%%_*}
811#    if [ ! -e langpack-${lang}.filelist ]; then
812#        echo "%dir %{_prefix}/lib/locale" >> locales.filelist
813#    fi
814    echo "%dir  %{_prefix}/lib/locale/$i" >> locales.filelist
815    echo "%{_prefix}/lib/locale/$i/*" >> locales.filelist
816done
817popd
818pushd %{glibc_sysroot}%{_prefix}/share/locale
819for i in */LC_MESSAGES/libc.mo
820do
821    locale=${i%%%%/*}
822    lang=${locale%%%%_*}
823    echo "%lang($lang) %{_prefix}/share/locale/${i}" \
824         >> %{glibc_sysroot}%{_prefix}/lib/locale/locales.filelist
825done
826popd
827mv  %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist .
828%endif
829
830##############################################################################
831# Install configuration files for services
832##############################################################################
833
834install -p -m 644 %{SOURCE7} %{glibc_sysroot}/etc/nsswitch.conf
835
836mkdir -p %{glibc_sysroot}/etc/default
837install -p -m 644 nis/nss %{glibc_sysroot}/etc/default/nss
838
839%ifnarch %{auxarches}
840# This is for ncsd - in glibc 2.2
841install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc
842%if %{with systemd}
843mkdir -p %{glibc_sysroot}%{_tmpfilesdir}
844install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
845mkdir -p %{glibc_sysroot}%{_unitdir}
846install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}%{_unitdir}/
847%else
848mkdir -p %{glibc_sysroot}/etc/rc.d/init.d
849install -m 755 nscd/nscd.init %{glibc_sysroot}/etc/rc.d/init.d/nscd
850%endif
851%endif
852
853# Include ld.so.conf
854echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf
855truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache
856chmod 644 %{glibc_sysroot}/etc/ld.so.conf
857mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d
858%ifnarch %{auxarches}
859mkdir -p %{glibc_sysroot}/etc/sysconfig
860truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd
861truncate -s 0 %{glibc_sysroot}/etc/gai.conf
862%endif
863
864# Include %{_libdir}/gconv/gconv-modules.cache
865truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
866chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
867
868# Install the upgrade program
869install -m 700 build-%{target}/elf/glibc_post_upgrade \
870  %{glibc_sysroot}%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
871
872##############################################################################
873# Install debug copies of unstripped static libraries
874# - This step must be last in order to capture any additional static
875#   archives we might have added.
876##############################################################################
877
878# If we are building a debug package then copy all of the static archives
879# into the debug directory to keep them as unstripped copies.
880%if 0%{?_enable_debug_packages}
881mkdir -p %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}
882cp -a %{glibc_sysroot}%{_libdir}/*.a \
883        %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/
884rm -f %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/*_p.a
885%endif
886
887# Remove any zoneinfo files; they are maintained by tzdata.
888rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo
889
890# Make sure %config files have the same timestamp across multilib packages.
891#
892# XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there
893# doesn't seem to be any macro to give us that.  So we do the next best thing,
894# which is to at least keep the timestamp consistent.  The choice of using
895# glibc_post_upgrade.c is arbitrary.
896touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf
897touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc
898
899pushd build-%{target}
900$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
901        ../build-%{target}/locale/locarchive.o \
902        ../build-%{target}/locale/md5.o \
903        ../build-%{target}/locale/record-status.o \
904        -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
905        -L../build-%{target} \
906        -B../build-%{target}/csu/ -lc -lc_nonshared
907install -m 700 build-locale-archive %{glibc_sysroot}%{_prefix}/sbin/build-locale-archive
908popd
909
910# Lastly copy some additional documentation for the packages.
911rm -rf documentation
912mkdir documentation
913cp timezone/README documentation/README.timezone
914cp posix/gai.conf documentation/
915
916%ifarch s390x
917# Compatibility symlink
918mkdir -p %{glibc_sysroot}/lib
919ln -sf /%{_lib}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1
920%endif
921
922%if %{with benchtests}
923# Build benchmark binaries.  Ignore the output of the benchmark runs.
924pushd build-%{target}
925make BENCH_DURATION=1 bench-build
926popd
927
928# Copy over benchmark binaries.
929mkdir -p %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests
930cp $(find build-%{target}/benchtests -type f -executable) %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
931# ... and the makefile.
932for b in %{SOURCE9} %{SOURCE10}; do
933        cp $b %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
934done
935# .. and finally, the comparison scripts.
936cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
937cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
938cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
939cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
940%endif
941
942%if 0%{?_enable_debug_packages}
943# The #line directives gperf generates do not give the proper
944# file name relative to the build directory.
945pushd locale
946ln -s programs/*.gperf .
947popd
948pushd iconv
949ln -s ../locale/programs/charmap-kw.gperf .
950popd
951%endif # %{?_enable_debug_packages}
952
953%if %{with docs}
954# Remove the `dir' info-heirarchy file which will be maintained
955# by the system as it adds info files to the install.
956rm -f %{glibc_sysroot}%{_infodir}/dir
957%endif
958
959%ifnarch %{auxarches}
960truncate -s 0 %{glibc_sysroot}/%{_prefix}/lib/locale/locale-archive
961mkdir -p %{glibc_sysroot}/var/{db,run}/nscd
962touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services}
963touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid}
964%endif
965
966# Move libpcprofile.so and libmemusage.so into the proper library directory.
967# They can be moved without any real consequences because users would not use
968# them directly.
969mkdir -p %{glibc_sysroot}%{_libdir}
970mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \
971        %{glibc_sysroot}%{_libdir}
972
973# Strip all of the installed object files.
974strip -g %{glibc_sysroot}%{_libdir}/*.o
975
976###############################################################################
977# Rebuild libpthread.a using --whole-archive to ensure all of libpthread
978# is included in a static link. This prevents any problems when linking
979# statically, using parts of libpthread, and other necessary parts not
980# being included. Upstream has decided that this is the wrong approach to
981# this problem and that the full set of dependencies should be resolved
982# such that static linking works and produces the most minimally sized
983# static application possible.
984###############################################################################
985pushd %{glibc_sysroot}%{_prefix}/%{_lib}/
986$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
987rm libpthread.a
988ar rcs libpthread.a libpthread.o
989rm libpthread.o
990popd
991
992# The xtrace and memusage scripts have hard-coded paths that need to be
993# translated to a correct set of paths using the $LIB token which is
994# dynamically translated by ld.so as the default lib directory.
995for i in %{glibc_sysroot}%{_prefix}/bin/{xtrace,memusage}; do
996%if %{with bootstrap}
997  test -w $i || continue
998%endif
999  sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
1000      -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
1001      -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
1002      -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
1003      -i $i
1004done
1005
1006##############################################################################
1007# Build an empty libpthread_nonshared.a for compatiliby with applications
1008# that have old linker scripts that reference this file. We ship this only
1009# in compat-libpthread-nonshared sub-package.
1010##############################################################################
1011ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a
1012
1013##############################################################################
1014# Beyond this point in the install process we no longer modify the set of
1015# installed files, with one exception, for auxarches we cleanup the file list
1016# at the end and remove files which we don't intend to ship. We need the file
1017# list to effect a proper cleanup, and so it happens last.
1018##############################################################################
1019
1020##############################################################################
1021# Build the file lists used for describing the package and subpackages.
1022##############################################################################
1023# There are several main file lists (and many more for
1024# the langpack sub-packages (langpack-${lang}.filelist)):
1025# * master.filelist
1026#       - Master file list from which all other lists are built.
1027# * glibc.filelist
1028#       - Files for the glibc packages.
1029# * common.filelist
1030#       - Flies for the common subpackage.
1031# * utils.filelist
1032#       - Files for the utils subpackage.
1033# * nscd.filelist
1034#       - Files for the nscd subpackage.
1035# * devel.filelist
1036#       - Files for the devel subpackage.
1037# * headers.filelist
1038#       - Files for the headers subpackage.
1039# * static.filelist
1040#       - Files for the static subpackage.
1041# * libnsl.filelist
1042#       - Files for the libnsl subpackage
1043# * nss_db.filelist
1044# * nss_hesiod.filelist
1045#       - File lists for nss_* NSS module subpackages.
1046# * nss-devel.filelist
1047#       - File list with the .so symbolic links for NSS packages.
1048# * compat-libpthread-nonshared.filelist.
1049#       - File list for compat-libpthread-nonshared subpackage.
1050# * debuginfo.filelist
1051#       - Files for the glibc debuginfo package.
1052# * debuginfocommon.filelist
1053#       - Files for the glibc common debuginfo package.
1054#
1055
1056# Create the main file lists. This way we can append to any one of them later
1057# wihtout having to create it. Note these are removed at the start of the
1058# install phase.
1059touch master.filelist
1060touch glibc.filelist
1061touch common.filelist
1062touch utils.filelist
1063touch nscd.filelist
1064touch devel.filelist
1065touch headers.filelist
1066touch static.filelist
1067touch libnsl.filelist
1068touch nss_db.filelist
1069touch nss_hesiod.filelist
1070touch nss-devel.filelist
1071touch compat-libpthread-nonshared.filelist
1072touch debuginfo.filelist
1073touch debuginfocommon.filelist
1074
1075###############################################################################
1076# Master file list, excluding a few things.
1077###############################################################################
1078{
1079  # List all files or links that we have created during install.
1080  # Files with 'etc' are configuration files, likewise 'gconv-modules'
1081  # and 'gconv-modules.cache' are caches, and we exclude them.
1082  find %{glibc_sysroot} \( -type f -o -type l \) \
1083       \( \
1084         -name etc -printf "%%%%config " -o \
1085         -name gconv-modules \
1086         -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
1087         -name gconv-modules.cache \
1088         -printf "%%%%verify(not md5 size mtime) " \
1089         , \
1090         ! -path "*/lib/debug/*" -printf "/%%P\n" \)
1091  # List all directories with a %%dir prefix.  We omit the info directory and
1092  # all directories in (and including) /usr/share/locale.
1093  find %{glibc_sysroot} -type d \
1094       \( -path '*%{_prefix}/share/locale' -prune -o \
1095       \( -path '*%{_prefix}/share/*' \
1096%if %{with docs}
1097        ! -path '*%{_infodir}' -o \
1098%endif
1099          -path "*%{_prefix}/include/*" \
1100       \) -printf "%%%%dir /%%P\n" \)
1101} | {
1102  # Also remove the *.mo entries.  We will add them to the
1103  # language specific sub-packages.
1104  # libnss_ files go into subpackages related to NSS modules.
1105  # and .*/share/i18n/charmaps/.*), they go into the sub-package
1106  # "locale-source":
1107  sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
1108      -e '\,.*/share/i18n/locales/.*,d' \
1109      -e '\,.*/share/i18n/charmaps/.*,d' \
1110      -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
1111      -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \
1112      -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
1113} | sort > master.filelist
1114
1115# The master file list is now used by each subpackage to list their own
1116# files. We go through each package and subpackage now and create their lists.
1117# Each subpackage picks the files from the master list that they need.
1118# The order of the subpackage list generation does not matter.
1119
1120# Make the master file list read-only after this point to avoid accidental
1121# modification.
1122chmod 0444 master.filelist
1123
1124###############################################################################
1125# glibc
1126###############################################################################
1127
1128# Add all files with the following exceptions:
1129# - The info files '%{_infodir}/dir'
1130# - The partial (lib*_p.a) static libraries, include files.
1131# - The static files, objects, unversioned DSOs, and nscd.
1132# - The bin, locale, some sbin, and share.
1133#   - The use of [^gi] is meant to exclude all files except glibc_post_upgrade,
1134#     and iconvconfig, which we want in the main packages.
1135# - All the libnss files (we add back the ones we want later).
1136# - All bench test binaries.
1137# - The aux-cache, since it's handled specially in the files section.
1138# - The build-locale-archive binary since it's in the common package.
1139cat master.filelist \
1140        | grep -v \
1141        -e '%{_infodir}' \
1142        -e '%{_libdir}/lib.*_p.a' \
1143        -e '%{_prefix}/include' \
1144        -e '%{_libdir}/lib.*\.a' \
1145        -e '%{_libdir}/.*\.o' \
1146        -e '%{_libdir}/lib.*\.so' \
1147        -e 'nscd' \
1148        -e '%{_prefix}/bin' \
1149        -e '%{_prefix}/lib/locale' \
1150        -e '%{_prefix}/sbin/[^gi]' \
1151        -e '%{_prefix}/share' \
1152        -e '/var/db/Makefile' \
1153        -e '/libnss_.*\.so[0-9.]*$' \
1154        -e '/libnsl' \
1155        -e 'glibc-benchtests' \
1156        -e 'aux-cache' \
1157        -e 'build-locale-archive' \
1158        > glibc.filelist
1159
1160# Add specific files:
1161# - The nss_files, nss_compat, and nss_db files.
1162# - The libmemusage.so and libpcprofile.so used by utils.
1163for module in compat files db dns hesiod; do
1164    cat master.filelist \
1165        | grep -E \
1166        -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
1167        >> glibc.filelist
1168done
1169grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist
1170
1171cat glibc.filelist \
1172        | grep -v \
1173        -e '/sbin/ldconfig' \
1174        > compat32-glibc.filelist
1175
1176###############################################################################
1177# glibc-devel
1178###############################################################################
1179
1180%if %{with docs}
1181# Put the info files into the devel file list, but exclude the generated dir.
1182grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > devel.filelist
1183%endif
1184
1185# Put some static files into the devel package.
1186grep '%{_libdir}/lib.*\.a' master.filelist \
1187  | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
1188  >> devel.filelist
1189
1190# Put all of the object files and *.so (not the versioned ones) into the
1191# devel package.
1192grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist
1193grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist
1194# The exceptions are:
1195# - libmemusage.so and libpcprofile.so in glibc used by utils.
1196# - libnss_*.so which are in nss-devel.
1197sed -i -e '\,libmemusage.so,d' \
1198        -e '\,libpcprofile.so,d' \
1199        -e '\,/libnss_[a-z]*\.so$,d' \
1200        devel.filelist
1201
1202###############################################################################
1203# glibc-headers
1204###############################################################################
1205
1206# The glibc-headers package includes only common files which are identical
1207# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h
1208# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions
1209# go into the development packages.
1210grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || :
1211grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || :
1212# Put the include files into headers file list.
1213grep '%{_prefix}/include' < master.filelist \
1214  | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \
1215  | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
1216  > headers.filelist
1217
1218###############################################################################
1219# glibc-static
1220###############################################################################
1221
1222# Put the rest of the static files into the static package.
1223grep '%{_libdir}/lib.*\.a' < master.filelist \
1224  | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
1225  > static.filelist
1226
1227###############################################################################
1228# glibc-common
1229###############################################################################
1230
1231# All of the bin and certain sbin files go into the common package except
1232# glibc_post_upgrade.* and iconvconfig which need to go in glibc. Likewise
1233# nscd is excluded because it goes in nscd.
1234grep '%{_prefix}/bin' master.filelist >> common.filelist
1235grep '%{_prefix}/sbin/[^gi]' master.filelist \
1236        | grep -v 'nscd' >> common.filelist
1237# All of the files under share go into the common package since they should be
1238# multilib-independent.
1239# Exceptions:
1240# - The actual share directory, not owned by us.
1241# - The info files which go in devel, and the info directory.
1242grep '%{_prefix}/share' master.filelist \
1243        | grep -v \
1244        -e '%{_prefix}/share/info/libc.info.*' \
1245        -e '%%dir %{_prefix}/share/info' \
1246        -e '%%dir %{_prefix}/share' \
1247        >> common.filelist
1248
1249# Add the binary to build locales to the common subpackage.
1250#echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
1251grep -e "/en_US/" -e "/ja_JP" -e "/ja/" locales.filelist >> common.filelist
1252grep -v -e "/en_US/" -e "/ja_JP" -e "/ja/" locales.filelist >> common-extra.filelist
1253
1254###############################################################################
1255# nscd
1256###############################################################################
1257
1258# The nscd binary must go into the nscd subpackage.
1259echo '%{_prefix}/sbin/nscd' > nscd.filelist
1260
1261###############################################################################
1262# glibc-utils
1263###############################################################################
1264
1265# Add the utils scripts and programs to the utils subpackage.
1266cat > utils.filelist <<EOF
1267%if %{without bootstrap}
1268%{_prefix}/bin/memusage
1269%{_prefix}/bin/memusagestat
1270%endif
1271%{_prefix}/bin/mtrace
1272%{_prefix}/bin/pcprofiledump
1273%{_prefix}/bin/xtrace
1274EOF
1275
1276###############################################################################
1277# nss_db, nss_hesiod
1278###############################################################################
1279
1280# Move the NSS-related files to the NSS subpackages.  Be careful not
1281# to pick up .debug files, and the -devel symbolic links.
1282for module in db hesiod; do
1283  grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
1284    master.filelist > nss_$module.filelist
1285done
1286
1287###############################################################################
1288# nss-devel
1289###############################################################################
1290
1291# Symlinks go into the nss-devel package (instead of the main devel
1292# package).
1293grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist
1294grep '/libnss_[a-z]*\.so$' master.filelist >> devel.filelist
1295
1296###############################################################################
1297# libnsl
1298###############################################################################
1299
1300# Prepare the libnsl-related file lists.
1301grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist
1302test $(wc -l < libnsl.filelist) -eq 1
1303grep '/libnsl-[0-9.]*.so$' master.filelist >> devel.filelist
1304
1305###############################################################################
1306# glibc-benchtests
1307###############################################################################
1308%if %{with benchtests}
1309
1310# List of benchmarks.
1311find build-%{target}/benchtests -type f -executable | while read b; do
1312        echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
1313done >> benchtests.filelist
1314# ... and the makefile.
1315for b in %{SOURCE9} %{SOURCE10}; do
1316        echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
1317done
1318# ... and finally, the comparison scripts.
1319echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
1320echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
1321echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
1322echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
1323%endif
1324
1325###############################################################################
1326# compat-libpthread-nonshared
1327###############################################################################
1328echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist
1329
1330###############################################################################
1331# glibc-debuginfocommon, and glibc-debuginfo
1332###############################################################################
1333%if 0%{?_enable_debug_packages}
1334
1335find_debuginfo_args='--strict-build-id -g'
1336%ifarch %{debuginfocommonarches}
1337find_debuginfo_args="$find_debuginfo_args \
1338        -l common.filelist \
1339        -l utils.filelist \
1340        -l nscd.filelist \
1341        -p '.*/(sbin|libexec)/.*' \
1342        -o debuginfocommon.filelist \
1343        -l nss_db.filelist -l nss_hesiod.filelist \
1344        -l libnsl.filelist -l glibc.filelist \
1345%if %{with benchtests}
1346        -l benchtests.filelist
1347%endif
1348        "
1349%endif
1350
1351/usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
1352
1353# List all of the *.a archives in the debug directory.
1354list_debug_archives()
1355{
1356        local dir=%{_prefix}/lib/debug%{_libdir}
1357        find %{glibc_sysroot}$dir -name "*.a" -printf "$dir/%%P\n"
1358}
1359
1360%ifarch %{debuginfocommonarches}
1361
1362# Remove the source files from the common package debuginfo.
1363sed -i '\#^%{glibc_sysroot}%{_prefix}/src/debug/#d' debuginfocommon.filelist
1364
1365# Create a list of all of the source files we copied to the debug directory.
1366find %{glibc_sysroot}%{_prefix}/src/debug \
1367     \( -type d -printf '%%%%dir ' \) , \
1368     -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
1369
1370%ifarch %{biarcharches}
1371
1372# Add the source files to the core debuginfo package.
1373cat debuginfocommon.sources >> debuginfo.filelist
1374
1375%else
1376
1377%ifarch %{ix86}
1378%define basearch i686
1379%endif
1380%ifarch sparc sparcv9
1381%define basearch sparc
1382%endif
1383
1384# The auxarches get only these few source files.
1385auxarches_debugsources=\
1386'/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
1387
1388# Place the source files into the core debuginfo pakcage.
1389egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
1390
1391# Remove the source files from the common debuginfo package.
1392egrep -v "$auxarches_debugsources" \
1393  debuginfocommon.sources >> debuginfocommon.filelist
1394
1395%endif # %{biarcharches}
1396
1397# Add the list of *.a archives in the debug directory to
1398# the common debuginfo package.
1399list_debug_archives >> debuginfocommon.filelist
1400
1401%endif # %{debuginfocommonarches}
1402
1403# Remove some common directories from the common package debuginfo so that we
1404# don't end up owning them.
1405exclude_common_dirs()
1406{
1407        exclude_dirs="%{_prefix}/src/debug"
1408        exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
1409        exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
1410
1411        for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
1412                sed -i "\|^%%dir $d/\?$|d" $1
1413        done
1414}
1415
1416%ifarch %{debuginfocommonarches}
1417exclude_common_dirs debuginfocommon.filelist
1418%endif
1419exclude_common_dirs debuginfo.filelist
1420
1421##############################################################################
1422# Delete files that we do not intended to ship with the auxarch.
1423# This is the only place where we touch the installed files after generating
1424# the file lists.
1425##############################################################################
1426%ifarch %{auxarches}
1427echo Cutting down the list of unpackaged files
1428sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
1429        common.filelist devel.filelist static.filelist headers.filelist \
1430        utils.filelist nscd.filelist \
1431%ifarch %{debuginfocommonarches}
1432        debuginfocommon.filelist \
1433%endif
1434        | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :)
1435%endif # %{auxarches}
1436
1437%endif # %{?_enable_debug_packages}
1438
1439%check
1440%if %{with testsuite}
1441
1442# Run the glibc tests. If any tests fail to build we exit %check with
1443# an error, otherwise we print the test failure list and the failed
1444# test output and continue.  Write to standard error to avoid
1445# synchronization issues with make and shell tracing output if
1446# standard output and standard error are different pipes.
1447run_tests () {
1448  # This hides a test suite build failure, which should be fatal.  We
1449  # check "Summary of test results:" below to verify that all tests
1450  # were built and run.
1451  make %{?_smp_mflags} -O check |& tee rpmbuild.check.log >&2
1452  test -n tests.sum
1453  if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then
1454    echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2
1455    exit 1
1456  fi
1457  set +x
1458  grep -v ^PASS: tests.sum > rpmbuild.tests.sum.not-passing || true
1459  if test -n rpmbuild.tests.sum.not-passing ; then
1460    echo ===================FAILED TESTS===================== >&2
1461    echo "Target: $(basename "$(pwd)")" >& 2
1462    cat rpmbuild.tests.sum.not-passing >&2
1463    while read failed_code failed_test ; do
1464      for suffix in out test-result ; do
1465        if test -e "$failed_test.$suffix"; then
1466          echo >&2
1467          echo "=====$failed_code $failed_test.$suffix=====" >&2
1468          cat -- "$failed_test.$suffix" >&2
1469          echo >&2
1470        fi
1471      done
1472    done <rpmbuild.tests.sum.not-passing
1473  fi
1474
1475  # Unconditonally dump differences in the system call list.
1476  echo "* System call consistency checks:" >&2
1477  cat misc/tst-syscall-list.out >&2
1478  set -x
1479}
1480
1481# Increase timeouts
1482export TIMEOUTFACTOR=16
1483parent=$$
1484echo ====================TESTING=========================
1485
1486# Default libraries.
1487pushd build-%{target}
1488run_tests
1489popd
1490
1491
1492echo ====================TESTING END=====================
1493PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
1494echo ====================PLT RELOCS LD.SO================
1495readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
1496echo ====================PLT RELOCS LIBC.SO==============
1497readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
1498echo ====================PLT RELOCS END==================
1499
1500# Finally, check if valgrind runs with the new glibc.
1501# We want to fail building if valgrind is not able to run with this glibc so
1502# that we can then coordinate with valgrind to get it fixed before we update
1503# glibc.
1504pushd build-%{target}
1505
1506# Show the auxiliary vector as seen by the new library
1507# (even if we do not perform the valgrind test).
1508LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true
1509
1510%if %{with valgrind}
1511elf/ld.so --library-path .:elf:nptl:dlfcn \
1512        /usr/bin/valgrind --error-exitcode=1 \
1513        elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
1514%endif
1515popd
1516
1517%endif # %{run_glibc_tests}
1518
1519
1520%pre -p <lua>
1521-- Check that the running kernel is new enough
1522required = '%{enablekernel}'
1523rel = posix.uname("%r")
1524if rpm.vercmp(rel, required) < 0 then
1525  error("FATAL: kernel too old", 0)
1526end
1527
1528%post -p /usr/sbin/glibc_post_upgrade.%{_target_cpu}
1529
1530%postun -p /sbin/ldconfig
1531
1532%post -n compat32-%{name} -p /sbin/ldconfig
1533
1534%postun -n compat32-%{name} -p /sbin/ldconfig
1535
1536%triggerin common -p <lua> -- glibc
1537if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
1538  pid = posix.fork()
1539  if pid == 0 then
1540    posix.exec("%{_prefix}/sbin/build-locale-archive")
1541  elseif pid > 0 then
1542    posix.wait(pid)
1543  end
1544end
1545
1546%post common -p <lua>
1547if posix.access("/etc/ld.so.cache") then
1548  if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
1549    pid = posix.fork()
1550    if pid == 0 then
1551      posix.exec("%{_prefix}/sbin/build-locale-archive")
1552    elseif pid > 0 then
1553      posix.wait(pid)
1554    end
1555  end
1556end
1557
1558%if %{without systemd}
1559%triggerin common -p <lua> -- tzdata
1560function update (filename, new_data)
1561  local fd = io.open(filename)
1562  if not fd then return end
1563  local data = fd:read("*a")
1564  fd:close()
1565  if not data then return end
1566  -- Don't update the file unnecessarily.
1567  if data == new_data then return end
1568  local tempfilename = filename .. ".tzupdate"
1569  fd = io.open(tempfilename, "w")
1570  if not fd then return end
1571  fd:write(new_data)
1572  fd:close()
1573  posix.chmod(tempfilename, 0644)
1574  if not os.rename(tempfilename, filename) then
1575    os.remove(tempfilename)
1576  end
1577end
1578fd = io.open("/etc/sysconfig/clock")
1579if not fd then return end
1580zonename = nil
1581for l in fd:lines() do
1582  zone = string.match(l, "^[ \t]*ZONE[ \t]*=[ \t]*\"?([^ \t\n\"]*)");
1583  if zone then
1584    zonename = "/usr/share/zoneinfo/" .. zone
1585    break
1586  end
1587end
1588fd:close()
1589if not zonename then return end
1590fd = io.open(zonename)
1591if not fd then return end
1592data = fd:read("*a")
1593fd:close()
1594if not data then return end
1595update("/etc/localtime", data)
1596update("/var/spool/postfix/etc/localtime", data)
1597%endif
1598
1599%post common-extra -p <lua>
1600-- cp -f /usr/lib/locale/locale-archive-extra.tmpl /usr/lib/locale/locale-archive.tmpl
1601if posix.access("/etc/ld.so.cache") then
1602  if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
1603    pid = posix.fork()
1604    if pid == 0 then
1605      posix.exec("%{_prefix}/sbin/build-locale-archive")
1606    elseif pid > 0 then
1607      posix.wait(pid)
1608    end
1609  end
1610end
1611
1612%postun common-extra -p <lua>
1613posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl")
1614if posix.access("/etc/ld.so.cache") then
1615  if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
1616    pid = posix.fork()
1617    if pid == 0 then
1618      posix.exec("%{_prefix}/sbin/build-locale-archive")
1619    elseif pid > 0 then
1620      posix.wait(pid)
1621    end
1622  end
1623end
1624
1625%triggerun -- common-extra
1626posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl")
1627if posix.access("/etc/ld.so.cache") then
1628  if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
1629    pid = posix.fork()
1630    if pid == 0 then
1631      posix.exec("%{_prefix}/sbin/build-locale-archive")
1632    elseif pid > 0 then
1633      posix.wait(pid)
1634    end
1635  end
1636end
1637
1638
1639%post devel
1640/sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
1641
1642%pre headers
1643# this used to be a link and it is causing nightmares now
1644if [ -L %{_prefix}/include/scsi ] ; then
1645  rm -f %{_prefix}/include/scsi
1646fi
1647
1648%preun devel
1649if [ "$1" = 0 ]; then
1650  /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
1651fi
1652
1653%post utils -p /sbin/ldconfig
1654
1655%postun utils -p /sbin/ldconfig
1656
1657%pre -n nscd
1658getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
1659getent passwd nscd >/dev/null ||
1660  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
1661                    -c "NSCD Daemon" -u 28 -g nscd nscd
1662
1663%post -n nscd
1664%if %{with systemd}
1665%systemd_post nscd.service
1666%else
1667/sbin/chkconfig --add nscd
1668%endif
1669
1670%preun -n nscd
1671%if %{with systemd}
1672%systemd_preun nscd.service
1673%else
1674if [ $1 = 0 -o -x /bin/systemctl ] ; then
1675  /sbin/service nscd stop > /dev/null 2>&1
1676  /sbin/chkconfig --del nscd
1677fi
1678%endif
1679
1680%postun -n nscd
1681if [ $1 = 0 ] ; then
1682  /usr/sbin/userdel nscd > /dev/null 2>&1 || :
1683fi
1684%if %{with systemd}
1685%systemd_postun_with_restart nscd.service
1686%else
1687if [ "$1" -ge "1" ]; then
1688  service nscd condrestart > /dev/null 2>&1 || :
1689fi
1690%endif
1691
1692%if %{xenpackage}
1693%post xen -p /sbin/ldconfig
1694%postun xen -p /sbin/ldconfig
1695%endif
1696
1697%clean
1698rm -rf "$RPM_BUILD_ROOT"
1699rm -f *.filelist*
1700
1701%files -f glibc.filelist
1702%defattr(-,root,root)
1703/sbin/ldconfig
1704/%{_lib}/libnsl.so.*
1705%dir %{_prefix}/%{_lib}/audit
1706%if %{with systemd}
1707%exclude /etc/localtime
1708%else
1709%verify(not md5 size mtime) %config(noreplace) /etc/localtime
1710%endif
1711%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
1712%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
1713%verify(not md5 size mtime) %config(noreplace) /etc/rpc
1714%dir /etc/ld.so.conf.d
1715%dir %{_prefix}/libexec/getconf
1716%dir %{_prefix}/%{_lib}/gconv
1717%dir %{_localstatedir}/db
1718%{_localstatedir}/db/Makefile
1719%dir %attr(0700,root,root) /var/cache/ldconfig
1720%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
1721%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
1722%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
1723%doc rpm-old-changelog.txt
1724%doc README NEWS INSTALL elf/rtld-debugger-interface.txt
1725%license COPYING COPYING.LIB LICENSES
1726
1727%if %{build_compat32}
1728%files -f compat32-glibc.filelist -n compat32-%{name}
1729/%{_lib}/libnsl.so.*
1730%endif
1731
1732%ifnarch %{auxarches}
1733%files -f common.filelist common
1734%defattr(-,root,root)
1735%dir %{_datadir}/locale
1736%dir %{_prefix}/lib/locale
1737%dir %{_prefix}/lib/locale/C.utf8
1738%{_prefix}/lib/locale/C.utf8/*
1739%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive-ja.tmpl
1740%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
1741%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
1742%dir %{_prefix}/share/locale
1743%dir %{_prefix}/share/locale/ja
1744%dir %attr(755,root,root) /etc/default
1745%verify(not md5 size mtime) %config(noreplace) /etc/default/nss
1746%doc documentation/README.timezone
1747%doc documentation/gai.conf
1748
1749%files common-extra -f common-extra.filelist
1750%defattr(-,root,root)
1751%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive-extra.tmpl
1752
1753%files locale-source
1754%defattr(-,root,root)
1755%dir %{_prefix}/share/i18n/locales
1756%{_prefix}/share/i18n/locales/*
1757%dir %{_prefix}/share/i18n/charmaps
1758%{_prefix}/share/i18n/charmaps/*
1759
1760%files -f devel.filelist devel
1761%defattr(-,root,root)
1762
1763%files -f static.filelist static
1764%defattr(-,root,root)
1765
1766%if %{build_compat32}
1767%files -f devel.filelist -n compat32-%{name}-devel
1768%defattr(-,root,root)
1769%exclude %{_prefix}/share
1770
1771%files -f static.filelist -n compat32-%{name}-static
1772%defattr(-,root,root)
1773%endif
1774
1775%files -f headers.filelist headers
1776%defattr(-,root,root)
1777
1778%files -f utils.filelist utils
1779%defattr(-,root,root)
1780
1781%files -f nscd.filelist -n nscd
1782%defattr(-,root,root)
1783%config(noreplace) /etc/nscd.conf
1784%if %{with systemd}
1785%{_unitdir}/*
1786%{_tmpfilesdir}/*
1787%else
1788%config /etc/rc.d/init.d/nscd
1789%endif
1790%dir %attr(0755,root,root) /var/run/nscd
1791%dir %attr(0755,root,root) /var/db/nscd
1792%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
1793%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
1794%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
1795%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
1796%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
1797%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
1798%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
1799%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
1800%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
1801%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
1802%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
1803%endif
1804
1805%if 0%{?_enable_debug_packages}
1806%files debuginfo -f debuginfo.filelist
1807%defattr(-,root,root)
1808%ifarch %{debuginfocommonarches}
1809%ifnarch %{auxarches}
1810%files debuginfo-common -f debuginfocommon.filelist
1811%defattr(-,root,root)
1812%endif
1813%endif
1814%endif
1815
1816%changelog
1817* Sat May 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.31-2
1818- updated Patch0.
1819- added systemd support (disabled as default).
1820- dropped /sbin/ldconfig from compat32.
1821
1822* Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.31-1
1823- updated to 2.31.
1824- updated Patch0.
1825- dropped Patch28.
1826- imported Patch29 from rawhide.
1827- updated Patch5 and 23.
1828- updated Source11.
1829
1830* Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.30-1
1831- updated to 2.30.
1832- updated Patch0.
1833- dropped Patch11, 24 and 25.
1834
1835* Sun Jan 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.28-1
1836- updated to 2.28.
1837- dropped Source2, 3, 10 and 11.
1838- imported Source8-11 from rawhide.
1839- dropped Patch11-13.
1840- imported Patch1-28 from rawhide.
1841- dropped Patch10000.
1842- trimmed %%changelog: old logs are rpm-old-changelog.txt.
1843
1844* Tue Jun 20 2017 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.23-5
1845- add patch20005 for fix CVE-2017-1000366
1846
1847* Mon Aug  1 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.23-4
1848- added Patch20000-20004 to fix vulnerabilities.
1849  - CVE-2016-1234
1850  - CVE-2016-3075
1851  - CVE-2016-3706
1852  - CVE-2016-4429
1853
1854* Sun Jun 26 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.23-3
1855- rebuilt with gcc-5.4.0
1856
1857* Tue May 24 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.23-2
1858- rebuilt with new binutils.
1859
1860* Sat May 07 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.23-1
1861- update to 2.23
1862- remove Patch14-18
1863- update SOURCE1 from fedora
Note: See TracBrowser for help on using the repository browser.