From b9cb93e52585f73c2f45e23f52f6fc78e28ff192 Mon Sep 17 00:00:00 2001 From: Benjamin Schieder Date: Sat, 24 Dec 2005 15:20:03 +0000 Subject: [PATCH] Benjamin Schieder: add packages tor and privoxy register user and group 78 (privoxy) and 79 (tor) also create $HOME for tor user [2005121514114431180] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6895 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/REGISTER | 8 ++- .../privoxy/donotusesuppliedinitscript.patch | 41 +++++++++++++++ package/blindcoder/privoxy/postsysfiles.in | 4 ++ package/blindcoder/privoxy/privoxy.conf | 27 ++++++++++ package/blindcoder/privoxy/privoxy.desc | 45 ++++++++++++++++ package/blindcoder/privoxy/privoxy.init | 41 +++++++++++++++ package/blindcoder/tor/postsysfiles.in | 5 ++ package/blindcoder/tor/tor.conf | 29 +++++++++++ package/blindcoder/tor/tor.desc | 51 +++++++++++++++++++ package/blindcoder/tor/tor.init | 39 ++++++++++++++ 10 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 package/blindcoder/privoxy/donotusesuppliedinitscript.patch create mode 100644 package/blindcoder/privoxy/postsysfiles.in create mode 100644 package/blindcoder/privoxy/privoxy.conf create mode 100644 package/blindcoder/privoxy/privoxy.desc create mode 100644 package/blindcoder/privoxy/privoxy.init create mode 100644 package/blindcoder/tor/postsysfiles.in create mode 100644 package/blindcoder/tor/tor.conf create mode 100644 package/blindcoder/tor/tor.desc create mode 100644 package/blindcoder/tor/tor.init diff --git a/Documentation/Developers/REGISTER b/Documentation/Developers/REGISTER index 124018c1f..597041bde 100644 --- a/Documentation/Developers/REGISTER +++ b/Documentation/Developers/REGISTER @@ -86,10 +86,16 @@ Reserved User and Group IDs: - sfs user: - sfs group: sfs 71 sfs 71 + - privoxy user: - privoxy group: + privoxy 78 privoxy 78 + + - tor user: - tor group: + tor 79 tor 79 + - httpd user: - httpd group: http 80 http 80 - Free IDs: 28-37,45-52,55,57-65,67-69,72-79 + Free IDs: 28-37,45-52,55,57-65,67-69,72-77 Filedescriptor Numbers diff --git a/package/blindcoder/privoxy/donotusesuppliedinitscript.patch b/package/blindcoder/privoxy/donotusesuppliedinitscript.patch new file mode 100644 index 000000000..3e9f1aa6e --- /dev/null +++ b/package/blindcoder/privoxy/donotusesuppliedinitscript.patch @@ -0,0 +1,41 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/blindcoder/privoxy/donotusesuppliedinitscript.patch +# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +Benjamin Schieder: + we ship our own init script, thank you very much +--- privoxy-3.0.3-stable/GNUmakefile.in 2004-02-17 15:13:27.000000000 +0100 ++++ privoxy-3.0.3-stable-patch/GNUmakefile.in 2005-12-14 20:02:40.000000000 +0100 +@@ -1205,7 +1205,7 @@ install: CONF_DEST LOG_DEST PID_DEST che + $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\ + fi ;\ + $(CHMOD) $(RWD_MODE) $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || exit 1 ;\ +- if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \ ++ if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ] && [ 1 = 0 ] ; then \ + if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \ + $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \ + $(SED) 's+%SBIN_DEST%+$(SBIN_DEST)+' | \ +@@ -1316,7 +1316,7 @@ uninstall: CONF_DEST LOG_DEST PID_DEST c + fi + + @# init scripts and logrotate +- @if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \ ++ @if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ] && [ 1 = 0 ]; then \ + $(ECHO) Removing $(PROGRAM) init script ;\ + if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \ + $(RM) /etc/rc.d/rc.privoxy ;\ diff --git a/package/blindcoder/privoxy/postsysfiles.in b/package/blindcoder/privoxy/postsysfiles.in new file mode 100644 index 000000000..f090b04e4 --- /dev/null +++ b/package/blindcoder/privoxy/postsysfiles.in @@ -0,0 +1,4 @@ + +safe_groupadd privoxy 78 +safe_useradd privoxy 78 78 "Privoxy" /var/empty /bin/false "*" + diff --git a/package/blindcoder/privoxy/privoxy.conf b/package/blindcoder/privoxy/privoxy.conf new file mode 100644 index 000000000..ef4903677 --- /dev/null +++ b/package/blindcoder/privoxy/privoxy.conf @@ -0,0 +1,27 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/blindcoder/privoxy/privoxy.conf +# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +preconf="autoheader ; autoconf" +sysconfdir=/etc/$xpkg +var_append makeopt " " "STRIP=-s" +var_append makeinstopt " " "STRIP=-s" +postmake="install_init privoxy ${confdir}/privoxy.init" diff --git a/package/blindcoder/privoxy/privoxy.desc b/package/blindcoder/privoxy/privoxy.desc new file mode 100644 index 000000000..6b332fd7c --- /dev/null +++ b/package/blindcoder/privoxy/privoxy.desc @@ -0,0 +1,45 @@ + +[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- +[COPY] +[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. +[COPY] Please add additional copyright information _after_ the line containing +[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +[COPY] +[COPY] ROCK Linux: rock-src/package/blindcoder/privoxy/privoxy.desc +[COPY] ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +[COPY] +[COPY] This program is free software; you can redistribute it and/or modify +[COPY] it under the terms of the GNU General Public License as published by +[COPY] the Free Software Foundation; either version 2 of the License, or +[COPY] (at your option) any later version. A copy of the GNU General Public +[COPY] License can be found at Documentation/COPYING. +[COPY] +[COPY] Many people helped and are helping developing ROCK Linux. Please +[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM +[COPY] file for details. +[COPY] +[COPY] --- ROCK-COPYRIGHT-NOTE-END --- + +[I] A Web proxy with advanced filtering capabilities. + +[T] Privoxy is a Web proxy based on Internet Junkbuster with advanced filtering +[T] capabilities for protecting privacy, filtering Web page content, managing +[T] cookies, controlling access, and removing ads, banners, pop-ups, and other +[T] obnoxious Internet junk. Privoxy has a very flexible configuration and can +[T] be customized to suit individual needs and tastes. Privoxy is useful for +[T] both stand-alone systems and multi-user networks. + +[U] http://www.privoxy.org/ + +[A] Privoxy Developers +[M] Benjamin Schieder + +[C] extra/network + +[L] GPL +[S] Stable +[V] 3.0.3-2 +[P] X -----5---9 800.000 + +[D] 1030403159 privoxy-3.0.3-2-stable.src.tar.gz http://dl.sourceforge.net/sourceforge/ijbswa/ diff --git a/package/blindcoder/privoxy/privoxy.init b/package/blindcoder/privoxy/privoxy.init new file mode 100644 index 000000000..ef60e9edd --- /dev/null +++ b/package/blindcoder/privoxy/privoxy.init @@ -0,0 +1,41 @@ +#!/bin/sh +# +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/blindcoder/privoxy/privoxy.init +# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- +# +# Desc: privoxy Proxy Daemon +# Runlevel: 99 rcX +# + +#Usage: privoxy [--help] [--version] [--no-daemon] [--pidfile pidfile] [--user user[.group]] [configfile] + +main_begin + + block_begin(start, `Starting Privoxy Daemon') + check(`D_prefix/sbin/privoxy --pidfile /var/run/privoxy.pid --user privoxy.privoxy D_sysconfdir/config') + block_end + + block_begin(stop, `Stopping Privoxy Daemon') + check(`kill -15 $( cat /var/run/privoxy.pid )') + block_end + +main_end diff --git a/package/blindcoder/tor/postsysfiles.in b/package/blindcoder/tor/postsysfiles.in new file mode 100644 index 000000000..5c929e82a --- /dev/null +++ b/package/blindcoder/tor/postsysfiles.in @@ -0,0 +1,5 @@ + +safe_groupadd tor 79 +safe_useradd tor 79 79 "tor" /var/lib/tor /bin/sh "*" +# sorry, tor sucks >_< + diff --git a/package/blindcoder/tor/tor.conf b/package/blindcoder/tor/tor.conf new file mode 100644 index 000000000..dea327951 --- /dev/null +++ b/package/blindcoder/tor/tor.conf @@ -0,0 +1,29 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/blindcoder/tor/tor.conf +# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +tor_postmake() { + install_init tor ${confdir}/tor.init + mkdir ${root}/var/lib/tor + chown 79:79 ${root}/var/lib/tor +} + +postmake="tor_postmake" diff --git a/package/blindcoder/tor/tor.desc b/package/blindcoder/tor/tor.desc new file mode 100644 index 000000000..84b40e6d2 --- /dev/null +++ b/package/blindcoder/tor/tor.desc @@ -0,0 +1,51 @@ + +[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- +[COPY] +[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. +[COPY] Please add additional copyright information _after_ the line containing +[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +[COPY] +[COPY] ROCK Linux: rock-src/package/blindcoder/tor/tor.desc +[COPY] ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +[COPY] +[COPY] This program is free software; you can redistribute it and/or modify +[COPY] it under the terms of the GNU General Public License as published by +[COPY] the Free Software Foundation; either version 2 of the License, or +[COPY] (at your option) any later version. A copy of the GNU General Public +[COPY] License can be found at Documentation/COPYING. +[COPY] +[COPY] Many people helped and are helping developing ROCK Linux. Please +[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM +[COPY] file for details. +[COPY] +[COPY] --- ROCK-COPYRIGHT-NOTE-END --- + +[I] An anonymous Internet communication system. + +[T] Tor is a network of virtual tunnels that allows people and +[T] groups to improve their privacy and security on the Internet. +[T] It also enables software developers to create new +[T] communication tools with built-in privacy features. It +[T] provides the foundation for a range of applications that allow +[T] organizations and individuals to share information over +[T] public networks without compromising their privacy. +[T] Individuals can use it to keep remote Websites from tracking +[T] them and their family members. They can also use it to +[T] connect to resources such as news sites or instant +[T] messaging services that are blocked by their local Internet +[T] service providers (ISPs). + +[U] http://tor.eff.org/ + +[A] Roger Dingledine +[M] Benjamin Schieder + +[C] extra/network + +[L] BSD +[S] Beta +[V] 0.1.0.15 +[P] X -----5---9 800.000 + +[D] 4252872505 tor-0.1.0.15.tar.gz http://tor.eff.org/dist/ diff --git a/package/blindcoder/tor/tor.init b/package/blindcoder/tor/tor.init new file mode 100644 index 000000000..3e4634337 --- /dev/null +++ b/package/blindcoder/tor/tor.init @@ -0,0 +1,39 @@ +#!/bin/sh +# +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/blindcoder/tor/tor.init +# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- +# +# Desc: The Onion Router (tor) +# Runlevel: 99 rcX +# + +main_begin + + block_begin(start, `Starting the onion router') + check(`su - tor -c "D_prefix/bin/tor PIDFile ~tor/tor.pid RunAsDaemon 1"') + block_end + + block_begin(stop, `Stopping the onion router') + check(`kill -15 $( cat ~tor/tor.pid )') + block_end + +main_end