added email parameter to ubuntu/debian packaging scripts
parent
a76c0a20ee
commit
ab4569457d
|
@ -1,14 +1,44 @@
|
|||
# How to build Debian and Ubuntu Packages
|
||||
|
||||
# How to generate Debian packages
|
||||
## Preparations
|
||||
|
||||
Packages must be signed with a GPG key. First have a look of the keys
|
||||
you have available:
|
||||
|
||||
gpg --list-secret-keys
|
||||
|
||||
If you don't have one, create one, then list again.
|
||||
|
||||
Pick a secret key you like from the listed keys, for instance
|
||||
"Your Name <your.email@yourprovider.com>". Then unlock that key by
|
||||
signing a dummy file. The following line should pop up a window to
|
||||
enter the passphrase:
|
||||
|
||||
echo | gpg --local-user "Your Name <your.email@yourprovider.com>" -s >/dev/null
|
||||
|
||||
Now you can run the below scripts. Without this step they will fail
|
||||
with "No secret key" or similar messages.
|
||||
|
||||
## How to generate a Debian package
|
||||
|
||||
Run the package script, providing a name/email that matches your PGP key.
|
||||
|
||||
cd [GTSAM_SOURCE_ROOT]
|
||||
bash package_scripts/prepare_debian.sh
|
||||
bash package_scripts/prepare_debian.sh -e "Your Name <your.email@yourprovider.com>"
|
||||
|
||||
|
||||
# How to generate Ubuntu packages for a PPA
|
||||
## How to generate Ubuntu packages for a PPA
|
||||
|
||||
Run the packaging script, passing the name of the gpg key
|
||||
(see above) with the "-e" option:
|
||||
|
||||
cd [GTSAM_SOURCE_ROOT]
|
||||
bash package_scripts/prepare_ubuntu_pkgs_for_ppa.sh
|
||||
bash package_scripts/prepare_ubuntu_pkgs_for_ppa.sh -e "Your Name <your.email@yourprovider.com>"
|
||||
|
||||
Check that you have uploaded this key to the ubuntu key server, and
|
||||
have added the key to your account.
|
||||
|
||||
Upload the package to your ppa:
|
||||
|
||||
cd ~/gtsam_ubuntu
|
||||
bash [GTSAM_SOURCE_ROOT]/upload_all_gtsam_ppa.sh
|
||||
|
||||
bash [GTSAM_SOURCE_ROOT]/package_scripts/upload_all_gtsam_ppa.sh -p "ppa:your-name/ppa-name"
|
||||
|
|
|
@ -10,7 +10,7 @@ APPEND_SNAPSHOT_NUM=0
|
|||
IS_FOR_UBUNTU=0
|
||||
APPEND_LINUX_DISTRO=""
|
||||
VALUE_EXTRA_CMAKE_PARAMS=""
|
||||
while getopts "sud:c:" OPTION
|
||||
while getopts "sud:c:e:" OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
s)
|
||||
|
@ -25,6 +25,9 @@ do
|
|||
c)
|
||||
VALUE_EXTRA_CMAKE_PARAMS=$OPTARG
|
||||
;;
|
||||
e)
|
||||
PACKAGER_EMAIL=$OPTARG
|
||||
;;
|
||||
?)
|
||||
echo "Unknown command line argument!"
|
||||
exit 1
|
||||
|
@ -32,6 +35,11 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ -z ${PACKAGER_EMAIL+x} ]; then
|
||||
echo "must specify packager email via -e option!"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ -f CMakeLists.txt ];
|
||||
then
|
||||
source package_scripts/prepare_debian_gen_snapshot_version.sh
|
||||
|
@ -162,7 +170,7 @@ fi
|
|||
|
||||
echo "Adding a new entry to debian/changelog..."
|
||||
|
||||
DEBEMAIL="Jose Luis Blanco Claraco <joseluisblancoc@gmail.com>" debchange $DEBCHANGE_CMD -b --distribution unstable --force-distribution New version of upstream sources.
|
||||
DEBEMAIL=${PACKAGER_EMAIL} debchange $DEBCHANGE_CMD -b --distribution unstable --force-distribution New version of upstream sources.
|
||||
|
||||
echo "Copying back the new changelog to a temporary file in: ${GTSAM_EXTERN_DEBIAN_DIR}changelog.new"
|
||||
cp debian/changelog ${GTSAM_EXTERN_DEBIAN_DIR}changelog.new
|
||||
|
|
|
@ -1,16 +1,50 @@
|
|||
#!/bin/bash
|
||||
# Creates a set of packages for each different Ubuntu distribution, with the
|
||||
# intention of uploading them to:
|
||||
# https://launchpad.net/~joseluisblancoc/
|
||||
# intention of uploading them to a PPA on launchpad
|
||||
#
|
||||
# JLBC, 2010
|
||||
# [Addition 2012:]
|
||||
#
|
||||
# You can declare a variable (in the caller shell) with extra flags for the
|
||||
# CMake in the final ./configure like:
|
||||
#
|
||||
# GTSAM_PKG_CUSTOM_CMAKE_PARAMS="\"-DDISABLE_SSE3=ON\""
|
||||
#
|
||||
|
||||
|
||||
function show_help {
|
||||
echo "USAGE:"
|
||||
echo ""
|
||||
echo "- to display this help: "
|
||||
echo "prepare_ubuntu_packages_for_ppa.sh -h or -?"
|
||||
echo ""
|
||||
echo "- to package to your PPA: "
|
||||
echo "prepare_ubuntu_packages_for_ppa.sh -e email_of_your_gpg_key"
|
||||
echo ""
|
||||
echo "to pass custom config for GTSAM, set the following"
|
||||
echo "environment variable beforehand: "
|
||||
echo ""
|
||||
echo "GTSAM_PKG_CUSTOM_CMAKE_PARAMS=\"\"-DDISABLE_SSE3=ON\"\""
|
||||
echo ""
|
||||
}
|
||||
|
||||
while getopts "h?e:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
e) PACKAGER_EMAIL=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${PACKAGER_EMAIL+x} ]; then
|
||||
show_help
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
# List of distributions to create PPA packages for:
|
||||
|
@ -35,7 +69,6 @@ if [ -z "${GTSAM_DEB_DIR}" ]; then
|
|||
export GTSAM_DEB_DIR="$HOME/gtsam_debian"
|
||||
fi
|
||||
GTSAM_EXTERN_DEBIAN_DIR="$GTSAMSRC/debian/"
|
||||
EMAIL4DEB="Jose Luis Blanco (University of Malaga) <joseluisblancoc@gmail.com>"
|
||||
|
||||
# Clean out dirs:
|
||||
rm -fr $gtsam_ubuntu_OUT_DIR/
|
||||
|
@ -56,7 +89,7 @@ do
|
|||
# Call the standard "prepare_debian.sh" script:
|
||||
# -------------------------------------------------------------------
|
||||
cd ${GTSAMSRC}
|
||||
bash package_scripts/prepare_debian.sh -s -u -d ${DEBIAN_DIST} -c "${GTSAM_PKG_CUSTOM_CMAKE_PARAMS}"
|
||||
bash package_scripts/prepare_debian.sh -e "$PACKAGER_EMAIL" -s -u -d ${DEBIAN_DIST} -c "${GTSAM_PKG_CUSTOM_CMAKE_PARAMS}"
|
||||
|
||||
CUR_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $CUR_SCRIPT_DIR/prepare_debian_gen_snapshot_version.sh # populate GTSAM_SNAPSHOT_VERSION
|
||||
|
@ -68,7 +101,7 @@ do
|
|||
DEBCHANGE_CMD="--newversion ${GTSAM_VERSION_STR}~snapshot${GTSAM_SNAPSHOT_VERSION}${DEBIAN_DIST}-1"
|
||||
echo "Changing to a new Debian version: ${DEBCHANGE_CMD}"
|
||||
echo "Adding a new entry to debian/changelog for distribution ${DEBIAN_DIST}"
|
||||
DEBEMAIL="Jose Luis Blanco Claraco <joseluisblancoc@gmail.com>" debchange $DEBCHANGE_CMD -b --distribution ${DEBIAN_DIST} --force-distribution New version of upstream sources.
|
||||
DEBEMAIL="${PACKAGER_EMAIL}" debchange $DEBCHANGE_CMD -b --distribution ${DEBIAN_DIST} --force-distribution New version of upstream sources.
|
||||
|
||||
cp changelog /tmp/my_changelog
|
||||
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
find . -name '*.changes' | xargs -I FIL dput ppa:joseluisblancoc/gtsam-develop FIL
|
||||
function show_help {
|
||||
echo "USAGE:"
|
||||
echo ""
|
||||
echo "- to display this help: "
|
||||
echo "upload_all_gtsam_ppa.sh -h or -?"
|
||||
echo ""
|
||||
echo "- to upload to your PPA: "
|
||||
echo "upload_all_gtsam_ppa.sh -p ppa:your_name/name_of_ppa"
|
||||
echo ""
|
||||
}
|
||||
|
||||
while getopts "h?p:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
p) ppa_name=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${ppa_name+x} ]; then
|
||||
show_help
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
find . -name '*.changes' | xargs -I FIL dput ${ppa_name} FIL
|
||||
|
|
Loading…
Reference in New Issue