Skip to content

Commit

Permalink
Add bionic packaging and remove trusty packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed May 14, 2019
1 parent c45be7f commit 49963c6
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 84 deletions.
27 changes: 27 additions & 0 deletions debian/controlX/control.bionic
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Source: tor2web
Maintainer: Random GlobaLeaks developers <[email protected]>
Section: web
Priority: optional
Build-Depends:
debhelper,
dh-apparmor,
dh-python,
python3 (>= 3.5),
python3-pip,
python3-setuptools,
Vcs-Git: https://github.com/globaleaks/Tor2web.git
Standards-Version: 3.9.8

Package: tor2web
Architecture: all
Depends:
apparmor,
apparmor-utils,
python3:any,
python3-cryptography,
python3-openssl,
python3-twisted-core,
tor
Description: Tor2web proxy.
Tor2web is an HTTP proxy software that enables access to
Tor Hidden Services by mean of common web browsers.
41 changes: 0 additions & 41 deletions debian/controlX/control.trusty

This file was deleted.

22 changes: 0 additions & 22 deletions debian/tor2web.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,13 @@ if which pycompile >/dev/null 2>&1; then
pycompile -p tor2web
fi

CHECK_PIP_VERSION="
import pip
from pkg_resources import parse_version as v
exit(v(pip.__version__) < v('1.3'))
"

DISTRO="unknown"
DISTRO_CODENAME="unknown"
if which lsb_release >/dev/null; then
DISTRO="$( lsb_release -is )"
DISTRO_CODENAME="$( lsb_release -cs )"
fi

PIP_NEEDED=1
if echo "$DISTRO_CODENAME" | grep -qE "^xenial$"; then
PIP_NEEDED=0
fi

if [ $PIP_NEEDED -eq 1 ]; then
# XXX. Hardcore installation of globaleaks dependencies using pip.
# Please remove the following lines once up-to-date python-storm,
# python-cryptography, and python-pip will be available in debian.
if ! python -c "$CHECK_PIP_VERSION" 2>/dev/null; then
curl https://bootstrap.pypa.io/get-pip.py | python
fi

pip install -r /usr/share/tor2web/requirements.txt
fi

if ! id -u tor2web >/dev/null 2>&1; then
useradd tor2web -b /home/tor2web -s /bin/false
fi
Expand Down
13 changes: 13 additions & 0 deletions requirements/requirements-bionic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Parsley==1.2
Twisted==17.9.0
cffi==1.11.5
cryptography==2.1.4
enum34==1.1.6
idna==2.6
pyOpenSSL==17.5.0
pyasn1==0.4.2
pycparser==2.18
service_identity==16.0.0
six==1.11.0
transaction==1.4.3
zope.interface==4.3.2
13 changes: 0 additions & 13 deletions requirements/requirements-trusty.txt

This file was deleted.

10 changes: 3 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ usage() {
echo "Valid options:"
echo " -h"
echo -e " -t tagname (build specific release/branch)"
echo -e " -d distribution (available: trusty, xenial, wheezy, jessie)"
echo -e " -d distribution (available: xenial, bionic)"
echo -e " -n (do not sign)"
echo -e " -p (push on repository)"
}

TARGETS="trusty xenial wheezy jessie"
DISTRIBUTION="trusty"
TARGETS="xenial bionic"
DISTRIBUTION="xenial"
TAG="master"
NOSIGN=0
PUSH=0
Expand Down Expand Up @@ -86,10 +86,6 @@ for TARGET in $TARGETS; do

rm debian/control requirements.txt

if [ "$TARGET" != 'xenial' ]; then
TARGET='trusty'
fi

cp debian/controlX/control.$TARGET debian/control
cp requirements/requirements-$TARGET.txt requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rm -rf requirements.txt
ln -s requirements/requirements-xenial.txt requirements.txt
pip install -r requirements.txt

./scripts/build.sh -d trusty -t $TRAVIS_COMMIT -n
./scripts/build.sh -d xenial -t $TRAVIS_COMMIT -n

0 comments on commit 49963c6

Please sign in to comment.