Compare commits

...

453 Commits

Author SHA1 Message Date
DJ Delorie
61f15e90bc Auto-sync with upstream branch master
Upstream commit: 1a6566094d3097f4a3037ab5555cddc6cb11c3a3

- alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986]
- Fix http: URL in 'configure'
- Regenerate charmap-kw.h, locfile-kw.h
- Fix three GNU license URLs, along with trailing-newline issues.
- Prefer https to http for gnu.org and fsf.org URLs
2019-09-16 14:47:26 -04:00
Patsy Franklin
6129ad64d4 Auto-sync with upstream branch master
Upstream commit: 1b7f04070bd94f259e2ed24d6fb76309d64fb164.

- locale: Avoid zero-length array in _nl_category_names [BZ #24962]
- math: Replace const attribute with pure in totalorder* functions
- y2038: Introduce the __ASSUME_TIME64_SYSCALLS define
- Finish move of clock_* functions to libc. [BZ #24959]
- Update Alpha libm-test-ulps
- localedef: Use initializer for flexible array member [BZ #24950]
- Add misc/tst-mntent-autofs, testing autofs "ignore" filtering
- Use autofs "ignore" mount hint in getmntent_r/getmntent
- hurd: Fix build
- Use generic memset/memcpy/memmove in benchtests
- nptl: Move pthread_attr_getinheritsched implementation into libc
- hurd: Fix SS_ONSTACK support
- hurd: Remove optimizing anonymous maps as __vm_allocate.
- hurd: Fix poll and select POSIX compliancy details about errors
- hurd: Fix timeout handling in _hurd_select
- hurd getcwd: Allow unknown root directory
- hurd: Fix implementation of setitimer.
- hurd: Fix _hurd_select for single fd sets
- MIPS support for GNU hash
- sh: Split BE/LE abilist
- microblaze: Split BE/LE abilist
- arm: Split BE/LE abilist
- Correct the spelling of more contributors
- Fix posix/tst-regex by using UTF-8 and own test input
- [powerpc] fegetenv_status: simplify instruction generation
- [powerpc] fesetenv: optimize FPSCR access
- [powerpc] SET_RESTORE_ROUND improvements
- [powerpc] fe{en,dis}ableexcept, fesetmode: optimize FPSCR accesses
- [powerpc] fe{en,dis}ableexcept optimize bit translations
- misc: Use allocate_once in getmntent
- nptl: Move pthread_attr_setdetachstate implementation into libc
- login: pututxline could fail to overwrite existing entries [BZ #24902]
- Fix posix/tst-regex by using a dedicated input-file.
2019-09-06 07:38:07 -04:00
DJ Delorie
1fa217076e Move makedb from glibc-common to nss_db (#1704334)
The makedb program is only used to make databases for the nss_db
module, so it makes sense to only install them together.
2019-08-27 15:07:36 -04:00
DJ Delorie
5846004b81 Auto-sync with upstream branch master
Upstream commit: 1bced8cadc82077f0201801239e89eb24b68e9aa

- Don't put non-ASCII into installed headers
- Fix spellings of contributor names in comments and doc
- [MIPS] Raise highest supported EI_ABIVERSION value [SWBZ #24916]
- mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels
- linux: Make profil_counter a compat_symbol (SWBZ#17726)
- Refactor sigcontextinfo.h
- Add RTLD_SINGLE_THREAD_P on generic single-thread.h
- Chinese locales: Set first_weekday to 2 (swbug 24682).
- powerpc: Fix typos and field name in comments
- Mark IDN tests unsupported with libidn2 before 2.0.5.
- Document strftime %Ob and %OB as C2X features.
- Remove dead regex code
- Fix bad pointer / leak in regex code
- Don't use the argument to time.
- Add tgmath.h macros for narrowing functions.
- Update i386 libm-test-ulps
2019-08-26 14:24:15 -04:00
Carlos O'Donell
7e6e06c36d Auto-sync with upstream branch master
Upstream commit: d34d4c80226b3f5a1b51a8e5b005a52fba07d7ba

- Merge upstream nsswitch.conf and nscd.conf updates.
- Do not print backtraces on fatal glibc errors.
- elf: Self-dlopen failure with explict loader invocation (swbz#24900)
- login: Add nonstring attributes to struct utmp, struct utmpx (swbz#24899)
- login: Use struct flock64 in utmp (swbz#24880)
- login: Disarm timer after utmp lock acquisition (swbz#24879)
2019-08-20 17:03:01 -04:00
Carlos O'Donell
72195d4485 locale: Fix C.UTF-8 ranges.
The ellipsis range support only allows <Uxxxx> or <Uxxxxxxxx> as
valid unicode code points, otherwise it treats it as a symbol and
since we don't define the symbol the entire range is unused.
2019-08-16 10:07:58 -04:00
Florian Weimer
77335ae30e Source upload 2019-08-15 10:41:39 +02:00
Florian Weimer
76ac51ab78 Auto-sync with upstream branch master
Upstream commit: 341da5b4b6253de9a7581a066f33f89cacb44dec
2019-08-15 10:37:59 +02:00
Florian Weimer
293db26d85 Fix changelog version 2019-08-02 14:24:18 +02:00
Florian Weimer
525a40ce11 Lower the release number to 1 2019-08-02 14:23:17 +02:00
Florian Weimer
1ff5b17afe Auto-sync with upstream branch release/2.30/master
Upstream commit: be9a328c93834648e0bec106a1f86357d1a8c7e1

- malloc: Remove unwanted leading whitespace in malloc_info (swbz#24867)
- glibc 2.30 release
- iconv: Revert steps array reference counting changes (#1734680)
- Restore r31 setting in powerpc32 swapcontext
2019-08-02 14:16:34 +02:00
Florian Weimer
a4d24cbe45 Fix memory leak in iconv_open (#1734680) 2019-07-31 11:53:38 +02:00
Florian Weimer
b3c6eb0e4c Auto-sync with upstream branch master
Upstream commit: 8a814e20d443adc460a1030fa1a66aa9ae817483

- Drop glibc-rh1732406.patch, fix for the regression applied upstream.
- nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr
- Linux: Move getdents64 to <dirent.h>
- test-container: Install with $(sorted-subdirs) (swbz#24794)
- gconv: Check reference count in __gconv_release_cache (#1732406)
- x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603)
- build-many-glibcs.py: Use Linux 5.2 by default
- Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532)
- test-container: Avoid copying unintended system libraries
2019-07-30 11:05:22 +02:00
Fedora Release Engineering
6144405435 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 03:41:31 +00:00
Florian Weimer
c96359dd1c Revert libio change that causes crashes (#1732406) 2019-07-23 12:14:15 +02:00
DJ Delorie
8797f87802 Auto-sync with upstream branch master
Upstream commit: dcf36bcad3f283f77893d3b157ef7bb2c99419f2

- Add NEWS entry about the new AArch64 IFUNC resolver call ABI
- locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872]
- Linux: Update syscall-names.list to Linux 5.2
2019-07-22 14:06:01 -04:00
DJ Delorie
5f0fe918a5 Auto-sync with upstream branch master
Upstream commit: 3556658c5b8765480711b265abc901c67d5fc060

- Regenerate po/libc.pot for 2.30 release.
- nptl: Add POSIX-proposed _clock functions to hppa pthread.h
- nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
- Afar locales: Months and days updated from CLDR (bug 21897).
- nl_BE locale: Use "copy "nl_NL"" in LC_NAME (bug 23996).
- nl_BE and nl_NL locales: Dutch salutations (bug 23996).
- ga_IE and en_IE locales: Revert first_weekday removal (bug 24200).
- nptl: Remove futex_supports_exact_relative_timeouts
- Update NEWS for new _clockwait and _clocklock functions
- nptl: Add POSIX-proposed pthread_mutex_clocklock
- nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter
- nptl: Add POSIX-proposed pthread_rwlock_clockrdlock & pthread_rwlock_clockwrlock
- nptl: pthread_rwlock: Move timeout validation into _full functions
- nptl: Add POSIX-proposed pthread_cond_clockwait
- nptl: Add POSIX-proposed sem_clockwait
- nptl: Add clockid parameter to futex timed wait calls
- posix: Fix large mmap64 offset for mips64n32 (BZ#24699)
- nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696]
2019-07-18 15:15:24 -04:00
Carlos O'Donell
c098079671 Auto-sync with upstream branch master
Upstream commit: 30ba0375464f34e4bf8129f3d3dc14d0c09add17

- Don't declare __malloc_check_init in <malloc.h> (bug 23352)
- nftw: fill in stat buf for dangling links [BZ #23501]
- dl-vdso: Add LINUX_4 HASH CODE to support nds32 vdso mechanism
- riscv: restore ABI compatibility (bug 24484)
- aarch64: new ifunc resolver ABI
- nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188]
- malloc: Add nptl, htl dependency for the subdirectory [BZ #24757]
- Call _dl_open_check after relocation [BZ #24259]
- Linux: Use mmap instead of malloc in dirent/tst-getdents64
- ld.so: Support moving versioned symbols between sonames [BZ #24741]
- io: Remove copy_file_range emulation [BZ #24744]
- Linux: Adjust gedents64 buffer size to int range [BZ #24740]
- powerpc: Use generic e_expf
- Linux: Add nds32 specific syscalls to syscall-names.list
- szl_PL locale: Fix a typo in the previous commit (bug 24652).
2019-07-10 12:49:03 -04:00
DJ Delorie
4a003b4922 Auto-sync with upstream branch master
Upstream commit: 2bd81b60d6ffdf7e0d22006d69f4b812b1c80513.

- szl_PL locale: Spelling corrections (swbz 24652).
- nl_{AW,NL}: Correct the thousands separator and grouping (swbz 23831).
- Add missing VDSO_{NAME,HASH}_* macros and use them for PREPARE_VERSION_KNOWN
- nptl: Convert various tests to use libsupport
- support: Invent verbose_printf macro
- support: Add xclock_now helper function.
2019-06-24 15:59:37 -04:00
Carlos O'Donell
ca11f82b69 Revert glibc-fedora-memalign.patch addition.
The patch has been removed and will be added back once F31 branches.
No official build happened so we can just remove the NEVRA usage.
2019-06-24 10:59:03 -04:00
Carlos O'Donell
b21f47f287 Reduce external fragmentation in memalign (swbz#14581). 2019-06-21 08:13:12 -04:00
Florian Weimer
d53844dd72 Auto-sync with upstream branch master
Upstream commit: 21cc130b78a4db9113fb6695e2b951e697662440

- During exit, skip wide buffer handling for legacy stdio handles (#1722216)
- powerpc: add 'volatile' to asm
- powerpc: Fix static-linked version of __ppc_get_timebase_freq (swbz#24640)
- nl_AW locale: Correct the negative monetary format (swb#z24614)
- Fix gcc 9 build errors for make xcheck. (swbz#24556)
- dlfcn: Avoid one-element flexible array in Dl_serinfo (swbz#24166)
- elf: Refuse to dlopen PIE objects (swbz#24323)
- nl_NL locale: Correct the negative monetary format (swbz#24614)
- powerpc: Refactor powerpc64 lround/lroundf/llround/llroundf
- powerpc: refactor powerpc64 lrint/lrintf/llrint/llrintf
2019-06-21 09:40:58 +02:00
Florian Weimer
134a36d7f8 Remove comments on %endif, required by newer RPM 2019-06-17 15:45:58 +02:00
Florian Weimer
a464847a25 Auto-sync with upstream branch master
Upstream commit: 48c3c1238925410b4e777dc94e2fde4cc9132d44

- Linux: Fix __glibc_has_include use for <sys/stat.h> and statx (#1721129)
- <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include
- Add IPV6_ROUTER_ALERT_ISOLATE from Linux 5.1 to bits/in.h
- aarch64: handle STO_AARCH64_VARIANT_PCS
- aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS
- powerpc: Remove optimized finite
- math: Use wordsize-64 version for finite
- powerpc: Remove optimized isinf
- math: Use wordsize-64 version for isinf
- powerpc: Remove optimized isnan
- math: Use wordsize-64 version for isnan
- benchtests: Add isnan/isinf/isfinite benchmark
- powerpc: copysign cleanup
- powerpc: consolidate rint
- libio: freopen of default streams crashes in old programs (swbz#24632)
- Linux: Deprecate <sys/sysctl.h> and sysctl
- <sys/stat.h>: Use Linux UAPI header for statx if available and useful
  (#1721129)
- <sys/cdefs.h>: Add __glibc_has_include macro
- Improve performance of memmem
- Improve performance of strstr
- Benchmark strstr hard needles
- Fix malloc tests build with GCC 10
2019-06-17 14:36:16 +02:00
Patsy Franklin
9c5a4265d8 Auto-sync with upstream branch master
Upstream commit: 51ea67d54882318c4fa5394c386f4816ddc22408

- powerpc: get_rounding_mode: utilize faster method to get rounding mode
- riscv: Do not use __has_include__
- powerpc: fegetexcept: utilize function instead of duplicating code
- iconv: Use __twalk_r in __gconv_release_shlib
- Fix iconv buffer handling with IGNORE error handler (swbz#18830)
2019-06-10 13:01:36 -04:00
Florian Weimer
bd8d2430b4 Restore /usr/lib/locale/locale-archive under its original name (#1716710) 2019-06-05 12:20:08 +02:00
Florian Weimer
819bb4065c Add glibc version to locale-archive name (#1716710) 2019-06-04 16:02:20 +02:00
Carlos O'Donell
3aed6a961c Auto-sync with upstream branch master
Upstream commit: dc91a19e6f71e1523f4ac179191a29b2131d74bb

- Linux: Add oddly-named arm syscalls to syscall-names.list.
- arm: Remove ioperm/iopl/inb/inw/inl/outb/outw/outl support.
- Add INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to netinet/in.h.
2019-06-03 16:07:16 -04:00
Carlos O'Donell
34927af202 Convert glibc_post_upgrade to lua. 2019-06-01 20:23:38 -04:00
Florian Weimer
fcb4083893 Auto-sync with upstream branch master
Upstream commit: 9250e6610fdb0f3a6f238d2813e319a41fb7a810

- powerpc: Fix build failures with current GCC
- Remove unused get_clockfreq files
- powerpc: generic nearbyint/nearbyintf
- tt_RU: Add lang_name (swbz#24370)
- tt_RU: Fix orthographic mistakes in mon and abmon sections (swbz#24369)
- Add IGMP_MRDISC_ADV from Linux 5.1 to netinet/igmp.h.
2019-06-01 13:41:32 +02:00
Florian Weimer
50bcae98df Remove support for filtering glibc-all-langpacks (#1715891)
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2019-06-01 13:13:40 +02:00
Arjun Shankar
74725dd94e Auto-sync with upstream branch master
Upstream commit: 85188d8211698d1a255f0aec6529546db5c56de3

- Remove support for PowerPC SPE extension
- elf: Add tst-ldconfig-bad-aux-cache test
- Add F_SEAL_FUTURE_WRITE from Linux 5.1 to bits/fcntl-linux.h
- nss_dns: Check for proper A/AAAA address alignment
2019-05-27 14:46:58 +02:00
DJ Delorie
9701fdade7 Auto-sync with upstream branch master,
Upstream commit 46ae07324b1cd50fbf8f37a076d6babcfca7c510

- Improve string benchtest timing
- sysvipc: Add missing bit of semtimedop s390 consolidation
- wcsmbs: Fix data race in __wcsmbs_clone_conv [swbz #24584]
- libio: Fix gconv-related memory leak [swbz #24583]
- libio: Remove codecvt vtable [swbz #24588]
- support: Expose sbindir as support_sbindir_prefix
- support: Add missing EOL terminators on timespec
- support: Correct confusing comment
- sysvipc: Consolidate semtimedop s390
- sysvipc: Fix compat msgctl (swbz#24570)
- Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h.
- Small tcache improvements
- manual: Document O_DIRECTORY
- Update kernel-features.h files for Linux 5.1.
- nss_nis, nss_nisplus: Remove RES_USE_INET6 handling
- nss_files: Remove RES_USE_INET6 from hosts processing
- support: Report NULL blobs explicitly in TEST_COMPARE
- dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [swbz# 24476]
- Add missing Changelog entry
2019-05-21 14:21:21 -04:00
Florian Weimer
6666c40188 Auto-sync with upstream branch master
Upstream commit: 32ff397533715988c19cbf3675dcbd727ec13e18

- Fix crash in _IO_wfile_sync (#1710460)
- nss: Turn __nss_database_lookup into a compatibility symbol
- support: Add support_install_rootsbindir
- iconv: Remove public declaration of __gconv_transliterate
- Linux: Add the tgkill function
- manual: Adjust twalk_r documentation.
- elf: Fix tst-pldd for non-default --prefix and/or --bindir (swbz#24544)
- support: Export bindir path on support_path
- configure: Make --bindir effective
- x86: Remove arch-specific low level lock implementation
- nptl: Assume LLL_LOCK_INITIALIZER is 0
- nptl: Small optimization for lowlevellock
- Add single-thread.h header
- locale: Update to Unicode 12.1.0 (swbz#24535)
- malloc: Fix tcache count maximum (swbz#24531)
- sem_close: Use __twalk_r
- support: Fix timespec printf
- nptl/tst-abstime: Use libsupport
- nptl: Convert some rwlock tests to use libsupport
- nptl: Use recent additions to libsupport in tst-sem5
- nptl: Convert tst-cond11.c to use libsupport
- support: Add timespec.h
- Move nptl/tst-eintr1 to xtests (swbz#24537)
- powerpc: trunc/truncf refactor
- powerpc: round/roundf refactor
- powerpc: floor/floorf refactor
- support: Add xclock_gettime
- malloc/tst-mallocfork2: Use process-shared barriers
- Update syscall-names.list for Linux 5.1
- Use GCC 9 in build-many-glibcs.py
- aarch64: thunderx2 memmove performance improvements
- misc/tst-tsearch: Additional explicit error checking
- elf: Fix elf/tst-pldd with --enable-hardcoded-path-in-tests (swbz#24506)
- misc: Add twalk_r function
2019-05-15 17:55:39 +02:00
Arjun Shankar
4124e42f39 Auto-sync with upstream branch master
Upstream commit: 20aa5819586ac7ad11f711bab64feda307965191

- semaphore.h: Add nonnull attributes
- powerpc: Remove power4 mpa optimization
- powerpc: Refactor ceil/ceilf
- Fix -O1 compilation errors with `__ddivl' and `__fdivl' [BZ #19444]
- Make mktime etc. compatible with __time64_t
2019-05-02 13:03:35 +02:00
Florian Weimer
d9394d9d7e Auto-sync with upstream branch master
Upstream commit: c57afec0a9b318bb691e0f5fa4e9681cf30df7a4

- Increase BIND_NOW coverage (#1702671)
- Fix pldd hang (#1361689)
- riscv: remove DL_RO_DYN_SECTION (swbz#24484)
- locale: Add LOCPATH diagnostics to the locale program
- benchtests: Enable BIND_NOW if configured with --enable-bind-now
2019-04-26 13:51:28 +02:00
DJ Delorie
47192f413e Auto-sync with upstream branch master
Upstream commit: 25f7a3c96116a9102df8bf7b04ef160faa32416d

- malloc: make malloc fail with requests larger than PTRDIFF_MAX (BZ#23741)
- powerpc: Fix format issue from 3a16dd780eeba602
- powerpc: fma using builtins
- powerpc: Use generic fabs{f} implementations
- mips: Remove rt_sigreturn usage on context function
- powerpc: Remove rt_sigreturn usage on context function
- support: Add support_capture_subprogram
- stdlib/tst-secure-getenv: handle >64 groups
2019-04-22 15:33:30 -04:00
Florian Weimer
448365c7f7 Auto-sync with upstream branch master
Upstream commit: e3f454bac0f968216699ca405c127c858f0657c7

- nss_dns: Do not replace root domain with empty string
- alloc_buffer: Return unqualified pointer type in alloc_buffer_next
- malloc: Set and reset all hooks for tracing (swbz#16573)
2019-04-15 15:05:30 +02:00
Florian Weimer
a54853472d Run valgrind smoke test against the install tree 2019-04-11 21:53:43 +02:00
Florian Weimer
dcaaa78467 Do not use --g-libs with find-debuginfo.sh; it breaks valgrind (#1698824) 2019-04-11 12:18:48 +02:00
Florian Weimer
7b77f1b10f Strip debugging information from installed programs again (#1661510) 2019-04-10 10:26:43 +02:00
Carlos O'Donell
b797613532 Auto-sync with upstream branch master
Upstream commit: 648279f4af423c4783ec1dfa63cb7b46a7640217

- Drop glibc-warning-fix.patch. Microbenchmark code fixed upstream.

- powerpc: Use generic wcscpy optimization
- powerpc: Use generic wcschr optimization
- powerpc: Use generic wcsrchr optimization
- aarch64: thunderx2 memcpy implementation cleanup and streamlining
- resolv: Remove support for RES_USE_INET6 and the inet6 option
- resolv: Remove RES_INSECURE1, RES_INSECURE2
2019-04-09 11:11:06 -04:00
Arjun Shankar
e4dacdad3d Auto-sync with upstream branch master
Upstream commit: 8260f23616c1a2a4e609f989a195fba7690a42ca

- Fix strptime era handling, add more strftime tests [BZ #24394]
- time/tst-strftime2.c: Make the file easier to maintain
- time: Add tests for Minguo calendar [BZ #24293]
- ja_JP locale: Add entry for the new Japanese era [BZ #22964]
- Add Reiwa era tests to time/tst-strftime3.c
2019-04-04 03:07:08 +02:00
Arjun Shankar
539fe8abbd Update sources file 2019-04-01 18:33:52 +02:00
Arjun Shankar
7b2061df55 Auto-sync with upstream branch master
Upstream commit: 993e3107af67edefcfc79a62ae55f7b98aa5151e

- Add AArch64 HWCAPs from Linux 5.0
- tt_RU: Fix orthographic mistakes in day and abday sections [BZ #24296]
- iconv, localedef: avoid floating point rounding differences [BZ #24372]
- Fix parentheses error in iconvconfig.c and ld-collate.c [BZ #24372]
- S390: New configure check and hwcap values for new CPU architecture arch13
- S390: Add memmove, strstr, and memmem ifunc variants for arch13
- nptl: Remove pthread_clock_gettime pthread_clock_settime
- linux: Assume clock_getres CLOCK_{PROCESS,THREAD}_CPUTIME_ID
- Remove __get_clockfreq
- Do not use HP_TIMING_NOW for random bits
- hp-timing: Refactor rtld usage, add generic support
- Add NT_ARM_PAC_MASK and NT_MIPS_MSA from Linux 5.0 to elf.h
- Add UDP_GRO from Linux 5.0 to netinet/udp.h
- nptl: Convert tst-sem5 & tst-sem13 to use libsupport
- nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly
- nss/tst-nss-files-alias-leak: add missing opening quote in printf
- math: Enable some math builtins for clang
- powerpc: Use __builtin_{mffs,mtfsf}
- RISC-V: Fix `test' operand error with soft-float ABI being configured
2019-04-01 16:45:15 +02:00
Carlos O'Donell
bfa3999fdd Fix %changelog date. 2019-03-20 22:41:20 -04:00
Carlos O'Donell
82a97343d6 Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. 2019-03-20 22:36:49 -04:00
DJ Delorie
a84cd6b530 Auto-sync with upstream branch master
Upstream commit: 78919d3886c9543279ec755a701e279c62b44164

78919d3886 time/mktime.c: Update obsolete URL in comment.
b626c5aa5d Record CVE-2019-9169 in NEWS and ChangeLog [BZ #24114]
066ae81ec9 hurd: Fix comment style
e87d8ada29 hurd: Document how EINTR should be handled in critical sections
477e739b32 Update syscall-names.list for Linux 5.0.
238d60a1fb localedata: Add Minguo calendar support to Taiwanese locales [BZ #24293]
5b06f538c5 malloc: Check for large bin list corruption when inserting unsorted chunk
a0a0dc8317 Remove obsolete, never-implemented XSI STREAMS declarations
2019-03-18 13:23:22 -04:00
Florian Weimer
fdf2115d36 Auto-sync with upstream branch master
Upstream commit: a0a0dc83173ce11ff45105fd32e5d14356cdfb9c

- Drop glibc-fedora-streams-rh436349.patch.  STREAMS was removed upstream.

- Remove obsolete, never-implemented XSI STREAMS declarations
- nss: Fix tst-nss-files-alias-truncated for default --as-needed linking
- scripts/check-obsolete-constructs.py: Process all headers as UTF-8.
- Use Linux 5.0 in build-many-glibcs.py.
- hurd: Add no-op version of __res_enable_icmp [BZ #24047]
- Move inttypes.h and stdint.h to stdlib.
- Use a proper C tokenizer to implement the obsolete typedefs test.
- Fix output of LD_SHOW_AUXV=1.
2019-03-14 16:18:47 +01:00
Florian Weimer
4d79a1a6dd Update sources 2019-03-13 17:44:44 +01:00
Florian Weimer
70ec0cd8b9 Auto-sync with upstream branch master
Upstream commit: 38b52865d4ccfee3647f27e969e539a4396a73b1

- Drop glibc-rh1670028.patch, applied upstream

- elf: Add DF_1_KMOD, DF_1_WEAKFILTER, DF_1_NOCOMMON to <elf.h>
- resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047]
- C-SKY: add elf header definition for elfutils
- C-SKY: mark lr as undefined to stop unwinding
- C-SKY: remove user_regs definition
- C-SKY: fix sigcontext miss match
- Bug 24307: Update to Unicode 12.0.0
- Break lines before not after operators, batch 4.
- check-wrapper-headers test: Adjust Fortran include file directory
- Fix location where math-vector-fortran.h is installed.
2019-03-13 13:33:01 +01:00
Jeroen van Meeuwen (Kolab Systems)
97506ad65a It's there now... 2019-03-08 13:24:23 +01:00
Jeroen van Meeuwen (Kolab Systems)
5b4007bb56 Fix bootstrapping glibc
Bootstrapping glibc will disable benchtests, but the if/endif clauses
excluded essentials from the bootstrapped build. Also, mtrace isn't built
when bootstrapping.
2019-03-08 13:24:23 +01:00
DJ Delorie
9f81c9aa6e Auto-sync with upstream branch master
Upstream commit: 0ddb7ea842abf63516b74d4b057c052afc6ba863.

- nptl: Assume __ASSUME_FUTEX_CLOCK_REALTIME support
- powerpc: Fix build of wcscpy with --disable-multi-arch
- elf: Remove remnants of MAP_ANON emulation
- S390: Increase function alignment to 16 bytes.
- ja_JP: Change the offset for Taisho gan-nen from 2 to 1 [BZ #24162]
- ldbl-opt: Reuse test cases from misc/ that check long double
- ldbl-opt: Add error and error_at_line (bug 23984)
- ldbl-opt: Add err, errx, verr, verrx, warn, warnx, vwarn, and vwarnx (bug 23984)
- ldbl-opt: Reuse argp tests that print long double
- ldbl-opt: Add argp_error and argp_failure (bug 23983)
- elf/tst-big-note: Improve accuracy of test [BZ #20419]
- S390: Fix introduction of __wcscpy and weak wcscpy symbols.
- __netlink_assert_response: Add more __libc_fatal newlines [BZ #20271]
- Add more spaces before '('.
- elf: Add tests with a local IFUNC resolver [BZ #23937]
- elf/Makefile: Run IFUNC tests if binutils supports IFUNC
- powerpc: Fix linknamespace introduced by 4d8015639a75
- hurd: Add renameat2 support for RENAME_NOREPLACE
- Fix -Wempty-body warnings in Hurd-specific code.
- Add some spaces before '('.
- wcsmbs: optimize wcsnlen
- wcsmbs: optimize wcsncpy
- wcsmbs: optimize wcsncat
- wcsmbs: optimize wcscpy
- wcsmbs: optimize wcscat
- wcsmbs: optimize wcpncpy
- wcsmbs: optimize wcpcpy
- Break further lines before not after operators.
- Add and move fall-through comments in system-specific code.
2019-03-06 15:56:00 -05:00
DJ Delorie
2300402532 Add .gdb_index to debug information
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1680765
by adding -i to find-debuginfo.sh flags.
2019-03-01 14:45:22 -05:00
Carlos O'Donell
8a209c638d Work around compiler warning in microbenchmarks.
Raised upstream:
https://www.sourceware.org/ml/libc-alpha/2019-02/msg00656.html
2019-02-28 02:09:46 -05:00
Carlos O'Donell
047399b0d0 Auto-sync with upstream branch master,
Upstream commit: e0cb7b6131ee5f2dca2938069b8b9590304e6f6b

- nss_files: Fix /etc/aliases null pointer dereference (swbz#24059)
- regex: fix read overrun (swbz#24114)
- libio: use stdout in puts and putchar, etc (swbz#24051)
- aarch64: Add AmpereComputing emag to tunable cpu list
- aarch64: Optimized memset specific to AmpereComputing emag
- aarch64: Optimized memchr specific to AmpereComputing emag
- Require GCC 6.2 or later to build glibc
- manual: Document lack of conformance of sched_* functions (swbz#14829)
- libio: Use stdin consistently for input functions (swbz#24153)
- x86-64 memcmp: Use unsigned Jcc instructions on size (swbz#24155)
- Fix handling of collating elements in fnmatch (swbz#17396,swbz#16976)
- arm: Use "nr" constraint for Systemtap probes (swbz#24164)
- Fix alignment of TLS variables for tls variant TLS_TCB_AT_TP (swbz#23403)
- Add compiler barriers for pthread_mutex_trylock (swbz#24180)
- rt: Turn forwards from librt to libc into compat symbols (swbz#24194)
- Linux: Add gettid system call wrapper (swbz#6399)
- nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161)
- elf: Ignore LD_AUDIT interfaces if la_version returns 0 (swbz#24122)
- nptl: Reinstate pthread_timedjoin_np as a cancellation point (swbz#24215)
- nptl: Fix invalid Systemtap probe in pthread_join (swbz#24211)
2019-02-26 09:31:34 -05:00
Florian Weimer
1c5b89063f Auto-sync with upstream branch release/2.29/master
Upstream commit: 067fc32968b601493f4b247a3ac00caeea3f3d61

- Drop glibc-rh1674280.patch.  Different fix applied upstream.  (#1674280)
- nptl: Fix invalid Systemtap probe in pthread_join (#1674280)
2019-02-19 08:33:22 +01:00
Florian Weimer
b82e3b3f85 Hotfix for invalid Systemtap probe in pthread_join (#1674280) 2019-02-11 21:42:14 +01:00
Florian Weimer
8e6306e004 Remove LRA bug on POWER workaround, fixed in gcc-9.0.1-0.4.fc30 (#1673018) 2019-02-11 09:53:45 +01:00
Florian Weimer
5fff012634 Auto-sync with upstream branch release/2.29/master
Upstream commit: c096b008d2671028c21ac8cf01f18a2083e73c44

- nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161)
- nptl: Add compiler barriers in pthread_mutex_trylock (swbz#24180)
2019-02-11 09:51:14 +01:00
Florian Weimer
123aebc7d4 Work around LRA hang on ppc64le (#1673018) 2019-02-07 10:49:48 +01:00
Florian Weimer
109c797f85 Auto-sync with upstream branch release/2.29/master
Upstream commit: 2de15ac95713a238dc258eb8977ecdfca811fc19

- arm: Use "nr" constraint for Systemtap probes (#1196181)
2019-02-06 09:10:05 +01:00
Florian Weimer
0ba614c06d Eliminate %%glibcrelease macro
As a result, future mass rebuilds will increment the Release: field as
expected.
2019-02-01 13:38:20 +01:00
Carlos O'Donell
de5b416635 Auto-sync with upstream branch release/2.29/master
Upstream commit: 86013ef5cea322b8f4b9c22f230c22cce369e947

- nptl: Fix pthread_rwlock_try*lock stalls (swbz#23844)
2019-01-31 22:15:26 -05:00
Fedora Release Engineering
b4e36d719d - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 22:40:19 +00:00
DJ Delorie
e7b9f886b0 Auto-sync with upstream branch master,
Upstream commit: e1e47c912a8e557508362715f7468091def3ec4f

- Update translations.
2019-01-28 16:12:03 -05:00
Florian Weimer
5d5d75dce2 Fix broken patch 2019-01-28 14:38:03 +01:00
Florian Weimer
88850a88bb resolv: Enable full ICMP error reporting in stub resolver (#1670028) 2019-01-28 14:28:25 +01:00
Florian Weimer
657df54449 Remove obsolete scriptlets (release bump) 2019-01-28 14:09:37 +01:00
Igor Gnatenko
1ebcbd5e46
Remove obsolete scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-27 18:58:44 +01:00
Florian Weimer
70a46f30e1 Auto-sync with upstream branch master
Upstream commit: 83e6b59625f45db1eee93e5684091f740c52a083

- elf: Revert LD_AUDIT fix for modules with invalid version (swbz#24122)
- strftime: Pass the additional flags from %EY to %Ey (swbz#24096)
- strftime: Set the default width of %Ey to 2 (swbz#23758)
2019-01-25 11:55:20 +01:00
Florian Weimer
7c5e863b5b Auto-sync with upstream branch master
Upstream commit: 3367acdb344a1d7fcf8f53748d301d652c8911dd

- elf: Fix LD_AUDIT for modules with invalid version (swbz#24122)
- CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings (#1331390)
- resolv: Do not send queries for non-host-names in nss_dns (swbz#24112)
- malloc: Revert fastbins to old-style atomics
2019-01-24 13:01:30 +01:00
Florian Weimer
133c946b2f Use assembler to produce annobin notes for nonshared libraries (#1668822) 2019-01-23 17:22:30 +01:00
Carlos O'Donell
ec674e19b8 Auto-sync with upstream branch master
Upstream commit: 008b598e2a495024f9777006716cfd8668f3db33

- x86-64: Optimize strcat/strncat, strcpy/strncpy and stpcpy/stpncpy with AVX2
- powerpc: Fix VSCR position in ucontext (swbz#24088)
- AArch64: Add ifunc support for Ares
- soft-fp: Properly check _FP_W_TYPE_SIZE (swbz#24066)
2019-01-16 11:51:15 -05:00
Florian Weimer
4265b0b8f6 Inherit -march=haswell flag from redhat-rpm-config 2019-01-10 12:29:48 +01:00
Arjun Shankar
062fb704db Update sources file 2019-01-07 19:07:19 +01:00
Arjun Shankar
1aba59b258 Auto-sync with upstream branch master
commit 2ef427168818ce04b03cecb7b739f9db0156e3e4

- Require GCC 5 or later to build glibc (swbz#23993)
- Only build libm with -fno-math-errno (swbz#24024)
- sysdeps/ieee754: prevent maybe-uninitialized errors with -O (swbz#19444)
- Multiple locales: Use the correct 12-hour time formats (swbz#10496)
- sq_AL: Use the correct date and time formats (swbz#10496, swbz#23724)
- en_US: define date_fmt (swbz#24046)
- Remove executable bit from localedata/locales/bi_VU (swbz#23995)
- malloc: Always call memcpy in _int_realloc (swbz#24027)
- ARM: fix kernel assisted atomics with GCC 8 (swbz#24034)
- S390: Unify 31/64bit mem{set,cmp,cpy,pcpy}, bzero with ifunc handling
- S390: Refactor ifunc handling for several str* and wc* functions
- posix: Clear close-on-exec for posix_spawn adddup2 (swbz#23640)
- termios: Define TIOCSER_TEMT with __USE_MISC (swbz#17783)
- termios: Consolidate Baud Rate Selection definitions (swbz#23783)
- Y2038: add __{localtime64,gmttime64,ctime64}[_r] functions
- Y2038: make __difftime compatible with 64-bit time
2019-01-07 17:22:11 +01:00
DJ Delorie
650d554f72 Auto-sync with upstream branch master,
commit 6bbfc5c09fc5b5e3d4a0cddbbd4e2e457767dae7.

- Add statx conditionals for wordsize-32 *xstat.c
- regex: fix storage-exhaustion error (swbz#18040)
- regex: fix heap-use-after-free error (swbz#18040)
- manual: Document thread/task IDs for Linux
2018-12-17 14:16:58 -05:00
Carlos O'Donell
60935671c3 Auto-sync with upstream branch master
Upstream commit: ade8b817fead73b302d08c88cd44ea2ea56793d4

- powerpc: missing CFI register information in __mpn_* functions (swbz#23614)
- rdlock stalls indefinitely on an unlocked pthread rwlock (swbz#23861)
2018-12-13 12:14:55 -05:00
Carlos O'Donell
7a4d7ca184 Auto-sync with upstream branch master
Upstream commit: 505b5b292293a5d6bd4046a6bc7f8c2381a33da4

- Fix powf overflow handling in non-nearest rounding mode (swbz#23961)
- test-container: move postclean outside of namespace changes (swbz#23948)
- Enable VDSO for static linking on mips (swbz#19767)
2018-12-11 12:33:20 -05:00
Florian Weimer
1d88b65b1d Auto-sync with upstream branch master
Upstream commit: 7b36d26b22d147ffc347f427f9fd584700578a94

- compat getdents64: Use correct offset for retry (swbz#23972)
- x86: Fix static analysis warning in tst-cet-property-2 (swbz#23490)
- malloc: Add another test for tcache double free check (swbz#23907)
- getcpu: New system call wrapper
- posix_spawn_file_actions_addfchdir_np: New function (swbz#17405)
- Preparations for the IBM long double transition
- Preparations for 64-bit time_t on 32-bit architectures
- Enable VDSO for static linking on arm (swbz#19767)
2018-12-10 16:51:13 +01:00
Florian Weimer
b8873c0d8b Auto-sync with upstream branch master
Upstream commit: 7b36d26b22d147ffc347f427f9fd584700578a94

- CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name (#1654000)
- Mutex: Add pthread mutex tunables
- stdlib: assert on NULL function pointer in atexit etc. (swbz#20544)
- Enable VDSO on i386 statically linked programs
- posix: Use posix_spawn on system
- posix: Use posix_spawn on popen (swbz#17490, swbz#22834)
- Fix _dl_profile_fixup data-dependency issue (swbz#23690)
- Enable VDSO for static linking on aarch64
2018-12-03 14:58:02 +01:00
Carlos O'Donell
afea822158 Resolves: #1352973
- Move requirement on libgcc from glibc-devel to glibc (#1352973)
2018-11-29 16:40:16 -05:00
Carlos O'Donell
173c24248d Resolves: #1651260
- Add requires on explicit glibc version for glibc-nss-devel (#1651260)
2018-11-27 15:07:47 -05:00
Arjun Shankar
5ce3b68016 Auto-sync with upstream branch master
Upstream commit: ce035c6e909ad20ef2fe13c92eab4e69f6495b61

- Drop glibc-rh1652495.patch.  Applied upstream.
2018-11-27 12:20:28 +01:00
Florian Weimer
fdcac6f8f4 Do not use parallel make for building locales (#1652228) 2018-11-26 14:58:44 +01:00
Florian Weimer
2f22666a8b malloc: Revert tcache double-free check (#1652495) 2018-11-22 11:05:13 +01:00
DJ Delorie
16caa0b760 Auto-sync with upstream branch master
Upstream commit: bcdaad21d4635931d1bd3b54a7894276925d081d

- malloc: tcache double free check
- [AArch64] Adjust writeback in non-zero memset
- Update config.guess and config.sub to current versions.
- support: Print timestamps in timeout handler
- Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.
2018-11-20 14:38:52 -05:00
Florian Weimer
81ee17d92e Auto-sync with upstream branch master
Upstream commit: 346ef23f197a0c8ba807c344bd39101b711050ee
2018-11-16 11:20:25 +01:00
Florian Weimer
36c64b8ffa Auto-sync with upstream branch master
Upstream commit: 43257c335ad6b9e05fb882975e1776ff763164ee

- Disable CET for binaries created by older link editors (#1648297)
2018-11-09 12:00:27 +01:00
Florian Weimer
5ca0400677 Auto-sync with upstream branch master
Upstream commit: 00c86a37d1b63044e3169d1f2ebec23447c73f79
2018-11-07 14:47:43 +01:00
Florian Weimer
4232176d25 Auto-sync with upstream branch master
Upstream commit: 1df872fd74f730bcae3df201a229195445d2e18a

- libanl: Fix crash if first helper thread creation failed (#1646381)
2018-11-07 13:58:23 +01:00
Mike FABIAN
c42d98baca Include Esperanto (eo) in glibc-all-langpacks (#1643756) 2018-11-01 11:55:20 +01:00
DJ Delorie
383945e966 Auto-sync with upstream branch master:
Upstream commit: c6982f7efc1c70fe2d6160a87ee44d871ac85ab0
2018-10-29 14:39:25 -04:00
Arjun Shankar
a5ad6ecfc9 Auto-sync with upstream branch master:
Upstream commit: fe61f17cfc18f17befca3280e828bb40e8c772b0
2018-10-26 14:29:50 +02:00
Florian Weimer
6287bab02b Auto-sync with upstream branch master:
Upstream commit: a27a4f4721837a5fb36ace833764b06a64c5af1c
2018-10-24 11:46:30 +02:00
Florian Weimer
8e5fc280df Auto-sync with upstream branch master
Upstream commit: 72771e53753647111d31c5c4bf43d8901e6baf7e
2018-10-18 10:22:53 +02:00
Florian Weimer
3b14ffff2a Auto-sync with upstream branch master
Upstream commit: f841c97e515a1673485a2b12b3c280073d737890

- stdlib/tst-setcontext9 test suite failure on ppc64le (#1623519)
2018-09-27 12:52:00 +02:00
Florian Weimer
447d75c71c - Auto-sync with upstream branch master
Upstream commit: db9a8ad4ff3fc58e3773a9a4d0cabe3c1bc9c94c

- gethostid: Missing NULL check for gethostbyname_r result (#1631338)
- stdlib/tst-setcontext9 test suite failure (#1623519)
2018-09-20 13:27:33 +02:00
Florian Weimer
a63c0b6456 Add python3-devel build dependency for downstream benefit 2018-09-05 11:35:41 +02:00
Florian Weimer
c63972c3a9 Fix version in changelog 2018-09-05 11:35:10 +02:00
Carlos O'Donell
9588eec39f Resolves: #1625507
- Provide compatibility support for linking against libpthread_nonshared.a
  (#1625507)
2018-09-05 03:26:05 -04:00
Florian Weimer
723de53164 Remove workaround for valgrind bug (#1600034) 2018-08-29 13:06:17 +02:00
Florian Weimer
fde5e92317 Auto-sync with upstream branch master
Upstream commit: ff6b24501f70da7d6375d6f5929262b9509db39e
2018-08-29 09:01:13 +02:00
Florian Weimer
02e1d4ee3e Auto-sync with upstream branch master
Upstream commit: 99ea93ca31795469d2a1f1570f17a5c39c2eb7e2

- nptl: Fix waiters-after-spinning case in pthread_cond_broadcast (#1622669)
- regex: Fix memory corruption when pattern and input contain NUL (#1622674)
2018-08-27 20:19:22 +02:00
Carlos O'Donell
60efd153e5 Auto-sync with upstream branch master
Upstream commit: aa42b3dbcb0326badf377fec2c7fb2f34fdabecd
2018-08-24 22:29:27 -04:00
Carlos O'Donell
bebdebbdc3 Resolves: #1615608
- Remove abort() warning in manual (#1615608)
2018-08-13 22:43:08 -04:00
Florian Weimer
08e1b1ab33 Fix regression in readdir64@GLIBC_2.1 compat symbol (#1614705) 2018-08-10 11:24:59 +02:00
Florian Weimer
fa1678e1c0 Log /proc/sysinfo if available (on s390x) 2018-08-02 18:20:05 +02:00
Florian Weimer
b0deb573ed Honor %{valgrind_arches} 2018-08-02 16:24:00 +02:00
Florian Weimer
fb1f848c19 Update to glibc 2.28 release tarball
- Translation updates
- x86/CET: Fix property note parser (swbz#23467)
- x86: Add tst-get-cpu-features-static to $(tests) (swbz#23458)
2018-08-01 10:54:45 +02:00
Florian Weimer
304fcdff50 Add release-independent .gitignore file 2018-08-01 10:54:37 +02:00
Florian Weimer
56a02fe6e3 Auto-sync with upstream branch master
Upstream commit: af86087f02a5522d8801a11d8381e04f95e33162

- x86/CET: Don't parse beyond the note end
- Fix Linux fcntl OFD locks tests on unsupported kernels
- x86: Populate COMMON_CPUID_INDEX_80000001 for Intel CPUs (swbz#23459)
- x86: Correct index_cpu_LZCNT (swbz#23456)
- Fix string/tst-xbzero-opt if build with gcc head
2018-07-31 08:25:51 +02:00
Florian Weimer
a4a5659439 Auto-sync with upstream branch master
Upstream commit: cfba5dbb10cc3abde632b46c60c10b2843917035

- Keep expected behaviour for [a-z] and [A-z] (#1607286)
- Additional ucontext tests
- Intel CET enhancements
- ISO C11 threads support
- Fix out-of-bounds access in IBM-1390 converter (swbz#23448)
- New locale Yakut (Sakha) for Russia (sah_RU) (swbz#22241)
- os_RU: Add alternative month names (swbz#23140)
- powerpc64: Always restore TOC on longjmp (swbz#21895)
- dsb_DE locale: Fix syntax error and add tests (swbz#23208)
- Improve performance of the generic strstr implementation
- regcomp: Fix off-by-one bug in build_equiv_class (swbz#23396)
- Fix out of bounds access in findidxwc (swbz#23442)
2018-07-26 11:59:33 +02:00
Florian Weimer
ad93166294 Add Provides: bundled(gnulib) 2018-07-23 14:23:36 +02:00
Carlos O'Donell
092cf93daa Resolves: #1601011
- Fix file list for glibc RPM packaging (#1601011).
2018-07-13 16:10:09 -04:00
Carlos O'Donell
6f4d10f912 Restructure package and subpackage file list generation.
The file list geneation for the main package and subpackages was
unorganized and poorly structured. With this commit we change this
in three siginifcant ways:

* All file lists are built independent of each other from a master
  list of files e.g. rpm.list. This is the important cleanup.

* All files are installed into %{glibc_sysroot}, which defaults
  to $RPM_BUILD_ROOT. This supports future experimentation with
  alternate glibc installs via this new variable.

* Redundant code is removed which is no longer required, like the
  debuginfo list de-duplication; simplifying the install process.

The changes were tested by carrying out a file-by-file comparison
to ensure no file changed packages or installed location after
the patch.
2018-07-12 14:36:33 -04:00
Carlos O'Donell
e4aafbc505 Reorganize %install phase.
The %install phase is reorganized into 3 distinct phases, the
first phase where files are modified, a second phase where file
lists are generated, and a final phase where files are only
removed based on list information.

This cleanup makes it very clear when we are done installing
files, and therefore creates a place where we can put ABI
instrumentation to compare the resulting ABI before stripping
and debuginfo generation.

No ABI instrumentation is added by this patch, and before-and-after
testing verifies the %install phase remains functionally the same.
2018-07-12 14:35:19 -04:00
Florian Weimer
559f435759 Fix typo in comment 2018-07-11 21:32:56 +02:00
Florian Weimer
3bef91d75e Add POWER9 multilib (downstream only) 2018-07-11 15:54:24 +02:00
Florian Weimer
e75713e5c1 Fix typo in LDFLAGS-rtld setting (#1600034) 2018-07-11 13:21:42 +02:00
Florian Weimer
6404b25896 Auto-sync with upstream branch master
Upstream commit: 93304f5f7a32f73b551266c5a181db51d97a71e4

- Install <bits/statx.h> header
- Put the correct Unicode version number 11.0.0 into the generated files
2018-07-11 11:50:51 +02:00
Florian Weimer
6a43999c13 Work around valgrind issue on i686 (#1600034) 2018-07-11 11:50:02 +02:00
Florian Weimer
28cb5d31fc Auto-sync with upstream branch master
Upstream commit: fd70af45528d59a00eb3190ef6706cb299488fcd

- Add the statx function
- regexec: Fix off-by-one bug in weight comparison (#1582229)
- nss_files: Fix re-reading of long lines (swbz#18991)
- aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
- aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT
- conform/conformtest.pl: Escape literal braces in regular expressions
- x86: Use AVX_Fast_Unaligned_Load from Zen onwards.
2018-07-10 17:18:22 +02:00
Florian Weimer
126ab296ea Remove ppc64 multilibs 2018-07-06 11:43:53 +02:00
Florian Weimer
589518d1c8 Auto-sync with upstream branch master
Upstream commit: 3a885c1f51b18852869a91cf59a1b39da1595c7a
2018-07-06 10:53:36 +02:00
Florian Weimer
04e38e02b7 Enable build flags inheritance for nonshared flags 2018-07-05 12:45:22 +02:00
Florian Weimer
8a71833984 Add annobin annotations to assembler code (#1548438) 2018-07-04 16:35:00 +02:00
Florian Weimer
43a21403fe Update License tag 2018-07-04 13:02:15 +02:00
Florian Weimer
a50cd9a587 Enable -D_FORTIFY_SOURCE=2 for nonshared code 2018-07-04 11:56:29 +02:00
Florian Weimer
2074a352da Add changelog reference to bug #1566464 2018-07-04 11:50:24 +02:00
Florian Weimer
4adfefae5a Inherit additional build flags 2018-07-04 10:48:07 +02:00
Florian Weimer
145da19e2e Auto-sync with upstream branch master
Upstream commit: b7b88cea4151d85eafd7ababc2e4b7ae1daeedf5
2018-07-02 22:56:52 +02:00
Florian Weimer
58f5912619 Auto-sync with upstream branch master
Upstream commit: e69d994a63afc2d367f286a2a7df28cbf710f0fe
2018-07-02 22:56:52 +02:00
Florian Weimer
c8098b86f8 Auto-sync with upstream branch master
Upstream commit: c49e18222e4c40f21586dabced8a49732d946917
2018-06-28 10:28:29 +02:00
Florian Weimer
a6144b701a Compatibility fix for <sys/stat.h> and <linux/time.h> 2018-06-21 08:25:16 +02:00
Florian Weimer
4343a2408a Auto-sync with upstream branch master
Upstream commit: f496b28e61d0342f579bf794c71b80e9c7d0b1b5
2018-06-21 08:23:20 +02:00
Florian Weimer
2b743b9fd1 Auto-sync with upstream branch master
Upstream commit: f2857da7cdb65bfad75ee30981f5b2fde5bbb1dc
2018-06-18 21:25:46 +02:00
Florian Weimer
9007def666 Add CVE-2018-11236 reference 2018-06-18 14:58:14 +02:00
Florian Weimer
4283de10b6 Auto-sync with upstream branch master
Upstream commit: 14beef7575099f6373f9a45b4656f1e3675f7372

- iconv: Make IBM273 equivalent to ISO-8859-1 (#1592270)
2018-06-18 13:02:53 +02:00
Florian Weimer
84981f566e Inherit the -msse2 build flag as well (#1592212) 2018-06-18 11:51:52 +02:00
Carlos O'Donell
e4a1cf14e0 Update gen-quilt-series.sh for new %autosetup. 2018-06-04 22:30:43 -04:00
Florian Weimer
94a7268e0b Auto-sync with upstream branch master
Upstream commit:104502102c6fa322515ba0bb3c95c05c3185da7a
2018-06-01 14:07:34 +02:00
Florian Weimer
9f8b04ee49 Adjust build flags inheritence from redhat-rpm-config 2018-06-01 12:10:16 +02:00
Florian Weimer
a747c093bb Modernise nsswitch.conf defaults (#1581809) 2018-06-01 12:05:26 +02:00
Florian Weimer
f21f7f7c7f Auto-sync with upstream branch master
Upstream commit: c1dc1e1b34873db79dfbfa8f2f0a2abbe28c0514
2018-05-25 11:40:12 +02:00
Florian Weimer
13e87ddfb5 Add CVE-2018-11237 reference 2018-05-23 21:38:06 +02:00
Florian Weimer
bfa9f404d2 Auto-sync with upstream branch master
Upstream commit: 7f9f1ecb710eac4d65bb02785ddf288cac098323

- Drop glibc-rh1452750-allocate_once.patch,
  glibc-rh1452750-libidn2.patch.  Applied upstream.
2018-05-23 15:37:05 +02:00
Florian Weimer
7e87eb005e Auto-sync with upstream branch master
Upstream commit: 8f145c77123a565b816f918969e0e35ee5b89153
2018-05-23 09:21:21 +02:00
Florian Weimer
57b8f5c277 Add CVE-2017-18269 reference 2018-05-23 09:15:03 +02:00
Carlos O'Donell
c9ce3549e4 Add notes about nss_db and past F16 transition. 2018-05-22 12:30:32 -04:00
Florian Weimer
0e59699b4c Auto-sync with upstream branch master
Upstream commit: 632a6cbe44cdd41dba7242887992cdca7b42922a
2018-05-17 10:35:47 +02:00
Florian Weimer
8ed5487f77 Do not run telinit u on upgrades (#1579225) 2018-05-17 10:31:38 +02:00
Florian Weimer
189f35b396 Remove sshd restart from glibc_post_upgrade
/etc/rc.d/init.d/sshd no longer exists in Fedora, so the code never
runs.
2018-05-16 14:55:29 +02:00
Florian Weimer
890019ecf2 Inherit compiler flags in the original order 2018-05-11 16:12:33 +02:00
Florian Weimer
2fcfa6890c Inherit the -mstackrealign flag if it is set 2018-05-11 16:04:30 +02:00
Florian Weimer
d591927700 Auto-sync with upstream branch master
Upstream commit: 89aacb513eb77549a29df2638913a0f8178cf3f5

- Avoid exporting some Sun RPC symbols with default versions (#1577210)
2018-05-11 16:02:06 +02:00
Florian Weimer
71cb283b66 Use /usr/bin/python3 for benchmarks scripts (#1577223) 2018-05-11 15:56:01 +02:00
Florian Weimer
c491e21bc7 Revert "Add annobin annotations to assembler code (#1548438)"
CFLAGS is not generally used when calling assembler, and this eventually
exposes a design issue in the annobin notes handling; see bug 1576362.

This reverts commit 7c1047805b.
2018-05-09 11:26:57 +02:00
Florian Weimer
7c1047805b Add annobin annotations to assembler code (#1548438) 2018-05-04 14:23:09 +02:00
Florian Weimer
098d568ec0 Auto-sync with upstream branch master
Upstream commit: 0085be1415a38b40a5a1a12e49368498f1687380
2018-04-19 13:53:29 +02:00
Florian Weimer
5603627552 Switch to %autosetup 2018-04-19 13:49:39 +02:00
Carlos O'Donell
0e17ea22c1 glibc.spec: Apply patches in logical order.
The following commit removes the requirement for patches to be
placed in 1000, 2000, or 3000 ID blocks depending on their
upstream status. Instead upstream status is documented in the
header of the patch with some semi-standard notation as described
in template.patch. The patches are re-numbered and defined and
applied in the same order. Verified that before and after the
patch that the source tree does not change. The patch definition
is resorted to match the patch application order.
2018-04-17 15:00:23 -05:00
Florian Weimer
7e28f1b6ad Auto-sync with upstream branch master
Upstream commit: 583a27d525ae189bdfaa6784021b92a9a1dae12e
2018-04-09 12:01:14 +02:00
Florian Weimer
ec52db3a46 Auto-sync with upstream branch master
Upstream commit: d39c0a459ef32a41daac4840859bf304d931adab
2018-03-29 11:44:12 +02:00
Florian Weimer
52fc655c6c Auto-sync with upstream branch master
Upstream commit: fbce6f7260c3847f14dfa38f60c9111978fb33a5
2018-03-19 20:37:00 +01:00
Florian Weimer
e0b0cbbd50 Auto-sync with upstream branch master
Upstream commit: 700593fdd7aef1e36cfa8bad969faab76a6facda
2018-03-16 12:33:09 +01:00
Florian Weimer
cee352f95d Auto-sync with upstream branch master
Upstream commit: 7108f1f944792ac68332967015d5e6418c5ccc88
2018-03-14 11:02:55 +01:00
Florian Weimer
a928b2e6c1 Auto-sync with upstream branch master
Upstream commit: da6d4404ecfd7eacba8c096b0761a5758a59da4b
2018-03-12 11:44:45 +01:00
Florian Weimer
9be86f04b3 Enable annobin annotations (#1548438) 2018-03-06 14:37:32 +01:00
Florian Weimer
90b56a7d0c Add reference to #1550914 2018-03-02 10:39:29 +01:00
Florian Weimer
af386eee0d Auto-sync with upstream branch master
Upstream commit: 1a2f44a848663036c8a14671fe0faa3fed0b2a25

- Remove spurios reference to libpthread_nonshared.a
2018-03-01 12:57:19 +01:00
Florian Weimer
1bbd25fcbf Update sources file 2018-03-01 09:10:04 +01:00
Florian Weimer
890cc4ed1d Auto-sync with upstream branch master
Upstream commit: bd60ce86520b781ca24b99b2555e2ad389bbfeaa
2018-03-01 08:34:12 +01:00
Florian Weimer
0e84fd763d Drop glibc-fedora-nptl-linklibc.patch
We do not reference any compatibility symbols from libpthread, so
this patch appears unnecessary.
2018-03-01 08:27:57 +01:00
Florian Weimer
d92633e7a9 Update release and changelog 2018-02-28 12:40:44 +01:00
Florian Weimer
081ef32d63 Inherit as many flags as possible from redhat-rpm-config 2018-02-28 12:40:17 +01:00
Richard W.M. Jones
ee109af432 riscv64: Disable valgrind smoke test on this architecture. 2018-02-19 19:47:31 +00:00
Richard W.M. Jones
16398fcbfd riscv64: Add symlink from /usr/lib64/lp64d -> /usr/lib64 for ABI compat. 2018-02-19 19:47:30 +00:00
Florian Weimer
4c06a879a9 Update changelog 2018-02-14 17:07:46 +01:00
Florian Weimer
29d10047e2 Include ChangeLog.old in the source RPM 2018-02-14 17:07:14 +01:00
Florian Weimer
5a04553bf2 Remove stale reference to the language_list macro 2018-02-14 17:07:14 +01:00
Florian Weimer
7f4ea1188a Trim changelog 2018-02-14 17:02:48 +01:00
Florian Weimer
1dbdd9fef3 Remove %defattr(-,root,root) 2018-02-14 16:58:24 +01:00
Igor Gnatenko
c57221cc4f
fix typo in spec
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-11 10:13:47 +01:00
Igor Gnatenko
28e47feb91 use shell to run ldconfig %transfiletrigger
glibc-common already depends on /bin/sh, so it would be installed at a
time when trigger runs.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-07 17:05:29 +01:00
Igor Gnatenko
c09c66271e move %transfiletrigger* in common subpackage
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-07 17:04:59 +01:00
Florian Weimer
55adfecd0c Linux: use reserved name __key in pkey_get (#1542643)
Auto-sync with upstream branch release/2.27/master,
commit 56170e064e2b21ce204f0817733e92f1730541ea.
2018-02-07 14:09:49 +01:00
Florian Weimer
eff52e3518 Fix typo in comment 2018-02-07 14:03:08 +01:00
Fedora Release Engineering
cefed5d027 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 12:49:46 +00:00
Carlos O'Donell
587bed9b2f glibc-2.27-1
Auto-sync with upstream masger.

Upstream commit: 23158b08a0908f381459f273a984c6fd328363cb.
2018-02-05 07:32:08 -08:00
Richard W.M. Jones
72c4f88cc6 Fix cut and paste error in %changelog message of previous commit. 2018-01-30 19:33:56 +00:00
Richard W.M. Jones
f80578dc89 Disable -fstack-clash-protection on riscv64:
not supported even by GCC 7.3.1 on this architecture.

Apparently it requires architecture-specific support.  In any case it
does not work with GCC 7.3.1 on riscv64:

stage3:/# gcc --version
gcc (GCC) 7.3.1 20180129
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
stage3:/# gcc -fstack-clash-protection
gcc: error: unrecognized command line option '-fstack-clash-protection'; did you mean '-fstack-protector'?
gcc: fatal error: no input files
compilation terminated.
2018-01-30 18:31:15 +00:00
Florian Weimer
6ff958f2aa Explicitly run ldconfig in the buildroot 2018-01-29 20:42:52 +01:00
Florian Weimer
48a71633e6 Auto-sync with upstream branch master
Upstream commit: cdd14619a713ab41e26ba700add4880604324dbb

- libnsl: Turn remaining symbols into compat symbols (swbz#22701)
- be_BY, be_BY@latin, lt_LT, el_CY, el_GR, ru_RU, ru_UA, uk_UA:
  Add alternative month names (swbz#10871)
- x86: Revert Intel CET changes to __jmp_buf_tag (swbz#22743)
- aarch64: Revert the change of the __reserved member of mcontext_t
2018-01-29 18:06:23 +01:00
Igor Gnatenko
1f24fb0da2
Add file triggers to do ldconfig calls automatically
Since time immemorial, Red Hat/Fedora packagers have been required
to add a stanza to spec files for packages containing libraries to
update the ldconfig cache.

```
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig
```

To say this is annoying is to put it mildly. However, there was no
standard mechanism to make this boilerplate go away. Now with RPM 4.13+,
we should change this to file triggers and make all of that go away.

In the case of the transaction file triggers that run on the regular
link library paths, the performance benefit is minimal, and being greedy
does not hurt in this case. It's still an improvement over running
ldconfig every time anyway.

With the introduction of these triggers, we can start removing the
ldconfig boilerplate from Fedora package specs, and new packages will
not need to add it.

Pirority (-P) is not strictly needed, but we want to run our ldconfig
"first" before rest of scriptlets so it would speed up them (we would
build ldconfig cache beforehand).

References: https://bugzilla.redhat.com/1380878
Originally-proposed-by: Neal Gompa <ngompa13@gmail.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-29 17:52:15 +01:00
Florian Weimer
6777c3ed80 Auto-sync with upstream branch master
Upstream commit: 21c0696cdef617517de6e25711958c40455c554f

- locale: Implement alternative month names (swbz#10871)
- locale: Change month names for pl_PL (swbz#10871)
2018-01-22 16:19:24 +01:00
Florian Weimer
a4166cd2cf aarch64 static PIE is still broken, disable again
Also apply minor related changelog fixes.
2018-01-22 16:15:37 +01:00
Florian Weimer
58e6c2560b Fix BuildRequires: binutils 2018-01-22 15:36:05 +01:00
Florian Weimer
92867018b5 Update changelog for glibc-2.26.9000-47.fc28 2018-01-22 15:33:29 +01:00
Florian Weimer
cd5e5a1117 Reenable static PIE on aarch64 after binutils fix (#1247050) 2018-01-22 15:33:29 +01:00
Florian Weimer
6815071d4a Unconditionally build without libcrypt 2018-01-22 15:33:25 +01:00
Florian Weimer
b8b7388beb Fix release number in changelog entry 2018-01-22 11:09:06 +01:00
Florian Weimer
c758358a31 glibc-deprecate_libcrypt.patch: Do not patch NEWS, fix attribution 2018-01-22 11:00:27 +01:00
Björn Esser
2687b3c78b
Remove deprecated libcrypt, gets replaced by libxcrypt
Add applicable Requires on libxcrypt

Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
support to our implementation of crypt(3), and Zack Weinberg replied
that it might actually make more sense to _remove_ libcrypt from
glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
separate project that could move faster.  (For instance, libxcrypt:
https://github.com/besser82/libxcrypt)

This commit is the glibc part of:
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
2018-01-19 23:49:50 +01:00
Florian Weimer
6a5972a529 Remove the glibc-rpcgen subpackage
An rpcgen subpackage is now built by rpcsvc-proto.
2018-01-19 18:32:12 +01:00
Florian Weimer
36e8658036 Drop static PIE support on aarch64
It leads to crashes at run time.  Probably needs binutils fixes not
yet in rawhide.
2018-01-19 18:04:40 +01:00
Florian Weimer
fac98a7443 Auto-sync with upstream branch master
Upstream commit: 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269

- Correct the list of static PIE architectures
- glibc_post_upgrade: Remove process restart logic
- glibc_post_upgrade: Integrate into the build process
- glibc_post_upgrade: Do not clean up tls subdirectories
- glibc_post_upgrade: Drop ia64 support
- Remove architecture-specific symbolic link for iconvconfig
- powerpc: Fix syscalls during early process initialization (swbz#22685)
2018-01-19 17:02:46 +01:00
Florian Weimer
a071c6801c glibc_post_upgrade: Remove process restart logic
The sshd restart looks potentially useful, but it has not run for a
long time because the file /etc/rc.d/init.d/sshd does not exit
anymore, so it appears unnecessary after all.
2018-01-19 17:02:46 +01:00
Florian Weimer
cc5db6cdfd Correct the list of static PIE architectures
x86_64 was missing before.
2018-01-19 17:02:40 +01:00
Florian Weimer
737f7e8513 glibc_post_upgrade: Integrate into the build process
This gives us access to the relevant definitions and also enables
us to perform a static PIE build without replicate the entire
compiler invocation.

Due to the move into the glibc build process, the program had to
be cleaned up to compile without warnings.
2018-01-19 16:32:18 +01:00
Florian Weimer
34f077631c Move glibc-fedora-nscd.patch comment into file 2018-01-19 16:05:04 +01:00
Florian Weimer
707a1e8f87 Remove architecture-specific symbolic link for iconvconfig
Its purpose is not entirely clear.  glibc_post_upgrade invokes
iconvconfig with explicit paths, so it does not matter for which
multilib variant the binary was built.
2018-01-19 15:30:50 +01:00
Florian Weimer
e33b0e3197 glibc_post_upgrade: Move LD_SO_CONF definition into source file 2018-01-19 15:11:38 +01:00
Florian Weimer
365663e72b glibc_post_upgrade: Do not clean up tls subdirectories
These were removed a long time ago.
2018-01-19 15:07:33 +01:00
Florian Weimer
91ed2dbf62 glibc_post_upgrade: Drop ia64 support 2018-01-19 15:03:57 +01:00
Florian Weimer
0f4d3ed14d Auto-sync with upstream branch master
Upstream commit: 64f63cb4583ecc1ba16c7253aacc192b6d088511

- Enable static PIE support
- Remove add-on support (already gone upstream)
- Rework test suite status reporting
- malloc: Fix integer overflows in memalign and malloc functions (swbz#22343)
- x86-64: Properly align La_x86_64_retval to VEC_SIZE (swbz#22715)
- aarch64: Update bits/hwcap.h for Linux 4.15
- Add NT_ARM_SVE to elf.h
2018-01-19 12:58:39 +01:00
Florian Weimer
5c2fe5cfb3 Rework test suite status reporting
Remove the timeout and the parallel tail call.  Always output to
standard error, for synchronization with the rest of the reporting.
2018-01-19 12:02:32 +01:00
Florian Weimer
5163dbee45 Enable static PIE on aarch64, i686, x86-64 2018-01-19 08:36:02 +01:00
Florian Weimer
dc905411d5 Remove add-on support (already gone upstream) 2018-01-19 08:35:09 +01:00
Florian Weimer
90612b2709 Use libidn2 for IDNA support (#1452750) 2018-01-17 18:42:37 +01:00
Florian Weimer
d7ce5d4634 Auto-sync with upstream branch master
Upstream commit: 860b0240a5645edd6490161de3f8d1d1f2786025

- CVE-2018-1000001: Make getcwd fail if it cannot obtain an absolute path
  (#1533837)
- elf: Synchronize DF_1_* flags with binutils (#1439328)
- aarch64: fix static pie enabled libc when main is in a shared library
- malloc: Ensure that the consolidated fast chunk has a sane size
2018-01-15 18:02:57 +01:00
Florian Weimer
d84b03df97 Auto-sync with upstream branch master
Upstream commit: 9a08a366a7e7ddffe62113a9ffe5e50605ea0924

- libnsl: Do not install libnsl.so, libnsl.a (#1531540)
- Use unversioned Supplements: for langpacks (#1490725)
- hu_HU locale: Avoid double space (swbz#22657)
- math: Make default libc_feholdsetround_noex_ctx use __feholdexcept
  (swbz#22702)
2018-01-12 11:43:05 +01:00
Florian Weimer
684ac6eb78 Use unversioned Supplements: for langpacks (#1490725) 2018-01-12 11:13:18 +01:00
Florian Weimer
538e3ea7c8 Auto-sync with upstream branch master
Upstream commit: 08c6e95234c60a5c2f37532d1111acf084f39345

- nptl: Open libgcc.so with RTLD_NOW during pthread_cancel (#1527887)
- Introduce libnsl subpackage and remove NIS headers (#1531540)
- Use versioned Obsoletes: for libcrypt-nss.
- nptl: Add tst-minstack-cancel, tst-minstack-exit (swbz#22636)
- math: ldbl-128ibm log1pl (-qNaN) spurious "invalid" exception (swbz#22693)
2018-01-11 14:30:08 +01:00
Florian Weimer
b8bc11a834 Put libnsl into a subpackage and do not install NIS headers 2018-01-11 13:21:53 +01:00
Florian Weimer
6e8a4e351b Use versioned Obsoletes: for libcrypt-nss 2018-01-11 11:57:20 +01:00
Carlos O'Donell
8544d3ab89 Update comments on python3 selection. 2018-01-10 11:13:08 -08:00
Florian Weimer
9e28c4292e Auto-sync with upstream branch master
Upstream commit: 09085ede12fb9650f286bdcd805609ae69f80618

- nptl: Fix stack guard size accounting (#1527887)
- Remove invalid Obsoletes: on glibc-header provides
- Require python3 instead of python during builds
- math: ldbl-128ibm lrintl/lroundl missing "invalid" exceptions (swbz#22690)
- x86-64: Add sincosf with vector FMA
2018-01-10 08:59:17 +01:00
Florian Weimer
e15a68193c Use python3 instead of python during builds 2018-01-10 08:09:01 +01:00
Florian Weimer
cad9c65e11 Remove Obsoletes: on capabilities which are not package names 2018-01-09 15:14:20 +01:00
Florian Weimer
a281128660 Add glibc-rpcgen subpackage, until the replacement is packaged (#1531540) 2018-01-08 16:46:16 +01:00
Florian Weimer
1042b5d52a Auto-sync with upstream branch master
Upstream commit: 579396ee082565ab5f42ff166a264891223b7b82

- nptl: Add test for callee-saved register restore in pthread_exit
- getrlimit64: fix for 32-bit configurations with default version >= 2.2
- elf: Add linux-4.15 VDSO hash for RISC-V
- elf: Add RISC-V dynamic relocations to elf.h
- powerpc: Fix error message during relocation overflow
- prlimit: Replace old_rlimit RLIM64_INFINITY with RLIM_INFINITY (swbz#22678)
2018-01-08 15:15:05 +01:00
Florian Weimer
cf072ec21a Auto-sync with upstream branch master
Upstream commit: f1a844ac6389ea4e111afc019323ca982b5b027d

- CVE-2017-16997: elf: Check for empty tokens before DST expansion (#1526866)
- Remove sln (#1531546)
- Remove Sun RPC interfaces (#1531540)
- Rebuild with newer GCC to fix pthread_exit stack unwinding issue (#1529549)
- i386: In makecontext, align the stack before calling exit (swbz#22667)
- x86, armhfp: sync sys/ptrace.h with Linux 4.15 (swbz#22433)
- elf: check for rpath emptiness before making a copy of it
- elf: remove redundant is_path argument
- elf: remove redundant code from is_dst
- elf: remove redundant code from _dl_dst_substitute
- scandir: fix wrong assumption about errno (swbz#17804)
- Deprecate external use of libio.h and _G_config.h
2018-01-05 14:36:28 +01:00
Florian Weimer
bf6952b9c9 Drop glibc-fedora-elf-ORIGIN.patch
Fixed upstream in a different way (our patch was buggy, see CVE-2017-16997).
2018-01-05 14:23:04 +01:00
Florian Weimer
23177e46b4 Remove sln-in-ldconfig patch
Obsoleted by commit d8e1573f9c (Stop
shipping /usr/sbin/sln).
2018-01-05 14:19:56 +01:00
Florian Weimer
d62730de90 Disable Sun RPC interfaces (#1531540) 2018-01-05 14:07:05 +01:00
Florian Weimer
95cc2e8d4c glibc_post_upgrade: Explain why removing platform directories is needed 2018-01-04 10:45:03 +01:00
Colin Walters
d8e1573f9c Stop shipping /usr/sbin/sln
A whole lot has changed since `sln` was introduced into glibc upstream with
this comment:

```
    1998-07-21 07:10  H.J. Lu  <hjl@gnu.org>

            * elf/sln.c: New file.
```
Upstream glibc commit 9d141cae00c957096045d08fe504b4a2be66ab75
```
 Author:     Ulrich Drepper <drepper@redhat.com>
 AuthorDate: Thu Aug 13 19:44:05 1998 +0000
```

Among other things for example, dynamic linking has been in use for the nearly
20 years that have passed and is now quite reliable. Further, many Fedora
systems now use an initramfs (dracut) which is basically a large filesystem of
utilities as a single blob; while it would require rebooting, one can easily
make hardlinks there.

Futher of course there's the increasing use of ostree in Fedora which which
consistently captures *all* of userspace and supports rollback, and additionaly
its presents a "read only" nature to admin tools and other processes that adds
significantly to system resilience.

The failure scenarios that could be recovered via `sln` seem to me to be very
small.

Applying this patch allows dropping a downstream Fedora patch to hardlink `sln` to `ldconfig`,
which was the source of a tricky bug:
https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583
that also impacts rpm-ostree.  In practice today SELinux policy is fixed
in updates, but given there's no real reason for this binary to exist
anymore, let's drop it.
2018-01-03 16:30:03 -05:00
Florian Weimer
39b4cfbcf1 Auto-sync with upstream branch master
Upstream commit bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f

- copy_file_range: New function to copy file data
- nptl: Consolidate pthread_{timed,try}join{_np}
- nptl: Implement pthread_self in libc.so (swbz#22635)
- math: Provide a C++ version of iseqsig (swbz#22377)
- elf: remove redundant __libc_enable_secure check from fillin_rpath
- math: Avoid signed shift overflow in pow (swbz#21309)
- x86: Add feature_1 to tcbhead_t (swbz#22563)
- x86: Update cancel_jmp_buf to match __jmp_buf_tag (swbz#22563)
- ld.so: Examine GLRO to detect inactive loader (swbz#20204)
- nscd: Fix nscd readlink argument aliasing (swbz#22446)
- elf: do not substitute dst in $LD_LIBRARY_PATH twice (swbz#22627)
- ldconfig: set LC_COLLATE to C (swbz#22505)
- math: New generic sincosf
- powerpc: st{r,p}cpy optimization for aligned strings
- CVE-2017-1000409: Count in expanded path in _dl_init_path (#1524867)
- CVE-2017-1000408: Compute correct array size in _dl_init_paths (#1524867)
- x86-64: Remove sysdeps/x86_64/fpu/s_cosf.S
- aarch64: Improve strcmp unaligned performance
2017-12-22 16:13:39 +01:00
Florian Weimer
a5a7506242 Remove power6 platform directory (#1522675) 2017-12-13 16:26:51 +01:00
Florian Weimer
08930d16b5 Obsolete the libcrypt-nss subpackage (#1525396) 2017-12-13 12:49:24 +01:00
Florian Weimer
29bd4db4f5 armhfp: Disable -fstack-clash-protection due to GCC bug (#1522678) 2017-12-13 12:03:19 +01:00
Florian Weimer
ac67247def ppc64: Disable power6 multilib due to GCC bug (#1522675) 2017-12-13 12:00:28 +01:00
Florian Weimer
94e38e4e87 Auto-sync with upstream branch master
Upstream commit: 243b63337c2c02f30ec3a988ecc44bc0f6ffa0ad

- libio: Free backup area when it not required (swbz#22415)
- math: Fix nextafter and nexttoward declaration (swbz#22593)
- math: New generic cosf
- powerpc: POWER8 memcpy optimization for cached memory
- x86-64: Add sinf with FMA
- x86-64: Remove sysdeps/x86_64/fpu/s_sinf.S
- math: Fix ctanh (0 + i NaN), ctanh (0 + i Inf) (swbz#22568)
- lt_LT locale: Base collation on copy "iso14651_t1" (swbz#22524)
- math: Add _Float32 function aliases
- math: Make cacosh (0 + iNaN) return NaN + i pi/2 (swbz#22561)
- hsb_DE locale: Base collation on copy "iso14651_t1" (swbz#22515)
2017-12-13 11:58:20 +01:00
Florian Weimer
9d8de720dd Add reference to #1383986 2017-12-06 11:16:02 +01:00
Florian Weimer
3c78a51385 Auto-sync with upstream branch master
Upstream commit: 37ac8e635a29810318f6d79902102e2e96b2b5bf

- Add elision tunables.  Drop related configure flag.
- Linux: Implement interfaces for memory protection keys
- math: Add _Float64, _Float32x function aliases
- math: Use sign as double for reduced case in sinf
- math: fix sinf(NAN)
- math: s_sinf.c: Replace floor with simple casts
- et_EE locale: Base collation on iso14651_t1 (swbz#22517)
- tr_TR locale: Base collation on iso14651_t1 (swbz#22527)
- hr_HR locale: Avoid single code points for digraphs in LC_TIME (swbz#10580)
- S390: Fix backtrace in vdso functions
2017-12-06 07:55:19 +01:00
Florian Weimer
d19bd27c2f Add reference to CVE-2017-17426 2017-12-06 07:49:51 +01:00
Florian Weimer
bb83f920be Auto-sync with upstream branch master
Upstream commit: 7863a7118112fe502e8020a0db0fa74fef281f29

- math: New generic sinf (swbz#5997)
- is_IS locale: Base collation on iso14651_t1 (swbz#22519)
- intl: Improve reproducibility by using bison (swbz#22432)
- sr_RS, bs_BA locales: make collation rules the same as for hr_HR (wbz#22534)
- hr_HR locale: various updates (swbz#10580)
- x86: Make a space in jmpbuf for shadow stack pointer
- malloc: Fix integer overflow when tcache is enabled (swbz#22375)
- locale: make forward accent sorting the default in collating (swbz#17750)
2017-12-04 13:59:23 +01:00
Florian Weimer
00b734f530 Enable -fstack-clash-protection (#1512531) 2017-11-29 12:59:25 +01:00
Florian Weimer
db77ecebac Upload new sources 2017-11-29 12:54:21 +01:00
Florian Weimer
776ca08599 Auto-sync with upstream branch master
Upstream commit: a55430cb0e261834ce7a4e118dd9e0f2b7fb14bc

- elf: Properly compute offsets of note descriptor and next note (swbz#22370)
- cs_CZ locale: Base collation on iso14651_t1 (swbz#22336)
- Implement the mlock2 function
- Add _Float64x function aliases
- elf: Consolidate link map sorting
- pl_PL locale: Base collation on iso14651_t1 (swbz#22469)
- nss: Export nscd hash function as __nss_hash (swbz#22459)
2017-11-29 11:58:53 +01:00
Andreas Krebbel
71d4a02e14 Typo fixes and improved s390 (31-bit) build support 2017-11-28 18:40:52 +01:00
Florian Weimer
10c1baf354 Auto-sync with upstream branch master
Upstream commit: cccb6d4e87053ed63c74aee063fa84eb63ebf7b8

- sigwait can fail with EINTR (#1516394)
- Add memfd_create function
- resolv: Fix p_secstodate overflow handling (swbz#22463)
- resolv: Obsolete p_secstodate
- Avoid use of strlen in getlogin_r (swbz#22447)
- lv_LV locale: fix collation (swbz#15537)
- S390: Add cfi information for start routines in order to stop unwinding
- aarch64: Optimized memset for falkor
2017-11-23 11:28:28 +01:00
Florian Weimer
df547679fd Auto-sync with upstream branch master
Upstream commit: f6e965ee94b37289f64ecd3253021541f7c214c3

- powerpc: AT_HWCAP2 bit PPC_FEATURE2_HTM_NO_SUSPEND
- aarch64: Add HWCAP_DCPOP bit
- ttyname, ttyname_r: Don't bail prematurely (swbz#22145)
- signal: Optimize sigrelse implementation
- inet: Check length of ifname in if_nametoindex (swbz#22442)
- malloc: Account for all heaps in an arena in malloc_info (swbz#22439)
- malloc: Add missing arena lock in malloc_info (swbz#22408)
- malloc: Use __builtin_tgmath in tgmath.h with GCC 8 (swbz#21660)
- locale: Replaced unicode sequences in the ASCII printable range
- resolv: More precise checks in res_hnok, res_dnok (swbz#22409, swbz#22412)
- resolv: ns_name_pton should report trailing \ as error (swbz#22413)
- locale: mfe_MU, miq_NI, an_ES, kab_DZ, om_ET: Escape / in d_fmt (swbz#22403)
2017-11-19 10:56:29 +01:00
Florian Weimer
35726c325a Link build-locale-archive against record-status.o 2017-11-07 12:21:16 +01:00
Florian Weimer
0980ba190b Auto-sync with upstream branch origin/master
Upstream commit: 6b86036452b9ac47b4ee7789a50f2f37df7ecc4f

- CVE-2017-15804: glob: Fix buffer overflow during GLOB_TILDE unescaping
- powerpc: Use latest string function optimization for internal function calls
- math: No _Float128 support for ppc64le -mlong-double-64 (swbz#22402)
- tpi_PG locale: Fix wrong d_fmt
- aarch64: Disable lazy symbol binding of TLSDESC
- tpi_PG locale: fix syntax error (swbz#22382)
- i586: Use conditional branches in strcpy.S (swbz#22353)
- ffsl, ffsll: Declare under __USE_MISC, not just __USE_GNU
- csb_PL locale: Fix abmon/mon for March (swbz#19485)
- locale: Various yesstr/nostr/yesexpr/noexpr fixes (swbz#15260, swbz#15261)
- localedef: Add --no-warnings/--warnings option
- powerpc: Replace lxvd2x/stxvd2x with lvx/stvx in P7's memcpy/memmove
- locale: Use ASCII as much as possible in LC_MESSAGES
- Add new locale yuw_PG (swbz#20952)
- malloc: Add single-threaded path to malloc/realloc/calloc/memalloc
- i386: Replace assembly versions of e_powf with generic e_powf.c
- i386: Replace assembly versions of e_log2f with generic e_log2f.c
- x86-64: Add powf with FMA
- x86-64: Add logf with FMA
- i386: Replace assembly versions of e_logf with generic e_logf.c
- i386: Replace assembly versions of e_exp2f with generic e_exp2f.c
- x86-64: Add exp2f with FMA
- i386: Replace assembly versions of e_expf with generic e_expf.c
2017-11-07 12:05:14 +01:00
Florian Weimer
e74f2b3bdb Auto-sync with upstream branch master
Upstream commit: 797ba44ba27521261f94cc521f1c2ca74f650147

- CVE-2017-15670: glob: Fix one-byte overflow (#1504807)
- math: Add bits/floatn.h defines for more _FloatN / _FloatNx types
- posix: Fix improper assert in Linux posix_spawn (swbz#22273)
- x86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve (swbz#21265)
- malloc: Add single-threaded path to _int_free
- locale: Add new locale kab_DZ (swbz#18812)
- locale: Add new locale shn_MM (swbz#13605)
2017-10-21 14:17:32 +02:00
Florian Weimer
5188e8569e Auto-sync with upstream branch master
Upstream commit: 63b4baa44e8d22501c433c4093aa3310f91b6aa2

- Use make -O to serialize make output
- sysconf: Fix missing definition of UIO_MAXIOV on Linux (#1504165)
- Install correct bits/long-double.h for MIPS64 (swbz#22322)
- malloc: Fix deadlock in _int_free consistency check
- x86-64: Don't set GLRO(dl_platform) to NULL (swbz#22299)
- math: Add _Float128 function aliases
- locale: Add new locale mjw_IN (swbz#13994)
- aarch64: Rewrite elf_machine_load_address using _DYNAMIC symbol
- powerpc: fix check-before-set in SET_RESTORE_ROUND
- locale: Use U+202F as thousands separators in pl_PL locale (swbz#16777)
- math: Use __f128 to define FLT128_* constants in include/float.h for old GCC
- malloc: Improve malloc initialization sequence (swbz#22159)
- malloc: Use relaxed atomics for malloc have_fastchunks
- locale: New locale ca_ES@valencia (swbz#2522)
- math: Let signbit use the builtin in C++ mode with gcc < 6.x (swbz#22296)
- locale: Place monetary symbol in el_GR, el_CY after the amount (swbz#22019)
2017-10-20 04:33:52 +02:00
Florian Weimer
e098446236 Use the -O flag to serialize make output 2017-10-17 13:52:43 +02:00
Florian Weimer
277dd05ebd Fix _smp_mflags reference in the libcrypt build 2017-10-17 13:50:23 +02:00
Florian Weimer
7bdfe15464 Remove silentrules macro 2017-10-17 13:47:32 +02:00
Florian Weimer
adefe4d265 Compile s390, s390x with -Werror
This is now supported upstream.
2017-10-17 13:43:47 +02:00
Florian Weimer
3bd5cf3d29 Define glibc_release_url based on glibcsrcdir, not glibcversion
The former is more reliable because glibcsrcdir changes in case of a
release off the release/*/master branch (which does not have a
tarball), but glibcversion remains the same.
2017-10-17 12:55:38 +02:00
Florian Weimer
d4b46d7258 Switch to .9000 version numbers during development (this time for real) 2017-10-17 12:47:02 +02:00
Florian Weimer
7fbb58cf62 Auto-sync with upstream branch master
Upstream commit: c38a4bfd596db2be2b9c1f96715bdc833eab760a

- Switch to .9000 version numbers during development
- malloc: Use compat_symbol_reference in libmcheck (swbz#22050)
2017-10-17 12:12:39 +02:00
Florian Weimer
6c2a58dc61 Auto-sync with upstream branch master
Upstream commit: 596f70134a8f11967c65c1d55a94a3a2718c731d

- Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 (swbz#22052)
- locale: No warning for non-symbolic character (swbz#22295)
- locale: Allow "" int_curr_Symbol (swbz#22294)
- locale: Fix localedef exit code (swbz#22292)
- nptl: Preserve error in setxid thread broadcast in coredumps (swbz#22153)
- powerpc: Avoid putting floating point values in memory (swbz#22189)
- powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7 (swbz#22142)
- Support profiling PIE (swbz#22284)
2017-10-16 19:27:17 +02:00
Florian Weimer
b1ee1018fc Auto-sync with upstream branch master
Upstream commit: d8425e116cdd954fea0c04c0f406179b5daebbb3
2017-10-11 07:19:54 +02:00
Florian Weimer
d3da0e913a Move /var/db/Makefile to nss_db (#1498900) 2017-10-09 12:24:43 +02:00
Florian Weimer
988ba6d3d1 Auto-sync with upstream branch master
Upstream commit: 645ac9aaf89e3311949828546df6334322f48933
2017-10-09 12:07:51 +02:00
Florian Weimer
746617ce7d Rewrite langpack generation Lua
The existing shell-based approach required super-linear processing
time for the SUPPORTED file.
2017-10-07 12:40:46 +02:00
Carlos O'Donell
b586203c24 Auto-sync with upstream master
Upstream commit: 1e26d35193efbb29239c710a4c46a64708643320

- malloc: Fix tcache leak after thread destruction (swbz#22111)
- powerpc:  Fix IFUNC for memrchr.
- aarch64: Optimized implementation of memmove for Qualcomm Falkor
- Always do locking when iterating over list of streams (swbz#15142)
- abort: Do not flush stdio streams (swbz#15436)
2017-10-06 15:55:09 -07:00
Florian Weimer
2235ae530d Move nss_compat to the main glibc package (#1400538) 2017-10-04 18:53:59 +02:00
Florian Weimer
67108a5592 Auto-sync with upstream master
Upstream commit: 11c4f5010c58029e73e656d5df4f8f42c9b8e877

- crypt: Use NSPR header files in addition to NSS header files (#1489339)
- math: Fix yn(n,0) without SVID wrapper (swbz#22244)
- math: Fix log2(0) and log(10) in downward rounding (swbz#22243)
- math: Add C++ versions of iscanonical for ldbl-96, ldbl-128ibm (swbz#22235)
- powerpc: Optimize memrchr for power8
- Hide various internal functions (swbz#18822)
2017-10-04 16:01:19 +02:00
Florian Weimer
edbe539deb Rotate RPM changelog 2017-10-01 17:52:54 +02:00
Florian Weimer
f7f03039dd Fix typo in changelog 2017-10-01 17:52:10 +02:00
Florian Weimer
d61c107a04 Auto-sync with upstream master
Upstream commit: 1e2bffd05c36a9be30d7092d6593a9e9aa009ada

- Add IBM858 charset (#1416405)
- Update kernel version in syscall-names.list to 4.13
- Add Linux 4.13 constants to bits/fcntl-linux.h
- Add fcntl sealing interfaces from Linux 3.17 to bits/fcntl-linux.h
- math: New generic powf, log2f, logf
- Fix nearbyint arithmetic moved before feholdexcept (swbz#22225)
- Mark __dso_handle as hidden (swbz#18822)
- Skip PT_DYNAMIC segment with p_filesz == 0 (swbz#22101)
- glob now matches dangling symbolic links (swbz#866, swbz#22183)
- nscd: Release read lock after resetting timeout (swbz#22161)
- Avoid __MATH_TG in C++ mode with -Os for pfcl (swbz#22146)
- Fix dlclose/exit race (swbz#22180)
- x86: Add SSE4.1 trunc, truncf (swbz#20142)
- Fix atexit/exit race (swbz#14333)
- Use execveat syscall in fexecve (swbz#22134)
- Enable unwind info in libc-start.c and backtrace.c
- powerpc: Avoid misaligned stores in memset
- powerpc: build some IFUNC math functions for libc and libm (swbz#21745)
- Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ (swbz#22023)
- Fix LC_TELEPHONE for az_AZ (swbz#22112)
- x86: Add MathVec_Prefer_No_AVX512 to cpu-features (swbz#21967)
- x86: Add x86_64 to x86-64 HWCAP (swbz#22093)
- Finish change from “Bengali” to “Bangla” (swbz#14925)
- posix: fix glob bugs with long login names (swbz#1062)
- posix: Fix getpwnam_r usage (swbz#1062)
- posix: accept inode 0 is a valid inode number (swbz#19971)
- Remove redundant LC_TIME data in om_KE (swbz#22100)
- Remove remaining _HAVE_STRING_ARCH_* definitions (swbz#18858)
- resolv: Fix memory leak with OOM during resolv.conf parsing (swbz#22095)
- Add miq_NI locale for Miskito (swbz#20498)
- Fix bits/math-finite.h exp10 condition (swbz#22082)
2017-09-30 09:04:21 +02:00
Florian Weimer
253d1d9c66 Fix accidentially inserted typo 2017-09-14 17:41:57 +02:00
Florian Weimer
8ca6f66f20 Upstream removed BUGS and CONFORMANCE files 2017-09-04 20:53:35 +02:00
Florian Weimer
0e45e4de58 Auto-sync with upstream master
Upstream commit: b38042f51430974642616a60afbbf96fd0b98659

- Implement tmpfile with O_TMPFILE (swbz#21530)
- Obsolete pow10 functions
- math.h: Warn about an already-defined log macro
2017-09-04 19:49:35 +02:00
Florian Weimer
e79ddddf67 Do not patch ChangeLog in glibc-fedora-locarchive.patch 2017-09-04 19:49:35 +02:00
Florian Weimer
21cf167acc Build glibc with -O2 2017-09-01 14:07:30 +02:00
Florian Weimer
284746122d Auto-sync with upstream master
Upstream commit: f4a6be2582b8dfe8adfa68da3dd8decf566b3983

- malloc: Abort on heap corruption, without a backtrace (swbz#21754)
- getaddrinfo: Return EAI_NODATA for gethostbyname2_r with NO_DATA (swbz#21922)
- getaddrinfo: Fix error handling in gethosts (swbz#21915) (swbz#21922)
- Place $(elf-objpfx)sofini.os last (swbz#22051)
- Various locale fixes (swbz#15332, swbz#22044)
2017-09-01 10:30:18 +02:00
Florian Weimer
b45bb05263 Auto-sync with upstream master
Upstream commit: 5f9409b787c5758fc277f8d1baf7478b752b775d

- Drop glibc-rh952799.patch, applied upstream (#952799, swbz#22025)
- Various locale fixes (swbz#22022, swbz#22038, swbz#21951, swbz#13805,
  swbz#21971, swbz#21959)
- MIPS/o32: Fix internal_syscall5/6/7 (swbz#21956)
- AArch64: Fix procfs.h not to expose stdint.h types
- iconv_open: Fix heap corruption on gconv_init failure (swbz#22026)
- iconv: Mangle __btowc_fct even without __init_fct (swbz#22025)
- Fix bits/math-finite.h _MSUF_ expansion namespace (swbz#22028)
- Provide a C++ version of iszero that does not use __MATH_TG (swbz#21930)
2017-08-30 14:12:45 +02:00
Mark Wielaard
05146e37a4 Run valgrind check with --error-exitcode=1. Fix valgrind BuildRequires. 2017-08-30 14:02:18 +02:00
Florian Weimer
76dd91f117 Drop glibc-rh1009145.patch
It has since been obsoleted by multiple mass rebuilds.
2017-08-29 12:48:36 +02:00
Florian Weimer
7df3e02388 Include misc/tst-syscall-list.out in the build log 2017-08-28 13:15:27 +02:00
Florian Weimer
d0c57f678a Auto-sync with upstream master
Upstream commit: 2dba5ce7b8115d6a2789bf279892263621088e74
2017-08-28 12:12:15 +02:00
Florian Weimer
a6b9bec157 Drop glibc-rh1470060.patch
Addressed by this upstream commit in a different way:

commit eac43cbb8d808a40004aa0a4a286f5c5155beccb
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Aug 10 15:58:28 2017 +0200

    malloc: Avoid optimizer warning with GCC 7 and -O3
2017-08-28 12:07:38 +02:00
Florian Weimer
beff5c2326 Drop glibc-rh1484729.patch, glibc-rh1484729-syscall-names.patch
Applied upstream.
2017-08-28 12:05:33 +02:00
Florian Weimer
238627a99e Drop glibc-rh825061.patch
The Perl Info generator in Texinfo 5.0 uses the input basename in the
output file, so the multi-arch conflict no longer happens, and the
Makefile tweak is not needed anymore.
2017-08-28 12:05:08 +02:00
Florian Weimer
6a6f54375a Auto-sync with upstream master
Upstream commit: 3d7b66f66cb223e899a7ebc0f4c20f13e711c9e0

- string/stratcliff.c: Replace int with size_t (swbz#21982)
- Fix tgmath.h handling of complex integers (swbz#21684)
2017-08-25 11:39:53 +02:00
Florian Weimer
a60d22cda6 Drop glibc-gcc-strict-overflow.patch
This is no longer necessary because we do not build with -O3 anymore.
Upstream has a proper fix now, too.
2017-08-25 11:36:23 +02:00
Florian Weimer
0ab5fbb2e4 Update system call list to Linux 4.12 (#1484729) 2017-08-25 11:28:44 +02:00
Florian Weimer
2f246edc9d Drop glibc-fedora-include-bits-ldbl.patch (#1482105) 2017-08-24 16:51:08 +02:00
Florian Weimer
5bc208c4f5 Use an architecture-independent system call list (#1484729) 2017-08-24 16:49:18 +02:00
Florian Weimer
a4f378196e Rework handling of asynchronous unwind tables compiler flag
This commit drops an overridden -fasynchronous-unwind-tables flag, which
had no effect.

We compile all of glibc with -fno-asynchronous-unwind-tables, so we can
drop glibc-fedora-ppc-unwind.patch.
2017-08-24 11:17:17 +02:00
Florian Weimer
eb3d3880c8 Auto-sync with upstream master
Upstream commit: 80f91666fed71fa3dd5eb5618739147cc731bc89
2017-08-22 08:19:09 +02:00
Florian Weimer
c6d0720817 Auto-sync with upstream master
Upstream commit: a8410a5fc9305c316633a5a3033f3927b759be35

- Obsolete matherr, _LIB_VERSION, libieee.a.
2017-08-21 22:31:26 +02:00
Florian Weimer
976a6ca3e4 Auto-sync with upstream master
Upstream commit: 4504783c0f65b7074204c6126c6255ed89d6594e
2017-08-21 19:54:40 +02:00
Florian Weimer
8c898cdc11 Auto-sync with upstream master
Upstream commit: 2585d7b839559e665d5723734862fbe62264b25d

- assert: Support types without operator== (int) (#1483005)
2017-08-21 16:44:07 +02:00
Florian Weimer
051a34bb83 Auto-sync with upstream master
Upstream commit: 2585d7b839559e665d5723734862fbe62264b25d

- Do not use generic selection in C++ mode
- Do not use __builtin_types_compatible_p in C++ mode (#1481205)
- x86-64: Check FMA_Usable in ifunc-mathvec-avx2.h (swbz#21966)
- Various locale fixes (swbz#21750, swbz#21960, swbz#21959, swbz#19852)
- Fix sigval namespace (swbz#21944)
- x86-64: Optimize e_expf with FMA (swbz#21912)
- Adjust glibc-rh827510.patch.
2017-08-21 14:17:58 +02:00
Carlos O'Donell
08d81d7330 Fix glibc.spec file comment with %%install. 2017-08-17 14:17:47 -04:00
Tomasz Kłoczko
c6e992763d Resolves: #1476939
- Remove 'Buildroot' tag, 'Group' tag, and '%clean' section, and don't
  remove the buildroot in %install, all per Fedora Packaging Guidelines
  (#1476839)
2017-08-17 14:16:03 -04:00
Florian Weimer
66a1c9c9cb Auto-sync with upstream master
Upstream commit: 403143e1df85dadd374f304bd891be0cd7573e3b

- x86-64: Align L(SP_RANGE)/L(SP_INF_0) to 8 bytes (swbz#21955)
- powerpc: Add values from Linux 4.8 to <elf.h>
- S390: Add new s390 platform z14.
- Various locale fixes (swbz#14925, swbz#20008, swbz#20482, swbz#12349
  swbz#19982, swbz#20756, swbz#20756, swbz#21836, swbz#17563, swbz#16905,
  swbz#21920, swbz#21854)
- NSS: Replace exported NSS lookup functions with stubs (swbz#21962)
- i386: Do not set internal_function
- assert: Suppress pedantic warning caused by statement expression (swbz#21242)
- powerpc: Restrict xssqrtqp operands to Vector Registers (swbz#21941)
- sys/ptrace.h: remove obsolete PTRACE_SEIZE_DEVEL constant (swbz#21928)
- Remove __qaddr_t, __long_double_t
- Fix uc_* namespace (swbz#21457)
- nss: Call __resolv_context_put before early return in get*_r (swbz#21932)
- aarch64: Optimized memcpy for Qualcomm Falkor processor
- manual: Document getcontext uc_stack value on Linux (swbz#759)
- i386: Add <startup.h> (swbz#21913)
- Don't use IFUNC resolver for longjmp or system in libpthread (swbz#21041)
- Fix XPG4.2 bits/sigaction.h namespace (swbz#21899)
- x86-64: Add FMA multiarch functions to libm
- i386: Support static PIE in start.S
- Compile tst-prelink.c without PIE (swbz#21815)
- x86-64: Use _dl_runtime_resolve_opt only with AVX512F (swbz#21871)
- x86: Remove __memset_zero_constant_len_parameter (swbz#21790)
2017-08-16 17:18:35 +02:00
Florian Weimer
27727bd4a9 Drop glibc-arm-hardfloat-3.patch and associated hack 2017-08-16 16:12:31 +02:00
Florian Weimer
5ca19238f5 Drop glibc-fedora-ldd.patch (applied to upstream master) 2017-08-16 16:01:49 +02:00
Florian Weimer
6cb5e06b89 Drop glibc-fedora-i386-tls-direct-seg-refs.patch 2017-08-16 15:50:45 +02:00
Florian Weimer
2620469c94 glibc-2.26-2.fc28: Packaging adjustments 2017-08-16 13:45:31 +02:00
Florian Weimer
fce95492bd Change invocation style for find-debuginfo.sh
Using eval affects command line parsing in the shell script.  Call the
script directly, but do not quote $find_debuginfo_args, to splice its
contents into the argument list.
2017-08-16 13:30:01 +02:00
Florian Weimer
9df65054b7 Replace create_lang_packages macro with its Lua code
This works around an RPM change in the processing of macro argument lists.
Newer RPM versions split the argument list, so that %1 contains just eo,
and not the whole language list.

Instead, use %language_list directly.  This is compatible with earlier
RPM versions, too.
2017-08-16 13:17:21 +02:00
Florian Weimer
d8b4ab633b Remove unused require_langpacks macro 2017-08-16 12:57:22 +02:00
Florian Weimer
6e6bd41f5e Remove nosegneg 32-bit Xen PV support libraries (#1482027) 2017-08-16 12:03:03 +02:00
Florian Weimer
ad9d2e17df Disable multi-arch (IFUNC string functions) on i686 (#1471427) 2017-08-16 11:14:53 +02:00
Florian Weimer
fdd439f8b7 Use upstream default for multi-arch support
Drop binutils run-time conflict.  If we still want those, they should
be on glibc-devel, not the main package.
2017-08-16 11:12:36 +02:00
Carlos O'Donell
8742b0f949 glibc-2.26-1
Auto-sync with upstream release/2.26/master

Upstream commit: 2aad4b04ad7b17a2e6b0e66d2cb4bc559376617b

- Update to released 2.26 branch.
- getaddrinfo: Release resolver context on error in gethosts (swbz#21885)
2017-08-03 09:47:24 -04:00
Fedora Release Engineering
4786e3be95 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 21:45:53 +00:00
Florian Weimer
8b0d66e92b Auto-sync with upstream master
Upstream commit: 5920a4a624b1f4db310d1c44997b640e2a4653e5
2017-07-29 08:18:06 +02:00
Florian Weimer
7e4694d522 Auto-sync with upstream master
Upstream commit: d95fcb2df478efbf4f8537ba898374043ac4561f
2017-07-28 21:00:29 +02:00
Carlos O'Donell
d04b9b7840 Fix NEVRA changes caused by mass rebuild scripts. 2017-07-27 12:41:04 -04:00
Carlos O'Donell
887799236c Resolves: #1475009
- Adjust to new rpm debuginfo generation (#1475009).
2017-07-27 12:35:22 -04:00
Fedora Release Engineering
f271045ada - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 10:20:27 +00:00
Florian Weimer
37c3363a24 Auto-sync with upstream master
Upstream commit: 00d7a3777369bac3d8d44152dde2bb7381984ef6

- aarch64: Fix out of bound array access in _dl_hwcap_string
2017-07-19 09:05:38 +02:00
Florian Weimer
e0954fe0fe Revert "Rebuild with new NVR"
This reverts commit c5379cd829.
2017-07-19 09:01:48 +02:00
Florian Weimer
c5379cd829 Rebuild with new NVR 2017-07-18 08:22:30 +02:00
Florian Weimer
6702ca3c64 Auto-sync with upstream master
Upstream commit: 91ac3a7d8474480685632cd25f844d3154c69fdf

- Drop glibc-rh1467518.patch in favor of upstream patch (#1467518)
- Fix pointer alignment in NSS group merge result construction (#1471985)
- Various locale fixes
2017-07-17 23:07:00 +02:00
Carlos O'Donell
705ca30d3e Auto-sync with upstream master
Upstream commit: de895ddcd7fc45caeeeb0ae312311b8bd31d82c5:

- Added Fiji Hindi language locale for Fiji (swbz#21694).
- Added yesstr/nostr for nds_DE and nds_NL (swbz#21756).
- Added yesstr and nostr for Tigrinya (swbz#21759).
- Fix LC_MESSAGES and LC_ADDRESS for anp_IN (swbz#21760).
- Added yesstr/nostr and fix yesexpr for pap_AW and pap_CW (swbz#21757).
- Added Tongan language locale for Tonga (swbz#21728).
- [ARM] Fix ld.so crash when built using Binutils 2.29.
- Added yesstr and nostr for aa_ET (swbz#21768).
- New locale for bi_VU (swbz#21767).
- Disable single thread optimization for open_memstream

Dropped patches:

- armv7hl: Drop 32-bit ARM build fix, already in upstream master.
- s390x: Apply glibc fix again, removing PTRACE_GETREGS etc. (#1469536).
2017-07-14 21:36:54 -04:00
Carlos O'Donell
44f4cf77e9 Fix 32-bit ARM builds in presence of new binutils. 2017-07-12 19:51:11 -04:00
Carlos O'Donell
32049f182f Add temporary workaround for Bug 1467518.
Fix IFUNC crash in early startup for ppc64le static binaries (#1467518).
Enable building with BIND_NOW on ppc64le (#1467518).
2017-07-12 19:40:05 -04:00
Florian Weimer
4e3d1d3a47 malloc: Tell GCC optimizers about MAX_FAST_SIZE in _int_malloc (#1470060) 2017-07-12 14:00:58 +02:00
Florian Weimer
419878ed02 Auto-sync with upstream master
Upstream commit: 30200427a99e5ddac9bad08599418d44d54aa9aa

- Add per-thread cache to malloc
- Add Samoan language locale for Samoa
- Add Awajún / Aguaruna locale for Peru
- CVE-2010-3192: Avoid backtrace from __stack_chk_fail (swbz#12189)
- Add preadv2, writev2 RWF_NOWAIT flag (swbz#21738)
- Fix abday strings for ar_JO/ar_LB/ar_SY locales (swbz#21749)
- Fix abday strings for ar_SA locale (swbz#21748, swbz#19066)
- Set data_fmt for da_DK locale (swbz#17297)
- Add yesstr and nostr for the zh_HK locale (swbz#21733)
- Fix abday strings for the ksIN@devanagari locale (swbz#21743)
- Do not include _dl_resolv_conflicts in libc.a (swbz#21742)
- Test __memmove_chk, __memset_chk only in libc.so (swbz#21741)
- Add iI and eE to  yesexpr and noexpr respectively for ts_ZA locale
- Add yesstr/nostr for kw_GB locale (swbz#21734)
- Add yesstr and nostr for the ts_ZA locale (swbz#21727)
- Fix LC_NAME for hi_IN locale (swbz#21729)
- Add yesstr and nostr for the xh_ZA locale (swbz#21724)
- Add yesstr and nostr for the zh_CN locale (swbz#21723)
- Fix full weekday names for the ks_IN@devanagari locale (swbz#21721)
- Various fixes to Arabic locales after CLDR import
2017-07-12 14:00:32 +02:00
Florian Weimer
4caf18bfe4 Do not remove test case sources in glibc-rh1469536.patch
Removing it from the Makefile is sufficient.  This avoids conflicts.
2017-07-12 10:15:41 +02:00
Florian Weimer
d40c9fdc13 s390x: Restore PTRACE_GETREGS etc. to get GCC to build (#1469536) 2017-07-11 15:03:54 +02:00
Florian Weimer
d538c7cc53 Reinstantiate stack_t cleanup (#1468904) 2017-07-11 14:52:35 +02:00
Florian Weimer
4597e723d0 Back out stack_t cleanup (#1468904) 2017-07-09 19:03:50 +02:00
Florian Weimer
667333c331 Auto-sync with upstream master
Upstream commit: 031e519c95c069abe4e4c7c59e2b4b67efccdee5

- x86-64: Align the stack in __tls_get_addr (#1440287)
- Add Tok-Pisin (tpi_PG) locale.
- Add missing yesstr/nostr for Pashto locale (swbz#21711)
- Add missing yesstr/nostr for Breton locale (swbz#21706)
- Single threaded stdio optimization
- sysconf: Use conservative default for _SC_NPROCESSORS_ONLN (swbz#21542)
2017-07-06 14:29:12 +02:00
Florian Weimer
84baf402f0 Auto-sync with upstream master
Upstream commit: 4446a885f3aeb3a33b95c72bae1f115bed77f0cb
2017-07-04 15:31:23 +02:00
Florian Weimer
44e7da869e Auto-sync with upstream master
Upstream commit: 89f6307c5d270ed4f11cee373031fa9f2222f2b9
2017-07-04 11:36:06 +02:00
Florian Weimer
8ed8731099 Disable building with BIND_NOW on ppc64le (#1467518) 2017-07-04 08:23:12 +02:00
Florian Weimer
dcf3eeb5c0 Auto-sync with upstream master
Upstream commit: e237357a5a0559dee92261f1914d1fa2cd43a1a8

- Support an arbitrary number of search domains in the stub resolver (#168253)
- Detect and apply /etc/resolv.conf changes in libresolv (#1374239)
- Increase malloc alignment on i386 to 16 (swbz#21120)
- Make RES_ROTATE start with a random name server (swbz#19570)
- Fix tgmath.h totalorder, totalordermag return type (swbz#21687)
- Miscellaneous sys/ucontext.h namespace fixes (swbz#21457)
- Rename struct ucontext tag (swbz#21457)
- Call exit system call directly in clone (swbz#21512)
- powerpc64le: Enable float128
- getaddrinfo: Merge IPv6 addresses and IPv4 addresses (swbz#21295)
- Avoid .symver on common symbols (swbz#21666)
- inet_pton: Reject IPv6 addresses with many leading zeros (swbz#16637)
2017-07-03 21:49:42 +02:00
Florian Weimer
093184feca Auto-sync with upstream master
Upstream commit: 3ec7c02cc3e922b9364dc8cfd1d4546671b91003
2017-06-23 17:43:54 +02:00
Florian Weimer
9a4cee58e4 Auto-sync with upstream master
Upstream commit: 12f50337ae80672c393c2317d471d097ad92c492
2017-06-23 13:25:59 +02:00
Florian Weimer
2660abb9bb Reenable valgrind on aarch64 2017-06-23 13:10:13 +02:00
Florian Weimer
9d8ea8c478 Log auxiliary vector during build 2017-06-22 14:48:21 +02:00
Florian Weimer
aae7c7249a Auto-sync with upstream master
Upstream commit: 0a47d031e44f15236bcef8aeba80e737bd013c6f
2017-06-22 13:34:40 +02:00
Florian Weimer
10e4623a27 Disable valgrind on aarch64 2017-06-22 13:28:12 +02:00
Florian Weimer
6e985d0a59 Drop workaround for GCC PR69537 2017-06-21 20:50:35 +02:00
Florian Weimer
8a569a02e8 Auto-sync with upstream master
Upstream commit: 9649350d2ee47fae00794d57e2526aa5d67d900e
2017-06-21 20:49:15 +02:00
Florian Weimer
6a3a1d1575 Drop historic aarch64 TLS patches 2017-06-21 20:38:36 +02:00
Florian Weimer
fda3e070a7 Auto-sync with upstream master
Upstream commit: 43e0ac24c836eed627a75ca932eb7e64698407c6
2017-06-21 11:08:15 +02:00
Florian Weimer
87bc7c9489 Resolves: #1462820
- Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream.
- Auto-sync with upstream master,
  commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing:
- CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820)
- wait3 namespace (swbz#21625)
- S390: Sync ptrace.h with kernel (swbz#21539)
- Another x86 sys/ucontext.h namespace issue (swbz#21457)
- siginterrupt namespace (swbz#21597)
- Signal stack namespace (swbz#21584)
- Define struct rusage in sys/wait.h when required (swbz#21575)
- S390: Fix build with gcc configured with --enable-default-pie (swbz#21537)
- Update timezone code from tzcode 2017b
- nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988)
- PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
- Make copy of <bits/std_abs.h> from GCC (swbz#21573)
- localedata: ce_RU: update weekdays from CLDR (swbz#21207)
- localedata: Remove trailing spaces (swbz#20275)
- XPG4 bsd_signal namespace (swbz#21552)
- Correct collation rules for Malayalam (swbz#19922, swbz#19919)
- waitid namespace (swbz#21561)
- Condition signal.h inclusion in sys/wait.h (swbz#21560)
- ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528)
- tst-timezone race (swbz#14096)
- Define SIG_HOLD for XPG4 (swbz#21538)
- struct sigaltstack namespace (swbz#21517)
- sigevent namespace (swbz#21543)
- Add shim header for bits/syscall.h (swbz#21514)
- namespace issues in sys/ucontext.h (swbz#21457)
- posix: Implement preadv2 and pwritev2
- Various float128 and tunables improvements
2017-06-20 00:18:02 +02:00
Stephen Gallagher
f35d7503ab Reduce libcrypt-nss dependency to 'Suggests:' 2017-06-06 14:42:47 +02:00
Arjun Shankar
7f4621301d Auto-sync with upstream master
Upstream commit: cfa9bb61cd09c40def96f042a3123ec0093c4ad0
2017-05-31 16:22:21 +02:00
Arjun Shankar
c769a3ef7a Disable the NULL buffer test in login/tst-ptsname.c.
It leads to a build failure during 'make check'.
2017-05-31 14:37:21 +02:00
Arjun Shankar
4014d6f877 Auto-sync with upstream master
Upstream commit: 231a59ce2c5719d2d77752c21092960e28837b4a
2017-05-23 14:37:59 +02:00
Carlos O'Donell
c2f6995570 Fix build with --enable-obsolete-nsl. 2017-05-02 13:45:38 -04:00
Carlos O'Donell
056f48952a Auto-sync with upstream master
Upstream commit: 25e39b4229fb365a605dc4c8f5d6426a77bc08a6
2017-05-01 13:23:28 -04:00
Florian Weimer
2999128764 Automatically set glibc_release_url based on glibcrelease 2017-03-08 10:09:29 +01:00
Florian Weimer
04b4101e8f Auto-sync with upstream master
Upstream commit: a10e9c4e53fc652b79abf838f7f837589d2c84db
2017-03-02 20:09:14 +01:00
Jakub Hrozek
305fa9fb57 Resolves: #1427646
Reverse the order of sss and files modules for passwd and group maps
2017-03-01 14:03:09 +01:00
Florian Weimer
5bc3170c40 Auto-sync with upstream release/2.25/master
Upstream commit: 93cf93e06ce123439e41d3d62790601c313134cb
2017-02-28 17:43:41 +01:00
Carlos O'Donell
aa4db12ee0 glibc-2.25-1
- Update to final released glibc 2.25.

The glibc rawhide builds must stay on 2.25 branch until
F26 branches from rawhide. This assures that we have ABI/API
guarantees provided by upstream. Please do not rebase rawhide
against glibc master.
2017-02-08 21:22:46 -05:00
Carlos O'Donell
ad7685d113 glibc-2.24.90-31
- Fix builds with GCC 7.0.
2017-02-08 16:17:57 -05:00
Carlos O'Donell
7061f72715 glibc-2.24.90-30
- Optimize IBM z System builds for zEC12.
2017-02-02 09:53:07 -05:00
Florian Weimer
7463f6a220 Use vpath in crypt-glibc/Makefile to obtain the test input file
Reported by Stefan Liebler.
2017-01-25 16:46:01 +01:00
Florian Weimer
574cbae985 Auto-sync with upstream master
Upstream commit: 5653ab12b4ae15b32d41de7c56b2a4626cd0437a
2017-01-25 16:39:15 +01:00
Carlos O'Donell
edb6156880 Auto-sync with upstream master
Upstream commit: 468e525c81a4af10f2e613289b6ff7c950773a9e
2017-01-12 22:17:58 -05:00
Florian Weimer
41c1b49335 quilt-patch.sh: Support new "sources" file format 2017-01-02 13:32:40 +01:00
Florian Weimer
c659285752 Auto-sync with upstream master
Upstream commit: 73dfd088936b9237599e4ab737c7ae2ea7d710e1
2017-01-02 13:32:25 +01:00
Florian Weimer
e9dcd51d77 Remove patches which were workarounds for GCC 5 bugs 2017-01-02 12:26:05 +01:00
Florian Weimer
4570c40835 Auto-sync with upstream master
Upstream commit: cecbc7967f0bcac718b6f8f8942b58403c0e917c
2016-12-26 11:22:24 +01:00
Carlos O'Donell
a681b7b4e2 Auto-sync with upstream master
Upstream commit: 81e0662e5f2c342ffa413826b7b100d56677b613
2016-12-23 18:31:06 -05:00
Florian Weimer
ace066ccd1 Auto-sync with upstream master
Upstream commit: e077349ce589466eecd47213db4fae6b80ec18c4
2016-12-18 15:43:05 +01:00
Florian Weimer
5617e2c469 Auto-sync with upstream master
Upstream commit: 92dcaa3e2f7bf0f7f1c04cd2fb6a317df1a4e225
2016-12-12 19:26:23 +01:00
Florian Weimer
8076ad58d9 Auto-sync with upstream master
Upstream commit: 0abbe7cd700951082b314182a0958d65238297ef

GDB pretty-printers for NPTL types are temporarily disabled
due to bug 1403329.
2016-12-09 18:38:16 +01:00
Florian Weimer
b766add297 Auto-sync with upstream master
Upstream commit: 01b23a30b42a90b1ebd882a0d81110a1542e504a
2016-12-02 17:13:31 +01:00
Florian Weimer
fbd985bf72 Do not install the PROJECTS file
It was removed upstream.
2016-11-30 17:18:55 +01:00
Florian Weimer
eaa5674199 Auto-sync with upstream master
Upstream commit: 9e78f6f6e7134a5f299cc8de77370218f8019237
2016-11-30 16:12:57 +01:00
Florian Weimer
93ddbf99ee Auto-sync with upstream master
Upstream commit: 7a5e3d9d633c828d84a9535f26b202a6179978e7
2016-11-23 13:38:43 +01:00
Florian Weimer
434cf9e2e2 Auto-sync with upstream master
Upstream commit: 5ee1a4443a3eb0868cef1fe506ae6fb6af33d4ad
2016-11-22 11:10:50 +01:00
Carlos O'Donell
b587bccfe7 glibc-2.24.90-17
* Add new scalable implementation of POSIX read-write locks.
2016-11-17 12:46:05 -05:00
Florian Weimer
c9a1e5c935 Do not try to link libcrypt statically during tests 2016-11-16 15:25:20 +01:00
Florian Weimer
835049c53c Auto-sync with upstream master
Upstream commit: 530862a63e0929128dc98fbbd463b120934434fb
2016-11-16 14:43:20 +01:00
Florian Weimer
573bcacc8f Auto-sync with upstream master
Upstream commit: 9032070deaa03431921315f973c548c2c403fecc
2016-11-02 12:06:16 +01:00
Florian Weimer
55bd1b5cdd Resolves: #1333945
Drop revert of upstream fix.
2016-11-02 11:49:29 +01:00
Florian Weimer
762e747b11 Auto-sync with upstream master
Upstream commit: e37208ce86916af9510ffb9ce7b3c187986f07de
2016-10-22 17:42:34 +02:00
Florian Weimer
9d7b7a7a04 Auto-sync with upstream master
Upstream commit: b3918c44db615637b26d919ce599cd86592316b3
2016-10-21 18:38:39 +02:00
Carlos O'Donell
83e5c415da glibc-2.24.90-11
- Add prototype support for detecting invalid IFUNC calls (swbz#20019).
- New POSIX thread condition variable implementation (swbz#13165).
2016-10-17 22:19:05 -04:00
Florian Weimer
4f53fe474e Auto-sync with upstream master
Upstream commit: 5140d036f9c16585448b5908c3a219bd96842161
2016-10-07 17:54:03 +02:00
Florian Weimer
0b05408588 Auto-sync with upstream master
Upstream commit: ff88ee7edfaa439e23c42fccaf3a36cd5f041894
2016-10-04 19:29:14 +02:00
Florian Weimer
0adb9076a4 Auto-sync with upstream master
Upstream commit: 17af5da98cd2c9ec958421ae2108f877e0945451
2016-09-22 13:31:39 +02:00
Florian Weimer
66afdc6140 Resolves: #1377795
Add MIPS support.  Based on a patch from Michal Toman
<michal.toman@gmail.com>.
2016-09-22 13:20:25 +02:00
Carlos O'Donell
36702a1359 Auto-sync with upstream master.
Upstream commit: e299076fefd9649f78f853865d4745043e50813c
2016-09-20 23:29:23 -04:00
Florian Weimer
77d2ac8e00 Auto-sync with upstream master
Upstream commit: 4d728087ef8cc826b05bd21d0c74d4eca9b1a27d
2016-09-01 16:11:33 +02:00
Florian Weimer
c097c5b5f7 Auto-sync with upstream master
Upstream commit: 7e625f7e85b4e88f10dbde35a0641742af581806
2016-08-26 19:45:02 +02:00
Florian Weimer
82db94894e Auto-sync with upstream master
Upstream commit: 66abf9bfbe24ac1e7207d26ccad725ed938dc52c
2016-08-21 16:49:12 +02:00
Florian Weimer
90f786e56b Auto-sync with upstream master.
Upstream commit: ID d9067fca40b8aac156d73cfa44d6875813555a6c
2016-08-17 15:23:48 +02:00
Florian Weimer
548cf89fd5 Fix upstream commit hash 2016-08-17 15:19:14 +02:00
Florian Weimer
f6288a0045 Auto-sync with upstream master.
Upstream commit ID is f79211792127f38d5954419bb3784c8eb7f5e4e5.
2016-08-11 13:42:52 +02:00
Carlos O'Donell
5344dc60e9 Bump NEVRA to 2.24.90-1. 2016-08-08 10:03:42 -04:00
Carlos O'Donell
4c8a26717a Auto-sync with upstream master. 2016-08-08 09:58:02 -04:00
Florian Weimer
b8b6a436e9 Related: #1324623
Add missing definitions to the crypt-glibc/Makefile, so that
the cryptographic tests can be built.
2016-07-22 21:37:29 +02:00
Florian Weimer
2c005c98da Do not try to install mtrace when bootstrapping 2016-07-22 17:54:35 +02:00
Florian Weimer
7ad97baa4f Resolves: #1324623
Provide libcrypt and libcrypt-nss subpackages.

glibc has a Recommends: to prefer the NSS-based implementation.
glibc-devel requires that one of the two packages is installed.
2016-07-22 17:06:37 +02:00
Florian Weimer
87b6ed77db Drop Requires(pre) on libgcc
Our scriptlets do not use pthread_cancel, and such requires are not
transitive.
2016-07-22 15:47:20 +02:00
Florian Weimer
9d1bb0abc3 Resolves: #1289356
glibc-devel depends on libgcc%{_isa}
2016-07-22 15:46:44 +02:00
Florian Weimer
d1929c8ddb Resolves: #1344830
Drop sendmsg/recvmsg compatibility patch
2016-07-21 16:16:25 +02:00
Florian Weimer
d5e9ea2361 Resolves: #1338889
Move NSS modules to subpackages

Add new file lists for the NSS modules and update the glibc and
glibc-devel file lists.  Introduce a glibc-nss-devel package
for direct linking against NSS modules (which is rare and usually
unintended).  Drop the obsoletes clause for nss_db.
2016-07-20 17:09:24 +02:00
Florian Weimer
1ca5ccee9c Resolves: #1315476
Make ldconfig and sln the same binary
2016-07-13 19:37:12 +02:00
Florian Weimer
8d10e61144 Auto-sync with upstream master
Up to commit f531f93056b34800383c5154280e7ba5112563c7.
2016-07-13 14:23:26 +02:00
Mike FABIAN
5c031d86de Resolves: #1351108
- Unicode 9.0.0 updates (ctype, charmap, transliteration)
2016-07-09 07:35:43 +02:00
Florian Weimer
0f28e7559e Resolves: #1294574
nscd breaks initgroups with nis (initgroups are empty)

Update changelog and adjust extend_alloca removal patch.
2016-07-05 19:06:22 +02:00
Florian Weimer
9a78be1808 Resolves: #1351737
glibc: strcasecmp failure on ppc64le
2016-07-05 18:40:25 +02:00
Carlos O'Donell
0ce3b29d56 Resolves: #1349906
- Properly handle more invalid --install-langs arguments (#1349906).
2016-06-24 13:51:56 -04:00
Florian Weimer
22e8257c2d Related: #1344480
Fix RPM changelog.
2016-06-21 21:52:48 +02:00
Florian Weimer
d21f299cb3 Resolves: #1348620, #1344480, #1346070
Sync with upstream master, commit a3b473373ee43a292f5ec68a7fda6b9cfb26a9b0
2016-06-21 21:50:42 +02:00
Carlos O'Donell
1bbad64354 Use scriptlet expansion.
We prefer scriptlet expansion (-e) over the use of rpm.expand in Lua.
The goal is to have a fully expanded Lua program with as little
dynamic processing as possible to simplify the operations carried
out in Lua.

The use of rpm.expand was only needed until COPR migrated from EL6
to Fedora, and with this complete we can remove the use of rpm.expand
in favour of scriptlet expansion.

Tested on Fedora Rawhide by verifying global setting of %_install_langs
macro changes installed locale-archive locales correctly.
2016-06-18 17:20:10 -04:00
Florian Weimer
c27c24530c Related: #1344830
Drop sendmmsg/recvmmsg compat symbols on 32-bit architectures.  For
some reason, these architectures only have compat symbols for
sendmsg and recvmsg.
2016-06-13 06:30:30 +02:00
Florian Weimer
cb62ee1f81 Related: #579086
Revert fix for “Preloading a replacement uname is causing environment
to be cleaned if libpthread is loaded”.  UTS namespaces should now
offer a cleaner way yo do this.
2016-06-13 06:26:14 +02:00
Florian Weimer
34a28994be Related: #1344830
First phase of sendmsg/recvmsg/sendmmsg/recvmmsg ABI revert:
GLIBC_2.24 compatibility symbols.

This should allow us to run old binaries (with the GLIBC_2.24 symbols)
while rebuild packages to use the old ABI again.
2016-06-12 22:42:00 +02:00
Florian Weimer
c8064eb721 Auto-sync with upstream master
Resolves: #1344480
  (Crash in the nss_db NSS service module during iteration.)
Add the eo locale as a first-class citizen.
2016-06-12 22:41:55 +02:00
Florian Weimer
1aca2e1ec1 Related: #1342976
Retroactively update changelog to record fixed bug.
2016-06-11 13:39:48 +02:00
Florian Weimer
d3f78ebc81 Auto-sync with upstream master. 2016-06-09 12:22:07 +02:00
Florian Weimer
d4be8589c3 Log df output as part of system information 2016-06-01 08:44:30 +02:00
Florian Weimer
5872287fa1 Resolves: #1338887
Do not disable assertions in release builds
2016-06-01 08:31:31 +02:00
Florian Weimer
db9848cdc3 Sync with upstream master branch
Resolves #1326903, #1337140.
2016-06-01 08:30:29 +02:00
Carlos O'Donell
15922d5c07 glibc-2.23.90-18
- Move support for building GCC 2.96 into compat-gcc-296.
2016-05-11 16:21:02 -04:00
Florian Weimer
6a2d7264b4 Resolves: #1335011
Revert dlsym (RTLD_NEXT)/dlerror change, to unbreak ASAN
2016-05-11 16:10:58 +02:00
Florian Weimer
a92e3b7488 Expand comments about the separate SUPPORTED file 2016-05-09 20:43:58 +02:00
Florian Weimer
48c31c2f62 Drop broken attempt at fix for #1326903 2016-05-09 17:18:54 +02:00
Florian Weimer
3585735339 Resolves: #1326903
Experimental fix for NULL fork/vfork symbols in libpthread
2016-05-09 14:23:15 +02:00
Florian Weimer
f3507c9c60 Remove unapplied patches 2016-05-09 14:19:32 +02:00
Florian Weimer
43e96b9dec Use diff instead of cmp for the SUPPORTED file check 2016-05-09 13:48:03 +02:00
Florian Weimer
ddd7733205 Auto-sync with upstream master
Drop glibc-nsswitch-Add-group-merging-support.patch, applied upstream.
Drop glibc-rh1252570.patch, alternative fixes applied upstream.
Adjust glibc-rh1315108.patch to minor upstream change.
Update SUPPORTED file.
2016-05-09 13:47:51 +02:00
Carlos O'Donell
4f51555190 glibc-2.23.90-14
- Require libselinux for nscd in non-bootstrap configuration.
2016-05-03 15:51:17 -04:00
Carlos O'Donell
790a04974b Update gen-quilt-series script. 2016-04-29 23:11:30 -04:00
Carlos O'Donell
fe4ad2a06e Auto-sync with upstream master. 2016-04-29 23:08:42 -04:00
Carlos O'Donell
cfdb093a22 Remove quilt series file. 2016-04-29 21:25:52 -04:00
Carlos O'Donell
256beb3f45 glibc-2.23.90-12
- Move spec file system information logging to the build stage.
2016-04-28 15:59:56 -04:00
Florian Weimer
4ac7c7b403 Auto-sync with upstream master 2016-04-14 22:49:32 +02:00
Florian Weimer
85759f3e8d Auto-sync with upstream master 2016-04-14 12:59:40 +02:00
Florian Weimer
34d510b5de Auto-sync with upstream master
This removes the type union wait from the installed headers.
Update the SUPPORTED file with upstream changes
2016-04-14 10:00:03 +02:00
Florian Weimer
ec0dd75135 Auto-sync with upstream master 2016-04-08 16:21:37 +02:00
Florian Weimer
887080ee79 Auto-sync with upstream master 2016-03-29 13:04:25 +02:00
Carlos O'Donell
1ffb3d6c4c glibc-2.23.90-6
- Use 'an' as language abbreviation for an_ES.
2016-03-16 02:38:44 -04:00
Carlos O'Donell
e5c3314947 Update sync-upstream.sh.
- Add support for production vs. development.
- Add support for descriptive branch names.
- Fix error message to be more accurate if you ctrl^c out of build.
2016-03-07 12:07:04 -05:00
Carlos O'Donell
99a6d4df1b Auto-sync with upstream master. 2016-03-07 11:47:23 -05:00
Florian Weimer
9fce0748c4 Resolves: #1315108
Remove extend_alloca.
2016-03-07 06:52:27 +01:00
Carlos O'Donell
f2d40207ea glibc-2.23.90-3
- Enhance support for upgrading from a non-language-pack system.
2016-03-01 02:59:24 -05:00
Carlos O'Donell
9edc2b688b Create new language packages for all supported languages.
Locales, translations, and locale sources are split into
distinct sub-packages. A meta-package is created for users
to install all languages. Transparent installation support
is provided via dnf langpacks.
2016-02-26 01:06:35 -08:00
Carlos O'Donell
b359bd04bb Upstream development version is now 2.23.90. 2016-02-26 00:36:28 -05:00
Carlos O'Donell
dd72bee11f Sync with upstream master after 2.23 branch.
- Drop glibc-CVE-2015-7547.patch, glibc-isinf-cxx11.patch
  and glibc-rh1114591.patch since they are all upstream.
2016-02-25 15:48:36 -05:00
66 changed files with 4603 additions and 10260 deletions

7
.gitignore vendored
View File

@ -1 +1,6 @@
/glibc-2.22-719-g1233be7.tar.gz # Release tarballs.
/glibc-*.tar.[gx]z
# Generated (source) RPMs.
/*.rpm
# Expanded source trees.
/glibc-*/

File diff suppressed because it is too large Load Diff

2
README.scripts Normal file
View File

@ -0,0 +1,2 @@
All of the useful glibc maintainer scripts are located at:
https://pagure.io/glibc-maintainer-scripts

494
SUPPORTED Normal file
View File

@ -0,0 +1,494 @@
# This file names the currently supported and somewhat tested locales.
# If you have any additions please file a glibc bug report.
SUPPORTED-LOCALES=\
C.UTF-8/UTF-8 \
aa_DJ.UTF-8/UTF-8 \
aa_DJ/ISO-8859-1 \
aa_ER/UTF-8 \
aa_ER@saaho/UTF-8 \
aa_ET/UTF-8 \
af_ZA.UTF-8/UTF-8 \
af_ZA/ISO-8859-1 \
agr_PE/UTF-8 \
ak_GH/UTF-8 \
am_ET/UTF-8 \
an_ES.UTF-8/UTF-8 \
an_ES/ISO-8859-15 \
anp_IN/UTF-8 \
ar_AE.UTF-8/UTF-8 \
ar_AE/ISO-8859-6 \
ar_BH.UTF-8/UTF-8 \
ar_BH/ISO-8859-6 \
ar_DZ.UTF-8/UTF-8 \
ar_DZ/ISO-8859-6 \
ar_EG.UTF-8/UTF-8 \
ar_EG/ISO-8859-6 \
ar_IN/UTF-8 \
ar_IQ.UTF-8/UTF-8 \
ar_IQ/ISO-8859-6 \
ar_JO.UTF-8/UTF-8 \
ar_JO/ISO-8859-6 \
ar_KW.UTF-8/UTF-8 \
ar_KW/ISO-8859-6 \
ar_LB.UTF-8/UTF-8 \
ar_LB/ISO-8859-6 \
ar_LY.UTF-8/UTF-8 \
ar_LY/ISO-8859-6 \
ar_MA.UTF-8/UTF-8 \
ar_MA/ISO-8859-6 \
ar_OM.UTF-8/UTF-8 \
ar_OM/ISO-8859-6 \
ar_QA.UTF-8/UTF-8 \
ar_QA/ISO-8859-6 \
ar_SA.UTF-8/UTF-8 \
ar_SA/ISO-8859-6 \
ar_SD.UTF-8/UTF-8 \
ar_SD/ISO-8859-6 \
ar_SS/UTF-8 \
ar_SY.UTF-8/UTF-8 \
ar_SY/ISO-8859-6 \
ar_TN.UTF-8/UTF-8 \
ar_TN/ISO-8859-6 \
ar_YE.UTF-8/UTF-8 \
ar_YE/ISO-8859-6 \
ayc_PE/UTF-8 \
az_AZ/UTF-8 \
az_IR/UTF-8 \
as_IN/UTF-8 \
ast_ES.UTF-8/UTF-8 \
ast_ES/ISO-8859-15 \
be_BY.UTF-8/UTF-8 \
be_BY/CP1251 \
be_BY@latin/UTF-8 \
bem_ZM/UTF-8 \
ber_DZ/UTF-8 \
ber_MA/UTF-8 \
bg_BG.UTF-8/UTF-8 \
bg_BG/CP1251 \
bhb_IN.UTF-8/UTF-8 \
bho_IN/UTF-8 \
bho_NP/UTF-8 \
bi_VU/UTF-8 \
bn_BD/UTF-8 \
bn_IN/UTF-8 \
bo_CN/UTF-8 \
bo_IN/UTF-8 \
br_FR.UTF-8/UTF-8 \
br_FR/ISO-8859-1 \
br_FR@euro/ISO-8859-15 \
brx_IN/UTF-8 \
bs_BA.UTF-8/UTF-8 \
bs_BA/ISO-8859-2 \
byn_ER/UTF-8 \
ca_AD.UTF-8/UTF-8 \
ca_AD/ISO-8859-15 \
ca_ES.UTF-8/UTF-8 \
ca_ES/ISO-8859-1 \
ca_ES@euro/ISO-8859-15 \
ca_ES@valencia/UTF-8 \
ca_FR.UTF-8/UTF-8 \
ca_FR/ISO-8859-15 \
ca_IT.UTF-8/UTF-8 \
ca_IT/ISO-8859-15 \
ce_RU/UTF-8 \
chr_US/UTF-8 \
cmn_TW/UTF-8 \
crh_UA/UTF-8 \
cs_CZ.UTF-8/UTF-8 \
cs_CZ/ISO-8859-2 \
csb_PL/UTF-8 \
cv_RU/UTF-8 \
cy_GB.UTF-8/UTF-8 \
cy_GB/ISO-8859-14 \
da_DK.UTF-8/UTF-8 \
da_DK/ISO-8859-1 \
da_DK.ISO-8859-15/ISO-8859-15 \
de_AT.UTF-8/UTF-8 \
de_AT/ISO-8859-1 \
de_AT@euro/ISO-8859-15 \
de_BE.UTF-8/UTF-8 \
de_BE/ISO-8859-1 \
de_BE@euro/ISO-8859-15 \
de_CH.UTF-8/UTF-8 \
de_CH/ISO-8859-1 \
de_DE.UTF-8/UTF-8 \
de_DE/ISO-8859-1 \
de_DE@euro/ISO-8859-15 \
de_IT.UTF-8/UTF-8 \
de_IT/ISO-8859-1 \
de_LI.UTF-8/UTF-8 \
de_LU.UTF-8/UTF-8 \
de_LU/ISO-8859-1 \
de_LU@euro/ISO-8859-15 \
doi_IN/UTF-8 \
dsb_DE/UTF-8 \
dv_MV/UTF-8 \
dz_BT/UTF-8 \
el_GR.UTF-8/UTF-8 \
el_GR/ISO-8859-7 \
el_GR@euro/ISO-8859-7 \
el_CY.UTF-8/UTF-8 \
el_CY/ISO-8859-7 \
en_AG/UTF-8 \
en_AU.UTF-8/UTF-8 \
en_AU/ISO-8859-1 \
en_BW.UTF-8/UTF-8 \
en_BW/ISO-8859-1 \
en_CA.UTF-8/UTF-8 \
en_CA/ISO-8859-1 \
en_DK.UTF-8/UTF-8 \
en_DK/ISO-8859-1 \
en_GB.UTF-8/UTF-8 \
en_GB/ISO-8859-1 \
en_GB.ISO-8859-15/ISO-8859-15 \
en_HK.UTF-8/UTF-8 \
en_HK/ISO-8859-1 \
en_IE.UTF-8/UTF-8 \
en_IE/ISO-8859-1 \
en_IE@euro/ISO-8859-15 \
en_IL/UTF-8 \
en_IN/UTF-8 \
en_NG/UTF-8 \
en_NZ.UTF-8/UTF-8 \
en_NZ/ISO-8859-1 \
en_PH.UTF-8/UTF-8 \
en_PH/ISO-8859-1 \
en_SC.UTF-8/UTF-8 \
en_SG.UTF-8/UTF-8 \
en_SG/ISO-8859-1 \
en_US.UTF-8/UTF-8 \
en_US/ISO-8859-1 \
en_US.ISO-8859-15/ISO-8859-15 \
en_ZA.UTF-8/UTF-8 \
en_ZA/ISO-8859-1 \
en_ZM/UTF-8 \
en_ZW.UTF-8/UTF-8 \
en_ZW/ISO-8859-1 \
eo/UTF-8 \
es_AR.UTF-8/UTF-8 \
es_AR/ISO-8859-1 \
es_BO.UTF-8/UTF-8 \
es_BO/ISO-8859-1 \
es_CL.UTF-8/UTF-8 \
es_CL/ISO-8859-1 \
es_CO.UTF-8/UTF-8 \
es_CO/ISO-8859-1 \
es_CR.UTF-8/UTF-8 \
es_CR/ISO-8859-1 \
es_CU/UTF-8 \
es_DO.UTF-8/UTF-8 \
es_DO/ISO-8859-1 \
es_EC.UTF-8/UTF-8 \
es_EC/ISO-8859-1 \
es_ES.UTF-8/UTF-8 \
es_ES/ISO-8859-1 \
es_ES@euro/ISO-8859-15 \
es_GT.UTF-8/UTF-8 \
es_GT/ISO-8859-1 \
es_HN.UTF-8/UTF-8 \
es_HN/ISO-8859-1 \
es_MX.UTF-8/UTF-8 \
es_MX/ISO-8859-1 \
es_NI.UTF-8/UTF-8 \
es_NI/ISO-8859-1 \
es_PA.UTF-8/UTF-8 \
es_PA/ISO-8859-1 \
es_PE.UTF-8/UTF-8 \
es_PE/ISO-8859-1 \
es_PR.UTF-8/UTF-8 \
es_PR/ISO-8859-1 \
es_PY.UTF-8/UTF-8 \
es_PY/ISO-8859-1 \
es_SV.UTF-8/UTF-8 \
es_SV/ISO-8859-1 \
es_US.UTF-8/UTF-8 \
es_US/ISO-8859-1 \
es_UY.UTF-8/UTF-8 \
es_UY/ISO-8859-1 \
es_VE.UTF-8/UTF-8 \
es_VE/ISO-8859-1 \
et_EE.UTF-8/UTF-8 \
et_EE/ISO-8859-1 \
et_EE.ISO-8859-15/ISO-8859-15 \
eu_ES.UTF-8/UTF-8 \
eu_ES/ISO-8859-1 \
eu_ES@euro/ISO-8859-15 \
fa_IR/UTF-8 \
ff_SN/UTF-8 \
fi_FI.UTF-8/UTF-8 \
fi_FI/ISO-8859-1 \
fi_FI@euro/ISO-8859-15 \
fil_PH/UTF-8 \
fo_FO.UTF-8/UTF-8 \
fo_FO/ISO-8859-1 \
fr_BE.UTF-8/UTF-8 \
fr_BE/ISO-8859-1 \
fr_BE@euro/ISO-8859-15 \
fr_CA.UTF-8/UTF-8 \
fr_CA/ISO-8859-1 \
fr_CH.UTF-8/UTF-8 \
fr_CH/ISO-8859-1 \
fr_FR.UTF-8/UTF-8 \
fr_FR/ISO-8859-1 \
fr_FR@euro/ISO-8859-15 \
fr_LU.UTF-8/UTF-8 \
fr_LU/ISO-8859-1 \
fr_LU@euro/ISO-8859-15 \
fur_IT/UTF-8 \
fy_NL/UTF-8 \
fy_DE/UTF-8 \
ga_IE.UTF-8/UTF-8 \
ga_IE/ISO-8859-1 \
ga_IE@euro/ISO-8859-15 \
gd_GB.UTF-8/UTF-8 \
gd_GB/ISO-8859-15 \
gez_ER/UTF-8 \
gez_ER@abegede/UTF-8 \
gez_ET/UTF-8 \
gez_ET@abegede/UTF-8 \
gl_ES.UTF-8/UTF-8 \
gl_ES/ISO-8859-1 \
gl_ES@euro/ISO-8859-15 \
gu_IN/UTF-8 \
gv_GB.UTF-8/UTF-8 \
gv_GB/ISO-8859-1 \
ha_NG/UTF-8 \
hak_TW/UTF-8 \
he_IL.UTF-8/UTF-8 \
he_IL/ISO-8859-8 \
hi_IN/UTF-8 \
hif_FJ/UTF-8 \
hne_IN/UTF-8 \
hr_HR.UTF-8/UTF-8 \
hr_HR/ISO-8859-2 \
hsb_DE/ISO-8859-2 \
hsb_DE.UTF-8/UTF-8 \
ht_HT/UTF-8 \
hu_HU.UTF-8/UTF-8 \
hu_HU/ISO-8859-2 \
hy_AM/UTF-8 \
hy_AM.ARMSCII-8/ARMSCII-8 \
ia_FR/UTF-8 \
id_ID.UTF-8/UTF-8 \
id_ID/ISO-8859-1 \
ig_NG/UTF-8 \
ik_CA/UTF-8 \
is_IS.UTF-8/UTF-8 \
is_IS/ISO-8859-1 \
it_CH.UTF-8/UTF-8 \
it_CH/ISO-8859-1 \
it_IT.UTF-8/UTF-8 \
it_IT/ISO-8859-1 \
it_IT@euro/ISO-8859-15 \
iu_CA/UTF-8 \
ja_JP.EUC-JP/EUC-JP \
ja_JP.UTF-8/UTF-8 \
ka_GE.UTF-8/UTF-8 \
ka_GE/GEORGIAN-PS \
kab_DZ/UTF-8 \
kk_KZ.UTF-8/UTF-8 \
kk_KZ/PT154 \
kl_GL.UTF-8/UTF-8 \
kl_GL/ISO-8859-1 \
km_KH/UTF-8 \
kn_IN/UTF-8 \
ko_KR.EUC-KR/EUC-KR \
ko_KR.UTF-8/UTF-8 \
kok_IN/UTF-8 \
ks_IN/UTF-8 \
ks_IN@devanagari/UTF-8 \
ku_TR.UTF-8/UTF-8 \
ku_TR/ISO-8859-9 \
kw_GB.UTF-8/UTF-8 \
kw_GB/ISO-8859-1 \
ky_KG/UTF-8 \
lb_LU/UTF-8 \
lg_UG.UTF-8/UTF-8 \
lg_UG/ISO-8859-10 \
li_BE/UTF-8 \
li_NL/UTF-8 \
lij_IT/UTF-8 \
ln_CD/UTF-8 \
lo_LA/UTF-8 \
lt_LT.UTF-8/UTF-8 \
lt_LT/ISO-8859-13 \
lv_LV.UTF-8/UTF-8 \
lv_LV/ISO-8859-13 \
lzh_TW/UTF-8 \
mag_IN/UTF-8 \
mai_IN/UTF-8 \
mai_NP/UTF-8 \
mfe_MU/UTF-8 \
mg_MG.UTF-8/UTF-8 \
mg_MG/ISO-8859-15 \
mhr_RU/UTF-8 \
mi_NZ.UTF-8/UTF-8 \
mi_NZ/ISO-8859-13 \
miq_NI/UTF-8 \
mjw_IN/UTF-8 \
mk_MK.UTF-8/UTF-8 \
mk_MK/ISO-8859-5 \
ml_IN/UTF-8 \
mn_MN/UTF-8 \
mni_IN/UTF-8 \
mr_IN/UTF-8 \
ms_MY.UTF-8/UTF-8 \
ms_MY/ISO-8859-1 \
mt_MT.UTF-8/UTF-8 \
mt_MT/ISO-8859-3 \
my_MM/UTF-8 \
nan_TW/UTF-8 \
nan_TW@latin/UTF-8 \
nb_NO.UTF-8/UTF-8 \
nb_NO/ISO-8859-1 \
nds_DE/UTF-8 \
nds_NL/UTF-8 \
ne_NP/UTF-8 \
nhn_MX/UTF-8 \
niu_NU/UTF-8 \
niu_NZ/UTF-8 \
nl_AW/UTF-8 \
nl_BE.UTF-8/UTF-8 \
nl_BE/ISO-8859-1 \
nl_BE@euro/ISO-8859-15 \
nl_NL.UTF-8/UTF-8 \
nl_NL/ISO-8859-1 \
nl_NL@euro/ISO-8859-15 \
nn_NO.UTF-8/UTF-8 \
nn_NO/ISO-8859-1 \
nr_ZA/UTF-8 \
nso_ZA/UTF-8 \
oc_FR.UTF-8/UTF-8 \
oc_FR/ISO-8859-1 \
om_ET/UTF-8 \
om_KE.UTF-8/UTF-8 \
om_KE/ISO-8859-1 \
or_IN/UTF-8 \
os_RU/UTF-8 \
pa_IN/UTF-8 \
pa_PK/UTF-8 \
pap_AW/UTF-8 \
pap_CW/UTF-8 \
pl_PL.UTF-8/UTF-8 \
pl_PL/ISO-8859-2 \
ps_AF/UTF-8 \
pt_BR.UTF-8/UTF-8 \
pt_BR/ISO-8859-1 \
pt_PT.UTF-8/UTF-8 \
pt_PT/ISO-8859-1 \
pt_PT@euro/ISO-8859-15 \
quz_PE/UTF-8 \
raj_IN/UTF-8 \
ro_RO.UTF-8/UTF-8 \
ro_RO/ISO-8859-2 \
ru_RU.KOI8-R/KOI8-R \
ru_RU.UTF-8/UTF-8 \
ru_RU/ISO-8859-5 \
ru_UA.UTF-8/UTF-8 \
ru_UA/KOI8-U \
rw_RW/UTF-8 \
sa_IN/UTF-8 \
sah_RU/UTF-8 \
sat_IN/UTF-8 \
sc_IT/UTF-8 \
sd_IN/UTF-8 \
sd_IN@devanagari/UTF-8 \
se_NO/UTF-8 \
sgs_LT/UTF-8 \
shn_MM/UTF-8 \
shs_CA/UTF-8 \
si_LK/UTF-8 \
sid_ET/UTF-8 \
sk_SK.UTF-8/UTF-8 \
sk_SK/ISO-8859-2 \
sl_SI.UTF-8/UTF-8 \
sl_SI/ISO-8859-2 \
sm_WS/UTF-8 \
so_DJ.UTF-8/UTF-8 \
so_DJ/ISO-8859-1 \
so_ET/UTF-8 \
so_KE.UTF-8/UTF-8 \
so_KE/ISO-8859-1 \
so_SO.UTF-8/UTF-8 \
so_SO/ISO-8859-1 \
sq_AL.UTF-8/UTF-8 \
sq_AL/ISO-8859-1 \
sq_MK/UTF-8 \
sr_ME/UTF-8 \
sr_RS/UTF-8 \
sr_RS@latin/UTF-8 \
ss_ZA/UTF-8 \
st_ZA.UTF-8/UTF-8 \
st_ZA/ISO-8859-1 \
sv_FI.UTF-8/UTF-8 \
sv_FI/ISO-8859-1 \
sv_FI@euro/ISO-8859-15 \
sv_SE.UTF-8/UTF-8 \
sv_SE/ISO-8859-1 \
sv_SE.ISO-8859-15/ISO-8859-15 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
szl_PL/UTF-8 \
ta_IN/UTF-8 \
ta_LK/UTF-8 \
tcy_IN.UTF-8/UTF-8 \
te_IN/UTF-8 \
tg_TJ.UTF-8/UTF-8 \
tg_TJ/KOI8-T \
th_TH.UTF-8/UTF-8 \
th_TH/TIS-620 \
the_NP/UTF-8 \
ti_ER/UTF-8 \
ti_ET/UTF-8 \
tig_ER/UTF-8 \
tk_TM/UTF-8 \
tl_PH.UTF-8/UTF-8 \
tl_PH/ISO-8859-1 \
tn_ZA/UTF-8 \
to_TO/UTF-8 \
tpi_PG/UTF-8 \
tr_CY.UTF-8/UTF-8 \
tr_CY/ISO-8859-9 \
tr_TR.UTF-8/UTF-8 \
tr_TR/ISO-8859-9 \
ts_ZA/UTF-8 \
tt_RU/UTF-8 \
tt_RU@iqtelif/UTF-8 \
ug_CN/UTF-8 \
uk_UA.UTF-8/UTF-8 \
uk_UA/KOI8-U \
unm_US/UTF-8 \
ur_IN/UTF-8 \
ur_PK/UTF-8 \
uz_UZ.UTF-8/UTF-8 \
uz_UZ/ISO-8859-1 \
uz_UZ@cyrillic/UTF-8 \
ve_ZA/UTF-8 \
vi_VN/UTF-8 \
wa_BE/ISO-8859-1 \
wa_BE@euro/ISO-8859-15 \
wa_BE.UTF-8/UTF-8 \
wae_CH/UTF-8 \
wal_ET/UTF-8 \
wo_SN/UTF-8 \
xh_ZA.UTF-8/UTF-8 \
xh_ZA/ISO-8859-1 \
yi_US.UTF-8/UTF-8 \
yi_US/CP1255 \
yo_NG/UTF-8 \
yue_HK/UTF-8 \
yuw_PG/UTF-8 \
zh_CN.GB18030/GB18030 \
zh_CN.GBK/GBK \
zh_CN.UTF-8/UTF-8 \
zh_CN/GB2312 \
zh_HK.UTF-8/UTF-8 \
zh_HK/BIG5-HKSCS \
zh_SG.UTF-8/UTF-8 \
zh_SG.GBK/GBK \
zh_SG/GB2312 \
zh_TW.EUC-TW/EUC-TW \
zh_TW.UTF-8/UTF-8 \
zh_TW/BIG5 \
zu_ZA.UTF-8/UTF-8 \
zu_ZA/ISO-8859-1 \

View File

@ -1,857 +0,0 @@
#define _GNU_SOURCE
#include <assert.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "../locale/hashval.h"
#define __LC_LAST 13
#include "../locale/locarchive.h"
#include "../crypt/md5.h"
const char *alias_file = DATADIR "/locale/locale.alias";
const char *locar_file = PREFIX "/lib/locale/locale-archive";
const char *tmpl_file = PREFIX "/lib/locale/locale-archive.tmpl";
const char *loc_path = PREFIX "/lib/locale/";
/* Flags set by `--verbose` option. */
int be_quiet = 1;
int verbose = 0;
int max_locarchive_open_retry = 10;
const char *output_prefix;
/* Endianness should have been taken care of by localedef. We don't need to do
additional swapping. We need this variable exported however, since
locarchive.c uses it to determine if it needs to swap endianness of a value
before writing to or reading from the archive. */
bool swap_endianness_p = false;
static const char *locnames[] =
{
#define DEFINE_CATEGORY(category, category_name, items, a) \
[category] = category_name,
#include "../locale/categories.def"
#undef DEFINE_CATEGORY
};
static int
is_prime (unsigned long candidate)
{
/* No even number and none less than 10 will be passed here. */
unsigned long int divn = 3;
unsigned long int sq = divn * divn;
while (sq < candidate && candidate % divn != 0)
{
++divn;
sq += 4 * divn;
++divn;
}
return candidate % divn != 0;
}
unsigned long
next_prime (unsigned long seed)
{
/* Make it definitely odd. */
seed |= 1;
while (!is_prime (seed))
seed += 2;
return seed;
}
void
error (int status, int errnum, const char *message, ...)
{
va_list args;
va_start (args, message);
fflush (stdout);
fprintf (stderr, "%s: ", program_invocation_name);
vfprintf (stderr, message, args);
va_end (args);
if (errnum)
fprintf (stderr, ": %s", strerror (errnum));
putc ('\n', stderr);
fflush (stderr);
if (status)
exit (errnum == EROFS ? 0 : status);
}
void *
xmalloc (size_t size)
{
void *p = malloc (size);
if (p == NULL)
error (EXIT_FAILURE, errno, "could not allocate %zd bytes of memory", size);
return p;
}
static void
open_tmpl_archive (struct locarhandle *ah)
{
struct stat64 st;
int fd;
struct locarhead head;
const char *archivefname = ah->fname == NULL ? tmpl_file : ah->fname;
/* Open the archive. We must have exclusive write access. */
fd = open64 (archivefname, O_RDONLY);
if (fd == -1)
error (EXIT_FAILURE, errno, "cannot open locale archive template file \"%s\"",
archivefname);
if (fstat64 (fd, &st) < 0)
error (EXIT_FAILURE, errno, "cannot stat locale archive template file \"%s\"",
archivefname);
/* Read the header. */
if (TEMP_FAILURE_RETRY (read (fd, &head, sizeof (head))) != sizeof (head))
error (EXIT_FAILURE, errno, "cannot read archive header");
ah->fd = fd;
ah->mmaped = (head.sumhash_offset
+ head.sumhash_size * sizeof (struct sumhashent));
if (ah->mmaped > (unsigned long) st.st_size)
error (EXIT_FAILURE, 0, "locale archive template file truncated");
ah->mmaped = st.st_size;
ah->reserved = st.st_size;
/* Now we know how large the administrative information part is.
Map all of it. */
ah->addr = mmap64 (NULL, ah->mmaped, PROT_READ, MAP_SHARED, fd, 0);
if (ah->addr == MAP_FAILED)
error (EXIT_FAILURE, errno, "cannot map archive header");
}
/* Open the locale archive. */
extern void open_archive (struct locarhandle *ah, bool readonly);
/* Close the locale archive. */
extern void close_archive (struct locarhandle *ah);
/* Add given locale data to the archive. */
extern int add_locale_to_archive (struct locarhandle *ah, const char *name,
locale_data_t data, bool replace);
extern void add_alias (struct locarhandle *ah, const char *alias,
bool replace, const char *oldname,
uint32_t *locrec_offset_p);
extern struct namehashent *
insert_name (struct locarhandle *ah,
const char *name, size_t name_len, bool replace);
struct nameent
{
char *name;
struct locrecent *locrec;
};
struct dataent
{
const unsigned char *sum;
uint32_t file_offset;
};
static int
nameentcmp (const void *a, const void *b)
{
struct locrecent *la = ((const struct nameent *) a)->locrec;
struct locrecent *lb = ((const struct nameent *) b)->locrec;
uint32_t start_a = -1, end_a = 0;
uint32_t start_b = -1, end_b = 0;
int cnt;
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
{
if (la->record[cnt].offset < start_a)
start_a = la->record[cnt].offset;
if (la->record[cnt].offset + la->record[cnt].len > end_a)
end_a = la->record[cnt].offset + la->record[cnt].len;
}
assert (start_a != (uint32_t)-1);
assert (end_a != 0);
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
{
if (lb->record[cnt].offset < start_b)
start_b = lb->record[cnt].offset;
if (lb->record[cnt].offset + lb->record[cnt].len > end_b)
end_b = lb->record[cnt].offset + lb->record[cnt].len;
}
assert (start_b != (uint32_t)-1);
assert (end_b != 0);
if (start_a != start_b)
return (int)start_a - (int)start_b;
return (int)end_a - (int)end_b;
}
static int
dataentcmp (const void *a, const void *b)
{
if (((const struct dataent *) a)->file_offset
< ((const struct dataent *) b)->file_offset)
return -1;
if (((const struct dataent *) a)->file_offset
> ((const struct dataent *) b)->file_offset)
return 1;
return 0;
}
static int
sumsearchfn (const void *key, const void *ent)
{
uint32_t keyn = *(uint32_t *)key;
uint32_t entn = ((struct dataent *)ent)->file_offset;
if (keyn < entn)
return -1;
if (keyn > entn)
return 1;
return 0;
}
static void
compute_data (struct locarhandle *ah, struct nameent *name, size_t sumused,
struct dataent *files, locale_data_t data)
{
int cnt;
struct locrecent *locrec = name->locrec;
struct dataent *file;
data[LC_ALL].addr = ((char *) ah->addr) + locrec->record[LC_ALL].offset;
data[LC_ALL].size = locrec->record[LC_ALL].len;
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
{
data[cnt].addr = ((char *) ah->addr) + locrec->record[cnt].offset;
data[cnt].size = locrec->record[cnt].len;
if (data[cnt].addr >= data[LC_ALL].addr
&& data[cnt].addr + data[cnt].size
<= data[LC_ALL].addr + data[LC_ALL].size)
__md5_buffer (data[cnt].addr, data[cnt].size, data[cnt].sum);
else
{
file = bsearch (&locrec->record[cnt].offset, files, sumused,
sizeof (*files), sumsearchfn);
if (file == NULL)
error (EXIT_FAILURE, 0, "inconsistent template file");
memcpy (data[cnt].sum, file->sum, sizeof (data[cnt].sum));
}
}
}
static int
fill_archive (struct locarhandle *tmpl_ah,
const char *fname,
size_t install_langs_count, char *install_langs_list[],
size_t nlist, char *list[],
const char *primary)
{
struct locarhandle ah;
struct locarhead *head;
int result = 0;
struct nameent *names;
struct namehashent *namehashtab;
size_t cnt, used;
struct dataent *files;
struct sumhashent *sumhashtab;
size_t sumused;
struct locrecent *primary_locrec = NULL;
struct nameent *primary_nameent = NULL;
head = tmpl_ah->addr;
names = (struct nameent *) malloc (head->namehash_used
* sizeof (struct nameent));
files = (struct dataent *) malloc (head->sumhash_used
* sizeof (struct dataent));
if (names == NULL || files == NULL)
error (EXIT_FAILURE, errno, "could not allocate tables");
namehashtab = (struct namehashent *) ((char *) tmpl_ah->addr
+ head->namehash_offset);
sumhashtab = (struct sumhashent *) ((char *) tmpl_ah->addr
+ head->sumhash_offset);
for (cnt = used = 0; cnt < head->namehash_size; ++cnt)
if (namehashtab[cnt].locrec_offset != 0)
{
char * name;
int i;
assert (used < head->namehash_used);
name = tmpl_ah->addr + namehashtab[cnt].name_offset;
if (install_langs_count == 0)
{
/* Always intstall the entry. */
names[used].name = name;
names[used++].locrec
= (struct locrecent *) ((char *) tmpl_ah->addr +
namehashtab[cnt].locrec_offset);
}
else
{
/* Only install the entry if the user asked for it via
--install-langs. */
for (i = 0; i < install_langs_count; i++)
{
/* Add one for "_" and one for the null terminator. */
size_t len = strlen (install_langs_list[i]) + 2;
char *install_lang = (char *)xmalloc (len);
strcpy (install_lang, install_langs_list[i]);
if (strchr (install_lang, '_') == NULL)
strcat (install_lang, "_");
if (strncmp (name, install_lang, strlen (install_lang)) == 0)
{
names[used].name = name;
names[used++].locrec
= (struct locrecent *) ((char *)tmpl_ah->addr
+ namehashtab[cnt].locrec_offset);
}
free (install_lang);
}
}
}
/* Sort the names. */
qsort (names, used, sizeof (struct nameent), nameentcmp);
for (cnt = sumused = 0; cnt < head->sumhash_size; ++cnt)
if (sumhashtab[cnt].file_offset != 0)
{
assert (sumused < head->sumhash_used);
files[sumused].sum = (const unsigned char *) sumhashtab[cnt].sum;
files[sumused++].file_offset = sumhashtab[cnt].file_offset;
}
/* Sort by file locations. */
qsort (files, sumused, sizeof (struct dataent), dataentcmp);
/* Open the archive. This call never returns if we cannot
successfully open the archive. */
ah.fname = NULL;
if (fname != NULL)
ah.fname = fname;
open_archive (&ah, false);
if (primary != NULL)
{
for (cnt = 0; cnt < used; ++cnt)
if (strcmp (names[cnt].name, primary) == 0)
break;
if (cnt < used)
{
locale_data_t data;
compute_data (tmpl_ah, &names[cnt], sumused, files, data);
result |= add_locale_to_archive (&ah, primary, data, 0);
primary_locrec = names[cnt].locrec;
primary_nameent = &names[cnt];
}
}
for (cnt = 0; cnt < used; ++cnt)
if (&names[cnt] == primary_nameent)
continue;
else if ((cnt > 0 && names[cnt - 1].locrec == names[cnt].locrec)
|| names[cnt].locrec == primary_locrec)
{
const char *oldname;
struct namehashent *namehashent;
uint32_t locrec_offset;
if (names[cnt].locrec == primary_locrec)
oldname = primary;
else
oldname = names[cnt - 1].name;
namehashent = insert_name (&ah, oldname, strlen (oldname), true);
assert (namehashent->name_offset != 0);
assert (namehashent->locrec_offset != 0);
locrec_offset = namehashent->locrec_offset;
add_alias (&ah, names[cnt].name, 0, oldname, &locrec_offset);
}
else
{
locale_data_t data;
compute_data (tmpl_ah, &names[cnt], sumused, files, data);
result |= add_locale_to_archive (&ah, names[cnt].name, data, 0);
}
while (nlist-- > 0)
{
const char *fname = *list++;
size_t fnamelen = strlen (fname);
struct stat64 st;
DIR *dirp;
struct dirent64 *d;
int seen;
locale_data_t data;
int cnt;
/* First see whether this really is a directory and whether it
contains all the require locale category files. */
if (stat64 (fname, &st) < 0)
{
error (0, 0, "stat of \"%s\" failed: %s: ignored", fname,
strerror (errno));
continue;
}
if (!S_ISDIR (st.st_mode))
{
error (0, 0, "\"%s\" is no directory; ignored", fname);
continue;
}
dirp = opendir (fname);
if (dirp == NULL)
{
error (0, 0, "cannot open directory \"%s\": %s: ignored",
fname, strerror (errno));
continue;
}
seen = 0;
while ((d = readdir64 (dirp)) != NULL)
{
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
if (strcmp (d->d_name, locnames[cnt]) == 0)
{
unsigned char d_type;
/* We have an object of the required name. If it's
a directory we have to look at a file with the
prefix "SYS_". Otherwise we have found what we
are looking for. */
#ifdef _DIRENT_HAVE_D_TYPE
d_type = d->d_type;
if (d_type != DT_REG)
#endif
{
char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
#ifdef _DIRENT_HAVE_D_TYPE
if (d_type == DT_UNKNOWN)
#endif
{
strcpy (stpcpy (stpcpy (fullname, fname), "/"),
d->d_name);
if (stat64 (fullname, &st) == -1)
/* We cannot stat the file, ignore it. */
break;
d_type = IFTODT (st.st_mode);
}
if (d_type == DT_DIR)
{
/* We have to do more tests. The file is a
directory and it therefore must contain a
regular file with the same name except a
"SYS_" prefix. */
char *t = stpcpy (stpcpy (fullname, fname), "/");
strcpy (stpcpy (stpcpy (t, d->d_name), "/SYS_"),
d->d_name);
if (stat64 (fullname, &st) == -1)
/* There is no SYS_* file or we cannot
access it. */
break;
d_type = IFTODT (st.st_mode);
}
}
/* If we found a regular file (eventually after
following a symlink) we are successful. */
if (d_type == DT_REG)
++seen;
break;
}
}
closedir (dirp);
if (seen != __LC_LAST - 1)
{
/* We don't have all locale category files. Ignore the name. */
error (0, 0, "incomplete set of locale files in \"%s\"",
fname);
continue;
}
/* Add the files to the archive. To do this we first compute
sizes and the MD5 sums of all the files. */
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
{
char fullname[fnamelen + 2 * strlen (locnames[cnt]) + 7];
int fd;
strcpy (stpcpy (stpcpy (fullname, fname), "/"), locnames[cnt]);
fd = open64 (fullname, O_RDONLY);
if (fd == -1 || fstat64 (fd, &st) == -1)
{
/* Cannot read the file. */
if (fd != -1)
close (fd);
break;
}
if (S_ISDIR (st.st_mode))
{
char *t;
close (fd);
t = stpcpy (stpcpy (fullname, fname), "/");
strcpy (stpcpy (stpcpy (t, locnames[cnt]), "/SYS_"),
locnames[cnt]);
fd = open64 (fullname, O_RDONLY);
if (fd == -1 || fstat64 (fd, &st) == -1
|| !S_ISREG (st.st_mode))
{
if (fd != -1)
close (fd);
break;
}
}
/* Map the file. */
data[cnt].addr = mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
fd, 0);
if (data[cnt].addr == MAP_FAILED)
{
/* Cannot map it. */
close (fd);
break;
}
data[cnt].size = st.st_size;
__md5_buffer (data[cnt].addr, st.st_size, data[cnt].sum);
/* We don't need the file descriptor anymore. */
close (fd);
}
if (cnt != __LC_LAST)
{
while (cnt-- > 0)
if (cnt != LC_ALL)
munmap (data[cnt].addr, data[cnt].size);
error (0, 0, "cannot read all files in \"%s\": ignored", fname);
continue;
}
result |= add_locale_to_archive (&ah, basename (fname), data, 0);
for (cnt = 0; cnt < __LC_LAST; ++cnt)
if (cnt != LC_ALL)
munmap (data[cnt].addr, data[cnt].size);
}
/* We are done. */
close_archive (&ah);
return result;
}
void usage()
{
printf ("\
Usage: build-locale-archive [OPTION]... [TEMPLATE-FILE] [ARCHIVE-FILE]\n\
Builds a locale archive from a template file.\n\
Options:\n\
-h, --help Print this usage message.\n\
-v, --verbose Verbose execution.\n\
-l, --install-langs=LIST Only include locales given in LIST into the \n\
locale archive. LIST is a colon separated list\n\
of locale prefixes, for example \"de:en:ja\".\n\
The special argument \"all\" means to install\n\
all languages and it must be present by itself.\n\
If \"all\" is present with any other language it\n\
will be treated as the name of a locale.\n\
If the --install-langs option is missing, all\n\
locales are installed. The colon separated list\n\
can contain any strings matching the beginning of\n\
locale names.\n\
If a string does not contain a \"_\", it is added.\n\
Examples:\n\
--install-langs=\"en\"\n\
installs en_US, en_US.iso88591,\n\
en_US.iso885915, en_US.utf8,\n\
en_GB ...\n\
--install-langs=\"en_US.utf8\"\n\
installs only en_US.utf8.\n\
--install-langs=\"ko\"\n\
installs ko_KR, ko_KR.euckr,\n\
ko_KR.utf8 but *not* kok_IN\n\
because \"ko\" does not contain\n\
\"_\" and it is silently added\n\
--install-langs\"ko:kok\"\n\
installs ko_KR, ko_KR.euckr,\n\
ko_KR.utf8, kok_IN, and\n\
kok_IN.utf8.\n\
--install-langs=\"POSIX\" will\n\
installs *no* locales at all\n\
because POSIX matches none of\n\
the locales. Actually, any string\n\
matching nothing will do that.\n\
POSIX and C will always be\n\
available because they are\n\
builtin.\n\
Aliases are installed as well,\n\
i.e. --install-langs=\"de\"\n\
will install not only every locale starting with\n\
\"de\" but also the aliases \"deutsch\"\n\
and and \"german\" although the latter does not\n\
start with \"de\".\n\
\n\
If the arguments TEMPLATE-FILE and ARCHIVE-FILE are not given the locations\n\
where the glibc used expects these files are used by default.\n\
");
}
int main (int argc, char *argv[])
{
char path[4096];
DIR *dirp;
struct dirent64 *d;
struct stat64 st;
char *list[16384], *primary;
char *lang;
int install_langs_count = 0;
int i;
char *install_langs_arg, *ila_start;
char **install_langs_list;
unsigned int cnt = 0;
struct locarhandle tmpl_ah;
char *new_locar_fname = NULL;
size_t loc_path_len = strlen (loc_path);
while (1)
{
int c;
static struct option long_options[] =
{
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, 'v'},
{"install-langs", required_argument, 0, 'l'},
{0, 0, 0, 0}
};
/* getopt_long stores the option index here. */
int option_index = 0;
c = getopt_long (argc, argv, "vhl:",
long_options, &option_index);
/* Detect the end of the options. */
if (c == -1)
break;
switch (c)
{
case 0:
printf ("unknown option %s", long_options[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
usage ();
exit (1);
case 'v':
verbose = 1;
be_quiet = 0;
break;
case 'h':
usage ();
exit (0);
case 'l':
install_langs_arg = ila_start = strdup (optarg);
/* If the argument to --install-lang is "all", do
not limit the list of languages to install and install
them all. We do not support installing a single locale
called "all". */
#define MAGIC_INSTALL_ALL "all"
if (install_langs_arg != NULL
&& install_langs_arg[0] != '\0'
&& !(strncmp(install_langs_arg, MAGIC_INSTALL_ALL,
strlen(MAGIC_INSTALL_ALL)) == 0
&& strlen (install_langs_arg) == 3))
{
/* Count the number of languages we will install. */
while (true)
{
lang = strtok(install_langs_arg, ":;,");
if (lang == NULL)
break;
install_langs_count++;
install_langs_arg = NULL;
}
free (ila_start);
/* Copy the list. */
install_langs_list = (char **)xmalloc (sizeof(char *) * install_langs_count);
install_langs_arg = ila_start = strdup (optarg);
install_langs_count = 0;
while (true)
{
lang = strtok(install_langs_arg, ":;,");
if (lang == NULL)
break;
install_langs_list[install_langs_count] = lang;
install_langs_count++;
install_langs_arg = NULL;
}
}
break;
case '?':
/* getopt_long already printed an error message. */
usage ();
exit (0);
default:
abort ();
}
}
tmpl_ah.fname = NULL;
if (optind < argc)
tmpl_ah.fname = argv[optind];
if (optind + 1 < argc)
new_locar_fname = argv[optind + 1];
if (verbose)
{
if (tmpl_ah.fname)
printf("input archive file specified on command line: %s\n",
tmpl_ah.fname);
else
printf("using default input archive file.\n");
if (new_locar_fname)
printf("output archive file specified on command line: %s\n",
new_locar_fname);
else
printf("using default output archive file.\n");
}
dirp = opendir (loc_path);
if (dirp == NULL)
error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path);
open_tmpl_archive (&tmpl_ah);
if (new_locar_fname)
unlink (new_locar_fname);
else
unlink (locar_file);
primary = getenv ("LC_ALL");
if (primary == NULL)
primary = getenv ("LANG");
if (primary != NULL)
{
if (strncmp (primary, "ja", 2) != 0
&& strncmp (primary, "ko", 2) != 0
&& strncmp (primary, "zh", 2) != 0)
{
char *ptr = malloc (strlen (primary) + strlen (".utf8") + 1), *p, *q;
/* This leads to invalid locales sometimes:
de_DE.iso885915@euro -> de_DE.utf8@euro */
if (ptr != NULL)
{
p = ptr;
q = primary;
while (*q && *q != '.' && *q != '@')
*p++ = *q++;
if (*q == '.')
while (*q && *q != '@')
q++;
p = stpcpy (p, ".utf8");
strcpy (p, q);
primary = ptr;
}
else
primary = NULL;
}
}
memcpy (path, loc_path, loc_path_len);
while ((d = readdir64 (dirp)) != NULL)
{
if (strcmp (d->d_name, ".") == 0 || strcmp (d->d_name, "..") == 0)
continue;
if (strchr (d->d_name, '_') == NULL)
continue;
size_t d_name_len = strlen (d->d_name);
if (loc_path_len + d_name_len + 1 > sizeof (path))
{
error (0, 0, "too long filename \"%s\"", d->d_name);
continue;
}
memcpy (path + loc_path_len, d->d_name, d_name_len + 1);
if (stat64 (path, &st) < 0)
{
error (0, errno, "cannot stat \"%s\"", path);
continue;
}
if (! S_ISDIR (st.st_mode))
continue;
if (cnt == 16384)
{
error (0, 0, "too many directories in \"%s\"", loc_path);
break;
}
list[cnt] = strdup (path);
if (list[cnt] == NULL)
{
error (0, errno, "cannot add file to list \"%s\"", path);
continue;
}
if (primary != NULL && cnt > 0 && strcmp (primary, d->d_name) == 0)
{
char *p = list[0];
list[0] = list[cnt];
list[cnt] = p;
}
cnt++;
}
closedir (dirp);
/* Store the archive to the file specified as the second argument on the
command line or the default locale archive. */
fill_archive (&tmpl_ah, new_locar_fname,
install_langs_count, install_langs_list,
cnt, list, primary);
close_archive (&tmpl_ah);
truncate (tmpl_file, 0);
if (install_langs_count > 0)
{
free (ila_start);
free (install_langs_list);
}
char *tz_argv[] = { "/usr/sbin/tzdata-update", NULL };
execve (tz_argv[0], (char *const *)tz_argv, (char *const *)&tz_argv[1]);
exit (0);
}

View File

@ -5,30 +5,10 @@ component="glibc"
rm -f series.new rm -f series.new
extra_args="--fuzz=0" extra_args="--fuzz=0"
count=0 count=0
# Filter out the patches, and use `_` as our pseudo-IFS to prevent expansion. # Transform patches into series file.
for i in `grep '^%patch' glibc.spec | sed -e 's,%patch,,g' -e 's, ,_,g'`; do grep '^Patch.*:' glibc.spec | sed -e 's,Patch.*: ,,g' > series.new
# Split the patch into number and arguments. count=`wc -l series.new | sed -e 's, .*$,,g'`
# 1 - Patch number.
# 2-N - Patch arguments.
# Get back our elements by undoing pseudo-IFS change.
elements=(`echo $i | sed -e 's,_, ,g'`)
num=${elements[0]}
args=${elements[@]:1}
# Find the next patch that applies in order and write it out.
# This way we transform the patch # list into a patch file list in order.
grep "Patch${num}: " glibc.spec \
| sed -e 's,Patch.*: ,,g' -e "s,\$, ${args[@]} ${extra_args},g" \
| sed -e "s,%{name},${component},g" \
>> series.new
((count++))
done
# Double check we processed the correct number of patches.
fcount=`wc -l series.new | sed -e 's, .*$,,g'`
if [ $fcount -ne $count ]; then
echo "Error! Processed patch count doesn't match spec file count ($fcount != $count)."
exit 1
fi
echo "Processed $count patches." echo "Processed $count patches."
mv series.new series mv series.new series
echo "Generated quilt ./series file, please commit." echo "Generated quilt ./series file. Please do not commit."
exit 0 exit 0

View File

@ -1,567 +0,0 @@
CVE-2015-7547
2016-02-15 Carlos O'Donell <carlos@redhat.com>
[BZ #18665]
* resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
*herrno_p.
(gaih_getanswer): Document functional behviour. Return tryagain
if any result is tryagain.
* resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
when freed.
* resolv/res_send.c: Add copyright text.
(__libc_res_nsend): Document that MAXPACKET is expected.
(send_vc): Document. Remove buffer reuse.
(send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
size of the buffer. Add Dprint for truncated UDP buffer.
Index: glibc-2.22-719-g1233be7/resolv/nss_dns/dns-host.c
===================================================================
--- glibc-2.22-719-g1233be7.orig/resolv/nss_dns/dns-host.c
+++ glibc-2.22-719-g1233be7/resolv/nss_dns/dns-host.c
@@ -1041,7 +1041,10 @@ gaih_getanswer_slice (const querybuf *an
int h_namelen = 0;
if (ancount == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
while (ancount-- > 0 && cp < end_of_message && had_error == 0)
{
@@ -1218,7 +1221,14 @@ gaih_getanswer_slice (const querybuf *an
/* Special case here: if the resolver sent a result but it only
contains a CNAME while we are looking for a T_A or T_AAAA record,
we fail with NOTFOUND instead of TRYAGAIN. */
- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
+ if (canon != NULL)
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
+
+ *h_errnop = NETDB_INTERNAL;
+ return NSS_STATUS_TRYAGAIN;
}
@@ -1232,11 +1242,101 @@ gaih_getanswer (const querybuf *answer1,
enum nss_status status = NSS_STATUS_NOTFOUND;
+ /* Combining the NSS status of two distinct queries requires some
+ compromise and attention to symmetry (A or AAAA queries can be
+ returned in any order). What follows is a breakdown of how this
+ code is expected to work and why. We discuss only SUCCESS,
+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
+ that apply (though RETURN and MERGE exist). We make a distinction
+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
+ A recoverable TRYAGAIN is almost always due to buffer size issues
+ and returns ERANGE in errno and the caller is expected to retry
+ with a larger buffer.
+
+ Lastly, you may be tempted to make significant changes to the
+ conditions in this code to bring about symmetry between responses.
+ Please don't change anything without due consideration for
+ expected application behaviour. Some of the synthesized responses
+ aren't very well thought out and sometimes appear to imply that
+ IPv4 responses are always answer 1, and IPv6 responses are always
+ answer 2, but that's not true (see the implemetnation of send_dg
+ and send_vc to see response can arrive in any order, particlarly
+ for UDP). However, we expect it holds roughly enough of the time
+ that this code works, but certainly needs to be fixed to make this
+ a more robust implementation.
+
+ ----------------------------------------------
+ | Answer 1 Status / | Synthesized | Reason |
+ | Answer 2 Status | Status | |
+ |--------------------------------------------|
+ | SUCCESS/SUCCESS | SUCCESS | [1] |
+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] |
+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] |
+ | SUCCESS/NOTFOUND | SUCCESS | [1] |
+ | SUCCESS/UNAVAIL | SUCCESS | [1] |
+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] |
+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] |
+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] |
+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] |
+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] |
+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] |
+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] |
+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] |
+ | NOTFOUND/SUCCESS | SUCCESS | [3] |
+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] |
+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] |
+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] |
+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] |
+ | UNAVAIL/SUCCESS | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] |
+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] |
+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] |
+ ----------------------------------------------
+
+ [1] If the first response is a success we return success.
+ This ignores the state of the second answer and in fact
+ incorrectly sets errno and h_errno to that of the second
+ answer. However because the response is a success we ignore
+ *errnop and *h_errnop (though that means you touched errno on
+ success). We are being conservative here and returning the
+ likely IPv4 response in the first answer as a success.
+
+ [2] If the first response is a recoverable TRYAGAIN we return
+ that instead of looking at the second response. The
+ expectation here is that we have failed to get an IPv4 response
+ and should retry both queries.
+
+ [3] If the first response was not a SUCCESS and the second
+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
+ result from the second response, otherwise the first responses
+ status is used. Again we have some odd side-effects when the
+ second response is NOTFOUND because we overwrite *errnop and
+ *h_errnop that means that a first answer of NOTFOUND might see
+ its *errnop and *h_errnop values altered. Whether it matters
+ in practice that a first response NOTFOUND has the wrong
+ *errnop and *h_errnop is undecided.
+
+ [4] If the first response is UNAVAIL we return that instead of
+ looking at the second response. The expectation here is that
+ it will have failed similarly e.g. configuration failure.
+
+ [5] Testing this code is complicated by the fact that truncated
+ second response buffers might be returned as SUCCESS if the
+ first answer is a SUCCESS. To fix this we add symmetry to
+ TRYAGAIN with the second response. If the second response
+ is a recoverable error we now return TRYAGIN even if the first
+ response was SUCCESS. */
+
if (anslen1 > 0)
status = gaih_getanswer_slice(answer1, anslen1, qname,
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+
if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
|| (status == NSS_STATUS_TRYAGAIN
/* We want to look at the second answer in case of an
@@ -1252,8 +1352,15 @@ gaih_getanswer (const querybuf *answer1,
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+ /* Use the second response status in some cases. */
if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
status = status2;
+ /* Do not return a truncated second response (unless it was
+ unavoidable e.g. unrecoverable TRYAGAIN). */
+ if (status == NSS_STATUS_SUCCESS
+ && (status2 == NSS_STATUS_TRYAGAIN
+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
+ status = NSS_STATUS_TRYAGAIN;
}
return status;
Index: glibc-2.22-719-g1233be7/resolv/res_query.c
===================================================================
--- glibc-2.22-719-g1233be7.orig/resolv/res_query.c
+++ glibc-2.22-719-g1233be7/resolv/res_query.c
@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
}
@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp,
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
*answerp2_malloced = 0;
}
if (saved_herrno != -1)
Index: glibc-2.22-719-g1233be7/resolv/res_send.c
===================================================================
--- glibc-2.22-719-g1233be7.orig/resolv/res_send.c
+++ glibc-2.22-719-g1233be7/resolv/res_send.c
@@ -1,3 +1,20 @@
+/* Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
/*
* Copyright (c) 1985, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -353,6 +370,8 @@ __libc_res_nsend(res_state statp, const
#ifdef USE_HOOKS
if (__glibc_unlikely (statp->qhook || statp->rhook)) {
if (anssiz < MAXPACKET && ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *buf = malloc (MAXPACKET);
if (buf == NULL)
return (-1);
@@ -652,6 +671,77 @@ libresolv_hidden_def (res_nsend)
/* Private */
+/* The send_vc function is responsible for sending a DNS query over TCP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and
+ IPv6 queries at the same serially on the same socket.
+
+ Please note that for TCP there is no way to disable sending both
+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
+ and sends the queries serially and waits for the result after each
+ sent query. This implemetnation should be corrected to honour these
+ options.
+
+ Please also note that for TCP we send both queries over the same
+ socket one after another. This technically violates best practice
+ since the server is allowed to read the first query, respond, and
+ then close the socket (to service another client). If the server
+ does this, then the remaining second query in the socket data buffer
+ will cause the server to send the client an RST which will arrive
+ asynchronously and the client's OS will likely tear down the socket
+ receive buffer resulting in a potentially short read and lost
+ response data. This will force the client to retry the query again,
+ and this process may repeat until all servers and connection resets
+ are exhausted and then the query will fail. It's not known if this
+ happens with any frequency in real DNS server implementations. This
+ implementation should be corrected to use two sockets by default for
+ parallel queries.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ serially on the same socket.
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header feild TC will bet set to 1, indicating a truncated
+ message and the rest of the socket data will be read and discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_vc(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -661,11 +751,7 @@ send_vc(res_state statp,
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
- // XXX REMOVE
- // int anssiz = *anssizp;
- HEADER *anhp = (HEADER *) ans;
+ HEADER *anhp = (HEADER *) *ansp;
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
int truncating, connreset, n;
/* On some architectures compiler might emit a warning indicating
@@ -754,6 +840,8 @@ send_vc(res_state statp,
* Receive length & response
*/
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
uint16_t rlen16;
read_len:
@@ -790,36 +878,14 @@ send_vc(res_state statp,
u_char **thisansp;
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
- DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
-#if _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
- DIAG_POP_NEEDS_COMMENT;
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
@@ -827,10 +893,14 @@ send_vc(res_state statp,
anhp = (HEADER *) *thisansp;
*thisresplenp = rlen;
- if (rlen > *thisanssizp) {
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- if (__glibc_likely (anscp != NULL)) {
+ /* Is the answer buffer too small? */
+ if (*thisanssizp < rlen) {
+ /* If the current buffer is not the the static
+ user-supplied buffer then we can reallocate
+ it. */
+ if (thisansp != NULL && thisansp != ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp == NULL) {
*terrno = ENOMEM;
@@ -842,6 +912,9 @@ send_vc(res_state statp,
if (thisansp == ansp2)
*ansp2_malloced = 1;
anhp = (HEADER *) newp;
+ /* A uint16_t can't be larger than MAXPACKET
+ thus it's safe to allocate MAXPACKET but
+ read RLEN bytes instead. */
len = rlen;
} else {
Dprint(statp->options & RES_DEBUG,
@@ -972,6 +1045,66 @@ reopen (res_state statp, int *terrno, in
return 1;
}
+/* The send_dg function is responsible for sending a DNS query over UDP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries
+ along with the ability to send the query in parallel for both stacks
+ (default) or serially (RES_SINGLKUP). It also supports serial lookup
+ with a close and reopen of the socket used to talk to the server
+ (RES_SNGLKUPREOP) to work around broken name servers.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header feild TC will bet set to 1, indicating a truncated
+ message, while the rest of the UDP packet is discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If an answer is truncated because of UDP datagram DNS limits then
+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1
+ if any progress was made reading a response from the nameserver and
+ is used by the caller to distinguish between ECONNREFUSED and
+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_dg(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -981,8 +1114,6 @@ send_dg(res_state statp,
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
struct timespec now, timeout, finish;
struct pollfd pfd[1];
int ptimeout;
@@ -1015,6 +1146,8 @@ send_dg(res_state statp,
int need_recompute = 0;
int nwritten = 0;
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
pfd[0].fd = EXT(statp).nssocks[ns];
pfd[0].events = POLLOUT;
@@ -1178,55 +1311,56 @@ send_dg(res_state statp,
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
-#if _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
}
if (*thisanssizp < MAXPACKET
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- && anscp
+ /* If the current buffer is not the the static
+ user-supplied buffer then we can reallocate
+ it. */
+ && (thisansp != NULL && thisansp != ansp)
#ifdef FIONREAD
+ /* Is the size too small? */
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|| *thisanssizp < *thisresplenp)
#endif
) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp != NULL) {
- *anssizp = MAXPACKET;
- *thisansp = ans = newp;
+ *thisanssizp = MAXPACKET;
+ *thisansp = newp;
if (thisansp == ansp2)
*ansp2_malloced = 1;
}
}
+ /* We could end up with truncation if anscp was NULL
+ (not allowed to change caller's buffer) and the
+ response buffer size is too small. This isn't a
+ reliable way to detect truncation because the ioctl
+ may be an inaccurate report of the UDP message size.
+ Therefore we use this only to issue debug output.
+ To do truncation accurately with UDP we need
+ MSG_TRUNC which is only available on Linux. We
+ can abstract out the Linux-specific feature in the
+ future to detect truncation. */
+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; response may be truncated (UDP)\n")
+ );
+ }
+
HEADER *anhp = (HEADER *) *thisansp;
socklen_t fromlen = sizeof(struct sockaddr_in6);
assert (sizeof(from) <= fromlen);

View File

@ -1,13 +0,0 @@
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 997c860..50b37b0 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -295,7 +295,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
# ifndef SHARED
CHECK_STATIC_TLS (map, sym_map);
# else
- if (!TRY_STATIC_TLS (map, sym_map))
+ if (1)
{
td->arg = _dl_make_tlsdesc_dynamic
(sym_map, sym->st_value + reloc->r_addend);

View File

@ -1,33 +0,0 @@
diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
index ded5471..7d28496 100644
--- a/sysdeps/aarch64/dl-tlsdesc.S
+++ b/sysdeps/aarch64/dl-tlsdesc.S
@@ -140,7 +140,7 @@ _dl_tlsdesc_undefweak:
cfi_startproc
.align 2
_dl_tlsdesc_dynamic:
-# define NSAVEXREGPAIRS 2
+# define NSAVEXREGPAIRS 3
stp x29, x30, [sp,#-(32+16*NSAVEXREGPAIRS)]!
cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
mov x29, sp
@@ -151,6 +151,10 @@ _dl_tlsdesc_dynamic:
stp x1, x2, [sp, #32+16*0]
stp x3, x4, [sp, #32+16*1]
+ /* Work around GCC rescheduling compares across tlsdesc calls. */
+ mrs x30, nzcv
+ stp xzr, x30, [sp, #32+16*2]
+
mrs x4, tpidr_el0
/* The ldar here happens after the load from [x0] at the call site
(that is generated by the compiler as part of the TLS access ABI),
@@ -169,6 +173,8 @@ _dl_tlsdesc_dynamic:
1:
ldp x1, x2, [sp, #32+16*0]
ldp x3, x4, [sp, #32+16*1]
+ ldp xzr, x30, [sp, #32+16*2]
+ msr nzcv, x30
ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)

View File

@ -1,20 +0,0 @@
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-06-06 13:07:41.727524312 -0600
+++ b/elf/dl-load.c 2012-06-06 13:11:19.308681002 -0600
@@ -2093,10 +2093,14 @@ _dl_map_object (struct link_map *loader,
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val);
if (strcmp (name, soname) != 0)
- continue;
+#ifdef __arm__
+ if (strcmp (name, "ld-linux.so.3")
+ || strcmp (soname, "ld-linux-armhf.so.3"))
+#endif
+ continue;
/* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
+ add_name_to_object (l, name);
l->l_soname_added = 1;
}

View File

@ -1,41 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index 710ce7e..3fe9e73 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,7 +12,7 @@ install:
LC_ALL=C; export LC_ALL; \
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
-bench bench-clean:
+bench bench-clean bench-build:
$(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
# Convenience target to rebuild ULPs for all math tests.
diff --git a/Rules b/Rules
index 4f9cdf3..42d0368 100644
--- a/Rules
+++ b/Rules
@@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c
# This makes all the auxiliary and test programs.
-.PHONY: others tests bench
+.PHONY: others tests bench bench-build
ifeq ($(build-programs),yes)
others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
diff --git a/benchtests/Makefile b/benchtests/Makefile
index fd3036d..7cbceaa 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -103,6 +103,10 @@ bench-clean:
bench: $(timing-type) $(gen-locales) bench-set bench-func bench-malloc
+bench-build: bench-set-build bench-func-build
+bench-set-build: $(binaries-benchset)
+bench-func-build: $(binaries-bench) $(binaries-bench-malloc)
+
bench-set: $(binaries-benchset)
for run in $^; do \
echo "Running $${run}"; \

View File

@ -1,140 +0,0 @@
Index: glibc-2.22-193-g315267a/posix/bug-regex11.c
===================================================================
--- glibc-2.22-193-g315267a.orig/posix/bug-regex11.c
+++ glibc-2.22-193-g315267a/posix/bug-regex11.c
@@ -22,6 +22,7 @@
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
+#include <libc-internal.h>
/* Tests supposed to match. */
struct
@@ -119,6 +120,14 @@ main (void)
continue;
}
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since n is limited to
+ static nmatch which is limited to at most 5 (see tests above).
+ This is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (n = 0; n < tests[i].nmatch; ++n)
if (rm[n].rm_so != tests[i].rm[n].rm_so
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
@@ -130,6 +139,7 @@ main (void)
ret = 1;
break;
}
+ DIAG_POP_NEEDS_COMMENT
regfree (&re);
}
Index: glibc-2.22-193-g315267a/posix/bug-regex17.c
===================================================================
--- glibc-2.22-193-g315267a.orig/posix/bug-regex17.c
+++ glibc-2.22-193-g315267a/posix/bug-regex17.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
+#include <libc-internal.h>
/* Tests supposed to match. */
struct
@@ -87,6 +88,14 @@ do_test (void)
continue;
}
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since n is limited to
+ static nmatch which is limited to at most 5 (see tests above).
+ This is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (n = 0; n < tests[i].nmatch; ++n)
if (rm[n].rm_so != tests[i].rm[n].rm_so
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
@@ -98,6 +107,7 @@ do_test (void)
ret = 1;
break;
}
+ DIAG_POP_NEEDS_COMMENT
regfree (&re);
}
Index: glibc-2.22-193-g315267a/posix/bug-regex18.c
===================================================================
--- glibc-2.22-193-g315267a.orig/posix/bug-regex18.c
+++ glibc-2.22-193-g315267a/posix/bug-regex18.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
+#include <libc-internal.h>
/* Tests supposed to match. */
struct
@@ -80,6 +81,14 @@ main (void)
continue;
}
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since n is limited to
+ static nmatch which is limited to at most 5 (see tests above).
+ This is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (n = 0; n < tests[i].nmatch; ++n)
if (rm[n].rm_so != tests[i].rm[n].rm_so
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
@@ -91,6 +100,7 @@ main (void)
ret = 1;
break;
}
+ DIAG_POP_NEEDS_COMMENT
regfree (&re);
}
Index: glibc-2.22-193-g315267a/posix/bug-regex30.c
===================================================================
--- glibc-2.22-193-g315267a.orig/posix/bug-regex30.c
+++ glibc-2.22-193-g315267a/posix/bug-regex30.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
+#include <libc-internal.h>
/* Tests supposed to match. */
struct
@@ -80,6 +81,14 @@ do_test (void)
continue;
}
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since n is limited to
+ static nmatch which is limited to at most 5 (see tests above).
+ This is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (n = 0; n < tests[i].nmatch; ++n)
if (rm[n].rm_so != tests[i].rm[n].rm_so
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
@@ -91,6 +100,7 @@ do_test (void)
ret = 1;
break;
}
+ DIAG_POP_NEEDS_COMMENT
regfree (&re);
}

View File

@ -1,3 +1,19 @@
Short description: Add C.UTF-8 support.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-submitted
This patch needs to upstream as part of Carlos O'Donell
<carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This
work is currently blocked on cleaning up the test results to prove that
full code-point sorting is working as intended.
Note that this patch does not provide full code-point sorting as
expected.
This patch needs to upstream as soon as possible since it would be nice
to have this in F29 and fixed.
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001 From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com> From: Mike FABIAN <mfabian@redhat.com>
Date: Mon, 10 Aug 2015 15:58:12 +0200 Date: Mon, 10 Aug 2015 15:58:12 +0200
@ -44,18 +60,18 @@ index 0000000..fdf460e
+revision "1.0" +revision "1.0"
+date "2015-08-10" +date "2015-08-10"
+% +%
+category "C:2015";LC_IDENTIFICATION +category "i18n:2012";LC_IDENTIFICATION
+category "C:2015";LC_CTYPE +category "i18n:2012";LC_CTYPE
+category "C:2015";LC_COLLATE +category "i18n:2012";LC_COLLATE
+category "C:2015";LC_TIME +category "i18n:2012";LC_TIME
+category "C:2015";LC_NUMERIC +category "i18n:2012";LC_NUMERIC
+category "C:2015";LC_MONETARY +category "i18n:2012";LC_MONETARY
+category "C:2015";LC_MESSAGES +category "i18n:2012";LC_MESSAGES
+category "C:2015";LC_PAPER +category "i18n:2012";LC_PAPER
+category "C:2015";LC_NAME +category "i18n:2012";LC_NAME
+category "C:2015";LC_ADDRESS +category "i18n:2012";LC_ADDRESS
+category "C:2015";LC_TELEPHONE +category "i18n:2012";LC_TELEPHONE
+category "C:2015";LC_MEASUREMENT +category "i18n:2012";LC_MEASUREMENT
+END LC_IDENTIFICATION +END LC_IDENTIFICATION
+ +
+LC_CTYPE +LC_CTYPE
@ -72,21 +88,21 @@ index 0000000..fdf460e
+<U0000> +<U0000>
+.. +..
+<UFFFF> +<UFFFF>
+<U10000> +<U00010000>
+.. +..
+<U1FFFF> +<U0001FFFF>
+<U20000> +<U00020000>
+.. +..
+<U2FFFF> +<U0002FFFF>
+<UE0000> +<U000E0000>
+.. +..
+<UEFFFF> +<U000EFFFF>
+<UF0000> +<U000F0000>
+.. +..
+<UFFFFF> +<U000FFFFF>
+<U100000> +<U00100000>
+.. +..
+<U10FFFF> +<U0010FFFF>
+UNDEFINED +UNDEFINED
+order_end +order_end
+END LC_COLLATE +END LC_COLLATE

View File

@ -1,3 +1,12 @@
Short description: Adjust CS_PATH return value.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
In Fedora we should return only /usr/bin because /bin is just a symlink
to /usr/bin after MoveToUsr transition (which glibc has not really
completed).
diff -pruN a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h diff -pruN a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h
--- a/sysdeps/unix/confstr.h 2012-12-25 08:32:13.000000000 +0530 --- a/sysdeps/unix/confstr.h 2012-12-25 08:32:13.000000000 +0530
+++ b/sysdeps/unix/confstr.h 2014-09-05 20:02:55.698275219 +0530 +++ b/sysdeps/unix/confstr.h 2014-09-05 20:02:55.698275219 +0530

View File

@ -1,22 +0,0 @@
diff -urN glibc-2.20.mod/sysdeps/unix/sysv/linux/x86/elision-conf.c glibc-2.20/sysdeps/unix/sysv/linux/x86/elision-conf.c
--- glibc-2.20.mod/sysdeps/unix/sysv/linux/x86/elision-conf.c 2014-09-27 00:25:46.443462345 -0400
+++ glibc-2.20/sysdeps/unix/sysv/linux/x86/elision-conf.c 2014-09-27 00:29:53.586615813 -0400
@@ -62,12 +62,16 @@
char **argv __attribute__ ((unused)),
char **environ)
{
- __elision_available = HAS_CPU_FEATURE (RTM);
#ifdef ENABLE_LOCK_ELISION
+ __elision_available = HAS_CPU_FEATURE (RTM);
__pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
-#endif
if (!HAS_CPU_FEATURE (RTM))
__elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
+#else
+ __elision_available = 0;
+ __pthread_force_elision = 0;
+ __elision_aconf.retry_try_xbegin = 0;
+#endif
}
#ifdef SHARED

View File

@ -1,32 +0,0 @@
Index: glibc-2.22-193-g315267a/resolv/nss_dns/dns-host.c
===================================================================
--- glibc-2.22-193-g315267a.orig/resolv/nss_dns/dns-host.c
+++ glibc-2.22-193-g315267a/resolv/nss_dns/dns-host.c
@@ -79,6 +79,7 @@
#include <stddef.h>
#include <string.h>
#include <sys/syslog.h>
+#include <libc-internal.h>
#include "nsswitch.h"
@@ -561,10 +562,19 @@ addrsort (char **ap, int num)
num = MAX_NR_ADDRS;
for (i = 0; i < num; i++, p++)
{
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since i is limited to
+ _res.nsort which is limited to MAXRESOLVSORT. This
+ is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (j = 0 ; (unsigned)j < _res.nsort; j++)
if (_res.sort_list[j].addr.s_addr ==
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
break;
+ DIAG_POP_NEEDS_COMMENT
aval[i] = j;
if (needsort == 0 && i > 0 && j < aval[i-1])
needsort = i;

View File

@ -1,30 +1,40 @@
# Short description: Cleanup use of _dl_starting_up.
# Upstream discussions: Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
# https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html Origin: PATCH
# Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
# Based on the following commit:
# Upstream discussions:
# From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001 https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
# From: Andreas Schwab <schwab@redhat.com>
# Date: Fri, 11 Jun 2010 11:04:11 +0200 Based on the following commit:
# Subject: [PATCH] Properly set __libc_multiple_libcs ~~~
# From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
# * elf/rtld.c (_dl_starting_up): Always define. From: Andreas Schwab <schwab@redhat.com>
# (dl_main): Always set _dl_starting_up. Date: Fri, 11 Jun 2010 11:04:11 +0200
# * elf/dl-support.c (_dl_starting_up): Always define. Subject: [PATCH] Properly set __libc_multiple_libcs
# * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
# * elf/rtld.c (_dl_starting_up): Always define.
# --- (dl_main): Always set _dl_starting_up.
# ChangeLog | 7 +++++++ * elf/dl-support.c (_dl_starting_up): Always define.
# elf/dl-init.c | 4 ---- * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
# elf/dl-support.c | 2 --
# elf/rtld.c | 4 ---- ---
# 4 files changed, 7 insertions(+), 10 deletions(-) ChangeLog | 7 +++++++
# elf/dl-init.c | 4 ----
diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/dl-init.c elf/dl-support.c | 2 --
--- glibc-2.20-205-ga39208b/elf/dl-init.c 2014-11-21 16:08:32.744913590 -0500 elf/rtld.c | 4 ----
+++ glibc-2.20-205-ga39208b.mod/elf/dl-init.c 2014-11-21 16:09:42.485708197 -0500 4 files changed, 7 insertions(+), 10 deletions(-)
@@ -119,8 +119,6 @@ ~~~
This patch needs to go upstream to get cleaned up, but has always involed
analysis of the GNU/Hurd parts of the change and that stalled out, but
perhaps with build-many-glibcs we can now test these changes more easily.
Index: b/elf/dl-init.c
===================================================================
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
while (i-- > 0) while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env); call_init (main_map->l_initfini[i], argc, argv, env);
@ -33,10 +43,11 @@ diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/
_dl_starting_up = 0; _dl_starting_up = 0;
-#endif -#endif
} }
diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/elf/dl-support.c Index: b/elf/dl-support.c
--- glibc-2.20-205-ga39208b/elf/dl-support.c 2014-11-19 14:35:03.000000000 -0500 ===================================================================
+++ glibc-2.20-205-ga39208b.mod/elf/dl-support.c 2014-11-21 16:09:54.829671843 -0500 --- a/elf/dl-support.c
@@ -118,10 +118,8 @@ +++ b/elf/dl-support.c
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
.r_nlist = 1, .r_nlist = 1,
}; };
@ -47,18 +58,19 @@ diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/e
/* Random data provided by the kernel. */ /* Random data provided by the kernel. */
void *_dl_random; void *_dl_random;
diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtld.c Index: b/elf/rtld.c
--- glibc-2.20-205-ga39208b/elf/rtld.c 2014-11-21 16:08:32.745913587 -0500 ===================================================================
+++ glibc-2.20-205-ga39208b.mod/elf/rtld.c 2014-11-21 16:09:05.614816785 -0500 --- a/elf/rtld.c
@@ -107,7 +107,6 @@ +++ b/elf/rtld.c
struct audit_list *next; @@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
} *audit_list; return iter->previous->name;
}
-#ifndef HAVE_INLINED_SYSCALLS -#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and /* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic must not be initialized to nonzero, because the unused dynamic
@@ -117,7 +116,6 @@ @@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
never be called. */ never be called. */
int _dl_starting_up = 0; int _dl_starting_up = 0;
rtld_hidden_def (_dl_starting_up) rtld_hidden_def (_dl_starting_up)
@ -66,7 +78,7 @@ diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtl
/* This is the structure which defines all variables global to ld.so /* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */ (except those which cannot be added for some reason). */
@@ -776,10 +774,8 @@ @@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */ /* Process the environment variable which control the behaviour. */
process_envvars (&mode); process_envvars (&mode);

View File

@ -1,101 +0,0 @@
From 207e77fd3f0a94acdf0557608dd4f10ce0e0f22f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Mon, 9 May 2011 10:55:58 +0200
Subject: [PATCH] Never leave $ORIGIN unexpanded
* elf/dl-load.c (is_dst): Remove parameter secure, all callers
changed. Move check for valid use of $ORIGIN ...
(_dl_dst_substitute): ... here. Reset check_for_trusted when a
path element is skipped.
---
ChangeLog | 7 +++++++
elf/dl-load.c | 34 ++++++++++++++++------------------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 18a83d2..6e16a9a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *path, size_t len)
static size_t
-is_dst (const char *start, const char *name, const char *str,
- int is_path, int secure)
+is_dst (const char *start, const char *name, const char *str, int is_path)
{
size_t len;
bool is_curly = false;
@@ -279,12 +278,6 @@ is_dst (const char *start, const char *name, const char *str,
&& (!is_path || name[len] != ':'))
return 0;
- if (__glibc_unlikely (secure)
- && ((name[len] != '\0' && name[len] != '/'
- && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
return len;
}
@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_path)
{
size_t len;
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path. */
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- __libc_enable_secure)) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
++cnt;
name = strchr (name + len, '$');
@@ -338,10 +328,18 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
size_t len;
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- __libc_enable_secure)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{
- repl = l->l_origin;
+ /* For SUID/GUID programs $ORIGIN must always appear
+ first in a path element. */
+ if (__glibc_unlikely (__libc_enable_secure)
+ && ((name[len] != '\0' && name[len] != '/'
+ && (!is_path || name[len] != ':'))
+ || (name != start + 1 && (!is_path || name[-2] != ':'))))
+ repl = (const char *) -1;
+ else
+ repl = l->l_origin;
+
check_for_trusted = (__libc_enable_secure
&& l->l_type == lt_executable);
}
@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
check_for_trusted = (__libc_enable_secure
&& l->l_type == lt_executable);
}
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
repl = GLRO(dl_platform);
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
repl = DL_DST_LIB;
if (repl != NULL && repl != (const char *) -1)
@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
element, but keep an empty element at the end. */
if (wp == result && is_path && *name == ':' && name[1] != '\0')
++name;
+ check_for_trusted = false;
}
else
/* No DST we recognize. */

View File

@ -1,18 +0,0 @@
diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
--- a/sysdeps/i386/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/i386/Makefile 2012-06-07 12:15:21.826318641 -0600
@@ -62,6 +64,14 @@ endif
ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
defines += -DNO_TLS_DIRECT_SEG_REFS
+else
+# .a libraries are not performance critical and so we
+# build them without direct TLS segment references
+# always.
+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.o += -mno-tls-direct-seg-refs
+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
+CFLAGS-.oS += -mno-tls-direct-seg-refs
endif
ifeq ($(subdir),elf)

View File

@ -1,30 +0,0 @@
From 5eb4509a6651d19c7a28c4506d6aa582c9ee095a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 1 Feb 2006 09:30:43 +0000
Subject: [PATCH] 128-bit long double fixes
* include/bits/stdlib-ldbl.h: New file.
* include/bits/wchar-ldbl.h: New file.
---
ChangeLog | 5 +++++
include/bits/stdlib-ldbl.h | 1 +
include/bits/wchar-ldbl.h | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 include/bits/stdlib-ldbl.h
create mode 100644 include/bits/wchar-ldbl.h
diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
new file mode 100644
index 0000000..6250949
--- /dev/null
+++ b/include/bits/stdlib-ldbl.h
@@ -0,0 +1 @@
+#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
new file mode 100644
index 0000000..29baa2f
--- /dev/null
+++ b/include/bits/wchar-ldbl.h
@@ -0,0 +1 @@
+#include <wcsmbs/bits/wchar-ldbl.h>

View File

@ -1,42 +0,0 @@
From 83e5edd390eabe8f8e8e0d051f929b77a30c0767 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Fri, 18 Mar 2011 16:22:52 +0100
Subject: [PATCH] ldd: never run file directly
* elf/ldd.bash.in: Never run file directly.
---
ChangeLog | 4 ++++
elf/ldd.bash.in | 14 +-------------
2 files changed, 5 insertions(+), 13 deletions(-)
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -166,18 +166,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
fi
done
case $ret in
- 0)
- # If the program exits with exit code 5, it means the process has been
- # invoked with __libc_enable_secure. Fall back to running it through
- # the dynamic linker.
- try_trace "$file"
- rc=$?
- if [ $rc = 5 ]; then
- try_trace "$RTLD" "$file"
- rc=$?
- fi
- [ $rc = 0 ] || result=1
- ;;
1)
# This can be a non-ELF binary or no binary at all.
nonelf "$file" || {
@@ -185,7 +173,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
result=1
}
;;
- 2)
+ 0|2)
try_trace "$RTLD" "$file" || result=1
;;
*)

View File

@ -1,7 +1,19 @@
diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c Short description: Fedora-specific workaround for kernel pty bug.
--- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600 Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600 Origin: PATCH
@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios Upstream status: not-submitted
This is a Fedora-specific workaround for a kernel bug where calling
ioctl on a pty will silently ignore the invalid c_cflag. The
workaround is to use TCGETS to verify the setting matches. This is
not upstream and needs to either be removed or submitted upstream
after analysis.
Index: b/sysdeps/unix/sysv/linux/tcsetattr.c
===================================================================
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
@@ -45,6 +45,7 @@ __tcsetattr (int fd, int optional_action
{ {
struct __kernel_termios k_termios; struct __kernel_termios k_termios;
unsigned long int cmd; unsigned long int cmd;
@ -9,7 +21,7 @@ diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcset
switch (optional_actions) switch (optional_actions)
{ {
@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios @@ -75,7 +76,36 @@ __tcsetattr (int fd, int optional_action
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
__KERNEL_NCCS * sizeof (cc_t)); __KERNEL_NCCS * sizeof (cc_t));
@ -45,4 +57,5 @@ diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcset
+ +
+ return retval; + return retval;
} }
weak_alias (__tcsetattr, tcsetattr)
libc_hidden_def (tcsetattr) libc_hidden_def (tcsetattr)

View File

@ -1,3 +1,14 @@
Short description: Add 4 ISO-8859-15 locales to SUPPORTED for Euro symbol.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #61908
Upstream status: not-needed
Very early RHL 7.3 requirement to add these locales so users can
get access to Euro symbol. We should review this bug and decide if
the UTF-8 locales are now serving the same purpose and drop the
additional locales.
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28 * Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
- add a couple of .ISO-8859-15 locales (#61908) - add a couple of .ISO-8859-15 locales (#61908)

View File

@ -1,11 +1,21 @@
diff -Nrup a/localedata/Makefile b/localedata/Makefile Short description: Fedora-specific glibc install locale changes.
--- a/localedata/Makefile 2012-06-05 07:42:49.000000000 -0600 Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
+++ b/localedata/Makefile 2012-06-07 12:15:21.776318827 -0600 Origin: PATCH
@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo Upstream status: not-needed
The Fedora glibc build and install does not need the normal install
behaviour which updates the locale archive. The Fedora install phase
in the spec file of the rpm will handle this manually.
diff --git a/localedata/Makefile b/localedata/Makefile
index 0eea396ad86da956..54caabda33728207 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -413,6 +413,7 @@ define build-one-locale
echo -n '...'; \ echo -n '...'; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
$(LOCALEDEF) --alias-file=../intl/locale.alias \ $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
+ --no-archive \ + --no-archive \
-i locales/$$input -c -f charmaps/$$charset \ -i locales/$$input -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale \ $(addprefix --prefix=,$(install_root)) $$locale \
&& echo ' done'; \ && echo ' done';

View File

@ -1,51 +0,0 @@
This is a part of commit glibc-2.3.3-1492-ga891c7b,
needed for fedora/build-locale-archive.c only.
diff -Nrup a/ChangeLog.17 b/ChangeLog.17
--- a/ChangeLog.17 2012-06-05 07:42:49.000000000 -0600
+++ b/ChangeLog.17 2012-06-07 12:15:21.564319619 -0600
@@ -11818,6 +11829,10 @@ d2009-10-30 Ulrich Drepper <drepper@re
[BZ #4368]
* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
+2007-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
+
2007-04-16 Ulrich Drepper <drepper@redhat.com>
[BZ #4364]
diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c
--- a/locale/programs/locarchive.c 2012-06-05 07:42:49.000000000 -0600
+++ b/locale/programs/locarchive.c 2012-06-07 12:15:21.585319540 -0600
@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo
/* forward decls for below */
static uint32_t add_locale (struct locarhandle *ah, const char *name,
locale_data_t data, bool replace);
-static void add_alias (struct locarhandle *ah, const char *alias,
- bool replace, const char *oldname,
- uint32_t *locrec_offset_p);
+void add_alias (struct locarhandle *ah, const char *alias,
+ bool replace, const char *oldname,
+ uint32_t *locrec_offset_p);
static bool
@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah)
#include "../../intl/explodename.c"
#include "../../intl/l10nflist.c"
-static struct namehashent *
+struct namehashent *
insert_name (struct locarhandle *ah,
const char *name, size_t name_len, bool replace)
{
@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah,
return &namehashtab[idx];
}
-static void
+void
add_alias (struct locarhandle *ah, const char *alias, bool replace,
const char *oldname, uint32_t *locrec_offset_p)
{

View File

@ -1,3 +1,14 @@
Short description: Place glibc info into "Libraries" category.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
The category names for libraries is completely random including
"Libraries", "GNU Libraries", "GNU libraries", and "Software libraries."
In the GNU info manual the "Software libraries" category is given as an
example, but really we need to standardize on a category for upstream.
I suggest we drop this change after some upstream discussion.
From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001 From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com> From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 3 Nov 2006 16:31:21 +0000 Date: Fri, 3 Nov 2006 16:31:21 +0000

View File

@ -1,3 +1,13 @@
Short description: Fedora-specific enabling batch read in NSS.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #188246
Upstream status: not-submitted
Enable batch read in NSS. It's not clear if this is always a win or
just a win for NIS+, this needs to be analyzed and sent upstream or
removed.
From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001 From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com> From: Jakub Jelinek <jakub@redhat.com>
Date: Mon, 1 May 2006 08:02:53 +0000 Date: Mon, 1 May 2006 08:02:53 +0000

View File

@ -1,25 +0,0 @@
diff -Nrup a/nptl/Makefile b/nptl/Makefile
--- a/nptl/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/nptl/Makefile 2012-06-07 12:15:21.816318678 -0600
@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)tst-unload: $(libdl)
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking.
$(addprefix $(objpfx), $(tests-reverse)): \
- $(objpfx)../libc.so $(objpfx)libpthread.so \
+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
+
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
+ ln -s ../libc.so $@
+generated += libclink.so
else
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif

View File

@ -1,3 +1,11 @@
Short description: NSCD must use nscd user.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
Fedora-specific configuration adjustment to introduce the nscd user.
(Upstream does not assume this user exists.)
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600 --- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600 +++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600

View File

@ -0,0 +1,45 @@
The Fedora /etc/nsswitch.conf is based largely on the upstream
version with minor downstream distribution modifications for
use with SSSD and systemd.
diff --git a/nss/nsswitch.conf b/nss/nsswitch.conf
index f55358811495c9f1..14c3cde8080a848c 100644
--- a/nss/nsswitch.conf
+++ b/nss/nsswitch.conf
@@ -1,7 +1,7 @@
#
# /etc/nsswitch.conf
#
-# An example Name Service Switch config file. This file should be
+# Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# Valid databases are: aliases, ethers, group, gshadow, hosts,
@@ -52,18 +52,20 @@
# shadow: db files
# group: db files
-# In alphabetical order. Re-order as required to optimize peformance.
+# In order of likelihood of use to accelerate lookup.
+passwd: sss files
+shadow: files sss
+group: sss files
+hosts: files dns myhostname
+services: files sss
+netgroup: sss
+automount: files sss
+
aliases: files
ethers: files
-group: files
gshadow: files
-hosts: files dns
initgroups: files
-netgroup: files
networks: files dns
-passwd: files
protocols: files
publickey: files
rpc: files
-shadow: files
-services: files

View File

@ -1,20 +0,0 @@
glibc-2.3.3-1478-g37582bc
* Thu Nov 30 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-9
- on ppc64 build __libc_start_main without unwind info,
as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the
future that could be fixable just by providing .cfi_undefined r2
in __libc_start_main instead)
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600
@@ -35,6 +35,8 @@ CFLAGS-rtld-memmove.os = $(no-special-re
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+
ifeq ($(subdir),elf)
# help gcc inline asm code from dl-machine.h
+cflags += -finline-limit=2000

View File

@ -1,28 +0,0 @@
This is part of commit glibc-2.3.3-1564-gd0b6ac6
* Fri Mar 14 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-11
- remove <stropts.h>, define _XOPEN_STREAMS -1 (#436349)
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
--- a/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600
@@ -188,4 +188,7 @@
/* Typed memory objects are not available. */
#define _POSIX_TYPED_MEMORY_OBJECTS -1
+/* Streams are not available. */
+#define _XOPEN_STREAMS -1
+
#endif /* bits/posix_opt.h */
diff -Nrup a/streams/Makefile b/streams/Makefile
--- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600
@@ -20,7 +20,7 @@
include ../Makeconfig
-headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
include ../Rules

View File

@ -1,50 +0,0 @@
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 8 Apr 2010 11:18:26 +0200
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
GLIBC_PRIVATE.
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
---
ChangeLog | 8 ++++++++
nptl/Versions | 1 +
nptl/nptl-init.c | 2 +-
sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
5 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/i386/Versions
--- a/nptl/Version
+++ b/nptl/Versions
@@ -30,6 +30,7 @@ libc {
__libc_pthread_init;
__libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
__libc_allocate_rtsig_private;
+ __getrlimit;
}
}
--- a/sysdeps/unix/sysv/linux/i386/Versions
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -53,5 +53,6 @@
}
GLIBC_PRIVATE {
__modify_ldt;
+ __uname;
}
}
--- a/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/sysdeps/unix/sysv/linux/i386/smp.h
@@ -36,7 +36,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
Work around incorrect -Wmaybe-uninitialized warning due to this GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69537
Index: glibc-2.22-709-g8a71d2e/nis/ypclnt.c
===================================================================
--- glibc-2.22-709-g8a71d2e.orig/nis/ypclnt.c
+++ glibc-2.22-709-g8a71d2e/nis/ypclnt.c
@@ -584,7 +584,7 @@ yp_master (const char *indomain, const c
{
ypreq_nokey req;
ypresp_master resp;
- enum clnt_stat result;
+ int result;
if (indomain == NULL || indomain[0] == '\0' ||
inmap == NULL || inmap[0] == '\0')

View File

@ -1,32 +0,0 @@
Index: glibc-2.22-193-g315267a/resolv/gethnamaddr.c
===================================================================
--- glibc-2.22-193-g315267a.orig/resolv/gethnamaddr.c
+++ glibc-2.22-193-g315267a/resolv/gethnamaddr.c
@@ -71,6 +71,7 @@ static char sccsid[] = "@(#)gethostnamad
#include <ctype.h>
#include <errno.h>
#include <syslog.h>
+#include <libc-internal.h>
#define RESOLVSORT
@@ -986,10 +987,19 @@ addrsort(ap, num)
p = ap;
for (i = 0; i < num; i++, p++) {
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since i is limited to
+ _res.nsort which is limited to MAXRESOLVSORT. This
+ is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (j = 0 ; (unsigned)j < _res.nsort; j++)
if (_res.sort_list[j].addr.s_addr ==
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
break;
+ DIAG_POP_NEEDS_COMMENT
aval[i] = j;
if (needsort == 0 && i > 0 && j < aval[i-1])
needsort = i;

View File

@ -1,32 +0,0 @@
commit 48746aa5a013aab5ca89ee8c29761baec8850c0f
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Feb 1 16:17:55 2016 +0000
Restore isinf, isinfl, isnanf and isnanl for C++11
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index a48345d..9a7b3f0 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -196,7 +196,9 @@ __MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
_Mdouble_END_NAMESPACE
#ifdef __USE_MISC
-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */
+# if (!defined __cplusplus \
+ || __cplusplus < 201103L /* isinf conflicts with C++11. */ \
+ || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't. */
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
@@ -232,7 +234,9 @@ __END_NAMESPACE_C99
__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */
+# if (!defined __cplusplus \
+ || __cplusplus < 201103L /* isnan conflicts with C++11. */ \
+ || __MATH_DECLARING_DOUBLE == 0) /* isnanf or isnanl don't. */
/* Return nonzero if VALUE is not a number. */
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
# endif

View File

@ -1,72 +0,0 @@
Index: glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
===================================================================
--- glibc-2.22-193-g315267a.orig/locale/programs/ld-ctype.c
+++ glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
@@ -31,6 +31,7 @@
#include <wctype.h>
#include <stdint.h>
#include <sys/uio.h>
+#include <libc-internal.h>
#include "localedef.h"
#include "charmap.h"
@@ -2534,9 +2535,19 @@ with character code range values one mus
{
size_t cnt;
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not possible since ctype_map_new prevents
+ map_collection_nr from being greater than MAX_NR_CHARMP which
+ is the size of mapnames. This is likely PR/59124 which is still
+ not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (cnt = 2; cnt < ctype->map_collection_nr; ++cnt)
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
break;
+ DIAG_POP_NEEDS_COMMENT
if (cnt < ctype->map_collection_nr)
free (now->val.str.startmb);
@@ -2807,9 +2818,19 @@ previous definition was here")));
/* This could mean one of several things. First test whether
it's a character class name. */
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not possible since ctype_class_new prevents
+ nr_charclass from being greater than MAX_NR_CHARCLASS which
+ is the size of classnames. This is likely PR/59124 which is still
+ not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (cnt = 0; cnt < ctype->nr_charclass; ++cnt)
if (strcmp (now->val.str.startmb, ctype->classnames[cnt]) == 0)
break;
+ DIAG_POP_NEEDS_COMMENT
if (cnt < ctype->nr_charclass)
{
class_bit = _ISwbit (cnt);
@@ -2817,9 +2838,19 @@ previous definition was here")));
free (now->val.str.startmb);
goto read_charclass;
}
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not possible since ctype_map_new prevents
+ map_collection_nr from being greater than MAX_NR_CHARMP which
+ is the size of mapnames. This is likely PR/59124 which is still
+ not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
for (cnt = 0; cnt < ctype->map_collection_nr; ++cnt)
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
break;
+ DIAG_POP_NEEDS_COMMENT
if (cnt < ctype->map_collection_nr)
{
mapidx = cnt;

View File

@ -1,3 +1,10 @@
Short description: Provide options to nscd startup.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
Fedora-specific nscd startup configuration file.
diff --git a/nscd/nscd.service b/nscd/nscd.service diff --git a/nscd/nscd.service b/nscd/nscd.service
index b7428a3..19ba185 100644 index b7428a3..19ba185 100644
--- a/nscd/nscd.service --- a/nscd/nscd.service

View File

@ -1,858 +0,0 @@
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: nsswitch: Add group merging support
From: Stephen Gallagher <sgallagh@redhat.com>
X-Patchwork-Id: 10289
Message-Id: <1452213991-6499-1-git-send-email-sgallagh@redhat.com>
To: libc-alpha@sourceware.org
Date: Thu, 7 Jan 2016 19:46:31 -0500
https://sourceware.org/glibc/wiki/Proposals/GroupMerging
== Justification ==
It is common today for users to rely on centrally-managed user stores for
handling their user accounts. However, much software existing today does
not have an innate understanding of such accounts. Instead, they commonly
rely on membership in known groups for managing access-control (for
example the "wheel" group on Fedora and RHEL systems or the "adm" group
on Debian-derived systems). In the present incarnation of nsswitch, the
only way to have such groups managed by a remote user store such as
FreeIPA or Active Directory would be to manually remove the groups from
/etc/group on the clients so that nsswitch would then move past nss_files
and into the SSSD, nss-ldap or other remote user database.
== Solution ==
With this patch, a new action is introduced for nsswitch:
NSS_ACTION_MERGE. To take advantage of it, one will add [SUCCESS=merge]
between two database entries in the nsswitch.conf file. When a group is
located in the first of the two group entries, processing will continue
on to the next one. If the group is also found in the next entry (and the
group name and GID are an exact match), the member list of the second
entry will be added to the group object to be returned.
== Implementation ==
After each DL_LOOKUP_FN() returns, the next action is checked. If the
function returned NSS_STATUS_SUCCESS and the next action is
NSS_ACTION_MERGE, a copy of the result buffer is saved for the next pass
through the loop. If on this next pass through the loop the database
returns another instance of a group matching both the group name and GID,
the member list is added to the previous list and it is returned as a
single object. If the following database does not contain the same group,
then the original is copied back into the destination buffer.
This patch implements merge functionality only for the group database.
For other databases, there is a default implementation that will return
the EINVAL errno if a merge is requested. The merge functionality can be
implemented for other databases at a later time if such is needed. Each
database must provide a unique implementation of the deep-copy and merge
functions.
If [SUCCESS=merge] is present in nsswitch.conf for a glibc version that
does not support it, glibc will process results up until that operation,
at which time it will return results if it has found them or else will
simply return an error. In practical terms, this ends up behaving like
the remainder of the nsswitch.conf line does not exist.
== Iterators ==
This feature does not modify the iterator functionality from its current
behavior. If getgrnam() or getgrgid() is called, glibc will iterate
through all entries in the `group` line in nsswitch.conf and display the
list of members without attempting to merge them. This is consistent with
the behavior of nss_files where if two separate lines are specified for
the same group in /etc/groups, getgrnam()/getgrgid() will display both.
Clients are already expected to handle this gracefully.
== No Premature Optimizations ==
The following is a list of places that might be eligible for
optimization, but were not overengineered for this initial contribution:
* Any situation where a merge may occur will result in one malloc() of
the same size as the input buffer.
* Any situation where a merge does occur will result in a second
malloc() to hold the list of pointers to member name strings.
* The list of members is simply concatenated together and is not tested
for uniqueness (which is identical to the behavior for nss_files,
which will simply return identical values if they both exist on the
line in the file. This could potentially be optimized to reduce space
usage in the buffer, but it is both complex and computationally
expensive to do so.
== Testing ==
I performed testing by running the getent utility against my newly-built
glibc and configuring /etc/nsswitch.conf with the following entry:
group: group: files [SUCCESS=merge] sss
In /etc/group I included the line:
wheel:x:10:sgallagh
I then configured my local SSSD using the id_provider=local to respond
with:
wheel:*:10:localuser,localuser2
I then ran `getent group wheel` against the newly-built glibc in
multiple situations and received the expected output as described
above:
* When SSSD was running.
* When SSSD was configured in nsswitch.conf but the daemon was not
running.
* When SSSD was configured in nsswitch.conf but nss_sss.so.2 was not
installed on the system.
* When the order of 'sss' and 'files' was reversed.
* All of the above with the [SUCCESS=merge] removed (to ensure no
regressions).
* All of the above with `getent group 10`.
* All of the above with `getent group` with and without
`enumerate=true` set in SSSD.
* All of the above with and without nscd enabled on the system.
== NEWS ==
* A new NSS action is added to facilitate large distribution system
administration. The action, MERGE, allows remote user stores like
LDAP to be merged into local user stores like /etc/groups in order
to provide easy to use, updated, and managed sets of merged
credentials. The new action can be used by configuring it in
/etc/nsswitch.conf:
group: files [SUCCESS=merge] nis
Implemented by Stephen Gallagher (Red Hat).
== ChangeLog ==
2015-12-16 Stephen Gallagher <sgallagh@redhat.com>
[BZ #19072]
* grp/Makefile (headers): Add grp-merge.h
(routines): Add grp-merge.
* grp/getgrgid_r.c: Include grp-merge.h.
(DEEPCOPY_FN): Define.
(MERGE_FN): Define.
* grp/getgrname_r.c: Include grp-merge.h.
(DEEPCOPY_FN): Define.
(MERGE_FN): Define.
* grp/grp-merge.c: New file.
* grp/grp-merge.h: New file.
* manual/nss.texi (Actions in the NSS configuration): Describe
return, continue, and merge.
* nscd/Makefile: Add vpath to find grp-merge.c
(nscd-modules): Add grp-merge.
* nscd/getgrgid_r.c: Include grp/grp-merge.h.
(DEEPCOPY_FN): Define.
(MERGE_FN): Define.
* nscd/getgrnam_r.c: Include grp/grp-merge.h.
(DEEPCOPY_FN): Define.
(MERGE_FN): Define.
* nss/getXXbyYY_r.c [!DEEPCOPY_FN]: Define __copy_einval.
[!MERGE_FN]: Define __merge_einval.
(CHECK_MERGE): Define.
(REENTRANT_NAME): Process merge if do_merge is true.
* nss/getnssent_r.c (__nss_setent): Process NSS_ACTION_MERGE.
(__nss_getent_r): Likewise.
* nss/nsswitch.c (nss_parse_service_list): Likewise.
* nss/nsswitch.h (lookup_actions): Define NSS_ACTION_MERGE.
Resolves BZ #19072
---
grp/Makefile | 5 +-
grp/getgrgid_r.c | 3 +
grp/getgrnam_r.c | 4 ++
grp/grp-merge.c | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
grp/grp-merge.h | 35 +++++++++++
manual/nss.texi | 46 +++++++++++++-
nscd/Makefile | 5 +-
nscd/getgrgid_r.c | 4 ++
nscd/getgrnam_r.c | 4 ++
nss/getXXbyYY_r.c | 105 +++++++++++++++++++++++++++++++-
nss/getnssent_r.c | 34 ++++++++++-
nss/nsswitch.c | 3 +
nss/nsswitch.h | 3 +-
13 files changed, 419 insertions(+), 10 deletions(-)
create mode 100644 grp/grp-merge.c
create mode 100644 grp/grp-merge.h
diff --git a/grp/Makefile b/grp/Makefile
index ed8cc2b0564f0e3842cd78f24a4e0788d659bbc4..52af992365268aae8cf8a80cd7216160b1431e84 100644
--- a/grp/Makefile
+++ b/grp/Makefile
@@ -20,15 +20,16 @@
#
subdir := grp
include ../Makeconfig
-headers := grp.h
+headers := grp.h grp-merge.h
routines := fgetgrent initgroups setgroups \
getgrent getgrgid getgrnam putgrent \
- getgrent_r getgrgid_r getgrnam_r fgetgrent_r
+ getgrent_r getgrgid_r getgrnam_r fgetgrent_r \
+ grp-merge
tests := testgrp tst-putgrent
ifeq (yes,$(build-shared))
test-srcs := tst_fgetgrent
diff --git a/grp/getgrgid_r.c b/grp/getgrgid_r.c
index 05d4d772d3ef0bfae8f9375387c41310885ce41a..447fa633807deec8f26d654ebeb6386a150d3a37 100644
--- a/grp/getgrgid_r.c
+++ b/grp/getgrgid_r.c
@@ -16,14 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <grp.h>
+#include "grp-merge.h"
#define LOOKUP_TYPE struct group
#define FUNCTION_NAME getgrgid
#define DATABASE_NAME group
#define ADD_PARAMS gid_t gid
#define ADD_VARIABLES gid
#define BUFLEN NSS_BUFLEN_GROUP
+#define DEEPCOPY_FN __copy_grp
+#define MERGE_FN __merge_grp
#include <nss/getXXbyYY_r.c>
diff --git a/grp/getgrnam_r.c b/grp/getgrnam_r.c
index 0061cb2f7e0bd311d19775e49eb3fdd8a93447f1..c5535f4057ddfc40965f27789c34345045c8bf3b 100644
--- a/grp/getgrnam_r.c
+++ b/grp/getgrnam_r.c
@@ -16,13 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <grp.h>
+#include "grp-merge.h"
#define LOOKUP_TYPE struct group
#define FUNCTION_NAME getgrnam
#define DATABASE_NAME group
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+#define DEEPCOPY_FN __copy_grp
+#define MERGE_FN __merge_grp
+
#include <nss/getXXbyYY_r.c>
diff --git a/grp/grp-merge.c b/grp/grp-merge.c
new file mode 100644
index 0000000000000000000000000000000000000000..ca959dbfe403c89d6f3184f2b361b0c6488c9182
--- /dev/null
+++ b/grp/grp-merge.c
@@ -0,0 +1,178 @@
+/* Group merging implementation.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <grp.h>
+#include "grp-merge.h"
+
+#define BUFCHECK(size) \
+ do { \
+ if (c + size > buflen) \
+ { \
+ free (members); \
+ return ERANGE; \
+ } \
+ } while(0)
+
+int
+__copy_grp (const struct group srcgrp, const size_t buflen,
+ struct group *destgrp, char *destbuf, char **endptr)
+{
+ size_t i;
+ size_t c = 0;
+ size_t len;
+ size_t memcount;
+ char **members = NULL;
+
+ /* Copy the GID. */
+ destgrp->gr_gid = srcgrp.gr_gid;
+
+ /* Copy the name. */
+ len = strlen (srcgrp.gr_name) + 1;
+ BUFCHECK (len);
+ memcpy (&destbuf[c], srcgrp.gr_name, len);
+ destgrp->gr_name = &destbuf[c];
+ c += len;
+
+ /* Copy the password. */
+ len = strlen (srcgrp.gr_passwd) + 1;
+ BUFCHECK (len);
+ memcpy (&destbuf[c], srcgrp.gr_passwd, len);
+ destgrp->gr_passwd = &destbuf[c];
+ c += len;
+
+ /* Count all of the members. */
+ for (memcount = 0; srcgrp.gr_mem[memcount]; memcount++)
+ ;
+
+ /* Allocate a temporary holding area for the pointers to the member
+ contents, including space for a NULL-terminator. */
+ members = malloc (sizeof (char *) * (memcount + 1));
+ if (members == NULL)
+ return ENOMEM;
+
+ /* Copy all of the group members to destbuf and add a pointer to each of
+ them into the 'members' array. */
+ for (i = 0; srcgrp.gr_mem[i]; i++)
+ {
+ len = strlen (srcgrp.gr_mem[i]) + 1;
+ BUFCHECK (len);
+ memcpy (&destbuf[c], srcgrp.gr_mem[i], len);
+ members[i] = &destbuf[c];
+ c += len;
+ }
+ members[i] = NULL;
+
+ /* Copy the pointers from the members array into the buffer and assign them
+ to the gr_mem member of destgrp. */
+ destgrp->gr_mem = (char **) &destbuf[c];
+ len = sizeof (char *) * (memcount + 1);
+ BUFCHECK (len);
+ memcpy (&destbuf[c], members, len);
+ c += len;
+ free (members);
+ members = NULL;
+
+ /* Save the count of members at the end. */
+ BUFCHECK (sizeof (size_t));
+ memcpy (&destbuf[c], &memcount, sizeof (size_t));
+ c += sizeof (size_t);
+
+ if (endptr)
+ *endptr = destbuf + c;
+ return 0;
+}
+
+/* Check that the name, GID and passwd fields match, then
+ copy in the gr_mem array. */
+int
+__merge_grp (struct group *savedgrp, char *savedbuf, char *savedend,
+ size_t buflen, struct group *mergegrp, char *mergebuf)
+{
+ size_t c, i, len;
+ size_t savedmemcount;
+ size_t memcount;
+ size_t membersize;
+ char **members = NULL;
+
+ /* We only support merging members of groups with identical names and
+ GID values. If we hit this case, we need to overwrite the current
+ buffer with the saved one (which is functionally equivalent to
+ treating the new lookup as NSS_STATUS NOTFOUND. */
+ if (mergegrp->gr_gid != savedgrp->gr_gid
+ || strcmp (mergegrp->gr_name, savedgrp->gr_name))
+ return __copy_grp (*savedgrp, buflen, mergegrp, mergebuf, NULL);
+
+ /* Get the count of group members from the last sizeof (size_t) bytes in the
+ mergegrp buffer. */
+ savedmemcount = (size_t) *(savedend - sizeof (size_t));
+
+ /* Get the count of new members to add. */
+ for (memcount = 0; mergegrp->gr_mem[memcount]; memcount++)
+ ;
+
+ /* Create a temporary array to hold the pointers to the member values from
+ both the saved and merge groups. */
+ membersize = savedmemcount + memcount + 1;
+ members = malloc (sizeof (char *) * membersize);
+ if (members == NULL)
+ return ENOMEM;
+
+ /* Copy in the existing member pointers from the saved group
+ Note: this is not NULL-terminated yet. */
+ memcpy (members, savedgrp->gr_mem, sizeof (char *) * savedmemcount);
+
+ /* Back up into the savedbuf until we get back to the NULL-terminator of the
+ group member list. (This means walking back savedmemcount + 1 (char *) pointers
+ and the member count value.
+ The value of c is going to be the used length of the buffer backed up by
+ the member count and further backed up by the size of the pointers. */
+ c = savedend - savedbuf
+ - sizeof (size_t)
+ - sizeof (char *) * (savedmemcount + 1);
+
+ /* Add all the new group members, overwriting the old NULL-terminator while
+ adding the new pointers to the temporary array. */
+ for (i = 0; mergegrp->gr_mem[i]; i++)
+ {
+ len = strlen (mergegrp->gr_mem[i]) + 1;
+ BUFCHECK (len);
+ memcpy (&savedbuf[c], mergegrp->gr_mem[i], len);
+ members[savedmemcount + i] = &savedbuf[c];
+ c += len;
+ }
+ /* Add the NULL-terminator. */
+ members[savedmemcount + memcount] = NULL;
+
+ /* Copy the member array back into the buffer after the member list and free
+ the member array. */
+ savedgrp->gr_mem = (char **) &savedbuf[c];
+ len = sizeof (char *) * membersize;
+ BUFCHECK (len);
+ memcpy (&savedbuf[c], members, len);
+ c += len;
+
+ free (members);
+ members = NULL;
+
+ /* Finally, copy the results back into mergebuf, since that's the buffer
+ that we were provided by the caller. */
+ return __copy_grp (*savedgrp, buflen, mergegrp, mergebuf, NULL);
+}
diff --git a/grp/grp-merge.h b/grp/grp-merge.h
new file mode 100644
index 0000000000000000000000000000000000000000..59013487d0d907c76521ab504e265077937bfb5e
--- /dev/null
+++ b/grp/grp-merge.h
@@ -0,0 +1,35 @@
+/* Group merging implementation.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _GRP_MERGE_H
+#define _GRP_MERGE_H 1
+
+#include <grp.h>
+
+/* Duplicate a grp struct (and its members). When no longer needed, the
+ calling function must free(newbuf). */
+int
+__copy_grp (const struct group srcgrp, const size_t buflen,
+ struct group *destgrp, char *destbuf, char **endptr);
+
+/* Merge the member lists of two grp structs together. */
+int
+__merge_grp (struct group *savedgrp, char *savedbuf, char *savedend,
+ size_t buflen, struct group *mergegrp, char *mergebuf);
+
+#endif /* _GRP_MERGE_H */
diff --git a/manual/nss.texi b/manual/nss.texi
index 66dcceffe01f225f078e88dd006bb90e80c85723..95e3544bcd97995720e7154ec43df4090154bf4c 100644
--- a/manual/nss.texi
+++ b/manual/nss.texi
@@ -178,11 +178,11 @@ where
@var{action} @result{} return | continue
@end smallexample
The case of the keywords is insignificant. The @var{status}
values are the results of a call to a lookup function of a specific
-service. They mean
+service. They mean:
@ftable @samp
@item success
No error occurred and the wanted entry is returned. The default action
for this is @code{return}.
@@ -202,10 +202,54 @@ The service is temporarily unavailable. This could mean a file is
locked or a server currently cannot accept more connections. The
default action is @code{continue}.
@end ftable
@noindent
+The @var{action} values mean:
+
+@ftable @samp
+@item return
+
+If the status matches, stop the lookup process at this service
+specification. If an entry is available, provide it to the application.
+If an error occurred, report it to the application. In case of a prior
+@samp{merge} action, the data is combined with previous lookup results,
+as explained below.
+
+@item continue
+
+If the status matches, proceed with the lookup process at the next
+entry, discarding the result of the current lookup (and any merged
+data). An exception is the @samp{initgroups} database and the
+@samp{success} status, where @samp{continue} acts like @code{merge}
+below.
+
+@item merge
+
+Proceed with the lookup process, retaining the current lookup result.
+This action is useful only with the @samp{success} status. If a
+subsequent service lookup succeeds and has a matching @samp{return}
+specification, the results are merged, the lookup process ends, and the
+merged results are returned to the application. If the following service
+has a matching @samp{merge} action, the lookup process continues,
+retaining the combined data from this and any previous lookups.
+
+After a @code{merge} action, errors from subsequent lookups are ignored,
+and the data gathered so far will be returned.
+
+The @samp{merge} only applies to the @samp{success} status. It is
+currently implemented for the @samp{group} database and its group
+members field, @samp{gr_mem}. If specified for other databases, it
+causes the lookup to fail (if the @var{status} matches).
+
+When processing @samp{merge} for @samp{group} membership, the group GID
+and name must be identical for both entries. If only one or the other is
+a match, the behavior is undefined.
+
+@end ftable
+
+@noindent
If we have a line like
@smallexample
ethers: nisplus [NOTFOUND=return] db files
@end smallexample
diff --git a/nscd/Makefile b/nscd/Makefile
index e1a1aa92fc699aa132f7192da49f698a078e5910..3e6895573ae33221c728617f4c95bb3e8c5d5c47 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -29,16 +29,19 @@ aux := nscd_helper
endif
# To find xmalloc.c
vpath %.c ../locale/programs
+# To find grp-merge.c
+vpath %.c ../grp
+
nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
getgrnam_r getgrgid_r hstcache gethstbyad_r gethstbynm3_r \
getsrvbynm_r getsrvbypt_r servicescache \
dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
xmalloc xstrdup aicache initgrcache gai res_hconf \
- netgroupcache
+ netgroupcache grp-merge
ifeq ($(build-nscd)$(have-thread-library),yesyes)
others += nscd
others-pie += nscd
diff --git a/nscd/getgrgid_r.c b/nscd/getgrgid_r.c
index fe5bda424169d56f642f125ef1f2df77a84de221..25de4a3b0b74841c44844a0541cf4d2365b22515 100644
--- a/nscd/getgrgid_r.c
+++ b/nscd/getgrgid_r.c
@@ -15,17 +15,21 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <grp.h>
+#include "grp/grp-merge.h"
#define LOOKUP_TYPE struct group
#define FUNCTION_NAME getgrgid
#define DATABASE_NAME group
#define ADD_PARAMS gid_t gid
#define ADD_VARIABLES gid
#define BUFLEN NSS_BUFLEN_GROUP
+#define DEEPCOPY_FN __copy_grp
+#define MERGE_FN __merge_grp
+
/* We are nscd, so we don't want to be talking to ourselves. */
#undef USE_NSCD
#include <nss/getXXbyYY_r.c>
diff --git a/nscd/getgrnam_r.c b/nscd/getgrnam_r.c
index 5ec56877f5798ca34c2e0074d5093cc22b6d58dc..386d66c5832ffee68e95195f6e34b723f41d0984 100644
--- a/nscd/getgrnam_r.c
+++ b/nscd/getgrnam_r.c
@@ -15,16 +15,20 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <grp.h>
+#include "grp/grp-merge.h"
#define LOOKUP_TYPE struct group
#define FUNCTION_NAME getgrnam
#define DATABASE_NAME group
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+#define DEEPCOPY_FN __copy_grp
+#define MERGE_FN __merge_grp
+
/* We are nscd, so we don't want to be talking to ourselves. */
#undef USE_NSCD
#include <nss/getXXbyYY_r.c>
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 198f8cfebd51be9c738f03f950f093b0855ab3cb..5f49ae8b828fce6dc30c7ccc9606319bffc52d5b 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -129,10 +129,52 @@
# define AF_VAL af
#else
# define AF_VAL AF_INET
#endif
+
+/* Set defaults for merge functions that haven't been defined. */
+#ifndef DEEPCOPY_FN
+static inline int
+__copy_einval (LOOKUP_TYPE a,
+ const size_t b,
+ LOOKUP_TYPE *c,
+ char *d,
+ char **e)
+{
+ return EINVAL;
+}
+# define DEEPCOPY_FN __copy_einval
+#endif
+
+#ifndef MERGE_FN
+static inline int
+__merge_einval (LOOKUP_TYPE *a,
+ char *b,
+ char *c,
+ size_t d,
+ LOOKUP_TYPE *e,
+ char *f)
+{
+ return EINVAL;
+}
+# define MERGE_FN __merge_einval
+#endif
+
+#define CHECK_MERGE(err, status) \
+do { \
+ if (err) \
+ { \
+ __set_errno (err); \
+ if (err == ERANGE) \
+ status = NSS_STATUS_TRYAGAIN; \
+ else \
+ status = NSS_STATUS_UNAVAIL; \
+ break; \
+ } \
+} while(0)
+
/* Type of the lookup function we need here. */
typedef enum nss_status (*lookup_function) (ADD_PARAMS, LOOKUP_TYPE *, char *,
size_t, int * H_ERRNO_PARM
EXTRA_PARAMS);
@@ -150,17 +192,20 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
{
static bool startp_initialized;
static service_user *startp;
static lookup_function start_fct;
service_user *nip;
+ int do_merge = 0;
+ LOOKUP_TYPE mergegrp;
+ char *mergebuf = NULL;
+ char *endptr = NULL;
union
{
lookup_function l;
void *ptr;
} fct;
-
- int no_more;
+ int no_more, err;
enum nss_status status = NSS_STATUS_UNAVAIL;
#ifdef USE_NSCD
int nscd_status;
#endif
#ifdef NEED_H_ERRNO
@@ -276,13 +321,69 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
&& *h_errnop == NETDB_INTERNAL
#endif
&& errno == ERANGE)
break;
+ if (do_merge)
+ {
+
+ if (status == NSS_STATUS_SUCCESS)
+ {
+ /* The previous loop saved a buffer for merging.
+ Perform the merge now. */
+ err = MERGE_FN (&mergegrp, mergebuf, endptr, buflen, resbuf,
+ buffer);
+ CHECK_MERGE (err,status);
+ do_merge = 0;
+ }
+ else
+ {
+ /* If the result wasn't SUCCESS, copy the saved buffer back
+ into the result buffer and set the status back to
+ NSS_STATUS_SUCCESS to match the previous pass through the loop.
+ * If the next action is CONTINUE, it will overwrite the value
+ currently in the buffer and return the new value.
+ * If the next action is RETURN, we'll return the previously-
+ acquired values.
+ * If the next action is MERGE, then it will be added to the buffer
+ saved from the previous source. */
+ err = DEEPCOPY_FN (mergegrp, buflen, resbuf, buffer, NULL);
+ CHECK_MERGE (err, status);
+ status = NSS_STATUS_SUCCESS;
+ }
+ }
+
+ /* If we were are configured to merge this value with the next one,
+ save the current value of the group struct. */
+ if (nss_next_action (nip, status) == NSS_ACTION_MERGE
+ && status == NSS_STATUS_SUCCESS)
+ {
+ /* Copy the current values into a buffer to be merged with the next
+ set of retrieved values. */
+ if (!mergebuf)
+ {
+ /* Only allocate once and reuse it for as many merges as we need
+ to perform. */
+ mergebuf = malloc (buflen);
+ if (!mergebuf)
+ {
+ __set_errno (ENOMEM);
+ status = NSS_STATUS_UNAVAIL;
+ break;
+ }
+ }
+
+ err = DEEPCOPY_FN (*resbuf, buflen, &mergegrp, mergebuf, &endptr);
+ CHECK_MERGE (err, status);
+ do_merge = 1;
+ }
+
no_more = __nss_next2 (&nip, REENTRANT_NAME_STRING,
REENTRANT2_NAME_STRING, &fct.ptr, status, 0);
}
+ free(mergebuf);
+ mergebuf = NULL;
#ifdef HANDLE_DIGITS_DOTS
done:
#endif
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
diff --git a/nss/getnssent_r.c b/nss/getnssent_r.c
index f5b903671ca53ccad108eeb4e49ea40a45fa5cdf..c0743436f661d4d83045a6353b49291a4c0f220b 100644
--- a/nss/getnssent_r.c
+++ b/nss/getnssent_r.c
@@ -77,11 +77,25 @@ __nss_setent (const char *func_name, db_lookup_function lookup_fct,
if (stayopen_tmp)
status = DL_CALL_FCT (fct.f, (*stayopen_tmp));
else
status = DL_CALL_FCT (fct.f, (0));
- no_more = __nss_next2 (nip, func_name, NULL, &fct.ptr, status, 0);
+ if (nss_next_action (*nip, status) == NSS_ACTION_MERGE)
+ {
+ /* This is a special-case. When [SUCCESS=merge] is in play,
+ _nss_next2() will skip to the next database. Due to the
+ implementation of that function, we can't know whether we're
+ in an enumeration or an individual lookup, which behaves
+ differently with regards to merging. We'll treat SUCCESS as
+ an indication to start the enumeration at this database. */
+ no_more = 1;
+ }
+ else
+ {
+ no_more = __nss_next2 (nip, func_name, NULL, &fct.ptr, status, 0);
+ }
+
if (is_last_nip)
*last_nip = *nip;
}
if (stayopen_tmp)
@@ -173,12 +187,26 @@ __nss_getent_r (const char *getent_func_name,
&& errno == ERANGE)
break;
do
{
- no_more = __nss_next2 (nip, getent_func_name, NULL, &fct.ptr,
- status, 0);
+ if (status == NSS_STATUS_SUCCESS
+ && nss_next_action (*nip, status) == NSS_ACTION_MERGE)
+ {
+ /* This is a special-case. When [SUCCESS=merge] is in play,
+ _nss_next2() will skip to the next database. Due to the
+ implementation of that function, we can't know whether we're
+ in an enumeration or an individual lookup, which behaves
+ differently with regards to merging. We'll treat SUCCESS as
+ an indication to return the results here. */
+ no_more = 1;
+ }
+ else
+ {
+ no_more = __nss_next2 (nip, getent_func_name, NULL, &fct.ptr,
+ status, 0);
+ }
if (is_last_nip)
*last_nip = *nip;
if (! no_more)
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index faf9d1a0d5680aa79e88b2dfeea18da371c336fb..f8f60ba05aad9a571f928a3ea7d3b14f908ccb2d 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -710,10 +710,13 @@ nss_parse_service_list (const char *line)
if (line - name == 6 && __strncasecmp (name, "RETURN", 6) == 0)
action = NSS_ACTION_RETURN;
else if (line - name == 8
&& __strncasecmp (name, "CONTINUE", 8) == 0)
action = NSS_ACTION_CONTINUE;
+ else if (line - name == 5
+ && __strncasecmp (name, "MERGE", 5) == 0)
+ action = NSS_ACTION_MERGE;
else
goto finish;
if (not)
{
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index a5318fa82be43c8314807ad76de231e572e91c06..5bc2de3b1d82978102ac7a129c0ba5b7eb3cfd25 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -30,11 +30,12 @@
/* Actions performed after lookup finished. */
typedef enum
{
NSS_ACTION_CONTINUE,
- NSS_ACTION_RETURN
+ NSS_ACTION_RETURN,
+ NSS_ACTION_MERGE
} lookup_actions;
typedef struct service_library
{

40
glibc-python3.patch Normal file
View File

@ -0,0 +1,40 @@
Use python3 for installed executable python scripts.
Fedora is a Python3-only distribution:
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
This fixes build failures where builders may strictly enforce only
python3 during a transitional phase.
Author: Carlos O'Donell <carlos@redhat.com>
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
index c1c438a1c9f0eae6..b7d3d7bcee87969d 100755
--- a/benchtests/scripts/compare_bench.py
+++ b/benchtests/scripts/compare_bench.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
diff --git a/benchtests/scripts/import_bench.py b/benchtests/scripts/import_bench.py
index 7a55d19f038e64d4..72e6034243a8c9b6 100644
--- a/benchtests/scripts/import_bench.py
+++ b/benchtests/scripts/import_bench.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
diff --git a/benchtests/scripts/validate_benchout.py b/benchtests/scripts/validate_benchout.py
index 55d07c6bce5b5184..04129f9c26c2874c 100755
--- a/benchtests/scripts/validate_benchout.py
+++ b/benchtests/scripts/validate_benchout.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2014-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#

View File

@ -1,29 +0,0 @@
Index: glibc-2.22-386-g95e8397/resolv/res_hconf.c
===================================================================
--- glibc-2.22-386-g95e8397.orig/resolv/res_hconf.c
+++ glibc-2.22-386-g95e8397/resolv/res_hconf.c
@@ -46,6 +46,7 @@
#include "res_hconf.h"
#include <wchar.h>
#include <atomic.h>
+#include <libc-internal.h>
#if IS_IN (libc)
# define fgets_unlocked __fgets_unlocked
@@ -577,7 +578,16 @@ _res_hconf_trim_domain (char *hostname)
for (i = 0; i < _res_hconf.num_trimdomains; ++i)
{
+ DIAG_PUSH_NEEDS_COMMENT
+#if __GNUC_PREREQ (5, 0)
+ /* GCC 5.0 warns about array subscript being above array bounds,
+ but that's not entirely possible since i is limited to
+ num_trimdomains which is limited to <= TRIMDOMAINS_MAX. This
+ is likely PR/59124 which is still not fixed. */
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
+#endif
const char *trim = _res_hconf.trimdomain[i];
+ DIAG_POP_NEEDS_COMMENT
trim_len = strlen (trim);
if (hostname_len > trim_len

View File

@ -1,19 +0,0 @@
--- glibc-2.18-151-g303e567.orig/elf/ldconfig.c 2013-09-25 14:01:01.522446341 -0400
+++ glibc-2.18-151-g303e567/elf/ldconfig.c 2013-09-25 14:06:31.094218857 -0400
@@ -959,6 +959,16 @@
|| dlib_ptr->flag == FLAG_ELF_LIBC6)
&& flag == FLAG_ELF)
dlib_ptr->flag = flag;
+#ifdef __arm__
+ /* In Fedora 20 binutils regressed temporarily and failed to
+ mark hard ABI objects with the correct flag. Therefore we
+ must accept unmarked objects that were previously marked
+ hard ABI. We can remove this check once the entire distribution
+ has been rebuilt. */
+ else if (dlib_ptr->flag & FLAG_ARM_LIBHF &&
+ (flag == FLAG_ELF_LIBC6))
+ ;
+#endif
else
error (0, 0, _("libraries %s and %s in directory %s have same soname but different type."),
dlib_ptr->name, direntry->d_name,

View File

@ -1,90 +0,0 @@
#
# Posted upstream:
# https://sourceware.org/ml/libc-alpha/2013-10/msg00065.html
#
# This is related to bug 1013801 in that it fixes the problem
# by modifying the runtime. In bug 1013801 we have libselinux
# using pthread_atfork which pulls in libpthread, but we don't
# want that, we want libpthread to be pulled in only when
# actually needed by the application. This patch makes it
# possible to avoid requiring libpthread and still use
# pthread_atfork.
#
# The general idea for the design is in the leading comment
# in the source code.
#
diff --git a/nptl/sysdeps/unix/sysv/linux/Makefile b/nptl/sysdeps/unix/sysv/linux/Makefile
index 6078e2d..36fd50b 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -18,7 +18,9 @@
routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
libc-cleanup libc_pthread_init libc_multiple_threads \
- register-atfork unregister-atfork
+ register-atfork unregister-atfork libc_pthread_atfork
+
+static-only-routines += libc_pthread_atfork
shared-only-routines = forward
libpthread-routines = nptl-init vars events version pt-interp \
diff --git a/nptl/libc_pthread_atfork.c b/nptl/libc_pthread_atfork.c
new file mode 100644
index 0000000..667049a
--- /dev/null
+++ b/nptl/libc_pthread_atfork.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* The standard design pattern for making it optional to link against
+ libpthread is to mark the function weak, test if the function
+ address is non-zero and call the function, otherwise use a fallback.
+ The problem with pthread_atfork is that there is no viable
+ fallback. If you need to do something during fork it has to be done
+ via pthread_atfork. This makes having libpthread optional and using
+ pthread_atfork impossible. We make it possible by providing
+ pthread_atfork in libc_nonshared.a. The real work of pthread_atfork
+ is done by __register_atfork which is already provided in
+ libc_nonshared.a. It's included in libc_nonshared.a because
+ __dso_handle has to be unique to each DSO such that unloading the DSO
+ can unregister the atfork handlers. We build pthread_atfork again
+ under a different file name and include it into libc_nonshared.a and
+ libc.a. We keep pthread_atfork in libpthread_nonshared.a and
+ libpthread.a for compatibility and completeness.
+
+ Applications that can't rely on a new glibc should use the following
+ code to optionally include libpthread and still register a function
+ via pthread_atfork i.e. use __register_atfork directly:
+
+ extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
+ extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
+
+ static int __app_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
+ {
+ return __register_atfork (prepare, parent, child,
+ &__dso_handle == NULL ? NULL : __dso_handle);
+ }
+
+ This code requires glibc 2.3.2 or newer. Previous to 2.3.2 no such
+ interfaces exist and at that point is is impossible to have an
+ optional libpthread and call pthread_atfork.
+
+ This code adds no more ABI requirements than already exist since
+ __dso_handle and __register_atfork are already part of the ABI. */
+#include <pthread_atfork.c>

View File

@ -1,47 +0,0 @@
commit 403ce35141da511898cde550f48ebc68a2a3ac82
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Mon Jan 6 14:37:21 2014 +0530
Fix infinite loop in ftell when writing wide char data (BZ #16398)
ftell tries to avoid flushing the buffer when it is in write mode by
converting the wide char data and placing it into the binary buffer.
If the output buffer space is full and there is data to write, the
code reverts to flushing the buffer. This breaks when there is space
in the buffer but it is not enough to convert the next character in
the wide data buffer, due to which __codecvt_do_out returns a
__codecvt_partial status. In this case, ftell keeps running in an
infinite loop.
The fix here is to detect the __codecvt_partial status in addition to
checking if the buffer is full.
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 87d3cdc..877fc1f 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -715,7 +715,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
- fp->_wide_data->_IO_write_base) / clen;
else
{
- enum __codecvt_result status;
+ enum __codecvt_result status = __codecvt_ok;
delta = (fp->_wide_data->_IO_write_ptr
- fp->_wide_data->_IO_write_base);
const wchar_t *write_base = fp->_wide_data->_IO_write_base;
@@ -728,9 +728,12 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
flush buffers for every ftell. */
do
{
- /* Ugh, no point trying to avoid the flush. Just do it
- and go back to how it was with the read mode. */
- if (delta > 0 && new_write_ptr == fp->_IO_buf_end)
+ /* There is not enough space in the buffer to do the entire
+ conversion, so there is no point trying to avoid the
+ buffer flush. Just do it and go back to how it was with
+ the read mode. */
+ if (status == __codecvt_partial
+ || (delta > 0 && new_write_ptr == fp->_IO_buf_end))
{
if (_IO_switch_to_wget_mode (fp))
return WEOF;

View File

@ -1,836 +0,0 @@
commit 03425ba6ab17b87b2c64f0d7b47fb0b86add9993
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Thu Feb 20 15:41:18 2014 +0530
Separate ftell from fseek logic and avoid modifying FILE data (#16532)
ftell semantics are distinct from fseek(SEEK_CUR) especially when it
is called on a file handler that is not yet active. Due to this
caveat, much care needs to be taken while modifying the handler data
and hence, this first iteration on separating out ftell focusses on
maintaining handler data integrity at all times while it figures out
the current stream offset. The result is that it makes a syscall for
every offset request.
There is scope for optimizing this by caching offsets when we know
that the handler is active. A simple way to find out is when the
buffers have data. It is not so simple to find this out when the
buffer is empty without adding some kind of flag.
diff --git a/libio/Makefile b/libio/Makefile
index 8c333ce..8ccd80f 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -60,7 +60,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
tst-wmemstream1 tst-wmemstream2 \
bug-memstream1 bug-wmemstream1 \
tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
- tst-fwrite-error tst-ftell-partial-wide
+ tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler
ifeq (yes,$(build-shared))
# Add test-fopenloc only if shared library is enabled since it depends on
# shared localedata objects.
diff --git a/libio/fileops.c b/libio/fileops.c
index a3499be..a177302 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -931,6 +931,59 @@ _IO_file_sync_mmap (_IO_FILE *fp)
_IO_off64_t
+get_file_offset (_IO_FILE *fp)
+{
+ if ((fp->_flags & _IO_IS_APPENDING) == _IO_IS_APPENDING)
+ {
+ struct stat64 st;
+ bool ret = (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode));
+ if (ret)
+ return st.st_size;
+ else
+ return EOF;
+ }
+ else
+ return _IO_SYSSEEK (fp, 0, _IO_seek_cur);
+}
+
+
+/* ftell{,o} implementation. Don't modify any state of the file pointer while
+ we try to get the current state of the stream. */
+static _IO_off64_t
+do_ftell (_IO_FILE *fp)
+{
+ _IO_off64_t result;
+
+ result = get_file_offset (fp);
+
+ if (result == EOF)
+ return result;
+
+ /* No point looking at unflushed data if we haven't allocated buffers
+ yet. */
+ if (fp->_IO_buf_base != NULL)
+ {
+ bool was_writing = (fp->_IO_write_ptr > fp->_IO_write_base
+ || _IO_in_put_mode (fp));
+
+ /* Adjust for unflushed data. */
+ if (!was_writing)
+ result -= fp->_IO_read_end - fp->_IO_read_ptr;
+ else
+ result += fp->_IO_write_ptr - fp->_IO_read_end;
+ }
+
+ if (result < 0)
+ {
+ __set_errno (EINVAL);
+ return EOF;
+ }
+
+ return result;
+}
+
+
+_IO_off64_t
_IO_new_file_seekoff (fp, offset, dir, mode)
_IO_FILE *fp;
_IO_off64_t offset;
@@ -940,6 +993,13 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
_IO_off64_t result;
_IO_off64_t delta, new_offset;
long count;
+
+ /* Short-circuit into a separate function. We don't want to mix any
+ functionality and we don't want to touch anything inside the FILE
+ object. */
+ if (mode == 0)
+ return do_ftell (fp);
+
/* POSIX.1 8.2.3.7 says that after a call the fflush() the file
offset of the underlying file must be exact. */
int must_be_exact = (fp->_IO_read_base == fp->_IO_read_end
@@ -948,9 +1008,6 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
bool was_writing = (fp->_IO_write_ptr > fp->_IO_write_base
|| _IO_in_put_mode (fp));
- if (mode == 0)
- dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
-
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
@@ -958,7 +1015,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
FIXME: simulate mem-mapped files. */
- else if (was_writing && _IO_switch_to_get_mode (fp))
+ if (was_writing && _IO_switch_to_get_mode (fp))
return EOF;
if (fp->_IO_buf_base == NULL)
@@ -978,30 +1035,10 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
{
case _IO_seek_cur:
/* Adjust for read-ahead (bytes is buffer). */
- if (mode != 0 || !was_writing)
- offset -= fp->_IO_read_end - fp->_IO_read_ptr;
- else
- {
- /* _IO_read_end coincides with fp._offset, so the actual file position
- is fp._offset - (_IO_read_end - new_write_ptr). This is fine
- even if fp._offset is not set, since fp->_IO_read_end is then at
- _IO_buf_base and this adjustment is for unbuffered output. */
- offset -= fp->_IO_read_end - fp->_IO_write_ptr;
- }
+ offset -= fp->_IO_read_end - fp->_IO_read_ptr;
if (fp->_offset == _IO_pos_BAD)
- {
- if (mode != 0)
- goto dumb;
- else
- {
- result = _IO_SYSSEEK (fp, 0, dir);
- if (result == EOF)
- return result;
-
- fp->_offset = result;
- }
- }
+ goto dumb;
/* Make offset absolute, assuming current pointer is file_ptr(). */
offset += fp->_offset;
if (offset < 0)
@@ -1028,10 +1065,6 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
}
/* At this point, dir==_IO_seek_set. */
- /* If we are only interested in the current position we've found it now. */
- if (mode == 0)
- return offset;
-
/* If destination is within current buffer, optimize: */
if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
&& !_IO_in_backup (fp))
diff --git a/libio/libioP.h b/libio/libioP.h
index 4ca723c..8a7b85b 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -397,6 +397,7 @@ extern void _IO_wdoallocbuf (_IO_FILE *) __THROW;
libc_hidden_proto (_IO_wdoallocbuf)
extern void _IO_unsave_wmarkers (_IO_FILE *) __THROW;
extern unsigned _IO_adjust_wcolumn (unsigned, const wchar_t *, int) __THROW;
+extern _IO_off64_t get_file_offset (_IO_FILE *fp);
/* Marker-related function. */
diff --git a/libio/tst-ftell-active-handler.c b/libio/tst-ftell-active-handler.c
new file mode 100644
index 0000000..aac2923
--- /dev/null
+++ b/libio/tst-ftell-active-handler.c
@@ -0,0 +1,366 @@
+/* Verify that ftell returns the correct value at various points before and
+ after the handler on which it is called becomes active.
+ Copyright (C) 2014 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <wchar.h>
+
+static int do_test (void);
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
+#define get_handles_fdopen(filename, fd, fp, fd_mode, mode) \
+({ \
+ int ret = 0; \
+ (fd) = open ((filename), (fd_mode), 0); \
+ if ((fd) == -1) \
+ { \
+ printf ("open failed: %m\n"); \
+ ret = 1; \
+ } \
+ else \
+ { \
+ (fp) = fdopen ((fd), (mode)); \
+ if ((fp) == NULL) \
+ { \
+ printf ("fdopen failed: %m\n"); \
+ close (fd); \
+ ret = 1; \
+ } \
+ } \
+ ret; \
+})
+
+#define get_handles_fopen(filename, fd, fp, mode) \
+({ \
+ int ret = 0; \
+ (fp) = fopen ((filename), (mode)); \
+ if ((fp) == NULL) \
+ { \
+ printf ("fopen failed: %m\n"); \
+ ret = 1; \
+ } \
+ else \
+ { \
+ (fd) = fileno (fp); \
+ if ((fd) == -1) \
+ { \
+ printf ("fileno failed: %m\n"); \
+ ret = 1; \
+ } \
+ } \
+ ret; \
+})
+
+static const void *data;
+static const char *char_data = "abcdef";
+static const wchar_t *wide_data = L"abcdef";
+static size_t data_len;
+/* Maintain the current file length for validation. */
+static size_t file_len;
+
+typedef int (*fputs_func_t) (const void *data, FILE *fp);
+fputs_func_t fputs_func;
+
+/* Test that the value of ftell is not cached when the stream handle is not
+ active. */
+static int
+do_ftell_test (const char *filename)
+{
+ int ret = 0;
+ struct test
+ {
+ const char *mode;
+ int fd_mode;
+ size_t old_off;
+ size_t new_off;
+ } test_modes[] = {
+ {"w", O_WRONLY, 0, data_len},
+ {"w+", O_RDWR, 0, data_len},
+ {"r+", O_RDWR, 0, data_len},
+ {"a", O_WRONLY, data_len, 2 * data_len},
+ {"a+", O_RDWR, 2 * data_len, 3 * data_len},
+ };
+ for (int j = 0; j < 2; j++)
+ {
+ for (int i = 0; i < sizeof (test_modes) / sizeof (struct test); i++)
+ {
+ FILE *fp;
+ int fd;
+ printf ("\tftell: %s (file, \"%s\"): ", j == 0 ? "fdopen" : "fopen",
+ test_modes[i].mode);
+
+ if (j == 0)
+ ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
+ test_modes[i].mode);
+ else
+ ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+
+ if (ret != 0)
+ return 1;
+
+ long off = ftell (fp);
+ if (off != test_modes[i].old_off)
+ {
+ printf ("Incorrect old offset. Expected %zu but got %ld, ",
+ test_modes[i].old_off, off);
+ ret |= 1;
+ }
+ else
+ printf ("old offset = %ld, ", off);
+
+ int ret = write (fd, data, data_len);
+ off = ftell (fp);
+
+ if (off != test_modes[i].new_off)
+ {
+ printf ("Incorrect new offset. Expected %zu but got %ld\n",
+ test_modes[i].old_off, off);
+ ret |= 1;
+ }
+ else
+ printf ("new offset = %ld\n", off);
+
+ fclose (fp);
+ }
+ }
+
+ return ret;
+}
+
+/* This test opens the file for writing, moves the file offset of the
+ underlying file, writes out data and then checks if ftell trips on it. */
+static int
+do_write_test (const char *filename)
+{
+ FILE *fp = NULL;
+ int fd;
+ int ret = 0;
+ struct test
+ {
+ const char *mode;
+ int fd_mode;
+ } test_modes[] = {
+ {"w", O_WRONLY},
+ {"w+", O_RDWR},
+ {"r+", O_RDWR}
+ };
+
+ for (int j = 0; j < 2; j++)
+ {
+ for (int i = 0; i < sizeof (test_modes) / sizeof (struct test); i++)
+ {
+ printf ("\twrite: %s (file, \"%s\"): ", j == 0 ? "fopen" : "fdopen",
+ test_modes[i].mode);
+
+ if (j == 0)
+ ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+ else
+ ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
+ test_modes[i].mode);
+
+ if (ret != 0)
+ return ret;
+
+ /* Move offset to just before the end of the file. */
+ off_t ret = lseek (fd, file_len - 1, SEEK_SET);
+ if (ret == -1)
+ {
+ printf ("lseek failed: %m\n");
+ ret |= 1;
+ }
+
+ /* Write some data. */
+ size_t written = fputs_func (data, fp);
+
+ if (written == EOF)
+ {
+ printf ("fputs[1] failed to write data\n");
+ ret |= 1;
+ }
+
+ /* Verify that the offset points to the end of the file. */
+ long offset = ftell (fp);
+ file_len = file_len - 1 + data_len;
+
+ if (offset != file_len)
+ {
+ printf ("Incorrect offset. Expected %zu, but got %ld\n",
+ file_len, offset);
+
+ ret |= 1;
+ }
+
+ printf ("offset = %ld\n", offset);
+ fclose (fp);
+ }
+ }
+
+ return ret;
+}
+
+/* This test opens a file in append mode, writes some data, and then verifies
+ that ftell does not trip over it. */
+static int
+do_append_test (const char *filename)
+{
+ FILE *fp = NULL;
+ int ret = 0;
+ int fd;
+
+ struct test
+ {
+ const char *mode;
+ int fd_mode;
+ } test_modes[] = {
+ {"a", O_WRONLY},
+ {"a+", O_RDWR}
+ };
+
+ for (int j = 0; j < 2; j++)
+ {
+ for (int i = 0; i < sizeof (test_modes) / sizeof (struct test); i++)
+ {
+ printf ("\tappend: %s (file, \"%s\"): ", j == 0 ? "fopen" : "fdopen",
+ test_modes[i].mode);
+
+ if (j == 0)
+ ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+ else
+ ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
+ test_modes[i].mode);
+
+ if (ret != 0)
+ return ret;
+
+ /* Write some data. */
+ size_t written = fputs_func (data, fp);
+
+ if (written == EOF)
+ {
+ printf ("fputs[1] failed to write all data\n");
+ ret |= 1;
+ }
+
+ /* Verify that the offset points to the end of the file. */
+ long offset = ftell (fp);
+ file_len += data_len;
+
+ if (offset != file_len)
+ {
+ printf ("Incorrect offset. Expected %zu, but got %ld\n",
+ file_len, offset);
+
+ ret |= 1;
+ }
+
+ printf ("offset = %ld\n", offset);
+ fclose (fp);
+ }
+ }
+
+ return ret;
+}
+
+static int
+do_one_test (const char *filename)
+{
+ int ret = 0;
+
+ ret |= do_ftell_test (filename);
+ ret |= do_write_test (filename);
+ ret |= do_append_test (filename);
+
+ return ret;
+}
+
+static int
+do_test (void)
+{
+ int ret = 0;
+ FILE *fp = NULL;
+ char *filename;
+ size_t written;
+ int fd = create_temp_file ("tst-active-handler-tmp.", &filename);
+
+ if (fd == -1)
+ {
+ printf ("create_temp_file: %m\n");
+ return 1;
+ }
+
+ fp = fdopen (fd, "w");
+ if (fp == NULL)
+ {
+ printf ("fdopen[0]: %m\n");
+ close (fd);
+ return 1;
+ }
+
+ data = char_data;
+ data_len = strlen (char_data);
+ file_len = strlen (char_data);
+ written = fputs (data, fp);
+
+ if (written == EOF)
+ {
+ printf ("fputs[1] failed to write data\n");
+ ret = 1;
+ }
+
+ fclose (fp);
+ if (ret)
+ return ret;
+
+ /* Tests for regular files. */
+ puts ("Regular mode:");
+ fputs_func = (fputs_func_t) fputs;
+ data = char_data;
+ data_len = strlen (char_data);
+ ret |= do_one_test (filename);
+
+ /* Truncate the file before repeating the tests in wide mode. */
+ fp = fopen (filename, "w");
+ if (fp == NULL)
+ {
+ printf ("fopen failed %m\n");
+ return 1;
+ }
+ fclose (fp);
+
+ /* Tests for wide files. */
+ puts ("Wide mode:");
+ if (setlocale (LC_ALL, "en_US.UTF-8") == NULL)
+ {
+ printf ("Cannot set en_US.UTF-8 locale.\n");
+ return 1;
+ }
+ fputs_func = (fputs_func_t) fputws;
+ data = wide_data;
+ data_len = wcslen (wide_data);
+ ret |= do_one_test (filename);
+
+ return ret;
+}
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 9cebe77..eda7828 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -596,29 +596,22 @@ done:
return 0;
}
-_IO_off64_t
-_IO_wfile_seekoff (fp, offset, dir, mode)
- _IO_FILE *fp;
- _IO_off64_t offset;
- int dir;
- int mode;
+static _IO_off64_t
+do_ftell_wide (_IO_FILE *fp)
{
- _IO_off64_t result;
- _IO_off64_t delta, new_offset;
- long int count;
- /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
- offset of the underlying file must be exact. */
- int must_be_exact = ((fp->_wide_data->_IO_read_base
- == fp->_wide_data->_IO_read_end)
- && (fp->_wide_data->_IO_write_base
- == fp->_wide_data->_IO_write_ptr));
+ _IO_off64_t result, offset = 0;
- bool was_writing = ((fp->_wide_data->_IO_write_ptr
- > fp->_wide_data->_IO_write_base)
- || _IO_in_put_mode (fp));
-
- if (mode == 0)
+ /* No point looking for offsets in the buffer if it hasn't even been
+ allocated. */
+ if (fp->_wide_data->_IO_buf_base != NULL)
{
+ const wchar_t *wide_read_base;
+ const wchar_t *wide_read_ptr;
+ const wchar_t *wide_read_end;
+ bool was_writing = ((fp->_wide_data->_IO_write_ptr
+ > fp->_wide_data->_IO_write_base)
+ || _IO_in_put_mode (fp));
+
/* XXX For wide stream with backup store it is not very
reasonable to determine the offset. The pushed-back
character might require a state change and we need not be
@@ -633,14 +626,117 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
return -1;
}
- /* There is no more data in the backup buffer. We can
- switch back. */
- _IO_switch_to_main_wget_area (fp);
+ /* Nothing in the backup store, so note the backed up pointers
+ without changing the state. */
+ wide_read_base = fp->_wide_data->_IO_save_base;
+ wide_read_ptr = wide_read_base;
+ wide_read_end = fp->_wide_data->_IO_save_end;
+ }
+ else
+ {
+ wide_read_base = fp->_wide_data->_IO_read_base;
+ wide_read_ptr = fp->_wide_data->_IO_read_ptr;
+ wide_read_end = fp->_wide_data->_IO_read_end;
}
- dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
+ struct _IO_codecvt *cv = fp->_codecvt;
+ int clen = (*cv->__codecvt_do_encoding) (cv);
+
+ if (!was_writing)
+ {
+ if (clen > 0)
+ {
+ offset -= (wide_read_end - wide_read_ptr) * clen;
+ offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+ }
+ else
+ {
+ int nread;
+
+ size_t delta = wide_read_ptr - wide_read_base;
+ __mbstate_t state = fp->_wide_data->_IO_last_state;
+ nread = (*cv->__codecvt_do_length) (cv, &state,
+ fp->_IO_read_base,
+ fp->_IO_read_end, delta);
+ offset -= fp->_IO_read_end - fp->_IO_read_base - nread;
+ }
+ }
+ else
+ {
+ if (clen > 0)
+ offset += (fp->_wide_data->_IO_write_ptr
+ - fp->_wide_data->_IO_write_base) * clen;
+ else
+ {
+ size_t delta = (fp->_wide_data->_IO_write_ptr
+ - fp->_wide_data->_IO_write_base);
+
+ /* Allocate enough space for the conversion. */
+ size_t outsize = delta * sizeof (wchar_t);
+ char *out = malloc (outsize);
+ char *outstop = out;
+ const wchar_t *in = fp->_wide_data->_IO_write_base;
+
+ enum __codecvt_result status;
+
+ __mbstate_t state = fp->_wide_data->_IO_last_state;
+ status = (*cv->__codecvt_do_out) (cv, &state,
+ in, in + delta, &in,
+ out, out + outsize, &outstop);
+
+ /* We don't check for __codecvt_partial because it can be
+ returned on one of two conditions: either the output
+ buffer is full or the input sequence is incomplete. We
+ take care to allocate enough buffer and our input
+ sequences must be complete since they are accepted as
+ wchar_t; if not, then that is an error. */
+ if (__glibc_unlikely (status != __codecvt_ok))
+ return WEOF;
+
+ offset += outstop - out;
+ }
+
+ /* _IO_read_end coincides with fp._offset, so the actual file position
+ is fp._offset - (_IO_read_end - new_write_ptr). */
+ offset -= fp->_IO_read_end - fp->_IO_write_ptr;
+ }
}
+ result = get_file_offset (fp);
+
+ if (result == EOF)
+ return result;
+
+ result += offset;
+
+ return result;
+}
+
+_IO_off64_t
+_IO_wfile_seekoff (fp, offset, dir, mode)
+ _IO_FILE *fp;
+ _IO_off64_t offset;
+ int dir;
+ int mode;
+{
+ _IO_off64_t result;
+ _IO_off64_t delta, new_offset;
+ long int count;
+
+ if (mode == 0)
+ return do_ftell_wide (fp);
+
+ /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
+ offset of the underlying file must be exact. */
+ int must_be_exact = ((fp->_wide_data->_IO_read_base
+ == fp->_wide_data->_IO_read_end)
+ && (fp->_wide_data->_IO_write_base
+ == fp->_wide_data->_IO_write_ptr));
+
+ bool was_writing = ((fp->_wide_data->_IO_write_ptr
+ > fp->_wide_data->_IO_write_base)
+ || _IO_in_put_mode (fp));
+
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
@@ -648,7 +744,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
FIXME: simulate mem-mapped files. */
- else if (was_writing && _IO_switch_to_wget_mode (fp))
+ if (was_writing && _IO_switch_to_wget_mode (fp))
return WEOF;
if (fp->_wide_data->_IO_buf_base == NULL)
@@ -693,7 +789,6 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
{
int nread;
- flushed:
delta = (fp->_wide_data->_IO_read_ptr
- fp->_wide_data->_IO_read_base);
fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
@@ -706,80 +801,9 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
offset -= fp->_IO_read_end - fp->_IO_read_base - nread;
}
}
- else
- {
- char *new_write_ptr = fp->_IO_write_ptr;
-
- if (clen > 0)
- offset += (fp->_wide_data->_IO_write_ptr
- - fp->_wide_data->_IO_write_base) / clen;
- else
- {
- enum __codecvt_result status = __codecvt_ok;
- delta = (fp->_wide_data->_IO_write_ptr
- - fp->_wide_data->_IO_write_base);
- const wchar_t *write_base = fp->_wide_data->_IO_write_base;
-
- /* FIXME: This actually ends up in two iterations of conversion,
- one here and the next when the buffer actually gets flushed.
- It may be possible to optimize this in future so that
- wdo_write identifies already converted content and does not
- redo it. In any case, this is much better than having to
- flush buffers for every ftell. */
- do
- {
- /* There is not enough space in the buffer to do the entire
- conversion, so there is no point trying to avoid the
- buffer flush. Just do it and go back to how it was with
- the read mode. */
- if (status == __codecvt_partial
- || (delta > 0 && new_write_ptr == fp->_IO_buf_end))
- {
- if (_IO_switch_to_wget_mode (fp))
- return WEOF;
- goto flushed;
- }
-
- const wchar_t *new_wbase = fp->_wide_data->_IO_write_base;
- fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
- status = (*cv->__codecvt_do_out) (cv,
- &fp->_wide_data->_IO_state,
- write_base,
- write_base + delta,
- &new_wbase,
- new_write_ptr,
- fp->_IO_buf_end,
- &new_write_ptr);
-
- delta -= new_wbase - write_base;
-
- /* If there was an error, then return WEOF.
- TODO: set buffer state. */
- if (__glibc_unlikely (status == __codecvt_error))
- return WEOF;
- }
- while (delta > 0);
- }
-
- /* _IO_read_end coincides with fp._offset, so the actual file position
- is fp._offset - (_IO_read_end - new_write_ptr). This is fine
- even if fp._offset is not set, since fp->_IO_read_end is then at
- _IO_buf_base and this adjustment is for unbuffered output. */
- offset -= fp->_IO_read_end - new_write_ptr;
- }
if (fp->_offset == _IO_pos_BAD)
- {
- if (mode != 0)
- goto dumb;
- else
- {
- result = _IO_SYSSEEK (fp, 0, dir);
- if (result == EOF)
- return result;
- fp->_offset = result;
- }
- }
+ goto dumb;
/* Make offset absolute, assuming current pointer is file_ptr(). */
offset += fp->_offset;
@@ -802,10 +826,6 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
}
/* At this point, dir==_IO_seek_set. */
- /* If we are only interested in the current position we've found it now. */
- if (mode == 0)
- return offset;
-
/* If destination is within current buffer, optimize: */
if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
&& !_IO_in_backup (fp))

View File

@ -1,183 +0,0 @@
commit 4a68e8ded4fef2b00fbfc6baf1e79e46389871ca
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Thu Feb 20 15:55:16 2014 +0530
Use cached offset in ftell when reliable
The cached offset is reliable to use in ftell when the stream handle
is active. We can consider a stream as being active when there is
unbuffered data. However, even in this case, we can use the cached
offset only when the stream is not being written to in a+ mode,
because this case may have unbuffered data and a stale offset; the
previous read could have sent it off somewhere other than the end of
the file.
There were a couple of adjustments necessary to get this to work.
Firstly, fdopen now ceases to use _IO_attach_fd because it sets the
offset cache to the current file position. This is not correct
because there could be changes to the file descriptor before the
stream handle is activated, which would not get reflected.
A similar offset caching action is done in _IO_fwide, claiming that
wide streams have 'problems' with the file offsets. There don't seem
to be any obvious problems with not having the offset cache available,
other than that it will have to be queried in a subsequent
read/write/seek. I have removed this as well.
The testsuite passes successfully with these changes on x86_64.
diff --git a/libio/fileops.c b/libio/fileops.c
index a177302..c44a5da 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -952,12 +952,8 @@ get_file_offset (_IO_FILE *fp)
static _IO_off64_t
do_ftell (_IO_FILE *fp)
{
- _IO_off64_t result;
-
- result = get_file_offset (fp);
-
- if (result == EOF)
- return result;
+ _IO_off64_t result = 0;
+ bool use_cached_offset = false;
/* No point looking at unflushed data if we haven't allocated buffers
yet. */
@@ -971,8 +967,34 @@ do_ftell (_IO_FILE *fp)
result -= fp->_IO_read_end - fp->_IO_read_ptr;
else
result += fp->_IO_write_ptr - fp->_IO_read_end;
+
+ /* It is safe to use the cached offset when available if there is
+ unbuffered data (indicating that the file handle is active) and the
+ handle is not for a file open in a+ mode. The latter condition is
+ because there could be a scenario where there is a switch from read
+ mode to write mode using an fseek to an arbitrary position. In this
+ case, there would be unbuffered data due to be appended to the end of
+ the file, but the offset may not necessarily be the end of the
+ file. It is fine to use the cached offset when the a+ stream is in
+ read mode though, since the offset is maintained correctly in that
+ case. Note that this is not a comprehensive set of cases when the
+ offset is reliable. The offset may be reliable even in some cases
+ where there is no buffered input and the handle is active, but it's
+ just that we don't have a way to identify that condition reliably. */
+ use_cached_offset = (result != 0 && fp->_offset != _IO_pos_BAD
+ && ((fp->_flags & (_IO_IS_APPENDING | _IO_NO_READS))
+ == (_IO_IS_APPENDING | _IO_NO_READS)
+ && was_writing));
}
+ if (use_cached_offset)
+ result += fp->_offset;
+ else
+ result += get_file_offset (fp);
+
+ if (result == EOF)
+ return result;
+
if (result < 0)
{
__set_errno (EINVAL);
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index 066ff19..4525f0f 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -141,9 +141,6 @@ _IO_new_fdopen (fd, mode)
#ifdef _IO_MTSAFE_IO
new_f->fp.file._lock = &new_f->lock;
#endif
- /* Set up initially to use the `maybe_mmap' jump tables rather than using
- __fopen_maybe_mmap to do it, because we need them in place before we
- call _IO_file_attach or else it will allocate a buffer immediately. */
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd,
#ifdef _G_HAVE_MMAP
(use_mmap && (read_write & _IO_NO_WRITES))
@@ -159,13 +156,10 @@ _IO_new_fdopen (fd, mode)
#if !_IO_UNIFIED_JUMPTABLES
new_f->fp.vtable = NULL;
#endif
- if (_IO_file_attach ((_IO_FILE *) &new_f->fp, fd) == NULL)
- {
- _IO_setb (&new_f->fp.file, NULL, NULL, 0);
- _IO_un_link (&new_f->fp);
- free (new_f);
- return NULL;
- }
+ /* We only record the fd because _IO_file_init will have unset the offset.
+ We don't need to get the current offset in the file now since it could
+ change between now and when the handle is activated. */
+ new_f->fp.file._fileno = fd;
new_f->fp.file._flags &= ~_IO_DELETE_DONT_CLOSE;
_IO_mask_flags (&new_f->fp.file, read_write,
diff --git a/libio/iofwide.c b/libio/iofwide.c
index 5cff632..64187e4 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -199,12 +199,6 @@ _IO_fwide (fp, mode)
/* From now on use the wide character callback functions. */
((struct _IO_FILE_plus *) fp)->vtable = fp->_wide_data->_wide_vtable;
-
- /* One last twist: we get the current stream position. The wide
- char streams have much more problems with not knowing the
- current position and so we should disable the optimization
- which allows the functions without knowing the position. */
- fp->_offset = _IO_SYSSEEK (fp, 0, _IO_seek_cur);
}
/* Set the mode now. */
diff --git a/libio/wfileops.c b/libio/wfileops.c
index eda7828..651f5ce 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -600,6 +600,7 @@ static _IO_off64_t
do_ftell_wide (_IO_FILE *fp)
{
_IO_off64_t result, offset = 0;
+ bool use_cached_offset = false;
/* No point looking for offsets in the buffer if it hasn't even been
allocated. */
@@ -696,13 +697,36 @@ do_ftell_wide (_IO_FILE *fp)
offset += outstop - out;
}
- /* _IO_read_end coincides with fp._offset, so the actual file position
- is fp._offset - (_IO_read_end - new_write_ptr). */
+ /* _IO_read_end coincides with fp._offset, so the actual file
+ position is fp._offset - (_IO_read_end - new_write_ptr). */
offset -= fp->_IO_read_end - fp->_IO_write_ptr;
+
}
+
+ /* It is safe to use the cached offset when available if there is
+ unbuffered data (indicating that the file handle is active) and
+ the handle is not for a file open in a+ mode. The latter
+ condition is because there could be a scenario where there is a
+ switch from read mode to write mode using an fseek to an arbitrary
+ position. In this case, there would be unbuffered data due to be
+ appended to the end of the file, but the offset may not
+ necessarily be the end of the file. It is fine to use the cached
+ offset when the a+ stream is in read mode though, since the offset
+ is maintained correctly in that case. Note that this is not a
+ comprehensive set of cases when the offset is reliable. The
+ offset may be reliable even in some cases where there is no
+ buffered input and the handle is active, but it's just that we
+ don't have a way to identify that condition reliably. */
+ use_cached_offset = (offset != 0 && fp->_offset != _IO_pos_BAD
+ && ((fp->_flags & (_IO_IS_APPENDING | _IO_NO_READS))
+ == (_IO_IS_APPENDING | _IO_NO_READS)
+ && was_writing));
}
- result = get_file_offset (fp);
+ if (use_cached_offset)
+ result = fp->_offset;
+ else
+ result = get_file_offset (fp);
if (result == EOF)
return result;

View File

@ -1,3 +1,12 @@
Short description: Add syslog.target dependency.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-Fedora: #1070416
Upstream status: not-needed
Fedora-specific changes to the nscd.service file.
See also: glibc-nscd-sysconfig.patch.
--- a/nscd/nscd.service --- a/nscd/nscd.service
+++ b/nscd/nscd.service +++ b/nscd/nscd.service
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@

View File

@ -1,47 +0,0 @@
Upstream patch:
commit ff889b196575c2fbf6aa7130abb1ec862714ea4e
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Feb 19 14:21:34 2016 +0100
Remove trailing newline from date_fmt in Serbian locales [BZ #19581]
diff --git a/localedata/locales/sr_ME b/localedata/locales/sr_ME
index 4f243dc..dd68df8 100644
--- a/localedata/locales/sr_ME
+++ b/localedata/locales/sr_ME
@@ -119,7 +119,7 @@ am_pm "";""
t_fmt_ampm "<U0025><U0054>"
date_fmt "<U0025><U0061><U002c><U0020><U0025><U0065><U002E><U0020>/
<U0025><U0062><U0020><U0025><U0059><U002E><U0020><U0020><U0025><U0048>/
-<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U000A>"
+<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A>"
week 7;19971130;4
first_weekday 2
first_workday 2
diff --git a/localedata/locales/sr_RS b/localedata/locales/sr_RS
index 2ae085b..ffea86f 100644
--- a/localedata/locales/sr_RS
+++ b/localedata/locales/sr_RS
@@ -300,7 +300,7 @@ am_pm "";""
t_fmt_ampm "<U0025><U0054>"
date_fmt "<U0025><U0061><U002C><U0020><U0025><U0065><U002E><U0020>/
<U0025><U0062><U0020><U0025><U0059><U002E><U0020><U0020><U0025><U0048>/
-<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U000A>"
+<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A>"
week 7;19971130;4
first_weekday 2
first_workday 2
diff --git a/localedata/locales/sr_RS@latin b/localedata/locales/sr_RS@latin
index da6628b..fd10ea6 100644
--- a/localedata/locales/sr_RS@latin
+++ b/localedata/locales/sr_RS@latin
@@ -120,7 +120,7 @@ am_pm "";""
t_fmt_ampm "<U0025><U0054>"
date_fmt "<U0025><U0061><U002c><U0020><U0025><U0065><U002E><U0020>/
<U0025><U0062><U0020><U0025><U0059><U002E><U0020><U0020><U0025><U0048>/
-<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U000A>"
+<U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A>"
week 7;19971130;4
first_weekday 2
first_workday 2

View File

@ -1,408 +0,0 @@
Revert this upstream commit:
commit 2212c1420c92a33b0e0bd9a34938c9814a56c0f7
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Feb 19 15:52:08 2015 +0100
Simplify handling of nameserver configuration in resolver
Remove use of ext.nsmap member of struct __res_state and always use
an identity mapping betwen the nsaddr_list array and the ext.nsaddrs
array. The fact that a nameserver has an IPv6 address is signalled by
setting nsaddr_list[].sin_family to zero.
reverted:
Index: b/resolv/res_init.c
===================================================================
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -153,8 +153,10 @@ __res_vinit(res_state statp, int preinit
char *cp, **pp;
int n;
char buf[BUFSIZ];
- int nserv = 0; /* number of nameservers read from file */
- int have_serv6 = 0;
+ int nserv = 0; /* number of IPv4 nameservers read from file */
+#ifdef _LIBC
+ int nservall = 0; /* number of (IPv4 + IPV6) nameservers read from file */
+#endif
int haveenv = 0;
int havesearch = 0;
#ifdef RESOLVSORT
@@ -183,9 +185,15 @@ __res_vinit(res_state statp, int preinit
statp->_flags = 0;
statp->qhook = NULL;
statp->rhook = NULL;
+ statp->_u._ext.nsinit = 0;
statp->_u._ext.nscount = 0;
- for (n = 0; n < MAXNS; n++)
- statp->_u._ext.nsaddrs[n] = NULL;
+#ifdef _LIBC
+ statp->_u._ext.nscount6 = 0;
+ for (n = 0; n < MAXNS; n++) {
+ statp->_u._ext.nsaddrs[n] = NULL;
+ statp->_u._ext.nsmap[n] = MAXNS;
+ }
+#endif
/* Allow user to override the local domain definition */
if ((cp = getenv("LOCALDOMAIN")) != NULL) {
@@ -289,7 +297,11 @@ __res_vinit(res_state statp, int preinit
continue;
}
/* read nameservers to query */
+#ifdef _LIBC
+ if (MATCH(buf, "nameserver") && nservall < MAXNS) {
+#else
if (MATCH(buf, "nameserver") && nserv < MAXNS) {
+#endif
struct in_addr a;
cp = buf + sizeof("nameserver") - 1;
@@ -297,12 +309,13 @@ __res_vinit(res_state statp, int preinit
cp++;
if ((*cp != '\0') && (*cp != '\n')
&& __inet_aton(cp, &a)) {
- statp->nsaddr_list[nserv].sin_addr = a;
- statp->nsaddr_list[nserv].sin_family = AF_INET;
- statp->nsaddr_list[nserv].sin_port =
+ statp->nsaddr_list[nservall].sin_addr = a;
+ statp->nsaddr_list[nservall].sin_family = AF_INET;
+ statp->nsaddr_list[nservall].sin_port =
htons(NAMESERVER_PORT);
nserv++;
#ifdef _LIBC
+ nservall++;
} else {
struct in6_addr a6;
char *el;
@@ -344,11 +357,10 @@ __res_vinit(res_state statp, int preinit
}
}
- statp->nsaddr_list[nserv].sin_family = 0;
- statp->_u._ext.nsaddrs[nserv] = sa6;
- statp->_u._ext.nssocks[nserv] = -1;
- have_serv6 = 1;
- nserv++;
+ statp->_u._ext.nsaddrs[nservall] = sa6;
+ statp->_u._ext.nssocks[nservall] = -1;
+ statp->_u._ext.nsmap[nservall] = MAXNS + 1;
+ nservall++;
}
}
#endif
@@ -403,9 +415,10 @@ __res_vinit(res_state statp, int preinit
continue;
}
}
- statp->nscount = nserv;
+ statp->nscount = nservall;
#ifdef _LIBC
- if (have_serv6) {
+ if (nservall - nserv > 0) {
+ statp->_u._ext.nscount6 = nservall - nserv;
/* We try IPv6 servers again. */
statp->ipv6_unavail = false;
}
@@ -594,7 +607,11 @@ __res_iclose(res_state statp, bool free_
statp->_vcsock = -1;
statp->_flags &= ~(RES_F_VC | RES_F_CONN);
}
+#ifdef _LIBC
+ for (ns = 0; ns < MAXNS; ns++)
+#else
for (ns = 0; ns < statp->_u._ext.nscount; ns++)
+#endif
if (statp->_u._ext.nsaddrs[ns]) {
if (statp->_u._ext.nssocks[ns] != -1) {
close_not_cancel_no_status(statp->_u._ext.nssocks[ns]);
@@ -605,6 +622,8 @@ __res_iclose(res_state statp, bool free_
statp->_u._ext.nsaddrs[ns] = NULL;
}
}
+ if (free_addr)
+ statp->_u._ext.nsinit = 0;
}
libc_hidden_def (__res_iclose)
Index: b/resolv/res_send.c
===================================================================
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -176,7 +176,6 @@ evNowTime(struct timespec *res) {
/* Forward. */
-static struct sockaddr *get_nsaddr (res_state, int);
static int send_vc(res_state, const u_char *, int,
const u_char *, int,
u_char **, int *, int *, int, u_char **,
@@ -214,21 +213,20 @@ res_ourserver_p(const res_state statp, c
in_port_t port = in4p->sin_port;
in_addr_t addr = in4p->sin_addr.s_addr;
- for (ns = 0; ns < statp->nscount; ns++) {
+ for (ns = 0; ns < MAXNS; ns++) {
const struct sockaddr_in *srv =
- (struct sockaddr_in *) get_nsaddr (statp, ns);
+ (struct sockaddr_in *)EXT(statp).nsaddrs[ns];
- if ((srv->sin_family == AF_INET) &&
+ if ((srv != NULL) && (srv->sin_family == AF_INET) &&
(srv->sin_port == port) &&
(srv->sin_addr.s_addr == INADDR_ANY ||
srv->sin_addr.s_addr == addr))
return (1);
}
} else if (inp->sin6_family == AF_INET6) {
- for (ns = 0; ns < statp->nscount; ns++) {
- const struct sockaddr_in6 *srv
- = (struct sockaddr_in6 *) get_nsaddr (statp, ns);
- if ((srv->sin6_family == AF_INET6) &&
+ for (ns = 0; ns < MAXNS; ns++) {
+ const struct sockaddr_in6 *srv = EXT(statp).nsaddrs[ns];
+ if ((srv != NULL) && (srv->sin6_family == AF_INET6) &&
(srv->sin6_port == inp->sin6_port) &&
!(memcmp(&srv->sin6_addr, &in6addr_any,
sizeof (struct in6_addr)) &&
@@ -378,48 +376,80 @@ __libc_res_nsend(res_state statp, const
* If the ns_addr_list in the resolver context has changed, then
* invalidate our cached copy and the associated timing data.
*/
- if (EXT(statp).nscount != 0) {
+ if (EXT(statp).nsinit) {
int needclose = 0;
if (EXT(statp).nscount != statp->nscount)
needclose++;
else
- for (ns = 0; ns < statp->nscount; ns++) {
- if (statp->nsaddr_list[ns].sin_family != 0
+ for (ns = 0; ns < MAXNS; ns++) {
+ unsigned int map = EXT(statp).nsmap[ns];
+ if (map < MAXNS
&& !sock_eq((struct sockaddr_in6 *)
- &statp->nsaddr_list[ns],
+ &statp->nsaddr_list[map],
EXT(statp).nsaddrs[ns]))
{
needclose++;
break;
}
}
- if (needclose) {
+ if (needclose)
__res_iclose(statp, false);
- EXT(statp).nscount = 0;
- }
}
/*
* Maybe initialize our private copy of the ns_addr_list.
*/
- if (EXT(statp).nscount == 0) {
- for (ns = 0; ns < statp->nscount; ns++) {
- EXT(statp).nssocks[ns] = -1;
- if (statp->nsaddr_list[ns].sin_family == 0)
- continue;
- if (EXT(statp).nsaddrs[ns] == NULL)
- EXT(statp).nsaddrs[ns] =
+ if (EXT(statp).nsinit == 0) {
+ unsigned char map[MAXNS];
+
+ memset (map, MAXNS, sizeof (map));
+ for (n = 0; n < MAXNS; n++) {
+ ns = EXT(statp).nsmap[n];
+ if (ns < statp->nscount)
+ map[ns] = n;
+ else if (ns < MAXNS) {
+ free(EXT(statp).nsaddrs[n]);
+ EXT(statp).nsaddrs[n] = NULL;
+ EXT(statp).nsmap[n] = MAXNS;
+ }
+ }
+ n = statp->nscount;
+ if (statp->nscount > EXT(statp).nscount)
+ for (n = EXT(statp).nscount, ns = 0;
+ n < statp->nscount; n++) {
+ while (ns < MAXNS
+ && EXT(statp).nsmap[ns] != MAXNS)
+ ns++;
+ if (ns == MAXNS)
+ break;
+ /* NS never exceeds MAXNS, but gcc 4.9 somehow
+ does not see this. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9,
+ "-Warray-bounds");
+ EXT(statp).nsmap[ns] = n;
+ DIAG_POP_NEEDS_COMMENT;
+ map[n] = ns++;
+ }
+ EXT(statp).nscount = n;
+ for (ns = 0; ns < EXT(statp).nscount; ns++) {
+ n = map[ns];
+ if (EXT(statp).nsaddrs[n] == NULL)
+ EXT(statp).nsaddrs[n] =
malloc(sizeof (struct sockaddr_in6));
- if (EXT(statp).nsaddrs[ns] != NULL)
- memset (mempcpy(EXT(statp).nsaddrs[ns],
+ if (EXT(statp).nsaddrs[n] != NULL) {
+ memset (mempcpy(EXT(statp).nsaddrs[n],
&statp->nsaddr_list[ns],
sizeof (struct sockaddr_in)),
'\0',
sizeof (struct sockaddr_in6)
- sizeof (struct sockaddr_in));
+ EXT(statp).nssocks[n] = -1;
+ n++;
+ }
}
- EXT(statp).nscount = statp->nscount;
+ EXT(statp).nsinit = 1;
}
/*
@@ -428,37 +458,44 @@ __libc_res_nsend(res_state statp, const
*/
if (__builtin_expect ((statp->options & RES_ROTATE) != 0, 0) &&
(statp->options & RES_BLAST) == 0) {
- struct sockaddr_in ina;
- struct sockaddr_in6 *inp;
- int lastns = statp->nscount - 1;
- int fd;
-
- inp = EXT(statp).nsaddrs[0];
- ina = statp->nsaddr_list[0];
- fd = EXT(statp).nssocks[0];
- for (ns = 0; ns < lastns; ns++) {
- EXT(statp).nsaddrs[ns] = EXT(statp).nsaddrs[ns + 1];
- statp->nsaddr_list[ns] = statp->nsaddr_list[ns + 1];
- EXT(statp).nssocks[ns] = EXT(statp).nssocks[ns + 1];
- }
- EXT(statp).nsaddrs[lastns] = inp;
- statp->nsaddr_list[lastns] = ina;
- EXT(statp).nssocks[lastns] = fd;
+ struct sockaddr_in6 *ina;
+ unsigned int map;
+
+ n = 0;
+ while (n < MAXNS && EXT(statp).nsmap[n] == MAXNS)
+ n++;
+ if (n < MAXNS) {
+ ina = EXT(statp).nsaddrs[n];
+ map = EXT(statp).nsmap[n];
+ for (;;) {
+ ns = n + 1;
+ while (ns < MAXNS
+ && EXT(statp).nsmap[ns] == MAXNS)
+ ns++;
+ if (ns == MAXNS)
+ break;
+ EXT(statp).nsaddrs[n] = EXT(statp).nsaddrs[ns];
+ EXT(statp).nsmap[n] = EXT(statp).nsmap[ns];
+ n = ns;
+ }
+ EXT(statp).nsaddrs[n] = ina;
+ EXT(statp).nsmap[n] = map;
+ }
}
/*
* Send request, RETRY times, or until successful.
*/
for (try = 0; try < statp->retry; try++) {
- for (ns = 0; ns < statp->nscount; ns++)
+ for (ns = 0; ns < MAXNS; ns++)
{
#ifdef DEBUG
char tmpbuf[40];
#endif
-#if defined USE_HOOKS || defined DEBUG
- struct sockaddr *nsap = get_nsaddr (statp, ns);
-#endif
+ struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
+ if (nsap == NULL)
+ goto next_ns;
same_ns:
#ifdef USE_HOOKS
if (__glibc_unlikely (statp->qhook != NULL)) {
@@ -615,21 +652,6 @@ libresolv_hidden_def (res_nsend)
/* Private */
-static struct sockaddr *
-get_nsaddr (res_state statp, int n)
-{
-
- if (statp->nsaddr_list[n].sin_family == 0 && EXT(statp).nsaddrs[n] != NULL)
- /* EXT(statp).nsaddrs[n] holds an address that is larger than
- struct sockaddr, and user code did not update
- statp->nsaddr_list[n]. */
- return (struct sockaddr *) EXT(statp).nsaddrs[n];
- else
- /* User code updated statp->nsaddr_list[n], or statp->nsaddr_list[n]
- has the same content as EXT(statp).nsaddrs[n]. */
- return (struct sockaddr *) (void *) &statp->nsaddr_list[n];
-}
-
static int
send_vc(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -644,7 +666,7 @@ send_vc(res_state statp,
// XXX REMOVE
// int anssiz = *anssizp;
HEADER *anhp = (HEADER *) ans;
- struct sockaddr *nsap = get_nsaddr (statp, ns);
+ struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
int truncating, connreset, n;
/* On some architectures compiler might emit a warning indicating
'resplen' may be used uninitialized. However if buf2 == NULL
@@ -677,8 +699,8 @@ send_vc(res_state statp,
if (getpeername(statp->_vcsock,
(struct sockaddr *)&peer, &size) < 0 ||
- !sock_eq(&peer, (struct sockaddr_in6 *) nsap)) {
- __res_iclose(statp, false);
+ !sock_eq(&peer, nsap)) {
+ __res_iclose(statp, false);
statp->_flags &= ~RES_F_VC;
}
}
@@ -687,19 +709,20 @@ send_vc(res_state statp,
if (statp->_vcsock >= 0)
__res_iclose(statp, false);
- statp->_vcsock = socket(nsap->sa_family, SOCK_STREAM, 0);
+ statp->_vcsock = socket(nsap->sin6_family, SOCK_STREAM, 0);
if (statp->_vcsock < 0) {
*terrno = errno;
Perror(statp, stderr, "socket(vc)", errno);
return (-1);
}
__set_errno (0);
- if (connect(statp->_vcsock, nsap,
- nsap->sa_family == AF_INET
+ if (connect(statp->_vcsock, (struct sockaddr *)nsap,
+ nsap->sin6_family == AF_INET
? sizeof (struct sockaddr_in)
: sizeof (struct sockaddr_in6)) < 0) {
*terrno = errno;
- Aerror(statp, stderr, "connect/vc", errno, nsap);
+ Aerror(statp, stderr, "connect/vc", errno,
+ (struct sockaddr *) nsap);
__res_iclose(statp, false);
return (0);
}
@@ -906,7 +929,8 @@ static int
reopen (res_state statp, int *terrno, int ns)
{
if (EXT(statp).nssocks[ns] == -1) {
- struct sockaddr *nsap = get_nsaddr (statp, ns);
+ struct sockaddr *nsap
+ = (struct sockaddr *) EXT(statp).nsaddrs[ns];
socklen_t slen;
/* only try IPv6 if IPv6 NS and if not failed before */

22
glibc-rh1615608.patch Normal file
View File

@ -0,0 +1,22 @@
Please see the following bug for a complete summary:
https://bugzilla.redhat.com/show_bug.cgi?id=1615608
Index: glibc-2.28/manual/startup.texi
===================================================================
--- glibc-2.28.orig/manual/startup.texi
+++ glibc-2.28/manual/startup.texi
@@ -1005,14 +1005,6 @@ This function actually terminates the pr
intercept this signal; see @ref{Signal Handling}.
@end deftypefun
-@c Put in by rms. Don't remove.
-@cartouche
-@strong{Future Change Warning:} Proposed Federal censorship regulations
-may prohibit us from giving you information about the possibility of
-calling this function. We would be required to say that this is not an
-acceptable way of terminating a program.
-@end cartouche
-
@node Termination Internals
@subsection Termination Internals

View File

@ -1,3 +1,14 @@
Short description: Add UCS-2 aliases.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #697421
Upstream status: https://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
This is a Fedora-specific change to include new aliases for UCS-2
data for gconv used by a certain class of users. This should be
revisited at some point to determine if those users are just using
UTF-8 at this point.
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600 --- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700 +++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700

View File

@ -1,3 +1,14 @@
Short description: Work ld.so --verify crash on debuginfo files.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #741105, #767146
Upstream status: not-needed
This change is designed to work around running ld.so on a debuginfo
file. This is the wrong fix for this problem and should be dropped.
The correct solution is to mark debuginfo files as new types of
ELF files.
Index: glibc-2.22-386-g95e8397/elf/dl-load.c Index: glibc-2.22-386-g95e8397/elf/dl-load.c
=================================================================== ===================================================================
--- glibc-2.22-386-g95e8397.orig/elf/dl-load.c --- glibc-2.22-386-g95e8397.orig/elf/dl-load.c

View File

@ -1,3 +1,16 @@
Short description: fnmatch() fails with MBCS.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #819430, #826149, #826151
Bug-Upstream: #14185
Upstream status: not-submitted
fnmatch() fails when '*' wildcard is applied on the file name
containing multi-byte character(s)
This needs to be reviewed thoroughly and go upstream with a
new test case.
diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500 --- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400 +++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400

View File

@ -1,13 +0,0 @@
diff -rup a/manual/Makefile b/manual/Makefile
--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600
+++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600
@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c
mv -f $@.new $@
$(objpfx)%.info: %.texinfo
- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
+ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $<
+ mv `basename $@`* $(objpfx)
$(objpfx)%.dvi: %.texinfo
cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(<D) && pwd) --output=$@ \

View File

@ -1,5 +1,15 @@
2012-06-14 Jeff Law <law@redhat.com> Short description: Fix newlocale error return.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #832516
Bug-Fedora: #827510
Bug-Upstream: #14247
Upstream status: not-submitted
This needs to go upstream right away to fix the error case for
newlocale not correctly returning an error.
2012-06-14 Jeff Law <law@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Delay setting * locale/loadlocale.c (_nl_load_locale): Delay setting
file->decided until we have successfully loaded the file's file->decided until we have successfully loaded the file's
@ -16,7 +26,7 @@ index e3fa187..9fd9216 100644
- file->decided = 1; - file->decided = 1;
file->data = NULL; file->data = NULL;
fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC); fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC);
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) @@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
newdata->alloc = alloc; newdata->alloc = alloc;

View File

@ -1,181 +0,0 @@
#
# Red Hat BZ:
# https://bugzilla.redhat.com/show_bug.cgi?id=816647
#
# ChangeLog
#
#2013-04-30 Patsy Franklin <pfrankli@redhat.com>
#
# * iconv/gconv_cache.c (find_module): Demangle init_fct before
# checking for NULL. Mangle __btowc_fct if init_fct is non-NULL.
# * iconv/gconv_db.c (free_derivation): Check that __shlib_handle
# is non-NULL before demangling the end_fct. Check for NULL
# end_fct after demangling.
# (__gconv_release_step): Demangle the end_fct before checking
# it for NULL. Remove assert on __shlibc_handle != NULL.
# (gen_steps): Don't check btowc_fct for NULL before mangling.
# Demangle init_fct before checking for NULL.
# (increment_counter): Likewise
# * gconv_dl.c (__gconv_find_shlib): Don't check init_fct or
# end_fct for NULL before mangling.
# * wcsmbs/btowc.c (__btowc): Demangle btowc_fct before checking
# for NULL.
#
diff -Nrup a/iconv/gconv_cache.c b/iconv/gconv_cache.c
--- a/iconv/gconv_cache.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_cache.c 2013-04-30 06:43:24.788684270 -0400
@@ -207,17 +207,16 @@ find_module (const char *directory, cons
result->__data = NULL;
/* Call the init function. */
- if (result->__init_fct != NULL)
- {
- __gconv_init_fct init_fct = result->__init_fct;
+ __gconv_init_fct init_fct = result->__init_fct;
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
#endif
+ if (init_fct != NULL)
+ {
status = DL_CALL_FCT (init_fct, (result));
#ifdef PTR_MANGLE
- if (result->__btowc_fct != NULL)
- PTR_MANGLE (result->__btowc_fct);
+ PTR_MANGLE (result->__btowc_fct);
#endif
}
}
diff -Nrup a/iconv/gconv_db.c b/iconv/gconv_db.c
--- a/iconv/gconv_db.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_db.c 2013-04-30 06:37:16.886521576 -0400
@@ -179,16 +179,15 @@ free_derivation (void *p)
size_t cnt;
for (cnt = 0; cnt < deriv->nsteps; ++cnt)
- if (deriv->steps[cnt].__counter > 0
- && deriv->steps[cnt].__end_fct != NULL)
+ if ((deriv->steps[cnt].__counter > 0)
+ && (deriv->steps[cnt].__shlib_handle != NULL))
{
- assert (deriv->steps[cnt].__shlib_handle != NULL);
-
__gconv_end_fct end_fct = deriv->steps[cnt].__end_fct;
#ifdef PTR_DEMANGLE
PTR_DEMANGLE (end_fct);
#endif
- DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
+ if (end_fct != NULL)
+ DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
}
/* Free the name strings. */
@@ -212,16 +211,12 @@ __gconv_release_step (struct __gconv_ste
if (step->__shlib_handle != NULL && --step->__counter == 0)
{
/* Call the destructor. */
- if (step->__end_fct != NULL)
- {
- assert (step->__shlib_handle != NULL);
-
- __gconv_end_fct end_fct = step->__end_fct;
+ __gconv_end_fct end_fct = step->__end_fct;
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (end_fct);
+ PTR_DEMANGLE (end_fct);
#endif
- DL_CALL_FCT (end_fct, (step));
- }
+ if (end_fct != NULL)
+ DL_CALL_FCT (end_fct, (step));
#ifndef STATIC_GCONV
/* Release the loaded module. */
@@ -293,13 +288,11 @@ gen_steps (struct derivation_step *best,
/* Call the init function. */
__gconv_init_fct init_fct = result[step_cnt].__init_fct;
- if (init_fct != NULL)
- {
- assert (result[step_cnt].__shlib_handle != NULL);
-
# ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
# endif
+ if (init_fct != NULL)
+ {
status = DL_CALL_FCT (init_fct, (&result[step_cnt]));
if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK)
@@ -312,8 +305,7 @@ gen_steps (struct derivation_step *best,
}
# ifdef PTR_MANGLE
- if (result[step_cnt].__btowc_fct != NULL)
- PTR_MANGLE (result[step_cnt].__btowc_fct);
+ PTR_MANGLE (result[step_cnt].__btowc_fct);
# endif
}
}
@@ -393,16 +385,15 @@ increment_counter (struct __gconv_step *
/* Call the init function. */
__gconv_init_fct init_fct = step->__init_fct;
- if (init_fct != NULL)
- {
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (init_fct);
+ PTR_DEMANGLE (init_fct);
#endif
+ if (init_fct != NULL)
+ {
DL_CALL_FCT (init_fct, (step));
#ifdef PTR_MANGLE
- if (step->__btowc_fct != NULL)
- PTR_MANGLE (step->__btowc_fct);
+ PTR_MANGLE (step->__btowc_fct);
#endif
}
}
diff -Nrup a/iconv/gconv_dl.c b/iconv/gconv_dl.c
--- a/iconv/gconv_dl.c 2012-12-24 22:02:13.000000000 -0500
+++ b/iconv/gconv_dl.c 2013-04-30 06:37:16.889521601 -0400
@@ -132,10 +132,8 @@ __gconv_find_shlib (const char *name)
#ifdef PTR_MANGLE
PTR_MANGLE (found->fct);
- if (found->init_fct != NULL)
- PTR_MANGLE (found->init_fct);
- if (found->end_fct != NULL)
- PTR_MANGLE (found->end_fct);
+ PTR_MANGLE (found->init_fct);
+ PTR_MANGLE (found->end_fct);
#endif
/* We have succeeded in loading the shared object. */
diff -Nrup a/wcsmbs/btowc.c b/wcsmbs/btowc.c
--- a/wcsmbs/btowc.c 2012-12-24 22:02:13.000000000 -0500
+++ b/wcsmbs/btowc.c 2013-04-30 06:37:16.891521619 -0400
@@ -47,15 +47,15 @@ __btowc (c)
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
+#ifdef PTR_DEMANGLE
+ if (fcts->towc->__shlib_handle != NULL)
+ PTR_DEMANGLE (btowc_fct);
+#endif
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
&& __builtin_expect (btowc_fct != NULL, 1))
{
/* Use the shortcut function. */
-#ifdef PTR_DEMANGLE
- if (fcts->towc->__shlib_handle != NULL)
- PTR_DEMANGLE (btowc_fct);
-#endif
return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
}
else

4305
glibc.spec

File diff suppressed because it is too large Load Diff

View File

@ -1,340 +0,0 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
#include <dirent.h>
#include <stddef.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <elf.h>
#define verbose_exec(failcode, path...) \
do \
{ \
char *const arr[] = { path, NULL }; \
vexec (failcode, arr); \
} while (0)
__attribute__((noinline)) void vexec (int failcode, char *const path[]);
__attribute__((noinline)) void says (const char *str);
__attribute__((noinline)) void sayn (long num);
__attribute__((noinline)) void message (char *const path[]);
__attribute__((noinline)) int check_elf (const char *name);
#ifdef __i386__
static int
is_ia64 (void)
{
unsigned int fl1, fl2;
/* See if we can use cpuid. */
__asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
"pushl %0; popfl; pushfl; popl %0; popfl"
: "=&r" (fl1), "=&r" (fl2)
: "i" (0x00200000));
if (((fl1 ^ fl2) & 0x00200000) == 0)
return 0;
/* Host supports cpuid. See if cpuid gives capabilities, try
CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we
don't need their CPUID values here, and %ebx may be the PIC
register. */
__asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
: "=a" (fl1) : "0" (0) : "edx", "cc");
if (fl1 == 0)
return 0;
/* Invoke CPUID(1), return %edx; caller can examine bits to
determine what's supported. */
__asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
: "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
return (fl2 & (1 << 30)) != 0;
}
#else
#define is_ia64() 0
#endif
int
main (void)
{
struct stat statbuf;
char initpath[256];
char buffer[4096];
struct pref {
char *p;
int len;
} prefix[] = { { "libc-", 5 }, { "libm-", 5 },
{ "librt-", 6 }, { "libpthread-", 11 },
{ "librtkaio-", 10 }, { "libthread_db-", 13 } };
int i, j, fd;
off_t base;
ssize_t ret;
#ifdef __i386__
const char *remove_dirs[] = { "/lib/tls", "/lib/i686", "/lib/tls/i486", "/lib/tls/i586", "/lib/tls/i686" };
#else
#ifndef LIBTLS
#define LIBTLS "/lib/tls"
#endif
const char *remove_dirs[] = { LIBTLS };
#endif
for (j = 0; j < sizeof (remove_dirs) / sizeof (remove_dirs[0]); ++j)
{
size_t rmlen = strlen (remove_dirs[j]);
fd = open (remove_dirs[j], O_RDONLY);
if (fd >= 0
&& (ret = getdirentries (fd, buffer, sizeof (buffer), &base))
>= (ssize_t) offsetof (struct dirent, d_name))
{
for (base = 0; base + offsetof (struct dirent, d_name) < ret; )
{
struct dirent *d = (struct dirent *) (buffer + base);
for (i = 0; i < sizeof (prefix) / sizeof (prefix[0]); i++)
if (! strncmp (d->d_name, prefix[i].p, prefix[i].len))
{
char *p = d->d_name + prefix[i].len;
while (*p == '.' || (*p >= '0' && *p <= '9')) p++;
if (p[0] == 's' && p[1] == 'o' && p[2] == '\0'
&& p + 3 - d->d_name
< sizeof (initpath) - rmlen - 1)
{
memcpy (initpath, remove_dirs[j], rmlen);
initpath[rmlen] = '/';
strcpy (initpath + rmlen + 1, d->d_name);
unlink (initpath);
break;
}
}
base += d->d_reclen;
}
close (fd);
}
}
int ldsocfd = open (LD_SO_CONF, O_RDONLY);
struct stat ldsocst;
if (ldsocfd >= 0 && fstat (ldsocfd, &ldsocst) >= 0)
{
char p[ldsocst.st_size + 1];
if (read (ldsocfd, p, ldsocst.st_size) == ldsocst.st_size)
{
p[ldsocst.st_size] = '\0';
if (strstr (p, "include ld.so.conf.d/*.conf") == NULL)
{
close (ldsocfd);
ldsocfd = open (LD_SO_CONF, O_WRONLY | O_TRUNC);
if (ldsocfd >= 0)
{
size_t slen = strlen ("include ld.so.conf.d/*.conf\n");
if (write (ldsocfd, "include ld.so.conf.d/*.conf\n", slen)
!= slen
|| write (ldsocfd, p, ldsocst.st_size) != ldsocst.st_size)
_exit (109);
}
}
}
if (ldsocfd >= 0)
close (ldsocfd);
}
/* If installing bi-arch glibc, rpm sometimes doesn't unpack all files
before running one of the lib's %post scriptlet. /sbin/ldconfig will
then be run by the other arch's %post. */
if (! access ("/sbin/ldconfig", X_OK))
verbose_exec (110, "/sbin/ldconfig", "/sbin/ldconfig");
if (! utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL))
{
#ifndef ICONVCONFIG
#define ICONVCONFIG "/usr/sbin/iconvconfig"
#endif
char *iconv_cache = GCONV_MODULES_DIR"/gconv-modules.cache";
char *iconv_dir = GCONV_MODULES_DIR;
if (is_ia64 ())
{
iconv_cache = "/emul/ia32-linux"GCONV_MODULES_DIR"/gconv-modules.cache";
iconv_dir = "/emul/ia32-linux"GCONV_MODULES_DIR;
}
verbose_exec (113, ICONVCONFIG, "/usr/sbin/iconvconfig",
"-o", iconv_cache,
"--nostdlib", iconv_dir);
}
/* Check if telinit is available and either SysVInit fifo,
or upstart telinit. */
if (access ("/sbin/telinit", X_OK)
|| ((!!access ("/dev/initctl", F_OK))
^ !access ("/sbin/initctl", X_OK)))
_exit (0);
/* Check if we are not inside of some chroot, because we'd just
timeout and leave /etc/initrunlvl.
On more modern systems this test is not sufficient to detect
if we're in a chroot. */
if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||
readlink ("/proc/1/root", initpath, 256) <= 0)
_exit (0);
/* Here's another well known way to detect chroot, at least on an
ext and xfs filesystems and assuming nothing mounted on the chroot's
root. */
if (stat ("/", &statbuf) != 0
|| (statbuf.st_ino != 2
&& statbuf.st_ino != 128))
_exit (0);
if (check_elf ("/proc/1/exe"))
verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");
/* Check if we can safely condrestart sshd. */
if (access ("/sbin/service", X_OK) == 0
&& access ("/usr/sbin/sshd", X_OK) == 0
&& access ("/etc/rc.d/init.d/sshd", X_OK) == 0
&& access ("/bin/bash", X_OK) == 0)
{
if (check_elf ("/usr/sbin/sshd"))
verbose_exec (-121, "/sbin/service", "/sbin/service", "sshd", "condrestart");
}
_exit(0);
}
void
vexec (int failcode, char *const path[])
{
pid_t pid;
int status, save_errno;
int devnull = 0;
if (failcode < 0)
{
devnull = 1;
failcode = -failcode;
}
pid = vfork ();
if (pid == 0)
{
int fd;
if (devnull && (fd = open ("/dev/null", O_WRONLY)) >= 0)
{
dup2 (fd, 1);
dup2 (fd, 2);
close (fd);
}
execv (path[0], path + 1);
save_errno = errno;
message (path);
says (" exec failed with errno ");
sayn (save_errno);
says ("\n");
_exit (failcode);
}
else if (pid < 0)
{
save_errno = errno;
message (path);
says (" fork failed with errno ");
sayn (save_errno);
says ("\n");
_exit (failcode + 1);
}
if (waitpid (0, &status, 0) != pid || !WIFEXITED (status))
{
message (path);
says (" child terminated abnormally\n");
_exit (failcode + 2);
}
if (WEXITSTATUS (status))
{
message (path);
says (" child exited with exit code ");
sayn (WEXITSTATUS (status));
says ("\n");
_exit (WEXITSTATUS (status));
}
}
void
says (const char *str)
{
write (1, str, strlen (str));
}
void
sayn (long num)
{
char string[sizeof (long) * 3 + 1];
char *p = string + sizeof (string) - 1;
*p = '\0';
if (num == 0)
*--p = '0';
else
while (num)
{
*--p = '0' + num % 10;
num = num / 10;
}
says (p);
}
void
message (char *const path[])
{
says ("/usr/sbin/glibc_post_upgrade: While trying to execute ");
says (path[0]);
}
int
check_elf (const char *name)
{
/* Play safe, if we can't open or read, assume it might be
ELF for the current arch. */
int ret = 1;
int fd = open (name, O_RDONLY);
if (fd >= 0)
{
Elf32_Ehdr ehdr;
if (read (fd, &ehdr, offsetof (Elf32_Ehdr, e_version))
== offsetof (Elf32_Ehdr, e_version))
{
ret = 0;
if (ehdr.e_ident[EI_CLASS]
== (sizeof (long) == 8 ? ELFCLASS64 : ELFCLASS32))
{
#if defined __i386__
ret = ehdr.e_machine == EM_386;
#elif defined __x86_64__
ret = ehdr.e_machine == EM_X86_64;
#elif defined __ia64__
ret = ehdr.e_machine == EM_IA_64;
#elif defined __powerpc64__
ret = ehdr.e_machine == EM_PPC64;
#elif defined __powerpc__
ret = ehdr.e_machine == EM_PPC;
#elif defined __s390__ || defined __s390x__
ret = ehdr.e_machine == EM_S390;
#elif defined __x86_64__
ret = ehdr.e_machine == EM_X86_64;
#elif defined __sparc__
if (sizeof (long) == 8)
ret = ehdr.e_machine == EM_SPARCV9;
else
ret = (ehdr.e_machine == EM_SPARC
|| ehdr.e_machine == EM_SPARC32PLUS);
#else
ret = 1;
#endif
}
}
close (fd);
}
return ret;
}

View File

@ -1,340 +0,0 @@
/* libc-internal interface for mutex locks. LinuxThreads version.
Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _BITS_LIBC_LOCK_H
#define _BITS_LIBC_LOCK_H 1
#include <pthread.h>
/* Mutex type. */
#ifdef _IO_MTSAFE_IO
typedef pthread_mutex_t __libc_lock_t;
typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
# ifdef __USE_UNIX98
typedef pthread_rwlock_t __libc_rwlock_t;
# else
typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
# endif
typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
#else
typedef struct __libc_lock_opaque__ __libc_lock_t;
typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
#endif
/* Type for key to thread-specific data. */
typedef pthread_key_t __libc_key_t;
/* Define a lock variable NAME with storage class CLASS. The lock must be
initialized with __libc_lock_init before it can be used (or define it
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
declare a lock defined in another module. In public structure
definitions you must use a pointer to the lock structure (i.e., NAME
begins with a `*'), because its storage size will not be known outside
of libc. */
#define __libc_lock_define(CLASS,NAME) \
CLASS __libc_lock_t NAME;
#define __libc_rwlock_define(CLASS,NAME) \
CLASS __libc_rwlock_t NAME;
#define __libc_lock_define_recursive(CLASS,NAME) \
CLASS __libc_lock_recursive_t NAME;
#define __rtld_lock_define_recursive(CLASS,NAME) \
CLASS __rtld_lock_recursive_t NAME;
/* Define an initialized lock variable NAME with storage class CLASS.
For the C library we take a deeper look at the initializer. For
this implementation all fields are initialized to zero. Therefore
we don't initialize the variable which allows putting it into the
BSS section. (Except on PA-RISC and other odd architectures, where
initialized locks must be set to one due to the lack of normal
atomic operations.) */
#if __LT_SPINLOCK_INIT == 0
# define __libc_lock_define_initialized(CLASS,NAME) \
CLASS __libc_lock_t NAME;
#else
# define __libc_lock_define_initialized(CLASS,NAME) \
CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
#endif
#define __libc_rwlock_define_initialized(CLASS,NAME) \
CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER;
/* Define an initialized recursive lock variable NAME with storage
class CLASS. */
#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER;
#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
#if defined __PIC__
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
(__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
_fn != NULL ? (*_fn) ARGS : ELSE; }))
#else
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
#define __libc_maybe_call2(FUNC, ARGS, ELSE) __libc_maybe_call (__##FUNC, ARGS, ELSE)
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME) \
(__libc_maybe_call2 (pthread_mutex_init, (&(NAME), NULL), 0))
#define __libc_rwlock_init(NAME) \
(__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0));
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME) \
do { \
if (__pthread_mutex_init != NULL) \
{ \
pthread_mutexattr_t __attr; \
__pthread_mutexattr_init (&__attr); \
__pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
__pthread_mutex_init (&(NAME).mutex, &__attr); \
__pthread_mutexattr_destroy (&__attr); \
} \
} while (0);
#define __rtld_lock_init_recursive(NAME) \
__libc_lock_init_recursive (NAME)
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
#define __libc_lock_fini(NAME) \
(__libc_maybe_call2 (pthread_mutex_destroy, (&(NAME)), 0));
#define __libc_rwlock_fini(NAME) \
(__libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0));
/* Finalize recursive named lock. */
#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
#define __rtld_lock_fini_recursive(NAME) __libc_lock_fini_recursive (NAME)
/* Lock the named lock variable. */
#define __libc_lock_lock(NAME) \
(__libc_maybe_call2 (pthread_mutex_lock, (&(NAME)), 0));
#define __libc_rwlock_rdlock(NAME) \
(__libc_maybe_call (__pthread_rwlock_rdlock, (&(NAME)), 0));
#define __libc_rwlock_wrlock(NAME) \
(__libc_maybe_call (__pthread_rwlock_wrlock, (&(NAME)), 0));
/* Lock the recursive named lock variable. */
#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
/* Try to lock the named lock variable. */
#define __libc_lock_trylock(NAME) \
(__libc_maybe_call2 (pthread_mutex_trylock, (&(NAME)), 0))
#define __libc_rwlock_tryrdlock(NAME) \
(__libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0))
#define __libc_rwlock_trywrlock(NAME) \
(__libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0))
/* Try to lock the recursive named lock variable. */
#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
#define __rtld_lock_trylock_recursive(NAME) \
__libc_lock_trylock_recursive (NAME)
/* Unlock the named lock variable. */
#define __libc_lock_unlock(NAME) \
(__libc_maybe_call2 (pthread_mutex_unlock, (&(NAME)), 0));
#define __libc_rwlock_unlock(NAME) \
(__libc_maybe_call (__pthread_rwlock_unlock, (&(NAME)), 0));
/* Unlock the recursive named lock variable. */
#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
#define __rtld_lock_lock_recursive(NAME) __libc_lock_lock_recursive (NAME)
#define __rtld_lock_unlock_recursive(NAME) __libc_lock_unlock_recursive (NAME)
/* Define once control variable. */
#if PTHREAD_ONCE_INIT == 0
/* Special case for static variables where we can avoid the initialization
if it is zero. */
# define __libc_once_define(CLASS, NAME) \
CLASS pthread_once_t NAME
#else
# define __libc_once_define(CLASS, NAME) \
CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT
#endif
/* Call handler iff the first call. */
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
do { \
if (__pthread_once != NULL) \
__pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \
else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \
INIT_FUNCTION (); \
(ONCE_CONTROL) = 2; \
} \
} while (0)
/* Start critical region with cleanup. */
#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
{ struct _pthread_cleanup_buffer _buffer; \
int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \
if (_avail) { \
_pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \
}
/* End critical region with cleanup. */
#define __libc_cleanup_region_end(DOIT) \
if (_avail) { \
_pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
} \
}
/* Sometimes we have to exit the block in the middle. */
#define __libc_cleanup_end(DOIT) \
if (_avail) { \
_pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
}
#define __libc_cleanup_push(fct, arg) \
{ struct _pthread_cleanup_buffer _buffer; \
__libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
#define __libc_cleanup_pop(execute) \
__libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
}
/* Create thread-specific key. */
#define __libc_key_create(KEY, DESTRUCTOR) \
(__libc_maybe_call (__pthread_key_create, (KEY, DESTRUCTOR), 1))
/* Get thread-specific data. */
#define __libc_getspecific(KEY) \
(__libc_maybe_call (__pthread_getspecific, (KEY), NULL))
/* Set thread-specific data. */
#define __libc_setspecific(KEY, VALUE) \
(__libc_maybe_call (__pthread_setspecific, (KEY, VALUE), 0))
/* Register handlers to execute before and after `fork'. */
#define __libc_atfork(PREPARE, PARENT, CHILD) \
(__libc_maybe_call (__pthread_atfork, (PREPARE, PARENT, CHILD), 0))
__BEGIN_DECLS
extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
void (*__routine) (void *),
void *__arg) __THROW;
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
int __execute) __THROW;
/* Functions that are used by this file and are internal to the GNU C
library. */
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
__const pthread_mutexattr_t *__mutex_attr);
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
int __kind);
#ifdef __USE_UNIX98
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
__const pthread_rwlockattr_t *__attr);
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
#endif
extern int __pthread_key_create (pthread_key_t *__key,
void (*__destr_function) (void *));
extern int __pthread_setspecific (pthread_key_t __key,
__const void *__pointer);
extern void *__pthread_getspecific (pthread_key_t __key);
extern int __pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void));
extern int __pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void));
__END_DECLS
/* Make the pthread functions weak so that we can elide them from
single-threaded processes. */
#ifndef __NO_WEAK_PTHREAD_ALIASES
# pragma weak __pthread_mutex_init
# pragma weak __pthread_mutex_destroy
# pragma weak __pthread_mutex_lock
# pragma weak __pthread_mutex_trylock
# pragma weak __pthread_mutex_unlock
# pragma weak __pthread_mutexattr_init
# pragma weak __pthread_mutexattr_destroy
# pragma weak __pthread_mutexattr_settype
# pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_rwlock_rdlock
# pragma weak __pthread_rwlock_tryrdlock
# pragma weak __pthread_rwlock_wrlock
# pragma weak __pthread_rwlock_trywrlock
# pragma weak __pthread_rwlock_unlock
# pragma weak __pthread_key_create
# pragma weak __pthread_setspecific
# pragma weak __pthread_getspecific
# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
# pragma weak _pthread_cleanup_push_defer
# pragma weak _pthread_cleanup_pop_restore
# pragma weak _pthread_cleanup_push
# pragma weak _pthread_cleanup_pop
#endif
/* We need portable names for some functions. E.g., when they are
used as argument to __libc_cleanup_region_start. */
#define __libc_mutex_unlock __pthread_mutex_unlock
#endif /* bits/libc-lock.h */

View File

@ -1,62 +0,0 @@
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Valid entries include:
#
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files sss
shadow: files sss
group: files sss
#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files sss
netgroup: nisplus sss
publickey: nisplus
automount: files nisplus
aliases: files nisplus

View File

@ -3,8 +3,8 @@
export QUILT_PATCHES=$PWD export QUILT_PATCHES=$PWD
# Extract source file name from sources file, # Extract source file name from sources file,
# and assume it's the same name as the directory. # and assume it's the same name as the directory.
source=`cat sources | sed -e 's,^.* ,,g'` source=`awk -F '[() ]+' '/^[A-Z0-9]+ /{print $2}; /^[0-9a-f]+ /{print $2}' sources`
srcdir=${source%.tar.gz} srcdir=${source%.tar.xz}
if [ "$1" == "-f" ] && [ -d "$srcdir" ]; then if [ "$1" == "-f" ] && [ -d "$srcdir" ]; then
echo Cleaning up $srcdir echo Cleaning up $srcdir
rm -rf $srcdir rm -rf $srcdir
@ -14,7 +14,7 @@ if [ -d "$srcdir" ]; then
echo "ERROR: Source directory $srcdir already exists. Use -f to force cleanup step." echo "ERROR: Source directory $srcdir already exists. Use -f to force cleanup step."
exit 1 exit 1
fi fi
tar zxvf $source tar Jxvf $source
echo "Entering $srcdir" echo "Entering $srcdir"
pushd $srcdir pushd $srcdir
# Apply all patches. # Apply all patches.

43
series
View File

@ -1,43 +0,0 @@
glibc-fedora-nscd.patch -p1 --fuzz=0
glibc-fedora-ldd.patch -p1 --fuzz=0
glibc-fedora-ppc-unwind.patch -p1 --fuzz=0
glibc-rh825061.patch -p1 --fuzz=0
glibc-arm-hardfloat-3.patch -p1 --fuzz=0
glibc-rh697421.patch -p1 --fuzz=0
glibc-fedora-include-bits-ldbl.patch -p1 --fuzz=0
glibc-fedora-linux-tcsetattr.patch -p1 --fuzz=0
glibc-rh741105.patch -p1 --fuzz=0
glibc-fedora-nptl-linklibc.patch -p1 --fuzz=0
glibc-fedora-localedef.patch -p1 --fuzz=0
glibc-fedora-i386-tls-direct-seg-refs.patch -p1 --fuzz=0
glibc-fedora-nis-rh188246.patch -p1 --fuzz=0
glibc-fedora-manual-dircategory.patch -p1 --fuzz=0
glibc-rh827510.patch -p1 --fuzz=0
glibc-fedora-locarchive.patch -p1 --fuzz=0
glibc-fedora-streams-rh436349.patch -p1 --fuzz=0
glibc-rh819430.patch -p1 --fuzz=0
glibc-fedora-localedata-rh61908.patch -p1 --fuzz=0
glibc-fedora-uname-getrlimit.patch -p1 --fuzz=0
glibc-fedora-__libc_multiple_libcs.patch -p1 --fuzz=0
glibc-fedora-elf-ORIGIN.patch -p1 --fuzz=0
glibc-rh952799.patch -p1 --fuzz=0
glibc-rh1009145.patch -p1 --fuzz=0
glibc-rh1013801.patch -p1 --fuzz=0
glibc-rh1070416.patch -p1 --fuzz=0
glibc-nscd-sysconfig.patch -p1 --fuzz=0
glibc-aarch64-tls-fixes.patch -p1 --fuzz=0
glibc-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch -p1 --fuzz=0
glibc-disable-rwlock-elision.patch -p1 --fuzz=0
glibc-cs-path.patch -p1 --fuzz=0
glibc-bench-build.patch -p1 --fuzz=0
glibc-res-hconf-gcc5.patch -p1 --fuzz=0
glibc-ld-ctype-gcc5.patch -p1 --fuzz=0
glibc-gethnamaddr-gcc5.patch -p1 --fuzz=0
glibc-dns-host-gcc5.patch -p1 --fuzz=0
glibc-bug-regex-gcc5.patch -p1 --fuzz=0
glibc-c-utf8-locale.patch -p1 --fuzz=0
glibc-nsswitch-Add-group-merging-support.patch -p1 --fuzz=0
glibc-gcc-PR69537.patch -p1 --fuzz=0
glibc-isinf-cxx11.patch -p1 --fuzz=0
glibc-rh1252570.patch -p1 --fuzz=0
glibc-CVE-2015-7547.patch -p1 --fuzz=0

View File

@ -1 +1 @@
59f24ea4c6c662c064f54a64fca055a6 glibc-2.22-719-g1233be7.tar.gz SHA512 (glibc-2.30.9000-100-g1a6566094d.tar.xz) = e6054a8f1367fde262f023c76f7eaf5ce588613c4894b8d577c7e1c3159a2dfcefb7c60e301340b823cd8e6d2f8d264d7da83e61034b9180836d392d5db4c5ba

View File

@ -1,98 +0,0 @@
#!/bin/sh
# Given a git source repo, generate a tarball from the desired branch, modify
# the spec file and upload it to lookaside cache if the tarball unpacks and
# gets patched cleanly.
#
# Usage:
#
# 1. Invoke the script as follows:
#
# ./sync-upstream.sh upstream-repo
#
# where upstream-repo is the path to the synced upstream git repo.
#
# 2. Watch the script run. If it proceeds to building the package, then
# everything seems good and you just need to test the build after it
# is complete. If it exits before the build (you'll know if you read
# the output of the script) then manual intervention is required to
# complete the sync. This will typically happen when a patch fails
# to apply on the new sources.
set -e
# We want to sync from master by default. Change this if you want to sync from
# another branch.
branch=master
# We can't do anything without an upstream repo
if [ $# -ne 1 ]; then
echo "Usage: $0 <path-to-upstream-repo>" 1>&2
exit 1
fi
upstream=$1
srcdir=$(git --git-dir=$upstream/.git describe $branch)
cursrc=$(sed -ne 's/^%define glibcsrcdir \(.*\)/\1/p' glibc.spec)
# Upstream has not moved forward since the last sync.
# TODO: Some time in the future, we might want to only sync when upstream has
# advanced more than a certain number of commits, say, 42.
if [ "$cursrc" = "$srcdir" ]; then
echo "+ Already in sync with upstream."
exit 0
fi
# Generate and gzip the tarball from the desired branch of the repository.
echo "+ Generating tarball."
git --git-dir="$upstream/.git" archive --prefix="$srcdir/" "$branch" \
> "$srcdir.tar"
gzip -9 "$srcdir.tar"
echo "+ Created $srcdir.tar.gz"
# Our changelog header
cldate=$(date +'%a %b %d %Y')
clname=$(git config --get user.name)
clemail=$(git config --get user.email | sed 's/@/\\@/')
# Getting our version and release number from the spec file.
nv=$(perl -ne 's/^%define glibcversion (.+)/printf("%s-", $1)/e;' \
-e 's/^%define glibcrelease ([0-9]+).*/printf("%d\n", $1 + 1)/e;' \
glibc.spec)
# Our changelog entry.
changelog="* $cldate $clname <$clemail> - $nv\n- Auto-sync with upstream $branch.\n"
# Change the glibcsrcdir variable, bump up the release number and add an extra
# entry to the changelog.
echo "+ Updating spec file."
perl -pi \
-e "s/^(%define glibcsrcdir ).+/\$1$srcdir/;
s/^(%define glibcrelease )(\d+)/print(\$1); print(\$2 + 1);'';/e;
s/^(%changelog)$/\$1\n$changelog/" \
glibc.spec
function prep_failed {
# fedpkg prep failed.
if [ $? -ne 0 ]; then
echo "+ Source prep failed."
echo "+ Check the output in $tmpfile and fix things before committing."
false
fi
}
echo "+ Testing if fedpkg prep works."
tmpfile=$(mktemp fedpkg-prep.out-XXXX)
trap prep_failed EXIT
fedpkg prep > "$tmpfile" 2>&1
# Remove mess created by fedpkg prep
rm -f "$tmpfile"
rm -rf "$srcdir"
echo "+ Source prep is clean, so we're good to go."
fedpkg new-sources "$srcdir.tar.gz"
git commit -a -m "Auto-sync with upstream $branch."
exit 0
fedpkg push
fedpkg build
echo "+ Done!"

View File

@ -5,7 +5,7 @@ Origin: <Source repo(s) where it came from or keyword "PATCH" if this is simply
Bug-RHEL: <Rhel bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ> Bug-RHEL: <Rhel bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Bug-Fedora: <Fedora bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ> Bug-Fedora: <Fedora bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Bug-Upstream: <Upstream bug#'s, comma separated e.g. #XXX, #YYY, #ZZZ> Bug-Upstream: <Upstream bug#'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Upstream status: <[Patchwork URL|not-needed|not-submitted|committed] for each commit> Upstream status: <[Patchwork URL|libc-alpha URL|not-needed|not-submitted|committed] for each commit>
# <Additional descriptive text in comment block> # <Additional descriptive text follows 'Upstream status:' line>
<If upstream status == committed then a copy of the upstream commit log follows> <If upstream status == committed then a copy of the upstream commit log follows>
<Patch> <Patch>