123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863 |
- %bcond_with gcc5
- %bcond_with systemd
- %define glibcversion 2.31
- %define glibcsrcdir glibc-%{glibcversion}
- %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
- %define run_glibc_tests 1
- %define auxarches athlon sparcv9v sparc64v alphaev6
- %if %{build_compat32}
- %define auxarches i586 athlon sparcv9 alphaev6
- %endif
- %define xenarches i686 athlon
- %ifarch %{xenarches}
- %define buildxen 1
- %define xenpackage 0
- %else
- %define buildxen 0
- %define xenpackage 0
- %endif
- %ifarch ppc64
- %define buildpower6 1
- %else
- %define buildpower6 0
- %endif
- %define biarcharches %{ix86} x86_64 ppc ppc64 s390 s390x
- %global _enable_debug_packages 1
- %define debuginfocommonarches %{biarcharches} alpha alphaev6
- %define multiarcharches ppc ppc64 %{ix86} x86_64 %{sparc}
- %define silentrules PARALLELMFLAGS=-s
- Summary: The GNU libc libraries
- Summary(ja): GNU libc ライブラリ
- Name: glibc
- Version: %{glibcversion}
- Release: 2%{?_dist_release}%{?with_systemd:.systemd}
- License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
- Group: System Environment/Libraries
- URL: http://www.gnu.org/software/glibc/
- Source0: https://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz
- Source1: build-locale-archive.c
- Source4: nscd.conf
- Source7: nsswitch.conf.vine
- Source8: power6emul.c
- Source9: bench.mk
- Source10: glibc-bench-compare
- Source11: SUPPORTED
- Source1000: rpm-old-changelog.txt
- Patch0: glibc-2.31-20200508.patch
- Patch1: glibc-post_upgrade.patch
- Patch2: glibc-fedora-nscd.patch
- Patch3: glibc-rh697421.patch
- Patch4: glibc-fedora-linux-tcsetattr.patch
- Patch5: glibc-rh741105.patch
- Patch6: glibc-fedora-localedef.patch
- Patch7: glibc-fedora-nis-rh188246.patch
- Patch8: glibc-fedora-manual-dircategory.patch
- Patch9: glibc-rh827510.patch
- Patch10: glibc-fedora-locarchive.patch
- Patch12: glibc-rh819430.patch
- Patch13: glibc-fedora-localedata-rh61908.patch
- Patch14: glibc-fedora-__libc_multiple_libcs.patch
- Patch15: glibc-rh1070416.patch
- Patch16: glibc-nscd-sysconfig.patch
- Patch17: glibc-cs-path.patch
- Patch18: glibc-c-utf8-locale.patch
- Patch23: glibc-python3.patch
- Patch29: glibc-fedora-nsswitch.patch
- Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
- Obsoletes: glibc-profile < 2.4
- Provides: ldconfig
- Provides: rtld(GNU_HASH)
- Requires: glibc-common = %{version}-%{release}
- Requires(pre): basesystem, libgcc
- BuildRequires: gd-devel libpng-devel zlib-devel texinfo
- BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel
- BuildRequires: python3-devel
- BuildRequires: bison
- BuildRequires: /bin/ps, /bin/kill, /bin/awk
- BuildRequires: gcc >= 3.2
- %define enablekernel 3.2
- Conflicts: kernel < %{enablekernel}
- %ifarch i386
- %define target_cpu i486
- %else
- %define target_cpu %{_target_cpu}
- %endif
- %define target %{_target_cpu}-vine-linux
- %ifarch %{arm}
- %define target %{_target_cpu}-vine-linuxeabi
- %endif
- %ifarch %{power64}
- %define target ppc64-vine-linux
- %endif
- %ifarch %{multiarcharches}
- %ifarch ppc ppc64
- BuildRequires: binutils >= 2.20.51.0.2
- Conflicts: binutils < 2.20.51.0.2
- %else
- BuildRequires: binutils >= 2.19.51.0.10
- Conflicts: binutils < 2.19.51.0.10
- %endif
- Conflicts: prelink < 0.4.2
- %else
- BuildRequires: binutils >= 2.17.50.0.2-5
- %endif
- BuildRequires: gcc >= 3.2.1-5
- %ifarch ppc s390 s390x
- BuildRequires: gcc >= 4.1.0-0.17
- %endif
- %if 0%{?_enable_debug_packages}
- BuildRequires: elfutils >= 0.72
- BuildRequires: rpm >= 4.2-0.56
- %endif
- BuildRequires: libstdc++-static
- BuildRequires: tzdata
- %define __find_provides %{SOURCE10}
- %define __find_requires %{SOURCE11}
- %define _filter_GLIBC_PRIVATE 1
- Vendor: Project Vine
- Distribution: Vine Linux
- %description
- The glibc package contains standard libraries which are used by
- multiple programs on the system. In order to save disk space and
- memory, as well as to make upgrading easier, common system code is
- kept in one place and shared between programs. This particular package
- contains the most important sets of shared libraries: the standard C
- library and the standard math library. Without these two libraries, a
- Linux system will not function.
- %description -l ja
- glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを
- ふくみます。ディスクスペースとメモリを節約したり、アップグレードを
- 用意にするために、共通のシステムコードは一つの場所におかれ、プログラム
- 間で共有されます。この部分的なパッケージはシェアドライブラリのかなり
- 重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。
- この二つのライブラリ抜きでは、Linux システムは機能しません。
- %package -n compat32-%{name}
- Summary: The GNU libc libraries.
- Summary(ja): GNU libc ライブラリ
- Group: System Environment/Libraries
- Requires: %{name} >= %{version}-%{release}
- %description -n compat32-%{name}
- The glibc package contains standard libraries which are used by
- multiple programs on the system. In order to save disk space and
- memory, as well as to make upgrading easier, common system code is
- kept in one place and shared between programs. This particular package
- contains the most important sets of shared libraries: the standard C
- library and the standard math library. Without these two libraries, a
- Linux system will not function.
- %description -n compat32-%{name} -l ja
- glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを
- ふくみます。ディスクスペースとメモリを節約したり、アップグレードを
- 用意にするために、共通のシステムコードは一つの場所におかれ、プログラム
- 間で共有されます。この部分的なパッケージはシェアドライブラリのかなり
- 重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。
- この二つのライブラリ抜きでは、Linux システムは機能しません。
- %if %{xenpackage}
- %package xen
- Summary: The GNU libc libraries (optimized for running under Xen)
- Group: System Environment/Libraries
- Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release}
- %description xen
- The standard glibc package is optimized for native kernels and does not
- perform as well under the Xen hypervisor. This package provides alternative
- library binaries that will be selected instead when running under Xen.
- Install glibc-xen if you might run your system under the Xen hypervisor.
- %endif
- %package devel
- Summary: Object files for development using standard C libraries.
- Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル
- Group: Development/Libraries
- Requires(pre): /sbin/install-info
- Requires(pre): %{name}-headers
- Requires: %{name}-headers = %{version}-%{release}
- Requires: %{name} = %{version}-%{release}
- %description devel
- The glibc-devel package contains the object files necessary
- for developing programs which use the standard C libraries (which are
- used by nearly all programs). If you are developing programs which
- will use the standard C libraries, your system needs to have these
- standard object files available in order to create the
- executables.
- Install glibc-devel if you are going to develop programs which will
- use the standard C libraries.
- %description devel -l ja
- glibc-devel パッケージには (ほとんどすべてのプログラムで使われる)
- 標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが
- 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
- これらオブジェクトファイルを使用して実行ファイルを作成できます。
- 標準 C ライブラリを使用するプログラムを開発するなら glibc-devel
- をインストールしてください。
- %package -n compat32-%{name}-devel
- Summary: Object files for development using standard C libraries.
- Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル
- Group: Development/Libraries
- Requires: %{name}-devel = %{version}-%{release}
- Requires: compat32-%{name} = %{version}-%{release}
- %description -n compat32-%{name}-devel
- The glibc-devel package contains the object files necessary
- for developing programs which use the standard C libraries (which are
- used by nearly all programs). If you are developing programs which
- will use the standard C libraries, your system needs to have these
- standard object files available in order to create the
- executables.
- Install glibc-devel if you are going to develop programs which will
- use the standard C libraries.
- %description -n compat32-%{name}-devel -l ja
- glibc-devel パッケージには (ほとんどすべてのプログラムで使われる)
- 標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが
- 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
- これらオブジェクトファイルを使用して実行ファイルを作成できます。
- 標準 C ライブラリを使用するプログラムを開発するなら glibc-devel
- をインストールしてください。
- %package static
- Summary: C library static libraries for -static linking.
- Summary(ja): -static リンクのための静的 C ライブラリ
- Group: Development/Libraries
- Requires: %{name}-devel = %{version}-%{release}
- %description static
- The glibc-static package contains the C library static libraries
- for -static linking. You don't need these, unless you link statically,
- which is highly discouraged.
- %description static -l ja
- glibc-static パッケージには -static リンクで使用する静的 C ライブラリが
- 入っています。
- 静的ライブラリが必要な場合でなければ、このパッケージをインストールする
- ことは避けて下さい。
- %package -n compat32-%{name}-static
- Summary: C library static libraries for -static linking.
- Summary(ja): -static リンクのための静的 C ライブラリ
- Group: Development/Libraries
- Requires: %{name}-devel = %{version}-%{release}
- Requires: %{name}-static = %{version}-%{release}
- Requires: compat32-%{name}-devel = %{version}-%{release}
- %description -n compat32-%{name}-static
- The glibc-static package contains the C library static libraries
- for -static linking. You don't need these, unless you link statically,
- which is highly discouraged.
- %description -n compat32-%{name}-static -l ja
- glibc-static パッケージには -static リンクで使用する静的 C ライブラリが
- 入っています。
- 静的ライブラリが必要な場合でなければ、このパッケージをインストールする
- ことは避けて下さい。
- %package headers
- Summary: Header files for development using standard C libraries.
- Summary(ja): 標準 C ライブラリで使われるヘッダーファイル
- Group: Development/Libraries
- Provides: %{name}-headers(%{_target_cpu})
- %ifarch x86_64
- Obsoletes: %{name}-headers(i586)
- Obsoletes: %{name}-headers(i686)
- %endif
- Requires(pre): kernel-headers
- Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release}
- BuildRequires: kernel-headers >= 2.6.22
- %description headers
- The glibc-headers package contains the header files necessary
- for developing programs which use the standard C libraries (which are
- used by nearly all programs). If you are developing programs which
- will use the standard C libraries, your system needs to have these
- standard header files available in order to create the
- executables.
- Install glibc-headers if you are going to develop programs which will
- use the standard C libraries.
- %description headers -l ja
- glibc-headers パッケージには (ほとんどすべてのプログラムで使われる)
- 標準 C ライブラリを使用したプログラムを開発するためのヘッダーファイルが
- 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、
- これら標準ヘッダーファイルを使用して実行ファイルを作成できます。
- 標準 C ライブラリを使用するプログラムを開発するなら glibc-headers
- をインストールしてください。
- %package common
- Summary: Common binaries and locale data for glibc
- Summary(ja): glibc 用共通バイナリとロケールデータ
- Requires: %{name} = %{version}-%{release}
- Requires: tzdata >= 2003a
- Group: System Environment/Base
- %description common
- The glibc-common package includes common binaries for the GNU libc
- libraries, as well as national language (locale) support.
- This package include ja and en locale-archive.
- %description common -l ja
- glibc-common パッケージには GNU libc ライブラリ用の共用バイナリに
- 加えて、言語(ロケール)サポートや時間帯データベースが収められています。
- このパッケージには日本語と英語のみの locale-archive が含まれます。
- %package common-extra
- Summary: Extra Locale data for glibc
- Summary(ja): glibc 用ロケールデータ(日本語以外)
- Autoreq: false
- Requires(pre): %{name}-common = %{version}-%{release}
- Group: System Environment/Base
- %description common-extra
- The glibc-common-extra package includes national language (locale)
- support except for English and Japanese.
- %description common-extra -l ja
- glibc-common-extra パッケージには GNU libc ライブラリ用の英語と
- 日本語以外の言語(ロケール)が収められています。
- %package locale-source
- Summary: The sources for the locales of glibc
- Summary(ja): glibc 用ロケールデータのソース
- Requires: %{name} = %{version}-%{release}
- Requires: %{name}-common = %{version}-%{release}
- %description locale-source
- The sources for all locales provided in glibc. If you are building
- custom locales you will most likely use these sources as the basis
- for your new locale.
- %package -n nscd
- Summary: A Name Service Caching Daemon (nscd).
- Summary(ja): ネームサービスキャッシングデーモン (nscd)
- Group: System Environment/Daemons
- Requires: %{name} = %{version}-%{release}
- Requires: audit-libs >= 1.1.3
- Requires(pre): /usr/sbin/useradd, coreutils
- Requires(postun): /usr/sbin/userdel
- %if %{with systemd}
- Requires(post): systemd
- Requires(preun): systemd
- Requires(postun): systemd
- %else
- Requires(pre): /sbin/chkconfig
- %endif
- %description -n nscd
- Nscd caches name service lookups and can dramatically improve
- performance with NIS+, and may help with DNS as well.
- %description -n nscd -l ja
- nscd はネームサービス参照をキャッシュし、NIS+ のパフォーマンスを
- 劇的にに改善することができます。DNS のパフォーマンス向上にも同様に寄与します。
- %package utils
- Summary: Development utilities from GNU C library
- Summary(ja): GNU C ライブラリの開発ユーティリティ
- Group: Development/Tools
- Requires: %{name} = %{version}-%{release}
- %description utils
- The glibc-utils package contains memusage, a memory usage profiler,
- mtrace, a memory leak tracer and xtrace, a function call tracer
- which can be helpful during program debugging.
- If unsure if you need this, don't install this package.
- %description utils -l ja
- glibc-utils にはプログラムのデバッグに便利な以下のツールが収録されています:
- memusage (メモリ使用量プロファイラ)、mtrace (メモリリークトレーサ)、
- xtrace (関数呼出しトレーサ)。
- これらが必要かどうか分からない場合は、インストールする必要はありません。
- %if 0%{?_enable_debug_packages}
- %define debug_package %{nil}
- %define __debug_install_post %{nil}
- %global __debug_package 1
- %package debuginfo
- Summary: Debug information for package %{name}
- Group: Development/Debug
- AutoReqProv: no
- %ifarch %{debuginfocommonarches}
- Requires: glibc-debuginfo-common = %{version}-%{release}
- %else
- %ifarch %{ix86}
- Obsoletes: glibc-debuginfo-common
- %endif
- %endif
- %description debuginfo
- This package provides debug information for package %{name}.
- Debug information is useful when developing applications that use this
- package or when debugging this package.
- This package also contains static standard C libraries with
- debugging information. You need this only if you want to step into
- C library routines during debugging programs statically linked against
- one or more of the standard C libraries.
- To use this debugging information, you need to link binaries
- with -static -L%{_prefix}/lib/debug%{_prefix}/%{_lib} compiler options.
- %ifarch %{debuginfocommonarches}
- %package debuginfo-common
- Summary: Debug information for package %{name}
- Group: Development/Debug
- AutoReqProv: no
- %description debuginfo-common
- This package provides debug information for package %{name}.
- Debug information is useful when developing applications that use this
- package or when debugging this package.
- %endif
- %endif
- %prep
- %autosetup -n %{glibcsrcdir} -p1
- chmod +x benchtests/scripts/*.py scripts/pylint
- find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
- touch `find . -name configure`
- touch locale/programs/*-kw.h
- diff -u %{SOURCE11} localedata/SUPPORTED
- cp -f %{SOURCE1000} ./
- %build
- GCC=gcc
- GXX=g++
- rpm_append_flag ()
- {
- BuildFlags="$BuildFlags $*"
- }
- BuildFlags="-O2 -g"
- rpm_inherit_flags ()
- {
- local reference=" $* "
- local flag
- for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do
- if echo "$reference" | grep -q -F " $flag " ; then
- rpm_append_flag "$flag"
- fi
- done
- }
- rpm_inherit_flags \
- "-Wp,-D_GLIBCXX_ASSERTIONS" \
- "-fasynchronous-unwind-tables" \
- %if %{without gcc5}
- "-fstack-clash-protection" \
- %endif
- "-funwind-tables" \
- "-m31" \
- "-m32" \
- "-m64" \
- "-march=i686" \
- "-march=x86-64" \
- "-march=z13" \
- "-march=z14" \
- "-march=zEC12" \
- "-mfpmath=sse" \
- "-msse2" \
- "-mstackrealign" \
- "-mtune=generic" \
- "-mtune=z13" \
- "-mtune=z14" \
- "-mtune=zEC12" \
- "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
- BuildFlagsNonshared=
- rpm_append_flag () {
- BuildFlagsNonshared="$BuildFlagsNonshared $*"
- }
- rpm_inherit_flags \
- "-Wp,-D_FORTIFY_SOURCE=2" \
- %define glibc_make_flags_as ASFLAGS="-g -Wa,--generate-missing-build-notes=yes"
- %define glibc_make_flags %{glibc_make_flags_as}
- EnableKernel="--enable-kernel=%{enablekernel}"
- echo "$GCC" > Gcc
- build()
- {
- local builddir=build-%{target}${1:+-$1}
- ${1+shift}
- rm -rf $builddir
- mkdir $builddir
- pushd $builddir
- ../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \
- --prefix=%{_prefix} \
- --with-headers=%{_prefix}/include $EnableKernel \
- --with-nonshared-cflags="$BuildFlagsNonshared" \
- --enable-bind-now \
- --build=%{target} \
- --enable-stack-protector=strong \
- %ifarch %{pie_arches}
- --enable-static-pie \
- %endif
- --enable-tunables \
- %if 0
- --enable-systemtap \
- %endif
- ${core_with_options} \
- %ifarch x86_64 %{ix86}
- %if %{without gcc5}
- --enable-cet \
- %endif
- %endif
- %ifarch %{ix86}
- --disable-multi-arch \
- %endif
- %if %{without werror}
- --disable-werror \
- %endif
- --disable-profile \
- --without-selinux \
- --disable-crypt ||
- { cat config.log; false; }
- make %{?_smp_mflags} -O -r %{glibc_make_flags}
- popd
- }
- build
- %install
- rm -rf %{buildroot}
- %define glibc_sysroot $RPM_BUILD_ROOT
- find . -type f -name '*.filelist' -exec rm -rf {} \;
- chmod 644 sysdeps/gnu/errlist.c
- GCC=`cat Gcc`
- make -j1 install_root=%{glibc_sysroot} install -C build-%{target}
- %ifnarch %{auxarches}
- pushd build-%{target}
- make install_root=%{glibc_sysroot} \
- install-locales -C ../localedata objdir=`pwd`
- popd
- %endif
- install_different()
- {
- local lib libbase libbaseso dlib
- local destdir="$1"
- local subdir="$2"
- local subdir_up="$3"
- local libdestdir="$destdir/$subdir"
- if ! [ "$destdir" \
- -a "$subdir" \
- -a "$subdir_up" ]; then
- echo "One of the arguments to install_different was emtpy."
- exit 1
- fi
- mkdir -p "$destdir"
- mkdir -p "$libdestdir"
- for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
- do
- libbase=${lib#*/}
- libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so)
- if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
- ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
- else
- cp -a ${lib}.so $libdestdir/$libbaseso
- fi
- dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
- ln -sf $libbaseso $dlib
- done
- }
- rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion*
- rm -f %{glibc_sysroot}/%{_lib}/libNoVersion*
- rm -f %{glibc_sysroot}/%{_lib}/libnss1-*
- rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1
- rm -f %{glibc_sysroot}/{usr/,}sbin/sln
- mkdir -p %{glibc_sysroot}/var/cache/ldconfig
- truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache
- %{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot}
- %if %{with docs}
- if [ -d %{glibc_sysroot}%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
- mkdir -p %{glibc_sysroot}%{_infodir}
- mv -f %{glibc_sysroot}%{_prefix}/info/* %{glibc_sysroot}%{_infodir}
- rm -rf %{glibc_sysroot}%{_prefix}/info
- fi
- gzip -9nvf %{glibc_sysroot}%{_infodir}/libc*
- %else
- rm -f %{glibc_sysroot}%{_infodir}/dir
- rm -f %{glibc_sysroot}%{_infodir}/libc.info*
- %endif
- rm -f %{glibc_sysroot}/etc/localtime
- cp -f %{_datadir}/zoneinfo/Asia/Tokyo %{glibc_sysroot}/etc/localtime
- %ifnarch %{auxarches}
- olddir=`pwd`
- pushd %{glibc_sysroot}%{_prefix}/lib/locale
- rm -f locale-archive
- $olddir/build-%{target}/elf/ld.so \
- --library-path $olddir/build-%{target}/ \
- $olddir/build-%{target}/locale/localedef \
- --prefix %{glibc_sysroot} --add-to-archive \
- eo *_*
- mv locale-archive{,-extra.tmpl}
- $olddir/build-%{target}/elf/ld.so \
- --library-path $olddir/build-%{target}/ \
- $olddir/build-%{target}/locale/localedef \
- --prefix %{glibc_sysroot} --add-to-archive \
- ja_JP* en_US*
- mv locale-archive{,.tmpl}
- cp -a locale-archive{.tmpl,-ja.tmpl}
- for i in eo *_*
- do
- lang=${i%%_*}
- echo "%dir %{_prefix}/lib/locale/$i" >> locales.filelist
- echo "%{_prefix}/lib/locale/$i/*" >> locales.filelist
- done
- popd
- pushd %{glibc_sysroot}%{_prefix}/share/locale
- for i in */LC_MESSAGES/libc.mo
- do
- locale=${i%%%%/*}
- lang=${locale%%%%_*}
- echo "%lang($lang) %{_prefix}/share/locale/${i}" \
- >> %{glibc_sysroot}%{_prefix}/lib/locale/locales.filelist
- done
- popd
- mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist .
- %endif
- install -p -m 644 %{SOURCE7} %{glibc_sysroot}/etc/nsswitch.conf
- mkdir -p %{glibc_sysroot}/etc/default
- install -p -m 644 nis/nss %{glibc_sysroot}/etc/default/nss
- %ifnarch %{auxarches}
- install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc
- %if %{with systemd}
- mkdir -p %{glibc_sysroot}%{_tmpfilesdir}
- install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
- mkdir -p %{glibc_sysroot}%{_unitdir}
- install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}%{_unitdir}/
- %else
- mkdir -p %{glibc_sysroot}/etc/rc.d/init.d
- install -m 755 nscd/nscd.init %{glibc_sysroot}/etc/rc.d/init.d/nscd
- %endif
- %endif
- echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf
- truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache
- chmod 644 %{glibc_sysroot}/etc/ld.so.conf
- mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d
- %ifnarch %{auxarches}
- mkdir -p %{glibc_sysroot}/etc/sysconfig
- truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd
- truncate -s 0 %{glibc_sysroot}/etc/gai.conf
- %endif
- truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
- chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
- install -m 700 build-%{target}/elf/glibc_post_upgrade \
- %{glibc_sysroot}%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
- %if 0%{?_enable_debug_packages}
- mkdir -p %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}
- cp -a %{glibc_sysroot}%{_libdir}/*.a \
- %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/
- rm -f %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/*_p.a
- %endif
- rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo
- touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf
- touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc
- pushd build-%{target}
- $GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
- ../build-%{target}/locale/locarchive.o \
- ../build-%{target}/locale/md5.o \
- ../build-%{target}/locale/record-status.o \
- -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
- -L../build-%{target} \
- -B../build-%{target}/csu/ -lc -lc_nonshared
- install -m 700 build-locale-archive %{glibc_sysroot}%{_prefix}/sbin/build-locale-archive
- popd
- rm -rf documentation
- mkdir documentation
- cp timezone/README documentation/README.timezone
- cp posix/gai.conf documentation/
- %ifarch s390x
- mkdir -p %{glibc_sysroot}/lib
- ln -sf /%{_lib}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1
- %endif
- %if %{with benchtests}
- pushd build-%{target}
- make BENCH_DURATION=1 bench-build
- popd
- mkdir -p %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests
- cp $(find build-%{target}/benchtests -type f -executable) %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- for b in %{SOURCE9} %{SOURCE10}; do
- cp $b %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- done
- cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
- %endif
- %if 0%{?_enable_debug_packages}
- pushd locale
- ln -s programs/*.gperf .
- popd
- pushd iconv
- ln -s ../locale/programs/charmap-kw.gperf .
- popd
- %endif # %{?_enable_debug_packages}
- %if %{with docs}
- rm -f %{glibc_sysroot}%{_infodir}/dir
- %endif
- %ifnarch %{auxarches}
- truncate -s 0 %{glibc_sysroot}/%{_prefix}/lib/locale/locale-archive
- mkdir -p %{glibc_sysroot}/var/{db,run}/nscd
- touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services}
- touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid}
- %endif
- mkdir -p %{glibc_sysroot}%{_libdir}
- mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \
- %{glibc_sysroot}%{_libdir}
- strip -g %{glibc_sysroot}%{_libdir}/*.o
- pushd %{glibc_sysroot}%{_prefix}/%{_lib}/
- $GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
- rm libpthread.a
- ar rcs libpthread.a libpthread.o
- rm libpthread.o
- popd
- for i in %{glibc_sysroot}%{_prefix}/bin/{xtrace,memusage}; do
- %if %{with bootstrap}
- test -w $i || continue
- %endif
- sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
- -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
- -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
- -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
- -i $i
- done
- ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a
- touch master.filelist
- touch glibc.filelist
- touch common.filelist
- touch utils.filelist
- touch nscd.filelist
- touch devel.filelist
- touch headers.filelist
- touch static.filelist
- touch libnsl.filelist
- touch nss_db.filelist
- touch nss_hesiod.filelist
- touch nss-devel.filelist
- touch compat-libpthread-nonshared.filelist
- touch debuginfo.filelist
- touch debuginfocommon.filelist
- {
- find %{glibc_sysroot} \( -type f -o -type l \) \
- \( \
- -name etc -printf "%%%%config " -o \
- -name gconv-modules \
- -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
- -name gconv-modules.cache \
- -printf "%%%%verify(not md5 size mtime) " \
- , \
- ! -path "*/lib/debug/*" -printf "/%%P\n" \)
- find %{glibc_sysroot} -type d \
- \( -path '*%{_prefix}/share/locale' -prune -o \
- \( -path '*%{_prefix}/share/*' \
- %if %{with docs}
- %endif
- -path "*%{_prefix}/include/*" \
- \) -printf "%%%%dir /%%P\n" \)
- } | {
- sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
- -e '\,.*/share/i18n/locales/.*,d' \
- -e '\,.*/share/i18n/charmaps/.*,d' \
- -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
- -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \
- -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
- } | sort > master.filelist
- chmod 0444 master.filelist
- cat master.filelist \
- | grep -v \
- -e '%{_infodir}' \
- -e '%{_libdir}/lib.*_p.a' \
- -e '%{_prefix}/include' \
- -e '%{_libdir}/lib.*\.a' \
- -e '%{_libdir}/.*\.o' \
- -e '%{_libdir}/lib.*\.so' \
- -e 'nscd' \
- -e '%{_prefix}/bin' \
- -e '%{_prefix}/lib/locale' \
- -e '%{_prefix}/sbin/[^gi]' \
- -e '%{_prefix}/share' \
- -e '/var/db/Makefile' \
- -e '/libnss_.*\.so[0-9.]*$' \
- -e '/libnsl' \
- -e 'glibc-benchtests' \
- -e 'aux-cache' \
- -e 'build-locale-archive' \
- > glibc.filelist
- for module in compat files db dns hesiod; do
- cat master.filelist \
- | grep -E \
- -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
- >> glibc.filelist
- done
- grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist
- cat glibc.filelist \
- | grep -v \
- -e '/sbin/ldconfig' \
- > compat32-glibc.filelist
- %if %{with docs}
- grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > devel.filelist
- %endif
- grep '%{_libdir}/lib.*\.a' master.filelist \
- | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
- >> devel.filelist
- grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist
- grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist
- sed -i -e '\,libmemusage.so,d' \
- -e '\,libpcprofile.so,d' \
- -e '\,/libnss_[a-z]*\.so$,d' \
- devel.filelist
- grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || :
- grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || :
- grep '%{_prefix}/include' < master.filelist \
- | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \
- | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
- > headers.filelist
- grep '%{_libdir}/lib.*\.a' < master.filelist \
- | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
- > static.filelist
- grep '%{_prefix}/bin' master.filelist >> common.filelist
- grep '%{_prefix}/sbin/[^gi]' master.filelist \
- | grep -v 'nscd' >> common.filelist
- grep '%{_prefix}/share' master.filelist \
- | grep -v \
- -e '%{_prefix}/share/info/libc.info.*' \
- -e '%%dir %{_prefix}/share/info' \
- -e '%%dir %{_prefix}/share' \
- >> common.filelist
- grep -e "/en_US/" -e "/ja_JP" -e "/ja/" locales.filelist >> common.filelist
- grep -v -e "/en_US/" -e "/ja_JP" -e "/ja/" locales.filelist >> common-extra.filelist
- echo '%{_prefix}/sbin/nscd' > nscd.filelist
- cat > utils.filelist <<EOF
- %if %{without bootstrap}
- %{_prefix}/bin/memusage
- %{_prefix}/bin/memusagestat
- %endif
- %{_prefix}/bin/mtrace
- %{_prefix}/bin/pcprofiledump
- %{_prefix}/bin/xtrace
- EOF
- for module in db hesiod; do
- grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
- master.filelist > nss_$module.filelist
- done
- grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist
- grep '/libnss_[a-z]*\.so$' master.filelist >> devel.filelist
- grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist
- test $(wc -l < libnsl.filelist) -eq 1
- grep '/libnsl-[0-9.]*.so$' master.filelist >> devel.filelist
- %if %{with benchtests}
- find build-%{target}/benchtests -type f -executable | while read b; do
- echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
- done >> benchtests.filelist
- for b in %{SOURCE9} %{SOURCE10}; do
- echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
- done
- echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
- echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
- echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
- echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
- %endif
- echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist
- %if 0%{?_enable_debug_packages}
- find_debuginfo_args='--strict-build-id -g'
- %ifarch %{debuginfocommonarches}
- find_debuginfo_args="$find_debuginfo_args \
- -l common.filelist \
- -l utils.filelist \
- -l nscd.filelist \
- -p '.*/(sbin|libexec)/.*' \
- -o debuginfocommon.filelist \
- -l nss_db.filelist -l nss_hesiod.filelist \
- -l libnsl.filelist -l glibc.filelist \
- %if %{with benchtests}
- -l benchtests.filelist
- %endif
- "
- %endif
- /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
- list_debug_archives()
- {
- local dir=%{_prefix}/lib/debug%{_libdir}
- find %{glibc_sysroot}$dir -name "*.a" -printf "$dir/%%P\n"
- }
- %ifarch %{debuginfocommonarches}
- sed -i '\#^%{glibc_sysroot}%{_prefix}/src/debug/#d' debuginfocommon.filelist
- find %{glibc_sysroot}%{_prefix}/src/debug \
- \( -type d -printf '%%%%dir ' \) , \
- -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
- %ifarch %{biarcharches}
- cat debuginfocommon.sources >> debuginfo.filelist
- %else
- %ifarch %{ix86}
- %define basearch i686
- %endif
- %ifarch sparc sparcv9
- %define basearch sparc
- %endif
- auxarches_debugsources=\
- '/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
- egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
- egrep -v "$auxarches_debugsources" \
- debuginfocommon.sources >> debuginfocommon.filelist
- %endif # %{biarcharches}
- list_debug_archives >> debuginfocommon.filelist
- %endif # %{debuginfocommonarches}
- exclude_common_dirs()
- {
- exclude_dirs="%{_prefix}/src/debug"
- exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
- exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
- for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
- sed -i "\|^%%dir $d/\?$|d" $1
- done
- }
- %ifarch %{debuginfocommonarches}
- exclude_common_dirs debuginfocommon.filelist
- %endif
- exclude_common_dirs debuginfo.filelist
- %ifarch %{auxarches}
- echo Cutting down the list of unpackaged files
- sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
- common.filelist devel.filelist static.filelist headers.filelist \
- utils.filelist nscd.filelist \
- %ifarch %{debuginfocommonarches}
- debuginfocommon.filelist \
- %endif
- | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :)
- %endif # %{auxarches}
- %endif # %{?_enable_debug_packages}
- %check
- %if %{with testsuite}
- run_tests () {
- make %{?_smp_mflags} -O check |& tee rpmbuild.check.log >&2
- test -n tests.sum
- if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then
- echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2
- exit 1
- fi
- set +x
- grep -v ^PASS: tests.sum > rpmbuild.tests.sum.not-passing || true
- if test -n rpmbuild.tests.sum.not-passing ; then
- echo ===================FAILED TESTS===================== >&2
- echo "Target: $(basename "$(pwd)")" >& 2
- cat rpmbuild.tests.sum.not-passing >&2
- while read failed_code failed_test ; do
- for suffix in out test-result ; do
- if test -e "$failed_test.$suffix"; then
- echo >&2
- echo "=====$failed_code $failed_test.$suffix=====" >&2
- cat -- "$failed_test.$suffix" >&2
- echo >&2
- fi
- done
- done <rpmbuild.tests.sum.not-passing
- fi
- echo "* System call consistency checks:" >&2
- cat misc/tst-syscall-list.out >&2
- set -x
- }
- export TIMEOUTFACTOR=16
- parent=$$
- echo ====================TESTING=========================
- pushd build-%{target}
- run_tests
- popd
- echo ====================TESTING END=====================
- PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
- echo ====================PLT RELOCS LD.SO================
- readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
- echo ====================PLT RELOCS LIBC.SO==============
- readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
- echo ====================PLT RELOCS END==================
- pushd build-%{target}
- LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true
- %if %{with valgrind}
- elf/ld.so --library-path .:elf:nptl:dlfcn \
- /usr/bin/valgrind --error-exitcode=1 \
- elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
- %endif
- popd
- %endif # %{run_glibc_tests}
- %pre -p <lua>
- -- Check that the running kernel is new enough
- required = '%{enablekernel}'
- rel = posix.uname("%r")
- if rpm.vercmp(rel, required) < 0 then
- error("FATAL: kernel too old", 0)
- end
- %post -p /usr/sbin/glibc_post_upgrade.%{_target_cpu}
- %postun -p /sbin/ldconfig
- %post -n compat32-%{name} -p /sbin/ldconfig
- %postun -n compat32-%{name} -p /sbin/ldconfig
- %triggerin common -p <lua> -- glibc
- if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
- pid = posix.fork()
- if pid == 0 then
- posix.exec("%{_prefix}/sbin/build-locale-archive")
- elseif pid > 0 then
- posix.wait(pid)
- end
- end
- %post common -p <lua>
- if posix.access("/etc/ld.so.cache") then
- if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
- pid = posix.fork()
- if pid == 0 then
- posix.exec("%{_prefix}/sbin/build-locale-archive")
- elseif pid > 0 then
- posix.wait(pid)
- end
- end
- end
- %if %{without systemd}
- %triggerin common -p <lua> -- tzdata
- function update (filename, new_data)
- local fd = io.open(filename)
- if not fd then return end
- local data = fd:read("*a")
- fd:close()
- if not data then return end
- -- Don't update the file unnecessarily.
- if data == new_data then return end
- local tempfilename = filename .. ".tzupdate"
- fd = io.open(tempfilename, "w")
- if not fd then return end
- fd:write(new_data)
- fd:close()
- posix.chmod(tempfilename, 0644)
- if not os.rename(tempfilename, filename) then
- os.remove(tempfilename)
- end
- end
- fd = io.open("/etc/sysconfig/clock")
- if not fd then return end
- zonename = nil
- for l in fd:lines() do
- zone = string.match(l, "^[ \t]*ZONE[ \t]*=[ \t]*\"?([^ \t\n\"]*)");
- if zone then
- zonename = "/usr/share/zoneinfo/" .. zone
- break
- end
- end
- fd:close()
- if not zonename then return end
- fd = io.open(zonename)
- if not fd then return end
- data = fd:read("*a")
- fd:close()
- if not data then return end
- update("/etc/localtime", data)
- update("/var/spool/postfix/etc/localtime", data)
- %endif
- %post common-extra -p <lua>
- -- cp -f /usr/lib/locale/locale-archive-extra.tmpl /usr/lib/locale/locale-archive.tmpl
- if posix.access("/etc/ld.so.cache") then
- if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
- pid = posix.fork()
- if pid == 0 then
- posix.exec("%{_prefix}/sbin/build-locale-archive")
- elseif pid > 0 then
- posix.wait(pid)
- end
- end
- end
- %postun common-extra -p <lua>
- posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl")
- if posix.access("/etc/ld.so.cache") then
- if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
- pid = posix.fork()
- if pid == 0 then
- posix.exec("%{_prefix}/sbin/build-locale-archive")
- elseif pid > 0 then
- posix.wait(pid)
- end
- end
- end
- %triggerun -- common-extra
- posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl")
- if posix.access("/etc/ld.so.cache") then
- if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
- pid = posix.fork()
- if pid == 0 then
- posix.exec("%{_prefix}/sbin/build-locale-archive")
- elseif pid > 0 then
- posix.wait(pid)
- end
- end
- end
- %post devel
- /sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
- %pre headers
- if [ -L %{_prefix}/include/scsi ] ; then
- rm -f %{_prefix}/include/scsi
- fi
- %preun devel
- if [ "$1" = 0 ]; then
- /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
- fi
- %post utils -p /sbin/ldconfig
- %postun utils -p /sbin/ldconfig
- %pre -n nscd
- getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
- getent passwd nscd >/dev/null ||
- /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
- -c "NSCD Daemon" -u 28 -g nscd nscd
- %post -n nscd
- %if %{with systemd}
- %systemd_post nscd.service
- %else
- /sbin/chkconfig --add nscd
- %endif
- %preun -n nscd
- %if %{with systemd}
- %systemd_preun nscd.service
- %else
- if [ $1 = 0 -o -x /bin/systemctl ] ; then
- /sbin/service nscd stop > /dev/null 2>&1
- /sbin/chkconfig --del nscd
- fi
- %endif
- %postun -n nscd
- if [ $1 = 0 ] ; then
- /usr/sbin/userdel nscd > /dev/null 2>&1 || :
- fi
- %if %{with systemd}
- %systemd_postun_with_restart nscd.service
- %else
- if [ "$1" -ge "1" ]; then
- service nscd condrestart > /dev/null 2>&1 || :
- fi
- %endif
- %if %{xenpackage}
- %post xen -p /sbin/ldconfig
- %postun xen -p /sbin/ldconfig
- %endif
- %clean
- rm -rf "$RPM_BUILD_ROOT"
- rm -f *.filelist*
- %files -f glibc.filelist
- %defattr(-,root,root)
- /sbin/ldconfig
- /%{_lib}/libnsl.so.*
- %dir %{_prefix}/%{_lib}/audit
- %if %{with systemd}
- %exclude /etc/localtime
- %else
- %verify(not md5 size mtime) %config(noreplace) /etc/localtime
- %endif
- %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
- %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
- %verify(not md5 size mtime) %config(noreplace) /etc/rpc
- %dir /etc/ld.so.conf.d
- %dir %{_prefix}/libexec/getconf
- %dir %{_prefix}/%{_lib}/gconv
- %dir %{_localstatedir}/db
- %{_localstatedir}/db/Makefile
- %dir %attr(0700,root,root) /var/cache/ldconfig
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
- %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
- %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
- %doc rpm-old-changelog.txt
- %doc README NEWS INSTALL elf/rtld-debugger-interface.txt
- %license COPYING COPYING.LIB LICENSES
- %if %{build_compat32}
- %files -f compat32-glibc.filelist -n compat32-%{name}
- /%{_lib}/libnsl.so.*
- %endif
- %ifnarch %{auxarches}
- %files -f common.filelist common
- %defattr(-,root,root)
- %dir %{_datadir}/locale
- %dir %{_prefix}/lib/locale
- %dir %{_prefix}/lib/locale/C.utf8
- %{_prefix}/lib/locale/C.utf8/*
- %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive-ja.tmpl
- %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
- %attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
- %dir %{_prefix}/share/locale
- %dir %{_prefix}/share/locale/ja
- %dir %attr(755,root,root) /etc/default
- %verify(not md5 size mtime) %config(noreplace) /etc/default/nss
- %doc documentation/README.timezone
- %doc documentation/gai.conf
- %files common-extra -f common-extra.filelist
- %defattr(-,root,root)
- %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive-extra.tmpl
- %files locale-source
- %defattr(-,root,root)
- %dir %{_prefix}/share/i18n/locales
- %{_prefix}/share/i18n/locales/*
- %dir %{_prefix}/share/i18n/charmaps
- %{_prefix}/share/i18n/charmaps/*
- %files -f devel.filelist devel
- %defattr(-,root,root)
- %files -f static.filelist static
- %defattr(-,root,root)
- %if %{build_compat32}
- %files -f devel.filelist -n compat32-%{name}-devel
- %defattr(-,root,root)
- %exclude %{_prefix}/share
- %files -f static.filelist -n compat32-%{name}-static
- %defattr(-,root,root)
- %endif
- %files -f headers.filelist headers
- %defattr(-,root,root)
- %files -f utils.filelist utils
- %defattr(-,root,root)
- %files -f nscd.filelist -n nscd
- %defattr(-,root,root)
- %config(noreplace) /etc/nscd.conf
- %if %{with systemd}
- %{_unitdir}/*
- %{_tmpfilesdir}/*
- %else
- %config /etc/rc.d/init.d/nscd
- %endif
- %dir %attr(0755,root,root) /var/run/nscd
- %dir %attr(0755,root,root) /var/db/nscd
- %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
- %attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
- %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
- %ghost %config(missingok,noreplace) /etc/sysconfig/nscd
- %endif
- %if 0%{?_enable_debug_packages}
- %files debuginfo -f debuginfo.filelist
- %defattr(-,root,root)
- %ifarch %{debuginfocommonarches}
- %ifnarch %{auxarches}
- %files debuginfo-common -f debuginfocommon.filelist
- %defattr(-,root,root)
- %endif
- %endif
- %endif
- %changelog
- * Sat May 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.31-2
- - updated Patch0.
- - added systemd support (disabled as default).
- - dropped /sbin/ldconfig from compat32.
- * Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.31-1
- - updated to 2.31.
- - updated Patch0.
- - dropped Patch28.
- - imported Patch29 from rawhide.
- - updated Patch5 and 23.
- - updated Source11.
- * Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.30-1
- - updated to 2.30.
- - updated Patch0.
- - dropped Patch11, 24 and 25.
- * Sun Jan 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.28-1
- - updated to 2.28.
- - dropped Source2, 3, 10 and 11.
- - imported Source8-11 from rawhide.
- - dropped Patch11-13.
- - imported Patch1-28 from rawhide.
- - dropped Patch10000.
- - trimmed %%changelog: old logs are rpm-old-changelog.txt.
- * Tue Jun 20 2017 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.23-5
- - add patch20005 for fix CVE-2017-1000366
- * Mon Aug 1 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.23-4
- - added Patch20000-20004 to fix vulnerabilities.
- - CVE-2016-1234
- - CVE-2016-3075
- - CVE-2016-3706
- - CVE-2016-4429
- * Sun Jun 26 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.23-3
- - rebuilt with gcc-5.4.0
- * Tue May 24 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.23-2
- - rebuilt with new binutils.
- * Sat May 07 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.23-1
- - update to 2.23
- - remove Patch14-18
- - update SOURCE1 from fedora
|