-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from apel/release-2.3.0
Release 2.3.0 to master
- Loading branch information
Showing
10 changed files
with
307 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM centos:7 | ||
MAINTAINER APEL Administrators <apel-admins@stfc.ac.uk> | ||
|
||
# Copy the SSM Git repository to /tmp/ssm | ||
COPY . /tmp/ssm | ||
# Then set /tmp/ssm as the working directory | ||
WORKDIR /tmp/ssm | ||
|
||
# Add the EPEL repo so we can get pip | ||
RUN yum -y install epel-release | ||
# Then get pip | ||
RUN yum -y install python-pip | ||
|
||
# Install the system requirements of python-ldap | ||
RUN yum -y install gcc python-devel openldap-devel | ||
|
||
# Install the system requirements of ssm | ||
RUN yum -y install openssl | ||
|
||
# Install the python requirements of SSM | ||
RUN pip install -r requirements.txt | ||
# Then install the SSM | ||
RUN python setup.py install | ||
|
||
# Set the working directory back to / | ||
WORKDIR / | ||
# Then delete the temporary copy of the SSM Git repository | ||
# as there is no need for it after the image has been built. | ||
RUN rm -rf /tmp/ssm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
stomp.py<=3.1.6 | ||
python-daemon | ||
stomp.py>=3.1.1 | ||
python-daemon<2.2.0 | ||
python-ldap | ||
dirq | ||
# Dependencies for testing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
# Execute the following as root to install lintian and fpm: | ||
# apt-get install lintian | ||
# apt-get install ruby ruby-dev build-essential | ||
# gem install --no-ri --no-rdoc fpm | ||
|
||
# Then run this file, as any user, altering the | ||
# version number in the TAG variable. | ||
# This file will create two versions of the deb file: | ||
# - apel-ssm_<tag>_all.deb contains all the files necessary to run a | ||
# the SSM as a sender. | ||
# - apel-ssm-service_<tag>_all.deb will install service daemon files | ||
# necessary to run the SSM as a receiver as a service. | ||
# After building apel-ssm_<tag>_all.deb, this script will run it | ||
# against lintian to highlight potential issues to the builder. | ||
|
||
set -eu | ||
|
||
TAG=2.3.0-1 | ||
|
||
SOURCE_DIR=~/debbuild/source | ||
BUILD_DIR=~/debbuild/build | ||
|
||
# Where to install the python lib files | ||
PYTHON_INSTALL_LIB=/usr/lib/python2.7/dist-packages | ||
|
||
# Split the tag into version and package number | ||
# so they can be passed to fpm separately. | ||
# This will work with tags of the form <version_number>-<iteration> | ||
VERSION=$(echo "$TAG" | cut -d - -f 1) | ||
ITERATION=$(echo "$TAG" | cut -d - -f 2) | ||
|
||
# Create SSM and DEB dir (if not present) | ||
mkdir -p $SOURCE_DIR | ||
mkdir -p $BUILD_DIR | ||
|
||
# Clean up any previous build | ||
rm -rf $SOURCE_DIR/* | ||
rm -rf $BUILD_DIR/* | ||
|
||
# Get and extract the source | ||
TAR_FILE=${TAG}.tar.gz | ||
TAR_URL=https://github.com/apel/ssm/archive/$TAR_FILE | ||
wget --no-check-certificate $TAR_URL -O $TAR_FILE | ||
tar xvf $TAR_FILE -C $SOURCE_DIR | ||
rm -f $TAR_FILE | ||
|
||
fpm -s python -t deb \ | ||
-n apel-ssm \ | ||
-v $VERSION \ | ||
--iteration $ITERATION \ | ||
-m "Apel Administrators <apel-admins@stfc.ac.uk>" \ | ||
--description "Secure Stomp Messenger (SSM)." \ | ||
--no-auto-depends \ | ||
--depends python2.7 \ | ||
--depends python-pip \ | ||
--depends python-ldap \ | ||
--depends libssl-dev \ | ||
--depends libsasl2-dev \ | ||
--deb-changelog $SOURCE_DIR/ssm-$TAG/CHANGELOG \ | ||
--python-install-bin /usr/bin \ | ||
--python-install-lib $PYTHON_INSTALL_LIB \ | ||
--exclude *.pyc \ | ||
--package $BUILD_DIR \ | ||
$SOURCE_DIR/ssm-$TAG/setup.py | ||
|
||
fpm -s pleaserun -t deb \ | ||
-n apel-ssm-service \ | ||
-v $VERSION \ | ||
--iteration $ITERATION \ | ||
-m "Apel Administrators <apel-admins@stfc.ac.uk>" \ | ||
--description "Secure Stomp Messenger (SSM) Service Daemon files." \ | ||
--architecture all \ | ||
--no-auto-depends \ | ||
--depends apel-ssm \ | ||
--package $BUILD_DIR \ | ||
/usr/bin/ssmreceive | ||
|
||
# Clean up files generated by script | ||
rm -rf apel_ssm.egg-info/ build/ | ||
|
||
# Check the resultant (non service) deb for 'lint' | ||
echo "Possible Issues to Fix:" | ||
lintian $BUILD_DIR/apel-ssm_${TAG}_all.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.