summaryrefslogtreecommitdiffstats
path: root/packaging/deb
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-10-11 17:04:57 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-10-12 10:07:00 +0000
commit5d15c9ba461d4c1946b2315e18aeffff0ef898dd (patch)
treed78ff84e06b711f525718cde9ee21af2eff70ad9 /packaging/deb
parent7f2ac934cf22313510750b47ca8359732f97ef3f (diff)
HONEYCOMB-217 Ubuntu16 (systemd) specific packaging
Change-Id: Id1c962412194dd809e68f27d7e62b5ab36378be3 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'packaging/deb')
-rw-r--r--packaging/deb/.gitignore2
-rwxr-xr-xpackaging/deb/common/debuild.sh8
-rwxr-xr-xpackaging/deb/common/prepare.sh45
-rwxr-xr-xpackaging/deb/debuild.sh45
-rw-r--r--packaging/deb/trusty/debian/compat (renamed from packaging/deb/debian/compat)0
-rw-r--r--packaging/deb/trusty/debian/control (renamed from packaging/deb/debian/control)0
-rw-r--r--packaging/deb/trusty/debian/copyright (renamed from packaging/deb/debian/copyright)0
-rwxr-xr-xpackaging/deb/trusty/debian/rules (renamed from packaging/deb/debian/rules)0
-rw-r--r--packaging/deb/trusty/debian/source/format (renamed from packaging/deb/debian/source/format)0
-rwxr-xr-xpackaging/deb/trusty/debuild.sh7
-rw-r--r--packaging/deb/trusty/honeycomb.conf (renamed from packaging/deb/honeycomb.conf)0
-rw-r--r--packaging/deb/xenial/debian/control14
-rwxr-xr-xpackaging/deb/xenial/debian/rules32
-rwxr-xr-xpackaging/deb/xenial/debuild.sh8
-rw-r--r--packaging/deb/xenial/honeycomb.service10
15 files changed, 125 insertions, 46 deletions
diff --git a/packaging/deb/.gitignore b/packaging/deb/.gitignore
index 79f1221ce..f5316fb7b 100644
--- a/packaging/deb/.gitignore
+++ b/packaging/deb/.gitignore
@@ -1,5 +1,5 @@
*.tar.xz
*.tar.gz
-honeycomb-*/
+**/honeycomb-*/
*.deb
*.changes \ No newline at end of file
diff --git a/packaging/deb/common/debuild.sh b/packaging/deb/common/debuild.sh
new file mode 100755
index 000000000..8f766e0c0
--- /dev/null
+++ b/packaging/deb/common/debuild.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -xe
+BUILD_DIR=$1
+
+# Build deb binary only package
+cd ${BUILD_DIR}
+dpkg-buildpackage -b
+cd - \ No newline at end of file
diff --git a/packaging/deb/common/prepare.sh b/packaging/deb/common/prepare.sh
new file mode 100755
index 000000000..9663bccbe
--- /dev/null
+++ b/packaging/deb/common/prepare.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -xe
+# $1 - source dir root
+# $2 - $1/debian - just configurable for reuse
+# $3 - service definition file
+# $4 - service definition target during install
+SOURCE_DIR=$1
+VERSION=$(${SOURCE_DIR}/../../rpm/version)
+RELEASE=$(${SOURCE_DIR}/../../rpm/release)
+BUILD_DIR=${SOURCE_DIR}/honeycomb-${VERSION}
+
+# Copy and unpack the archive with vpp-integration distribution
+ARCHIVE_DIR=${SOURCE_DIR}/../../../vpp-integration/minimal-distribution/target/
+ARCHIVE=${ARCHIVE_DIR}/vpp-integration-distribution-1.16.12-SNAPSHOT-hc.tar.gz
+cp ${ARCHIVE} ${SOURCE_DIR}
+ARCHIVE=${SOURCE_DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT-hc.tar.gz
+tar -xf ${ARCHIVE} -C ${SOURCE_DIR}/
+
+# Create packaging root
+rm -rf ${BUILD_DIR}
+mkdir ${BUILD_DIR}
+
+# Copy contents of tar.gz
+mv ${SOURCE_DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT/ ${BUILD_DIR}/
+cp -r $2 ${BUILD_DIR}
+
+# OS service definition
+cp ${SOURCE_DIR}/$3 ${BUILD_DIR}
+
+# Changelog file
+cat <<EOT >> ${BUILD_DIR}/debian/changelog
+honeycomb (${VERSION}-${RELEASE}) unstable; urgency=low
+
+ * 16.12 release
+
+ -- mmarsale <mmarsale@cisco.com> Mon, 22 Aug 2016 09:41:37 +0200
+EOT
+
+# Install instructions
+cat <<EOT >> ${BUILD_DIR}/debian/install
+vpp-integration-distribution-${VERSION}-SNAPSHOT/* /opt/honeycomb/
+$3 $4
+EOT
+
+echo ${BUILD_DIR} \ No newline at end of file
diff --git a/packaging/deb/debuild.sh b/packaging/deb/debuild.sh
deleted file mode 100755
index 38b9697f1..000000000
--- a/packaging/deb/debuild.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-set -xe
-DIR=$(dirname $0)
-DIR=$(readlink -f $DIR)
-VERSION=$(${DIR}/../rpm/version)
-RELEASE=$(${DIR}/../rpm/release)
-PACKAGING_ROOT=${DIR}/honeycomb-${VERSION}
-
-# Copy and unpack the archive with vpp-integration distribution
-ARCHIVE_DIR=${DIR}/../../vpp-integration/minimal-distribution/target/
-ARCHIVE=${ARCHIVE_DIR}/vpp-integration-distribution-1.16.12-SNAPSHOT-hc.tar.gz
-cp ${ARCHIVE} ${DIR}
-ARCHIVE=${DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT-hc.tar.gz
-tar -xf ${ARCHIVE} -C ${DIR}/
-
-# Create packaging root
-rm -rf ${PACKAGING_ROOT}
-mkdir ${PACKAGING_ROOT}
-
-# Copy contents of tar.gz
-mv ${DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT/ ${PACKAGING_ROOT}/
-cp -r ${DIR}/debian/ ${PACKAGING_ROOT}
-
-# Upstart configuration
-cp ${DIR}/honeycomb.conf ${PACKAGING_ROOT}
-
-# Changelog file
-cat <<EOT >> ${PACKAGING_ROOT}/debian/changelog
-honeycomb (${VERSION}-${RELEASE}) unstable; urgency=low
-
- * Initial release
-
- -- mmarsale <mmarsale@cisco.com> Mon, 22 Aug 2016 09:41:37 +0200
-EOT
-
-# Install instructions
-cat <<EOT >> ${PACKAGING_ROOT}/debian/install
-vpp-integration-distribution-${VERSION}-SNAPSHOT/* /opt/honeycomb/
-honeycomb.conf /etc/init/
-EOT
-
-# Build deb binary only package
-cd ${PACKAGING_ROOT}
-dpkg-buildpackage -b
-cd - \ No newline at end of file
diff --git a/packaging/deb/debian/compat b/packaging/deb/trusty/debian/compat
index ec635144f..ec635144f 100644
--- a/packaging/deb/debian/compat
+++ b/packaging/deb/trusty/debian/compat
diff --git a/packaging/deb/debian/control b/packaging/deb/trusty/debian/control
index 16814efa4..16814efa4 100644
--- a/packaging/deb/debian/control
+++ b/packaging/deb/trusty/debian/control
diff --git a/packaging/deb/debian/copyright b/packaging/deb/trusty/debian/copyright
index ad3a88c26..ad3a88c26 100644
--- a/packaging/deb/debian/copyright
+++ b/packaging/deb/trusty/debian/copyright
diff --git a/packaging/deb/debian/rules b/packaging/deb/trusty/debian/rules
index 5c1cebc20..5c1cebc20 100755
--- a/packaging/deb/debian/rules
+++ b/packaging/deb/trusty/debian/rules
diff --git a/packaging/deb/debian/source/format b/packaging/deb/trusty/debian/source/format
index 163aaf8d8..163aaf8d8 100644
--- a/packaging/deb/debian/source/format
+++ b/packaging/deb/trusty/debian/source/format
diff --git a/packaging/deb/trusty/debuild.sh b/packaging/deb/trusty/debuild.sh
new file mode 100755
index 000000000..84c38ae30
--- /dev/null
+++ b/packaging/deb/trusty/debuild.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -xe
+DIR=$(dirname $0)
+DIR=$(readlink -f ${DIR})
+
+BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/debian honeycomb.conf /etc/init/)
+${DIR}/../common/debuild.sh ${BUILD_FOLDER} \ No newline at end of file
diff --git a/packaging/deb/honeycomb.conf b/packaging/deb/trusty/honeycomb.conf
index e9c7fb932..e9c7fb932 100644
--- a/packaging/deb/honeycomb.conf
+++ b/packaging/deb/trusty/honeycomb.conf
diff --git a/packaging/deb/xenial/debian/control b/packaging/deb/xenial/debian/control
new file mode 100644
index 000000000..da55bd048
--- /dev/null
+++ b/packaging/deb/xenial/debian/control
@@ -0,0 +1,14 @@
+Source: honeycomb
+Section: misc
+Priority: optional
+Maintainer: fd.io/honeycomb <honeycomb-dev@lists.fd.io>
+Build-Depends: debhelper (>= 9), dh-systemd
+Standards-Version: 3.9.6
+Homepage: https://wiki.fd.io/view/Honeycomb
+Vcs-Browser: https://git.fd.io/cgit/honeycomb/tree/
+
+Package: honeycomb
+Architecture: all
+Depends: vpp, openjdk-8-jdk | openjdk-8-jre
+Suggests: vpp-nsh-plugin
+Description: Honeycomb agent for VPP
diff --git a/packaging/deb/xenial/debian/rules b/packaging/deb/xenial/debian/rules
new file mode 100755
index 000000000..048f5f738
--- /dev/null
+++ b/packaging/deb/xenial/debian/rules
@@ -0,0 +1,32 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+# main packaging script based on dh7 syntax
+%:
+ dh $@ --with systemd
+
+# dh_make generated override targets
+# This is example for Cmake (See https://bugs.debian.org/641051 )
+#override_dh_auto_configure:
+# dh_auto_configure -- \
+# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+
+
+
+
diff --git a/packaging/deb/xenial/debuild.sh b/packaging/deb/xenial/debuild.sh
new file mode 100755
index 000000000..21e3b7a84
--- /dev/null
+++ b/packaging/deb/xenial/debuild.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -xe
+DIR=$(dirname $0)
+DIR=$(readlink -f ${DIR})
+
+BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/../trusty/debian honeycomb.service /lib/systemd/system)
+cp -r ${DIR}/debian/* ${BUILD_FOLDER}/debian/
+${DIR}/../common/debuild.sh ${BUILD_FOLDER} \ No newline at end of file
diff --git a/packaging/deb/xenial/honeycomb.service b/packaging/deb/xenial/honeycomb.service
new file mode 100644
index 000000000..3b88ba425
--- /dev/null
+++ b/packaging/deb/xenial/honeycomb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=honeycomb agent for VPP
+
+[Service]
+Type=simple
+ExecStart=/bin/sh -ec "exec /opt/honeycomb/honeycomb"
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file