Bug 200470 - security/i2p rc startup script is useless.
Summary: security/i2p rc startup script is useless.
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-26 18:48 UTC by sasamotikomi
Modified: 2018-12-25 07:32 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (nc)


Attachments
Makefile (543 bytes, patch)
2015-06-01 23:17 UTC, sasamotikomi
no flags Details | Diff
distinfo (408 bytes, patch)
2015-06-01 23:17 UTC, sasamotikomi
no flags Details | Diff
i2p.in (224 bytes, patch)
2015-06-01 23:18 UTC, sasamotikomi
no flags Details | Diff
GIDs.diff (217 bytes, patch)
2015-08-23 10:41 UTC, sasamotikomi
no flags Details | Diff
UIDs.diff (625 bytes, patch)
2015-08-23 10:42 UTC, sasamotikomi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sasamotikomi 2015-05-26 18:48:13 UTC
I2P can't running from root only from unprivileged user.
Comment 1 Carlo Strub freebsd_committer freebsd_triage 2015-05-29 19:44:27 UTC
That's fine and has nothing to do with the startup script. It is definitely possible to run a startup script for unpriviledged users. I'll look into this, unless you have any suggestion how to fix the startup script.
Comment 2 sasamotikomi 2015-05-30 08:17:49 UTC
(In reply to Carlo Strub from comment #1)
I think need: create new user + configuration script (run i2prouter install from ip2 user and replace %%TMP%% -> /tmp in configuration if already no exist)
same as in tor port  https://svnweb.freebsd.org/ports/head/security/tor/Makefile?view=markup
Comment 3 Carlo Strub freebsd_committer freebsd_triage 2015-05-31 21:23:10 UTC
Would you like to try sending in a patch for the RC script?
Comment 4 sasamotikomi 2015-06-01 17:28:09 UTC
(In reply to Carlo Strub from comment #3)
At first need fix installation only then rc script.
Comment 5 sasamotikomi 2015-06-01 23:17:09 UTC
Created attachment 157357 [details]
Makefile
Comment 6 sasamotikomi 2015-06-01 23:17:51 UTC
Created attachment 157358 [details]
distinfo
Comment 7 sasamotikomi 2015-06-01 23:18:41 UTC
Created attachment 157359 [details]
i2p.in
Comment 8 sasamotikomi 2015-08-23 10:25:14 UTC
Comment on attachment 157357 [details]
Makefile

--- Makefile    2014-11-30 15:58:10.000000000 +0300
+++ Makefileup  2015-06-01 21:10:48.000000000 +0300
@@ -2,7 +2,7 @@
 # $FreeBSD: head/security/i2p/Makefile 373664 2014-11-30 12:58:10Z cs $

 PORTNAME=      i2p
-PORTVERSION=   0.9.16
+PORTVERSION=   0.9.20
 CATEGORIES=    security java net-p2p
 MASTER_SITES=  SF/${PORTNAME:tl}/${PORTVERSION} \
                http://download.i2p2.no/releases/${PORTVERSION}/ \
@@ -33,7 +33,8 @@

 USES=          gettext tar:bzip2
 USE_RC_SUBR=   i2p
-
+GROUPS=         _i2p
+USERS=          _i2p
 USE_ANT=       yes
 USE_JAVA=      yes
 JAVA_BUILD=    jdk
Comment 9 sasamotikomi 2015-08-23 10:26:37 UTC
Comment on attachment 157358 [details]
distinfo

--- distinfo    2014-11-30 15:58:10.000000000 +0300
+++ distinfoup  2015-06-01 22:13:14.000000000 +0300
@@ -1,2 +1,2 @@
-SHA256 (i2psource_0.9.16.tar.bz2) = ebc319585b9c58127676243694151c45296a56abaf51a36ae5919be3fc7f544e
-SIZE (i2psource_0.9.16.tar.bz2) = 23214232
+SHA256 (i2psource_0.9.20.tar.bz2) = bcd900a9001bdda37ed70cdec78e9096ed370e44513aae5e29a02886d0babd33
+SIZE (i2psource_0.9.20.tar.bz2) = 24351844
Comment 10 sasamotikomi 2015-08-23 10:28:18 UTC
Comment on attachment 157359 [details]
i2p.in

--- i2p.in.orig 2015-07-29 19:37:50.000000000 +0300
+++ i2p.in      2015-07-29 19:38:05.000000000 +0300
@@ -12,7 +12,7 @@
 # Add the following lines to /etc/rc.conf to enable i2p:
 #
 # i2p_enable="YES"
-# i2p_user
+# Default user _i2p

 . /etc/rc.subr

@@ -83,6 +83,6 @@

 load_rc_config "${name}"
 : ${i2p_enable="NO"}
-: ${i2p_user=""}
+: ${i2p_user="_i2p"}

 run_rc_command "$1"
Comment 11 sasamotikomi 2015-08-23 10:41:35 UTC
Created attachment 160240 [details]
GIDs.diff
Comment 12 sasamotikomi 2015-08-23 10:42:36 UTC
Created attachment 160241 [details]
UIDs.diff
Comment 13 sasamotikomi 2015-08-23 11:05:38 UTC
(In reply to Carlo Strub from comment #1)
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON=  i2p libwrapper.so library binary only available for i386 
Better remove it and replaced by warning message, follow this  instruction router will be builded and launched via runplain.sh on architecture without wrapper support:
https://geti2p.net/en/misc/manual-wrapper
Comment 14 sasamotikomi 2015-08-23 11:11:42 UTC
Comment on attachment 157357 [details]
Makefile

--- Makefile    2014-11-30 15:58:10.000000000 +0300
+++ Makefileup  2015-06-01 21:10:48.000000000 +0300
@@ -2,7 +2,7 @@
 # $FreeBSD: head/security/i2p/Makefile 373664 2014-11-30 12:58:10Z cs $

 PORTNAME=      i2p
-PORTVERSION=   0.9.16
+PORTVERSION=   0.9.21
 CATEGORIES=    security java net-p2p
 MASTER_SITES=  SF/${PORTNAME:tl}/${PORTVERSION} \
                http://download.i2p2.no/releases/${PORTVERSION}/ \
@@ -33,7 +33,8 @@

 USES=          gettext tar:bzip2
 USE_RC_SUBR=   i2p
-
+GROUPS=         _i2p
+USERS=          _i2p
 USE_ANT=       yes
 USE_JAVA=      yes
 JAVA_BUILD=    jdk
Comment 15 sasamotikomi 2015-08-23 11:13:52 UTC
Comment on attachment 157358 [details]
distinfo

--- distinfo    2014-11-30 15:58:10.000000000 +0300
+++ distinfoup  2015-06-01 22:13:14.000000000 +0300
@@ -1,2 +1,2 @@
-SHA256 (i2psource_0.9.16.tar.bz2) = ebc319585b9c58127676243694151c45296a56abaf51a36ae5919be3fc7f544e
-SIZE (i2psource_0.9.16.tar.bz2) = 23214232
+SHA256 (i2psource_0.9.21.tar.bz2) = d6f8148b2a51afa236e1284152db140b9288c1e1365652c1f14c68ac0cedf1e3
+SIZE (i2psource_0.9.21.tar.bz2) = 24346269
Comment 16 Walter Schwarzenfeld 2018-02-28 18:36:18 UTC
Much time passes by. Is this still relevant? If so, please update the patch.
Comment 17 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-21 12:44:43 UTC
(In reply to w.schwarzenfeld from comment #16)
Inviting new maintainer to this bug.  Neel, if you think this is indeed
no longer relevant, can you close or leave a quick comment that we should close?
Comment 18 Tobias Kortkamp freebsd_committer freebsd_triage 2018-12-25 07:32:01 UTC
Closing since there has been no additional maintainer or submitter feedback
for 2 more months.