[Gtkradiant] Permission errors (2)

bebo_sudo bebo.sudo at gmail.com
Tue Sep 3 07:23:26 EDT 2013

Il 02/09/2013 21:31, ailmanki ha scritto:
> Hi all,
> Doesn't that piece of code simply create a file in the current working 
> directory? I think that is as intended?
> If it is creating the file where q3map2 is located, well that would be 
> bad.
> Cheers,
> ailmanki
> On Mon, Sep 2, 2013 at 3:39 PM, Timothee Besset <ttimo at ttimo.net 
> <mailto:ttimo at ttimo.net>> wrote:
>     Hey Bebo,
>     GtkRadiant should have write permissions to the directory it is
>     installed in. This is really the easiest way you are going to
>     package GtkRadiant for a particular distribution.
>     I believe that packaging systems should provide the operating
>     environment that a piece of software requires, and not the other
>     way around. I'm not sure these lines of code you are pointing to
>     are actually a problem for what you are trying to do, that looks
>     like BSP code to me. But I'm sure there are plenty of other places
>     that would need to be changed if we were going to try and make
>     radiant run from a readonly directory.
>     The thing is, none of the developers seem very interested in
>     helping with that effort. It would likely destabilize the
>     codebase, introduce new bugs for no obvious advantage. We've
>     already put significant effort in being able to provide a set of
>     binaries that run on a variety of Linux systems, and can be
>     distributed in a zip, without having to deal with distribution
>     specific package requirements.
>     I believe this strategy is a much better approach for GtkRadiant,
>     and while I wouldn't actively prevent someone from doing
>     distribution-specific packaging if they want to spend their energy
>     doing so, it seems like the other developers active on the project
>     generally agree with me.
>     Cheers,
>     TTimo
>     On Mon, Sep 2, 2013 at 5:11 AM, bebo_sudo <bebo.sudo at gmail.com
>     <mailto:bebo.sudo at gmail.com>> wrote:
>         Hi all folks,
>         I still am going to write about packaging gtkradiant for fedora.
>         Referring to the last mail I sent at the ML about the
>         permission errors [1], I searched in github the relative code
>         [2] and I think the "bug" is around the 71th line of this [3]
>         or this [4] file (which are equal?):
>         ...
>                 /* write it */
>                 Sys_Printf( "Writing %s\n", filename );
>                 Sys_FPrintf( SYS_VRB, "(%d bytes)\n", bspEntDataSize );
>                 file = fopen( filename, "w" );
>                 if ( file == NULL ) {
>                         Error( "Unable to open %s for writing",
>         filename );
>                 }
>         I'm not a C programmer and do not know how difficult it would
>         be to create a shortcut (a symlink, or something else) to the
>         user home instead of writing in the containing folder, but if
>         there's someone who's able to solve this issue I would
>         appreciate it very much.
>         Thanks anyway,
>         bebo
>         [1]:
>         http://icculus.org/pipermail/gtkradiant/2013-February/011841.html
>         [2]:
>         https://github.com/TTimo/GtkRadiant/search?q=+unable+open+writing&type=Code
>         [3]: tools/quake3/q3map2/exportents.c
>         [4]: tools/urt/tools/quake3/q3map2/exportents.c
>         _______________________________________________
>         Gtkradiant mailing list
>         Gtkradiant at icculus.org <mailto:Gtkradiant at icculus.org>
>         http://icculus.org/mailman/listinfo/gtkradiant
>     _______________________________________________
>     Gtkradiant mailing list
>     Gtkradiant at icculus.org <mailto:Gtkradiant at icculus.org>
>     http://icculus.org/mailman/listinfo/gtkradiant
> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant at icculus.org
> http://icculus.org/mailman/listinfo/gtkradiant

Thanks TTimo & ailmanki for your answers.

Trying to reply to TTimo, I would say that if the packaging system would 
provide all the stuff that a package requires, there would not be so 
much space in the repositories to contain all the data needed.
I don't want to quarrel about packaging, but I think a minimum of rules 
are required. The Linux FHS [1] is a global common principle followed by 
all the distributions, not only fedora. I simply can't put gtkradiant 
data in the user home because is impossible to do in a package, and also 
change folders permissions, like said here [2].

I really don't know if the code I linked before was the right section 
where the "problem" is, but is the only one where I found the words 
"unable open writing", which exited when the exec can't write in the 
current dir, as I reported in the fisrt mail [3]. I agree with you, the 
exec tries to create a file in the folder which is contained, but if the 
file is in a system folder owned by root user like /usr/share it can't 
write and crashes.

I regret that we can not solve; I will ask around if anyone can help me 
in this venture.
Meanwhile thanks for your work and the time you spend on this project!


[1]: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
[3]: http://icculus.org/pipermail/gtkradiant/2013-February/011841.html

More information about the Gtkradiant mailing list