[shepherd] Confusion about relative file names

  • Done
  • quality assurance status badge
Details
2 participants
  • Dariqq
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dariqq
Severity
normal
D
D
Dariqq wrote on 22 Jan 16:30 +0100
(address . bug-guix@gnu.org)
d311adb0-f01f-4664-b9b6-fa09bd58a3e1@posteo.net
Hello,

Was reading through the shepherd manual and it seems to contain
contradictory information regarding relative file names:

In Chapter 3 ('herd' and 'shepherd') the manual reads

Toggle quote (2 lines)
> Since herd passes its current working directory to ‘shepherd’, you can pass relative file names without trouble.

Chapter 3.2 (Invoking 'herd')

Toggle quote (2 lines)
> If you pass a file name as an ARG, it will be passed as-is to the Shepherd, thus if it is not an absolute name, it is local to the current working directory of ‘shepherd’, not to herd.

So which one is it or is there something I am missing here?
L
L
Ludovic Courtès wrote 5 days ago
(name . Dariqq)(address . dariqq@posteo.net)(address . 75762@debbugs.gnu.org)
87seosadzu.fsf@gnu.org
Hi Dariqq,

Dariqq <dariqq@posteo.net> skribis:

Toggle quote (13 lines)
> Was reading through the shepherd manual and it seems to contain
> contradictory information regarding relative file names:
>
> In Chapter 3 ('herd' and 'shepherd') the manual reads
>
>> Since herd passes its current working directory to ‘shepherd’, you can pass relative file names without trouble.
>
> Chapter 3.2 (Invoking 'herd')
>
>> If you pass a file name as an ARG, it will be passed as-is to the Shepherd, thus if it is not an absolute name, it is local to the current working directory of ‘shepherd’, not to herd.
>
> So which one is it or is there something I am missing here?

The situation actually depends on the action you’re running.

Starting from 1a8d686b7fa617d9b1df33858957a240b7e11787, shepherd no
longer changes directory to the client’s directory. So now it’s up to
its action to interpret file names as it wants. We should update the
manual accordingly.

Did you have a specific action in mind though?

Ludo’.
D
D
Dariqq wrote 5 days ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 75762@debbugs.gnu.org)
751881cc-3a8a-4a08-85b8-bcd4ea9e0035@posteo.net
Hi Ludo,

On 05.02.25 11:21, Ludovic Courtès wrote:
Toggle quote (26 lines)
> Hi Dariqq,
>
> Dariqq <dariqq@posteo.net> skribis:
>
>> Was reading through the shepherd manual and it seems to contain
>> contradictory information regarding relative file names:
>>
>> In Chapter 3 ('herd' and 'shepherd') the manual reads
>>
>>> Since herd passes its current working directory to ‘shepherd’, you can pass relative file names without trouble.
>>
>> Chapter 3.2 (Invoking 'herd')
>>
>>> If you pass a file name as an ARG, it will be passed as-is to the Shepherd, thus if it is not an absolute name, it is local to the current working directory of ‘shepherd’, not to herd.
>>
>> So which one is it or is there something I am missing here?
>
> The situation actually depends on the action you’re running.
>
> Starting from 1a8d686b7fa617d9b1df33858957a240b7e11787, shepherd no
> longer changes directory to the client’s directory. So now it’s up to
> its action to interpret file names as it wants. We should update the
> manual accordingly.
>
> Did you have a specific action in mind though?
>
I was prototyping a user daemon via 'herd load root' before I was ready
to commit it to my home-environment and was a bit surprised that I had
to use the full path resp. a path relative to $HOME. This would be
consistent with the info in section 3.2 but not what I would expect.


Toggle quote (1 lines)
> Ludo’.
L
L
Ludovic Courtès wrote 3 days ago
(name . Dariqq)(address . dariqq@posteo.net)(address . 75762-done@debbugs.gnu.org)
87ldui2dyn.fsf@gnu.org
Hi,

Dariqq <dariqq@posteo.net> skribis:

Toggle quote (13 lines)
>> The situation actually depends on the action you’re running.
>> Starting from 1a8d686b7fa617d9b1df33858957a240b7e11787, shepherd no
>> longer changes directory to the client’s directory. So now it’s up to
>> its action to interpret file names as it wants. We should update the
>> manual accordingly.
>> Did you have a specific action in mind though?
>>
> I was prototyping a user daemon via 'herd load root' before I was
> ready to commit it to my home-environment and was a bit surprised that
> I had to use the full path resp. a path relative to $HOME. This would
> be consistent with the info in section 3.2 but not what I would
> expect.

Right. I pushed a clarification as
882e56ce168c2ddb014cf35e2767d78778e0ba64.

Thanks!

Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

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

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