Compare commits
249 Commits
Author | SHA1 | Date |
---|---|---|
Florian Weimer | 410e42e83d | |
Arjun Shankar | be2c7dc0db | |
Florian Weimer | eb2dca633b | |
Arjun Shankar | 64e677f744 | |
Florian Weimer | 12539e0de7 | |
Florian Weimer | 7da439ec18 | |
Florian Weimer | ed8c029e6c | |
Arjun Shankar | 2e466a0073 | |
Arjun Shankar | 931ddd67fe | |
Florian Weimer | 089ee6cab4 | |
Florian Weimer | ece850a900 | |
Florian Weimer | 0b310443f0 | |
Arjun Shankar | a4cde2f82f | |
Arjun Shankar | 7986c6c4ec | |
Florian Weimer | 21d9ef9072 | |
Florian Weimer | ad513d8e43 | |
Florian Weimer | 0f40814c67 | |
Florian Weimer | b001a8b720 | |
Florian Weimer | 6c1d7dfbbe | |
Florian Weimer | b104e8d4ff | |
Florian Weimer | bab2cf683b | |
Florian Weimer | 5683acda27 | |
Arjun Shankar | b9831c9524 | |
Arjun Shankar | 024178b5e0 | |
Florian Weimer | 5c209d3a56 | |
Florian Weimer | 6d97bdd7b3 | |
Florian Weimer | a7b71f9f73 | |
Florian Weimer | f155668f01 | |
Florian Weimer | 53b2ec4663 | |
Sergey Kolosov | cdf31c9c27 | |
DJ Delorie | 1fd4834f59 | |
Fedora Release Engineering | 4cc446aac1 | |
Florian Weimer | 514d6266eb | |
Florian Weimer | 8d17a555f4 | |
Florian Weimer | 3987f952fb | |
Florian Weimer | 2762250016 | |
Martin Cermak | 5c459b73d2 | |
Arjun Shankar | 201f88a749 | |
Florian Weimer | 2d913ac06a | |
Arjun Shankar | 0c78549fbc | |
Arjun Shankar | a7319f3316 | |
Pavel Březina | cadee80b13 | |
Siddhesh Poyarekar | 2a12adcea2 | |
Martin Cermak | 333464235d | |
Florian Weimer | 4dc7322aff | |
Florian Weimer | ae249dabba | |
Florian Weimer | 11567e7d20 | |
Florian Weimer | 3717b5ea10 | |
Florian Weimer | ba4df9283b | |
Carlos O'Donell | 980b253a67 | |
Carlos O'Donell | 8b7229bf79 | |
Sergey Kolosov | 3e067f11c3 | |
Sergey Kolosov | 7a3188c863 | |
Sergey Kolosov | 8d488dc38e | |
Florian Weimer | e4ca95809b | |
Florian Weimer | 9633d3541e | |
Florian Weimer | a95e35d1eb | |
Arjun Shankar | b96753c45b | |
Arjun Shankar | e879893635 | |
Arjun Shankar | 1f6af19978 | |
Patsy Griffin | 7badc6b643 | |
DJ Delorie | ea7e5402a9 | |
Carlos O'Donell | 8deb7f51cc | |
Martin Cermak | 09d2e07988 | |
Arjun Shankar | 4d06523dc1 | |
Arjun Shankar | e7c31c4b27 | |
Carlos O'Donell | 7c3f6c985e | |
Florian Weimer | a463a91457 | |
Florian Weimer | be77dd73c8 | |
Florian Weimer | 35da738a8e | |
Florian Weimer | 9fe7756cf7 | |
Martin Cermak | 8132174436 | |
Florian Weimer | 7d28ddf24c | |
Florian Weimer | 4476c131c3 | |
Martin Cermak | b7fe0018cc | |
Patsy Griffin | 891183e565 | |
Florian Weimer | 80230e6916 | |
Arjun Shankar | 9e3889df74 | |
Siddhesh Poyarekar | 94957f0655 | |
DJ Delorie | a5d3c595e7 | |
Arjun Shankar | 420fe1da66 | |
Florian Weimer | 1ecf8017eb | |
Siddhesh Poyarekar | ca0613665c | |
Florian Weimer | 88d9dfdf11 | |
Florian Weimer | bcce160baa | |
Siddhesh Poyarekar | 51ca5d3334 | |
Florian Weimer | 8f6143c826 | |
Florian Weimer | c4a47573b4 | |
Florian Weimer | 95bdbb905d | |
Florian Weimer | 44bdf7a54c | |
Florian Weimer | ac81c2f6e6 | |
Florian Weimer | d299f6bf48 | |
Fedora Release Engineering | d97901cc98 | |
Florian Weimer | 455e25392f | |
Florian Weimer | 0dd0190421 | |
Florian Weimer | 42e2f74269 | |
Florian Weimer | 9b46862a3b | |
Siddhesh Poyarekar | d543beb3de | |
Florian Weimer | 7d6321464f | |
Florian Weimer | 6534cdc8bf | |
Florian Weimer | 1c62f46f16 | |
Florian Weimer | 0c7c3bcb8d | |
Florian Weimer | f63ef9c9d9 | |
Florian Weimer | 3d96f5f94f | |
Florian Weimer | 8479d6740a | |
Florian Weimer | b4f030ae95 | |
Florian Weimer | afd298e6eb | |
Florian Weimer | d7e27f5895 | |
Florian Weimer | 2be319ff45 | |
Florian Weimer | 21ebc4cbaa | |
Florian Weimer | d3fad65ba1 | |
Florian Weimer | 5b63da3fa5 | |
Florian Weimer | 4f2dd301cc | |
Martin Cermak | 40177ead73 | |
Florian Weimer | 0034c1747f | |
Florian Weimer | 8142038783 | |
Florian Weimer | 22321f2b31 | |
Florian Weimer | 700394c8ed | |
Carlos O'Donell | 947a02c4ad | |
Siddhesh Poyarekar | 063fe63eaf | |
Florian Weimer | c20fde6a69 | |
Florian Weimer | 52d0948022 | |
Florian Weimer | 14d5c92a57 | |
Florian Weimer | 654f636b32 | |
Florian Weimer | b5405a57ad | |
Florian Weimer | f184f15f91 | |
Florian Weimer | 07558826b7 | |
Florian Weimer | 027b24e17f | |
Florian Weimer | fd5c07ba69 | |
Siddhesh Poyarekar | 222c141c85 | |
Siddhesh Poyarekar | 6758377541 | |
Florian Weimer | 2f717376f3 | |
Florian Weimer | d0b9f50b05 | |
Florian Weimer | 65fd804c4a | |
Florian Weimer | 8aee7e3563 | |
Florian Weimer | f6682c9bac | |
Florian Weimer | 79751685db | |
Florian Weimer | 3af4a41203 | |
Jeremy Linton | b84da5c20e | |
Florian Weimer | 8d4b53ceef | |
Florian Weimer | f0cbcb3912 | |
Florian Weimer | caadb46589 | |
Florian Weimer | 82b682a380 | |
Florian Weimer | 3b6cc2120e | |
Florian Weimer | 78c735d31e | |
Arjun Shankar | 9eea788618 | |
Carlos O'Donell | 7ae5ae4a36 | |
Martin Cermak | f128368393 | |
Florian Weimer | cc01ada745 | |
Florian Weimer | 5924084987 | |
Florian Weimer | 027c02731b | |
Arjun Shankar | c290b45611 | |
Arjun Shankar | a3f45b39c5 | |
Fedora Release Engineering | 5f79bcafc7 | |
Arjun Shankar | 1fa03e97ae | |
Arjun Shankar | 8cd6c9ec48 | |
Carlos O'Donell | b59b2feff0 | |
Florian Weimer | dfda51ee29 | |
DJ Delorie | 2410c90637 | |
Patsy Griffin | d5ff3061a2 | |
Florian Weimer | 525dee4c87 | |
DJ Delorie | ff63fb2e4b | |
Arjun Shankar | e7821ea716 | |
Arjun Shankar | 35514a8116 | |
Arjun Shankar | 8f61d411e6 | |
Florian Weimer | a3f3b637ae | |
Carlos O'Donell | c626367cc1 | |
DJ Delorie | 98f35706db | |
Patsy Griffin | 2e63496ba6 | |
DJ Delorie | 836c64ba99 | |
Carlos O'Donell | dbc894098e | |
Siddhesh Poyarekar | 90ca20fd02 | |
Siddhesh Poyarekar | 5a5cbfec77 | |
Florian Weimer | 42962ebc3d | |
Patsy Griffin | 8c25df8a1d | |
Florian Weimer | d8a810a777 | |
Florian Weimer | a45fef2f84 | |
Arjun Shankar | 1bf34fb3df | |
Arjun Shankar | 9a188d169e | |
Arjun Shankar | f1c4b3f4bd | |
DJ Delorie | c070d93d64 | |
Patsy Griffin | 6cd5b060cc | |
Carlos O'Donell | b8f476de79 | |
Carlos O'Donell | b1869f947a | |
DJ Delorie | 7ec72a1eab | |
Patsy Griffin | 58f285e57f | |
Arjun Shankar | 2f73564ad1 | |
Patsy Griffin | df5430b755 | |
Florian Weimer | 888bec16b0 | |
Fedora Release Engineering | 6f63f671cc | |
Carlos O'Donell | 9bc189f105 | |
Florian Weimer | 299c3c2187 | |
Arjun Shankar | 3e8e5d3396 | |
Florian Weimer | 1554837500 | |
Florian Weimer | b633c425b5 | |
Florian Weimer | 0aab7eb585 | |
Carlos O'Donell | 94cfd27bd1 | |
DJ Delorie | c12a7f03e3 | |
Patsy Franklin | b2357f7dc4 | |
Patsy Franklin | 5b16244fad | |
DJ Delorie | 0cfa270c68 | |
Florian Weimer | a578dc7ae2 | |
Florian Weimer | 15c23ffc6c | |
Florian Weimer | 0fb8a56d62 | |
Florian Weimer | eb8a860ab4 | |
Florian Weimer | 711089dc88 | |
Florian Weimer | 7ae647b913 | |
Florian Weimer | 7407a5058a | |
Florian Weimer | db303b940e | |
DJ Delorie | b4ca0be2b6 | |
Patsy Franklin | 157090889d | |
Florian Weimer | 873cc222f9 | |
Michael Catanzaro | 4e7c22bb36 | |
Carlos O'Donell | 89e19f3b9e | |
DJ Delorie | 1479bc1a28 | |
Patsy Franklin | e5688486f8 | |
Patsy Franklin | c0cdff7e6c | |
Florian Weimer | 2600cf370b | |
Florian Weimer | 3efb6ef479 | |
Patsy Franklin | 301b7b2d9f | |
Patsy Franklin | 505d538386 | |
DJ Delorie | c5ffb3238b | |
Patsy Franklin | 1e5275ce0a | |
Fedora Release Engineering | d18724d2ec | |
Patsy Franklin | d2f233f5b4 | |
Florian Weimer | c996bd1b30 | |
Arjun Shankar | 258bf984b0 | |
Florian Weimer | ee01264a30 | |
Carlos O'Donell | 53b7c46841 | |
Patsy Franklin | 2e168fa077 | |
DJ Delorie | b672d8b211 | |
Florian Weimer | e9451d9caf | |
Patsy Franklin | 134ad59d86 | |
Florian Weimer | 761a9384b6 | |
Florian Weimer | 17391589c0 | |
Arjun Shankar | a9ba88d656 | |
Patsy Franklin | 967a41b547 | |
Arjun Shankar | 24846fb24d | |
Arjun Shankar | 9bd4f8ff43 | |
Patsy Franklin | ebf75398f0 | |
DJ Delorie | 0ce23ddfbe | |
DJ Delorie | 59ddeeccff | |
DJ Delorie | eb580e4bc6 | |
Arjun Shankar | 8936dd058a | |
Patsy Franklin | 8e7139fb4c | |
Arjun Shankar | 81c303b235 | |
Zbigniew Jędrzejewski-Szmek | 64db3acbd3 | |
Patsy Franklin | 46d12a81bf | |
Parag Nemade | ea59ae7dfe |
|
@ -0,0 +1 @@
|
|||
1
|
4232
ChangeLog.old
4232
ChangeLog.old
File diff suppressed because it is too large
Load Diff
34
README.quilt
34
README.quilt
|
@ -1,34 +0,0 @@
|
|||
This package supports working with patch files using quilt.
|
||||
|
||||
To regenerate the quilt series file run:
|
||||
./gen-quilt-series.sh
|
||||
|
||||
Setup environment:
|
||||
export QUILT_PATCHES=$PWD
|
||||
|
||||
Setup the source:
|
||||
./quilt-patch.sh [-f]
|
||||
|
||||
Use `-f` if you want to have quilt-patch always remove the existing
|
||||
source directory before starting. Otherwise you'll be patching on top of
|
||||
an already patched tree generated perhaps by `*pkg prep`.
|
||||
|
||||
Create a new patch:
|
||||
cd glibc-2.17-c758a686/
|
||||
quilt new glibc-rh1234622.patch
|
||||
quilt add ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
|
||||
vi ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
|
||||
quilt refresh
|
||||
cd ..
|
||||
git add glibc-rh1234622.patch
|
||||
<Then edit the glibc.spec file to build with the new patch>
|
||||
e.g.
|
||||
...
|
||||
PatchXXXX: glibc-rh1234622.patch
|
||||
...
|
||||
%patchXXXX -p1
|
||||
...
|
||||
git add glibc.spec
|
||||
git commit
|
||||
|
||||
You're done!
|
494
SUPPORTED
494
SUPPORTED
|
@ -1,494 +0,0 @@
|
|||
# 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 \
|
|
@ -0,0 +1,19 @@
|
|||
# recipients: glibc-bugzilla
|
||||
# yamllint disable rule:line-length
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_stable
|
||||
- bodhi_update_push_stable_critpath
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation}
|
|
@ -1,286 +0,0 @@
|
|||
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: Mike FABIAN <mfabian@redhat.com>
|
||||
Date: Mon, 10 Aug 2015 15:58:12 +0200
|
||||
Subject: [PATCH] Add a C.UTF-8 locale
|
||||
|
||||
---
|
||||
localedata/SUPPORTED | 1 +
|
||||
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 239 insertions(+)
|
||||
create mode 100644 localedata/locales/C
|
||||
|
||||
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
index 8ca023e..2a78391 100644
|
||||
--- a/localedata/SUPPORTED
|
||||
+++ b/localedata/SUPPORTED
|
||||
@@ -1,6 +1,7 @@
|
||||
# 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 \
|
||||
diff --git a/localedata/locales/C b/localedata/locales/C
|
||||
new file mode 100644
|
||||
index 0000000..fdf460e
|
||||
--- /dev/null
|
||||
+++ b/localedata/locales/C
|
||||
@@ -0,0 +1,238 @@
|
||||
+escape_char /
|
||||
+comment_char %
|
||||
+% Locale for C locale in UTF-8
|
||||
+
|
||||
+LC_IDENTIFICATION
|
||||
+title "C locale"
|
||||
+source ""
|
||||
+address ""
|
||||
+contact ""
|
||||
+email "mfabian@redhat.com"
|
||||
+tel ""
|
||||
+fax ""
|
||||
+language "C"
|
||||
+territory ""
|
||||
+revision "1.0"
|
||||
+date "2015-08-10"
|
||||
+%
|
||||
+category "i18n:2012";LC_IDENTIFICATION
|
||||
+category "i18n:2012";LC_CTYPE
|
||||
+category "i18n:2012";LC_COLLATE
|
||||
+category "i18n:2012";LC_TIME
|
||||
+category "i18n:2012";LC_NUMERIC
|
||||
+category "i18n:2012";LC_MONETARY
|
||||
+category "i18n:2012";LC_MESSAGES
|
||||
+category "i18n:2012";LC_PAPER
|
||||
+category "i18n:2012";LC_NAME
|
||||
+category "i18n:2012";LC_ADDRESS
|
||||
+category "i18n:2012";LC_TELEPHONE
|
||||
+category "i18n:2012";LC_MEASUREMENT
|
||||
+END LC_IDENTIFICATION
|
||||
+
|
||||
+LC_CTYPE
|
||||
+copy "i18n"
|
||||
+
|
||||
+translit_start
|
||||
+include "translit_combining";""
|
||||
+translit_end
|
||||
+
|
||||
+END LC_CTYPE
|
||||
+
|
||||
+LC_COLLATE
|
||||
+order_start forward
|
||||
+<U0000>
|
||||
+..
|
||||
+<UFFFF>
|
||||
+<U00010000>
|
||||
+..
|
||||
+<U0001FFFF>
|
||||
+<U00020000>
|
||||
+..
|
||||
+<U0002FFFF>
|
||||
+<U000E0000>
|
||||
+..
|
||||
+<U000EFFFF>
|
||||
+<U000F0000>
|
||||
+..
|
||||
+<U000FFFFF>
|
||||
+<U00100000>
|
||||
+..
|
||||
+<U0010FFFF>
|
||||
+UNDEFINED
|
||||
+order_end
|
||||
+END LC_COLLATE
|
||||
+
|
||||
+LC_MONETARY
|
||||
+% This is the 14652 i18n fdcc-set definition for
|
||||
+% the LC_MONETARY category
|
||||
+% (except for the int_curr_symbol and currency_symbol, they are empty in
|
||||
+% the 14652 i18n fdcc-set definition and also empty in
|
||||
+% glibc/locale/C-monetary.c. But localedef complains in that case).
|
||||
+%
|
||||
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
|
||||
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
|
||||
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
|
||||
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
|
||||
+% U+00A4 is the "generic currency symbol"
|
||||
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
|
||||
+currency_symbol "<U0024>"
|
||||
+mon_decimal_point "<U002E>"
|
||||
+mon_thousands_sep ""
|
||||
+mon_grouping -1
|
||||
+positive_sign ""
|
||||
+negative_sign "<U002D>"
|
||||
+int_frac_digits -1
|
||||
+frac_digits -1
|
||||
+p_cs_precedes -1
|
||||
+int_p_sep_by_space -1
|
||||
+p_sep_by_space -1
|
||||
+n_cs_precedes -1
|
||||
+int_n_sep_by_space -1
|
||||
+n_sep_by_space -1
|
||||
+p_sign_posn -1
|
||||
+n_sign_posn -1
|
||||
+%
|
||||
+END LC_MONETARY
|
||||
+
|
||||
+LC_NUMERIC
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+decimal_point "<U002E>"
|
||||
+thousands_sep ""
|
||||
+grouping -1
|
||||
+END LC_NUMERIC
|
||||
+
|
||||
+LC_TIME
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_TIME category.
|
||||
+%
|
||||
+% Abbreviated weekday names (%a)
|
||||
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
|
||||
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
|
||||
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
|
||||
+ "<U0053><U0061><U0074>"
|
||||
+
|
||||
+% Full weekday names (%A)
|
||||
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
|
||||
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
|
||||
+
|
||||
+% Abbreviated month names (%b)
|
||||
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
|
||||
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
|
||||
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
|
||||
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
|
||||
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
|
||||
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
|
||||
+
|
||||
+% Full month names (%B)
|
||||
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U004D><U0061><U0072><U0063><U0068>";/
|
||||
+ "<U0041><U0070><U0072><U0069><U006C>";/
|
||||
+ "<U004D><U0061><U0079>";/
|
||||
+ "<U004A><U0075><U006E><U0065>";/
|
||||
+ "<U004A><U0075><U006C><U0079>";/
|
||||
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
|
||||
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
|
||||
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
|
||||
+
|
||||
+% Week description, consists of three fields:
|
||||
+% 1. Number of days in a week.
|
||||
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
|
||||
+% 3. The weekday number to be contained in the first week of the year.
|
||||
+%
|
||||
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
|
||||
+% Monday), and 4 (Thursday), respectively.
|
||||
+week 7;19971201;4
|
||||
+first_weekday 1
|
||||
+first_workday 1
|
||||
+
|
||||
+% Appropriate date and time representation (%c)
|
||||
+% "%a %b %e %H:%M:%S %Y"
|
||||
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
|
||||
+
|
||||
+% Appropriate date representation (%x)
|
||||
+% "%m/%d/%y"
|
||||
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
|
||||
+
|
||||
+% Appropriate time representation (%X)
|
||||
+% "%H:%M:%S"
|
||||
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
|
||||
+
|
||||
+% Appropriate AM/PM time representation (%r)
|
||||
+% "%I:%M:%S %p"
|
||||
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
|
||||
+
|
||||
+% Equivalent of AM/PM (%p) "AM"/"PM"
|
||||
+%
|
||||
+am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||
+
|
||||
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
|
||||
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
|
||||
+END LC_TIME
|
||||
+
|
||||
+LC_MESSAGES
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
|
||||
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
|
||||
+yesstr "<U0059><U0065><U0073>"
|
||||
+nostr "<U004E><U006F>"
|
||||
+END LC_MESSAGES
|
||||
+
|
||||
+LC_PAPER
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_PAPER category.
|
||||
+% (A4 paper, this is also used in the built in C/POSIX
|
||||
+% locale in glibc/locale/C-paper.c)
|
||||
+height 297
|
||||
+width 210
|
||||
+END LC_PAPER
|
||||
+
|
||||
+LC_NAME
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_NAME category.
|
||||
+% "%p%t%g%t%m%t%f"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
|
||||
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
|
||||
+<U0025><U006D><U0025><U0074><U0025><U0066>"
|
||||
+END LC_NAME
|
||||
+
|
||||
+LC_ADDRESS
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_ADDRESS category.
|
||||
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
|
||||
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
|
||||
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
|
||||
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
|
||||
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
|
||||
+<U004E><U0025><U0063><U0025><U004E>"
|
||||
+END LC_ADDRESS
|
||||
+
|
||||
+LC_TELEPHONE
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_TELEPHONE category.
|
||||
+% "+%c %a %l"
|
||||
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
|
||||
+<U006C>"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
|
||||
+END LC_TELEPHONE
|
||||
+
|
||||
+LC_MEASUREMENT
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_MEASUREMENT category.
|
||||
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
|
||||
+%metric
|
||||
+measurement 1
|
||||
+END LC_MEASUREMENT
|
||||
+
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -1,15 +1,44 @@
|
|||
Short description: Adjust CS_PATH return value.
|
||||
Short description: Adjust CS_PATH and the test container layout.
|
||||
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).
|
||||
In Fedora we should return only /usr/bin as CS_PATH 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
|
||||
--- 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
|
||||
We also create /{bin,lib,lib64,sbin} in the test container as symbolic
|
||||
links. This brings the test container in line with Fedora's filesystem
|
||||
layout and avoids some test failures. For example, because Fedora's
|
||||
CS_PATH is /usr/bin, tst-vfork3 will try to execute /usr/bin/echo in the
|
||||
container. Without this change the container installs `echo' in /bin
|
||||
not /usr/bin, causing the test to fail.
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a49870d3d1e636a9..feb2599203b10098 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -598,9 +598,13 @@ $(tests-container) $(addsuffix /tests,$(subdirs)) : \
|
||||
$(objpfx)testroot.pristine/install.stamp :
|
||||
test -d $(objpfx)testroot.pristine || \
|
||||
mkdir $(objpfx)testroot.pristine
|
||||
- # We need a working /bin/sh for some of the tests.
|
||||
- test -d $(objpfx)testroot.pristine/bin || \
|
||||
- mkdir $(objpfx)testroot.pristine/bin
|
||||
+ # Set up symlinks to directories whose contents got moved to /usr
|
||||
+ for moved in bin lib lib64 sbin; do \
|
||||
+ test -d $(objpfx)testroot.pristine/usr/$$moved || \
|
||||
+ mkdir -p $(objpfx)testroot.pristine/usr/$$moved ;\
|
||||
+ test -e $(objpfx)testroot.pristine/$$moved || \
|
||||
+ ln -s usr/$$moved $(objpfx)testroot.pristine/$$moved ;\
|
||||
+ done
|
||||
# We need the compiled locale dir for localedef tests.
|
||||
test -d $(objpfx)testroot.pristine/$(complocaledir) || \
|
||||
mkdir -p $(objpfx)testroot.pristine/$(complocaledir)
|
||||
diff --git a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h
|
||||
index 15859c3b2759878e..9b63b7f8069866fd 100644
|
||||
--- a/sysdeps/unix/confstr.h
|
||||
+++ b/sysdeps/unix/confstr.h
|
||||
@@ -1 +1 @@
|
||||
-#define CS_PATH "/bin:/usr/bin"
|
||||
+#define CS_PATH "/usr/bin"
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
This is necessary to get things building again after libselinux changes.
|
||||
A proper fix is under discussion upstream:
|
||||
|
||||
<https://sourceware.org/pipermail/libc-alpha/2020-July/116504.html>
|
||||
|
||||
diff --git a/nss/makedb.c b/nss/makedb.c
|
||||
index 8e389a1683747cf1..9d81aed57d384a22 100644
|
||||
--- a/nss/makedb.c
|
||||
+++ b/nss/makedb.c
|
||||
@@ -17,6 +17,10 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
+/* This file uses deprecated declarations from libselinux. */
|
||||
+#include <libc-diag.h>
|
||||
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
|
||||
+
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
|
@ -1,91 +0,0 @@
|
|||
Short description: Cleanup use of _dl_starting_up.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
|
||||
|
||||
Upstream discussions:
|
||||
https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
|
||||
|
||||
Based on the following commit:
|
||||
~~~
|
||||
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Fri, 11 Jun 2010 11:04:11 +0200
|
||||
Subject: [PATCH] Properly set __libc_multiple_libcs
|
||||
|
||||
* elf/rtld.c (_dl_starting_up): Always define.
|
||||
(dl_main): Always set _dl_starting_up.
|
||||
* elf/dl-support.c (_dl_starting_up): Always define.
|
||||
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
|
||||
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
elf/dl-init.c | 4 ----
|
||||
elf/dl-support.c | 2 --
|
||||
elf/rtld.c | 4 ----
|
||||
4 files changed, 7 insertions(+), 10 deletions(-)
|
||||
~~~
|
||||
|
||||
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)
|
||||
call_init (main_map->l_initfini[i], argc, argv, env);
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Finished starting up. */
|
||||
_dl_starting_up = 0;
|
||||
-#endif
|
||||
}
|
||||
Index: b/elf/dl-support.c
|
||||
===================================================================
|
||||
--- a/elf/dl-support.c
|
||||
+++ b/elf/dl-support.c
|
||||
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
|
||||
.r_nlist = 1,
|
||||
};
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Nonzero during startup. */
|
||||
int _dl_starting_up = 1;
|
||||
-#endif
|
||||
|
||||
/* Random data provided by the kernel. */
|
||||
void *_dl_random;
|
||||
Index: b/elf/rtld.c
|
||||
===================================================================
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
|
||||
return iter->previous->name;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set nonzero during loading and initialization of executable and
|
||||
libraries, cleared before the executable's entry point runs. This
|
||||
must not be initialized to nonzero, because the unused dynamic
|
||||
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
|
||||
never be called. */
|
||||
int _dl_starting_up = 0;
|
||||
rtld_hidden_def (_dl_starting_up)
|
||||
-#endif
|
||||
|
||||
/* This is the structure which defines all variables global to ld.so
|
||||
(except those which cannot be added for some reason). */
|
||||
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
/* Process the environment variable which control the behaviour. */
|
||||
process_envvars (&mode);
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set up a flag which tells we are just starting. */
|
||||
_dl_starting_up = 1;
|
||||
-#endif
|
||||
|
||||
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
||||
{
|
|
@ -1,21 +0,0 @@
|
|||
Short description: Fedora-specific glibc install locale changes.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
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 '...'; \
|
||||
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
|
||||
$(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
|
||||
+ --no-archive \
|
||||
-i locales/$$input -f charmaps/$$charset \
|
||||
$(addprefix --prefix=,$(install_root)) $$locale \
|
||||
&& echo ' done';
|
|
@ -1,31 +0,0 @@
|
|||
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: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Mon, 1 May 2006 08:02:53 +0000
|
||||
Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default
|
||||
|
||||
* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
|
||||
- SETENT_BATCH_READ /etc/default/nss option for speeding up
|
||||
some usages of NIS+ (#188246)
|
||||
|
||||
diff --git a/nis/nss b/nis/nss
|
||||
--- a/nis/nss
|
||||
+++ b/nis/nss
|
||||
@@ -25,7 +25,7 @@
|
||||
# memory with every getXXent() call. Otherwise each getXXent() call
|
||||
# might result into a network communication with the server to get
|
||||
# the next entry.
|
||||
-#SETENT_BATCH_READ=TRUE
|
||||
+SETENT_BATCH_READ=TRUE
|
||||
#
|
||||
# ADJUNCT_AS_SHADOW
|
||||
# If set to TRUE, the passwd routines in the NIS NSS module will not
|
|
@ -1,20 +0,0 @@
|
|||
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
|
||||
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
|
||||
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600
|
||||
@@ -33,7 +33,7 @@
|
||||
# logfile /var/log/nscd.log
|
||||
# threads 4
|
||||
# max-threads 32
|
||||
-# server-user nobody
|
||||
+ server-user nscd
|
||||
# stat-user somebody
|
||||
debug-level 0
|
||||
# reload-count 5
|
|
@ -1,45 +0,0 @@
|
|||
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
|
|
@ -1,21 +0,0 @@
|
|||
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
|
||||
index b7428a3..19ba185 100644
|
||||
--- a/nscd/nscd.service
|
||||
+++ b/nscd/nscd.service
|
||||
@@ -5,7 +5,8 @@ Description=Name Service Cache Daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
-ExecStart=/usr/sbin/nscd
|
||||
+EnvironmentFile=-/etc/sysconfig/nscd
|
||||
+ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
|
||||
ExecStop=/usr/sbin/nscd --shutdown
|
||||
ExecReload=/usr/sbin/nscd -i passwd
|
||||
ExecReload=/usr/sbin/nscd -i group
|
|
@ -8,33 +8,24 @@ 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
|
||||
index a85ca3a38be1fdeb..9f1ea9d85f4b833a 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.
|
||||
# Copyright (C) 2015-2022 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
|
||||
index d8bdde7753885a4d..698c4ff81b13f697 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.
|
||||
# Copyright (C) 2015-2022 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
commit 62a321b12d0e397af88fa422db65079332f971dc
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri Jun 24 18:16:41 2022 +0200
|
||||
|
||||
support: Change non-address output format of support_format_dns_packet
|
||||
|
||||
It makes sense to include the owner name (LHS) and record type in the
|
||||
output, so that they can be checked for correctness.
|
||||
|
||||
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
diff --git a/support/support_format_dns_packet.c b/support/support_format_dns_packet.c
|
||||
index 8ed234603eacf8e6..5b52b307b0f5d9f9 100644
|
||||
--- a/support/support_format_dns_packet.c
|
||||
+++ b/support/support_format_dns_packet.c
|
||||
@@ -101,6 +101,17 @@ extract_name (struct in_buffer full, struct in_buffer *in, struct dname *value)
|
||||
return true;
|
||||
}
|
||||
|
||||
+static void
|
||||
+extract_name_data (struct in_buffer full, struct in_buffer *rdata,
|
||||
+ const struct dname *owner, const char *typename, FILE *out)
|
||||
+{
|
||||
+ struct dname name;
|
||||
+ if (extract_name (full, rdata, &name))
|
||||
+ fprintf (out, "data: %s %s %s\n", owner->name, typename, name.name);
|
||||
+ else
|
||||
+ fprintf (out, "error: malformed CNAME/PTR record\n");
|
||||
+}
|
||||
+
|
||||
char *
|
||||
support_format_dns_packet (const unsigned char *buffer, size_t length)
|
||||
{
|
||||
@@ -206,14 +217,11 @@ support_format_dns_packet (const unsigned char *buffer, size_t length)
|
||||
}
|
||||
break;
|
||||
case T_CNAME:
|
||||
+ extract_name_data (full, &rdata, &rname, "CNAME", mem.out);
|
||||
+ break;
|
||||
case T_PTR:
|
||||
- {
|
||||
- struct dname name;
|
||||
- if (extract_name (full, &rdata, &name))
|
||||
- fprintf (mem.out, "name: %s\n", name.name);
|
||||
- else
|
||||
- fprintf (mem.out, "error: malformed CNAME/PTR record\n");
|
||||
- }
|
||||
+ extract_name_data (full, &rdata, &rname, "PTR", mem.out);
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/support/tst-support_format_dns_packet.c b/support/tst-support_format_dns_packet.c
|
||||
index cb7ff53b874641a2..9839aa767e9b57d9 100644
|
||||
--- a/support/tst-support_format_dns_packet.c
|
||||
+++ b/support/tst-support_format_dns_packet.c
|
||||
@@ -85,8 +85,8 @@ test_multiple_cnames (void)
|
||||
"\xc0\x00\x02\x01";
|
||||
check_packet (packet, sizeof (packet) - 1, __func__,
|
||||
"name: www.example\n"
|
||||
- "name: www1.example\n"
|
||||
- "name: www2.example\n"
|
||||
+ "data: www.example CNAME www1.example\n"
|
||||
+ "data: www1.example CNAME www2.example\n"
|
||||
"address: 192.0.2.1\n");
|
||||
}
|
||||
|
|
@ -0,0 +1,960 @@
|
|||
commit f282cdbe7f436c75864e5640a409a10485e9abb2
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri Jun 24 18:16:41 2022 +0200
|
||||
|
||||
resolv: Implement no-aaaa stub resolver option
|
||||
|
||||
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
(conflict in resolv/nss_dns/dns-host.c due to 649213ae27e4:
|
||||
"nss_dns: Rewrite _nss_dns_gethostbyname4_r using current interfaces")
|
||||
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 54d3907f7c901976..557a58a8c3a836ec 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -9,6 +9,18 @@ Version 2.35.1
|
||||
|
||||
Major new features:
|
||||
|
||||
+* The “no-aaaa” DNS stub resolver option has been added. System
|
||||
+ administrators can use it to suppress AAAA queries made by the stub
|
||||
+ resolver, including AAAA lookups triggered by NSS-based interfaces
|
||||
+ such as getaddrinfo. Only DNS lookups are affected: IPv6 data in
|
||||
+ /etc/hosts is still used, getaddrinfo with AI_PASSIVE will still
|
||||
+ produce IPv6 addresses, and configured IPv6 name servers are still
|
||||
+ used. To produce correct Name Error (NXDOMAIN) results, AAAA queries
|
||||
+ are translated to A queries. The new resolver option is intended
|
||||
+ primarily for diagnostic purposes, to rule out that AAAA DNS queries
|
||||
+ have adverse impact. It is incompatible with EDNS0 usage and DNSSEC
|
||||
+ validation by applications.
|
||||
+
|
||||
* The getent tool now supports the --no-addrconfig option. The output of
|
||||
getent with --no-addrconfig may contain addresses of families not
|
||||
configured on the current host i.e. as-if you had not passed
|
||||
diff --git a/resolv/Makefile b/resolv/Makefile
|
||||
index 16943e7d9e05971b..f8a92c6cff9776dc 100644
|
||||
--- a/resolv/Makefile
|
||||
+++ b/resolv/Makefile
|
||||
@@ -55,6 +55,7 @@ routines := \
|
||||
nss_dns_functions \
|
||||
res-close \
|
||||
res-name-checking \
|
||||
+ res-noaaaa \
|
||||
res-state \
|
||||
res_context_hostalias \
|
||||
res_enable_icmp \
|
||||
@@ -99,6 +100,7 @@ tests += \
|
||||
tst-resolv-edns \
|
||||
tst-resolv-invalid-cname \
|
||||
tst-resolv-network \
|
||||
+ tst-resolv-noaaaa \
|
||||
tst-resolv-nondecimal \
|
||||
tst-resolv-res_init-multi \
|
||||
tst-resolv-search \
|
||||
@@ -288,6 +290,7 @@ $(objpfx)tst-resolv-res_init-thread: $(objpfx)libresolv.so \
|
||||
$(shared-thread-library)
|
||||
$(objpfx)tst-resolv-invalid-cname: $(objpfx)libresolv.so \
|
||||
$(shared-thread-library)
|
||||
+$(objpfx)tst-resolv-noaaaa: $(objpfx)libresolv.so $(shared-thread-library)
|
||||
$(objpfx)tst-resolv-nondecimal: $(objpfx)libresolv.so $(shared-thread-library)
|
||||
$(objpfx)tst-resolv-qtypes: $(objpfx)libresolv.so $(shared-thread-library)
|
||||
$(objpfx)tst-resolv-rotate: $(objpfx)libresolv.so $(shared-thread-library)
|
||||
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
|
||||
index 5b8e408135cdd711..9fa81f23c853ba9e 100644
|
||||
--- a/resolv/nss_dns/dns-host.c
|
||||
+++ b/resolv/nss_dns/dns-host.c
|
||||
@@ -126,6 +126,13 @@ static enum nss_status gaih_getanswer (unsigned char *packet1,
|
||||
struct gaih_addrtuple **pat,
|
||||
int *errnop, int *h_errnop,
|
||||
int32_t *ttlp);
|
||||
+static enum nss_status gaih_getanswer_noaaaa (unsigned char *packet,
|
||||
+ size_t packetlen,
|
||||
+ struct alloc_buffer *abuf,
|
||||
+ struct gaih_addrtuple **pat,
|
||||
+ int *errnop, int *h_errnop,
|
||||
+ int32_t *ttlp);
|
||||
+
|
||||
|
||||
static enum nss_status gethostbyname3_context (struct resolv_context *ctx,
|
||||
const char *name, int af,
|
||||
@@ -402,17 +409,30 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
|
||||
int ans2p_malloced = 0;
|
||||
struct alloc_buffer abuf = alloc_buffer_create (buffer, buflen);
|
||||
|
||||
+
|
||||
int olderr = errno;
|
||||
- int n = __res_context_search (ctx, name, C_IN, T_QUERY_A_AND_AAAA,
|
||||
+ int n;
|
||||
+
|
||||
+ if ((ctx->resp->options & RES_NOAAAA) == 0)
|
||||
+ {
|
||||
+ n = __res_context_search (ctx, name, C_IN, T_QUERY_A_AND_AAAA,
|
||||
dns_packet_buffer, sizeof (dns_packet_buffer),
|
||||
&alt_dns_packet_buffer, &ans2p, &nans2p,
|
||||
&resplen2, &ans2p_malloced);
|
||||
- if (n >= 0)
|
||||
- {
|
||||
- status = gaih_getanswer (alt_dns_packet_buffer, n, ans2p, resplen2,
|
||||
- &abuf, pat, errnop, herrnop, ttlp);
|
||||
+ if (n >= 0)
|
||||
+ status = gaih_getanswer (alt_dns_packet_buffer, n, ans2p, resplen2,
|
||||
+ &abuf, pat, errnop, herrnop, ttlp);
|
||||
}
|
||||
else
|
||||
+ {
|
||||
+ n = __res_context_search (ctx, name, C_IN, T_A,
|
||||
+ dns_packet_buffer, sizeof (dns_packet_buffer),
|
||||
+ NULL, NULL, NULL, NULL, NULL);
|
||||
+ if (n >= 0)
|
||||
+ status = gaih_getanswer_noaaaa (alt_dns_packet_buffer, n,
|
||||
+ &abuf, pat, errnop, herrnop, ttlp);
|
||||
+ }
|
||||
+ if (n < 0)
|
||||
{
|
||||
switch (errno)
|
||||
{
|
||||
@@ -1136,3 +1156,16 @@ gaih_getanswer (unsigned char *packet1, size_t packet1len,
|
||||
|
||||
return status;
|
||||
}
|
||||
+
|
||||
+/* Variant of gaih_getanswer without a second (AAAA) response. */
|
||||
+static enum nss_status
|
||||
+gaih_getanswer_noaaaa (unsigned char *packet, size_t packetlen,
|
||||
+ struct alloc_buffer *abuf, struct gaih_addrtuple **pat,
|
||||
+ int *errnop, int *h_errnop, int32_t *ttlp)
|
||||
+{
|
||||
+ enum nss_status status = NSS_STATUS_NOTFOUND;
|
||||
+ if (packetlen > 0)
|
||||
+ status = gaih_getanswer_slice (packet, packetlen,
|
||||
+ abuf, &pat, errnop, h_errnop, ttlp, true);
|
||||
+ return status;
|
||||
+}
|
||||
diff --git a/resolv/res-noaaaa.c b/resolv/res-noaaaa.c
|
||||
new file mode 100644
|
||||
index 0000000000000000..4ba197664a86aed7
|
||||
--- /dev/null
|
||||
+++ b/resolv/res-noaaaa.c
|
||||
@@ -0,0 +1,143 @@
|
||||
+/* Implement suppression of AAAA queries.
|
||||
+ Copyright (C) 2022 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
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <resolv.h>
|
||||
+#include <string.h>
|
||||
+#include <resolv-internal.h>
|
||||
+#include <resolv_context.h>
|
||||
+#include <arpa/nameser.h>
|
||||
+
|
||||
+/* Returns true if the question type at P matches EXPECTED, and the
|
||||
+ class is IN. */
|
||||
+static bool
|
||||
+qtype_matches (const unsigned char *p, int expected)
|
||||
+{
|
||||
+ /* This assumes that T_A/C_IN constants are less than 256, which
|
||||
+ they are. */
|
||||
+ return p[0] == 0 && p[1] == expected && p[2] == 0 && p[3] == C_IN;
|
||||
+}
|
||||
+
|
||||
+/* Handle RES_NOAAAA translation of AAAA queries. To produce a Name
|
||||
+ Error (NXDOMAIN) repsonse for domain names that do not exist, it is
|
||||
+ still necessary to send a query. Using question type A is a
|
||||
+ conservative choice. In the returned answer, it is necessary to
|
||||
+ switch back the question type to AAAA. */
|
||||
+bool
|
||||
+__res_handle_no_aaaa (struct resolv_context *ctx,
|
||||
+ const unsigned char *buf, int buflen,
|
||||
+ unsigned char *ans, int anssiz, int *result)
|
||||
+{
|
||||
+ /* AAAA mode is not active, or the query looks invalid (will not be
|
||||
+ able to be parsed). */
|
||||
+ if ((ctx->resp->options & RES_NOAAAA) == 0
|
||||
+ || buflen <= sizeof (HEADER))
|
||||
+ return false;
|
||||
+
|
||||
+ /* The replacement A query is produced here. */
|
||||
+ struct
|
||||
+ {
|
||||
+ HEADER header;
|
||||
+ unsigned char question[NS_MAXCDNAME + 4];
|
||||
+ } replacement;
|
||||
+ memcpy (&replacement.header, buf, sizeof (replacement.header));
|
||||
+
|
||||
+ if (replacement.header.qr
|
||||
+ || replacement.header.opcode != 0
|
||||
+ || replacement.header.rcode != 0
|
||||
+ || ntohs (replacement.header.qdcount) != 1
|
||||
+ || ntohs (replacement.header.ancount) != 0
|
||||
+ || ntohs (replacement.header.nscount) != 0)
|
||||
+ /* Not a well-formed question. Let the core resolver code produce
|
||||
+ the proper error. */
|
||||
+ return false;
|
||||
+
|
||||
+ /* Disable EDNS0. */
|
||||
+ replacement.header.arcount = htons (0);
|
||||
+
|
||||
+ /* Extract the QNAME. */
|
||||
+ int ret = __ns_name_unpack (buf, buf + buflen, buf + sizeof (HEADER),
|
||||
+ replacement.question, NS_MAXCDNAME);
|
||||
+ if (ret < 0)
|
||||
+ /* Format error. */
|
||||
+ return false;
|
||||
+
|
||||
+ /* Compute the end of the question name. */
|
||||
+ const unsigned char *after_question = buf + sizeof (HEADER) + ret;
|
||||
+
|
||||
+ /* Check that we are dealing with an AAAA query. */
|
||||
+ if (buf + buflen - after_question < 4
|
||||
+ || !qtype_matches (after_question, T_AAAA))
|
||||
+ return false;
|
||||
+
|
||||
+ /* Find the place to store the type/class data in the replacement
|
||||
+ query. */
|
||||
+ after_question = replacement.question;
|
||||
+ /* This cannot fail because __ns_name_unpack above produced a valid
|
||||
+ domain name. */
|
||||
+ (void) __ns_name_skip (&after_question, &replacement.question[NS_MAXCDNAME]);
|
||||
+ unsigned char *start_of_query = (unsigned char *) &replacement;
|
||||
+ const unsigned char *end_of_query = after_question + 4;
|
||||
+
|
||||
+ /* Produce an A/IN query. */
|
||||
+ {
|
||||
+ unsigned char *p = (unsigned char *) after_question;
|
||||
+ p[0] = 0;
|
||||
+ p[1] = T_A;
|
||||
+ p[2] = 0;
|
||||
+ p[3] = C_IN;
|
||||
+ }
|
||||
+
|
||||
+ /* Clear the output buffer, to avoid reading undefined data when
|
||||
+ rewriting the result from A to AAAA. */
|
||||
+ memset (ans, 0, anssiz);
|
||||
+
|
||||
+ /* Always perform the message translation, independent of the error
|
||||
+ code. */
|
||||
+ ret = __res_context_send (ctx,
|
||||
+ start_of_query, end_of_query - start_of_query,
|
||||
+ NULL, 0, ans, anssiz,
|
||||
+ NULL, NULL, NULL, NULL, NULL);
|
||||
+
|
||||
+ /* Patch in the AAAA question type if there is room and the A query
|
||||
+ type was received. */
|
||||
+ after_question = ans + sizeof (HEADER);
|
||||
+ if (__ns_name_skip (&after_question, ans + anssiz) == 0
|
||||
+ && ans + anssiz - after_question >= 4
|
||||
+ && qtype_matches (after_question, T_A))
|
||||
+ {
|
||||
+ ((unsigned char *) after_question)[1] = T_AAAA;
|
||||
+
|
||||
+ /* Create an aligned copy of the header. Hide all data except
|
||||
+ the question from the response. Put back the header. There is
|
||||
+ no need to change the response code. The zero answer count turns
|
||||
+ a positive response with data into a no-data response. */
|
||||
+ memcpy (&replacement.header, ans, sizeof (replacement.header));
|
||||
+ replacement.header.ancount = htons (0);
|
||||
+ replacement.header.nscount = htons (0);
|
||||
+ replacement.header.arcount = htons (0);
|
||||
+ memcpy (ans, &replacement.header, sizeof (replacement.header));
|
||||
+
|
||||
+ /* Truncate the reply. */
|
||||
+ if (ret <= 0)
|
||||
+ *result = ret;
|
||||
+ else
|
||||
+ *result = after_question - ans + 4;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
|
||||
index 030df0aa90c9f34f..b0fe69b1aa5186a0 100644
|
||||
--- a/resolv/res_debug.c
|
||||
+++ b/resolv/res_debug.c
|
||||
@@ -613,6 +613,7 @@ p_option(u_long option) {
|
||||
case RES_NOTLDQUERY: return "no-tld-query";
|
||||
case RES_NORELOAD: return "no-reload";
|
||||
case RES_TRUSTAD: return "trust-ad";
|
||||
+ case RES_NOAAAA: return "no-aaaa";
|
||||
/* XXX nonreentrant */
|
||||
default: sprintf(nbuf, "?0x%lx?", (u_long)option);
|
||||
return (nbuf);
|
||||
diff --git a/resolv/res_init.c b/resolv/res_init.c
|
||||
index cbc16ba021bd1fb3..2c0bea658e774ae7 100644
|
||||
--- a/resolv/res_init.c
|
||||
+++ b/resolv/res_init.c
|
||||
@@ -695,6 +695,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options)
|
||||
{ STRnLEN ("no-reload"), 0, RES_NORELOAD },
|
||||
{ STRnLEN ("use-vc"), 0, RES_USEVC },
|
||||
{ STRnLEN ("trust-ad"), 0, RES_TRUSTAD },
|
||||
+ { STRnLEN ("no-aaaa"), 0, RES_NOAAAA },
|
||||
};
|
||||
#define noptions (sizeof (options) / sizeof (options[0]))
|
||||
for (int i = 0; i < noptions; ++i)
|
||||
diff --git a/resolv/res_query.c b/resolv/res_query.c
|
||||
index 5d0a68dc81fdd8c7..1d2c81737bc889c9 100644
|
||||
--- a/resolv/res_query.c
|
||||
+++ b/resolv/res_query.c
|
||||
@@ -204,10 +204,26 @@ __res_context_query (struct resolv_context *ctx, const char *name,
|
||||
free (buf);
|
||||
return (n);
|
||||
}
|
||||
- assert (answerp == NULL || (void *) *answerp == (void *) answer);
|
||||
- n = __res_context_send (ctx, query1, nquery1, query2, nquery2, answer,
|
||||
- anslen, answerp, answerp2, nanswerp2, resplen2,
|
||||
- answerp2_malloced);
|
||||
+
|
||||
+ /* Suppress AAAA lookups if required. __res_handle_no_aaaa
|
||||
+ checks RES_NOAAAA first, so avoids parsing the
|
||||
+ just-generated query packet in most cases. nss_dns avoids
|
||||
+ using T_QUERY_A_AND_AAAA in RES_NOAAAA mode, so there is no
|
||||
+ need to handle it here. */
|
||||
+ if (type == T_AAAA && __res_handle_no_aaaa (ctx, query1, nquery1,
|
||||
+ answer, anslen, &n))
|
||||
+ /* There must be no second query for AAAA queries. The code
|
||||
+ below is still needed to translate NODATA responses. */
|
||||
+ assert (query2 == NULL);
|
||||
+ else
|
||||
+ {
|
||||
+ assert (answerp == NULL || (void *) *answerp == (void *) answer);
|
||||
+ n = __res_context_send (ctx, query1, nquery1, query2, nquery2,
|
||||
+ answer, anslen,
|
||||
+ answerp, answerp2, nanswerp2, resplen2,
|
||||
+ answerp2_malloced);
|
||||
+ }
|
||||
+
|
||||
if (use_malloc)
|
||||
free (buf);
|
||||
if (n < 0) {
|
||||
diff --git a/resolv/res_send.c b/resolv/res_send.c
|
||||
index 5d6be4b82d383dc0..0568800b056349aa 100644
|
||||
--- a/resolv/res_send.c
|
||||
+++ b/resolv/res_send.c
|
||||
@@ -438,8 +438,13 @@ context_send_common (struct resolv_context *ctx,
|
||||
RES_SET_H_ERRNO (&_res, NETDB_INTERNAL);
|
||||
return -1;
|
||||
}
|
||||
- int result = __res_context_send (ctx, buf, buflen, NULL, 0, ans, anssiz,
|
||||
- NULL, NULL, NULL, NULL, NULL);
|
||||
+
|
||||
+ int result;
|
||||
+ if (__res_handle_no_aaaa (ctx, buf, buflen, ans, anssiz, &result))
|
||||
+ return result;
|
||||
+
|
||||
+ result = __res_context_send (ctx, buf, buflen, NULL, 0, ans, anssiz,
|
||||
+ NULL, NULL, NULL, NULL, NULL);
|
||||
__resolv_context_put (ctx);
|
||||
return result;
|
||||
}
|
||||
diff --git a/resolv/resolv-internal.h b/resolv/resolv-internal.h
|
||||
index 2fa57d394f70bcad..b3554f305db3d60c 100644
|
||||
--- a/resolv/resolv-internal.h
|
||||
+++ b/resolv/resolv-internal.h
|
||||
@@ -78,6 +78,14 @@ int __res_context_send (struct resolv_context *, const unsigned char *, int,
|
||||
int *, int *, int *);
|
||||
libc_hidden_proto (__res_context_send)
|
||||
|
||||
+/* Return true if the query has been handled in RES_NOAAAA mode. For
|
||||
+ that, RES_NOAAAA must be active, and the question type must be AAAA.
|
||||
+ The caller is expected to return *RESULT as the return value. */
|
||||
+bool __res_handle_no_aaaa (struct resolv_context *ctx,
|
||||
+ const unsigned char *buf, int buflen,
|
||||
+ unsigned char *ans, int anssiz, int *result)
|
||||
+ attribute_hidden;
|
||||
+
|
||||
/* Internal function similar to res_hostalias. */
|
||||
const char *__res_context_hostalias (struct resolv_context *,
|
||||
const char *, char *, size_t);
|
||||
diff --git a/resolv/resolv.h b/resolv/resolv.h
|
||||
index e7c8d44645912ddf..3a79ffea57a6916f 100644
|
||||
--- a/resolv/resolv.h
|
||||
+++ b/resolv/resolv.h
|
||||
@@ -132,6 +132,7 @@ struct res_sym {
|
||||
as a TLD. */
|
||||
#define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */
|
||||
#define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */
|
||||
+#define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH)
|
||||
|
||||
diff --git a/resolv/tst-resolv-noaaaa.c b/resolv/tst-resolv-noaaaa.c
|
||||
new file mode 100644
|
||||
index 0000000000000000..56b25f88a58ad286
|
||||
--- /dev/null
|
||||
+++ b/resolv/tst-resolv-noaaaa.c
|
||||
@@ -0,0 +1,533 @@
|
||||
+/* Test the RES_NOAAAA resolver option.
|
||||
+ Copyright (C) 2022 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
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <netdb.h>
|
||||
+#include <resolv.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <support/check.h>
|
||||
+#include <support/check_nss.h>
|
||||
+#include <support/resolv_test.h>
|
||||
+#include <support/support.h>
|
||||
+
|
||||
+/* Used to keep track of the number of queries. */
|
||||
+static volatile unsigned int queries;
|
||||
+
|
||||
+static void
|
||||
+response (const struct resolv_response_context *ctx,
|
||||
+ struct resolv_response_builder *b,
|
||||
+ const char *qname, uint16_t qclass, uint16_t qtype)
|
||||
+{
|
||||
+ /* Each test should only send one query. */
|
||||
+ ++queries;
|
||||
+ TEST_COMPARE (queries, 1);
|
||||
+
|
||||
+ /* AAAA queries are supposed to be disabled. */
|
||||
+ TEST_VERIFY (qtype != T_AAAA);
|
||||
+ TEST_COMPARE (qclass, C_IN);
|
||||
+
|
||||
+ /* The only other query type besides A is PTR. */
|
||||
+ if (qtype != T_A)
|
||||
+ TEST_COMPARE (qtype, T_PTR);
|
||||
+
|
||||
+ int an, ns, ar;
|
||||
+ char *tail;
|
||||
+ if (sscanf (qname, "an%d.ns%d.ar%d.%ms", &an, &ns, &ar, &tail) != 4)
|
||||
+ FAIL_EXIT1 ("invalid QNAME: %s\n", qname);
|
||||
+ TEST_COMPARE_STRING (tail, "example");
|
||||
+ free (tail);
|
||||
+
|
||||
+ if (an < 0 || ns < 0 || ar < 0)
|
||||
+ {
|
||||
+ struct resolv_response_flags flags = { .rcode = NXDOMAIN, };
|
||||
+ resolv_response_init (b, flags);
|
||||
+ resolv_response_add_question (b, qname, qclass, qtype);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ struct resolv_response_flags flags = {};
|
||||
+ resolv_response_init (b, flags);
|
||||
+ resolv_response_add_question (b, qname, qclass, qtype);
|
||||
+
|
||||
+ resolv_response_section (b, ns_s_an);
|
||||
+ for (int i = 0; i < an; ++i)
|
||||
+ {
|
||||
+ resolv_response_open_record (b, qname, qclass, qtype, 60);
|
||||
+ switch (qtype)
|
||||
+ {
|
||||
+ case T_A:
|
||||
+ char ipv4[4] = {192, 0, 2, i + 1};
|
||||
+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));
|
||||
+ break;
|
||||
+
|
||||
+ case T_PTR:
|
||||
+ char *name = xasprintf ("ptr-%d", i);
|
||||
+ resolv_response_add_name (b, name);
|
||||
+ free (name);
|
||||
+ break;
|
||||
+ }
|
||||
+ resolv_response_close_record (b);
|
||||
+ }
|
||||
+
|
||||
+ resolv_response_section (b, ns_s_ns);
|
||||
+ for (int i = 0; i < ns; ++i)
|
||||
+ {
|
||||
+ resolv_response_open_record (b, qname, qclass, T_NS, 60);
|
||||
+ char *name = xasprintf ("ns%d.example.net", i);
|
||||
+ resolv_response_add_name (b, name);
|
||||
+ free (name);
|
||||
+ resolv_response_close_record (b);
|
||||
+ }
|
||||
+
|
||||
+ resolv_response_section (b, ns_s_ar);
|
||||
+ int addr = 1;
|
||||
+ for (int i = 0; i < ns; ++i)
|
||||
+ {
|
||||
+ char *name = xasprintf ("ns%d.example.net", i);
|
||||
+ for (int j = 0; j < ar; ++j)
|
||||
+ {
|
||||
+ resolv_response_open_record (b, name, qclass, T_A, 60);
|
||||
+ char ipv4[4] = {192, 0, 2, addr};
|
||||
+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));
|
||||
+ resolv_response_close_record (b);
|
||||
+
|
||||
+ resolv_response_open_record (b, name, qclass, T_AAAA, 60);
|
||||
+ char ipv6[16]
|
||||
+ = {0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, addr};
|
||||
+ resolv_response_add_data (b, &ipv6, sizeof (ipv6));
|
||||
+ resolv_response_close_record (b);
|
||||
+
|
||||
+ ++addr;
|
||||
+ }
|
||||
+ free (name);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Number of modes. Lowest bit encodes *n* function vs implicit _res
|
||||
+ argument. The mode numbers themselves are arbitrary. */
|
||||
+enum { mode_count = 8 };
|
||||
+
|
||||
+/* res_send-like modes do not perform error translation. */
|
||||
+enum { first_send_mode = 6 };
|
||||
+
|
||||
+static int
|
||||
+libresolv_query (unsigned int mode, const char *qname, uint16_t qtype,
|
||||
+ unsigned char *buf, size_t buflen)
|
||||
+{
|
||||
+ int saved_errno = errno;
|
||||
+
|
||||
+ TEST_VERIFY_EXIT (mode < mode_count);
|
||||
+
|
||||
+ switch (mode)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ return res_query (qname, C_IN, qtype, buf, buflen);
|
||||
+ case 1:
|
||||
+ return res_nquery (&_res, qname, C_IN, qtype, buf, buflen);
|
||||
+ case 2:
|
||||
+ return res_search (qname, C_IN, qtype, buf, buflen);
|
||||
+ case 3:
|
||||
+ return res_nsearch (&_res, qname, C_IN, qtype, buf, buflen);
|
||||
+ case 4:
|
||||
+ return res_querydomain (qname, "", C_IN, qtype, buf, buflen);
|
||||
+ case 5:
|
||||
+ return res_nquerydomain (&_res, qname, "", C_IN, qtype, buf, buflen);
|
||||
+ case 6:
|
||||
+ {
|
||||
+ unsigned char querybuf[512];
|
||||
+ int ret = res_mkquery (QUERY, qname, C_IN, qtype,
|
||||
+ NULL, 0, NULL, querybuf, sizeof (querybuf));
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ errno = saved_errno;
|
||||
+ return res_send (querybuf, ret, buf, buflen);
|
||||
+ }
|
||||
+ case 7:
|
||||
+ {
|
||||
+ unsigned char querybuf[512];
|
||||
+ int ret = res_nmkquery (&_res, QUERY, qname, C_IN, qtype,
|
||||
+ NULL, 0, NULL, querybuf, sizeof (querybuf));
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ errno = saved_errno;
|
||||
+ return res_nsend (&_res, querybuf, ret, buf, buflen);
|
||||
+ }
|
||||
+ }
|
||||
+ __builtin_unreachable ();
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ struct resolv_test *obj = resolv_test_start
|
||||
+ ((struct resolv_redirect_config)
|
||||
+ {
|
||||
+ .response_callback = response
|
||||
+ });
|
||||
+
|
||||
+ _res.options |= RES_NOAAAA;
|
||||
+
|
||||
+ check_hostent ("an1.ns2.ar1.example",
|
||||
+ gethostbyname ("an1.ns2.ar1.example"),
|
||||
+ "name: an1.ns2.ar1.example\n"
|
||||
+ "address: 192.0.2.1\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an0.ns2.ar1.example",
|
||||
+ gethostbyname ("an0.ns2.ar1.example"),
|
||||
+ "error: NO_ADDRESS\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an-1.ns2.ar1.example",
|
||||
+ gethostbyname ("an-1.ns2.ar1.example"),
|
||||
+ "error: HOST_NOT_FOUND\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ check_hostent ("an1.ns2.ar1.example AF_INET",
|
||||
+ gethostbyname2 ("an1.ns2.ar1.example", AF_INET),
|
||||
+ "name: an1.ns2.ar1.example\n"
|
||||
+ "address: 192.0.2.1\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an0.ns2.ar1.example AF_INET",
|
||||
+ gethostbyname2 ("an0.ns2.ar1.example", AF_INET),
|
||||
+ "error: NO_ADDRESS\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an-1.ns2.ar1.example AF_INET",
|
||||
+ gethostbyname2 ("an-1.ns2.ar1.example", AF_INET),
|
||||
+ "error: HOST_NOT_FOUND\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ check_hostent ("an1.ns2.ar1.example AF_INET6",
|
||||
+ gethostbyname2 ("an1.ns2.ar1.example", AF_INET6),
|
||||
+ "error: NO_ADDRESS\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an0.ns2.ar1.example AF_INET6",
|
||||
+ gethostbyname2 ("an0.ns2.ar1.example", AF_INET6),
|
||||
+ "error: NO_ADDRESS\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an-1.ns2.ar1.example AF_INET6",
|
||||
+ gethostbyname2 ("an-1.ns2.ar1.example", AF_INET6),
|
||||
+ "error: HOST_NOT_FOUND\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* Multiple addresses. */
|
||||
+ check_hostent ("an2.ns0.ar0.example",
|
||||
+ gethostbyname ("an2.ns0.ar0.example"),
|
||||
+ "name: an2.ns0.ar0.example\n"
|
||||
+ "address: 192.0.2.1\n"
|
||||
+ "address: 192.0.2.2\n");
|
||||
+ queries = 0;
|
||||
+ check_hostent ("an2.ns0.ar0.example AF_INET6",
|
||||
+ gethostbyname2 ("an2.ns0.ar0.example", AF_INET6),
|
||||
+ "error: NO_ADDRESS\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* getaddrinfo checks with one address. */
|
||||
+ struct addrinfo *ai;
|
||||
+ int ret;
|
||||
+ ret = getaddrinfo ("an1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an1.ns2.ar1.example (AF_INET)", ai, ret,
|
||||
+ "address: STREAM/TCP 192.0.2.1 80\n");
|
||||
+ freeaddrinfo (ai);
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET6,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an1.ns2.ar1.example (AF_INET6)", ai, ret,
|
||||
+ "error: No address associated with hostname\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_UNSPEC,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an1.ns2.ar1.example (AF_UNSPEC)", ai, ret,
|
||||
+ "address: STREAM/TCP 192.0.2.1 80\n");
|
||||
+ freeaddrinfo (ai);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* getaddrinfo checks with three addresses. */
|
||||
+ ret = getaddrinfo ("an3.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an3.ns2.ar1.example (AF_INET)", ai, ret,
|
||||
+ "address: STREAM/TCP 192.0.2.1 80\n"
|
||||
+ "address: STREAM/TCP 192.0.2.2 80\n"
|
||||
+ "address: STREAM/TCP 192.0.2.3 80\n");
|
||||
+ freeaddrinfo (ai);
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an3.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET6,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an3.ns2.ar1.example (AF_INET6)", ai, ret,
|
||||
+ "error: No address associated with hostname\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an3.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_UNSPEC,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an3.ns2.ar1.example (AF_UNSPEC)", ai, ret,
|
||||
+ "address: STREAM/TCP 192.0.2.1 80\n"
|
||||
+ "address: STREAM/TCP 192.0.2.2 80\n"
|
||||
+ "address: STREAM/TCP 192.0.2.3 80\n");
|
||||
+ freeaddrinfo (ai);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* getaddrinfo checks with no address. */
|
||||
+ ret = getaddrinfo ("an0.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an0.ns2.ar1.example (AF_INET)", ai, ret,
|
||||
+ "error: No address associated with hostname\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an0.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET6,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an0.ns2.ar1.example (AF_INET6)", ai, ret,
|
||||
+ "error: No address associated with hostname\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an0.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_UNSPEC,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an-1.ns2.ar1.example (AF_UNSPEC)", ai, ret,
|
||||
+ "error: No address associated with hostname\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* getaddrinfo checks with NXDOMAIN. */
|
||||
+ ret = getaddrinfo ("an-1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an-1.ns2.ar1.example (AF_INET)", ai, ret,
|
||||
+ "error: Name or service not known\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an-1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_INET6,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an-1.ns2.ar1.example (AF_INET6)", ai, ret,
|
||||
+ "error: Name or service not known\n");
|
||||
+ queries = 0;
|
||||
+ ret = getaddrinfo ("an-1.ns2.ar1.example", "80",
|
||||
+ &(struct addrinfo)
|
||||
+ {
|
||||
+ .ai_family = AF_UNSPEC,
|
||||
+ .ai_socktype = SOCK_STREAM,
|
||||
+ }, &ai);
|
||||
+ check_addrinfo ("an-1.ns2.ar1.example (AF_UNSPEC)", ai, ret,
|
||||
+ "error: Name or service not known\n");
|
||||
+ queries = 0;
|
||||
+
|
||||
+ for (unsigned int mode = 0; mode < mode_count; ++mode)
|
||||
+ {
|
||||
+ unsigned char *buf;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Response for A. */
|
||||
+ buf = malloc (512);
|
||||
+ ret = libresolv_query (mode, "an1.ns2.ar1.example", T_A, buf, 512);
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an1.ns2.ar1.example\n"
|
||||
+ "address: 192.0.2.1\n");
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NODATA response for A. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an0.ns2.ar1.example", T_A, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, NO_ADDRESS);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, 0);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an0.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NXDOMAIN response for A. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an-1.ns2.ar1.example", T_A, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, HOST_NOT_FOUND);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, NXDOMAIN);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an-1.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* Response for PTR. */
|
||||
+ buf = malloc (512);
|
||||
+ ret = libresolv_query (mode, "an1.ns2.ar1.example", T_PTR, buf, 512);
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example PTR", buf, ret,
|
||||
+ "name: an1.ns2.ar1.example\n"
|
||||
+ "data: an1.ns2.ar1.example PTR ptr-0\n");
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NODATA response for PTR. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an0.ns2.ar1.example", T_PTR, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, NO_ADDRESS);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, 0);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example PTR", buf, ret,
|
||||
+ "name: an0.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NXDOMAIN response for PTR. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an-1.ns2.ar1.example", T_PTR, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, HOST_NOT_FOUND);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, NXDOMAIN);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example PTR", buf, ret,
|
||||
+ "name: an-1.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NODATA response for AAAA. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an1.ns2.ar1.example", T_AAAA, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, NO_ADDRESS);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, 0);
|
||||
+ check_dns_packet ("an1.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an1.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NODATA response for AAAA (original is already NODATA). */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an0.ns2.ar1.example", T_AAAA, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, NO_ADDRESS);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, 0);
|
||||
+ check_dns_packet ("an0.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an0.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+
|
||||
+ /* NXDOMAIN response. */
|
||||
+ buf = malloc (512);
|
||||
+ errno = 0;
|
||||
+ ret = libresolv_query (mode, "an-1.ns2.ar1.example", T_AAAA, buf, 512);
|
||||
+ if (mode < first_send_mode)
|
||||
+ {
|
||||
+ TEST_COMPARE (ret, -1);
|
||||
+ TEST_COMPARE (errno, 0);
|
||||
+ TEST_COMPARE (h_errno, HOST_NOT_FOUND);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TEST_VERIFY_EXIT (ret > 0);
|
||||
+ TEST_COMPARE (((HEADER *)buf)->rcode, NXDOMAIN);
|
||||
+ check_dns_packet ("an-1.ns2.ar1.example A", buf, ret,
|
||||
+ "name: an-1.ns2.ar1.example\n");
|
||||
+ }
|
||||
+ free (buf);
|
||||
+ queries = 0;
|
||||
+ }
|
||||
+
|
||||
+ resolv_test_end (obj);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#include <support/test-driver.c>
|
||||
diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c
|
||||
index cf81d1d162317e92..b5749452ef817a0b 100644
|
||||
--- a/resolv/tst-resolv-res_init-skeleton.c
|
||||
+++ b/resolv/tst-resolv-res_init-skeleton.c
|
||||
@@ -128,6 +128,7 @@ print_resp (FILE *fp, res_state resp)
|
||||
print_option_flag (fp, &options, RES_NOTLDQUERY, "no-tld-query");
|
||||
print_option_flag (fp, &options, RES_NORELOAD, "no-reload");
|
||||
print_option_flag (fp, &options, RES_TRUSTAD, "trust-ad");
|
||||
+ print_option_flag (fp, &options, RES_NOAAAA, "no-aaaa");
|
||||
fputc ('\n', fp);
|
||||
if (options != 0)
|
||||
fprintf (fp, "; error: unresolved option bits: 0x%x\n", options);
|
||||
@@ -721,6 +722,15 @@ struct test_case test_cases[] =
|
||||
"nameserver 192.0.2.1\n"
|
||||
"; nameserver[0]: [192.0.2.1]:53\n"
|
||||
},
|
||||
+ {.name = "no-aaaa flag",
|
||||
+ .conf = "options no-aaaa\n"
|
||||
+ "nameserver 192.0.2.1\n",
|
||||
+ .expected = "options no-aaaa\n"
|
||||
+ "search example.com\n"
|
||||
+ "; search[0]: example.com\n"
|
||||
+ "nameserver 192.0.2.1\n"
|
||||
+ "; nameserver[0]: [192.0.2.1]:53\n"
|
||||
+ },
|
||||
{ NULL }
|
||||
};
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
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
|
||||
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
|
||||
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
|
||||
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
|
||||
alias OSF10010004// HP-GREEK8//
|
||||
module HP-GREEK8// INTERNAL HP-GREEK8 1
|
||||
module INTERNAL HP-GREEK8// HP-GREEK8 1
|
||||
+
|
||||
+alias ISO-10646-UCS-2// UNICODE//
|
||||
+alias ISO-10646-UCS-2// ISO-10646/UTF8/
|
|
@ -1,84 +0,0 @@
|
|||
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
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/elf/dl-load.c
|
||||
+++ glibc-2.22-386-g95e8397/elf/dl-load.c
|
||||
@@ -881,7 +881,8 @@ _dl_map_object_from_fd (const char *name
|
||||
|
||||
/* Get file information. */
|
||||
struct r_file_id id;
|
||||
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
|
||||
+ struct stat64 st;
|
||||
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
|
||||
{
|
||||
errstring = N_("cannot stat shared object");
|
||||
call_lose_errno:
|
||||
@@ -1076,6 +1077,16 @@ _dl_map_object_from_fd (const char *name
|
||||
= N_("ELF load command address/offset not properly aligned");
|
||||
goto call_lose;
|
||||
}
|
||||
+ if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
|
||||
+ {
|
||||
+ /* If the segment requires zeroing of part of its last
|
||||
+ page, we'll crash when accessing the unmapped page.
|
||||
+ There's still a possibility of a race, if the shared
|
||||
+ object is truncated between the fxstat above and the
|
||||
+ memset below. */
|
||||
+ errstring = N_("ELF load command past end of file");
|
||||
+ goto call_lose;
|
||||
+ }
|
||||
|
||||
struct loadcmd *c = &loadcmds[nloadcmds++];
|
||||
c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
|
||||
Index: glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/sysdeps/generic/dl-fileid.h
|
||||
+++ glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
|
||||
@@ -29,7 +29,8 @@ struct r_file_id
|
||||
On error, returns false, with errno set. */
|
||||
static inline bool
|
||||
_dl_get_file_id (int fd __attribute__ ((unused)),
|
||||
- struct r_file_id *id __attribute__ ((unused)))
|
||||
+ struct r_file_id *id __attribute__ ((unused)),
|
||||
+ struct stat64_t *st __attribute__((unused)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Index: glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/sysdeps/posix/dl-fileid.h
|
||||
+++ glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
|
||||
@@ -27,18 +27,16 @@ struct r_file_id
|
||||
ino64_t ino;
|
||||
};
|
||||
|
||||
-/* Sample FD to fill in *ID. Returns true on success.
|
||||
+/* Sample FD to fill in *ID and *ST. Returns true on success.
|
||||
On error, returns false, with errno set. */
|
||||
static inline bool
|
||||
-_dl_get_file_id (int fd, struct r_file_id *id)
|
||||
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
|
||||
{
|
||||
- struct stat64 st;
|
||||
-
|
||||
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &st) < 0))
|
||||
+ if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, st) < 0))
|
||||
return false;
|
||||
|
||||
- id->dev = st.st_dev;
|
||||
- id->ino = st.st_ino;
|
||||
+ id->dev = st->st_dev;
|
||||
+ id->ino = st->st_ino;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
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
|
||||
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
|
||||
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
|
||||
@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
|
||||
# if HANDLE_MULTIBYTE
|
||||
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
|
||||
{
|
||||
+ const char *orig_pattern = pattern;
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
const char *p;
|
||||
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
|
||||
prepare_wpattern:
|
||||
n = mbsrtowcs (NULL, &pattern, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /*Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wstring, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- {
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which
|
||||
- mbsrtows hasn't already done? */
|
||||
- free_return:
|
||||
- free (wpattern_malloc);
|
||||
- return -1;
|
||||
- }
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
|
||||
prepare_wstring:
|
||||
n = mbsrtowcs (NULL, &string, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- goto free_return;
|
||||
+ /* Something wrong: Fall back to singlebyte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
free (wpattern_malloc);
|
||||
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
|
||||
free (wpattern_malloc);
|
||||
|
||||
return res;
|
||||
+ free_and_try_singlebyte:
|
||||
+ free(wpattern_malloc);
|
||||
+ try_singlebyte:
|
||||
+ pattern = orig_pattern;
|
||||
}
|
||||
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
%__glibc_requires %{_rpmconfigdir}/glibc.req
|
||||
%__glibc_magic ELF
|
||||
%__glibc_flags exeonly
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
# Auto-generating dependencies for glibc development snapshots.
|
||||
#
|
||||
# A glibc development snapshot (say version 2.33.9000) may define
|
||||
# symbols in its under-development symbol version (GLIBC_2.34). RPM
|
||||
# automatically derives RPM dependencies such as
|
||||
# libc.so.6(GLIBC_2.34)(64bit) from that. While the GLIBC_2.34
|
||||
# version is under development, these dependencies may be inaccurate
|
||||
# and could be satisfied by glibc RPM package versions that lack the
|
||||
# symbols because they were created from an earlier development
|
||||
# snapshot that had some other GLIBC_2.34 symbols. Therefore, if the
|
||||
# latest, under-development ELF symbol version is detected, this
|
||||
# dependency generator adds an explicit RPM dependencies on the glibc
|
||||
# packaging version against which an RPM package is built.
|
||||
#
|
||||
# This script runs for the glibc build itself. In this case, it may
|
||||
# produce a >= dependency on the build-time glibc, but there will also
|
||||
# be an (potentially indirect) = dependency, which takes precedence.
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
searching=true
|
||||
# Pre-filter using eu-elfclassify, to skip kernel modules.
|
||||
eu-elfclassify --loadable --file --stdin --print | while read path; do
|
||||
# Assume that all dynamically linked objects depend on glibc in
|
||||
# some way.
|
||||
if $searching; then
|
||||
# Undefined symbols within latest, under-development
|
||||
# (changing) symbol versions trigger the versioned RPM
|
||||
# dependency. Do not use "egrep -q" to keep reading from the
|
||||
# pipe, avoiding a spurious EPIPE error in eu-readelf.
|
||||
if eu-readelf -s "$path" \
|
||||
| egrep '\sUNDEF\s.*@''@SYMVER@(\s|$)' >/dev/null
|
||||
then
|
||||
echo 'glibc >= @VERSION@-@RELEASE@'
|
||||
# Stop searching after the first match, but keep reading from
|
||||
# the pipe.
|
||||
searching=false
|
||||
fi
|
||||
fi
|
||||
done
|
3887
glibc.spec
3887
glibc.spec
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/python3
|
||||
#
|
||||
# This script turns localedata/SUPPORTED (whose path is passed as the
|
||||
# first argument) into a normalized list of LANGUAGE "_" REGION pairs.
|
||||
# (If there is no REGION defined, only LANGUAGE is used.) The list
|
||||
# is written to standard output, with one element per line.
|
||||
|
||||
import sys
|
||||
|
||||
supported, = sys.argv[1:]
|
||||
|
||||
# Pairs seen so far. Used to suppress duplicates.
|
||||
seen = set()
|
||||
with open(supported) as inp:
|
||||
for line in inp:
|
||||
if line.startswith("#") or line == "SUPPORTED-LOCALES=\\\n":
|
||||
# Comment or prefix.
|
||||
continue
|
||||
if not line.endswith(" \\\n"):
|
||||
raise IOError("line without continuation: " + repr(line))
|
||||
try:
|
||||
slash = line.index("/")
|
||||
except ValueError:
|
||||
raise IOError("line without slash: " + repr(line))
|
||||
spec = line[:slash]
|
||||
for separator in ".@":
|
||||
try:
|
||||
# Strip charset, variant specifiers.
|
||||
spec = spec[:spec.index(separator)]
|
||||
except ValueError:
|
||||
pass
|
||||
seen.add(spec)
|
||||
|
||||
# The C locale does not correspond to a language.
|
||||
seen.remove("C")
|
||||
|
||||
# The glibc source file is not sorted.
|
||||
for spec in sorted(seen):
|
||||
print(spec)
|
||||
print() # The Lua generator produces a trailing newline.
|
|
@ -0,0 +1,10 @@
|
|||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
directory: tests
|
||||
prepare:
|
||||
how: install
|
||||
exclude:
|
||||
- glibc-headers-s390
|
||||
execute:
|
||||
how: beakerlib
|
273
power6emul.c
273
power6emul.c
|
@ -1,273 +0,0 @@
|
|||
/* Emulate power6 mf[tf]gpr and fri[zpmn] instructions.
|
||||
Copyright (C) 2006 Red Hat, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
|
||||
|
||||
This 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.
|
||||
|
||||
It 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, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern double frip (double), friz (double), frin (double), frim (double);
|
||||
asm (".globl frip, friz, frin, frim\n.hidden frip, friz, frin, frim\n\t"
|
||||
#ifdef __powerpc64__
|
||||
".section \".toc\",\"aw\"\n"
|
||||
"8:" ".tc FD_43300000_0[TC],0x4330000000000000\n"
|
||||
"9:" ".tc FD_3fe00000_0[TC],0x3fe0000000000000\n\t"
|
||||
".previous\n\t"
|
||||
#else
|
||||
".rodata\n\t"
|
||||
".align 2\n"
|
||||
"8:" ".long 0x59800000\n"
|
||||
"9:" ".long 0x3f000000\n\t"
|
||||
".previous\n\t"
|
||||
#endif
|
||||
"# frip == ceil\n"
|
||||
"frip:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,2\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# friz == trunc\n"
|
||||
"friz:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frin == round\n"
|
||||
"frin:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"addi 9,9,8b-1b@l\n\t"
|
||||
"mtlr 11\n\t"
|
||||
"lfs 13,0(9)\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 10,9b@toc(2)\n\t"
|
||||
#else
|
||||
"lfs 10,9b-8b(9)\n\t"
|
||||
#endif
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,10\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "fsub 9,1,10\n\t"
|
||||
"bge- 6,3f\n\t"
|
||||
"fsub 1,9,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frim == floor\n"
|
||||
"frim:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,3\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n");
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define m1 0x5555555555555555L
|
||||
#define m2 0x3333333333333333L
|
||||
#define m3 0x0f0f0f0f0f0f0f0fL
|
||||
#else
|
||||
#define m1 0x55555555
|
||||
#define m2 0x33333333
|
||||
#define m3 0x0f0f0f0f
|
||||
#endif
|
||||
|
||||
static inline unsigned long
|
||||
popcntb (unsigned long n)
|
||||
{
|
||||
n -= (n >> 1) & m1;
|
||||
n = (n & m2) + ((n >> 2) & m2);
|
||||
n = (n + (n >> 4)) & m3;
|
||||
return n;
|
||||
}
|
||||
|
||||
static void
|
||||
catch_sigill (int signal, struct sigcontext *ctx)
|
||||
{
|
||||
unsigned int insn = *(unsigned int *) (ctx->regs->nip);
|
||||
#ifdef __powerpc64__
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0005be) /* mftgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 11) & 0x1f;
|
||||
unsigned gpr = (insn >> 21) & 0x1f;
|
||||
regs[gpr] = regs[fpr + 0x30];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0004be) /*mffgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 21) & 0x1f;
|
||||
unsigned gpr = (insn >> 11) & 0x1f;
|
||||
regs[fpr + 0x30] = regs[gpr];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if ((insn & 0xfc1f073f) == 0xfc000310) /* fri[pznm] */
|
||||
{
|
||||
#ifdef __powerpc64__
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 8);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x50 * 8 + 4);
|
||||
#else
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 4);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x30 * 4 + 0x20 * 8 + 4);
|
||||
#endif
|
||||
unsigned dest = (insn >> 21) & 0x1f;
|
||||
unsigned src = (insn >> 11) & 0x1f;
|
||||
switch (insn & 0xc0)
|
||||
{
|
||||
case 0:
|
||||
regs[dest] = frin (regs[src]);
|
||||
break;
|
||||
case 0x40:
|
||||
regs[dest] = friz (regs[src]);
|
||||
break;
|
||||
case 0x80:
|
||||
regs[dest] = frip (regs[src]);
|
||||
break;
|
||||
case 0xc0:
|
||||
regs[dest] = frim (regs[src]);
|
||||
break;
|
||||
}
|
||||
/* Update raised exceptions. */
|
||||
union { unsigned int i[2]; double d; } u;
|
||||
asm volatile ("mffs %0" : "=f" (u.d));
|
||||
u.i[1] &= 0xfffe0000; /* Is this correct? */
|
||||
*fpscr |= u.i[1];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
if ((insn & 0xfc00ffff) == 0x7c0000f4) /* popcntb */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned dest = (insn >> 16) & 0x1f;
|
||||
unsigned src = (insn >> 21) & 0x1f;
|
||||
unsigned long res = 0;
|
||||
int i;
|
||||
|
||||
regs[dest] = popcntb (regs[src]);
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
sigaction (signal, &sa, NULL);
|
||||
raise (signal);
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__ ((constructor))
|
||||
install_handler (void)
|
||||
{
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = (void *) catch_sigill;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigaction (SIGILL, &sa, NULL);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Patches are in the current directory.
|
||||
export QUILT_PATCHES=$PWD
|
||||
# Extract source file name from sources file,
|
||||
# and assume it's the same name as the directory.
|
||||
source=`awk -F '[() ]+' '/^[A-Z0-9]+ /{print $2}; /^[0-9a-f]+ /{print $2}' sources`
|
||||
srcdir=${source%.tar.xz}
|
||||
if [ "$1" == "-f" ] && [ -d "$srcdir" ]; then
|
||||
echo Cleaning up $srcdir
|
||||
rm -rf $srcdir
|
||||
fi
|
||||
if [ -d "$srcdir" ]; then
|
||||
# Don't overwrite existing source directory.
|
||||
echo "ERROR: Source directory $srcdir already exists. Use -f to force cleanup step."
|
||||
exit 1
|
||||
fi
|
||||
tar Jxvf $source
|
||||
echo "Entering $srcdir"
|
||||
pushd $srcdir
|
||||
# Apply all patches.
|
||||
quilt push -a
|
||||
popd
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (glibc-2.30.9000-100-g1a6566094d.tar.xz) = e6054a8f1367fde262f023c76f7eaf5ce588613c4894b8d577c7e1c3159a2dfcefb7c60e301340b823cd8e6d2f8d264d7da83e61034b9180836d392d5db4c5ba
|
||||
SHA512 (glibc-2.35-229-g82663d3c03.tar.xz) = e23df3c5f4520b87097dd47ef210c1ae006e33459f7bac67c18f268cbcf67f08f048748f970272c4a16a73121912de21faab141ffdf5faa1d3680263ec6998d8
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
Short description: <Short description>
|
||||
Author(s): <Who wrote them. Comma separated.>
|
||||
Origin: <Source repo(s) where it came from or keyword "PATCH" if this is simply a patch>
|
||||
# Likely git://sourceware.org/git/glibc.git
|
||||
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-Upstream: <Upstream bug#'s, comma separated e.g. #XXX, #YYY, #ZZZ>
|
||||
Upstream status: <[Patchwork URL|libc-alpha URL|not-needed|not-submitted|committed] for each commit>
|
||||
# <Additional descriptive text follows 'Upstream status:' line>
|
||||
<If upstream status == committed then a copy of the upstream commit log follows>
|
||||
<Patch>
|
|
@ -0,0 +1,64 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
||||
# Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE testlib.cc
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc-c++ glibc glibc-devel libstdc++ glibc.i686 glibc-devel.i686 libstdc++.i686 libgcc.i686" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1882466" >> $(METADATA)
|
||||
@echo "Releases: RHEL8 RHEL9" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
|
@ -0,0 +1,5 @@
|
|||
PURPOSE of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
||||
Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: RHEL8.2 - LD_PRELOAD of <some lib that has libstdc++ and libgnu_s linked in> /lib64/libc.so.6 will segfault (glibc)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1882466
|
|
@ -0,0 +1,22 @@
|
|||
summary: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)
|
||||
description: |
|
||||
Bug summary: RHEL8.2 - LD_PRELOAD of <some lib that has libstdc++ and libgnu_s linked in> /lib64/libc.so.6 will segfault (glibc)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1882466
|
||||
contact:
|
||||
- Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- gcc-c++
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- libstdc++
|
||||
- glibc.i686
|
||||
- glibc-devel.i686
|
||||
- libstdc++.i686
|
||||
- libgcc.i686
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
||||
extra-task: /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
|
||||
# Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="glibc"
|
||||
TESTPROG="testlib"
|
||||
TESTPRELOADLIBS="libpthread.so.0 libstdc++.so.6 libresolv.so.2"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.cc $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "basic"
|
||||
rlRun -c "g++ -c -Wall -pedantic -fPIC -fno-exceptions -fno-rtti -fno-builtin ${TESTPROG}.cc -o ${TESTPROG}.o"
|
||||
rlRun -c "g++ -shared -dynamiclib ${TESTPROG}.o -o lib${TESTPROG}.so.1.0"
|
||||
rlAssertExists "lib${TESTPROG}.so.1.0"
|
||||
rlRun -c "LD_PRELOAD=${TESTTMPDIR}/lib${TESTPROG}.so.1.0 /lib64/libc.so.6"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "additional libs"
|
||||
rlRun -c "LD_PRELOAD=${TESTTMPDIR}/lib${TESTPROG}.so.1.0 /lib64/libc.so.6"
|
||||
for L in $TESTPRELOADLIBS
|
||||
do
|
||||
rlRun -c "LD_PRELOAD=/usr/lib64/$L /lib64/libc.so.6"
|
||||
[[ $(rlGetArch) == "x86_64" ]] && rlRun -c "LD_PRELOAD=/usr/lib/$L /usr/lib/libc.so.6"
|
||||
done
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
|
@ -0,0 +1,17 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
static int* internal_lock = NULL;
|
||||
|
||||
|
||||
static void cuda_hook_init ()
|
||||
{
|
||||
printf("%s:%d\n",__func__,__LINE__);
|
||||
if(internal_lock == NULL)
|
||||
{
|
||||
printf("%s:%d\n",__func__,__LINE__);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
# Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE relevancy.json
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-gconv-extra glibc-langpack-en" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 2007417" >> $(METADATA)
|
||||
@echo "Releases: RHEL9" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
|
@ -0,0 +1,5 @@
|
|||
PURPOSE of /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: ldd segfaults when inspecting vdso/vdso64.so
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2007417
|
|
@ -0,0 +1,18 @@
|
|||
summary: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
description: |
|
||||
Bug summary: glibc: ldd segfaults when inspecting vdso/vdso64.so
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2007417
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-gconv-extra
|
||||
- glibc-langpack-en
|
||||
duration: 20m
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2007417
|
||||
extra-summary: /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
extra-task: /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
# Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="glibc"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlRun -c "dmesg -c >& /dev/null"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -l "ldd `find /usr -name vdso64.so`"
|
||||
rlRun -l "dmesg"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
|
@ -0,0 +1,145 @@
|
|||
#!/bin/bash
|
||||
# Wrapper script for find-debuginfo.sh
|
||||
#
|
||||
# Usage:
|
||||
# wrap-find-debuginfo.sh SYSROOT-PATH SCRIPT-PATH SCRIPT-ARGS...
|
||||
#
|
||||
# The wrapper saves the original version of ld.so found in SYSROOT-PATH,
|
||||
# invokes SCRIPT-PATH with SCRIPT-ARGS, and then restores the
|
||||
# LDSO-PATH file, followed by note merging and DWZ compression.
|
||||
# As a result, ld.so has (mostly) unchanged debuginfo even
|
||||
# after debuginfo extraction.
|
||||
#
|
||||
# For libc.so.6, a set of strategic symbols is preserved in .symtab
|
||||
# that are frequently used in valgrind suppressions and elsewhere.
|
||||
|
||||
set -ex
|
||||
|
||||
workdir="$(mktemp -d -t find_debuginfo.XXXXXX)"
|
||||
|
||||
ldso_tmp="$workdir/ld.so"
|
||||
libc_tmp="$workdir/libc.so"
|
||||
|
||||
# Prefer a separately installed debugedit over the RPM-integrated one.
|
||||
if command -v debugedit >/dev/null ; then
|
||||
debugedit=debugedit
|
||||
else
|
||||
debugedit=/usr/lib/rpm/debugedit
|
||||
fi
|
||||
|
||||
cleanup () {
|
||||
rm -rf "$workdir"
|
||||
}
|
||||
trap cleanup 0
|
||||
|
||||
sysroot_path="$1"
|
||||
shift
|
||||
script_path="$1"
|
||||
shift
|
||||
|
||||
# See ldso_path setting in glibc.spec.
|
||||
ldso_path=
|
||||
for ldso_candidate in `find "$sysroot_path" -regextype posix-extended \
|
||||
-regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do
|
||||
if test -z "$ldso_path" ; then
|
||||
ldso_path="$ldso_candidate"
|
||||
else
|
||||
echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# libc.so.6 always uses this name, so it is simpler to locate.
|
||||
libc_path=
|
||||
for libc_candidate in `find "$sysroot_path" -name libc.so.6`; do
|
||||
if test -z "$libc_path" ; then
|
||||
libc_path="$libc_candidate"
|
||||
else
|
||||
echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Preserve the original files.
|
||||
cp "$ldso_path" "$ldso_tmp"
|
||||
cp "$libc_path" "$libc_tmp"
|
||||
|
||||
# Run the debuginfo extraction.
|
||||
"$script_path" "$@"
|
||||
|
||||
# libc.so.6: Extract the .gnu_debuglink section
|
||||
objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \
|
||||
-O binary "$libc_path" "$libc_tmp.debuglink"
|
||||
|
||||
# Restore the original files.
|
||||
cp "$ldso_tmp" "$ldso_path"
|
||||
cp "$libc_tmp" "$libc_path"
|
||||
|
||||
# Reduce the size of notes. Primarily for annobin.
|
||||
objcopy --merge-notes "$ldso_path"
|
||||
objcopy --merge-notes "$libc_path"
|
||||
|
||||
# libc.so.6: Restore the .gnu_debuglink section
|
||||
objcopy --add-section .gnu_debuglink="$libc_tmp.debuglink" "$libc_path"
|
||||
|
||||
# ld.so does not have separated debuginfo and so the debuginfo file
|
||||
# generated by find-debuginfo is redundant. Therefore, remove it.
|
||||
ldso_debug=
|
||||
for ldso_debug_candidate in `find "$sysroot_path" -regextype posix-extended \
|
||||
-regex '.*/ld(-.*|64|)\.so\.[0-9]+.*debug$' -type f` ; do
|
||||
if test -z "$ldso_debug" ; then
|
||||
ldso_debug="$ldso_debug_candidate"
|
||||
else
|
||||
echo "error: multiple ld.so debug candidates: $ldso_debug, $ldso_debug_candidate"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
rm -f "$ldso_debug"
|
||||
|
||||
# libc.so.6: Reduce to valuable symbols. Eliminate file symbols,
|
||||
# annobin symbols, and symbols used by the glibc build to implement
|
||||
# hidden aliases (__EI_*). We would also like to remove __GI_*
|
||||
# symbols, but even listing them explicitly (as in -K __GI_strlen)
|
||||
# still causes strip to remove them, so there is no filtering of
|
||||
# __GI_* here. (Debuginfo is gone after this, so no need to optimize
|
||||
# it.)
|
||||
strip -w \
|
||||
-K '*' \
|
||||
-K '!*.c' \
|
||||
-K '!*.os' \
|
||||
-K '!.annobin_*' \
|
||||
-K '!__EI_*' \
|
||||
-K '!__PRETTY_FUNCTION__*' \
|
||||
"$libc_path"
|
||||
|
||||
# ld.so: Rewrite the source file paths to match the extracted
|
||||
# locations. First compute the arguments for invoking debugedit.
|
||||
# See find-debuginfo.sh.
|
||||
debug_dest_name="/usr/src/debug"
|
||||
last_arg=
|
||||
while true ; do
|
||||
arg="$1"
|
||||
shift || break
|
||||
case "$arg" in
|
||||
(--unique-debug-src-base)
|
||||
debug_dest_name="/usr/src/debug/$1"
|
||||
shift
|
||||
;;
|
||||
(-*)
|
||||
;;
|
||||
(*)
|
||||
last_arg="$arg"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
debug_base_name=${last_arg:-$RPM_BUILD_ROOT}
|
||||
$debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path
|
||||
# Remove the .annobin* symbols (and only them).
|
||||
if nm --format=just-symbols "$ldso_path" \
|
||||
| grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then
|
||||
objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path"
|
||||
fi
|
||||
|
||||
# Apply single-file DWARF optimization.
|
||||
dwz $ldso_path
|
Loading…
Reference in New Issue