Please provide a way to delete old build directories.

  • Done
  • quality assurance status badge
Details
4 participants
  • Hartmut Goebel
  • John Darrington
  • Ludovic Courtès
  • Mark H Weaver
Owner
unassigned
Submitted by
John Darrington
Severity
wishlist

Debbugs page

John Darrington wrote 11 years ago
(address . bug-guix@gnu.org)
20131114081454.GA11819@jocasta.intra
When packages are built using guix build --keep-failed the build directories
are created in /tmp/nix* (as they should be).

But it is impossible to delete these directories without special priviliges.
The user who called guix build --keep-failed cannot delete them because they
are owned by guix-builder

Can we please either:

1. Have a command (or option to guix gc) to remove them ; OR

2. Arrange for the ownership of such directories to be changed to the calling user,
after the build has finished.

J'

--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.netor any PGP keyserver for public key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlKEhn4ACgkQimdxnC3oJ7PfGQCfe5MHOLTBsDEDmwRHG8AHvVYQ
epsAn3MUMiI6mu7TKD2L9ijx4g4wpmlO
=/Obv
-----END PGP SIGNATURE-----


Ludovic Courtès wrote 11 years ago
(name . John Darrington)(address . john@darrington.wattle.id.au)(address . 15890@debbugs.gnu.org)
87ob4otlk4.fsf@gnu.org
John Darrington <john@darrington.wattle.id.au> skribis:

Toggle quote (14 lines)
> When packages are built using guix build --keep-failed the build directories
> are created in /tmp/nix* (as they should be).
>
> But it is impossible to delete these directories without special priviliges.
> The user who called guix build --keep-failed cannot delete them because they
> are owned by guix-builder
>
> Can we please either:
>
> 1. Have a command (or option to guix gc) to remove them ; OR
>
> 2. Arrange for the ownership of such directories to be changed to the calling user,
> after the build has finished.

I agree. I would go for solution #2.

(Note that this will have to be submitted to the Nix project, since the
C++ code under nix/ is imported from there.)

Ludo’.
Mark H Weaver wrote 11 years ago
(no subject)
(address . control@debbugs.gnu.org)
87k3atewk8.fsf@yeeloong.lan
severity 15890 wishlist
severity 17208 wishlist
severity 17150 minor
severity 17202 minor
thanks
Hartmut Goebel wrote 8 years ago
Re: bug#15890: Please provide a way to delete old build directories.
(address . 15890@debbugs.gnu.org)
582041C7.4080902@crazy-compilers.com
Hi,

any news on this? Did anybody pass this to the Nix project?

Arrange for the ownership of such directories to be changed to the calling user,
after the build has finished


Would also allow for easily debugging build (by entering the environment
and restart the build).

--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
Ludovic Courtès wrote 8 years ago
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 15890@debbugs.gnu.org)
87inrwaf1h.fsf@gnu.org
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

Toggle quote (2 lines)
> any news on this? Did anybody pass this to the Nix project?

No, but it shouldn’t be too hard: look for ‘settings.keepFailed’ in
libstore/build.cc and drop a chown -R in there. We need to propagate
the UID of the client who connected to the daemon, though.

Ludo’.
Ludovic Courtès wrote 8 years ago
(name . John Darrington)(address . john@darrington.wattle.id.au)(address . 15890-done@debbugs.gnu.org)
87a8af2yt6.fsf@gnu.org
John Darrington <john@darrington.wattle.id.au> skribis:

Toggle quote (14 lines)
> When packages are built using guix build --keep-failed the build directories
> are created in /tmp/nix* (as they should be).
>
> But it is impossible to delete these directories without special priviliges.
> The user who called guix build --keep-failed cannot delete them because they
> are owned by guix-builder
>
> Can we please either:
>
> 1. Have a command (or option to guix gc) to remove them ; OR
>
> 2. Arrange for the ownership of such directories to be changed to the calling user,
> after the build has finished.

This was fixed by Hartmut in commit
2608e40988ba8cf51723fe0d21bdedf6b3997c9c.

Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 15890
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