diff options
-rwxr-xr-x | packaging/deb/common/prepare.sh | 21 | ||||
-rwxr-xr-x | packaging/deb/common/vpp_dependencies | 6 | ||||
-rwxr-xr-x | packaging/deb/trusty/build_dependencies | 2 | ||||
-rw-r--r-- | packaging/deb/trusty/debian/control | 14 | ||||
-rwxr-xr-x | packaging/deb/trusty/debuild.sh | 2 | ||||
-rwxr-xr-x | packaging/deb/xenial/build_dependencies | 2 | ||||
-rw-r--r-- | packaging/deb/xenial/debian/control | 14 | ||||
-rwxr-xr-x | packaging/deb/xenial/debuild.sh | 2 | ||||
-rw-r--r-- | packaging/rpm/honeycomb.spec | 3 | ||||
-rwxr-xr-x | packaging/rpm/vpp_dependencies | 6 |
10 files changed, 41 insertions, 31 deletions
diff --git a/packaging/deb/common/prepare.sh b/packaging/deb/common/prepare.sh index 571f30ada..69d535389 100755 --- a/packaging/deb/common/prepare.sh +++ b/packaging/deb/common/prepare.sh @@ -4,10 +4,13 @@ set -xe # $2 - $1/debian - just configurable for reuse # $3 - service definition file # $4 - service definition target during install +# $5 - build dependencies file SOURCE_DIR=$1 VERSION=$(${SOURCE_DIR}/../../rpm/version) RELEASE=$(${SOURCE_DIR}/../../rpm/release) BUILD_DIR=${SOURCE_DIR}/honeycomb-${VERSION} +VPP_DEPENDENCIES=$(${SOURCE_DIR}/../../deb/common/vpp_dependencies) +BUILD_DEPENDENCIES=$($5) # Copy and unpack the archive with vpp-integration distribution ARCHIVE_DIR=${SOURCE_DIR}/../../../vpp-integration/minimal-distribution/target/ @@ -42,4 +45,22 @@ vpp-integration-distribution-${VERSION}-SNAPSHOT/* /opt/honeycomb/ $3 $4 EOT +# Generate control file +cat <<EOT >> ${BUILD_DIR}/debian/control +Source: honeycomb +Section: misc +Priority: optional +Maintainer: fd.io/hc2vpp <hc2vpp@lists.fd.io> +Build-Depends: ${BUILD_DEPENDENCIES} +Standards-Version: 3.9.6 +Homepage: https://wiki.fd.io/view/Hc2vpp +Vcs-Browser: https://git.fd.io/cgit/hc2vpp/tree/ + +Package: honeycomb +Architecture: all +Depends: ${VPP_DEPENDENCIES}, openjdk-8-jre-headless +Suggests: vpp-nsh-plugin +Description: Honeycomb agent for VPP +EOT + echo ${BUILD_DIR}
\ No newline at end of file diff --git a/packaging/deb/common/vpp_dependencies b/packaging/deb/common/vpp_dependencies new file mode 100755 index 000000000..8c1c21617 --- /dev/null +++ b/packaging/deb/common/vpp_dependencies @@ -0,0 +1,6 @@ +#!/bin/bash +# defines vpp and vpp-plugins dependencies for debian packages +# using range +echo "vpp (>= 17.04), vpp (<< 17.07), vpp-plugins (>= 17.04), vpp-plugins (<< 17.07)" +# or specific vpp version +#echo "vpp (= 17.04-rc1), vpp-plugins (= 17.04-rc1)" diff --git a/packaging/deb/trusty/build_dependencies b/packaging/deb/trusty/build_dependencies new file mode 100755 index 000000000..170bed922 --- /dev/null +++ b/packaging/deb/trusty/build_dependencies @@ -0,0 +1,2 @@ +#!/bin/bash +echo "debhelper (>= 9)" diff --git a/packaging/deb/trusty/debian/control b/packaging/deb/trusty/debian/control deleted file mode 100644 index 860683138..000000000 --- a/packaging/deb/trusty/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: honeycomb -Section: misc -Priority: optional -Maintainer: fd.io/hc2vpp <hc2vpp@lists.fd.io> -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.6 -Homepage: https://wiki.fd.io/view/Hc2vpp -Vcs-Browser: https://git.fd.io/cgit/hc2vpp/tree/ - -Package: honeycomb -Architecture: all -Depends: vpp (>= 17.04), vpp (<< 17.08), vpp-plugins (>= 17.04), vpp-plugins (<< 17.08), openjdk-8-jre-headless -Suggests: vpp-nsh-plugin -Description: Honeycomb agent for VPP diff --git a/packaging/deb/trusty/debuild.sh b/packaging/deb/trusty/debuild.sh index 84c38ae30..af991ce9e 100755 --- a/packaging/deb/trusty/debuild.sh +++ b/packaging/deb/trusty/debuild.sh @@ -3,5 +3,5 @@ set -xe DIR=$(dirname $0) DIR=$(readlink -f ${DIR}) -BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/debian honeycomb.conf /etc/init/) +BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/debian honeycomb.conf /etc/init/ ${DIR}/build_dependencies) ${DIR}/../common/debuild.sh ${BUILD_FOLDER}
\ No newline at end of file diff --git a/packaging/deb/xenial/build_dependencies b/packaging/deb/xenial/build_dependencies new file mode 100755 index 000000000..fdd065180 --- /dev/null +++ b/packaging/deb/xenial/build_dependencies @@ -0,0 +1,2 @@ +#!/bin/bash +echo "debhelper (>= 9), dh-systemd" diff --git a/packaging/deb/xenial/debian/control b/packaging/deb/xenial/debian/control deleted file mode 100644 index 5a66f9cfe..000000000 --- a/packaging/deb/xenial/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: honeycomb -Section: misc -Priority: optional -Maintainer: fd.io/hc2vpp <hc2vpp@lists.fd.io> -Build-Depends: debhelper (>= 9), dh-systemd -Standards-Version: 3.9.6 -Homepage: https://wiki.fd.io/view/Hc2vpp -Vcs-Browser: https://git.fd.io/cgit/hc2vpp/tree/ - -Package: honeycomb -Architecture: all -Depends: vpp (>= 17.04), vpp (<< 17.08), vpp-plugins (>= 17.04), vpp-plugins (<< 17.08), openjdk-8-jre-headless -Suggests: vpp-nsh-plugin -Description: Honeycomb agent for VPP diff --git a/packaging/deb/xenial/debuild.sh b/packaging/deb/xenial/debuild.sh index 21e3b7a84..08d9b1974 100755 --- a/packaging/deb/xenial/debuild.sh +++ b/packaging/deb/xenial/debuild.sh @@ -3,6 +3,6 @@ set -xe DIR=$(dirname $0) DIR=$(readlink -f ${DIR}) -BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/../trusty/debian honeycomb.service /lib/systemd/system) +BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/../trusty/debian honeycomb.service /lib/systemd/system ${DIR}/build_dependencies) cp -r ${DIR}/debian/* ${BUILD_FOLDER}/debian/ ${DIR}/../common/debuild.sh ${BUILD_FOLDER}
\ No newline at end of file diff --git a/packaging/rpm/honeycomb.spec b/packaging/rpm/honeycomb.spec index 7047a340c..3c4e7efde 100644 --- a/packaging/rpm/honeycomb.spec +++ b/packaging/rpm/honeycomb.spec @@ -2,6 +2,7 @@ %define __jar_repack 0 %define _version %(./version) %define _release %(./release) +%define _vpp_dependencies %(./vpp_dependencies) Name: honeycomb Version: %{_version} @@ -18,7 +19,7 @@ License: Apache-1.0 URL: http://www.fd.io Source0: vpp-integration-distribution-%{_version}-SNAPSHOT-hc.zip Source1: honeycomb.service -Requires: vpp >= 17.04, vpp < 17.08, vpp-plugins >= 17.04, vpp-plugins < 17.08, java >= 1:1.8.0 +Requires: %{_vpp_dependencies}, java >= 1:1.8.0 # Required for creating honeycomb group Requires(pre): shadow-utils # Required for configuring systemd diff --git a/packaging/rpm/vpp_dependencies b/packaging/rpm/vpp_dependencies new file mode 100755 index 000000000..5090544b6 --- /dev/null +++ b/packaging/rpm/vpp_dependencies @@ -0,0 +1,6 @@ +#!/bin/bash +# defines vpp and vpp-plugins dependencies for rpm packages +# using range +echo "vpp >= 17.04, vpp < 17.07, vpp-plugins >= 17.04, vpp-plugins < 17.07" +# or specific vpp version +#echo "vpp = 17.04-rc1, vpp-plugins = 17.04-rc1" |