Skip to content
Browse files

+ net/arm

  • Loading branch information...
1 parent d6ab33b commit e24168ab5a4ac4ebdd70a5f4722099e85bf1d2e8 @pstumpf pstumpf committed Dec 27, 2011
View
41 net/arm/Makefile
@@ -0,0 +1,41 @@
+# $OpenBSD$
+
+COMMENT = terminal status monitor for Tor
+
+DISTNAME = arm-1.4.4.1
+
+CATEGORIES = net
+
+HOMEPAGE = http://www.atagar.com/arm/
+
+MAINTAINER = Pascal Stumpf <Pascal.Stumpf@cubes.de>
+
+# GPLv3
+PERMIT_PACKAGE_CDROM = Yes
+PERMIT_PACKAGE_FTP = Yes
+PERMIT_DISTFILES_CDROM =Yes
+PERMIT_DISTFILES_FTP = Yes
+
+MASTER_SITES = http://archive.torproject.org/arm/
+EXTRACT_SUFX = .tar.bz2
+
+MODULES = lang/python
+RUN_DEPENDS = net/tor \
+ sysutils/lsof
+
+NO_REGRESS = Yes
+
+WRKDIST = ${WRKDIR}/arm
+
+MODPY_ADJ_FILES = src/starter.py src/test.py \
+ src/resources/torrcOverride/override.py
+.for i in ScanSupport.py TorCtl.py StatsSupport.py PathSupport.py \
+ GeoIPSupport.py SQLSupport.py TorUtil.py
+MODPY_ADJ_FILES += src/TorCtl/${i}
+.endfor
+
+pre-configure:
+ ${SUBST_CMD} ${WRKSRC}/setup.py ${WRKSRC}/arm ${WRKSRC}/install \
+ ${WRKSRC}/src/resources/arm.1
+
+.include <bsd.port.mk>
View
1 net/arm/TODO
@@ -0,0 +1 @@
+- very flaky connection to ORPort
View
5 net/arm/distinfo
@@ -0,0 +1,5 @@
+MD5 (arm-1.4.4.1.tar.bz2) = o7uT99dYm7xUybLU4k2Hiw==
+RMD160 (arm-1.4.4.1.tar.bz2) = KbngrVk1DJkaJbIrzJI0jRSYV1w=
+SHA1 (arm-1.4.4.1.tar.bz2) = OJzmKBYQIqYB3vom8tWEiqQwTNM=
+SHA256 (arm-1.4.4.1.tar.bz2) = vfQ0LWHQ+KY5Wl1+4uFHGl25MnxZ183IkxURYEWjq/g=
+SIZE (arm-1.4.4.1.tar.bz2) = 303468
View
21 net/arm/patches/patch-arm
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- arm.orig Thu Sep 29 17:46:08 2011
++++ arm Fri Oct 21 13:57:38 2011
+@@ -1,13 +1,13 @@
+ #!/bin/sh
+-if [ "$0" = /usr/bin/arm ]; then
+- arm_base=/usr/share/arm/
++if [ "$0" = ${PREFIX}/bin/arm ]; then
++ arm_base=${PREFIX}/share/arm/
+ else
+ arm_base=$( dirname "$0" )/src/
+ fi
+
+-python "${arm_base}prereq.py" $*
++python${MODPY_VERSION} "${arm_base}prereq.py" $*
+
+ if [ $? = 0 ]; then
+- exec python -W ignore::DeprecationWarning "${arm_base}starter.py" $*
++ exec python${MODPY_VERSION} -W ignore::DeprecationWarning "${arm_base}starter.py" $*
+ fi
+
View
12 net/arm/patches/patch-install
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- install.orig Fri Oct 21 13:11:59 2011
++++ install Fri Oct 21 13:12:11 2011
+@@ -6,7 +6,7 @@ if [ $? = 0 ]; then
+
+ # provide notice if we installed successfully
+ if [ $? = 0 ]; then
+- echo "installed to /usr/share/arm"
++ echo "installed to ${PREFIX}/share/arm"
+ fi
+
+ # cleans up the automatically built temporary files
View
92 net/arm/patches/patch-setup_py
@@ -0,0 +1,92 @@
+$OpenBSD$
+--- setup.py.orig Thu Sep 29 17:46:08 2011
++++ setup.py Fri Oct 21 13:32:56 2011
+@@ -35,7 +35,7 @@ for arg in sys.argv:
+ isDebInstall = True
+ break
+
+-docPath = "/usr/share/doc/%s" % ("tor-arm" if isDebInstall else "arm")
++docPath = "${PREFIX}/share/doc/%s" % ("tor-arm" if isDebInstall else "arm")
+
+ # Allow the docPath to be overridden via a '--docPath' argument. This is to
+ # support custom documentation locations on Gentoo, as discussed in:
+@@ -54,44 +54,17 @@ try:
+ sys.exit(1)
+ except ValueError: pass # --docPath flag not found
+
+-# Provides the configuration option to install to "/usr/share" rather than as a
++# Provides the configuration option to install to "${PREFIX}/share" rather than as a
+ # python module. Alternatives are to either provide this as an input argument
+ # (not an option for deb/rpm builds) or add a setup.cfg with:
+ # [install]
+-# install-purelib=/usr/share
++# install-purelib=${PREFIX}/share
+ # which would mean a bit more unnecessary clutter.
+
+-manFilename = "src/resoureces/arm.1"
++manFilename = "src/resources/arm.1"
+ if "install" in sys.argv:
+- sys.argv += ["--install-purelib", "/usr/share"]
++ sys.argv += ["--install-purelib", "${PREFIX}/share"]
+
+- # Compresses the man page. This is a temporary file that we'll install. If
+- # something goes wrong then we'll print the issue and use the uncompressed man
+- # page instead.
+-
+- try:
+- manInputFile = open('src/resources/arm.1', 'r')
+- manContents = manInputFile.read()
+- manInputFile.close()
+-
+- # temporary destination for the man page guarenteed to be unoccupied (to
+- # avoid conflicting with files that are already there)
+- tmpFilename = tempfile.mktemp("/arm.1.gz")
+-
+- # make dir if the path doesn't already exist
+- baseDir = os.path.dirname(tmpFilename)
+- if not os.path.exists(baseDir): os.makedirs(baseDir)
+-
+- manOutputFile = gzip.open(tmpFilename, 'wb')
+- manOutputFile.write(manContents)
+- manOutputFile.close()
+-
+- # places in tmp rather than a relative path to avoid having this copy appear
+- # in the deb and rpm builds
+- manFilename = tmpFilename
+- except IOError, exc:
+- print "Unable to compress man page: %s" % exc
+-
+ # When installing we include a bundled copy of TorCtl. However, when creating
+ # a deb we have a dependency on the python-torctl package instead:
+ # http://packages.debian.org/unstable/main/python-torctl
+@@ -108,23 +81,23 @@ setup(name='arm',
+ url='http://www.atagar.com/arm/',
+ packages=installPackages,
+ package_dir={'arm': 'src'},
+- data_files=[("/usr/bin", ["arm"]),
+- ("/usr/share/man/man1", [manFilename]),
++ data_files=[("${PREFIX}/bin", ["arm"]),
++ ("${PREFIX}/man/man1", [manFilename]),
+ (docPath, ["armrc.sample"]),
+- ("/usr/share/arm/gui", ["src/gui/arm.xml"]),
+- ("/usr/share/arm", ["src/settings.cfg", "src/uninstall"])] +
+- getResources("/usr/share/arm", "resources"),
++ ("${PREFIX}/share/arm/gui", ["src/gui/arm.xml"]),
++ ("${PREFIX}/share/arm", ["src/settings.cfg", "src/uninstall"])] +
++ getResources("${PREFIX}/share/arm", "resources"),
+ )
+
+ # Cleans up the temporary compressed man page.
+-if manFilename != 'src/resoureces/arm.1' and os.path.isfile(manFilename):
++if manFilename != 'src/resources/arm.1' and os.path.isfile(manFilename):
+ if "-q" not in sys.argv: print "Removing %s" % manFilename
+ os.remove(manFilename)
+
+ # Removes the egg_info file. Apparently it is not optional during setup
+ # (hardcoded in distutils/command/install.py), nor are there any arguments to
+ # bypass its creation. The deb build removes this as part of its rules script.
+-eggPath = '/usr/share/arm-%s.egg-info' % VERSION
++eggPath = '${PREFIX}/share/arm-%s.egg-info' % VERSION
+
+ if not isDebInstall and os.path.isfile(eggPath):
+ if "-q" not in sys.argv: print "Removing %s" % eggPath
View
12 net/arm/patches/patch-src_resources_arm_1
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/resources/arm.1.orig Fri Oct 21 13:29:00 2011
++++ src/resources/arm.1 Fri Oct 21 13:29:21 2011
+@@ -66,7 +66,7 @@ provides usage information
+ Your personal arm configuration file
+
+ .TP
+-\fB/usr/share/doc/arm/armrc.sample\fR
++\fB${PREFIX}/share/doc/arm/armrc.sample\fR
+ Sample armrc configuration file that documents all options
+
+ .SH AUTHOR
View
22 net/arm/patches/patch-src_util_connections_py
@@ -0,0 +1,22 @@
+$OpenBSD$
+upstream git b9446bdbb6df24fb0f042852a42e4d548c993263
+--- src/util/connections.py.orig Thu Sep 29 17:46:08 2011
++++ src/util/connections.py Fri Oct 21 16:07:23 2011
+@@ -203,7 +203,7 @@ def getResolverCommand(resolutionCmd, processName, pro
+ if resolutionCmd == Resolver.PROC: return ""
+ elif resolutionCmd == Resolver.NETSTAT: return RUN_NETSTAT % (processPid, processName)
+ elif resolutionCmd == Resolver.SS: return RUN_SS % (processName, processPid)
+- elif resolutionCmd == Resolver.LSOF: return RUN_LSOF % (processName, processPid)
++ elif resolutionCmd == Resolver.LSOF: return RUN_LSOF % ("tor", processPid)
+ elif resolutionCmd == Resolver.SOCKSTAT: return RUN_SOCKSTAT % (processName, processPid)
+ elif resolutionCmd == Resolver.BSD_SOCKSTAT: return RUN_BSD_SOCKSTAT % (processName, processPid)
+ elif resolutionCmd == Resolver.BSD_PROCSTAT: return RUN_BSD_PROCSTAT % processPid
+@@ -337,7 +337,7 @@ def getSystemResolvers(osType = None):
+
+ if osType == "FreeBSD":
+ resolvers = [Resolver.BSD_SOCKSTAT, Resolver.BSD_PROCSTAT, Resolver.LSOF]
+- elif osType == "Darwin":
++ elif osType in ("OpenBSD", "Darwin"):
+ resolvers = [Resolver.LSOF]
+ else:
+ resolvers = [Resolver.NETSTAT, Resolver.SOCKSTAT, Resolver.LSOF, Resolver.SS]
View
19 net/arm/patches/patch-src_util_torTools_py
@@ -0,0 +1,19 @@
+$OpenBSD$
+git commit b1fce355c3661324f477e2698a08214035d09c10
+--- src/util/torTools.py.orig Fri Oct 21 14:27:14 2011
++++ src/util/torTools.py Fri Oct 21 14:31:45 2011
+@@ -350,8 +350,12 @@ def isTorRunning():
+ then this returns False.
+ """
+
+- # suggestions welcome for making this more reliable
+- commandResults = sysTools.call("ps -A co command")
++ primaryResolver, secondaryResolver = "ps -A co command", "ps -ao ucomm="
++ if os.uname()[0] in ("Darwin", "FreeBSD", "OpenBSD"):
++ primaryResolver, secondaryResolver = secondaryResolver, primaryResolver
++ commandResults = sysTools.call(primaryResolver)
++ if not commandResults:
++ commandResults = sysTools.call(secondaryResolver)
+ if commandResults:
+ for cmd in commandResults:
+ if cmd.strip() == "tor": return True
View
10 net/arm/pkg/DESCR
@@ -0,0 +1,10 @@
+The anonymizing relay monitor (arm) is a terminal status monitor
+for Tor, intended for command-line aficionados, ssh connections,
+and anyone with a tty terminal. This works much like top does for
+system usage, providing real time statistics for:
+
+* bandwidth, cpu, and memory usage
+* relay's current configuration
+* logged events
+* connection details (ip, hostname, fingerprint, and consensus data)
+* ... etc
View
167 net/arm/pkg/PLIST
@@ -0,0 +1,167 @@
+@comment $OpenBSD$
+bin/arm
+@man man/man1/arm.1
+share/arm/
+share/${FULLPKGNAME}-py${MODPY_VERSION}.egg-info
+share/arm/TorCtl/
+share/arm/TorCtl/GeoIPSupport.py
+share/arm/TorCtl/GeoIPSupport.pyc
+share/arm/TorCtl/PathSupport.py
+share/arm/TorCtl/PathSupport.pyc
+share/arm/TorCtl/SQLSupport.py
+share/arm/TorCtl/SQLSupport.pyc
+share/arm/TorCtl/ScanSupport.py
+share/arm/TorCtl/ScanSupport.pyc
+share/arm/TorCtl/StatsSupport.py
+share/arm/TorCtl/StatsSupport.pyc
+share/arm/TorCtl/TorCtl.py
+share/arm/TorCtl/TorCtl.pyc
+share/arm/TorCtl/TorUtil.py
+share/arm/TorCtl/TorUtil.pyc
+share/arm/TorCtl/__init__.py
+share/arm/TorCtl/__init__.pyc
+share/arm/TorCtl/example.py
+share/arm/TorCtl/example.pyc
+share/arm/__init__.py
+share/arm/__init__.pyc
+share/arm/cli/
+share/arm/cli/__init__.py
+share/arm/cli/__init__.pyc
+share/arm/cli/configPanel.py
+share/arm/cli/configPanel.pyc
+share/arm/cli/connections/
+share/arm/cli/connections/__init__.py
+share/arm/cli/connections/__init__.pyc
+share/arm/cli/connections/circEntry.py
+share/arm/cli/connections/circEntry.pyc
+share/arm/cli/connections/connEntry.py
+share/arm/cli/connections/connEntry.pyc
+share/arm/cli/connections/connPanel.py
+share/arm/cli/connections/connPanel.pyc
+share/arm/cli/connections/countPopup.py
+share/arm/cli/connections/countPopup.pyc
+share/arm/cli/connections/descriptorPopup.py
+share/arm/cli/connections/descriptorPopup.pyc
+share/arm/cli/connections/entries.py
+share/arm/cli/connections/entries.pyc
+share/arm/cli/controller.py
+share/arm/cli/controller.pyc
+share/arm/cli/graphing/
+share/arm/cli/graphing/__init__.py
+share/arm/cli/graphing/__init__.pyc
+share/arm/cli/graphing/bandwidthStats.py
+share/arm/cli/graphing/bandwidthStats.pyc
+share/arm/cli/graphing/connStats.py
+share/arm/cli/graphing/connStats.pyc
+share/arm/cli/graphing/graphPanel.py
+share/arm/cli/graphing/graphPanel.pyc
+share/arm/cli/graphing/resourceStats.py
+share/arm/cli/graphing/resourceStats.pyc
+share/arm/cli/headerPanel.py
+share/arm/cli/headerPanel.pyc
+share/arm/cli/interpretorPanel.py
+share/arm/cli/interpretorPanel.pyc
+share/arm/cli/logPanel.py
+share/arm/cli/logPanel.pyc
+share/arm/cli/menu/
+share/arm/cli/menu/__init__.py
+share/arm/cli/menu/__init__.pyc
+share/arm/cli/menu/actions.py
+share/arm/cli/menu/actions.pyc
+share/arm/cli/menu/item.py
+share/arm/cli/menu/item.pyc
+share/arm/cli/menu/menu.py
+share/arm/cli/menu/menu.pyc
+share/arm/cli/popups.py
+share/arm/cli/popups.pyc
+share/arm/cli/torrcPanel.py
+share/arm/cli/torrcPanel.pyc
+share/arm/cli/wizard.py
+share/arm/cli/wizard.pyc
+share/arm/gui/
+share/arm/gui/__init__.py
+share/arm/gui/__init__.pyc
+share/arm/gui/arm.xml
+share/arm/gui/configPanel.py
+share/arm/gui/configPanel.pyc
+share/arm/gui/connections/
+share/arm/gui/connections/__init__.py
+share/arm/gui/connections/__init__.pyc
+share/arm/gui/connections/circEntry.py
+share/arm/gui/connections/circEntry.pyc
+share/arm/gui/connections/connEntry.py
+share/arm/gui/connections/connEntry.pyc
+share/arm/gui/connections/connPanel.py
+share/arm/gui/connections/connPanel.pyc
+share/arm/gui/controller.py
+share/arm/gui/controller.pyc
+share/arm/gui/generalPanel.py
+share/arm/gui/generalPanel.pyc
+share/arm/gui/graphing/
+share/arm/gui/graphing/__init__.py
+share/arm/gui/graphing/__init__.pyc
+share/arm/gui/graphing/bandwidthStats.py
+share/arm/gui/graphing/bandwidthStats.pyc
+share/arm/gui/graphing/graphPanel.py
+share/arm/gui/graphing/graphPanel.pyc
+share/arm/gui/logPanel.py
+share/arm/gui/logPanel.pyc
+share/arm/prereq.py
+share/arm/prereq.pyc
+share/arm/resources/
+@comment share/arm/resources/arm.1
+@comment share/arm/resources/arm.1.beforesubst
+@comment share/arm/resources/arm.1.orig
+share/arm/resources/exitNotice/
+share/arm/resources/exitNotice/how_tor_works_thumb.png
+share/arm/resources/exitNotice/index.html
+share/arm/resources/startTor
+share/arm/resources/torConfigDesc.txt
+share/arm/resources/torrcOverride/
+share/arm/resources/torrcOverride/override.c
+share/arm/resources/torrcOverride/override.h
+share/arm/resources/torrcOverride/override.py
+share/arm/resources/torrcTemplate.txt
+share/arm/settings.cfg
+share/arm/starter.py
+share/arm/starter.pyc
+share/arm/test.py
+share/arm/test.pyc
+share/arm/uninstall
+share/arm/util/
+share/arm/util/__init__.py
+share/arm/util/__init__.pyc
+share/arm/util/conf.py
+share/arm/util/conf.pyc
+share/arm/util/connections.py
+share/arm/util/connections.pyc
+share/arm/util/enum.py
+share/arm/util/enum.pyc
+share/arm/util/gtkTools.py
+share/arm/util/gtkTools.pyc
+share/arm/util/hostnames.py
+share/arm/util/hostnames.pyc
+share/arm/util/log.py
+share/arm/util/log.pyc
+share/arm/util/panel.py
+share/arm/util/panel.pyc
+share/arm/util/procName.py
+share/arm/util/procName.pyc
+share/arm/util/procTools.py
+share/arm/util/procTools.pyc
+share/arm/util/sysTools.py
+share/arm/util/sysTools.pyc
+share/arm/util/textInput.py
+share/arm/util/textInput.pyc
+share/arm/util/torConfig.py
+share/arm/util/torConfig.pyc
+share/arm/util/torInterpretor.py
+share/arm/util/torInterpretor.pyc
+share/arm/util/torTools.py
+share/arm/util/torTools.pyc
+share/arm/util/uiTools.py
+share/arm/util/uiTools.pyc
+share/arm/version.py
+share/arm/version.pyc
+share/doc/arm/
+share/doc/arm/armrc.sample

0 comments on commit e24168a

Please sign in to comment.
Something went wrong with that request. Please try again.