newbie question - file permissions

View: New views
12 Messages — Rating Filter:   Alert me  

newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm a complete newbie to the GNUstep world.  Do I need to be root to build?  Why?

09:51:37 NetBSD 5.0 ~/Etoile-0.4.1
tim@roy 554$ GNUSTEP_MAKEFILES=/usr/pkg/share/GNUstep/Makefiles gmake
This is gnustep-make 2.0.8. Type 'make print-gnustep-make-help' for help.
Making all in Frameworks...
Making all in UnitKit...
rm -f /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
ln -s /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/FrameworkSource /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
Making all in Source/FrameworkSource...
Making build-headers for framework UnitKit...
 Creating UnitKit.framework/Versions/1/Headers/UKRunner.h...
install: UnitKit.framework/Versions/1/Headers/UKRunner.h: chown/chgrp: Operation not permitted
gmake[4]: *** [UnitKit.framework/Versions/1/Headers/UKRunner.h] Error 1
gmake[3]: *** [UnitKit.build-headers.framework.variables] Error 2
gmake[2]: *** [internal-all] Error 2
gmake[1]: *** [internal-all] Error 2
gmake: *** [internal-all] Error 2


Thanks,
Tim

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by Niels Grewe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 09, 2009 at 10:02:16AM -0500, Larson, Timothy E. wrote:
> I'm a complete newbie to the GNUstep world.  Do I need to be root to build?  Why?

No you don't. In fact, you should refrain from building stuff as root
and only assume the superuser role if you install into the Local or
System domain. If you're just experimenting with Étoilé you'd also be
fine with GNUSTEP_INSTALLATION_DOMAIN=USER and using your normal user to
(g)make install.

> 09:51:37 NetBSD 5.0 ~/Etoile-0.4.1

If you're not intending to package Étoilé, it's usually more advisable
to try out svn trunk.

> tim@roy 554$ GNUSTEP_MAKEFILES=/usr/pkg/share/GNUstep/Makefiles gmake

Why do you have to set GNUSTEP_MAKEFILES here? Usually it should be set
when you source .../Makefiles/GNUstep.(sh|csh).

> This is gnustep-make 2.0.8. Type 'make print-gnustep-make-help' for help.
> Making all in Frameworks...
> Making all in UnitKit...
> rm -f /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
> ln -s /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/FrameworkSource /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
> Making all in Source/FrameworkSource...
> Making build-headers for framework UnitKit...
>  Creating UnitKit.framework/Versions/1/Headers/UKRunner.h...
> install: UnitKit.framework/Versions/1/Headers/UKRunner.h: chown/chgrp: Operation not permitted

This is rather odd. On my setup (GNU/Linux) install takes '-c -p -m 644'
as arguments, so it doesn't do any chowning/chgrping. If you build
with 'gmake messages=yes' you will see what commands gnustep-make is
issuing during the built. These could be useful for debugging this.

Cheers,

Niels

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Niels Grewe:
> No you don't. In fact, you should refrain from building stuff as root
> and only assume the superuser role if you install into the Local or
> System domain. If you're just experimenting with Étoilé you'd also be
> fine with GNUSTEP_INSTALLATION_DOMAIN=USER and using your normal user
> to
> (g)make install.

I don't know about GNUSTEP_INSTALLATION_DOMAIN.  Is this value the default, or is it something I need to set?

> If you're not intending to package Étoilé, it's usually more advisable
> to try out svn trunk.

I am hoping to package.

> Why do you have to set GNUSTEP_MAKEFILES here? Usually it should be set
> when you source .../Makefiles/GNUstep.(sh|csh).

