From ee0e460b2698abbefacbf67989aed570a371bae5 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Tue, 3 Jan 2017 02:24:38 +0900 Subject: [PATCH] dist/ubuntu: Fix package build error on Ubuntu 14.04/Debian 8 Since we moved to Java 8, we need to provide additional repository for distributions which doesn't have Java 8 on default repository. Fixes #37 Signed-off-by: Takuya ASADA Message-Id: <1483377878-17987-1-git-send-email-syuu@scylladb.com> --- dist/ubuntu/build_deb.sh | 20 ++++++++++++-------- dist/ubuntu/debian/control | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dist/ubuntu/build_deb.sh b/dist/ubuntu/build_deb.sh index 192589e..abb26f7 100755 --- a/dist/ubuntu/build_deb.sh +++ b/dist/ubuntu/build_deb.sh @@ -12,20 +12,24 @@ sudo apt-get -y update if [ ! -f /usr/bin/git ]; then sudo apt-get -y install git fi -if [ ! -f /usr/bin/mk-build-deps ]; then - sudo apt-get -y install devscripts -fi -if [ ! -f /usr/bin/equivs-build ]; then - sudo apt-get -y install equivs -fi if [ ! -f /usr/bin/lsb_release ]; then sudo apt-get -y install lsb-release fi - DISTRIBUTION=`lsb_release -i|awk '{print $3}'` RELEASE=`lsb_release -r|awk '{print $2}'` CODENAME=`lsb_release -c|awk '{print $2}'` +if [ "$RELEASE" = "14.04" ]; then + sudo apt-get -y install software-properties-common + sudo add-apt-repository -y ppa:openjdk-r/ppa + sudo apt-get -y update +fi + +if [ "$CODENAME" = "jessie" ]; then + sudo sh -c 'echo deb "http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list' + sudo apt-get -y update +fi + VERSION=$(./SCYLLA-VERSION-GEN) SCYLLA_VERSION=$(cat build/SCYLLA-VERSION-FILE | sed 's/\.rc/~rc/') SCYLLA_RELEASE=$(cat build/SCYLLA-RELEASE-FILE) @@ -49,5 +53,5 @@ fi cp dist/common/systemd/scylla-jmx.service.in debian/scylla-jmx.service sed -i -e "s#@@SYSCONFDIR@@#/etc/default#g" debian/scylla-jmx.service -echo Y | sudo mk-build-deps -i -r +sudo apt-get install -y debhelper maven openjdk-8-jdk-headless devscripts debuild -r fakeroot -us -uc diff --git a/dist/ubuntu/debian/control b/dist/ubuntu/debian/control index 223a171..66ae08e 100644 --- a/dist/ubuntu/debian/control +++ b/dist/ubuntu/debian/control @@ -4,11 +4,11 @@ Homepage: http://scylladb.com Section: database Priority: optional Standards-Version: 3.9.5 -Build-Depends: debhelper (>= 9), maven, default-jdk | java7-jdk | java8-jdk +Build-Depends: debhelper (>= 9), maven, openjdk-8-jdk-headless Package: scylla-jmx Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, default-jre-headless | java-runtime-headless, scylla-server +Depends: ${shlibs:Depends}, ${misc:Depends}, openjdk-8-jre-headless | openjdk-8-jre | oracle-java8-set-default, scylla-server Description: Scylla JMX server binaries Scylla is a highly scalable, eventually consistent, distributed, partitioned row DB.