Re: glibc-locales

2022-07-03 Thread Tobias Geerinckx-Rice
The intended use is NOT to use a package at all, see 
https://guix.gnu.org/en/manual/devel/en/html_node/Application-Setup.html#Locales-1

Strongly put (and very possibly missing something :-), this sounds like 
maintenance effort to support an antipattern.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.



Re: glibc-locales

2022-07-03 Thread Vagrant Cascadian
On 2022-07-03, Andreas Enge wrote:
> Am Sun, Jul 03, 2022 at 12:53:09PM +0300 schrieb Efraim Flashner:
>> I misread the source. I'd like glibc-utf8-locales built with glibc-final.
>
> Has glibc-utf8-locales not been removed some time ago? I always had it in
> my profile, then saw a message during upgrade that it had been removed,
> and dropped it from my profile (without any apparent harm to my GNU system).

Still is there as a hidden package and used as an input for some
packages, though this brings up another locales-related question...

Before glibc-utf8-locales was a hidden package, I preferred using that
because it only included a small subset of locales, and happened to
include the main one I needed (lucky me!).

How feasible would it be to make each locale it's own output on
glibc-locales (e.g. glibc-locales:en_US.utf8, or maybe cluster languages
together, e.g. glibc-locales:en) ? Most people probably only use a
relatively small number of locales on any given system... though which
locales any given person uses probably varies.

Is it a complexity vs. space-savings issue? Would it be tricky to
compose multiple locales packages into a single profile? Just not worth
the effort?

live well,
  vagrant


signature.asc
Description: PGP signature


Re: glibc-locales

2022-07-03 Thread Andreas Enge
Am Sun, Jul 03, 2022 at 12:53:09PM +0300 schrieb Efraim Flashner:
> I misread the source. I'd like glibc-utf8-locales built with glibc-final.

Has glibc-utf8-locales not been removed some time ago? I always had it in
my profile, then saw a message during upgrade that it had been removed,
and dropped it from my profile (without any apparent harm to my GNU system).

Andreas




Re: glibc-locales

2022-07-03 Thread Efraim Flashner
On Sun, Jul 03, 2022 at 11:53:45AM +0300, Efraim Flashner wrote:
> The package glibc-locales and glibc-locales-2.32 are nearly identical
> according to diffoscope.
> 
> (ins)efraim@3900XT ~$ guix shell diffoscope -- diffoscope 
> /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33 
> /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32
> --- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33
> +++ /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32
> │   --- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/lib
> ├── +++ 
> /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/lib
> │ │   --- 
> /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/lib/locale
> │ ├── +++ 
> /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/lib/locale
> │ │ ├── file list
> │ │ │ @@ -1 +1 @@
> │ │ │ -2.33
> │ │ │ +2.32
> │   --- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/share
> ├── +++ 
> /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/share
> │ │   --- 
> /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/share/doc
> │ ├── +++ 
> /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/share/doc
> │ │ ├── file list
> │ │ │ @@ -1 +1 @@
> │ │ │ -glibc-locales-2.33
> │ │ │ +glibc-locales-2.32-2.32
> │ │ ├── /gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin/stat {}
> │ │ │ @@ -1,8 +1,8 @@
> │ │ │
> │ │ │ -  Size: 36   Blocks: 0  IO Block: 4096   directory
> │ │ │ +  Size: 46   Blocks: 0  IO Block: 4096   directory
> │ │ │  Links: 1
> │ │ │  Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/
> root)
> │ │ │
> │ │ │  Modify: 1970-01-01 00:00:01.0 +
> │ │ ├── /gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin/stat {}
> │ │ │ @@ -1,8 +1,8 @@
> │ │ │
> │ │ │ +  Size: 46   Blocks: 0  IO Block: 4096   directory
> │ │ │ -  Size: 36   Blocks: 0  IO Block: 4096   directory
> │ │ │  Links: 1
> │ │ │  Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/
> root)
> │ │ │
> │ │ │  Modify: 1970-01-01 00:00:01.0 +
> 
> 
> So while it would be nice to build glibc-locales-2.32 with glibc-2.33 I
> don't think it's actually in use anywhere since IIRC we jumped from 2.31
> to 2.33.
> 
> Also, for 2.33 I'd like to build it with glibc-final. glibc-locales
> doesn't retain a reference to any packages and it would reduce an
> instance of using an "extra" glibc when there's already one in the build
> environment.

I misread the source. I'd like glibc-utf8-locales built with glibc-final.
glibc-locales actually rebuilds the sources with an extra patch. I
suppose another option would be to use glibc-locales to build
glibc-utf8-locales.


-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


glibc-locales

2022-07-03 Thread Efraim Flashner
The package glibc-locales and glibc-locales-2.32 are nearly identical
according to diffoscope.

