31e6bcf9be
Same as scylladb/scylla-ami#53, it seems like rpm macro %systemd_postun requires one argument starting from Fedora 31, otherwise it causes the error. The solution is passing systemd unit name just like %systemd_post and %systemd_preun. see: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/TU3T2ZYY67SMAJFR2TD4HY6SCPPDVS5V/ Fixes #87 Signed-off-by: Takuya ASADA <syuu@scylladb.com> Message-Id: <20191205120514.9382-1-syuu@scylladb.com>
68 lines
1.5 KiB
Plaintext
68 lines
1.5 KiB
Plaintext
Name: {{product}}-jmx
|
|
Version: {{version}}
|
|
Release: {{release}}%{?dist}
|
|
Summary: Scylla JMX
|
|
Group: Applications/Databases
|
|
|
|
License: AGPLv3
|
|
URL: http://www.scylladb.com/
|
|
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
|
|
|
|
%description
|
|
|
|
|
|
%prep
|
|
%setup -c
|
|
|
|
|
|
%build
|
|
|
|
%install
|
|
./install.sh --root "$RPM_BUILD_ROOT"
|
|
|
|
%pre
|
|
/usr/sbin/groupadd scylla 2> /dev/null || :
|
|
/usr/sbin/useradd -g scylla -s /sbin/nologin -r -d ${_sharedstatedir}/scylla scylla 2> /dev/null || :
|
|
ping -c1 `hostname` > /dev/null 2>&1
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "**************************************************************"
|
|
echo "* WARNING: You need to add hostname on /etc/hosts, otherwise *"
|
|
echo "* scylla-jmx will not able to start up. *"
|
|
echo "**************************************************************"
|
|
echo
|
|
fi
|
|
|
|
%post
|
|
%systemd_post scylla-jmx.service
|
|
|
|
%preun
|
|
%systemd_preun scylla-jmx.service
|
|
|
|
%postun
|
|
%systemd_postun scylla-jmx.service
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/scylla-jmx
|
|
%{_unitdir}/scylla-jmx.service
|
|
/opt/scylladb/jmx/scylla-jmx
|
|
/opt/scylladb/jmx/scylla-jmx-1.0.jar
|
|
/opt/scylladb/jmx/symlinks/scylla-jmx
|
|
/opt/scylladb/scripts/jmx
|
|
|
|
%changelog
|
|
* Fri Aug 7 2015 Takuya ASADA Takuya ASADA <syuu@cloudius-systems.com>
|
|
- inital version of scylla-tools.spec
|