Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-pazpar2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: clone yaz
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: indexdata/yaz
path: yaz
Expand Down
2 changes: 1 addition & 1 deletion IDMETA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEBIAN_DIST="bullseye buster stretch"
UBUNTU_DIST="jammy focal bionic xenial trusty"
CENTOS_DIST="centos7 centos8"
CENTOS_DIST="centos7 centos8 centos9"
VERSION=1.14.1
19 changes: 11 additions & 8 deletions pazpar2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ for f in /usr/share/pazpar2/xsl/*.xsl; do
fi
done
if [ $1 = 1 ]; then
/sbin/chkconfig --add pazpar2
/sbin/service pazpar2 start > /dev/null 2>&1
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
/usr/bin/systemctl enable pazpar2 > /dev/null 2>&1
/usr/bin/systemctl start pazpar2 > /dev/null 2>&1
else
/sbin/service pazpar2 restart > /dev/null 2>&1
/usr/bin/systemctl restart pazpar2 > /dev/null 2>&1
fi
%preun
if [ $1 = 0 ]; then
/sbin/service pazpar2 stop > /dev/null 2>&1
/sbin/chkconfig --del pazpar2
/usr/bin/systemctl stop pazpar2 > /dev/null 2>&1
fi

%description -n pazpar2-js
Expand Down Expand Up @@ -104,8 +104,10 @@ cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
cp -r etc/settings/mkc ${RPM_BUILD_ROOT}/etc/pazpar2/settings
mkdir -p ${RPM_BUILD_ROOT}/usr/share/pazpar2/xsl
cp etc/xsl/*.xsl ${RPM_BUILD_ROOT}/usr/share/pazpar2/xsl
mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
install -m755 rpm/pazpar2.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2
mkdir -p ${RPM_BUILD_ROOT}/etc/systemd/system
install -m755 rpm/pazpar2.service ${RPM_BUILD_ROOT}/etc/systemd/system/pazpar2.service
mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig
install -m644 rpm/pazpar2.sysconfig ${RPM_BUILD_ROOT}/etc/sysconfig/pazpar2
echo "Alias /pazpar2 /usr/share/pazpar2" >${RPM_BUILD_ROOT}/etc/pazpar2/ap2pazpar2-js.cfg
mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
install -m644 rpm/pazpar2.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2
Expand All @@ -127,7 +129,8 @@ rm -fr ${RPM_BUILD_ROOT}
%config %{_sysconfdir}/pazpar2/settings/*.xml
%config %{_sysconfdir}/pazpar2/settings/*/*.xml
%config %{_sysconfdir}/pazpar2/services-available/*.xml
%config %{_sysconfdir}/rc.d/init.d/pazpar2
%config %{_sysconfdir}/sysconfig/pazpar2
%config %{_sysconfdir}/systemd/system/pazpar2.service
%config(noreplace) /etc/logrotate.d/pazpar2
%{_mandir}/man1/pazpar2*
%{_mandir}/man5/pazpar2*
Expand Down
82 changes: 0 additions & 82 deletions rpm/pazpar2.init

This file was deleted.

2 changes: 1 addition & 1 deletion rpm/pazpar2.logrotate
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
notifempty
postrotate
if [ -f /var/run/pazpar2.pid ]; then
/sbin/service pazpar2 restart > /dev/null
/user/bin/systemctl restart pazpar2 > /dev/null
fi
endscript
}
18 changes: 18 additions & 0 deletions rpm/pazpar2.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pazpar2 systemd-style configuration

[Unit]
Description=Pazpar2 Metasearcher
Documentation=man:pazpar2(8)
After=network.target

[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/pazpar2
Restart=on-abort
KillMode=process
PIDFile=${PP2_PID_FILE}
ExecStart=/bin/bash -ce "exec /usr/sbin/pazpar2 ${PP2_OPTIONS}"

[Install]
WantedBy=multi-user.target

4 changes: 4 additions & 0 deletions rpm/pazpar2.sysconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PP2_USER=nobody
PP2_LOG=/var/log/pazpar2
PP2_PID_FILE=/var/run/pazpar2.pid
PP2_OPTIONS="-u ${PP2_USER} -l ${PP2_LOG} -f /etc/pazpar2/server.xml -p $PP2_PID_FILE"