(ins)efraim@3900XT ~$ guix shell diffoscope -- diffoscope 
/gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33 
/gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32
--- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33
+++ /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32
│   --- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/lib
├── +++ /gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/lib
│ │   --- 
/gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/lib/locale
│ ├── +++ 
/gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/lib/locale
│ │ ├── file list
│ │ │ @@ -1 +1 @@
│ │ │ -2.33
│ │ │ +2.32
│   --- /gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/share
├── +++ 
/gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/share
│ │   --- 
/gnu/store/ixzmi6614baf4w37qfjgqrv8hwsl8jcv-glibc-locales-2.33/share/doc
│ ├── +++ 
/gnu/store/zrq9pr31wl128y6nwyh2022i9jqxazpz-glibc-locales-2.32-2.32/share/doc
│ │ ├── file list
│ │ │ @@ -1 +1 @@
│ │ │ -glibc-locales-2.33
│ │ │ +glibc-locales-2.32-2.32
│ │ ├── /gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin/stat {}
│ │ │ @@ -1,8 +1,8 @@
│ │ │
│ │ │ -  Size: 36   Blocks: 0  IO Block: 4096   directory
│ │ │ +  Size: 46   Blocks: 0  IO Block: 4096   directory
│ │ │  Links: 1
│ │ │  Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/root)
│ │ │
│ │ │  Modify: 1970-01-01 00:00:01.0 +
│ │ ├── /gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin/stat {}
│ │ │ @@ -1,8 +1,8 @@
│ │ │
│ │ │ +  Size: 46   Blocks: 0  IO Block: 4096   directory
│ │ │ -  Size: 36   Blocks: 0  IO Block: 4096   directory
│ │ │  Links: 1
│ │ │  Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/root)
│ │ │
│ │ │  Modify: 1970-01-01 00:00:01.0 +


So while it would be nice to build glibc-locales-2.32 with glibc-2.33 I
don't think it's actually in use anywhere since IIRC we jumped from 2.31
to 2.33.

Also, for 2.33 I'd like to build it with glibc-final. glibc-locales
doesn't retain a reference to any packages and it would reduce an
instance of using an "extra" glibc when there's already one in the build
environment.

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.

2019-01-22 Thread Ludovic Courtès
Hello,

Ricardo Wurmus  skribis:

>>> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New
>>> procedures.
>>> (glibc-locales): Express in terms of make-glibc-locales.
>>> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales.
>>> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables.
>
> […]
>
>> I don’t like the package name trick, but I don’t have a better solution.
>> Perhaps we could have a special property to explicitly allow for several
>> versions of this package in the same profile (say
>> ‘allow-multiple-versions?’), but that’s a bit more work.
>
> I also don’t like to work around this by changing the package names.  I
> thought of allowing multiple versions via property, but it’s not clear
> how it should behave.  I’d want to have only major versions appear as
> non-conflicting and still prevent the installation of variants of the
> same version.
>
> The next question then is if the property should be a procedure that
> takes the current and the potentially conflicting package as arguments
> and decides whether they are conflicting, or if this should be handled
> centrally when the property is present.

Would there be other use cases?  If not, I would not worry too much
about the major vs. non-major conflicts.

I have a slight preference for a property that we can ‘write’, which
would simplify for instance interaction with inferior packages, hence
something like a Boolean ‘allow-multiple-versions?’ property.

As a first approach, when this flag is true, the version check in
‘check-for-collisions’ could be bypassed.  The property would have to be
added to the  though, so that the flag is honored even
after several “guix package” invocations.

How does that sound?

Thanks,
Ludo’.



Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.

2019-01-20 Thread Ricardo Wurmus


Hi Ludo,

>> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New
>> procedures.
>> (glibc-locales): Express in terms of make-glibc-locales.
>> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales.
>> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables.

[…]

> I don’t like the package name trick, but I don’t have a better solution.
> Perhaps we could have a special property to explicitly allow for several
> versions of this package in the same profile (say
> ‘allow-multiple-versions?’), but that’s a bit more work.

I also don’t like to work around this by changing the package names.  I
thought of allowing multiple versions via property, but it’s not clear
how it should behave.  I’d want to have only major versions appear as
non-conflicting and still prevent the installation of variants of the
same version.

The next question then is if the property should be a procedure that
takes the current and the potentially conflicting package as arguments
and decides whether they are conflicting, or if this should be handled
centrally when the property is present.

--
Ricardo




Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.

2019-01-19 Thread Ludovic Courtès
Hi,

Ricardo Wurmus  skribis:

> Ricardo Wurmus  writes:
>
>> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New
>> procedures.
>> (glibc-locales): Express in terms of make-glibc-locales.
>> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales.
>> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables.
>
> This is for the benefit of people who run Guix on top of a foreign
> distro.  On a Guix system people can simply use the “locale-libcs” field
> of their operating system declaration, but on a foreign distro there is
> no way to install a locales package for older versions of glibc.
>
> This patch generates variants for version 2.27 and overrides the name so
> that both “glibc-locales” and “glibc-locales-2.27” can be installed into
> the same profile.  (Without the name override that’s not possible.)

