Subject: bug#33893: closed (Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 10 Jan 2019 08:51:02 +0000

Your bug report

#33893: [PATCH 0/2] Add docker.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33893: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33893
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine.
From: Ludovic Courtès <[email-masked]>
To: Danny Milosavljevic <[email-masked]>
Cc: [email-masked], Leo Famulari <[email-masked]>
Date: Thu, 10 Jan 2019 09:50:49 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Howdy!

Danny Milosavljevic <[email-masked]> skribis:

> On Tue, 08 Jan 2019 09:42:14 +0100
> Ludovic Courtès <[email-masked]> wrote:
>
>> > Go has peculiar ideas of how the directory layout is supposed to be set up.
>> > I could probably figure it out - but if someone with more Go knowledge could
>> > step forward it would be much faster.  
>> 
>> I see Leo is Cc’d so we’ll see.  :-)
>
> Nevermind, I've fixed it and learned something in the process:
>
> Linux doesn't actually know the current working directory as a string.
> It only knows the inode, so if you call getcwd, what libc actually does is
> it opendirs "..", then finds the entry with the same inode number as
> the current directory, and then returns the name of that entry.

Are you sure?  In the Linux port of glibc I see this:

--8<---------------cut here---------------start------------->8---
char *
__getcwd (char *buf, size_t size)
{
  char *path;
  char *result;

  // […]

  retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size);
--8<---------------cut here---------------end--------------->8---

And indeed, there’s a ‘getcwd’ syscall:

--8<---------------cut here---------------start------------->8---
$ strace -e getcwd guile -c '(getcwd)'
getcwd("/home/ludo", 100)               = 11
+++ exited with 0 +++
--8<---------------cut here---------------end--------------->8---

> Now, gopath uses symlinks to set up their preferred directory hierarchy
> in such a way:
>
> ln -s ../../../.. .gopath/src/github.com/docker/docker
>
> Now if you chdir into ".gopath/src/github.com/docker/docker" and then Go later
> does getcwd, it will appear as if the chdir did not succeed (because it will
> just use the old working directory because it has the same inode).
>
> So Go was erroring out because the directory structure there was *still* wrong.
>
> Solution: Set environment variable PWD to the correct name of the directory.

Great that you found a solution.

Thanks for taking the time to address this!

Ludo’.

Subject: [PATCH 0/2] Add docker.
From: Danny Milosavljevic <[email-masked]>
To: [email-masked]
Cc: Danny Milosavljevic <[email-masked]>
Date: Fri, 28 Dec 2018 11:13:11 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Danny Milosavljevic (2):
  gnu: Add docker-engine.
  gnu: Add docker-cli.

 gnu/packages/docker.scm | 144 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 144 insertions(+)