[PATCH] gnu: make-glibc-locales: Add patch to fix glibc-locales build for glibc 2.29.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Marius Bakke
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 6 years ago
(address . guix-patches@gnu.org)
20190704113906.27800-1-kkebreau@posteo.net
The patch for glibc 2.28 and earlier replaces the same content, but the context
in the patch is different enough to fail to merge.

* gnu/packages/base.scm (make-glibc-locales)[source]: Add patch.
* gnu/packages/patches/glibc-locales-2.29.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 10 +++++-
gnu/packages/patches/glibc-locales-2.29.patch | 32 +++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/glibc-locales-2.29.patch

Toggle diff (73 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index bac1a92741..84c6190bd1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -867,6 +867,7 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-hurd-magic-pid.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
+ %D%/packages/patches/glibc-locales-2.29.patch \
%D%/packages/patches/glibc-o-largefile.patch \
%D%/packages/patches/glibc-reinstate-prlimit64-fallback.patch \
%D%/packages/patches/glibc-vectorized-strcspn-guards.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f26145cb0b..d6df023f26 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -999,7 +999,15 @@ with the Linux kernel.")
(inherit glibc)
(name "glibc-locales")
(source (origin (inherit (package-source glibc))
- (patches (cons (search-patch "glibc-locales.patch")
+ ;; The patch for glibc 2.28 and earlier replaces the same
+ ;; content, but the context in the patch is different
+ ;; enough to fail to merge.
+ (patches (cons (search-patch
+ (if (< 2.29
+ (string->number
+ (package-version glibc)))
+ "glibc-locales.patch"
+ "glibc-locales-2.29.patch"))
(origin-patches (package-source glibc))))))
(synopsis "All the locales supported by the GNU C Library")
(description
diff --git a/gnu/packages/patches/glibc-locales-2.29.patch b/gnu/packages/patches/glibc-locales-2.29.patch
new file mode 100644
index 0000000000..9329a09063
--- /dev/null
+++ b/gnu/packages/patches/glibc-locales-2.29.patch
@@ -0,0 +1,32 @@
+This patch allows us to use glibc's build system to build locales
+in a package separate from glibc.
+
+ 1. Use 'localedef' from $PATH since we are not rebuilding it.
+ 2. Use '--no-archive' to avoid building the big locale archive, and
+ because the already-built 'localedef' would want to write it
+ to '/run/current-system/locale', which is not possible.
+ 3. Pass $(inst_complocaledir)/$$locale to install files in the right
+ place, and because otherwise, 'localedef' fails with:
+ "cannot write output files to `(null)'".
+
+diff -ru glibc-2.29-old/localedata/Makefile glibc-2.29-new/localedata/Makefile
+--- glibc-2.29-old/localedata/Makefile 2019-01-31 11:45:36.000000000 -0500
++++ glibc-2.29-new/localedata/Makefile 2019-07-03 22:48:35.662015071 -0400
+@@ -385,7 +385,7 @@
+
+ # Sometimes the whole collection of locale files should be installed.
+ LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+-$(rtld-prefix) $(common-objpfx)locale/localedef
++ localedef --no-archive
+ install-locales: install-locale-archive
+
+ # Create and install the locale-archive file.
+@@ -414,7 +414,7 @@
+ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
+ $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
+ -i locales/$$input -f charmaps/$$charset \
+- $(addprefix --prefix=,$(install_root)) $$locale \
++ $(addprefix --prefix=,$(install_root)) $(inst_complocaledir)/$$locale \
+ && echo ' done';
+ endef
+
--
2.22.0
Marius Bakke wrote 6 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)
87r274qd0g.fsf@devup.no
Kei Kebreau <kkebreau@posteo.net> writes:

Toggle quote (3 lines)
> The patch for glibc 2.28 and earlier replaces the same content, but the context
> in the patch is different enough to fail to merge.

Whoops, thanks for addressing this!

Toggle quote (4 lines)
> * gnu/packages/base.scm (make-glibc-locales)[source]: Add patch.
> * gnu/packages/patches/glibc-locales-2.29.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.

[...]

Toggle quote (19 lines)
> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
> index f26145cb0b..d6df023f26 100644
> --- a/gnu/packages/base.scm
> +++ b/gnu/packages/base.scm
> @@ -999,7 +999,15 @@ with the Linux kernel.")
> (inherit glibc)
> (name "glibc-locales")
> (source (origin (inherit (package-source glibc))
> - (patches (cons (search-patch "glibc-locales.patch")
> + ;; The patch for glibc 2.28 and earlier replaces the same
> + ;; content, but the context in the patch is different
> + ;; enough to fail to merge.
> + (patches (cons (search-patch
> + (if (< 2.29
> + (string->number
> + (package-version glibc)))
> + "glibc-locales.patch"
> + "glibc-locales-2.29.patch"))

Please use 'version>=?' here, as this will fail for e.g. glibc 2.3.

I have a slight preference for renaming the previous patch to
'glibc-locales-2.28.patch', so that 'glibc-locales.patch' refers to the
newest libc. Less surprises for the end user when trying newer
versions. :-)

Apart from that LGTM, thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0f3J8ACgkQoqBt8qM6
VPr6xAgAg+Ui9CjuBdndyJkY8A29I04D542xQbe3q8ToQ83dFibCvMh1g8LoTHxB
GfRb77xFKO/pYnQHL0YaRAPbpgXtB13BhvFMMm9p/68f63iEhXAws2gXeYdHLywR
3k2BrKTDc/fwMcCGKMCwdwDYn+r5wHyWqzbqgio+JEGIKxNs+gLCixMhugdvYFrG
UOuIc7REBoxSfKK5zcdvEIuHaiVJ/lWU12/N53WZPCWbjog/ubiUw/Yfcr5OBVUa
6qg+WLwX/rqT1MWHinEnxnCjajrkFA2L/iagWuTGyVqcARAHn2NYCXAJ3DmlQSGc
MSsjpDt7k1ECtPe8lJCVpe5P0gCGlw==
=FMuK
-----END PGP SIGNATURE-----

Kei Kebreau wrote 6 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 36495@debbugs.gnu.org)
87d0im794m.fsf@posteo.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (41 lines)
> Kei Kebreau <kkebreau@posteo.net> writes:
>
>> The patch for glibc 2.28 and earlier replaces the same content, but the context
>> in the patch is different enough to fail to merge.
>
> Whoops, thanks for addressing this!
>
>> * gnu/packages/base.scm (make-glibc-locales)[source]: Add patch.
>> * gnu/packages/patches/glibc-locales-2.29.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>
> [...]
>
>> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
>> index f26145cb0b..d6df023f26 100644
>> --- a/gnu/packages/base.scm
>> +++ b/gnu/packages/base.scm
>> @@ -999,7 +999,15 @@ with the Linux kernel.")
>> (inherit glibc)
>> (name "glibc-locales")
>> (source (origin (inherit (package-source glibc))
>> - (patches (cons (search-patch "glibc-locales.patch")
>> + ;; The patch for glibc 2.28 and earlier replaces the same
>> + ;; content, but the context in the patch is different
>> + ;; enough to fail to merge.
>> + (patches (cons (search-patch
>> + (if (< 2.29
>> + (string->number
>> + (package-version glibc)))
>> + "glibc-locales.patch"
>> + "glibc-locales-2.29.patch"))
>
> Please use 'version>=?' here, as this will fail for e.g. glibc 2.3.
>
> I have a slight preference for renaming the previous patch to
> 'glibc-locales-2.28.patch', so that 'glibc-locales.patch' refers to the
> newest libc. Less surprises for the end user when trying newer
> versions. :-)
>
> Apart from that LGTM, thanks!

I just finished building my system with this patch and the almost-finished
GNOME updates, and lots of weird stuff goes on. I'll investigate and push
this patch when it works properly.

Thanks for the review!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAl0hdwkACgkQ5qXuPBlG
eg2YCRAAvKsACMtQhhYuI8moJ2yFR57pdbeclhWOeXqQVV4CXfYxz3rO8w5je/2E
oYvfN5P67646/JSfnm6N8JTtHlzRLr5I3Gc0WwBkZHDe7GZXijNNOqoVQXG92/i2
WW25rMMuh8NyCs8D0AcJMZI1wmvda+loRVQm8bVKdFLLe9kAOv12zcU4AQE3mrkP
H/Kx+6abREcphPx5YYxNZ5YQ7pXw6gxIdIRC0K4+QndMuiUv9AGl3aSGx3Fcazq2
i33r44+5bVwfBIOop8wEJi4X/BSzzCP1Px8JH+gB6L5eoRqkxo7ZlHglHVwzI70x
oIYcfzqWvma19YFtCpIj2vPwAwKv9eQ7YgjZbBQQ0z88GVilE6RlakgrmcUson5s
kqUSnRYfyHtUmmnJ/YENotIaJLoLOSkmkt80A3NEzSoez5ry7J9FBlRAgm6ETvcc
R1hwTisgQ6FTctqoon87kuqHYcOdy8vOd6DPclFd7kRIWrdiufH84q8Yrvx3LivO
+eKsAktbq6VWXUmmLjastzR4JAjpk9WyP4s/vO2IvuzYOEOf7C/rmNbrY/a1me0Z
/Y4qRRWzLaY8ghmTF5mXSl/KF702zG085mRpYt4jILngCYu9Dg1Y/aaYUGu3HBb8
76RTDk7EgG4/tKwCnL9c6xz/6q9WPSMzHEcQhUyJJ1dP7DBm41w=
=QMEL
-----END PGP SIGNATURE-----

Marius Bakke wrote 6 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 36495@debbugs.gnu.org)
87tvbwpiqz.fsf@devup.no
Kei Kebreau <kkebreau@posteo.net> writes:

Toggle quote (47 lines)
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Kei Kebreau <kkebreau@posteo.net> writes:
>>
>>> The patch for glibc 2.28 and earlier replaces the same content, but the context
>>> in the patch is different enough to fail to merge.
>>
>> Whoops, thanks for addressing this!
>>
>>> * gnu/packages/base.scm (make-glibc-locales)[source]: Add patch.
>>> * gnu/packages/patches/glibc-locales-2.29.patch: New file.
>>> * gnu/local.mk (dist_patch_DATA): Add it.
>>
>> [...]
>>
>>> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
>>> index f26145cb0b..d6df023f26 100644
>>> --- a/gnu/packages/base.scm
>>> +++ b/gnu/packages/base.scm
>>> @@ -999,7 +999,15 @@ with the Linux kernel.")
>>> (inherit glibc)
>>> (name "glibc-locales")
>>> (source (origin (inherit (package-source glibc))
>>> - (patches (cons (search-patch "glibc-locales.patch")
>>> + ;; The patch for glibc 2.28 and earlier replaces the same
>>> + ;; content, but the context in the patch is different
>>> + ;; enough to fail to merge.
>>> + (patches (cons (search-patch
>>> + (if (< 2.29
>>> + (string->number
>>> + (package-version glibc)))
>>> + "glibc-locales.patch"
>>> + "glibc-locales-2.29.patch"))
>>
>> Please use 'version>=?' here, as this will fail for e.g. glibc 2.3.
>>
>> I have a slight preference for renaming the previous patch to
>> 'glibc-locales-2.28.patch', so that 'glibc-locales.patch' refers to the
>> newest libc. Less surprises for the end user when trying newer
>> versions. :-)
>>
>> Apart from that LGTM, thanks!
>
> I just finished building my system with this patch and the almost-finished
> GNOME updates, and lots of weird stuff goes on. I'll investigate and push
> this patch when it works properly.

The weird stuff is unrelated to this patch, no? :-)

FWIW the current core-updates "works for me", but I haven't gotten
around to trying GNOME on it yet (there are some important packages
failing still -- help wanted!).
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0jddQACgkQoqBt8qM6
VPq2tQf+NL/qklICgnU+wG5AogTc6Lbuf7qbb6prXu4NX8u143gyvGvqYnBB5iv3
tEeM0uOpOvO0BAp86KpGhq+XYO2/I6iUOPHDqy4Dm01OewaOaHy1EZQamkudE/yD
41iSaH9tNNspDkfQkmwTHFj+QHl0q6wYvzervh8/1E5BWeEmggb3EMqLnw/HQnHJ
zmz6eMEaOKoxkBqX41elljUcEpJvrgeUGsOBpNwg+wmojPIBO0c7vsUGXyQKw9OH
mrl2oHLNLZMDokyzN1tDzbht+NPfb+FoXoIBIuYddId4ORfNOo3GjZJq4FBmfKlI
JAiO/ur7/cptqrVBKs041SiLyxWFmA==
=gp0z
-----END PGP SIGNATURE-----

Kei Kebreau wrote 6 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 36495@debbugs.gnu.org)
87tvbwfekv.fsf@posteo.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (12 lines)
> Kei Kebreau <kkebreau@posteo.net> writes:
>
>> I just finished building my system with this patch and the almost-finished
>> GNOME updates, and lots of weird stuff goes on. I'll investigate and push
>> this patch when it works properly.
>
> The weird stuff is unrelated to this patch, no? :-)
>
> FWIW the current core-updates "works for me", but I haven't gotten
> around to trying GNOME on it yet (there are some important packages
> failing still -- help wanted!).

I can get you the exact error messages as soon as my GNOME +
core-updates build finishes, but they seem to be similar to the messages
one gets when running Guix on a foriegn distro without installing
glibc-locales or glibc-utf8-locales.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAl0jqXAACgkQ5qXuPBlG
eg3HfQ/+KORpEaXimfOLBm3fnADj4yJs4ZScHwHObmSQjzzfERELgcHz7VeCNQ10
E3yJjUlvTJiPrrZaPigy9Do+m0OjL6nRGylzaAa4ldecGeCUTszKnws8PUDd36Sn
GYXtl6SwcC7RA4RAKlLkXeV1G8hPqKD8/Qmp2MECXDdw+BKEq6IOHZgIag+HguSb
3uYv3UHuaLmx/FA3CDuCSgT8pnyVqPfzkiNCGLNDJCO5Lr8hX8mpYbXvdS2ckaLi
0L//zdAuP7mR4zQ4Z/kAJVqCBJvBIWNkS/qSiFPp2E3HTXi2pXnt8BfNXncNZ0p7
mlPBoGs3w7yJV8WoEQYT1Do5/LDKyHsaQ9sbTsBOfn84DZgOR5PBKDU+zAbX6qbR
Rce/4yDe7vQYbpmsM0j9oVBcTmi2U37ou/AVMsaCZNfLUMw5WR14t80Q0EQI6Rsd
otrzghg0n5Rui1kiUZJVc0R6iWGFJT5CpRK1a9zhxc6RvEZMMssaYYgN/wd3KZmt
gYEx0TCBQT13I3JDRheprCYduzThkx/F6uDfrVXTGxdjkpy2hqlKWbIPQb/BmE1z
yhU7mGdPq7cew1543CrG69WdHNQPi2/8bXlbB2kQkm4jLDUowGiMXxlsJTZKLoq/
xcuadoGITo21Dyyc80eoTklYcjsjlwqqMRKhr/yIG0PFekPtL6w=
=8xvs
-----END PGP SIGNATURE-----

Kei Kebreau wrote 6 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 36495-done@debbugs.gnu.org)
871ryzmaxy.fsf@posteo.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (56 lines)
> Kei Kebreau <kkebreau@posteo.net> writes:
>
>> Marius Bakke <mbakke@fastmail.com> writes:
>>
>>> Kei Kebreau <kkebreau@posteo.net> writes:
>>>
>>>> The patch for glibc 2.28 and earlier replaces the same content,
>>>> but the context
>>>> in the patch is different enough to fail to merge.
>>>
>>> Whoops, thanks for addressing this!
>>>
>>>> * gnu/packages/base.scm (make-glibc-locales)[source]: Add patch.
>>>> * gnu/packages/patches/glibc-locales-2.29.patch: New file.
>>>> * gnu/local.mk (dist_patch_DATA): Add it.
>>>
>>> [...]
>>>
>>>> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
>>>> index f26145cb0b..d6df023f26 100644
>>>> --- a/gnu/packages/base.scm
>>>> +++ b/gnu/packages/base.scm
>>>> @@ -999,7 +999,15 @@ with the Linux kernel.")
>>>> (inherit glibc)
>>>> (name "glibc-locales")
>>>> (source (origin (inherit (package-source glibc))
>>>> - (patches (cons (search-patch "glibc-locales.patch")
>>>> + ;; The patch for glibc 2.28 and earlier replaces the same
>>>> + ;; content, but the context in the patch is different
>>>> + ;; enough to fail to merge.
>>>> + (patches (cons (search-patch
>>>> + (if (< 2.29
>>>> + (string->number
>>>> + (package-version glibc)))
>>>> + "glibc-locales.patch"
>>>> + "glibc-locales-2.29.patch"))
>>>
>>> Please use 'version>=?' here, as this will fail for e.g. glibc 2.3.
>>>
>>> I have a slight preference for renaming the previous patch to
>>> 'glibc-locales-2.28.patch', so that 'glibc-locales.patch' refers to the
>>> newest libc. Less surprises for the end user when trying newer
>>> versions. :-)
>>>
>>> Apart from that LGTM, thanks!
>>
>> I just finished building my system with this patch and the almost-finished
>> GNOME updates, and lots of weird stuff goes on. I'll investigate and push
>> this patch when it works properly.
>
> The weird stuff is unrelated to this patch, no? :-)
>
> FWIW the current core-updates "works for me", but I haven't gotten
> around to trying GNOME on it yet (there are some important packages
> failing still -- help wanted!).

Pushed to core-updates!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAl0kwBkACgkQ5qXuPBlG
eg3k7BAAuLBzRKDkrPir4uHCV0lDCn6ZTvAj5d7vc2a+4vTXYiWFcASFJ8WaqEhq
n08w84GQKSIxw+tQo5l+/tKKQGa6vk8Bw2SndGzmSlcuXdZM5jOb0N+MytnnxNdc
B4F+ps/VxSf0hu+K140LXosZzFOB2eqKrGXZ8MXCCsab7OZuHVk8j2u5txZSIb7A
AqOTf2kGbzxjYqWS8D8b73tg6faydBZcyqX0kHPyUcSSVwpQZQRS1noJUWtyZ9/O
DkEK3uZWPj0EGpumgQfqV3XJZmlnUywEUJBjcp6dOVhcRj3D0WvYCAHrbVtiZK/N
XVx/JWxjR0GbaC9yc01Wnrx01EQrzpODhon0vBbjNP/7nIX95VcUSrSMr9EOjvba
55fwfiRgRFXXUb3+kFp4vkZ3GuSVtWAmGf5pdPF5pU/azaZFoak5zv7g8P5/4ZzE
7D4EskyhwkwGWRKO/SGEe9g8QnIfNDPHHiFDT9w0nT6Qcn6THP4BRQLvlwFVaxiX
lBPngwEWB7mGxswdKYzu+gmZcqYfwsAJh6g19OnPe1I7vulAI6WdyQIaKIJmAROO
QhiN1CA33/NFGcJjEFfjYwHfIYwmk9bdajDIjPej0LDZaJPnetjHF+GIuMgeP+na
drwMv84awpZe4YbnKoleHs7B0ezs/NbtzOOLhIreYDM4f3dEUX4=
=7FoJ
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 36495@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36495
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help