dist: merge /usr/lib/scylla to /opt/scylladb

Since scylla-jmx uses /usr/lib/scylla/jmx for program directory, we also
need to move them under /opt/scylladb.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190618122451.27721-1-syuu@scylladb.com>
This commit is contained in:
Takuya ASADA 2019-06-18 21:24:51 +09:00 committed by Avi Kivity
parent 512638ed6e
commit f73da49f62
4 changed files with 22 additions and 14 deletions

View File

@ -20,7 +20,7 @@ SCYLLA_CONF=/etc/scylla
#SCYLLA_JMX_FILE="-cf /etc/scylla.d/scylla-user.cfg"
# The location of the jmx proxy jar file
SCYLLA_JMX_LOCAL="-l /usr/lib/scylla/jmx"
SCYLLA_JMX_LOCAL="-l /opt/scylladb/jmx"
# allow to run remotely
#SCYLLA_JMX_REMOTE="-r"

View File

@ -13,7 +13,7 @@ EnvironmentFile=/etc/sysconfig/scylla-jmx
{{/redhat}}
User=scylla
Group=scylla
ExecStart=/usr/lib/scylla/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG
ExecStart=/opt/scylladb/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG
KillMode=process
Restart=on-abnormal

View File

@ -1,7 +1,7 @@
#!/usr/bin/make -f
DOC = $(CURDIR)/debian/{{product}}-jmx/usr/share/doc/{{product}}-jmx
DEST = $(CURDIR)/debian/{{product}}-jmx/usr/lib/scylla/jmx
DOC = $(CURDIR)/debian/{{product}}-jmx/opt/scylladb/share/doc/{{product}}-jmx
DEST = $(CURDIR)/debian/{{product}}-jmx/opt/scylladb/jmx
M2_REPO= $(CURDIR)/m2
override_dh_auto_build:
@ -23,6 +23,10 @@ override_dh_auto_install:
mkdir $(DEST)/symlinks
ln -sf /usr/bin/java $(DEST)/symlinks/scylla-jmx
mkdir -p $(CURDIR)/debian/{{product}}-jmx/opt/scylladb/scripts
# Create symlink for /usr/lib/scylla/jmx
ln -sf /opt/scylladb/jmx $(CURDIR)/debian/{{product}}-jmx/opt/scylladb/scripts/
override_dh_installinit:
{{#scylla}}
dh_installinit --no-start

View File

@ -29,16 +29,19 @@ pystache dist/common/systemd/scylla-jmx.service.mustache "{ $MUSTACHE_DIST }" >
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/scylla/
mkdir -p $RPM_BUILD_ROOT/opt/scylladb/
install -m644 dist/common/sysconfig/scylla-jmx $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
install -m644 scylla-jmx.service $RPM_BUILD_ROOT%{_unitdir}/
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/scylla
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx/symlinks
install -m644 scylla-jmx-1.0.jar $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx/
install -m755 scylla-jmx $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx
ln -sf /usr/bin/java $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx/symlinks/scylla-jmx
install -d -m755 $RPM_BUILD_ROOT/opt/scylladb/
install -d -m755 $RPM_BUILD_ROOT/opt/scylladb/jmx
install -d -m755 $RPM_BUILD_ROOT/opt/scylladb/jmx/symlinks
install -m644 scylla-jmx-1.0.jar $RPM_BUILD_ROOT/opt/scylladb/jmx/
install -m755 scylla-jmx $RPM_BUILD_ROOT/opt/scylladb/jmx
ln -sf /usr/bin/java $RPM_BUILD_ROOT/opt/scylladb/jmx/symlinks/scylla-jmx
install -d -m755 $RPM_BUILD_ROOT/opt/scylladb/scripts
# create symlink for /usr/lib/scylla/jmx
ln -sf /opt/scylladb/jmx $RPM_BUILD_ROOT/opt/scylladb/scripts/
%pre
/usr/sbin/groupadd scylla 2> /dev/null || :
@ -71,9 +74,10 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/sysconfig/scylla-jmx
%{_unitdir}/scylla-jmx.service
%{_prefix}/lib/scylla/jmx/scylla-jmx
%{_prefix}/lib/scylla/jmx/scylla-jmx-1.0.jar
%{_prefix}/lib/scylla/jmx/symlinks/scylla-jmx
/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>