rpms/tor/F-9 netfilter-ipv4.h, NONE, 1.1 tor-0.2.0.30-geoippath.patch, NONE, 1.1 update-geoip, NONE, 1.1

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sun Jul 20 12:48:34 UTC 2008


Author: ensc

Update of /cvs/extras/rpms/tor/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14784

Added Files:
	netfilter-ipv4.h tor-0.2.0.30-geoippath.patch update-geoip 
Log Message:
initial checkin



--- NEW FILE netfilter-ipv4.h ---
#include <linux/types.h>
#include_next <linux/netfilter_ipv4.h>

tor-0.2.0.30-geoippath.patch:

--- NEW FILE tor-0.2.0.30-geoippath.patch ---
diff -up tor-0.2.0.30/src/or/config.c.~1~ tor-0.2.0.30/src/or/config.c
--- tor-0.2.0.30/src/or/config.c.~1~	2008-06-19 06:59:43.000000000 +0200
+++ tor-0.2.0.30/src/or/config.c	2008-07-20 13:23:38.000000000 +0200
@@ -202,7 +202,7 @@ static config_var_t _option_vars[] = {
   V(GeoIPFile,                   STRING,   "<default>"),
 #else
   V(GeoIPFile,                   STRING,
-    SHARE_DATADIR PATH_SEPARATOR "tor" PATH_SEPARATOR "geoip"),
+    "/var/lib/tor-data" PATH_SEPARATOR "tor" PATH_SEPARATOR "geoip"),
 #endif
   V(Group,                       STRING,   NULL),
   V(HardwareAccel,               BOOL,     "0"),


--- NEW FILE update-geoip ---
#! /bin/bash
# Copyright (C) 2008 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
#
# 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; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

### NOTE: this program is part of the Fedora 'tor' package. Hence, file
### bugreports at http://bugzilla.redhat.com, but *NOT* at upstream tor
### webpage/maillists.


URL=http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip
: ${DESTDIR=/var/lib/tor-data}

set -e
d=$(mktemp -d -t tor-geoip.XXXXXX)
trap "rm -rf $d" EXIT

cd $d
wget "$URL"
unzip "$(basename "$URL")"

date=$(stat -c '%Y' ip-to-country.csv)
date=$(date +"%Y%m%dT%H%M%S" -d "1970-01-01 00:00:00 UTC $date seconds")
fname=geoip-$date

test ! -e "$DESTDIR/$fname" || exit 0

cut -d, -f1-3 < ip-to-country.csv | sed 's/"//g' > "$fname"
rm -f "$DESTDIR/$fname"
cp -p "$fname" "$DESTDIR/$fname"
rm -f "$DESTDIR/geoip"
ln -s "$fname" "$DESTDIR/geoip"




More information about the fedora-extras-commits mailing list