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)

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

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

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 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

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-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 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

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

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-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-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-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. And

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

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

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

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-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 files.

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 are

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 work as

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

2015-06-05 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

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-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-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-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-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 needs to be

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 to

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 be

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 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 according to

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 the test

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:46 +0200,

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 the test