Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (2f834d3c0e9a3219d37f342ab1c86431a5580645)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (2f834d3c0e9a3219d37f342ab1c86431a5580645)
  • Date: Sat, 26 Mar 2011 17:14:24 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

net/tor/BUILD | 10 +++++++++-
net/tor/CONFIGURE | 3 +--
net/tor/HISTORY | 8 ++++++++
net/tor/INSTALL | 12 ++++++++++++
net/tor/PRE_BUILD | 3 ---
net/tor/init.d/tor | 11 +++++++++++
net/tor/init.d/tor.conf | 3 +++
7 files changed, 44 insertions(+), 6 deletions(-)

New commits:
commit 2f834d3c0e9a3219d37f342ab1c86431a5580645
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

tor: added proper init system

diff --git a/net/tor/BUILD b/net/tor/BUILD
index 4bccc91..3115ab8 100755
--- a/net/tor/BUILD
+++ b/net/tor/BUILD
@@ -1,2 +1,10 @@
-OPTS="$OPTS $TOR_OPTS" &&
+if [[ $TOR_USERGROUP == tor ]]; then
+ create_account tor
+fi &&
+
+OPTS="--with-tor-user=$TOR_USERGROUP \
+ --with-tor-group=$TOR_USERGROUP \
+ $TOR_OPTS \
+ $OPTS" &&
+
default_build
diff --git a/net/tor/CONFIGURE b/net/tor/CONFIGURE
index 270fe96..658fffc 100755
--- a/net/tor/CONFIGURE
+++ b/net/tor/CONFIGURE
@@ -5,6 +5,5 @@ config_query_option TOR_OPTS 'Enable code for directories to
collect per-country
config_query_option TOR_OPTS 'Enable iPhone support?' n \
'--enable-iphone' \
'--disable-iphone' &&
-config_query_string TOR_USERGROUP 'Which user/group to use for tor?' 'tor' &&

-TOR_OPTS="$TOR_OPTS --with-tor-user=$TOR_USERGROUP
--with-tor-group=$TOR_USERGROUP"
+config_query_string TOR_USERGROUP 'Which user/group to use for tor?' 'tor'
diff --git a/net/tor/HISTORY b/net/tor/HISTORY
index 9a84320..3fc1a58 100644
--- a/net/tor/HISTORY
+++ b/net/tor/HISTORY
@@ -1,3 +1,11 @@
+2011-03-27 Vlad Glagolev <stealth AT sourcemage.org>
+ * BUILD: moved system account creation and TOR_USERGROUP here; create
+ built-in system account only if the default one had been selected
+ * CONFIGURE: cleaned up
+ * PRE_BUILD: removed
+ * INSTALL: added, to install needed directories, init script and
config
+ * init.d/tor{,.conf}: added init system
+
2011-03-19 George Sherwood <gsherwood AT sourcemage.org>
* DETAILS: Updated stable to 0.2.1.30. SECURITY_PATCH++
Updated devel to 0.2.2.23-alpha
diff --git a/net/tor/INSTALL b/net/tor/INSTALL
new file mode 100755
index 0000000..84b3660
--- /dev/null
+++ b/net/tor/INSTALL
@@ -0,0 +1,12 @@
+default_install &&
+
+install -vm 755 -d -o $TOR_USERGROUP -g $TOR_USERGROUP \
+ "$INSTALL_ROOT/var/run/tor" &&
+
+install -vm 700 -d -o $TOR_USERGROUP -g $TOR_USERGROUP \
+ "$INSTALL_ROOT/var/lib/tor" &&
+
+if [[ $INIT_INSTALLED ]]; then
+ install_config_file "$SPELL_DIRECTORY/init.d/tor.conf" \
+ "$INSTALL_ROOT/etc/sysconfig/tor"
+fi
diff --git a/net/tor/PRE_BUILD b/net/tor/PRE_BUILD
deleted file mode 100755
index 5085296..0000000
--- a/net/tor/PRE_BUILD
+++ /dev/null
@@ -1,3 +0,0 @@
-default_pre_build &&
-cd ${SOURCE_DIRECTORY} &&
-create_account tor
diff --git a/net/tor/init.d/tor b/net/tor/init.d/tor
new file mode 100755
index 0000000..bfb543d
--- /dev/null
+++ b/net/tor/init.d/tor
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+. /etc/sysconfig/tor
+
+PROGRAM=/usr/bin/tor
+PIDFILE=/var/run/tor/tor.pid
+ARGS="--runasdaemon 1 --pidfile $PIDFILE $TOR_ARGS"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/net/tor/init.d/tor.conf b/net/tor/init.d/tor.conf
new file mode 100644
index 0000000..06ea1e5
--- /dev/null
+++ b/net/tor/init.d/tor.conf
@@ -0,0 +1,3 @@
+# For the arguments and description see tor(1)
+
+TOR_ARGS="--quiet --user tor --datadirectory /var/lib/tor"



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (2f834d3c0e9a3219d37f342ab1c86431a5580645), Vlad Glagolev, 03/26/2011

Archive powered by MHonArc 2.6.24.

Top of Page