Adding the packages makes sense to me.

I don’t like the package name trick, but I don’t have a better solution.
Perhaps we could have a special property to explicitly allow for several
versions of this package in the same profile (say
‘allow-multiple-versions?’), but that’s a bit more work.

Thanks,
Ludo’.



Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.

2019-01-17 Thread Ricardo Wurmus


Ricardo Wurmus  writes:

> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New
> procedures.
> (glibc-locales): Express in terms of make-glibc-locales.
> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales.
> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables.

This is for the benefit of people who run Guix on top of a foreign
distro.  On a Guix system people can simply use the “locale-libcs” field
of their operating system declaration, but on a foreign distro there is
no way to install a locales package for older versions of glibc.

This patch generates variants for version 2.27 and overrides the name so
that both “glibc-locales” and “glibc-locales-2.27” can be installed into
the same profile.  (Without the name override that’s not possible.)

-- 
Ricardo




[PATCH] gnu: Add glibc-locales variants for older versions of glibc.

2019-01-17 Thread Ricardo Wurmus
* gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New
procedures.
(glibc-locales): Express in terms of make-glibc-locales.
(glibc-utf8-locales): Express in terms of make-glibc-utf8-locales.
(glibc-locales-2.27, glibc-utf8-locales-2.27): New variables.
---
 gnu/packages/base.scm | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e79d2a987..cf86f0658 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -13,7 +13,7 @@
 ;;; Copyright © 2017, 2018 Marius Bakke 
 ;;; Copyright © 2017 Eric Bavier 
 ;;; Copyright © 2018 Tobias Geerinckx-Rice 
-;;; Copyright © 2018 Ricardo Wurmus 
+;;; Copyright © 2018, 2019 Ricardo Wurmus 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -975,7 +975,7 @@ with the Linux kernel.")
   (("/bin/pwd") "pwd"))
 #t))))
 
-(define-public glibc-locales
+(define-public (make-glibc-locales glibc)
   (package
 (inherit glibc)
 (name "glibc-locales")
@@ -1010,7 +1010,7 @@ the 'share/locale' sub-directory of this package.")
 ,(version-major+minor
   (package-version glibc)))
 
-(define-public glibc-utf8-locales
+(define-public (make-glibc-utf8-locales glibc)
   (package
 (name "glibc-utf8-locales")
 (version (package-version glibc))
@@ -1060,6 +1060,18 @@ test environments.")
 (home-page (package-home-page glibc))
 (license (package-license glibc
 
+(define-public glibc-locales
+  (make-glibc-locales glibc))
+(define-public glibc-utf8-locales
+  (make-glibc-utf8-locales glibc))
+
+(define-public glibc-locales-2.27
+  (package (inherit (make-glibc-locales glibc-2.27))
+   (name "glibc-locales-2.27")))
+(define-public glibc-utf8-locales-2.27
+  (package (inherit (make-glibc-utf8-locales glibc-2.27))
+   (name "glibc-utf8-locales-2.27")))
+
 (define-public which
   (package
 (name "which")
-- 
2.20.1






different versions of glibc-locales in the same profile

2018-12-13 Thread Ricardo Wurmus
Hi Guix,

on a foreign distribution what is the recommended way to install
different versions of glibc-locales into the same profile?

Since glibc-locales install their files into a versioned directory,
having glibc-locales@2.27 in a profile containing glibc-locales@2.28
does not lead to conflicts.  However, Guix refuses to build a manifest
like this because there are two packages with the same name:

--8<---cut here---start->8---
(use-modules (guix inferior) (guix channels)
 (srfi srfi-1))   ;for 'first'

(define inferior-2.27
  (inferior-for-channels
(list (channel
  (name 'guix)
 (url "https://git.savannah.gnu.org/git/guix.git;)
 (commit
  "b2c8d31ff673ca1714be16968c9ead9a99ae2b7b")

(packages->manifest
 (list (first (lookup-inferior-packages inferior-2.27 "glibc-locales"))
       (specification->package "glibc-locales")))
--8<---cut here---end--->8---

Should we add package definitions for older glibc-locales and give them
new names to work around this?  Should we add a property to
glibc-locales to indicate to “guix package” that this package should be
ignored when trying to predict and prevent conflicts?

--
Ricardo




Re: Glibc-locales failure in core-updates

2016-07-31 Thread Andreas Enge
On Sun, Jul 31, 2016 at 10:56:50AM +0800, 宋文武 wrote:
> > glibc-locales fails on all architectures in core-updates. The error message
> > looks as if it would not be too difficult to fix for someone who knows
> > the package...
> Fixed, thanks for noticing!

Great, thanks a lot!

Andreas




Glibc-locales failure in core-updates

2016-07-30 Thread Andreas Enge
Hello,

glibc-locales fails on all architectures in core-updates. The error message
looks as if it would not be too difficult to fix for someone who knows
the package...

Thanks,

Andreas