GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames

  • Done
  • quality assurance status badge
Details
6 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Marius Bakke
  • Nils Gillmann
  • ng0
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
important
D
D
Danny Milosavljevic wrote on 3 Apr 2017 20:56
(address . bug-guix@gnu.org)
20170403202146.2a9317ce@scratchpost.org
Hi,

the GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames. It will just leave them there.

For example I have an immortal file "/tmp/!x!home!dannym!scratchpost.org!www!mirror!science!physics!03._Relativitätstheorie!.webseealso~".
L
L
Ludovic Courtès wrote on 12 Apr 2017 15:04
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
87poghdbge.fsf@gnu.org
Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (4 lines)
> the GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames. It will just leave them there.
>
> For example I have an immortal file "/tmp/!x!home!dannym!scratchpost.org!www!mirror!science!physics!03._Relativitätstheorie!.webseealso~".

The problem is that the “activation scripts” run in the C locale and
thus Guile interprets file names in this locale encoding (i.e., ASCII),
which fails.

I believe the attached patch mostly fixes the problem. Could you try
and report back?

I say “mostly” because if /tmp contains a file in an encoding other than
that of the system locale, we still have a problem.

Once we’ve switched to Guile 2.2, we should probably force use of an
ISO-8859-1 locale to avoid file name decoding altogether.

