[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Totally Gormless
From: |
Armando Di Cianno |
Subject: |
Re: Totally Gormless |
Date: |
Tue, 11 Oct 2005 23:06:53 -0400 |
On 2005-10-11 15:59:50 -0400 Nicola Pero
<nicola.pero@operatelecom.com> wrote:
Well ... yes and no. Sane use of CFLAGS should definitely be up to
either the person compiling by hand, or the package maintainer in a
distro. Also, ideally, I don't think that gnustep-make should
compile
anything at all, but rather by easily relocatable; everything being
based on the env. settings of GNUSTEP_MAKEFILES (only for
dev/building) and GNUSTEP_SYSTEM_ROOT.
I'm not sure I get what you're trying to say.
You seem to imply that having the two C command line tools in
gnustep-make
breaks relocatability. Can you explain your argument more in detail ?
I suppose "relocatable" was the wrong word. What I was trying to
emphasize is that w/o any compiled code, and without "support scripts"
like GNUstep.sh/csh, the gnustep-make package can be placed anywhere,
and, conceivably, utilized by just setting the GNUSTEP_MAKEFILES
variable (maybe with GNUSTEP_SYSTEM_ROOT/Library/Makefiles as
default). I feel like this would be the most ideal situation -- one
that, once I grok what which_lib.c is doing better, I will feel is
very possible.
- - it is only called *once* from GNUstep.sh (currently)
[...]
... so it takes about 2 times as long to run -- which still amounts
to
a split second. ;-)
PS: That's a lot slower ;-)
.... but looking at your code, I'm certainly not opposed to replacing
user_home with a sed one-liner if we know that the sed one-liner will
always work properly (eg, on all platforms) [and I believe I can
optimize
the sed stuff so it goes as fast, if not faster, than user_home.c].
;-)
Yeah, the posted sed script just keeps chomping on stuff until it gets
what it wants ... not the prettiest.
The reason we have user_home.c is that the code to determine the user
home
wasn't exactly simple, and couldn't be done properly with a single
unix
command ...
This is why I'd like to focus on getting rid of GNUstep.sh/csh -- the
only place that `user_home` is called. I've been through
gnustep-base's NSPathUtilities.m (iirc) many, many times (mainly to
get my patch of using $HOME if it's defined, as to not pollute /root
with a GNUstep dir), and I can say that it does a heck of a job
constructing a workable environment based on the information given in
GNUstep.conf coupled with "happy defaults" if things aren't specified
there.
PS: My original idea was to simply include GNUstep.conf in shell
scripts. I
hope the idea has been kept in the sense that the GNUstep.conf syntax
is
compatible with sh syntax. If so, and if we can just include
GNUstep.conf
in shell scripts (and makefiles!) instead of running C tools, that
would
be as fast and simple as you can get it. :-)
Definitely -- as long as the other variables in that file like
"SYS_APPS" and all that don't start to pollute a user's environment.
No reason they would have to, of course, if that file gets source
while launching apps, not at a user login, like GNUstep.conf.
To illustrate, right now I only have:
GNUSTEP_SYSTEM_ROOT=/usr/GNUstep/System
GNUSTEP_LOCAL_ROOT=/usr/GNUstep/Local
GNUSTEP_NETWORK_ROOT=/usr/GNUstep/Network
USER_GNUSTEP_DIR=
USER_GNUSTEP_DEFAULTS=Defaults
... in my GNUstep.conf, and all of this get sourced by my patched
GNUstep.sh. Since gnustep-base defines the "happy defaults" for
SYS_APPS/etc, I can live without setting them.
I seem to remember there is lot of hidden complexity in here, but
don't
remember much about the details, so probably reading old email
archives and
checking what the code does etc. is required! ;-)
I spent an evening with post-its and NSPathUtilities.m when 1.11.0
make/base were released trying to reconstruct my $HOME-respectng
patch, trying to flow-diagram the different paths through the code. I
feel the only part that makes the code scary is compatibility support
for GNUsteprc ... Also, I feel like there were many sections of dead
code because of this; hopefully that will be removed when backwards
compatible support for GNUsteprc is removed.
Honestly, I think a gnustep-make package that was just a bundle of
build
files would be much more powerful than the one that gets compiled /
has
GNUstep.sh / etc.
I doubt compiling which_lib.c and user_home.c has much impact on
this, but
we certainly all agree about getting rid (or reducing) the need for
GNUstep.sh ;-)
That's just it! If user_home is removed, we are pretty much done. If
that is removed, then all the settings GNUstep.sh exports can either
be set in GNUstep.conf, are configure-time options for -base, or rely
on -base's happy defaults. Cases like GNUSTEP_FLATTENED probably need
to be looked at more.
I also have patches for gnustep-base, that are path related. For
example, $HOME is ignored in the code that figures out where the
Defaults Library gets written, so for e.g., I can specifiy the home
for gdomap to not be "/root", which is ridiculous, imho. My main goal
is to make them integrate nicely with the current GNUstep.conf based
way, rather than make something entirely new, that'll likely be
rejected. :-)
Well I'm not sure about that but you should certainly submit your
patches
.... why keeping them hidden ... ;-)
Sure, find them attached.
However, I think it was about last year this time when I submitted
similar patches against an older -base, and they were rejected, iirc,
because some were afraid of what would happen if someone used "su" ...
I however pointed out that "su -" or sudo should be used 'cause (man 1
su) "The optional argument - may be used to provide an environment
similiar to what the user would expect had the user logged in
directly." whereas "su" doesn't guarantee this; i.e. "su" is just
dangerous. ;-) Plus, the use of getent to get a user's home dir is
correct -- I just feel that the root user is a very special case -- /
or /root shouldn't even be assumed to be writable, imho; plus, a login
shell gaurantee's that $HOME is correct ... it's up to a user to break
their own environment. :-)
Another reason for the patch is that I also need it for allowing
builds to complete while in a sandbox (i.e. Gentoo ebuilds). The
simple act of making or installing apps, and docs, would create
~/GNUstep in /root.
__Armando Di Cianno
<base-user-defaults.patch-1.11.0-3>
<make-user-defaults.patch-1.11.0>
base-user-defaults.patch-1.11.0-3
Description: Binary data
make-user-defaults.patch-1.11.0
Description: Binary data
pgpXCXl3622m7.pgp
Description: PGP signature
- Re: Totally Gormless, (continued)
- Re: Totally Gormless, Nicola Pero, 2005/10/11
- Re: Totally Gormless, Adam Fedor, 2005/10/11
- Re: Totally Gormless, Nicola Pero, 2005/10/11
- Re: Totally Gormless, Armando Di Cianno, 2005/10/11
- Re: Totally Gormless, Richard Frith-Macdonald, 2005/10/12
- Re: Totally Gormless, Armando Di Cianno, 2005/10/12
- Re: Totally Gormless, Nicola Pero, 2005/10/12
- Re: Totally Gormless, Armando Di Cianno, 2005/10/12
- Re: Totally Gormless,
Armando Di Cianno <=
- Re: Totally Gormless, Nicola Pero, 2005/10/12
- Re: Totally Gormless, Adam Fedor, 2005/10/12
- Re: Totally Gormless, Adam Fedor, 2005/10/12
- Re: Totally Gormless, Nicola Pero, 2005/10/12
- Re: Totally Gormless, Helge Hess, 2005/10/12
- Re: Totally Gormless, Armando Di Cianno, 2005/10/12
- Re: Totally Gormless, Helge Hess, 2005/10/12
- Re: Totally Gormless, Adam Fedor, 2005/10/12
- Re: Totally Gormless, Nicola Pero, 2005/10/12
- Re: Totally Gormless, Armando Di Cianno, 2005/10/12