From e733c2aae89099c702c2dc612be5b82be9262819 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Wed, 13 Apr 2016 20:37:46 +0000 Subject: [PATCH 1/6] dist/ubuntu/dep: use distribution's thrift-compiler-0.9.1 on newer versions of Ubuntu Use distribution's thrift if version > 14.04LTS. 14.04LTS doesn't have thrift-compiler-0.9.1, use our version. Signed-off-by: Takuya ASADA --- dist/ubuntu/dep/build_dependency.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/ubuntu/dep/build_dependency.sh b/dist/ubuntu/dep/build_dependency.sh index dda2b7fe2f..c5f1734d6f 100755 --- a/dist/ubuntu/dep/build_dependency.sh +++ b/dist/ubuntu/dep/build_dependency.sh @@ -48,8 +48,8 @@ fi if [ "$RELEASE" = "14.04" ]; then sudo gdebi -n build/antlr3_*.deb + sudo gdebi -n build/thrift-compiler_*.deb fi sudo gdebi -n build/antlr3-c++-dev_*.deb sudo gdebi -n build/libthrift0_*.deb sudo gdebi -n build/libthrift-dev_*.deb -sudo gdebi -n build/thrift-compiler_*.deb From d5efa02eab566faea7daf3ef35ffb908a6c10cb8 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Wed, 13 Apr 2016 23:00:09 +0000 Subject: [PATCH 2/6] dist/ubuntu/dep: Drop python-support on Ubuntu 16.04 Ubuntu 16.04 seems dropped python-support, so remove it from thrift package. Signed-off-by: Takuya ASADA --- dist/ubuntu/dep/build_dependency.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/ubuntu/dep/build_dependency.sh b/dist/ubuntu/dep/build_dependency.sh index c5f1734d6f..5f62ad1549 100755 --- a/dist/ubuntu/dep/build_dependency.sh +++ b/dist/ubuntu/dep/build_dependency.sh @@ -41,6 +41,10 @@ if [ ! -f build/libthrift0_1.0.0-dev_amd64.deb ]; then tar xpf thrift-0.9.1.tar.gz cd thrift-0.9.1 patch -p0 < ../../dist/ubuntu/dep/thrift.diff + if [ "$RELEASE" = "16.04" ]; then + sed -i "s/, python-support//" debian/control + sed -i "s/dh_pysupport//" debian/rules + fi echo Y | sudo mk-build-deps -i -r debuild -r fakeroot --no-tgz-check -us -uc cd ../.. From eae881ff70a52a44b6f646e325da2c72cdb81975 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Thu, 14 Apr 2016 06:59:42 +0900 Subject: [PATCH 3/6] dist/ubuntu: skip dh_installinit --upstart-only on recent versions of Ubuntu Since 16.04LTS does not support this argument anymore, drop it on recent version of Ubuntu which does not uses Upstart. Signed-off-by: Takuya ASADA --- dist/ubuntu/build_deb.sh | 10 ++++++++++ dist/ubuntu/rules.in | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/ubuntu/build_deb.sh b/dist/ubuntu/build_deb.sh index 8b67dd6e89..9656b951f8 100755 --- a/dist/ubuntu/build_deb.sh +++ b/dist/ubuntu/build_deb.sh @@ -55,6 +55,16 @@ else sed -i -e "s/@@COMPILER@@/g++-5/g" debian/rules sed -i -e "s/@@COMPILER@@/g++-5/g" debian/control fi +if [ "$RELEASE" = "14.04" ]; then + sed -i -e "s/@@DH_INSTALLINIT@@/--upstart-only/g" debian/rules + sed -i -e "s/@@COMPILER@@/g++-5/g" debian/rules + sed -i -e "s/@@BUILD_DEPENDS@@/g++-5/g" debian/control +else + sed -i -e "s/@@DH_INSTALLINIT@@//g" debian/rules + sed -i -e "s/@@COMPILER@@/g++/g" debian/rules + sed -i -e "s/@@BUILD_DEPENDS@@/libsystemd-dev, g++/g" debian/control +fi + cp dist/common/systemd/scylla-server.service.in debian/scylla-server.service sed -i -e "s#@@SYSCONFDIR@@#/etc/default#g" debian/scylla-server.service diff --git a/dist/ubuntu/rules.in b/dist/ubuntu/rules.in index 87cbcbe6c9..1db0adb15b 100755 --- a/dist/ubuntu/rules.in +++ b/dist/ubuntu/rules.in @@ -81,7 +81,7 @@ override_dh_auto_install: cp $(CURDIR)/scylla-gdb.py $(CURDIR)/debian/scylla-server-dbg/usr/lib/scylla override_dh_installinit: - dh_installinit --no-start --upstart-only + dh_installinit --no-start @@DH_INSTALLINIT@@ override_dh_strip: dh_strip --dbg-package=scylla-server-dbg From fa0b90b727d255114063a443f1cc175ed5619b24 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Wed, 13 Apr 2016 23:21:32 +0000 Subject: [PATCH 4/6] dist/ubuntu: add dependency for libsystemd-dev to handle startup correctly on recent versions of Ubuntu To handle scylla startup correctly on systemd versions of Ubuntu, scylla requires to build with libsystemd-dev. Signed-off-by: Takuya ASADA --- dist/ubuntu/build_deb.sh | 7 ------- dist/ubuntu/control.in | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dist/ubuntu/build_deb.sh b/dist/ubuntu/build_deb.sh index 9656b951f8..de4ed15a23 100755 --- a/dist/ubuntu/build_deb.sh +++ b/dist/ubuntu/build_deb.sh @@ -48,13 +48,6 @@ sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" debian/changelog sed -i -e "s/@@CODENAME@@/$CODENAME/g" debian/changelog cp dist/ubuntu/rules.in debian/rules cp dist/ubuntu/control.in debian/control -if [ "$RELEASE" = "15.10" ]; then - sed -i -e "s/@@COMPILER@@/g++/g" debian/rules - sed -i -e "s/@@COMPILER@@/g++/g" debian/control -else - sed -i -e "s/@@COMPILER@@/g++-5/g" debian/rules - sed -i -e "s/@@COMPILER@@/g++-5/g" debian/control -fi if [ "$RELEASE" = "14.04" ]; then sed -i -e "s/@@DH_INSTALLINIT@@/--upstart-only/g" debian/rules sed -i -e "s/@@COMPILER@@/g++-5/g" debian/rules diff --git a/dist/ubuntu/control.in b/dist/ubuntu/control.in index 82451c4fea..3ad4f87e2f 100644 --- a/dist/ubuntu/control.in +++ b/dist/ubuntu/control.in @@ -4,7 +4,7 @@ Homepage: http://scylladb.com Section: database Priority: optional Standards-Version: 3.9.5 -Build-Depends: debhelper (>= 9), libyaml-cpp-dev, liblz4-dev, libsnappy-dev, libcrypto++-dev, libjsoncpp-dev, libaio-dev, libthrift-dev, thrift-compiler, antlr3, antlr3-c++-dev, ragel, ninja-build, git, libboost-program-options1.55-dev | libboost-program-options-dev, libboost-filesystem1.55-dev | libboost-filesystem-dev, libboost-system1.55-dev | libboost-system-dev, libboost-thread1.55-dev | libboost-thread-dev, libboost-test1.55-dev | libboost-test-dev, libgnutls28-dev, libhwloc-dev, libnuma-dev, libpciaccess-dev, xfslibs-dev, python3-pyparsing, libxml2-dev, @@COMPILER@@ +Build-Depends: debhelper (>= 9), libyaml-cpp-dev, liblz4-dev, libsnappy-dev, libcrypto++-dev, libjsoncpp-dev, libaio-dev, libthrift-dev, thrift-compiler, antlr3, antlr3-c++-dev, ragel, ninja-build, git, libboost-program-options1.55-dev | libboost-program-options-dev, libboost-filesystem1.55-dev | libboost-filesystem-dev, libboost-system1.55-dev | libboost-system-dev, libboost-thread1.55-dev | libboost-thread-dev, libboost-test1.55-dev | libboost-test-dev, libgnutls28-dev, libhwloc-dev, libnuma-dev, libpciaccess-dev, xfslibs-dev, python3-pyparsing, libxml2-dev, @@BUILD_DEPENDS@@ Package: scylla-server Architecture: amd64 From 988b7bcd3d828b086f79c67442bbadc736227bdc Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Thu, 14 Apr 2016 19:52:37 +0000 Subject: [PATCH 5/6] dist/ubuntu: don't use ubuntu-toolchain-r/test ppa repo on recent versions of Ubuntu, since it has newer g++ On Ubuntu 15.04 and newer, official g++ package is >= g++-4.9. So we don't need to use development repository, just use official package. Signed-off-by: Takuya ASADA --- dist/ubuntu/build_deb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/ubuntu/build_deb.sh b/dist/ubuntu/build_deb.sh index de4ed15a23..8fa77d04de 100755 --- a/dist/ubuntu/build_deb.sh +++ b/dist/ubuntu/build_deb.sh @@ -63,7 +63,7 @@ sed -i -e "s#@@SYSCONFDIR@@#/etc/default#g" debian/scylla-server.service ./dist/ubuntu/dep/build_dependency.sh -if [ "$RELEASE" != "15.10" ]; then +if [ "$RELEASE" = "14.04" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get -y update fi From 1cfde501023c8c865be5fa991238869f1c02bf81 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Wed, 13 Apr 2016 23:24:38 +0000 Subject: [PATCH 6/6] dist/ubuntu: support 16.04 Drop 'unsupported release' message on 16.04. Signed-off-by: Takuya ASADA --- dist/ubuntu/supported_release | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/ubuntu/supported_release b/dist/ubuntu/supported_release index f5092f8357..544cfae850 100644 --- a/dist/ubuntu/supported_release +++ b/dist/ubuntu/supported_release @@ -1,2 +1,3 @@ 14.04 15.10 +16.04