From 9230bc7c65cec68c66fa9c75751d6c6bd600e9fc Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 28 Apr 2014 11:34:53 -0400 Subject: Clean the contrib directory with torch and machete. We've accumulated a lot of cruft in this directory over the years: so much, that it passed the point of being so disorganized that we no longer browsed through it to see how bad it had gotten. This patch (based on changes by rl1987) tries to remove the most useless items, and split the others into reasonable directories. It creates a new scripts/ directory for maint and test scripts. This patch was generated with the script below. No other changes are made in this patch. ############# # new directories mkdir -p contrib/test-tools mkdir -p contrib/or-tools mkdir -p contrib/dirauth-tools mkdir -p contrib/operator-tools mkdir -p contrib/client-tools mkdir -p contrib/test-tools mkdir -p contrib/dist mkdir -p contrib/dist/suse mkdir -p contrib/win32build mkdir -p scripts/maint mkdir -p scripts/test ############ # Deleted -- nobody who wants this is going to be looking for it here any # longer. Also, nobody wants it. git rm contrib/auto-naming/README # Deleted: We no longer do polipo. git rm contrib/polipo/Makefile.mingw git rm contrib/polipo/README git rm contrib/polipo/polipo-mingw.nsi # We haven't even tried to run this for ages. It is a relic of a bygone era git rm contrib/mdd.py # contrib/dir-tools/directory-archive/ # Tools for running a directory archive. No longer used - deleting them. git rm contrib/directory-archive/crontab.sample git rm contrib/directory-archive/fetch-all git rm contrib/directory-archive/fetch-all-v3 git rm contrib/directory-archive/tar-them-up git rm contrib/directory-archive/fetch-all-functions git rm contrib/directory-archive/sort-into-month-folder # This appears to be related to very old windows packaging stuff. git rm contrib/bundle.nsi git rm contrib/package_nsis-weasel.sh git rm contrib/package_nsis.sh git rm contrib/netinst.nsi git rm contrib/torinst32.ico git rm contrib/xenobite.ico # This should not be needed for cross-compilation any more, should it? git rm contrib/cross.sh # I don't think anyone ever used this. git rm contrib/make-signature.sh # These are attempts to send tor controller commands from the command-line. # They don't support modern authentication. git rm contrib/tor-ctrl.sh # this is for fetching about a tor server from a dirauth. But it # doesn't authenticate the dirauth: yuck. git rm contrib/sd # wow, such unused, very perl4. git rm contrib/tor-stress ####### contrib/dirauth-tools/ # Tools for running a directory authority git mv contrib/add-tor contrib/dirauth-tools/ git mv contrib/nagios-check-tor-authority-cert contrib/dirauth-tools/ ####### # contrib/or-tools/ # Tools for examining relays git mv contrib/check-tor contrib/or-tools/check-tor git mv contrib/checksocks.pl contrib/or-tools/checksocks.pl git mv contrib/exitlist contrib/or-tools/exitlist ####### # contrib/operator-tools # Tools for running a relay. git mv contrib/linux-tor-prio.sh contrib/operator-tools/linux-tor-prio.sh git mv contrib/tor-exit-notice.html contrib/operator-tools/tor-exit-notice.html git mv contrib/tor.logrotate.in contrib/operator-tools/ ###### # contrib/dist git mv contrib/rc.subr contrib/dist/ git mv contrib/tor.sh.in contrib/dist/ git mv contrib/torctl.in contrib/dist/ git mv contrib/suse/* contrib/dist/suse/ ###### # client-tools git mv contrib/torify contrib/client-tools/torify git mv contrib/tor-resolve.py contrib/client-tools/ ###### # win32build git mv contrib/package_nsis-mingw.sh contrib/win32build/ git mv contrib/tor.nsi.in contrib/win32build/ # Erinn didn't ask for this... git mv contrib/tor-mingw.nsi.in contrib/win32build/ git mv contrib/tor.ico contrib/win32build/ ###### # scripts/test git mv contrib/cov-blame scripts/test/cov-blame git mv contrib/cov-diff scripts/test/cov-diff git mv contrib/coverage scripts/test/coverage git mv contrib/scan-build.sh scripts/test/ ######## scripts/maint # Maintainance scripts # # These are scripts for developers to use when hacking on Tor. They mostly # look at the Tor source in one way or another. git mv contrib/findMergedChanges.pl scripts/maint/findMergedChanges.pl git mv contrib/checkOptionDocs.pl scripts/maint/checkOptionDocs.pl git mv contrib/checkSpace.pl scripts/maint/checkSpace.pl git mv contrib/redox.py scripts/maint/redox.py git mv contrib/updateVersions.pl scripts/maint/updateVersions.pl git mv contrib/checkLogs.pl scripts/maint/checkLogs.pl git mv contrib/format_changelog.py scripts/maint/ --- contrib/cross.sh | 195 ------------------------------------------------------- 1 file changed, 195 deletions(-) delete mode 100755 contrib/cross.sh (limited to 'contrib/cross.sh') diff --git a/contrib/cross.sh b/contrib/cross.sh deleted file mode 100755 index a6085a400..000000000 --- a/contrib/cross.sh +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash -# Copyright 2006 Michael Mohr with modifications by Roger Dingledine -# See LICENSE for licensing information. - -####################################################################### -# Tor-cross: a tool to help cross-compile Tor -# -# The purpose of a cross-compiler is to produce an executable for -# one system (CPU) on another. This is useful, for example, when -# the target system does not have a native compiler available. -# You might, for example, wish to cross-compile a program on your -# host (the computer you're working on now) for a target such as -# a router or handheld computer. -# -# A number of environment variables must be set in order for this -# script to work: -# $PREFIX, $CROSSPATH, $HOST_TRIPLET, $HOST, -# and (optionally) $BUILD -# Please run the script for a description of each one. If automated -# builds are desired, the above variables can be exported at the top -# of this script. -# -# Recent releases of Tor include test programs in configure. Normally -# this is a good thing, since it catches a number of problems. -# However, this also presents a problem when cross compiling, since -# you can't run binary images for the target system on the host. -# -# Tor-cross assumes that you know what you're doing and removes a -# number of checks known to cause problems with this process. -# Note that this does not guarantee that the program will run or -# even compile; it simply allows configure to generate the Makefiles. -# -# Stripping the binaries should almost always be done for an -# embedded environment where space is at an exacting premium. -# However, the default is NOT to strip them since they are useful for -# debugging. If you do not plan to do any debugging and you -# don't care about the debugging symbols, set $STRIP to "yes" before -# running this script. -# -# Tor-cross was written by Michael Mohr. He can be contacted at -# m(dot)mohr(at)laposte(dot)net. Comments are appreciated, but -# flames go to /dev/null. -# -# The target with which this script is tested is little-endian -# MIPS Linux, built on an Athlon-based Linux desktop. -# -####################################################################### - -# disable the platform-specific tests in configure -export CROSS_COMPILE=yes - -# for error conditions -EXITVAL=0 - -if [ ! -f autogen.sh ] -then - echo "Please run this script from the root of the Tor distribution" - exit -1 -fi - -if [ ! -f configure ] -then - if [ -z $GEN_BUILD ] - then - echo "To automatically generate the build environment, set \$GEN_BUILD" - echo "to yes; for example," - echo " export GEN_BUILD=yes" - EXITVAL=-1 - fi -fi - -if [ -z $PREFIX ] -then - echo "You must define \$PREFIX since you are cross-compiling." - echo "Select a non-system location (i.e. /tmp/tor-cross):" - echo " export PREFIX=/tmp/tor-cross" - EXITVAL=-1 -fi - -if [ -z $CROSSPATH ] -then - echo "You must define the location of your cross-compiler's" - echo "directory using \$CROSSPATH; for example," - echo " export CROSSPATH=/opt/cross/staging_dir_mipsel/bin" - EXITVAL=-1 -fi - -if [ -z $HOST_TRIPLET ] -then - echo "You must define \$HOST_TRIPLET to continue. For example," - echo "if you normally cross-compile applications using" - echo "mipsel-linux-uclibc-gcc, you would set \$HOST_TRIPLET like so:" - echo " export HOST_TRIPLET=mipsel-linux-uclibc-" - EXITVAL=-1 -fi - -if [ -z $HOST ] -then - echo "You must specify a target processor with \$HOST; for example:" - echo " export HOST=mipsel-unknown-elf" - EXITVAL=-1 -fi - -if [ -z $BUILD ] -then - echo "You should specify the host machine's type with \$BUILD; for example:" - echo " export BUILD=i686-pc-linux-gnu" - echo "If you wish to let configure autodetect the host, set \$BUILD to 'auto':" - echo " export BUILD=auto" - EXITVAL=-1 -fi - -if [ ! -x $CROSSPATH/$HOST_TRIPLETgcc ] -then - echo "The specified toolchain does not contain an executable C compiler." - echo "Please double-check your settings and rerun cross.sh." - EXITVAL=-1 -fi - -if [ $EXITVAL -ne 0 ] -then - echo "Remember, you can hard-code these values in cross.sh if needed." - exit $EXITVAL -fi - -if [ ! -z "$GEN_BUILD" -a ! -f configure ] -then - export NOCONF=yes - ./autogen.sh -fi - -# clean up any existing object files -if [ -f src/or/tor ] -then - make clean -fi - -# Set up the build environment and try to run configure -export PATH=$PATH:$CROSSPATH -export RANLIB=${HOST_TRIPLET}ranlib -export CC=${HOST_TRIPLET}gcc - -if [ $BUILD == "auto" ] -then - ./configure \ - --enable-debug \ - --enable-eventdns \ - --prefix=$PREFIX \ - --host=$HOST -else - ./configure \ - --enable-debug \ - --enable-eventdns \ - --prefix=$PREFIX \ - --host=$HOST \ - --build=$BUILD -fi - -# has a problem occurred? -if [ $? -ne 0 ] -then - echo "" - echo "A problem has been detected with configure." - echo "Please check the output above and rerun cross.sh" - echo "" - exit -1 -fi - -# Now we're cookin' - -make - -# has a problem occurred? -if [ $? -ne 0 ] -then - echo "" - echo "A problem has been detected with make." - echo "Please check the output above and rerun make." - echo "" - exit -1 -fi - -# if $STRIP has length (i.e. STRIP=yes), strip the binaries -if [ ! -z $STRIP ] -then -${HOST_TRIPLET}strip \ - src/or/tor \ - src/test/test \ - src/tools/tor-resolve -fi - -echo "" -echo "Tor should be compiled at this point. Now run 'make install' to" -echo "install to $PREFIX" -echo "" -- cgit v1.2.3