From 18f8acc60ef904df069a230b40487b4dc4ce4275 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Mon, 11 May 2020 17:54:02 +0900 Subject: [PATCH] dist/redhat: drop dependency on pystache Same as https://github.com/scylladb/scylla/pull/6313, drop dependency on pystache since it nolong present in Fedora 32. --- dist/redhat/build_rpm.sh | 17 ++++++++--------- ...scylla-jmx.spec.mustache => scylla-jmx.spec} | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) rename dist/redhat/{scylla-jmx.spec.mustache => scylla-jmx.spec} (86%) diff --git a/dist/redhat/build_rpm.sh b/dist/redhat/build_rpm.sh index 0cc93a4..7564649 100755 --- a/dist/redhat/build_rpm.sh +++ b/dist/redhat/build_rpm.sh @@ -53,13 +53,6 @@ fi if [ ! -f /usr/bin/git ]; then pkg_install git fi -if [ ! -f /usr/bin/pystache ]; then - if is_redhat_variant; then - sudo yum install -y python2-pystache || sudo yum install -y pystache - elif is_debian_variant; then - sudo apt-get install -y python-pystache - fi -fi SCYLLA_VERSION=$(cat SCYLLA-VERSION-FILE) SCYLLA_RELEASE=$(cat SCYLLA-RELEASE-FILE) @@ -69,7 +62,13 @@ RPMBUILD=$(readlink -f ../) mkdir -p $RPMBUILD/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} ln -fv $RELOC_PKG $RPMBUILD/SOURCES/ -pystache dist/redhat/scylla-jmx.spec.mustache "{ \"version\": \"$SCYLLA_VERSION\", \"release\": \"$SCYLLA_RELEASE\", \"product\": \"$PRODUCT\", \"$PRODUCT\": true }" > $RPMBUILD/SPECS/scylla-jmx.spec +parameters=( + -D"version $SCYLLA_VERSION" + -D"release $SCYLLA_RELEASE" + -D"product $PRODUCT" +) + +cp dist/redhat/scylla-jmx.spec $RPMBUILD/SPECS # this rpm can be install on both fedora / centos7, so drop distribution name from the file name -rpmbuild -ba --define '_binary_payload w2.xzdio' --define "_topdir $RPMBUILD" --undefine "dist" $RPM_JOBS_OPTS $RPMBUILD/SPECS/scylla-jmx.spec +rpmbuild -ba "${parameters[@]}" --define '_binary_payload w2.xzdio' --define "_topdir $RPMBUILD" --undefine "dist" $RPM_JOBS_OPTS $RPMBUILD/SPECS/scylla-jmx.spec diff --git a/dist/redhat/scylla-jmx.spec.mustache b/dist/redhat/scylla-jmx.spec similarity index 86% rename from dist/redhat/scylla-jmx.spec.mustache rename to dist/redhat/scylla-jmx.spec index ccfd0c7..1c9e4cc 100644 --- a/dist/redhat/scylla-jmx.spec.mustache +++ b/dist/redhat/scylla-jmx.spec @@ -1,6 +1,6 @@ -Name: {{product}}-jmx -Version: {{version}} -Release: {{release}}%{?dist} +Name: %{product}-jmx +Version: %{version} +Release: %{release}%{?dist} Summary: Scylla JMX Group: Applications/Databases @@ -10,9 +10,7 @@ Source0: scylla-jmx-package.tar.gz BuildArch: noarch BuildRequires: systemd-units -BuildRequires: pystache -%{?rhel:BuildRequires: python-setuptools} -Requires: {{product}}-server java-1.8.0-openjdk-headless +Requires: %{product}-server java-1.8.0-openjdk-headless %description