You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2020/01/31 18:25:16 UTC
[couchdb-pkg] branch master updated: Parametrise SM ver for dpkg
builds
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git
The following commit(s) were added to refs/heads/master by this push:
new 3f6877a Parametrise SM ver for dpkg builds
3f6877a is described below
commit 3f6877ace7e42cb25fba1718f183440d94a0f9f1
Author: Joan Touzet <wo...@apache.org>
AuthorDate: Thu Jan 30 23:47:44 2020 -0800
Parametrise SM ver for dpkg builds
Now picks SM60 for debian-buster (except on arm64)
Still uses SM 1.8.5 for all other dpkg + rpm builds
---
.gitignore | 1 +
Makefile | 49 +++++++++++++++++++++++++++++++++++--------------
build.sh | 15 ++++++++-------
debian/control | 4 ++--
debian/rules | 4 +++-
5 files changed, 49 insertions(+), 24 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8d7d35c..944cddd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ debian/*.substvars
debian/files
debian/couchdb
debian/tmp
+debian/control.bak
js/build
rpm/BUILD
rpm/BUILDROOT
diff --git a/Makefile b/Makefile
index d05f62e..89d07bd 100644
--- a/Makefile
+++ b/Makefile
@@ -30,39 +30,53 @@ else
PKGARCH=$(shell arch)
endif
-# Debian default
-debian: find-couch-dist copy-debian update-changelog dpkg lintian copy-pkgs
+# Overridden for targets with SM60 in per-target env vars below.
+SPIDERMONKEY=couch-libmozjs185-1.0
+SPIDERMONKEY_DEV=couch-libmozjs185-dev
+SM_VER=1.8.5
+
-# Debian 8
-debian-jessie: PLATFORM=jessie
-debian-jessie: DIST=debian-jessie
-debian-jessie: jessie
-jessie: debian
+# Debian default
+debian: sm-ver find-couch-dist copy-debian update-changelog dpkg lintian copy-pkgs
-# Debian 9
+# Debian 9 - stretch
debian-stretch: PLATFORM=stretch
debian-stretch: DIST=debian-stretch
debian-stretch: stretch
-# AArch64 Debian 9
-# Lintian doesn't install correctly into a cross-built Docker container ?!
+
arm64v8-debian-stretch: aarch64-debian-stretch
aarch64-debian-stretch: PLATFORM=stretch
aarch64-debian-stretch: DIST=debian-stretch
aarch64-debian-stretch: stretch
+
ppc64le-debian-stretch: PLATFORM=stretch
ppc64le-debian-stretch: DIST=debian-stretch
ppc64le-debian-stretch: stretch
+
stretch: debian
-# Debian 10
+# Debian 10 - buster
debian-buster: PLATFORM=buster
debian-buster: DIST=debian-buster
+debian-buster: SPIDERMONKEY=libmozjs-60-0
+debian-buster: SPIDERMONKEY_DEV=libmozjs-60-dev
+debian-buster: SM_VER=60
debian-buster: buster
-# Lintian doesn't install correctly into a cross-built Docker container ?!
+
+# Blacklist arm64 from SM60 for now.
+# See https://github.com/apache/couchdb/issues/2423 for details.
arm64v8-debian-buster: aarch64-debian-buster
aarch64-debian-buster: PLATFORM=buster
aarch64-debian-buster: DIST=debian-buster
aarch64-debian-buster: buster
+
+ppc64le-debian-buster: PLATFORM=buster
+ppc64le-debian-buster: DIST=debian-buster
+ppc64le-debian-buster: SPIDERMONKEY=libmozjs-60-0
+ppc64le-debian-buster: SPIDERMONKEY_DEV=libmozjs-60-dev
+ppc64le-debian-buster: SM_VER=60
+ppc64le-debian-buster: buster
+
buster: debian
@@ -97,6 +111,7 @@ centos8: make-rpmbuild centos
openSUSE: centos7
+
# ######################################
get-couch:
mkdir -p $(COUCHDIR)
@@ -115,6 +130,12 @@ build-couch:
cd $(COUCHDIR) && make dist
# ######################################
+sm-ver:
+ cp debian/control debian/control.bak
+ sed -i 's/%SPIDERMONKEY%/$(SPIDERMONKEY)/g' debian/control
+ sed -i 's/%SPIDERMONKEY_DEV%/$(SPIDERMONKEY_DEV)/g' debian/control
+ echo 'SM_VER = $(SM_VER)' > debian/sm_ver.mk
+
find-couch-dist:
$(eval SHORTDISTDIR := $(shell cd $(COUCHDIR) && find . -type d -name apache-couchdb-\*))
$(eval VERSION := $(shell echo $(SHORTDISTDIR) | sed 's/.\/apache-couchdb-//'))
@@ -150,14 +171,14 @@ build-rpm:
export HOME=$(HOME) && cd ../rpmbuild && rpmbuild --verbose -bb SPECS/couchdb.spec --define '_version $(VERSION)'
# ######################################
-
copy-pkgs:
chmod a+rwx $(PKGDIR)/couchdb*
mkdir -p pkgs/couch/$(DIST) && chmod 777 pkgs/couch/$(DIST)
cp $(PKGDIR)/couchdb* pkgs/couch/$(DIST)
clean:
- rm -rf parts prime stage js/build
+ if [ -f debian/control.bak ]; then mv -f debian/control.bak debian/control; fi
+ rm -rf parts prime stage js/build debian/sm_ver.mk
# ######################################
couch-js-clean:
diff --git a/build.sh b/build.sh
index abe27db..f309160 100755
--- a/build.sh
+++ b/build.sh
@@ -29,15 +29,15 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# TODO derive these by interrogating the Docker repo rather tha
# hard coding the list
-DEBIANS="debian-stretch aarch64-debian-stretch debian-buster aarch64-debian-buster"
-UBUNTUS="ubuntu-trusty ubuntu-xenial ubuntu-bionic"
-debs="(debian-stretch|aarch64-debian-stretch|debian-buster|aarch64-debian-buster|ubuntu-trusty|ubuntu-xenial|ubuntu-bionic)"
+DEBIANS="debian-stretch debian-buster arm64v8-debian-buster ppc64le-debian-buster"
+UBUNTUS="ubuntu-xenial ubuntu-bionic"
+debs="(debian-stretch|debian-buster|arm64v8-debian-buster|ppc64le-debian-buster|ubuntu-xenial|ubuntu-bionic)"
-CENTOSES="centos-6 centos-7"
-rpms="(centos-6|centos-7)"
+CENTOSES="centos-6 centos-7 centos-8"
+rpms="(centos-6|centos-7|centos-8)"
BINTRAY_API="https://api.bintray.com"
-ERLANGVERSION=${ERLANGVERSION:-19.3.6}
+ERLANGVERSION=${ERLANGVERSION:-20.3.8.25-1}
build-js() {
@@ -165,9 +165,10 @@ build-couch() {
# $1 is plat, $2 is the optional path to a dist tarball
docker run \
--mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
- -w /home/jenkins/couchdb-pkg \
+ -u 0 -w /home/jenkins/couchdb-pkg \
couchdbdev/$1-erlang-${ERLANGVERSION} \
make copy-couch $1 COUCHTARBALL=${COUCHTARBALL}
+ make clean
}
build-all-couch() {
diff --git a/debian/control b/debian/control
index 4cd59a3..789a868 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 9),
help2man,
libcurl4-openssl-dev,
libicu-dev,
- couch-libmozjs185-dev,
+ %SPIDERMONKEY_DEV%,
lsb-release,
po-debconf,
python3,
@@ -32,7 +32,7 @@ Depends: adduser,
curl,
debconf,
init-system-helpers,
- couch-libmozjs185-1.0,
+ %SPIDERMONKEY%,
lsb-base,
procps,
${misc:Depends},
diff --git a/debian/rules b/debian/rules
index c767158..5bda270 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,8 @@
# License for the specific language governing permissions and limitations under
# the License.
+include debian/sm_ver.mk
+
%:
dh $@ --with=systemd
@@ -20,7 +22,7 @@ override_dh_auto_clean:
-mv src/mango/src/mango_cursor_text.nocompile src/mango/src/mango_cursor_text.erl
override_dh_auto_configure:
- ./configure -c
+ ./configure -c --spidermonkey-version $(SM_VER)
override_dh_auto_build:
dh_auto_build -- release