GNU bug report logs - #52807
Guix home executables are not executable

Previous Next

Package: guix;

Reported by: "Nick Zalutskiy" <nick <at> const.fun>

Date: Sun, 26 Dec 2021 17:18:01 UTC

Severity: normal

Done: Maxime Devos <maximedevos <at> telenet.be>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52807 in the body.
You can then email your comments to 52807 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#52807; Package guix. (Sun, 26 Dec 2021 17:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Nick Zalutskiy" <nick <at> const.fun>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 26 Dec 2021 17:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Nick Zalutskiy" <nick <at> const.fun>
To: bug-guix <at> gnu.org
Subject: Guix home executables are not executable
Date: Sun, 26 Dec 2021 12:03:30 -0500
[Message part 1 (text/plain, inline)]
I'd like to use `guix home` to symlink an executable into my home directory. 

Following simple configuration stored at `~/.dotfiles/home-configuration.scm`

> (use-modules
>   (gnu home)
>   (gnu packages)
>   (gnu home services)
>   (gnu services)
>   (guix gexp)
>   (gnu home services shells))
> 
> (home-environment
>   (services
>     (list (service
>             home-bash-service-type
>             (home-bash-configuration
>           (guix-defaults? #t)))
>       (simple-service 'my-files
>               home-files-service-type
>               `(("run" ,(local-file "run")))))))

`~/.dotfiles/run` is an executable file, after home reconfigure a `~/.run` symlink is created, however the file it is pointing to does _not_ have the execute bit set.

As a result, when I try to execute `~/.run` file I get a "Permission denied" error.

Thank you,

-Nick
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52807; Package guix. (Sun, 26 Dec 2021 21:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 52807 <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazev <at> posteo.org>
To: "Nick Zalutskiy" <nick <at> const.fun>
Cc: 52807 <at> debbugs.gnu.org
Subject: Re: bug#52807: Guix home executables are not executable
Date: Sun, 26 Dec 2021 21:44:16 +0000
Hi,

On 2021-12-26, 12:03 -0500, "Nick Zalutskiy" <nick <at> const.fun> wrote:

>      I'd like to use `guix home` to symlink an executable into my home directory. 
>
>      Following simple configuration stored at `~/.dotfiles/home-configuration.scm`
>
>          (use-modules
>            (gnu home)
>            (gnu packages)
>            (gnu home services)
>            (gnu services)
>            (guix gexp)
>            (gnu home services shells))
>
>          (home-environment
>            (services
>              (list (service
>                      home-bash-service-type
>                      (home-bash-configuration
>                    (guix-defaults? #t)))
>                (simple-service 'my-files
>                        home-files-service-type
>                        `(("run" ,(local-file "run")))))))
>
>      `~/.dotfiles/run` is an executable file, after home reconfigure a `~/.run` symlink is created,
>      however the file it is pointing to does _not_ have the execute bit set.
>
>      As a result, when I try to execute `~/.run` file I get a "Permission denied" error.
>
>      Thank you,
>
>      -Nick
>
In the Guix manual you can find the following information about
local-file:

--8<---------------cut here---------------start------------->8---
-- Scheme Procedure: local-file FILE [NAME] [#:recursive? #f]
          [#:select? (const #t)]
          
When RECURSIVE? is true, the contents of FILE are added
     recursively; if FILE designates a flat file and RECURSIVE? is true,
     its contents are added, and its permission bits are kept.
--8<---------------cut here---------------end--------------->8---

So you can just do this:

#+begin_src scheme
(simple-service 'my-files
                home-files-service-type
                `(("run" ,(local-file "run" #:recursive? #t))))
#+end_src

-- 
Best regards,
Aleksandr Vityazev




Information forwarded to bug-guix <at> gnu.org:
bug#52807; Package guix. (Sun, 26 Dec 2021 22:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 52807 <at> debbugs.gnu.org (full text, mbox):

From: "Nick Zalutskiy" <nick <at> const.fun>
To: "Aleksandr Vityazev" <avityazev <at> posteo.org>
Cc: 52807 <at> debbugs.gnu.org
Subject: Re: bug#52807: Guix home executables are not executable
Date: Sun, 26 Dec 2021 17:25:08 -0500
Indeed I missed this in the manual. Thank you!

I was trying to figure out how to close this... no luck.

-Nick

On Sun, Dec 26, 2021, at 4:44 PM, Aleksandr Vityazev wrote:
> Hi,
>
> On 2021-12-26, 12:03 -0500, "Nick Zalutskiy" <nick <at> const.fun> wrote:
>
>>      I'd like to use `guix home` to symlink an executable into my home directory. 
>>
>>      Following simple configuration stored at `~/.dotfiles/home-configuration.scm`
>>
>>          (use-modules
>>            (gnu home)
>>            (gnu packages)
>>            (gnu home services)
>>            (gnu services)
>>            (guix gexp)
>>            (gnu home services shells))
>>
>>          (home-environment
>>            (services
>>              (list (service
>>                      home-bash-service-type
>>                      (home-bash-configuration
>>                    (guix-defaults? #t)))
>>                (simple-service 'my-files
>>                        home-files-service-type
>>                        `(("run" ,(local-file "run")))))))
>>
>>      `~/.dotfiles/run` is an executable file, after home reconfigure a `~/.run` symlink is created,
>>      however the file it is pointing to does _not_ have the execute bit set.
>>
>>      As a result, when I try to execute `~/.run` file I get a "Permission denied" error.
>>
>>      Thank you,
>>
>>      -Nick
>>
> In the Guix manual you can find the following information about
> local-file:
>
> --8<---------------cut here---------------start------------->8---
> -- Scheme Procedure: local-file FILE [NAME] [#:recursive? #f]
>           [#:select? (const #t)]
>          
> When RECURSIVE? is true, the contents of FILE are added
>      recursively; if FILE designates a flat file and RECURSIVE? is true,
>      its contents are added, and its permission bits are kept.
> --8<---------------cut here---------------end--------------->8---
>
> So you can just do this:
>
> #+begin_src scheme
> (simple-service 'my-files
>                 home-files-service-type
>                 `(("run" ,(local-file "run" #:recursive? #t))))
> #+end_src
>
> -- 
> Best regards,
> Aleksandr Vityazev




Reply sent to Maxime Devos <maximedevos <at> telenet.be>:
You have taken responsibility. (Mon, 27 Dec 2021 08:49:02 GMT) Full text and rfc822 format available.

Notification sent to "Nick Zalutskiy" <nick <at> const.fun>:
bug acknowledged by developer. (Mon, 27 Dec 2021 08:49:02 GMT) Full text and rfc822 format available.

Message #16 received at 52807-done <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Nick Zalutskiy <nick <at> const.fun>, Aleksandr Vityazev <avityazev <at> posteo.org>
Cc: 52807-done <at> debbugs.gnu.org
Subject: Re: bug#52807: Guix home executables are not executable
Date: Mon, 27 Dec 2021 08:48:24 +0000
Hi,

Nick Zalutskiy schreef op zo 26-12-2021 om 17:25 [-0500]:
> [...]
> I was trying to figure out how to close this... no luck.

https://debbugs.gnu.org/Developer.html has instructions on how to
close, reopen and tag bugs.

Greetings (and closing),
Maxime.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 24 Jan 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.