The value in SHAREDIR is passed to the giftd argument --local-dir= ...which has nothing to do with the share directory. In particular, this is the directory where giftd will look for the config file. The problems caused by this are compounded by the fact that the current x86 version (0.11.6-r1) misreports the location of the config as (null). So, if SHAREDIR is set to a directory which does not contain a config, the user has no clues as to the cause of the problem. The easiest way to deal with this is to rename the variable to something like "CONFDIR" or "WORKINGDIR." The share directory is actually configured in giftd.conf, so it won't hurt anything there. Reproducible: Always Steps to Reproduce: 1. Install gift 2. Change the variable SHAREDIR in /etc/conf.d/gift to a directory that contains no giftd.conf file 3. Attempt to start gift with `/etc/init.d/gift start` Actual Results: The startup script reported [ok] but the process died; trying to stop it failed and I had to use zap. The log message says to run gift-setup, but this program makes a configuration file somewhere else, so even after running it the same log message comes up. Worse, the log message says "consult the configuration in (null)..." so you can't figure out where it's looking. If the x86 version upgrades to 0.11.8.1 (the current ~x86 version) this is a lot less difficult to figure out as a user; the (null) bug was fixed in between, so you can make the connection between SHAREDIR and the conf location. In my case, I upgraded to 0.11.8.1, saw the new log, and just copied the conf over to the sharedir. Things worked. Basically, the point here is that SHAREDIR is a complete misnomer and should be changed. The only function of that variable the way this application is setup is the config file location. The name of the variable ought to reflect that, or there should at least be a comment somewhere nearby to let everyone know.
ok. here's my proposition how to solve that: we should change: einfo "First, you need to run gift-setup with your normal" einfo "user account to create the giFT configuration files." into: einfo "Configure gift in /usr/share/giFT/ or run gift-setup" einfo "as normal user and make:" einfo 'cp -R $HOME/.giFT/* /usr/share/giFT/' einfo "chown -R p2p:root /usr/share/giFT/*" einfo "(be carefull while specyfing directories in gift-setup;" einfo "keep in mind that giFT will run as process of user " einfo 'specified in /etc/conf.d/gift with his $HOME directory)' or something similar in all gift's ebuilds (it's not true in fact, that problem with (null) is solved in 0.11.8 - it's just hidden, but appears in some situations) SHAREDIR isn't in fact the best name for variable we're talking about. i propose LODAL_DIR as it's named like this in giftd options. additionaly i changed a bit startup script and made it fail if gift won't start (also renice proces was bit ugly - start-stop-deamon can do that). attaching gift.confd and gift.initd
Created attachment 63256 [details] init.d/gift
Created attachment 63257 [details] conf.d/gift
Ebuils are ready to add to portage, i've tested them, but mzholzer is its maintainer
this bug is open to long without mholzer's feedback. i'm commiting changes to cvs and closing it.