Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588526 - net-p2p/i2p does not create /var/lib/i2p automatically
Summary: net-p2p/i2p does not create /var/lib/i2p automatically
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: tharvik
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-10 13:45 UTC by YumeWizard
Modified: 2016-07-11 18:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
"emerge --info" output (emerge_info.txt,5.05 KB, text/plain)
2016-07-10 13:45 UTC, YumeWizard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description YumeWizard 2016-07-10 13:45:38 UTC
Created attachment 440272 [details]
"emerge --info" output

When installed or when the init script is run i2p does not create the /var/lib/i2p directory it needs so configuration changes can be saved/log files can be written.

Example of a related error:
Jul  7 00:09:49 kagami i2p[12059]: Unable to write to the configured log file: /var/lib/i2p/.i2p/wrapper.log (No such file or directory)   Falling back to the default file in the current working directory: wrapper.log


I don't see a reason for this directory to not be created automatically.
Comment 1 tharvik 2016-07-11 14:44:54 UTC
> When installed or when the init script is run i2p does not create the
> /var/lib/i2p directory it needs so configuration changes can be saved/log
> files can be written.

Actually, it does create the /var/lib/i2p directory but you are right, it doesn't create /var/lib/i2p/.i2p. It's only the first time though.

I'm fixing it in the bump request PR on github
https://github.com/gentoo/gentoo/pull/1756
Comment 2 YumeWizard 2016-07-11 15:43:32 UTC
(In reply to tharvik from comment #1)
> > When installed or when the init script is run i2p does not create the
> > /var/lib/i2p directory it needs so configuration changes can be saved/log
> > files can be written.
> 
> Actually, it does create the /var/lib/i2p directory but you are right, it
> doesn't create /var/lib/i2p/.i2p. It's only the first time though.
> 
> I'm fixing it in the bump request PR on github
> https://github.com/gentoo/gentoo/pull/1756

Where are you getting the information that the directory is created? I've experienced the exact opposite, /var/lib/i2p is not created by default but once created /var/lib/i2p/.i2p IS created automatically but you must manually create /var/lib/i2p(with the proper permissions as well).

I went back through the process just now to double-check,

01. backed up my /var/lib/i2p to a temporary location
02. unmerged i2p
03. emerged i2p (/var/lib/i2p was not created)
04. started i2p via /etc/init.d/i2p start (/var/lib/i2p was not created)
05. stopped i2p via /etc/init.d/i2p stop (/var/lib/i2p was not created)
06. I then repeated steps 4 through 5 again but still the same results, /var/lib/i2p was not created/
07. So I have now manually created /var/lib/i2p with the proper permissions.
08. Now I start i2p via the init script and /var/lib/i2p/.i2p is created automatically
Comment 3 tharvik 2016-07-11 16:32:17 UTC
> > > When installed or when the init script is run i2p does not create the
> > > /var/lib/i2p directory it needs so configuration changes can be saved/log
> > > files can be written.
> > 
> > Actually, it does create the /var/lib/i2p directory but you are right, it
> > doesn't create /var/lib/i2p/.i2p. It's only the first time though.
> > 
> > I'm fixing it in the bump request PR on github
> > https://github.com/gentoo/gentoo/pull/1756
> 
> Where are you getting the information that the directory is created? I've
> experienced the exact opposite, /var/lib/i2p is not created by default but
> once created /var/lib/i2p/.i2p IS created automatically but you must
> manually create /var/lib/i2p(with the proper permissions as well).

From the enewuser in https://github.com/gentoo/gentoo/blob/master/net-p2p/i2p/i2p-0.9.24-r2.ebuild#L58
The `-m` flag (or long version `--create-home`) does create the /var/lib/i2p directory.

> I went back through the process just now to double-check,
> 
> 01. backed up my /var/lib/i2p to a temporary location
> 02. unmerged i2p
Not clean enough, you also have to remove the user with `userdel i2p`

> 03. emerged i2p (/var/lib/i2p was not created)
Now it should be created.

> 04. started i2p via /etc/init.d/i2p start (/var/lib/i2p was not created)
> 05. stopped i2p via /etc/init.d/i2p stop (/var/lib/i2p was not created)
> 06. I then repeated steps 4 through 5 again but still the same results,
> /var/lib/i2p was not created/
> 07. So I have now manually created /var/lib/i2p with the proper permissions.
> 08. Now I start i2p via the init script and /var/lib/i2p/.i2p is created
> automatically

Also, the fix in the current PR will still resolve this, as instead of doing a dodir of the config dir (which won't get installed because of the fact that it is empty, so yeah, that's a bug), we do a keepdir, which will force the dir to get installed.
Comment 4 YumeWizard 2016-07-11 17:27:21 UTC
(In reply to tharvik from comment #3)
> > > > When installed or when the init script is run i2p does not create the
> > > > /var/lib/i2p directory it needs so configuration changes can be saved/log
> > > > files can be written.
> > > 
> > > Actually, it does create the /var/lib/i2p directory but you are right, it
> > > doesn't create /var/lib/i2p/.i2p. It's only the first time though.
> > > 
> > > I'm fixing it in the bump request PR on github
> > > https://github.com/gentoo/gentoo/pull/1756
> > 
> > Where are you getting the information that the directory is created? I've
> > experienced the exact opposite, /var/lib/i2p is not created by default but
> > once created /var/lib/i2p/.i2p IS created automatically but you must
> > manually create /var/lib/i2p(with the proper permissions as well).
> 
> From the enewuser in
> https://github.com/gentoo/gentoo/blob/master/net-p2p/i2p/i2p-0.9.24-r2.
> ebuild#L58
> The `-m` flag (or long version `--create-home`) does create the /var/lib/i2p
> directory.
> 
> > I went back through the process just now to double-check,
> > 
> > 01. backed up my /var/lib/i2p to a temporary location
> > 02. unmerged i2p
> Not clean enough, you also have to remove the user with `userdel i2p`
> 
> > 03. emerged i2p (/var/lib/i2p was not created)
> Now it should be created.
> 
> > 04. started i2p via /etc/init.d/i2p start (/var/lib/i2p was not created)
> > 05. stopped i2p via /etc/init.d/i2p stop (/var/lib/i2p was not created)
> > 06. I then repeated steps 4 through 5 again but still the same results,
> > /var/lib/i2p was not created/
> > 07. So I have now manually created /var/lib/i2p with the proper permissions.
> > 08. Now I start i2p via the init script and /var/lib/i2p/.i2p is created
> > automatically
> 
> Also, the fix in the current PR will still resolve this, as instead of doing
> a dodir of the config dir (which won't get installed because of the fact
> that it is empty, so yeah, that's a bug), we do a keepdir, which will force
> the dir to get installed.

Ah, I understand now, though why would the i2p user be left behind after I've explicitly stated that I nolonger want the software on my system? Is there a flag in emerge to remove all traces of a program besides just removing the software which would make leaving something like this behind more understandable?
Comment 5 tharvik 2016-07-11 18:12:26 UTC
> Ah, I understand now, though why would the i2p user be left behind after
> I've explicitly stated that I nolonger want the software on my system?
This is an ongoing discussion in the community, I'm in favor of removing it but there isn't really a clean way to do it with current EAPI. Such as, we can't simply remove the user as it might be simply an update, also, as the uid is dynamic, one can imagine the situation where another user end up with the same uid and could access old i2p files.

> Is there a flag in emerge to remove all traces of a program besides just
> removing the software which would make leaving something like this behind
> more understandable?
Not that I know of, as every programme could create nearly any file; that make sense for servers application and daemon, but how to decide for a video processing program or such as, which only do transformation? That would also require to monitor every program to know which file was created by whom. And with SLOT, it is even harder.

I'm closing it now as I understood that you're issue is solved (if you still have some, feel free to write a line or drop me an email).