Thanks,
Ludo’.
Toggle diff (54 lines)
diff --git a/gnu/services.scm b/gnu/services.scm
index 9f6e323e1..500724eec 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -248,9 +248,9 @@ directory."
;; The service that produces the boot script.
(service boot-service-type #t))
-(define (cleanup-gexp _)
+(define (cleanup-gexp locale)
"Return as a monadic value a gexp to clean up /tmp and similar places upon
-boot."
+boot. Run with LOCALE to ensure file names are properly decoded."
(with-monad %store-monad
(with-imported-modules '((guix build utils))
(return #~(begin
@@ -272,6 +272,13 @@ boot."
#t))))
;; Ignore I/O errors so the system can boot.
(fail-safe
+ ;; Guile decodes file names according to the current
+ ;; locale's encoding so attempt to use an appropriate
+ ;; locale. See <https://bugs.gnu.org/26353>.
+ ;; TODO: With Guile 2.2, choose an ISO-8859-1 locale
+ ;; to disable decoding altogether.
+ (setlocale LC_CTYPE #$locale)
+
(delete-file-recursively "/tmp")
(delete-file-recursively "/var/run")
(mkdir "/tmp")
@@ -280,7 +287,8 @@ boot."
(chmod "/var/run" #o755))))))))
(define cleanup-service-type
- ;; Service that cleans things up in /tmp and similar.
+ ;; Service that cleans things up in /tmp and similar. Its value is the name
+ ;; of a locale to install before traversing these directories.
(service-type (name 'cleanup)
(extensions
(list (service-extension boot-service-type
diff --git a/gnu/system.scm b/gnu/system.scm
index 0f52351cf..5e0d2db7d 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -309,7 +309,8 @@ a container or that of a \"bare metal\" system."
;; activation code.
%shepherd-root-service
%activation-service
- (service cleanup-service-type #f)
+ (service cleanup-service-type
+ (operating-system-locale os))
(pam-root-service (operating-system-pam-services os))
(account-service (append (operating-system-accounts os)
L
L
Ludovic Courtès wrote on 23 Apr 2017 01:30
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
87mvb8f2a7.fsf@gnu.org
Hello,

Did you have a chance to look at this patch?

TIA,
Ludo’.

ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (78 lines)
> Hi Danny,
>
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
>> the GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames. It will just leave them there.
>>
>> For example I have an immortal file "/tmp/!x!home!dannym!scratchpost.org!www!mirror!science!physics!03._Relativitätstheorie!.webseealso~".
>
> The problem is that the “activation scripts” run in the C locale and
> thus Guile interprets file names in this locale encoding (i.e., ASCII),
> which fails.
>
> I believe the attached patch mostly fixes the problem. Could you try
> and report back?
>
> I say “mostly” because if /tmp contains a file in an encoding other than
> that of the system locale, we still have a problem.
>
> Once we’ve switched to Guile 2.2, we should probably force use of an
> ISO-8859-1 locale to avoid file name decoding altogether.
>
> Thanks,
> Ludo’.
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 9f6e323e1..500724eec 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -248,9 +248,9 @@ directory."
> ;; The service that produces the boot script.
> (service boot-service-type #t))
>
> -(define (cleanup-gexp _)
> +(define (cleanup-gexp locale)
> "Return as a monadic value a gexp to clean up /tmp and similar places upon
> -boot."
> +boot. Run with LOCALE to ensure file names are properly decoded."
> (with-monad %store-monad
> (with-imported-modules '((guix build utils))
> (return #~(begin
> @@ -272,6 +272,13 @@ boot."
> #t))))
> ;; Ignore I/O errors so the system can boot.
> (fail-safe
> + ;; Guile decodes file names according to the current
> + ;; locale's encoding so attempt to use an appropriate
> + ;; locale. See <https://bugs.gnu.org/26353>.
> + ;; TODO: With Guile 2.2, choose an ISO-8859-1 locale
> + ;; to disable decoding altogether.
> + (setlocale LC_CTYPE #$locale)
> +
> (delete-file-recursively "/tmp")
> (delete-file-recursively "/var/run")
> (mkdir "/tmp")
> @@ -280,7 +287,8 @@ boot."
> (chmod "/var/run" #o755))))))))
>
> (define cleanup-service-type
> - ;; Service that cleans things up in /tmp and similar.
> + ;; Service that cleans things up in /tmp and similar. Its value is the name
> + ;; of a locale to install before traversing these directories.
> (service-type (name 'cleanup)
> (extensions
> (list (service-extension boot-service-type
> diff --git a/gnu/system.scm b/gnu/system.scm
> index 0f52351cf..5e0d2db7d 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -309,7 +309,8 @@ a container or that of a \"bare metal\" system."
> ;; activation code.
> %shepherd-root-service
> %activation-service
> - (service cleanup-service-type #f)
> + (service cleanup-service-type
> + (operating-system-locale os))
>
> (pam-root-service (operating-system-pam-services os))
> (account-service (append (operating-system-accounts os)
L
L
Ludovic Courtès wrote on 23 Apr 2017 01:31
control message for bug #26353
(address . control@debbugs.gnu.org)
87lgqsf29w.fsf@gnu.org
tags 26353 patch
D
D
Danny Milosavljevic wrote on 23 Apr 2017 02:14
Re: bug#26353: GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
20170423021448.6bcb3235@scratchpost.org
Hi Ludo,

I've applied it, but the system update is still running. Because of the massive number of patches I write I don't track master daily. I'm always behind 2 weeks (because that's the time until I can merge a patch). It seems lately a huge update got merged :)

Right now it's compiling qtbase from source locally (not Hydra - no idea why).

70 GiB non-home root partition seems also be too small for it all. I have to do guix gc quite often - I'll have to repartition somewhen.

texlive finally downloaded correctly *shrugs*. Texlive is really getting on my nerves - isn't it possible to modularize it more? Also, one shouldn't require 2 GiB for a word processor and DTP. *mumble mumble*

But I will test the tmp cleaner, it will just take some time.
D
D
Danny Milosavljevic wrote on 23 Apr 2017 04:03
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
20170423040301.53ea208f@scratchpost.org
On Sun, 23 Apr 2017 01:30:56 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

Toggle quote (2 lines)
> Did you have a chance to look at this patch?

Hmm, guix system reconfigure finished with the patch, I rebooted, and I get the same error message (No such file) and the file is still there.

My operating-system locale is en_US.UTF-8.
L
L
Ludovic Courtès wrote on 1 May 2017 16:51
TeX Live
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
871ss83a1x.fsf_-_@gnu.org
Hi Danny!

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (4 lines)
> 70 GiB non-home root partition seems also be too small for it all. I have to do guix gc quite often - I'll have to repartition somewhen.
>
> texlive finally downloaded correctly *shrugs*. Texlive is really getting on my nerves - isn't it possible to modularize it more? Also, one shouldn't require 2 GiB for a word processor and DTP. *mumble mumble*

TeX Live is getting on everybody’s nerves. :-)

There are ways to turn it into a zillion packages from CTAN, which is
what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
achieve this and I would really like to see it happen.

Ludo’.
M
M
Marius Bakke wrote on 1 May 2017 17:11
(address . 26353@debbugs.gnu.org)
87y3ugfw81.fsf@fastmail.com
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (14 lines)
> Hi Danny!
>
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
>> 70 GiB non-home root partition seems also be too small for it all. I have to do guix gc quite often - I'll have to repartition somewhen.
>>
>> texlive finally downloaded correctly *shrugs*. Texlive is really getting on my nerves - isn't it possible to modularize it more? Also, one shouldn't require 2 GiB for a word processor and DTP. *mumble mumble*
>
> TeX Live is getting on everybody’s nerves. :-)
>
> There are ways to turn it into a zillion packages from CTAN, which is
> what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
> achieve this and I would really like to see it happen.

That would be great. I miss this snippet from my ~/.nixpkgs/config.nix:

myTex = pkgs.texlive.combine {
inherit (texlive) scheme-small marginnote sectsty cm-super enumitem
xifthen ifmtarg unicode-math filehook collection-fontsrecommended
collection-fontsextra libertine gentium-tug ucharcat;
};
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkHUB4ACgkQoqBt8qM6
VPoMOAf/blwksT4ysAtwfN2mK3JobQHvdJ2rP/NYIbr9i4WTMVsCqj452Ofz/YFr
g2FdiRvD/luVwMrcVfR48gUgkxMWewSBxSOubTIliR5zFg7ACQtlYAcywXm8Vy7f
05CuU/Aj6WWYnCR8kvgtRzwy3pkMs+HideN/4Krd1UBapb9FcPuWtauc38Vmnnvn
x94pDsF8WU2cmHIErDqR6pVUvW9Erwc4pvK/VhvpZeJOFXohzAee94bKQeUJvGlQ
JGBww0MvmzrX9w93Kc8E4lidATk1xhEnUqyMcmiF+fG4gGJWYvCuVaLUzOQSW8gc
KlK4HNtelhJBkeicZI9Z98kvL7RkAQ==
=dtpz
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 1 May 2017 22:59
Re: bug#26353: GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
87fugo1efp.fsf@gnu.org
Hi,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (7 lines)
> On Sun, 23 Apr 2017 01:30:56 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Did you have a chance to look at this patch?
>
> Hmm, guix system reconfigure finished with the patch, I rebooted, and I get the same error message (No such file) and the file is still there.

Indeed, I just realized that the cleanup code runs before
/run/current-system has been created; thus it does not have access to
locale data and ‘setlocale’ fails.

I cannot think of a nice way to address this unfortunately. :-(

The problem of how to deal with file name encoding has been discussed on
the Guile side so hopefully the next release in the 2.2 series will have
a solution for this.

Ludo’.
L
L
Ludovic Courtès wrote on 1 May 2017 23:24
Re: bug#26353: TeX Live
(name . Marius Bakke)(address . mbakke@fastmail.com)
87o9vcz2wx.fsf@gnu.org
Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (24 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi Danny!
>>
>> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>>
>>> 70 GiB non-home root partition seems also be too small for it all. I have to do guix gc quite often - I'll have to repartition somewhen.
>>>
>>> texlive finally downloaded correctly *shrugs*. Texlive is really getting on my nerves - isn't it possible to modularize it more? Also, one shouldn't require 2 GiB for a word processor and DTP. *mumble mumble*
>>
>> TeX Live is getting on everybody’s nerves. :-)
>>
>> There are ways to turn it into a zillion packages from CTAN, which is
>> what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
>> achieve this and I would really like to see it happen.
>
> That would be great. I miss this snippet from my ~/.nixpkgs/config.nix:
>
> myTex = pkgs.texlive.combine {
> inherit (texlive) scheme-small marginnote sectsty cm-super enumitem
> xifthen ifmtarg unicode-math filehook collection-fontsrecommended
> collection-fontsextra libertine gentium-tug ucharcat;
> };

Yeah, I agree. Hopefully a profile hook could do what
pkgs.texlive.combine does, which would make it more convenient. Then we
also need a CTAN importer…

Ludo’.
R
R
Ricardo Wurmus wrote on 2 May 2017 08:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
87zievhiqo.fsf@elephly.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
> There are ways to turn it into a zillion packages from CTAN, which is
> what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
> achieve this and I would really like to see it happen.

Yeah, it’s true, I wanted to work on this, but … it hasn’t happened yet :)
I’d be happy if someone could help us out here.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
L
L
Ludovic Courtès wrote on 8 May 2017 16:31
control message for bug #26353
(address . control@debbugs.gnu.org)
87wp9rl8t1.fsf@gnu.org
severity 26353 important
D
D
Danny Milosavljevic wrote on 1 Jun 2017 12:57
VFS name encoding
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
20170601125743.6b13cd94@scratchpost.org
Hi Ludo,

Toggle quote (4 lines)
> The problem of how to deal with file name encoding has been discussed on
> the Guile side so hopefully the next release in the 2.2 series will have
> a solution for this.

For what it's worth, I think the sane solution is the Plan 9 solution: Just represent file names as bytevectors. Programs which don't care about the actual name - for example programs that just want to do (for-each unlink (scandir (string->utf8 "."))) or something - have no reason to care about the encoding at all. And then use UTF-8 encoding everywhere (for the file names, also for everything else) throughout the operating system for the tools that do care.

There are also utf8 mount options in the Linux kernel to be able to present UTF-8 names to userspace even when the actual names on disk are something else - and we should use them. (I think we should even modify <file-system> flags to default to "utf8" or "iocharset=utf8" where possible)

This conversion of UTF-8 to UCS-4 especially is really just busywork. My opinion changed over the years - earlier I was all for UCS-4. But actually, most tools don't care about the actual content of the file names - it's just an opaque ID to them (similar to an UUID). Representing them as something else in userspace again (inviting another conversion failure) is just ... unnecessary.

In any case, it would be different if we had a non-UNIX kernel underneath. But as long as we do have UNIX the kernel VFS interface expects bytevectors, preferrably interpreted as UTF-8 (if interpreted at all).

I think this is also the consensus among the major Linux distributions and also among lowlevel libraries like glib: They assume one is using UTF-8 filenames and default to it whereever possible.
N
Re: bug#26353: TeX Live
(name . Ludovic Courtès)(address . ludo@gnu.org)
20170601111715.fieq56xaneztbg6y@abyayala
Ludovic Courtès transcribed 1.3K bytes:
Toggle quote (35 lines)
> Marius Bakke <mbakke@fastmail.com> skribis:
>
> > Ludovic Courtès <ludo@gnu.org> writes:
> >
> >> Hi Danny!
> >>
> >> Danny Milosavljevic <dannym@scratchpost.org> skribis:
> >>
> >>> 70 GiB non-home root partition seems also be too small for it all. I have to do guix gc quite often - I'll have to repartition somewhen.
> >>>
> >>> texlive finally downloaded correctly *shrugs*. Texlive is really getting on my nerves - isn't it possible to modularize it more? Also, one shouldn't require 2 GiB for a word processor and DTP. *mumble mumble*
> >>
> >> TeX Live is getting on everybody’s nerves. :-)
> >>
> >> There are ways to turn it into a zillion packages from CTAN, which is
> >> what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
> >> achieve this and I would really like to see it happen.
> >
> > That would be great. I miss this snippet from my ~/.nixpkgs/config.nix:
> >
> > myTex = pkgs.texlive.combine {
> > inherit (texlive) scheme-small marginnote sectsty cm-super enumitem
> > xifthen ifmtarg unicode-math filehook collection-fontsrecommended
> > collection-fontsextra libertine gentium-tug ucharcat;
> > };
>
> Yeah, I agree. Hopefully a profile hook could do what
> pkgs.texlive.combine does, which would make it more convenient. Then we
> also need a CTAN importer…
>
> Ludo’.
>
>
>

Importers for the importer deity!

But seriously, whoever manages to split Texlive up gets a free non-alcoholic
drink if I should ever meet the person at a conference or somewhere else!
--
ng0
OpenPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlkv97sACgkQ4i+bv+40
hYg7qg//d5Kqj2C8ZlyjeAcS+CeiwHzANo8sgsDVgR0Dihqf4yrtG9/n6ayG2hjc
1GXTzM/woFnZFUbx7/Em8SO7CUT3imZ0rP5HQh4aY1ASPsAdaCCYcxzHUb7XuQxF
iOPnbBOGMqZKi0lXxL4kyBXGdc7P6pHAaFrxrXJUAalyxptrK8cqXcrSAo0TfnYe
ZFb49phdMIZqUhl//5reZzeOrO7Uu9EvWUeY+3sjuwIyU4NjNjYPpqKqwx4rggNp
PIhbMU3y7kxEjWrVcwyGbePUa9Y+FT/5FOcCvfy0OhOo19jYwzN61Of6NRlrRv1a
0RV7xVl2d5wKt9q9tpEluxQsOfBBKVdtUzJFg9Gi/iGOyDmayGqG6mKV+GGjmmiJ
f53vGOZEFKtOe9sXxm5es9oNcMtdJaHOwKKzHuIjCJIucfNKTBqahM5MGm0u/c5B
euqdNqHlFthIwBhf4+4PuvSQVxo+8ytgq1kQp9cLHu0wf6QtwNzztKmxJgMbB4Z7
ri4I4CNqwvuOS6PggUVKCQ0E5pnwTLUpmSojPPS9rVQlnDCUzynrU+OD4n9nYIj5
m5OhBG80wUxE1SB/GfPhOtyi1OAMFjeRZ09LjfPFfIwbuv26BjdIxqFMyNpwnX3P
vIzeVqcU79XQA4AtQRrS8kdcyfp7C+kHC+ovZIxx0bedme5csBg=
=/uK/
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 1 Jun 2017 13:28
Re: VFS name encoding
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
87o9u82bhg.fsf@gnu.org
Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (12 lines)
>> The problem of how to deal with file name encoding has been
>> discussed on the Guile side so hopefully the next release in the 2.2
>> series will have a solution for this.
>
> For what it's worth, I think the sane solution is the Plan 9 solution:
> Just represent file names as bytevectors. Programs which don't care
> about the actual name - for example programs that just want to do
> (for-each unlink (scandir (string->utf8 "."))) or something - have no
> reason to care about the encoding at all. And then use UTF-8 encoding
> everywhere (for the file names, also for everything else) throughout
> the operating system for the tools that do care.

FWIW the problem has been discussed at length in Guile land, although I
don’t think anyone has come up with a complete solution yet.

I think it’s natural to represent file names as strings, but we made a
mistake in 2.0 when we assumed we’d basically always be able to decode
file names using the current locale “on sane systems”. So now we need a
way to represent file names that cannot be decoded while preserving
backward compatibility.

To be continued!

Ludo’.
R
R
Ricardo Wurmus wrote on 2 Jun 2017 10:32
Re: bug#26353: TeX Live
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
871sr294e6.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (9 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> There are ways to turn it into a zillion packages from CTAN, which is
>> what Nixpkgs did. Ricardo (I think?) had some thoughts as to how to
>> achieve this and I would really like to see it happen.
>
> Yeah, it’s true, I wanted to work on this, but … it hasn’t happened yet :)
> I’d be happy if someone could help us out here.

So… I already have a Texlive importer that fetches things from SVN
(because the tarballs on CTAN are not versioned).

The texmf-dist tarball actually seems to include a couple of generated
files (such as latex.ltx), which needs to be bootstrapped with initex
first. I’ve already made some progress on this end, but I need to first
build a few metafont fonts.

The hardest part here is to override search paths and figure out
dependencies. This is a very slow process right now, because it’s
mainly error-driven.

I’m close to finishing the bootstrap of latex-base. Once that’s done I
should be able to finish the texlive-build-system, and then I’ll try
building the other latex packages that are distributed with Texlive.
There’s more to Texlive (e.g. xetex packages), but I’ll take care of
that later.

One thing that’s still unknown at this point is how the profile hook
should work, but I’ll figure this out as I learn more about the search
paths and the like.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
L
L
Ludovic Courtès wrote on 2 Jun 2017 17:06
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 26353@debbugs.gnu.org)
87shji5sza.fsf@gnu.org
Hi Ricardo,

Ricardo Wurmus <rekado@elephly.net> skribis:

Toggle quote (3 lines)
> So… I already have a Texlive importer that fetches things from SVN
> (because the tarballs on CTAN are not versioned).

Awesome!

Toggle quote (9 lines)
> The texmf-dist tarball actually seems to include a couple of generated
> files (such as latex.ltx), which needs to be bootstrapped with initex
> first. I’ve already made some progress on this end, but I need to first
> build a few metafont fonts.
>
> The hardest part here is to override search paths and figure out
> dependencies. This is a very slow process right now, because it’s
> mainly error-driven.

Yeah kpathsea and all that.

Toggle quote (10 lines)
> I’m close to finishing the bootstrap of latex-base. Once that’s done I
> should be able to finish the texlive-build-system, and then I’ll try
> building the other latex packages that are distributed with Texlive.
> There’s more to Texlive (e.g. xetex packages), but I’ll take care of
> that later.
>
> One thing that’s still unknown at this point is how the profile hook
> should work, but I’ll figure this out as I learn more about the search
> paths and the like.

OK, we’ll see.

Thank you for this brave effort!

Ludo’.
R
R
Ricardo Wurmus wrote on 3 Jun 2017 21:14
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
87shjg7ujh.fsf@elephly.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (30 lines)
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> So… I already have a Texlive importer that fetches things from SVN
>> (because the tarballs on CTAN are not versioned).
>
> Awesome!
>
>> The texmf-dist tarball actually seems to include a couple of generated
>> files (such as latex.ltx), which needs to be bootstrapped with initex
>> first. I’ve already made some progress on this end, but I need to first
>> build a few metafont fonts.
>>
>> The hardest part here is to override search paths and figure out
>> dependencies. This is a very slow process right now, because it’s
>> mainly error-driven.
>
> Yeah kpathsea and all that.
>
>> I’m close to finishing the bootstrap of latex-base. Once that’s done I
>> should be able to finish the texlive-build-system, and then I’ll try
>> building the other latex packages that are distributed with Texlive.
>> There’s more to Texlive (e.g. xetex packages), but I’ll take care of
>> that later.
>>
>> One thing that’s still unknown at this point is how the profile hook
>> should work, but I’ll figure this out as I learn more about the search
>> paths and the like.
>
> OK, we’ll see.

I submitted a new bug for this:


…because this allows us the satisfaction of closing this bug once it’s
done; and because we can keep track of progress there.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
D
D
Danny Milosavljevic wrote on 14 Dec 2017 23:28
Re: bug#26353: GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
20171214232857.131aa0d6@scratchpost.org
Toggle quote (4 lines)
> The problem of how to deal with file name encoding has been discussed on
> the Guile side so hopefully the next release in the 2.2 series will have
> a solution for this.

Hmm, any news on this? I've again got some immortal files in /tmp ...
L
L
Ludovic Courtès wrote on 15 Dec 2017 11:27
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353@debbugs.gnu.org)
87d13gl1zu.fsf@gnu.org
Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (6 lines)
>> The problem of how to deal with file name encoding has been discussed on
>> the Guile side so hopefully the next release in the 2.2 series will have
>> a solution for this.
>
> Hmm, any news on this? I've again got some immortal files in /tmp ...

I’m afraid no. Months ago a solution was proposed on the Guile side but
not implemented.

I tried the attached workaround, which attempts to use are UTF-8-only
syscalls wrappers for the task. Unfortunately it doesn’t work because
the cleanup code runs on the initrd’s statically-linked Guile, where
‘dynamic-link’ calls used in (guix build syscalls) fail. :-/

Ideas?

Ludo’.
Attachment: file
D
D
Danny Milosavljevic wrote on 9 Jun 2018 11:30
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26353@debbugs.gnu.org)
20180609113020.5f30981a@scratchpost.org
Hi Ludo,

+(define delete-file*
+ (let ((proc (syscall->procedure int "unlike" '(*))))

Typo. Should be "unlink".

Toggle quote (5 lines)
>+ (lambda* (file #:optional (string->pointer string->pointer/utf-8))
>+ (proc (string->pointer file)))))

>Ideas?

Well, we could always include a special wrapper in guile-static - like we do
for load-linux-module/fd.

That way, it is included in the statically linked guile executable.
N
N
Nils Gillmann wrote on 19 Jun 2018 22:17
Re: bug#26353: GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180619201735.6o3po7ruiqcw757b@abyayala
Danny Milosavljevic transcribed 249 bytes:
Toggle quote (6 lines)
> > The problem of how to deal with file name encoding has been discussed on
> > the Guile side so hopefully the next release in the 2.2 series will have
> > a solution for this.
>
> Hmm, any news on this? I've again got some immortal files in /tmp ...

Did it ever work for you? I can't recall a single time in my years with
GuixSD when /tmp was cleaned. It was only when I started reading more
system specific code that I found out that the lack of /tmp cleaning
on shutdown is not a default.
L
L
Ludovic Courtès wrote on 19 Jun 2018 22:47
Re: bug#26353: GuixSD /tmp cleaner fails to clean when Umlauts like "ä" are used in filenames
(name . Nils Gillmann)(address . ng0@n0.is)
87wouusduc.fsf@gnu.org
Nils Gillmann <ng0@n0.is> skribis:

Toggle quote (12 lines)
> Danny Milosavljevic transcribed 249 bytes:
>> > The problem of how to deal with file name encoding has been discussed on
>> > the Guile side so hopefully the next release in the 2.2 series will have
>> > a solution for this.
>>
>> Hmm, any news on this? I've again got some immortal files in /tmp ...
>
> Did it ever work for you? I can't recall a single time in my years with
> GuixSD when /tmp was cleaned. It was only when I started reading more
> system specific code that I found out that the lack of /tmp cleaning
> on shutdown is not a default.

This bug report is about the specific case where it doesn’t work. :-)

Ludo’.
L
L
Ludovic Courtès wrote on 20 Jun 2018 10:07
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 26353-done@debbugs.gnu.org)
87sh5hswxe.fsf@gnu.org
Hello!

Finally fixed with commit 76c321d8e85683091ecbcd3afe8c56fb7c45c00a.
I opted for a simpler approach (and I wonder why it didn’t come to mind
earlier than this…).

Thanks for your patience, and bye bye immortal files! :-)

Ludo’.
Closed
?