Re: RFC: [PATCH] trans/fakeroot.c

2015-10-15 Thread Samuel Thibault
Samuel Thibault, le Tue 13 Oct 2015 13:49:48 +0200, a écrit : > snd & such still have an issue with temporary files in /tmp Apparently this only happens when /tmp is a firmlink to somewhere else. Probably an issue with reauthenticating the port returned by getroot() on the firmlink. Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-13 Thread Svante Signell
On Tue, 2015-10-13 at 13:49 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 13 Oct 2015 13:42:22 +0200, a écrit : > > On Mon, 2015-10-12 at 15:21 +0200, Samuel Thibault wrote: > > FYI: gcc-snapshot (20150817, not 20150913) and frama-c (20150201+sodium > > +dfsg-2) with downgraded dependenci

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-13 Thread Samuel Thibault
Svante Signell, le Tue 13 Oct 2015 13:42:22 +0200, a écrit : > On Mon, 2015-10-12 at 15:21 +0200, Samuel Thibault wrote: > > > I believe they will. But perhaps in your tests they didn't (but did > > your tests really try that?), in which case it'd mean there is a bug. > > But for now nothing said

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-13 Thread Svante Signell
On Mon, 2015-10-12 at 15:21 +0200, Samuel Thibault wrote: > I believe they will. But perhaps in your tests they didn't (but did > your tests really try that?), in which case it'd mean there is a bug. > But for now nothing said there was a bug there. FYI: gcc-snapshot (20150817, not 20150913) and

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Samuel Thibault
Svante Signell, le Mon 12 Oct 2015 15:16:19 +0200, a écrit : > On Mon, 2015-10-12 at 15:12 +0200, Samuel Thibault wrote: > > Svante Signell, le Mon 12 Oct 2015 15:04:40 +0200, a écrit : > > > OK I buy your explanation; though there seems to be remaining bugs. > > > > Which bugs? > > You wrote it

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Svante Signell
On Mon, 2015-10-12 at 15:12 +0200, Samuel Thibault wrote: > Svante Signell, le Mon 12 Oct 2015 15:04:40 +0200, a écrit : > > OK I buy your explanation; though there seems to be remaining bugs. > > Which bugs? You wrote it not me: > Subsequent writes to the file will then fail (and if they don't,

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Samuel Thibault
Svante Signell, le Mon 12 Oct 2015 15:04:40 +0200, a écrit : > OK I buy your explanation; though there seems to be remaining bugs. Which bugs? Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Svante Signell
On Mon, 2015-10-12 at 14:49 +0200, Samuel Thibault wrote: > Svante Signell, le Mon 12 Oct 2015 14:45:09 +0200, a écrit : > > On Mon, 2015-10-12 at 02:08 +0200, Samuel Thibault wrote: > > > The commit I have just pushed, which does make sense, does fix gpsd at > > > least. > Please erase your build

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Samuel Thibault
Samuel Thibault, le Mon 12 Oct 2015 14:49:43 +0200, a écrit : > Your proposed change does not meet what I said. > Notably, in the nn->openmodes = O_READ and newmodes = O_WRITE case, > it'll be wrong: nn->openmodes & newmodes will be zero, and thus the > 'file' port will be used as such, but it will

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Samuel Thibault
Svante Signell, le Mon 12 Oct 2015 14:45:09 +0200, a écrit : > On Mon, 2015-10-12 at 02:08 +0200, Samuel Thibault wrote: > > The commit I have just pushed, which does make sense, does fix gpsd at > > least. > > Building gpsd (3.15-1) with your patch applied: > cp /home/srs/DEBs/gpsd/gpsd-3.15/gpsd

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-12 Thread Svante Signell
On Mon, 2015-10-12 at 02:08 +0200, Samuel Thibault wrote: > The commit I have just pushed, which does make sense, does fix gpsd at > least. Building gpsd (3.15-1) with your patch applied: cp /home/srs/DEBs/gpsd/gpsd-3.15/gpsd.rules /home/srs/DEBs/gpsd/gpsd-3.15/debian/gpsd.udev cp: cannot create

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-11 Thread Samuel Thibault
The commit I have just pushed, which does make sense, does fix gpsd at least. Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-11 Thread Samuel Thibault
Svante Signell, le Sun 11 Oct 2015 23:02:16 +0200, a écrit : > > We also see from the printout that > > nn->openmodes = 2 = O_WRITE and > > newmodes = 1 = O_READ i.e. no intersecting sets. > > > > The above condition is really happening when building (patched to > build, not related to fakeroot)

Re: RFC: [PATCH] trans/fakeroot.c

2015-10-11 Thread Svante Signell
On Thu, 2015-05-21 at 10:56 +0200, Svante Signell wrote: > On Fri, 2015-05-15 at 20:31 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > > > - if (file != MACH_PORT_NULL && (nn->openmodes & ~newmodes)) > > > + if (file != MACH_PORT_NULL &&

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-16 Thread Samuel Thibault
Samuel Thibault, le Tue 09 Jun 2015 16:58:44 +0200, a écrit : > I'm also wondering whether we'd want to set IXUSR when > openmodes & O_EXEC. I've changed that patch accordingly and commited Thanks! Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-10 Thread Svante Signell
On Wed, 2015-06-10 at 10:05 +0200, Svante Signell wrote: > On Tue, 2015-06-09 at 17:15 +0200, Svante Signell wrote: > > > I've built pycorrfit and hurd so far, no issues yet. Will build glibc, > > gnat-4.9 and gcc-5 to be sure. > > glibc and gnat-4.9 built fine. gcc-5 will take several hours. An

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-10 Thread Svante Signell
On Tue, 2015-06-09 at 17:15 +0200, Svante Signell wrote: > I've built pycorrfit and hurd so far, no issues yet. Will build glibc, > gnat-4.9 and gcc-5 to be sure. glibc and gnat-4.9 built fine. gcc-5 will take several hours.

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 16:58 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 09 Jun 2015 16:46:14 +0200, a écrit : > > On Tue, 2015-06-09 at 14:20 +0200, Samuel Thibault wrote: > > > Svante Signell, le Tue 09 Jun 2015 11:41:01 +0200, a écrit : > > > > On Tue, 2015-06-09 at 11:11 +0200, Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Samuel Thibault
Svante Signell, le Tue 09 Jun 2015 16:46:14 +0200, a écrit : > On Tue, 2015-06-09 at 14:20 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 09 Jun 2015 11:41:01 +0200, a écrit : > > > On Tue, 2015-06-09 at 11:11 +0200, Samuel Thibault wrote: > > > > > > > So the package is actually doing s

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 14:20 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 09 Jun 2015 11:41:01 +0200, a écrit : > > On Tue, 2015-06-09 at 11:11 +0200, Samuel Thibault wrote: > > > > > So the package is actually doing something stupid (yes, that's what you > > > should have written in your

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Samuel Thibault
Svante Signell, le Tue 09 Jun 2015 11:41:01 +0200, a écrit : > On Tue, 2015-06-09 at 11:11 +0200, Samuel Thibault wrote: > > > So the package is actually doing something stupid (yes, that's what you > > should have written in your mail to explain what is happening, actually > > :) ). But it does w

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 11:11 +0200, Samuel Thibault wrote: > So the package is actually doing something stupid (yes, that's what you > should have written in your mail to explain what is happening, actually > :) ). But it does work as root as specified by POSIX, so we have to > support it. Yes I t

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Samuel Thibault
Svante Signell, le Tue 09 Jun 2015 10:55:35 +0200, a écrit : > On Tue, 2015-06-09 at 10:43 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 09 Jun 2015 10:13:46 +0200, a écrit : > > > Done so now. Attached are two versions of a patch to fakeroot.c. In > > > netfs_get_dirents(): call netfs_a

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 10:55 +0200, Svante Signell wrote: > On Tue, 2015-06-09 at 10:43 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 09 Jun 2015 10:13:46 +0200, a écrit : > > > Done so now. Attached are two versions of a patch to fakeroot.c. In > > > netfs_get_dirents(): call netfs_attem

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 11:01 +0200, Svante Signell wrote: > mkdir test > touch test/a > > chmod -R test Correction: chmod -R 644 test > chmod: cannot access ‘test/a’: Permission denied > > ls -ld test > drw-r--r-- 2 srs srs 4096 Jun 9 11:00 test > > ls -l test > ls: cannot access test/a: Permis

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Tue, 2015-06-09 at 10:43 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 09 Jun 2015 10:13:46 +0200, a écrit : > > Done so now. Attached are two versions of a patch to fakeroot.c. In > > netfs_get_dirents(): call netfs_attempt_chmod() before dir_readdir() to > > make sure that directories

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Samuel Thibault
Svante Signell, le Tue 09 Jun 2015 10:13:46 +0200, a écrit : > Done so now. Attached are two versions of a patch to fakeroot.c. In > netfs_get_dirents(): call netfs_attempt_chmod() before dir_readdir() to > make sure that directories are accessible (executable) before changing > the underlying file

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-09 Thread Svante Signell
On Fri, 2015-06-05 at 11:18 +0530, Samuel Thibault wrote: > Hello, > > It seems there is still a corner case which doesn't work: the pycorrfit > package fails to build with: > > chmod -R 644 > debian/pycorrfit/usr/share/doc/pycorrfit/examples/external_model_functions/ > chmod: cannot access > '

Re: RFC: [PATCH] trans/fakeroot.c

2015-06-04 Thread Samuel Thibault
Hello, It seems there is still a corner case which doesn't work: the pycorrfit package fails to build with: chmod -R 644 debian/pycorrfit/usr/share/doc/pycorrfit/examples/external_model_functions/ chmod: cannot access 'debian/pycorrfit/usr/share/doc/pycorrfit/examples/external_model_functions/E

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-23 Thread Justus Winter
Quoting Samuel Thibault (2015-05-23 23:53:07) > I have switched the buildds to using fakeroot-hurd by default, and will > probably bump the alternatives priority soon too. Awesome :) Justus

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-23 Thread Samuel Thibault
gnat-5 built fine indeed. Congrats again for having tracked this bug! I have switched the buildds to using fakeroot-hurd by default, and will probably bump the alternatives priority soon too. Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-22 Thread Samuel Thibault
Samuel Thibault, le Sat 23 May 2015 02:04:24 +0530, a écrit : > Could you try the attached patch? It makes your testcase work fine, but > perhaps it has other unexpected consequences. Thinking again about it, I believe it will be really fine, so commited it. Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-22 Thread Samuel Thibault
Thanks again for the explanations, that's exactly what I needed to manage to have a look at your proposed changes quickly :) Svante Signell, le Thu 21 May 2015 10:56:24 +0200, a écrit : > - there are two cosmetic changes (I know they should not be there, but > for code unification/readability) >

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-21 Thread Samuel Thibault
Hello, Thanks for the explanation, I'll have a look shortly (explanations help in terms of priority that a patch can get ;) ) And thanks for tracking the bug, it'll very probably fix quite a few builds with fakeroot-hurd, I'll then try to enable it by default on buildds. Samuel

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-21 Thread Svante Signell
On Fri, 2015-05-15 at 20:31 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > - if (file != MACH_PORT_NULL && (nn->openmodes & ~newmodes)) > > + if (file != MACH_PORT_NULL && (nn->openmodes & newmodes )) /* works > > */ > > This change nee

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-16 Thread Samuel Thibault
Svante Signell, le Sat 16 May 2015 02:05:53 +0200, a écrit : > On Fri, 2015-05-15 at 20:31 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > > + /* XXX: Limit openmodes */ > > > This change needs to be motivated and explained. > > Hi, for the firs

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-15 Thread Svante Signell
On Fri, 2015-05-15 at 20:31 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > + /* XXX: Limit openmodes */ > This change needs to be motivated and explained. Hi, for the first time joining hurd development I see that you are interested in a patch (f

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-15 Thread Samuel Thibault
Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > + /* XXX: Limit openmodes */ > + if (openmodes > O_ALLOWED) > +openmodes &= O_ALLOWED; /* works */ More precisely, which openmode posed problem here? Perhaps this is not the best place to exclude them. At the very least we need

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Samuel Thibault
Svante Signell, le Tue 12 May 2015 10:00:26 +0200, a écrit : > On Tue, 2015-05-12 at 09:42 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > > The idea is to limit the openmodes according to the values defined in > > > struct netnode and to change th

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Samuel Thibault
Svante Signell, le Tue 12 May 2015 11:39:19 +0200, a écrit : > On Tue, 2015-05-12 at 11:22 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 12 May 2015 10:00:26 +0200, a écrit : > > > On Tue, 2015-05-12 at 09:42 +0200, Samuel Thibault wrote: > > > > Svante Signell, le Tue 12 May 2015 09:15:

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Svante Signell
On Tue, 2015-05-12 at 11:22 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 12 May 2015 10:00:26 +0200, a écrit : > > On Tue, 2015-05-12 at 09:42 +0200, Samuel Thibault wrote: > > > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > > > The idea is to limit the openmodes accord

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Samuel Thibault
Svante Signell, le Tue 12 May 2015 10:00:26 +0200, a écrit : > On Tue, 2015-05-12 at 09:42 +0200, Samuel Thibault wrote: > > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > > The idea is to limit the openmodes according to the values defined in > > > struct netnode and to change th

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Svante Signell
On Tue, 2015-05-12 at 09:42 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > > The idea is to limit the openmodes according to the values defined in > > struct netnode and to change the test for overlapping sets. > > In which case is this needed? What

Re: RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Samuel Thibault
Svante Signell, le Tue 12 May 2015 09:15:46 +0200, a écrit : > The idea is to limit the openmodes according to the values defined in > struct netnode and to change the test for overlapping sets. In which case is this needed? What happens in that case and how the patch fixes this? A patch should b

RFC: [PATCH] trans/fakeroot.c

2015-05-12 Thread Svante Signell
Hello, The attached test case gnat-4.9-test.tar.gz is a stripped-down version of the gnat-4.9 build with a custom fakeroot-hurd script. With the current version of fakeroot-hurd, the build fails. The attached patch trans_fakeroot.patch fixes this. The idea is to limit the openmodes according to