Accepting request 203238 from KDE:Distro:Factory
- Utilize the unit file rather than old initscript (forwarded request 203236 from scarabeus_iv) OBS-URL: https://build.opensuse.org/request/show/203238 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quassel?expand=0&rev=13
This commit is contained in:
parent
c41086cf26
commit
0bb64d5dce
105
init.quasselcore
105
init.quasselcore
@ -1,105 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: quasselcore
|
|
||||||
# Required-Start: $syslog $remote_fs $network
|
|
||||||
# Should-Start: $time $named
|
|
||||||
# Required-Stop: $syslog $remote_fs $network
|
|
||||||
# Should-Stop: $null
|
|
||||||
# Default-Start: 3 5
|
|
||||||
# Default-Stop: 0 1 2 6
|
|
||||||
# Short-Description: quassel core daemon
|
|
||||||
# Description: Start quassel core
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
|
|
||||||
# Check for missing binaries (stale symlinks should not happen)
|
|
||||||
# Note: Special treatment of stop for LSB conformance
|
|
||||||
QUASSELCORE_BIN=/usr/bin/quasselcore
|
|
||||||
test -x $QUASSELCORE_BIN || { echo "$QUASSELCORE_BIN not installed";
|
|
||||||
if [ "$1" = "stop" ]; then exit 0;
|
|
||||||
else exit 5; fi; }
|
|
||||||
|
|
||||||
# Check for existence of needed config file and read it
|
|
||||||
QUASSELCORE_CONFIG=/etc/sysconfig/quasselcore
|
|
||||||
test -r $QUASSELCORE_CONFIG || { echo "$QUASSELCORE_CONFIG not existing";
|
|
||||||
if [ "$1" = "stop" ]; then exit 0;
|
|
||||||
else exit 6; fi; }
|
|
||||||
|
|
||||||
# Read config
|
|
||||||
. $QUASSELCORE_CONFIG
|
|
||||||
|
|
||||||
QUASSELCORE_USERID=quasselcore
|
|
||||||
QUASSELCORE_GROUPID=quasselcore
|
|
||||||
: ${QUASSELCORE_LISTEN:=127.0.0.1}
|
|
||||||
|
|
||||||
. /etc/rc.status
|
|
||||||
|
|
||||||
# Reset status of this service
|
|
||||||
rc_reset
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
echo -n "Starting quassel core"
|
|
||||||
/sbin/startproc -u ${QUASSELCORE_USERID} -g ${QUASSELCORE_GROUPID} \
|
|
||||||
$QUASSELCORE_BIN --configdir=/var/lib/quasselcore --listen="${QUASSELCORE_LISTEN/ /,}" \
|
|
||||||
--logfile=/var/log/quassel/quasselcore &>/var/log/quassel/rcquasselcore.out
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
echo -n "Shutting down quassel core"
|
|
||||||
/sbin/killproc -TERM $QUASSELCORE_BIN
|
|
||||||
sleep 1
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
try-restart|condrestart)
|
|
||||||
if test "$1" = "condrestart"; then
|
|
||||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
|
||||||
fi
|
|
||||||
$0 status
|
|
||||||
if test $? = 0; then
|
|
||||||
$0 restart
|
|
||||||
else
|
|
||||||
rc_reset # Not running is not a failure.
|
|
||||||
fi
|
|
||||||
rc_status
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
$0 start
|
|
||||||
rc_status
|
|
||||||
;;
|
|
||||||
force-reload)
|
|
||||||
echo -n "Reload service quassel core"
|
|
||||||
## if it supports it:
|
|
||||||
#/sbin/killproc -HUP $QUASSELCORE_BIN
|
|
||||||
#touch /var/run/FOO.pid
|
|
||||||
#rc_status -v
|
|
||||||
|
|
||||||
## Otherwise:
|
|
||||||
$0 try-restart
|
|
||||||
#rc_status
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
#echo -n "Reload service quassel core"
|
|
||||||
#/sbin/killproc -HUP $QUASSELCORE_BIN
|
|
||||||
#touch /var/run/FOO.pid
|
|
||||||
#rc_status -v
|
|
||||||
|
|
||||||
## Otherwise if it does not support reload:
|
|
||||||
rc_failed 3
|
|
||||||
#rc_status -v
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
echo -n "Checking for service quassel core"
|
|
||||||
/sbin/checkproc $QUASSELCORE_BIN
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
probe)
|
|
||||||
#test /var/lib/quasselcore/quasselcore.conf -nt /var/run/quasselcore.pid && echo reload
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
rc_exit
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2e3fe06ae3731c829aa3c2f6bb5320619bad264c831f322985c3aa3fe58b6027
|
|
||||||
size 2751143
|
|
3
quassel-0.9.1.tar.bz2
Normal file
3
quassel-0.9.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:39e97bd67160d6575a57d4f71c4b1be5c13461ca238baef462ab43164419864e
|
||||||
|
size 2777104
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 14 12:14:21 UTC 2013 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Utilize the unit file rather than old initscript
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 13 15:34:00 UTC 2013 - herbert@graeber-clan.de
|
||||||
|
|
||||||
|
- Version bump to 0.9.1 (no official changelog available):
|
||||||
|
* Important update for PostgreSQL users, preventing database
|
||||||
|
corruption. (bnc#845511)
|
||||||
|
* Fixes related to key handling for encrypted channels.
|
||||||
|
* Other fixes.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 9 17:01:34 UTC 2013 - tchvatal@suse.com
|
Fri Aug 9 17:01:34 UTC 2013 - tchvatal@suse.com
|
||||||
|
|
||||||
|
22
quassel.spec
22
quassel.spec
@ -17,14 +17,14 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: quassel
|
Name: quassel
|
||||||
Version: 0.9.0
|
Version: 0.9.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Modern, cross-platform, distributed IRC client
|
Summary: Modern, cross-platform, distributed IRC client
|
||||||
License: GPL-2.0 or GPL-3.0
|
License: GPL-2.0 or GPL-3.0
|
||||||
Group: Productivity/Networking/IRC
|
Group: Productivity/Networking/IRC
|
||||||
Url: http://%{name}-irc.org/
|
Url: http://%{name}-irc.org/
|
||||||
Source: http://%{name}-irc.org/pub/%{name}-%{version}.tar.bz2
|
Source: http://%{name}-irc.org/pub/%{name}-%{version}.tar.bz2
|
||||||
Source1: init.%{name}core
|
Source1: service.%{name}core
|
||||||
Source2: sysconfig.%{name}core
|
Source2: sysconfig.%{name}core
|
||||||
Source3: logrotate.%{name}core
|
Source3: logrotate.%{name}core
|
||||||
Source4: %{name}.SuSEfirewall2
|
Source4: %{name}.SuSEfirewall2
|
||||||
@ -33,6 +33,8 @@ BuildRequires: libQtWebKit-devel
|
|||||||
BuildRequires: libdbusmenu-qt-devel
|
BuildRequires: libdbusmenu-qt-devel
|
||||||
BuildRequires: libkde4-devel
|
BuildRequires: libkde4-devel
|
||||||
BuildRequires: libqca2-devel
|
BuildRequires: libqca2-devel
|
||||||
|
BuildRequires: systemd
|
||||||
|
%{?systemd_requires}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRecommends:libdbusmenu-qt-devel
|
BuildRecommends:libdbusmenu-qt-devel
|
||||||
|
|
||||||
@ -154,8 +156,10 @@ sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/common/main.cpp
|
|||||||
%fdupes %{buildroot}
|
%fdupes %{buildroot}
|
||||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}core
|
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}core
|
||||||
install -d -m 755 %{buildroot}%{_kde4_sbindir}
|
install -d -m 755 %{buildroot}%{_kde4_sbindir}
|
||||||
install -D -m 755 %{SOURCE1} %{buildroot}%{_kde4_sysconfdir}/init.d/%{name}core
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
ln -sf ../../%{_kde4_sysconfdir}/init.d/%{name}core %{buildroot}%{_kde4_sbindir}/rc%{name}core
|
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/quasselcore.service
|
||||||
|
# Provide SUSE policy symlink /usr/sbin/rcFOO -> /etc/init.d/FOO
|
||||||
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcquasselcore
|
||||||
install -D -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}core
|
install -D -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}core
|
||||||
install -d -m 751 %{buildroot}%{_localstatedir}/log/%{name}
|
install -d -m 751 %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
install -D -m 644 %{SOURCE3} %{buildroot}%{_kde4_sysconfdir}/logrotate.d/%{name}core
|
install -D -m 644 %{SOURCE3} %{buildroot}%{_kde4_sysconfdir}/logrotate.d/%{name}core
|
||||||
@ -165,16 +169,16 @@ install -D -m 644 %{SOURCE4} %{buildroot}%{_kde4_sysconfdir}/sysconfig/SuSEfirew
|
|||||||
%{_kde4_bindir}/getent group %{name}core >/dev/null || %{_kde4_sbindir}/groupadd -r %{name}core || :
|
%{_kde4_bindir}/getent group %{name}core >/dev/null || %{_kde4_sbindir}/groupadd -r %{name}core || :
|
||||||
%{_kde4_bindir}/getent passwd %{name}core >/dev/null || %{_kde4_sbindir}/useradd -r -d /var/lib/%{name}core \
|
%{_kde4_bindir}/getent passwd %{name}core >/dev/null || %{_kde4_sbindir}/useradd -r -d /var/lib/%{name}core \
|
||||||
-s /bin/false -c "%{name}core daemon" -g %{name}core %{name}core || :
|
-s /bin/false -c "%{name}core daemon" -g %{name}core %{name}core || :
|
||||||
|
%service_add_pre quasselcore.service
|
||||||
|
|
||||||
%post core
|
%post core
|
||||||
%{fillup_and_insserv -yn %{name}core %{name}core}
|
%service_add_post quasselcore.service
|
||||||
|
|
||||||
%preun core
|
%preun core
|
||||||
%{stop_on_removal %{name}core}
|
%service_del_preun quasselcore.service
|
||||||
|
|
||||||
%postun core
|
%postun core
|
||||||
%{restart_on_update %{name}core}
|
%service_del_postun quasselcore.service
|
||||||
%{insserv_cleanup}
|
|
||||||
|
|
||||||
%files mono
|
%files mono
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -193,7 +197,7 @@ install -D -m 644 %{SOURCE4} %{buildroot}%{_kde4_sysconfdir}/sysconfig/SuSEfirew
|
|||||||
%doc AUTHORS ChangeLog README
|
%doc AUTHORS ChangeLog README
|
||||||
%{_kde4_bindir}/%{name}core
|
%{_kde4_bindir}/%{name}core
|
||||||
%{_kde4_sbindir}/rc%{name}core
|
%{_kde4_sbindir}/rc%{name}core
|
||||||
%config %{_kde4_sysconfdir}/init.d/%{name}core
|
%{_unitdir}/%{name}core.service
|
||||||
%config(noreplace) %{_kde4_sysconfdir}/logrotate.d/%{name}core
|
%config(noreplace) %{_kde4_sysconfdir}/logrotate.d/%{name}core
|
||||||
%config %{_kde4_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
%config %{_kde4_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
||||||
%attr(-,%{name}core,%{name}core) %dir %{_localstatedir}/lib/%{name}core
|
%attr(-,%{name}core,%{name}core) %dir %{_localstatedir}/lib/%{name}core
|
||||||
|
12
service.quasselcore
Normal file
12
service.quasselcore
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Quassel Core
|
||||||
|
After=network.target
|
||||||
|
EnvironmentFile=-/etc/sysconfig/quasselcore
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
PIDFile=/var/run/quassel.pid
|
||||||
|
User=quasselcore
|
||||||
|
ExecStart=/usr/bin/quasselcore --listen=$QUASSELCORE_LISTEN --configdir=/var/lib/quasselcore --logfile=/var/log/quassel/quasselcore
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -7,6 +7,6 @@
|
|||||||
#
|
#
|
||||||
# Interfaces the quassel core should listen on
|
# Interfaces the quassel core should listen on
|
||||||
#
|
#
|
||||||
QUASSELCORE_LISTEN=""
|
QUASSELCORE_LISTEN="127.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user