<commit_before>#!/bin/bash

# Execute the following as root to install lintian and fpm
# apt-get install lintian
# apt-get install ruby ruby-dev rubygems build-essential
# gem install --no-ri --no-rdoc fpm

# Then run this file, altering the version.
# After building the package, this script will run it against lintian
# to highlight potential issues to the builder.

set -eu

TAG=2.2.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 RCs of the form X.Y.Z-0.A.rcA
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 <<EMAIL>>" \
--description "Secure Stomp Messenger (SSM)." \
--depends python \
--deb-changelog CHANGELOG \
--python-install-bin /usr/bin \
--python-install-lib $PYTHON_INSTALL_LIB \
--no-auto-depends \
--exclude *.pyc \
$SOURCE_DIR/ssm-$VERSION/setup.py

fpm -s pleaserun -t deb \
-n apel-ssm-service \
-v $VERSION \
--iteration $ITERATION \<commit_msg>Add pip and python-ldap as debian dependancies<commit_after>#!/bin/bash

# Execute the following as root to install lintian and fpm
# apt-get install lintian
# apt-get install ruby ruby-dev rubygems build-essential
# gem install --no-ri --no-rdoc fpm

# Then run this file, altering the version.
# After building the package, this script will run it against lintian
# to highlight potential issues to the builder.

set -eu

TAG=2.2.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 RCs of the form X.Y.Z-0.A.rcA
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 <<EMAIL>>" \
--description "Secure Stomp Messenger (SSM)." \
--depends python \
--depends python-pip \
--depends python-ldap \
--deb-changelog CHANGELOG \
--python-install-bin /usr/bin \
--python-install-lib $PYTHON_INSTALL_LIB \
--no-auto-depends \
--exclude *.pyc \
$SOURCE_DIR/ssm-$VERSION/setup.py

fpm -s pleaserun -t deb \
-n apel-ssm-service \
-v $VERSION \
--iteration $ITERATION \
{'fraction_non_alphanumeric': 0.12746913580246913, 'fraction_numerical': 0.005555555555555556, 'mean_word_length': 3.415531335149864, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3186278', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1178, 'n_words': 386}