[12020] | 1 | %bcond_with gcc5 |
---|
| 2 | %bcond_with systemd |
---|
| 3 | |
---|
[12342] | 4 | %define glibcversion 2.31 |
---|
[5290] | 5 | %define glibcsrcdir glibc-%{glibcversion} |
---|
| 6 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
---|
[521] | 7 | ### glibc.spec.in follows: |
---|
| 8 | %define run_glibc_tests 1 |
---|
| 9 | %define auxarches athlon sparcv9v sparc64v alphaev6 |
---|
[5290] | 10 | %if %{build_compat32} |
---|
| 11 | %define auxarches i586 athlon sparcv9 alphaev6 |
---|
| 12 | %endif |
---|
[521] | 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 |
---|
[5290] | 21 | %ifarch ppc64 |
---|
| 22 | %define buildpower6 1 |
---|
[521] | 23 | %else |
---|
| 24 | %define buildpower6 0 |
---|
| 25 | %endif |
---|
[5290] | 26 | %define biarcharches %{ix86} x86_64 ppc ppc64 s390 s390x |
---|
[12398] | 27 | %global _enable_debug_packages 1 |
---|
[5290] | 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 |
---|
[521] | 32 | |
---|
| 33 | Summary: The GNU libc libraries |
---|
| 34 | Summary(ja): GNU libc ライブラリ |
---|
| 35 | Name: glibc |
---|
| 36 | Version: %{glibcversion} |
---|
[12398] | 37 | Release: 2%{?_dist_release}%{?with_systemd:.systemd} |
---|
[521] | 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. |
---|
| 43 | License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ |
---|
| 44 | Group: System Environment/Libraries |
---|
[5290] | 45 | URL: http://www.gnu.org/software/glibc/ |
---|
[12342] | 46 | Source0: https://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz |
---|
[7961] | 47 | Source1: build-locale-archive.c |
---|
[12020] | 48 | Source4: nscd.conf |
---|
[7961] | 49 | Source7: nsswitch.conf.vine |
---|
[12020] | 50 | Source8: power6emul.c |
---|
| 51 | Source9: bench.mk |
---|
| 52 | Source10: 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. |
---|
| 56 | Source11: SUPPORTED |
---|
[5300] | 57 | |
---|
[12020] | 58 | Source1000: rpm-old-changelog.txt |
---|
[5300] | 59 | |
---|
[12020] | 60 | # patched form upstream |
---|
[12398] | 61 | Patch0: glibc-2.31-20200508.patch |
---|
[12020] | 62 | |
---|
[7961] | 63 | # patches from Fedora |
---|
[12020] | 64 | Patch1: glibc-post_upgrade.patch |
---|
| 65 | Patch2: glibc-fedora-nscd.patch |
---|
| 66 | Patch3: glibc-rh697421.patch |
---|
| 67 | Patch4: glibc-fedora-linux-tcsetattr.patch |
---|
| 68 | Patch5: glibc-rh741105.patch |
---|
| 69 | Patch6: glibc-fedora-localedef.patch |
---|
| 70 | Patch7: glibc-fedora-nis-rh188246.patch |
---|
| 71 | Patch8: glibc-fedora-manual-dircategory.patch |
---|
| 72 | Patch9: glibc-rh827510.patch |
---|
[12342] | 73 | # needed by build-locale-archive.c |
---|
[12020] | 74 | Patch10: glibc-fedora-locarchive.patch |
---|
| 75 | Patch12: glibc-rh819430.patch |
---|
| 76 | Patch13: glibc-fedora-localedata-rh61908.patch |
---|
| 77 | Patch14: glibc-fedora-__libc_multiple_libcs.patch |
---|
| 78 | Patch15: glibc-rh1070416.patch |
---|
| 79 | Patch16: glibc-nscd-sysconfig.patch |
---|
| 80 | Patch17: glibc-cs-path.patch |
---|
| 81 | Patch18: glibc-c-utf8-locale.patch |
---|
| 82 | Patch23: glibc-python3.patch |
---|
[12342] | 83 | #Patch28: glibc-rh1615608.patch |
---|
| 84 | Patch29: glibc-fedora-nsswitch.patch |
---|
[7961] | 85 | |
---|
| 86 | # patch for Vine |
---|
[12020] | 87 | #Patch10001: glibc-2.18-vine-build-env.patch |
---|
[7961] | 88 | |
---|
[10738] | 89 | # security |
---|
[7961] | 90 | |
---|
[521] | 91 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
| 92 | Obsoletes: glibc-profile < 2.4 |
---|
| 93 | Provides: ldconfig |
---|
| 94 | # The dynamic linker supports DT_GNU_HASH |
---|
| 95 | Provides: rtld(GNU_HASH) |
---|
| 96 | Requires: glibc-common = %{version}-%{release} |
---|
| 97 | # Require libgcc in case some program calls pthread_cancel in its %%post |
---|
| 98 | Requires(pre): basesystem, libgcc |
---|
| 99 | # This is for building auxiliary programs like memusage, nscd |
---|
| 100 | # For initial glibc bootstraps it can be commented out |
---|
| 101 | BuildRequires: gd-devel libpng-devel zlib-devel texinfo |
---|
| 102 | BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel |
---|
[12225] | 103 | BuildRequires: python3-devel |
---|
[12020] | 104 | BuildRequires: bison |
---|
[521] | 105 | BuildRequires: /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 |
---|
| 108 | BuildRequires: gcc >= 3.2 |
---|
[12020] | 109 | %define enablekernel 3.2 |
---|
[5290] | 110 | Conflicts: kernel < %{enablekernel} |
---|
[521] | 111 | %ifarch i386 |
---|
[7961] | 112 | %define target_cpu i486 |
---|
[521] | 113 | %else |
---|
[7961] | 114 | %define target_cpu %{_target_cpu} |
---|
[521] | 115 | %endif |
---|
[7961] | 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 | |
---|
[521] | 125 | %ifarch %{multiarcharches} |
---|
| 126 | # Need STT_IFUNC support |
---|
| 127 | %ifarch ppc ppc64 |
---|
| 128 | BuildRequires: binutils >= 2.20.51.0.2 |
---|
| 129 | Conflicts: binutils < 2.20.51.0.2 |
---|
| 130 | %else |
---|
| 131 | BuildRequires: binutils >= 2.19.51.0.10 |
---|
| 132 | Conflicts: binutils < 2.19.51.0.10 |
---|
| 133 | %endif |
---|
| 134 | # Earlier releases have broken support for IRELATIVE relocations |
---|
| 135 | Conflicts: prelink < 0.4.2 |
---|
| 136 | %else |
---|
| 137 | # Need AS_NEEDED directive |
---|
| 138 | # Need --hash-style=* support |
---|
| 139 | BuildRequires: binutils >= 2.17.50.0.2-5 |
---|
| 140 | %endif |
---|
| 141 | BuildRequires: gcc >= 3.2.1-5 |
---|
| 142 | %ifarch ppc s390 s390x |
---|
| 143 | BuildRequires: gcc >= 4.1.0-0.17 |
---|
| 144 | %endif |
---|
| 145 | %if 0%{?_enable_debug_packages} |
---|
| 146 | BuildRequires: elfutils >= 0.72 |
---|
| 147 | BuildRequires: rpm >= 4.2-0.56 |
---|
| 148 | %endif |
---|
[7961] | 149 | |
---|
| 150 | # The testsuite builds static C++ binaries that require a static |
---|
| 151 | # C++ runtime from libstdc++-static. |
---|
| 152 | BuildRequires: libstdc++-static |
---|
| 153 | |
---|
| 154 | BuildRequires: tzdata |
---|
| 155 | |
---|
[521] | 156 | %define __find_provides %{SOURCE10} |
---|
| 157 | %define __find_requires %{SOURCE11} |
---|
| 158 | %define _filter_GLIBC_PRIVATE 1 |
---|
| 159 | |
---|
[4312] | 160 | Vendor: Project Vine |
---|
| 161 | Distribution: Vine Linux |
---|
| 162 | |
---|
[521] | 163 | %description |
---|
| 164 | The glibc package contains standard libraries which are used by |
---|
| 165 | multiple programs on the system. In order to save disk space and |
---|
| 166 | memory, as well as to make upgrading easier, common system code is |
---|
| 167 | kept in one place and shared between programs. This particular package |
---|
| 168 | contains the most important sets of shared libraries: the standard C |
---|
| 169 | library and the standard math library. Without these two libraries, a |
---|
| 170 | Linux system will not function. |
---|
| 171 | |
---|
| 172 | %description -l ja |
---|
| 173 | glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを |
---|
| 174 | ふくみます。ディスクスペースとメモリを節約したり、アップグレードを |
---|
| 175 | 用意にするために、共通のシステムコードは一つの場所におかれ、プログラム |
---|
| 176 | 間で共有されます。この部分的なパッケージはシェアドライブラリのかなり |
---|
| 177 | 重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。 |
---|
| 178 | この二つのライブラリ抜きでは、Linux システムは機能しません。 |
---|
| 179 | |
---|
| 180 | %package -n compat32-%{name} |
---|
| 181 | Summary: The GNU libc libraries. |
---|
| 182 | Summary(ja): GNU libc ライブラリ |
---|
| 183 | Group: System Environment/Libraries |
---|
[5290] | 184 | Requires: %{name} >= %{version}-%{release} |
---|
[521] | 185 | |
---|
| 186 | %description -n compat32-%{name} |
---|
| 187 | The glibc package contains standard libraries which are used by |
---|
| 188 | multiple programs on the system. In order to save disk space and |
---|
| 189 | memory, as well as to make upgrading easier, common system code is |
---|
| 190 | kept in one place and shared between programs. This particular package |
---|
| 191 | contains the most important sets of shared libraries: the standard C |
---|
| 192 | library and the standard math library. Without these two libraries, a |
---|
| 193 | Linux system will not function. |
---|
| 194 | |
---|
| 195 | %description -n compat32-%{name} -l ja |
---|
| 196 | glibc パッケージはシステム上の複数のプログラムで使われる標準ライブラリを |
---|
| 197 | ふくみます。ディスクスペースとメモリを節約したり、アップグレードを |
---|
| 198 | 用意にするために、共通のシステムコードは一つの場所におかれ、プログラム |
---|
| 199 | 間で共有されます。この部分的なパッケージはシェアドライブラリのかなり |
---|
| 200 | 重要なセットをふくみます: 標準 C ライブラリと標準数値ライブラリです。 |
---|
| 201 | この二つのライブラリ抜きでは、Linux システムは機能しません。 |
---|
| 202 | |
---|
| 203 | %if %{xenpackage} |
---|
| 204 | %package xen |
---|
| 205 | Summary: The GNU libc libraries (optimized for running under Xen) |
---|
| 206 | Group: System Environment/Libraries |
---|
| 207 | Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release} |
---|
| 208 | |
---|
| 209 | %description xen |
---|
| 210 | The standard glibc package is optimized for native kernels and does not |
---|
| 211 | perform as well under the Xen hypervisor. This package provides alternative |
---|
| 212 | library binaries that will be selected instead when running under Xen. |
---|
| 213 | |
---|
| 214 | Install glibc-xen if you might run your system under the Xen hypervisor. |
---|
| 215 | %endif |
---|
| 216 | |
---|
| 217 | %package devel |
---|
| 218 | Summary: Object files for development using standard C libraries. |
---|
| 219 | Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル |
---|
| 220 | Group: Development/Libraries |
---|
| 221 | Requires(pre): /sbin/install-info |
---|
| 222 | Requires(pre): %{name}-headers |
---|
| 223 | Requires: %{name}-headers = %{version}-%{release} |
---|
| 224 | Requires: %{name} = %{version}-%{release} |
---|
| 225 | |
---|
| 226 | %description devel |
---|
| 227 | The glibc-devel package contains the object files necessary |
---|
| 228 | for developing programs which use the standard C libraries (which are |
---|
| 229 | used by nearly all programs). If you are developing programs which |
---|
| 230 | will use the standard C libraries, your system needs to have these |
---|
| 231 | standard object files available in order to create the |
---|
| 232 | executables. |
---|
| 233 | |
---|
| 234 | Install glibc-devel if you are going to develop programs which will |
---|
| 235 | use the standard C libraries. |
---|
| 236 | |
---|
| 237 | %description devel -l ja |
---|
| 238 | glibc-devel パッケージには (ほとんどすべてのプログラムで使われる) |
---|
| 239 | 標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが |
---|
| 240 | 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、 |
---|
| 241 | これらオブジェクトファイルを使用して実行ファイルを作成できます。 |
---|
| 242 | |
---|
| 243 | 標準 C ライブラリを使用するプログラムを開発するなら glibc-devel |
---|
| 244 | をインストールしてください。 |
---|
| 245 | |
---|
| 246 | %package -n compat32-%{name}-devel |
---|
| 247 | Summary: Object files for development using standard C libraries. |
---|
| 248 | Summary(ja): 標準 C ライブラリで使われるオブジェクトファイル |
---|
| 249 | Group: Development/Libraries |
---|
[5290] | 250 | Requires: %{name}-devel = %{version}-%{release} |
---|
[521] | 251 | Requires: compat32-%{name} = %{version}-%{release} |
---|
| 252 | |
---|
| 253 | %description -n compat32-%{name}-devel |
---|
| 254 | The glibc-devel package contains the object files necessary |
---|
| 255 | for developing programs which use the standard C libraries (which are |
---|
| 256 | used by nearly all programs). If you are developing programs which |
---|
| 257 | will use the standard C libraries, your system needs to have these |
---|
| 258 | standard object files available in order to create the |
---|
| 259 | executables. |
---|
| 260 | |
---|
| 261 | Install glibc-devel if you are going to develop programs which will |
---|
| 262 | use the standard C libraries. |
---|
| 263 | |
---|
| 264 | %description -n compat32-%{name}-devel -l ja |
---|
| 265 | glibc-devel パッケージには (ほとんどすべてのプログラムで使われる) |
---|
| 266 | 標準 C ライブラリを使用したプログラムを開発するためのオブジェクトファイルが |
---|
| 267 | 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、 |
---|
| 268 | これらオブジェクトファイルを使用して実行ファイルを作成できます。 |
---|
| 269 | |
---|
| 270 | 標準 C ライブラリを使用するプログラムを開発するなら glibc-devel |
---|
| 271 | をインストールしてください。 |
---|
| 272 | |
---|
| 273 | %package static |
---|
| 274 | Summary: C library static libraries for -static linking. |
---|
| 275 | Summary(ja): -static リンクのための静的 C ライブラリ |
---|
| 276 | Group: Development/Libraries |
---|
| 277 | Requires: %{name}-devel = %{version}-%{release} |
---|
| 278 | |
---|
| 279 | %description static |
---|
| 280 | The glibc-static package contains the C library static libraries |
---|
| 281 | for -static linking. You don't need these, unless you link statically, |
---|
| 282 | which is highly discouraged. |
---|
| 283 | |
---|
| 284 | %description static -l ja |
---|
| 285 | glibc-static パッケージには -static リンクで使用する静的 C ライブラリが |
---|
| 286 | 入っています。 |
---|
| 287 | 静的ライブラリが必要な場合でなければ、このパッケージをインストールする |
---|
| 288 | ことは避けて下さい。 |
---|
| 289 | |
---|
[3081] | 290 | %package -n compat32-%{name}-static |
---|
| 291 | Summary: C library static libraries for -static linking. |
---|
| 292 | Summary(ja): -static リンクのための静的 C ライブラリ |
---|
| 293 | Group: Development/Libraries |
---|
| 294 | Requires: %{name}-devel = %{version}-%{release} |
---|
| 295 | Requires: %{name}-static = %{version}-%{release} |
---|
| 296 | Requires: compat32-%{name}-devel = %{version}-%{release} |
---|
| 297 | |
---|
| 298 | %description -n compat32-%{name}-static |
---|
| 299 | The glibc-static package contains the C library static libraries |
---|
| 300 | for -static linking. You don't need these, unless you link statically, |
---|
| 301 | which is highly discouraged. |
---|
| 302 | |
---|
| 303 | %description -n compat32-%{name}-static -l ja |
---|
| 304 | glibc-static パッケージには -static リンクで使用する静的 C ライブラリが |
---|
| 305 | 入っています。 |
---|
| 306 | 静的ライブラリが必要な場合でなければ、このパッケージをインストールする |
---|
| 307 | ことは避けて下さい。 |
---|
| 308 | |
---|
[521] | 309 | %package headers |
---|
| 310 | Summary: Header files for development using standard C libraries. |
---|
| 311 | Summary(ja): 標準 C ライブラリで使われるヘッダーファイル |
---|
| 312 | Group: Development/Libraries |
---|
| 313 | Provides: %{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. |
---|
| 317 | Obsoletes: %{name}-headers(i586) |
---|
| 318 | Obsoletes: %{name}-headers(i686) |
---|
| 319 | %endif |
---|
| 320 | Requires(pre): kernel-headers |
---|
| 321 | Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release} |
---|
| 322 | BuildRequires: kernel-headers >= 2.6.22 |
---|
| 323 | |
---|
| 324 | %description headers |
---|
| 325 | The glibc-headers package contains the header files necessary |
---|
| 326 | for developing programs which use the standard C libraries (which are |
---|
| 327 | used by nearly all programs). If you are developing programs which |
---|
| 328 | will use the standard C libraries, your system needs to have these |
---|
| 329 | standard header files available in order to create the |
---|
| 330 | executables. |
---|
| 331 | |
---|
| 332 | Install glibc-headers if you are going to develop programs which will |
---|
| 333 | use the standard C libraries. |
---|
| 334 | |
---|
[5290] | 335 | %description headers -l ja |
---|
[521] | 336 | glibc-headers パッケージには (ほとんどすべてのプログラムで使われる) |
---|
| 337 | 標準 C ライブラリを使用したプログラムを開発するためのヘッダーファイルが |
---|
| 338 | 含まれます。標準 C ライブラリを使用するプログラムを開発する場合には、 |
---|
| 339 | これら標準ヘッダーファイルを使用して実行ファイルを作成できます。 |
---|
| 340 | |
---|
| 341 | 標準 C ライブラリを使用するプログラムを開発するなら glibc-headers |
---|
| 342 | をインストールしてください。 |
---|
| 343 | |
---|
| 344 | %package common |
---|
| 345 | Summary: Common binaries and locale data for glibc |
---|
| 346 | Summary(ja): glibc 用共通バイナリとロケールデータ |
---|
| 347 | Requires: %{name} = %{version}-%{release} |
---|
| 348 | Requires: tzdata >= 2003a |
---|
| 349 | Group: System Environment/Base |
---|
| 350 | |
---|
| 351 | %description common |
---|
| 352 | The glibc-common package includes common binaries for the GNU libc |
---|
| 353 | libraries, as well as national language (locale) support. |
---|
| 354 | This package include ja and en locale-archive. |
---|
| 355 | |
---|
| 356 | %description common -l ja |
---|
| 357 | glibc-common パッケージには GNU libc ライブラリ用の共用バイナリに |
---|
| 358 | 加えて、言語(ロケール)サポートや時間帯データベースが収められています。 |
---|
| 359 | このパッケージには日本語と英語のみの locale-archive が含まれます。 |
---|
| 360 | |
---|
| 361 | %package common-extra |
---|
| 362 | Summary: Extra Locale data for glibc |
---|
| 363 | Summary(ja): glibc 用ロケールデータ(日本語以外) |
---|
| 364 | Autoreq: false |
---|
| 365 | Requires(pre): %{name}-common = %{version}-%{release} |
---|
| 366 | Group: System Environment/Base |
---|
| 367 | |
---|
| 368 | %description common-extra |
---|
| 369 | The glibc-common-extra package includes national language (locale) |
---|
| 370 | support except for English and Japanese. |
---|
| 371 | |
---|
| 372 | %description common-extra -l ja |
---|
| 373 | glibc-common-extra パッケージには GNU libc ライブラリ用の英語と |
---|
| 374 | 日本語以外の言語(ロケール)が収められています。 |
---|
| 375 | |
---|
[12020] | 376 | %package locale-source |
---|
| 377 | Summary: The sources for the locales of glibc |
---|
| 378 | Summary(ja): glibc 用ロケールデータのソース |
---|
| 379 | Requires: %{name} = %{version}-%{release} |
---|
| 380 | Requires: %{name}-common = %{version}-%{release} |
---|
| 381 | |
---|
| 382 | %description locale-source |
---|
| 383 | The sources for all locales provided in glibc. If you are building |
---|
| 384 | custom locales you will most likely use these sources as the basis |
---|
| 385 | for your new locale. |
---|
| 386 | |
---|
[521] | 387 | %package -n nscd |
---|
| 388 | Summary: A Name Service Caching Daemon (nscd). |
---|
| 389 | Summary(ja): ネームサービスキャッシングデーモン (nscd) |
---|
| 390 | Group: System Environment/Daemons |
---|
[5290] | 391 | Requires: %{name} = %{version}-%{release} |
---|
[521] | 392 | Requires: audit-libs >= 1.1.3 |
---|
[12398] | 393 | Requires(pre): /usr/sbin/useradd, coreutils |
---|
| 394 | Requires(postun): /usr/sbin/userdel |
---|
| 395 | %if %{with systemd} |
---|
| 396 | Requires(post): systemd |
---|
| 397 | Requires(preun): systemd |
---|
| 398 | Requires(postun): systemd |
---|
| 399 | %else |
---|
| 400 | Requires(pre): /sbin/chkconfig |
---|
| 401 | %endif |
---|
[521] | 402 | |
---|
| 403 | %description -n nscd |
---|
| 404 | Nscd caches name service lookups and can dramatically improve |
---|
| 405 | performance with NIS+, and may help with DNS as well. |
---|
| 406 | |
---|
| 407 | %description -n nscd -l ja |
---|
| 408 | nscd はネームサービス参照をキャッシュし、NIS+ のパフォーマンスを |
---|
| 409 | 劇的にに改善することができます。DNS のパフォーマンス向上にも同様に寄与します。 |
---|
| 410 | |
---|
| 411 | %package utils |
---|
| 412 | Summary: Development utilities from GNU C library |
---|
| 413 | Summary(ja): GNU C ライブラリの開発ユーティリティ |
---|
| 414 | Group: Development/Tools |
---|
| 415 | Requires: %{name} = %{version}-%{release} |
---|
| 416 | |
---|
| 417 | %description utils |
---|
| 418 | The glibc-utils package contains memusage, a memory usage profiler, |
---|
| 419 | mtrace, a memory leak tracer and xtrace, a function call tracer |
---|
| 420 | which can be helpful during program debugging. |
---|
| 421 | |
---|
| 422 | If unsure if you need this, don't install this package. |
---|
| 423 | |
---|
| 424 | %description utils -l ja |
---|
| 425 | glibc-utils にはプログラムのデバッグに便利な以下のツールが収録されています: |
---|
| 426 | memusage (メモリ使用量プロファイラ)、mtrace (メモリリークトレーサ)、 |
---|
| 427 | xtrace (関数呼出しトレーサ)。 |
---|
| 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 |
---|
| 437 | Summary: Debug information for package %{name} |
---|
| 438 | Group: Development/Debug |
---|
| 439 | AutoReqProv: no |
---|
| 440 | %ifarch %{debuginfocommonarches} |
---|
| 441 | Requires: glibc-debuginfo-common = %{version}-%{release} |
---|
| 442 | %else |
---|
| 443 | %ifarch %{ix86} |
---|
| 444 | Obsoletes: glibc-debuginfo-common |
---|
| 445 | %endif |
---|
| 446 | %endif |
---|
| 447 | |
---|
| 448 | %description debuginfo |
---|
| 449 | This package provides debug information for package %{name}. |
---|
| 450 | Debug information is useful when developing applications that use this |
---|
| 451 | package or when debugging this package. |
---|
| 452 | |
---|
| 453 | This package also contains static standard C libraries with |
---|
| 454 | debugging information. You need this only if you want to step into |
---|
| 455 | C library routines during debugging programs statically linked against |
---|
| 456 | one or more of the standard C libraries. |
---|
| 457 | To use this debugging information, you need to link binaries |
---|
| 458 | with -static -L%{_prefix}/lib/debug%{_prefix}/%{_lib} compiler options. |
---|
| 459 | |
---|
| 460 | %ifarch %{debuginfocommonarches} |
---|
| 461 | |
---|
| 462 | %package debuginfo-common |
---|
| 463 | Summary: Debug information for package %{name} |
---|
| 464 | Group: Development/Debug |
---|
| 465 | AutoReqProv: no |
---|
| 466 | |
---|
| 467 | %description debuginfo-common |
---|
| 468 | This package provides debug information for package %{name}. |
---|
| 469 | Debug information is useful when developing applications that use this |
---|
| 470 | package or when debugging this package. |
---|
| 471 | |
---|
| 472 | %endif |
---|
| 473 | %endif |
---|
| 474 | |
---|
| 475 | %prep |
---|
[12020] | 476 | %autosetup -n %{glibcsrcdir} -p1 |
---|
[7961] | 477 | |
---|
[12020] | 478 | # Make benchmark scripts executable |
---|
| 479 | chmod +x benchtests/scripts/*.py scripts/pylint |
---|
[521] | 480 | |
---|
[12020] | 481 | # Remove all files generated from patching. |
---|
[521] | 482 | find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; |
---|
[12020] | 483 | |
---|
| 484 | # Ensure timestamps on configure files are current to prevent |
---|
| 485 | # regenerating them. |
---|
[521] | 486 | touch `find . -name configure` |
---|
[12020] | 487 | |
---|
| 488 | # Ensure *-kw.h files are current to prevent regenerating them. |
---|
[521] | 489 | touch locale/programs/*-kw.h |
---|
| 490 | |
---|
[12020] | 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. |
---|
| 501 | diff -u %{SOURCE11} localedata/SUPPORTED |
---|
| 502 | |
---|
| 503 | cp -f %{SOURCE1000} ./ |
---|
| 504 | |
---|
[521] | 505 | %build |
---|
[12020] | 506 | |
---|
| 507 | # We build using the native system compilers. |
---|
[521] | 508 | GCC=gcc |
---|
| 509 | GXX=g++ |
---|
[12020] | 510 | |
---|
| 511 | # Part of rpm_inherit_flags. Is overridden below. |
---|
| 512 | rpm_append_flag () |
---|
| 513 | { |
---|
| 514 | BuildFlags="$BuildFlags $*" |
---|
| 515 | } |
---|
| 516 | |
---|
| 517 | # Propagates the listed flags to rpm_append_flag if supplied by |
---|
| 518 | # redhat-rpm-config. |
---|
| 519 | BuildFlags="-O2 -g" |
---|
| 520 | rpm_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 | |
---|
| 540 | rpm_inherit_flags \ |
---|
| 541 | "-Wp,-D_GLIBCXX_ASSERTIONS" \ |
---|
| 542 | "-fasynchronous-unwind-tables" \ |
---|
| 543 | %if %{without gcc5} |
---|
| 544 | "-fstack-clash-protection" \ |
---|
[521] | 545 | %endif |
---|
[12020] | 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" \ |
---|
[521] | 563 | |
---|
[12020] | 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. |
---|
| 569 | BuildFlagsNonshared= |
---|
| 570 | rpm_append_flag () { |
---|
| 571 | BuildFlagsNonshared="$BuildFlagsNonshared $*" |
---|
| 572 | } |
---|
| 573 | rpm_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 | ############################################################################## |
---|
[521] | 585 | EnableKernel="--enable-kernel=%{enablekernel}" |
---|
[12020] | 586 | # Save the used compiler and options into the file "Gcc" for use later |
---|
| 587 | # by %%install. |
---|
[521] | 588 | echo "$GCC" > Gcc |
---|
| 589 | |
---|
[12020] | 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 | ############################################################################## |
---|
[7961] | 597 | build() |
---|
[521] | 598 | { |
---|
[12020] | 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 \ |
---|
[521] | 613 | %endif |
---|
[12020] | 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; } |
---|
[521] | 634 | |
---|
[12020] | 635 | make %{?_smp_mflags} -O -r %{glibc_make_flags} |
---|
| 636 | popd |
---|
[521] | 637 | } |
---|
| 638 | |
---|
[12020] | 639 | # Default set of compiler options. |
---|
[7961] | 640 | build |
---|
[521] | 641 | |
---|
| 642 | |
---|
[12020] | 643 | %install |
---|
| 644 | rm -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 |
---|
[521] | 650 | |
---|
[12020] | 651 | # Remove existing file lists. |
---|
| 652 | find . -type f -name '*.filelist' -exec rm -rf {} \; |
---|
[521] | 653 | |
---|
[12020] | 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. |
---|
| 661 | chmod 644 sysdeps/gnu/errlist.c |
---|
| 662 | |
---|
| 663 | # Reload compiler and build options that were used during %%build. |
---|
[521] | 664 | GCC=`cat Gcc` |
---|
| 665 | |
---|
[12020] | 666 | # Build and install: |
---|
| 667 | make -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. |
---|
[521] | 671 | %ifnarch %{auxarches} |
---|
[12020] | 672 | pushd build-%{target} |
---|
| 673 | # Do not use a parallel make here because the hardlink optimization in |
---|
| 674 | # localedef is not fully reproducible when running concurrently. |
---|
| 675 | make install_root=%{glibc_sysroot} \ |
---|
| 676 | install-locales -C ../localedata objdir=`pwd` |
---|
| 677 | popd |
---|
[521] | 678 | %endif |
---|
| 679 | |
---|
| 680 | |
---|
[12020] | 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. |
---|
[7961] | 693 | install_different() |
---|
| 694 | { |
---|
[12020] | 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 |
---|
[7961] | 726 | } |
---|
| 727 | |
---|
[12020] | 728 | ############################################################################## |
---|
[521] | 729 | # Remove the files we don't want to distribute |
---|
[12020] | 730 | ############################################################################## |
---|
[521] | 731 | |
---|
[12020] | 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. |
---|
| 735 | rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion* |
---|
| 736 | rm -f %{glibc_sysroot}/%{_lib}/libNoVersion* |
---|
[521] | 737 | |
---|
[12020] | 738 | # Remove the old nss modules. |
---|
| 739 | rm -f %{glibc_sysroot}/%{_lib}/libnss1-* |
---|
| 740 | rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1 |
---|
[521] | 741 | |
---|
[12020] | 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 |
---|
| 746 | rm -f %{glibc_sysroot}/{usr/,}sbin/sln |
---|
[521] | 747 | |
---|
[12020] | 748 | ###################################################################### |
---|
| 749 | # Run ldconfig to create all the symbolic links we need |
---|
| 750 | ###################################################################### |
---|
[521] | 751 | |
---|
[12020] | 752 | # Note: This has to happen before creating /etc/ld.so.conf. |
---|
[521] | 753 | |
---|
[12020] | 754 | mkdir -p %{glibc_sysroot}/var/cache/ldconfig |
---|
| 755 | truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache |
---|
[521] | 756 | |
---|
[12020] | 757 | # ldconfig is statically linked, so we can use the new version. |
---|
| 758 | %{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot} |
---|
[521] | 759 | |
---|
[12020] | 760 | ############################################################################## |
---|
| 761 | # Install info files |
---|
| 762 | ############################################################################## |
---|
[521] | 763 | |
---|
[12020] | 764 | %if %{with docs} |
---|
| 765 | # Move the info files if glibc installed them into the wrong location. |
---|
| 766 | if [ -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 |
---|
| 770 | fi |
---|
[521] | 771 | |
---|
[12020] | 772 | # Compress all of the info files. |
---|
| 773 | gzip -9nvf %{glibc_sysroot}%{_infodir}/libc* |
---|
[521] | 774 | |
---|
[12020] | 775 | %else |
---|
| 776 | rm -f %{glibc_sysroot}%{_infodir}/dir |
---|
| 777 | rm -f %{glibc_sysroot}%{_infodir}/libc.info* |
---|
| 778 | %endif |
---|
[521] | 779 | |
---|
[12020] | 780 | ############################################################################## |
---|
| 781 | # Create locale sub-package file lists |
---|
| 782 | ############################################################################## |
---|
[521] | 783 | |
---|
[12020] | 784 | rm -f %{glibc_sysroot}/etc/localtime |
---|
| 785 | cp -f %{_datadir}/zoneinfo/Asia/Tokyo %{glibc_sysroot}/etc/localtime |
---|
[521] | 786 | |
---|
| 787 | %ifnarch %{auxarches} |
---|
| 788 | olddir=`pwd` |
---|
[12020] | 789 | pushd %{glibc_sysroot}%{_prefix}/lib/locale |
---|
| 790 | rm -f locale-archive |
---|
[521] | 791 | # Intentionally we do not pass --alias-file=, aliases will be added |
---|
| 792 | # by build-locale-archive. |
---|
[7961] | 793 | $olddir/build-%{target}/elf/ld.so \ |
---|
| 794 | --library-path $olddir/build-%{target}/ \ |
---|
[12020] | 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. |
---|
[521] | 799 | mv locale-archive{,-extra.tmpl} |
---|
[7961] | 800 | $olddir/build-%{target}/elf/ld.so \ |
---|
| 801 | --library-path $olddir/build-%{target}/ \ |
---|
[12020] | 802 | $olddir/build-%{target}/locale/localedef \ |
---|
| 803 | --prefix %{glibc_sysroot} --add-to-archive \ |
---|
| 804 | ja_JP* en_US* |
---|
[521] | 805 | mv locale-archive{,.tmpl} |
---|
| 806 | cp -a locale-archive{.tmpl,-ja.tmpl} |
---|
[12020] | 807 | # Create the file lists for the language specific sub-packages: |
---|
| 808 | for i in eo *_* |
---|
| 809 | do |
---|
| 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 |
---|
| 816 | done |
---|
[521] | 817 | popd |
---|
[12020] | 818 | pushd %{glibc_sysroot}%{_prefix}/share/locale |
---|
| 819 | for i in */LC_MESSAGES/libc.mo |
---|
| 820 | do |
---|
| 821 | locale=${i%%%%/*} |
---|
| 822 | lang=${locale%%%%_*} |
---|
| 823 | echo "%lang($lang) %{_prefix}/share/locale/${i}" \ |
---|
| 824 | >> %{glibc_sysroot}%{_prefix}/lib/locale/locales.filelist |
---|
| 825 | done |
---|
| 826 | popd |
---|
| 827 | mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist . |
---|
[521] | 828 | %endif |
---|
| 829 | |
---|
[12020] | 830 | ############################################################################## |
---|
| 831 | # Install configuration files for services |
---|
| 832 | ############################################################################## |
---|
[521] | 833 | |
---|
[12020] | 834 | install -p -m 644 %{SOURCE7} %{glibc_sysroot}/etc/nsswitch.conf |
---|
[521] | 835 | |
---|
[12020] | 836 | mkdir -p %{glibc_sysroot}/etc/default |
---|
| 837 | install -p -m 644 nis/nss %{glibc_sysroot}/etc/default/nss |
---|
[521] | 838 | |
---|
[12020] | 839 | %ifnarch %{auxarches} |
---|
| 840 | # This is for ncsd - in glibc 2.2 |
---|
| 841 | install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc |
---|
| 842 | %if %{with systemd} |
---|
| 843 | mkdir -p %{glibc_sysroot}%{_tmpfilesdir} |
---|
| 844 | install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir} |
---|
[12398] | 845 | mkdir -p %{glibc_sysroot}%{_unitdir} |
---|
| 846 | install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}%{_unitdir}/ |
---|
[12020] | 847 | %else |
---|
| 848 | mkdir -p %{glibc_sysroot}/etc/rc.d/init.d |
---|
| 849 | install -m 755 nscd/nscd.init %{glibc_sysroot}/etc/rc.d/init.d/nscd |
---|
| 850 | %endif |
---|
| 851 | %endif |
---|
[521] | 852 | |
---|
[12020] | 853 | # Include ld.so.conf |
---|
| 854 | echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf |
---|
| 855 | truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache |
---|
| 856 | chmod 644 %{glibc_sysroot}/etc/ld.so.conf |
---|
| 857 | mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d |
---|
| 858 | %ifnarch %{auxarches} |
---|
| 859 | mkdir -p %{glibc_sysroot}/etc/sysconfig |
---|
| 860 | truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd |
---|
| 861 | truncate -s 0 %{glibc_sysroot}/etc/gai.conf |
---|
| 862 | %endif |
---|
[521] | 863 | |
---|
[12020] | 864 | # Include %{_libdir}/gconv/gconv-modules.cache |
---|
| 865 | truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache |
---|
| 866 | chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache |
---|
[521] | 867 | |
---|
[12020] | 868 | # Install the upgrade program |
---|
| 869 | install -m 700 build-%{target}/elf/glibc_post_upgrade \ |
---|
| 870 | %{glibc_sysroot}%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu} |
---|
[521] | 871 | |
---|
[12020] | 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 | ############################################################################## |
---|
[521] | 877 | |
---|
[12020] | 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} |
---|
| 881 | mkdir -p %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir} |
---|
| 882 | cp -a %{glibc_sysroot}%{_libdir}/*.a \ |
---|
| 883 | %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/ |
---|
| 884 | rm -f %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/*_p.a |
---|
[521] | 885 | %endif |
---|
| 886 | |
---|
[12020] | 887 | # Remove any zoneinfo files; they are maintained by tzdata. |
---|
| 888 | rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo |
---|
[521] | 889 | |
---|
[12020] | 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. |
---|
| 896 | touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf |
---|
| 897 | touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc |
---|
[521] | 898 | |
---|
[7961] | 899 | pushd build-%{target} |
---|
[12020] | 900 | $GCC -Os -g -static -o build-locale-archive %{SOURCE1} \ |
---|
[7961] | 901 | ../build-%{target}/locale/locarchive.o \ |
---|
| 902 | ../build-%{target}/locale/md5.o \ |
---|
[12020] | 903 | ../build-%{target}/locale/record-status.o \ |
---|
[7961] | 904 | -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \ |
---|
| 905 | -L../build-%{target} \ |
---|
| 906 | -B../build-%{target}/csu/ -lc -lc_nonshared |
---|
[12020] | 907 | install -m 700 build-locale-archive %{glibc_sysroot}%{_prefix}/sbin/build-locale-archive |
---|
[7961] | 908 | popd |
---|
[521] | 909 | |
---|
[12020] | 910 | # Lastly copy some additional documentation for the packages. |
---|
[521] | 911 | rm -rf documentation |
---|
| 912 | mkdir documentation |
---|
| 913 | cp timezone/README documentation/README.timezone |
---|
| 914 | cp posix/gai.conf documentation/ |
---|
| 915 | |
---|
| 916 | %ifarch s390x |
---|
| 917 | # Compatibility symlink |
---|
[12020] | 918 | mkdir -p %{glibc_sysroot}/lib |
---|
| 919 | ln -sf /%{_lib}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1 |
---|
[521] | 920 | %endif |
---|
| 921 | |
---|
[12020] | 922 | %if %{with benchtests} |
---|
| 923 | # Build benchmark binaries. Ignore the output of the benchmark runs. |
---|
[7961] | 924 | pushd build-%{target} |
---|
[12020] | 925 | make BENCH_DURATION=1 bench-build |
---|
[7961] | 926 | popd |
---|
| 927 | |
---|
[12020] | 928 | # Copy over benchmark binaries. |
---|
| 929 | mkdir -p %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests |
---|
| 930 | cp $(find build-%{target}/benchtests -type f -executable) %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
| 931 | # ... and the makefile. |
---|
| 932 | for b in %{SOURCE9} %{SOURCE10}; do |
---|
| 933 | cp $b %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
| 934 | done |
---|
| 935 | # .. and finally, the comparison scripts. |
---|
| 936 | cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
| 937 | cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
| 938 | cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
| 939 | cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ |
---|
[521] | 940 | %endif |
---|
[7961] | 941 | |
---|
[12020] | 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. |
---|
| 945 | pushd locale |
---|
| 946 | ln -s programs/*.gperf . |
---|
[7961] | 947 | popd |
---|
[12020] | 948 | pushd iconv |
---|
| 949 | ln -s ../locale/programs/charmap-kw.gperf . |
---|
| 950 | popd |
---|
| 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. |
---|
| 956 | rm -f %{glibc_sysroot}%{_infodir}/dir |
---|
[521] | 957 | %endif |
---|
| 958 | |
---|
[12020] | 959 | %ifnarch %{auxarches} |
---|
| 960 | truncate -s 0 %{glibc_sysroot}/%{_prefix}/lib/locale/locale-archive |
---|
| 961 | mkdir -p %{glibc_sysroot}/var/{db,run}/nscd |
---|
| 962 | touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services} |
---|
| 963 | touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid} |
---|
[521] | 964 | %endif |
---|
| 965 | |
---|
[12020] | 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. |
---|
| 969 | mkdir -p %{glibc_sysroot}%{_libdir} |
---|
| 970 | mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \ |
---|
| 971 | %{glibc_sysroot}%{_libdir} |
---|
| 972 | |
---|
| 973 | # Strip all of the installed object files. |
---|
| 974 | strip -g %{glibc_sysroot}%{_libdir}/*.o |
---|
| 975 | |
---|
[7961] | 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 | ############################################################################### |
---|
[12020] | 985 | pushd %{glibc_sysroot}%{_prefix}/%{_lib}/ |
---|
[521] | 986 | $GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a |
---|
| 987 | rm libpthread.a |
---|
| 988 | ar rcs libpthread.a libpthread.o |
---|
| 989 | rm libpthread.o |
---|
| 990 | popd |
---|
[12020] | 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. |
---|
| 995 | for 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 |
---|
| 1004 | done |
---|
| 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 | ############################################################################## |
---|
| 1011 | ar 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. |
---|
| 1059 | touch master.filelist |
---|
| 1060 | touch glibc.filelist |
---|
| 1061 | touch common.filelist |
---|
| 1062 | touch utils.filelist |
---|
| 1063 | touch nscd.filelist |
---|
| 1064 | touch devel.filelist |
---|
| 1065 | touch headers.filelist |
---|
| 1066 | touch static.filelist |
---|
| 1067 | touch libnsl.filelist |
---|
| 1068 | touch nss_db.filelist |
---|
| 1069 | touch nss_hesiod.filelist |
---|
| 1070 | touch nss-devel.filelist |
---|
| 1071 | touch compat-libpthread-nonshared.filelist |
---|
| 1072 | touch debuginfo.filelist |
---|
| 1073 | touch debuginfocommon.filelist |
---|
| 1074 | |
---|
[7961] | 1075 | ############################################################################### |
---|
[12020] | 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 |
---|
[521] | 1114 | |
---|
[12020] | 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. |
---|
[521] | 1119 | |
---|
[12020] | 1120 | # Make the master file list read-only after this point to avoid accidental |
---|
| 1121 | # modification. |
---|
| 1122 | chmod 0444 master.filelist |
---|
[521] | 1123 | |
---|
[12020] | 1124 | ############################################################################### |
---|
| 1125 | # glibc |
---|
| 1126 | ############################################################################### |
---|
[521] | 1127 | |
---|
[12020] | 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. |
---|
| 1139 | cat 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. |
---|
| 1163 | for 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 |
---|
| 1168 | done |
---|
| 1169 | grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist |
---|
| 1170 | |
---|
[12398] | 1171 | cat glibc.filelist \ |
---|
| 1172 | | grep -v \ |
---|
| 1173 | -e '/sbin/ldconfig' \ |
---|
| 1174 | > compat32-glibc.filelist |
---|
| 1175 | |
---|
[12020] | 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. |
---|
| 1182 | grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > devel.filelist |
---|
| 1183 | %endif |
---|
| 1184 | |
---|
| 1185 | # Put some static files into the devel package. |
---|
| 1186 | grep '%{_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. |
---|
| 1192 | grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist |
---|
| 1193 | grep '%{_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. |
---|
| 1197 | sed -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. |
---|
| 1210 | grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || : |
---|
| 1211 | grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || : |
---|
| 1212 | # Put the include files into headers file list. |
---|
| 1213 | grep '%{_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. |
---|
| 1223 | grep '%{_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. |
---|
| 1234 | grep '%{_prefix}/bin' master.filelist >> common.filelist |
---|
| 1235 | grep '%{_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. |
---|
| 1242 | grep '%{_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 |
---|
| 1251 | grep -e "/en_US/" -e "/ja_JP" -e "/ja/" locales.filelist >> common.filelist |
---|
| 1252 | grep -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. |
---|
| 1259 | echo '%{_prefix}/sbin/nscd' > nscd.filelist |
---|
| 1260 | |
---|
| 1261 | ############################################################################### |
---|
| 1262 | # glibc-utils |
---|
| 1263 | ############################################################################### |
---|
| 1264 | |
---|
| 1265 | # Add the utils scripts and programs to the utils subpackage. |
---|
| 1266 | cat > 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 |
---|
| 1274 | EOF |
---|
| 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. |
---|
| 1282 | for module in db hesiod; do |
---|
| 1283 | grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ |
---|
| 1284 | master.filelist > nss_$module.filelist |
---|
| 1285 | done |
---|
| 1286 | |
---|
| 1287 | ############################################################################### |
---|
| 1288 | # nss-devel |
---|
| 1289 | ############################################################################### |
---|
| 1290 | |
---|
| 1291 | # Symlinks go into the nss-devel package (instead of the main devel |
---|
| 1292 | # package). |
---|
| 1293 | grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist |
---|
| 1294 | grep '/libnss_[a-z]*\.so$' master.filelist >> devel.filelist |
---|
| 1295 | |
---|
| 1296 | ############################################################################### |
---|
| 1297 | # libnsl |
---|
| 1298 | ############################################################################### |
---|
| 1299 | |
---|
| 1300 | # Prepare the libnsl-related file lists. |
---|
| 1301 | grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist |
---|
| 1302 | test $(wc -l < libnsl.filelist) -eq 1 |
---|
| 1303 | grep '/libnsl-[0-9.]*.so$' master.filelist >> devel.filelist |
---|
| 1304 | |
---|
| 1305 | ############################################################################### |
---|
| 1306 | # glibc-benchtests |
---|
| 1307 | ############################################################################### |
---|
| 1308 | %if %{with benchtests} |
---|
| 1309 | |
---|
| 1310 | # List of benchmarks. |
---|
| 1311 | find build-%{target}/benchtests -type f -executable | while read b; do |
---|
| 1312 | echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" |
---|
| 1313 | done >> benchtests.filelist |
---|
| 1314 | # ... and the makefile. |
---|
| 1315 | for b in %{SOURCE9} %{SOURCE10}; do |
---|
| 1316 | echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist |
---|
| 1317 | done |
---|
| 1318 | # ... and finally, the comparison scripts. |
---|
| 1319 | echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist |
---|
| 1320 | echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist |
---|
| 1321 | echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist |
---|
| 1322 | echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist |
---|
| 1323 | %endif |
---|
| 1324 | |
---|
| 1325 | ############################################################################### |
---|
| 1326 | # compat-libpthread-nonshared |
---|
| 1327 | ############################################################################### |
---|
| 1328 | echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist |
---|
| 1329 | |
---|
| 1330 | ############################################################################### |
---|
| 1331 | # glibc-debuginfocommon, and glibc-debuginfo |
---|
| 1332 | ############################################################################### |
---|
| 1333 | %if 0%{?_enable_debug_packages} |
---|
| 1334 | |
---|
[521] | 1335 | find_debuginfo_args='--strict-build-id -g' |
---|
| 1336 | %ifarch %{debuginfocommonarches} |
---|
| 1337 | find_debuginfo_args="$find_debuginfo_args \ |
---|
[12020] | 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 |
---|
[521] | 1347 | %endif |
---|
[12020] | 1348 | " |
---|
| 1349 | %endif |
---|
[521] | 1350 | |
---|
[12020] | 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. |
---|
[521] | 1354 | list_debug_archives() |
---|
| 1355 | { |
---|
[12020] | 1356 | local dir=%{_prefix}/lib/debug%{_libdir} |
---|
| 1357 | find %{glibc_sysroot}$dir -name "*.a" -printf "$dir/%%P\n" |
---|
[521] | 1358 | } |
---|
| 1359 | |
---|
| 1360 | %ifarch %{debuginfocommonarches} |
---|
| 1361 | |
---|
[12020] | 1362 | # Remove the source files from the common package debuginfo. |
---|
| 1363 | sed -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. |
---|
| 1366 | find %{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. |
---|
| 1373 | cat debuginfocommon.sources >> debuginfo.filelist |
---|
| 1374 | |
---|
| 1375 | %else |
---|
| 1376 | |
---|
[521] | 1377 | %ifarch %{ix86} |
---|
| 1378 | %define basearch i686 |
---|
| 1379 | %endif |
---|
| 1380 | %ifarch sparc sparcv9 |
---|
| 1381 | %define basearch sparc |
---|
| 1382 | %endif |
---|
| 1383 | |
---|
[7961] | 1384 | # The auxarches get only these few source files. |
---|
[521] | 1385 | auxarches_debugsources=\ |
---|
| 1386 | '/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h' |
---|
| 1387 | |
---|
[7961] | 1388 | # Place the source files into the core debuginfo pakcage. |
---|
[521] | 1389 | egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist |
---|
| 1390 | |
---|
[7961] | 1391 | # Remove the source files from the common debuginfo package. |
---|
[521] | 1392 | egrep -v "$auxarches_debugsources" \ |
---|
| 1393 | debuginfocommon.sources >> debuginfocommon.filelist |
---|
[5290] | 1394 | |
---|
[7961] | 1395 | %endif # %{biarcharches} |
---|
[521] | 1396 | |
---|
[7961] | 1397 | # Add the list of *.a archives in the debug directory to |
---|
| 1398 | # the common debuginfo package. |
---|
[521] | 1399 | list_debug_archives >> debuginfocommon.filelist |
---|
| 1400 | |
---|
[12020] | 1401 | %endif # %{debuginfocommonarches} |
---|
[521] | 1402 | |
---|
[12020] | 1403 | # Remove some common directories from the common package debuginfo so that we |
---|
| 1404 | # don't end up owning them. |
---|
| 1405 | exclude_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})" |
---|
[7961] | 1410 | |
---|
[12020] | 1411 | for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do |
---|
| 1412 | sed -i "\|^%%dir $d/\?$|d" $1 |
---|
| 1413 | done |
---|
| 1414 | } |
---|
[521] | 1415 | |
---|
[12020] | 1416 | %ifarch %{debuginfocommonarches} |
---|
| 1417 | exclude_common_dirs debuginfocommon.filelist |
---|
| 1418 | %endif |
---|
| 1419 | exclude_common_dirs debuginfo.filelist |
---|
[7961] | 1420 | |
---|
[12020] | 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 | ############################################################################## |
---|
[521] | 1426 | %ifarch %{auxarches} |
---|
| 1427 | echo Cutting down the list of unpackaged files |
---|
| 1428 | sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \ |
---|
[12020] | 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} |
---|
[521] | 1436 | |
---|
[12020] | 1437 | %endif # %{?_enable_debug_packages} |
---|
[521] | 1438 | |
---|
[12020] | 1439 | %check |
---|
| 1440 | %if %{with testsuite} |
---|
[521] | 1441 | |
---|
[12020] | 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. |
---|
| 1447 | run_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 |
---|
| 1482 | export TIMEOUTFACTOR=16 |
---|
| 1483 | parent=$$ |
---|
| 1484 | echo ====================TESTING========================= |
---|
| 1485 | |
---|
| 1486 | # Default libraries. |
---|
| 1487 | pushd build-%{target} |
---|
| 1488 | run_tests |
---|
| 1489 | popd |
---|
| 1490 | |
---|
| 1491 | |
---|
| 1492 | echo ====================TESTING END===================== |
---|
| 1493 | PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' |
---|
| 1494 | echo ====================PLT RELOCS LD.SO================ |
---|
| 1495 | readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" |
---|
| 1496 | echo ====================PLT RELOCS LIBC.SO============== |
---|
| 1497 | readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" |
---|
| 1498 | echo ====================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. |
---|
| 1504 | pushd build-%{target} |
---|
| 1505 | |
---|
| 1506 | # Show the auxiliary vector as seen by the new library |
---|
| 1507 | # (even if we do not perform the valgrind test). |
---|
| 1508 | LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true |
---|
| 1509 | |
---|
| 1510 | %if %{with valgrind} |
---|
| 1511 | elf/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 |
---|
[521] | 1514 | %endif |
---|
[12020] | 1515 | popd |
---|
[521] | 1516 | |
---|
[12020] | 1517 | %endif # %{run_glibc_tests} |
---|
[521] | 1518 | |
---|
[12020] | 1519 | |
---|
[5290] | 1520 | %pre -p <lua> |
---|
| 1521 | -- Check that the running kernel is new enough |
---|
| 1522 | required = '%{enablekernel}' |
---|
| 1523 | rel = posix.uname("%r") |
---|
| 1524 | if rpm.vercmp(rel, required) < 0 then |
---|
| 1525 | error("FATAL: kernel too old", 0) |
---|
| 1526 | end |
---|
| 1527 | |
---|
[521] | 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 | |
---|
[5290] | 1536 | %triggerin common -p <lua> -- glibc |
---|
| 1537 | if 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 |
---|
| 1544 | end |
---|
[521] | 1545 | |
---|
[5290] | 1546 | %post common -p <lua> |
---|
| 1547 | if 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 |
---|
| 1556 | end |
---|
[521] | 1557 | |
---|
[12398] | 1558 | %if %{without systemd} |
---|
[5290] | 1559 | %triggerin common -p <lua> -- tzdata |
---|
| 1560 | function 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 |
---|
| 1577 | end |
---|
| 1578 | fd = io.open("/etc/sysconfig/clock") |
---|
| 1579 | if not fd then return end |
---|
| 1580 | zonename = nil |
---|
| 1581 | for 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 |
---|
| 1587 | end |
---|
| 1588 | fd:close() |
---|
| 1589 | if not zonename then return end |
---|
| 1590 | fd = io.open(zonename) |
---|
| 1591 | if not fd then return end |
---|
| 1592 | data = fd:read("*a") |
---|
| 1593 | fd:close() |
---|
| 1594 | if not data then return end |
---|
| 1595 | update("/etc/localtime", data) |
---|
| 1596 | update("/var/spool/postfix/etc/localtime", data) |
---|
[12398] | 1597 | %endif |
---|
[521] | 1598 | |
---|
[5290] | 1599 | %post common-extra -p <lua> |
---|
| 1600 | -- cp -f /usr/lib/locale/locale-archive-extra.tmpl /usr/lib/locale/locale-archive.tmpl |
---|
| 1601 | if 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 |
---|
| 1610 | end |
---|
[521] | 1611 | |
---|
[5290] | 1612 | %postun common-extra -p <lua> |
---|
| 1613 | posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl") |
---|
| 1614 | if 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 |
---|
| 1623 | end |
---|
| 1624 | |
---|
[521] | 1625 | %triggerun -- common-extra |
---|
[5290] | 1626 | posix.exec("cp -f /usr/lib/locale/locale-archive-ja.tmpl /usr/lib/locale/locale-archive.tmpl") |
---|
| 1627 | if 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 |
---|
| 1636 | end |
---|
[521] | 1637 | |
---|
[7961] | 1638 | |
---|
[521] | 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 |
---|
| 1644 | if [ -L %{_prefix}/include/scsi ] ; then |
---|
| 1645 | rm -f %{_prefix}/include/scsi |
---|
| 1646 | fi |
---|
| 1647 | |
---|
| 1648 | %preun devel |
---|
| 1649 | if [ "$1" = 0 ]; then |
---|
| 1650 | /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || : |
---|
| 1651 | fi |
---|
| 1652 | |
---|
| 1653 | %post utils -p /sbin/ldconfig |
---|
| 1654 | |
---|
| 1655 | %postun utils -p /sbin/ldconfig |
---|
| 1656 | |
---|
| 1657 | %pre -n nscd |
---|
[5290] | 1658 | getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd |
---|
| 1659 | getent passwd nscd >/dev/null || |
---|
| 1660 | /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \ |
---|
| 1661 | -c "NSCD Daemon" -u 28 -g nscd nscd |
---|
[521] | 1662 | |
---|
| 1663 | %post -n nscd |
---|
[12398] | 1664 | %if %{with systemd} |
---|
| 1665 | %systemd_post nscd.service |
---|
| 1666 | %else |
---|
[521] | 1667 | /sbin/chkconfig --add nscd |
---|
[12398] | 1668 | %endif |
---|
[521] | 1669 | |
---|
| 1670 | %preun -n nscd |
---|
[12398] | 1671 | %if %{with systemd} |
---|
| 1672 | %systemd_preun nscd.service |
---|
| 1673 | %else |
---|
| 1674 | if [ $1 = 0 -o -x /bin/systemctl ] ; then |
---|
[5290] | 1675 | /sbin/service nscd stop > /dev/null 2>&1 |
---|
[521] | 1676 | /sbin/chkconfig --del nscd |
---|
| 1677 | fi |
---|
[12398] | 1678 | %endif |
---|
[521] | 1679 | |
---|
| 1680 | %postun -n nscd |
---|
| 1681 | if [ $1 = 0 ] ; then |
---|
| 1682 | /usr/sbin/userdel nscd > /dev/null 2>&1 || : |
---|
| 1683 | fi |
---|
[12398] | 1684 | %if %{with systemd} |
---|
| 1685 | %systemd_postun_with_restart nscd.service |
---|
| 1686 | %else |
---|
[521] | 1687 | if [ "$1" -ge "1" ]; then |
---|
| 1688 | service nscd condrestart > /dev/null 2>&1 || : |
---|
| 1689 | fi |
---|
[12398] | 1690 | %endif |
---|
[521] | 1691 | |
---|
| 1692 | %if %{xenpackage} |
---|
| 1693 | %post xen -p /sbin/ldconfig |
---|
| 1694 | %postun xen -p /sbin/ldconfig |
---|
| 1695 | %endif |
---|
| 1696 | |
---|
| 1697 | %clean |
---|
| 1698 | rm -rf "$RPM_BUILD_ROOT" |
---|
| 1699 | rm -f *.filelist* |
---|
| 1700 | |
---|
[12020] | 1701 | %files -f glibc.filelist |
---|
[521] | 1702 | %defattr(-,root,root) |
---|
[12398] | 1703 | /sbin/ldconfig |
---|
[12020] | 1704 | /%{_lib}/libnsl.so.* |
---|
| 1705 | %dir %{_prefix}/%{_lib}/audit |
---|
[12398] | 1706 | %if %{with systemd} |
---|
| 1707 | %exclude /etc/localtime |
---|
| 1708 | %else |
---|
[521] | 1709 | %verify(not md5 size mtime) %config(noreplace) /etc/localtime |
---|
[12020] | 1710 | %endif |
---|
[521] | 1711 | %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf |
---|
| 1712 | %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf |
---|
[5290] | 1713 | %verify(not md5 size mtime) %config(noreplace) /etc/rpc |
---|
[521] | 1714 | %dir /etc/ld.so.conf.d |
---|
| 1715 | %dir %{_prefix}/libexec/getconf |
---|
| 1716 | %dir %{_prefix}/%{_lib}/gconv |
---|
[12020] | 1717 | %dir %{_localstatedir}/db |
---|
| 1718 | %{_localstatedir}/db/Makefile |
---|
[521] | 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 |
---|
[5290] | 1722 | %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf |
---|
[12020] | 1723 | %doc rpm-old-changelog.txt |
---|
| 1724 | %doc README NEWS INSTALL elf/rtld-debugger-interface.txt |
---|
[12342] | 1725 | %license COPYING COPYING.LIB LICENSES |
---|
[521] | 1726 | |
---|
| 1727 | %if %{build_compat32} |
---|
[12398] | 1728 | %files -f compat32-glibc.filelist -n compat32-%{name} |
---|
[12020] | 1729 | /%{_lib}/libnsl.so.* |
---|
[521] | 1730 | %endif |
---|
| 1731 | |
---|
| 1732 | %ifnarch %{auxarches} |
---|
| 1733 | %files -f common.filelist common |
---|
| 1734 | %defattr(-,root,root) |
---|
[12020] | 1735 | %dir %{_datadir}/locale |
---|
[521] | 1736 | %dir %{_prefix}/lib/locale |
---|
[12020] | 1737 | %dir %{_prefix}/lib/locale/C.utf8 |
---|
| 1738 | %{_prefix}/lib/locale/C.utf8/* |
---|
[521] | 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 |
---|
[12020] | 1742 | %dir %{_prefix}/share/locale |
---|
| 1743 | %dir %{_prefix}/share/locale/ja |
---|
[521] | 1744 | %dir %attr(755,root,root) /etc/default |
---|
| 1745 | %verify(not md5 size mtime) %config(noreplace) /etc/default/nss |
---|
[12020] | 1746 | %doc documentation/README.timezone |
---|
| 1747 | %doc documentation/gai.conf |
---|
[521] | 1748 | |
---|
[12020] | 1749 | %files common-extra -f common-extra.filelist |
---|
[521] | 1750 | %defattr(-,root,root) |
---|
| 1751 | %attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive-extra.tmpl |
---|
| 1752 | |
---|
[12020] | 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 | |
---|
[521] | 1760 | %files -f devel.filelist devel |
---|
| 1761 | %defattr(-,root,root) |
---|
| 1762 | |
---|
[3081] | 1763 | %files -f static.filelist static |
---|
| 1764 | %defattr(-,root,root) |
---|
| 1765 | |
---|
[521] | 1766 | %if %{build_compat32} |
---|
| 1767 | %files -f devel.filelist -n compat32-%{name}-devel |
---|
| 1768 | %defattr(-,root,root) |
---|
| 1769 | %exclude %{_prefix}/share |
---|
| 1770 | |
---|
[3081] | 1771 | %files -f static.filelist -n compat32-%{name}-static |
---|
[521] | 1772 | %defattr(-,root,root) |
---|
[3081] | 1773 | %endif |
---|
[521] | 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 |
---|
[12398] | 1784 | %if %{with systemd} |
---|
| 1785 | %{_unitdir}/* |
---|
| 1786 | %{_tmpfilesdir}/* |
---|
| 1787 | %else |
---|
[521] | 1788 | %config /etc/rc.d/init.d/nscd |
---|
[12020] | 1789 | %endif |
---|
[521] | 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 |
---|
[12398] | 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 | |
---|
[12342] | 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 | |
---|
[12225] | 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 | |
---|
[12020] | 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 | |
---|
[11690] | 1844 | * Tue Jun 20 2017 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.23-5 |
---|
| 1845 | - add patch20005 for fix CVE-2017-1000366 |
---|
| 1846 | |
---|
[10738] | 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 | |
---|
[10405] | 1854 | * Sun Jun 26 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.23-3 |
---|
| 1855 | - rebuilt with gcc-5.4.0 |
---|
| 1856 | |
---|
[10331] | 1857 | * Tue May 24 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.23-2 |
---|
| 1858 | - rebuilt with new binutils. |
---|
| 1859 | |
---|
[10250] | 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 |
---|