How/when is GNUstep.sh sourced?  That's another thing I don't know.  (If the process doesn't follow the typical "./configure; make; sudo make install" it needs to be documented.)  With just gmake, I get errors about /common.make not found, because GNUSTEP_MAKEFILES is not defined, so it made sense to define it.

> This is rather odd. On my setup (GNU/Linux) install takes '-c -p -m
> 644'
> as arguments, so it doesn't do any chowning/chgrping. If you build

Perhaps there are some Linux-centric assumptions?

> with 'gmake messages=yes' you will see what commands gnustep-make is
> issuing during the built. These could be useful for debugging this.

Ahhh, debugging messages!  I will try this.


Thanks,
Tim
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by David Chisnall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 9 Oct 2009, at 17:07, Larson, Timothy E. wrote:

> Niels Grewe:
>> No you don't. In fact, you should refrain from building stuff as root
>> and only assume the superuser role if you install into the Local or
>> System domain. If you're just experimenting with Étoilé you'd also be
>> fine with GNUSTEP_INSTALLATION_DOMAIN=USER and using your normal user
>> to
>> (g)make install.
>
> I don't know about GNUSTEP_INSTALLATION_DOMAIN.  Is this value the  
> default, or is it something I need to set?

This tells it where to install.  For packaging, you probably want to  
leave it as default.

>> If you're not intending to package Étoilé, it's usually more  
>> advisable
>> to try out svn trunk.
>
> I am hoping to package.
>
>> Why do you have to set GNUSTEP_MAKEFILES here? Usually it should be  
>> set
>> when you source .../Makefiles/GNUstep.(sh|csh).
>
> How/when is GNUstep.sh sourced?  That's another thing I don't know.  
> (If the process doesn't follow the typical "./configure; make; sudo  
> make install" it needs to be documented.)  With just gmake, I get  
> errors about /common.make not found, because GNUSTEP_MAKEFILES is  
> not defined, so it made sense to define it.

GNUstep.sh needs to be sourced when building any GNUstep code.  This  
is documented in the GNUstep docs, but we probably need to document it  
somewhere for Étoilé too.  This file sets a number of environment  
variables that are required by GNUstep Make.

If you are creating a build script for packaging then you probably  
want to source this in your build script.  I'm not sure about pkgsrc,  
but the FreeBSD ports collection has a makefile that knows all about  
this stuff so you just need to set something like  
USES_GNUSTEP_MAKE=YES in the port makefile for it to all work.

>> This is rather odd. On my setup (GNU/Linux) install takes '-c -p -m
>> 644'
>> as arguments, so it doesn't do any chowning/chgrping. If you build
>
> Perhaps there are some Linux-centric assumptions?

Shouldn't be.  I can build UnitKit on FreeBSD quite happily.  There  
may well be bugs, of course...

David

-- Sent from my PDP-11


_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Chisnall:
> GNUstep.sh needs to be sourced when building any GNUstep code.  This
> is documented in the GNUstep docs, but we probably need to document it
> somewhere for Étoilé too.  This file sets a number of environment
> variables that are required by GNUstep Make.

So instead of simply "gmake" I want to say ". $SOMEPATH/GNUstep.sh; gmake".  OK...

> If you are creating a build script for packaging then you probably
> want to source this in your build script.  I'm not sure about pkgsrc,
> but the FreeBSD ports collection has a makefile that knows all about
> this stuff so you just need to set something like
> USES_GNUSTEP_MAKE=YES in the port makefile for it to all work.

I looked through several other GNUstep packages and didn't see anything like this.  I've sent an email to the packager, though.


Thanks,
Tim
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Niels Grewe:
> This is rather odd. On my setup (GNU/Linux) install takes '-c -p -m
> 644'
> as arguments, so it doesn't do any chowning/chgrping. If you build
> with 'gmake messages=yes' you will see what commands gnustep-make is
> issuing during the built. These could be useful for debugging this.

15:32:23 NetBSD 5.0 ~/Etoile-0.4.1
tim@roy 616$ . /usr/pkg/share/GNUstep/Makefiles/GNUstep.sh; gmake messages=yes
This is gnustep-make 2.0.8. Type 'make print-gnustep-make-help' for help.
Making all in Frameworks...
gmake[1]: Entering directory `/home/tim/Etoile-0.4.1/Frameworks'
Making all in UnitKit...
gmake[2]: Entering directory `/home/tim/Etoile-0.4.1/Frameworks/UnitKit'
rm -f /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
ln -s /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/FrameworkSource /home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/UnitKit
Making all in Source/FrameworkSource...
gmake[3]: Entering directory `/home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/FrameworkSource'
Making build-headers for framework UnitKit...
/usr/pkg/share/GNUstep/Makefiles/mkinstalldirs UnitKit.framework/Versions/1/Headers
/usr/bin/install -c -o root -g wheel -m 444 UKRunner.h UnitKit.framework/Versions/1/Headers/UKRunner.h
install: UnitKit.framework/Versions/1/Headers/UKRunner.h: chown/chgrp: Operation not permitted
gmake[4]: *** [UnitKit.framework/Versions/1/Headers/UKRunner.h] Error 1
gmake[3]: *** [UnitKit.build-headers.framework.variables] Error 2
gmake[3]: Leaving directory `/home/tim/Etoile-0.4.1/Frameworks/UnitKit/Source/FrameworkSource'
gmake[2]: *** [internal-all] Error 2
gmake[2]: Leaving directory `/home/tim/Etoile-0.4.1/Frameworks/UnitKit'
gmake[1]: *** [internal-all] Error 2
gmake[1]: Leaving directory `/home/tim/Etoile-0.4.1/Frameworks'
gmake: *** [internal-all] Error 2



Tim
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by Truls Becken :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Chisnall wrote:

> On 9 Oct 2009, at 17:07, Larson, Timothy E. wrote:
>
>> I don't know about GNUSTEP_INSTALLATION_DOMAIN.  Is this value the
>> default, or is it something I need to set?
>
> This tells it where to install.  For packaging, you probably want to
> leave it as default.

I would have to disagree slightly here. For packaging, you should
ensure that GNUSTEP_INSTALLATION_DOMAIN=SYSTEM. That one plus DESTDIR
are the two variables you should normally need to set when building
GNUstep packages, so the average build script looks similar to this,
assuming GNUstep.sh is already sourced;

  export GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
  export DESTDIR="$pkgdir"
  make install

-Truls

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by Niels Grewe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 09, 2009 at 03:33:25PM -0500, Larson, Timothy E. wrote:
> /usr/bin/install -c -o root -g wheel -m 444 UKRunner.h UnitKit.framework/Versions/1/Headers/UKRunner.h
> install: UnitKit.framework/Versions/1/Headers/UKRunner.h: chown/chgrp: Operation not permitted

Hmm, this still strikes me as odd. Maybe you should ask about this on
gnustep-discuss. Nicola Pero probably listens there and he obviously
knows his way around gnustep-make pretty well...
One thing you could try as a workaround is the following:
'gmake INSTALL_AS_USER=$YOUR_USERNAME INSTALL_AS_GROUP=$YOUR_GROUP',
which should cause gnustep-make to pass those to install explicitly.

Cheers,


Niels

_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So, any ideas why this line is being executed this way?  I don't know enough about the GNUstep toolchain to even start tracking down where the code doing this might actually be located.

> /usr/bin/install -c -o root -g wheel -m 444 UKRunner.h
> UnitKit.framework/Versions/1/Headers/UKRunner.h
> install: UnitKit.framework/Versions/1/Headers/UKRunner.h: chown/chgrp:
> Operation not permitted

Thanks,
Tim
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dunno if this is relevant, but if I am root (to get around those permission issues) I get this....


Compiling file ETObjectChain.m ...
 Compiling file ETObjectRegistry.m ...
 Compiling file ETPropertyValueCoding.m ...
 Compiling file ETTranscript.m ...
 Compiling file ETTransform.m ...
 Compiling file ETUUID.m ...
ETUUID.m: In function 'ETSRandomDev':
ETUUID.m:69: error: storage size of 'tv' isn't known
gmake[4]: *** [obj/ETUUID.m.o] Error 1
gmake[3]: *** [libEtoileFoundation.all.subproject.variables] Error 2
gmake[2]: *** [EtoileFoundation.all.framework.variables] Error 2
gmake[1]: *** [internal-all] Error 2
gmake: *** [internal-all] Error 2



Tim
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

Re: newbie question - file permissions

by Quentin Mathé-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Timothy,

Le 14 oct. 2009 à 07:33, Larson, Timothy E. a écrit :

> Dunno if this is relevant, but if I am root (to get around those  
> permission issues) I get this....
>
>
> Compiling file ETObjectChain.m ...
> Compiling file ETObjectRegistry.m ...
> Compiling file ETPropertyValueCoding.m ...
> Compiling file ETTranscript.m ...
> Compiling file ETTransform.m ...
> Compiling file ETUUID.m ...
> ETUUID.m: In function 'ETSRandomDev':
> ETUUID.m:69: error: storage size of 'tv' isn't known
> gmake[4]: *** [obj/ETUUID.m.o] Error 1
> gmake[3]: *** [libEtoileFoundation.all.subproject.variables] Error 2
> gmake[2]: *** [EtoileFoundation.all.framework.variables] Error 2
> gmake[1]: *** [internal-all] Error 2
> gmake: *** [internal-all] Error 2

You need to port ETSRandomDev() function (either the Linux version or  
the generic one) to NetBSD, because AFAIK srandomdev() isn't available  
on NetBSD.
The error you get means the generic function cannot be compiled.  
'timeval' is POSIX-compliant, you should be able to get it working by  
including the right header. I suppose NetBSD supports it.
<http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/time.h.html>
Take a look at ETUUID.m to understand what I mean more precisely.

Cheers,
Quentin.
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss

srandomdev (RE: newbie question - file permissions)

by telarson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> You need to port ETSRandomDev() function (either the Linux version or
> the generic one) to NetBSD, because AFAIK srandomdev() isn't available
> on NetBSD.
> The error you get means the generic function cannot be compiled.
> 'timeval' is POSIX-compliant, you should be able to get it working by
> including the right header. I suppose NetBSD supports it.
> <http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/time.h.html
> >
> Take a look at ETUUID.m to understand what I mean more precisely.

Looks like just changing your ifdef blocks so that the headers get included in all non-Free/Open/Dragonfly cases, instead of only the Linux case, fixes it.  Diff against 0.4.1......


--- Frameworks/EtoileFoundation/Source/ETUUID.m.orig    2009-03-17 08:18:26.000000000 -0500
+++ Frameworks/EtoileFoundation/Source/ETUUID.m 2009-11-10 11:15:39.000000000 -0600
@@ -15,7 +15,7 @@
 // time and pid to seed the random number generator.
 #if defined(__FreeBSD__) || defined(__OpenBSD) || defined(__DragonFly__)
 #define INITRANDOM() srandomdev()
-#elif defined(__linux__)
+#else
 #include <sys/time.h>
 #include <time.h>
 #include <sys/types.h>
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
+#if defined(__linux__)
 /** Returns a strong random number which can be used as a seed for srandom().
     This random number is obtained from Linux entropy pool through /dev/random.
     Unlike /dev/urandom, /dev/random blocks when the entropy estimate isn't
@@ -83,6 +84,7 @@
 }
 #define INITRANDOM() ETSRandomDev()
 #endif
+#endif
 #import "Macros.h"
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@...
https://mail.gna.org/listinfo/etoile-discuss