forked from pool/boinc-client
- Remove unused patch:
* boinc-completion.patch - Remove comments with unused patches - Remove conditionals with inits as we don't build for such release anyway - Provide rcboinc symlink for easier usage. OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=36
This commit is contained in:
parent
747fc3c60c
commit
6c6423086e
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 17 13:13:14 UTC 2014 - tchvatal@suse.com
|
||||
|
||||
- Remove unused patch:
|
||||
* boinc-completion.patch
|
||||
- Remove comments with unused patches
|
||||
- Remove conditionals with inits as we don't build for such release
|
||||
anyway
|
||||
- Provide rcboinc symlink for easier usage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 26 22:34:18 UTC 2014 - chris@computersalat.de
|
||||
|
||||
|
@ -1,216 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012 Scorpio IT, Deidesheim, Germany
|
||||
# All rights reserved
|
||||
#
|
||||
# Author: Christian Wittmer <rpm@scorpio-it.net>
|
||||
#
|
||||
# /etc/init.d/boinc-client
|
||||
# and its symbolic link
|
||||
# /(usr/)sbin/rcboinc-client
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: boinc-client
|
||||
# Required-Start: $syslog $network $remote_fs
|
||||
# Should-Start: $time
|
||||
# Required-Stop: $syslog $network $remote_fs
|
||||
# Should-Stop: $time
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: BOINC daemon providing boinc-client
|
||||
# Description: Start BOINC client
|
||||
# For more information about BOINC (the Berkeley Open Infrastructure
|
||||
# for Network Computing) see http://boinc.berkeley.edu
|
||||
### END INIT INFO
|
||||
#
|
||||
|
||||
# Note on runlevels:
|
||||
# 0 - halt/poweroff 6 - reboot
|
||||
# 1 - single user 2 - multiuser without network exported
|
||||
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
|
||||
#
|
||||
# Note on script names:
|
||||
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
|
||||
# A registry has been set up to manage the init script namespace.
|
||||
# http://www.lanana.org/
|
||||
# Please use the names already registered or register one or use a
|
||||
# vendor prefix.
|
||||
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
BOINC_BIN=/usr/bin/boinc-client
|
||||
test -x $BOINC_BIN || { echo "$BOINC_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Check for existence of needed config file and read it
|
||||
BOINC_CONFIG=/etc/sysconfig/boinc-client
|
||||
test -r $BOINC_CONFIG || { echo "$BOINC_CONFIG not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
# Read config
|
||||
. $BOINC_CONFIG
|
||||
|
||||
# some other VARS
|
||||
BOINC_SVC="BOINC Client"
|
||||
|
||||
BOINCCMD_BIN="/usr/bin/boinccmd"
|
||||
BOINC_LOG="/var/log/boinc-client.log"
|
||||
BOINC_ERRLOG="/var/log/boinc-client.err.log"
|
||||
BOINC_PIDFILE="/var/run/boinc-client.pid"
|
||||
BOINC_LOCKFILE="/var/run/boinc-client.lock"
|
||||
|
||||
BOINC_USR=${BOINC_BOINC_USR:="boinc"}
|
||||
BOINC_GRP=${BOINC_BOINC_GRP:="boinc"}
|
||||
BOINC_DIR=${BOINC_BOINC_DIR:="/var/lib/boinc"}
|
||||
BOINC_OPTS=${BOINC_BOINC_OPTS:=""}
|
||||
|
||||
# Source LSB init functions
|
||||
# providing start_daemon, killproc, pidofproc,
|
||||
# log_success_msg, log_failure_msg and log_warning_msg.
|
||||
# This is currently not used by UnitedLinux based distributions and
|
||||
# not needed for init scripts for UnitedLinux only. If it is used,
|
||||
# the functions from rc.status should not be sourced or used.
|
||||
#. /lib/lsb/init-functions
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v be verbose in local rc status and clear it afterwards
|
||||
# rc_status -v -r ditto and clear both the local and overall rc status
|
||||
# rc_status -s display "skipped" and exit with status 3
|
||||
# rc_status -u display "unused" and exit with status 3
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_failed <num> set local and overall rc status to <num>
|
||||
# rc_reset clear both the local and overall rc status
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
# rc_active checks whether a service is activated by symlinks
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting ${BOINC_SVC} "
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the return value is set appropriately by startproc.
|
||||
/sbin/startproc -u $BOINC_USR -g $BOINC_GRP -l $BOINC_LOG -s $BOINC_BIN --dir $BOINC_DIR $BOINC_OPTS
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down ${BOINC_SVC} "
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## killproc sets the return value according to LSB.
|
||||
|
||||
/sbin/killproc $BOINC_BIN
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named 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
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
force-reload)
|
||||
## Signal the daemon to reload its config. Most daemons
|
||||
## do this on signal 1 (SIGHUP).
|
||||
## If it does not support it, restart the service if it
|
||||
## is running.
|
||||
|
||||
echo -n "Reload service ${BOINC_SVC} "
|
||||
## if it supports it:
|
||||
#/sbin/killproc -HUP $BOINC_BIN
|
||||
#touch /var/run/$BOINC_PIDFILE
|
||||
|
||||
# Remember status and be verbose
|
||||
#rc_status -v
|
||||
|
||||
## Otherwise:
|
||||
$0 try-restart
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
## Like force-reload, but if daemon does not support
|
||||
## signaling, do nothing (!)
|
||||
|
||||
# If it supports signaling:
|
||||
echo -n "Reload service ${BOINC_SVC} "
|
||||
#/sbin/killproc -HUP $BOINC_BIN
|
||||
#touch /var/run/FOO.pid
|
||||
# Remember status and be verbose
|
||||
#rc_status -v
|
||||
|
||||
|
||||
## Otherwise if it does not support reload:
|
||||
rc_failed 3
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service ${BOINC_SVC} "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Return value is slightly different for the status command:
|
||||
# 0 - service up and running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running (unused)
|
||||
# 4 - service status unknown :-(
|
||||
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
|
||||
# NOTE: checkproc returns LSB compliant status values.
|
||||
/sbin/checkproc $BOINC_BIN
|
||||
# NOTE: rc_status knows that we called this init script with
|
||||
# "status" option and adapts its messages accordingly.
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
@ -19,9 +19,7 @@
|
||||
|
||||
# Global definitions
|
||||
%define _use_internal_dependency_generator 0
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%define __find_requires %wx_requires
|
||||
%endif
|
||||
#define version_ 6_12_43
|
||||
%define soname 7
|
||||
%define boinc_dir %{_localstatedir}/lib/boinc
|
||||
@ -44,7 +42,6 @@ Url: http://boinc.berkeley.edu/
|
||||
#
|
||||
# git archive -v --format=tar --prefix=boinc-7.2.42/ \
|
||||
# client_release/7.2/7.2.42 | bzip2 >../boinc-7.2.42.tar.bz2
|
||||
|
||||
Source0: boinc-%{version}.tar.bz2
|
||||
Source1: boinc-icons.tar.bz2
|
||||
Source2: boinc-gui.desktop
|
||||
@ -59,57 +56,35 @@ Source6: boinc-manager
|
||||
#
|
||||
# Trim all binaries and other unnecessary things.
|
||||
Source8: generate-tarball.sh
|
||||
Source10: %{name}.init
|
||||
Source20: %{name}.service
|
||||
Source100: %{name}-rpmlintrc
|
||||
|
||||
# PATCH-FIX-OPENSUSE boinc-guirpcauth.patch
|
||||
# Create password file rw for group, this enables passwordless connection
|
||||
# of manager from users of the boinc group.
|
||||
# This won't be probably upstreamed as it might be unsafe for common usage
|
||||
# without setting proper group ownership of the password file.
|
||||
Patch0: boinc-guirpcauth.patch
|
||||
# PATCH-FIX-OPENSUSE boinc-init.patch
|
||||
#Patch1: boinc-init.patch
|
||||
# PATCH-FIX-OPENSUSE boinc-LC_MESSAGES.patch
|
||||
Patch2: boinc-LC_MESSAGES.patch
|
||||
# PATCH-FIX-OPENSUSE boinc-completion.patch
|
||||
# patch disabled: fix for bnc#779335
|
||||
#Patch3: boinc-completion.patch
|
||||
# PATCH-FIX-OPENSUSE boinc-docbook2x.patch
|
||||
Patch4: boinc-docbook2x.patch
|
||||
# PATCH-FIX-OPENSUSE pth@suse.de use asprintf to fix buffer overflow
|
||||
#Patch5: boinc-client-dynamic_buffers.patch
|
||||
# PATCH-FIX-OPENSUSE computersalat - #error "Only <glib.h> can be included directly.
|
||||
#Patch6: %{name}-glib_h.patch
|
||||
# PATCH-FIX-OPENSUSE coolo - #error: am__fastdepOBJCXX does not appear in AM_CONDITIONAL
|
||||
Patch7: %{name}-AM_CONDITIONAL.patch
|
||||
# PATCH-FIX-OPENSUSE computersalat - error:
|
||||
# configure.ac:898: required file `test/version.inc.in' not found
|
||||
# configure.ac:898: required file `py/Boinc/version.py.in' not found
|
||||
Patch8: boinc-configure.patch
|
||||
#
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Requires(pre): pwdutils
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%define has_systemd 1
|
||||
%else
|
||||
Requires(pre): %insserv_prereq
|
||||
Requires(pre): %fillup_prereq
|
||||
%endif
|
||||
|
||||
BuildRequires: Mesa-devel
|
||||
#BuildRequires: autoconf
|
||||
#BuildRequires: automake
|
||||
BuildRequires: docbook2x
|
||||
BuildRequires: docbook_4
|
||||
BuildRequires: update-desktop-files
|
||||
#BuildRequires: fcgi-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: update-desktop-files
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: libXScrnSaver-devel
|
||||
BuildRequires: libXi-devel
|
||||
@ -121,28 +96,19 @@ BuildRequires: xorg-x11-libxcb-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: gettext-runtime
|
||||
#BuildRequires: gnutls-devel
|
||||
BuildRequires: libcurl-devel >= 7.17.1
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libnotify-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxslt
|
||||
#BuildRequires: m4
|
||||
#BuildRequires: make
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: openssl-devel
|
||||
#BuildRequires: patch
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: pwdutils
|
||||
BuildRequires: python-mysql
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: xorg-x11-libXmu-devel
|
||||
%if 0%{?suse_version} <= 1130
|
||||
BuildRequires: wxGTK-devel >= 2.6.0
|
||||
%else
|
||||
BuildRequires: wxWidgets-devel >= 2.8.0
|
||||
%endif
|
||||
|
||||
BuildRequires: xorg-x11-libXmu-devel
|
||||
Requires: cron
|
||||
Requires: logrotate
|
||||
### FIXME:
|
||||
@ -206,9 +172,7 @@ in which all information and all control elements are available.
|
||||
%package doc
|
||||
Summary: Documentation files for %{name}
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc
|
||||
This package contains documentation files for %{name}.
|
||||
@ -217,15 +181,9 @@ This package contains documentation files for %{name}.
|
||||
#setup -q -n boinc_core_release_%{version_} -D -a 1
|
||||
%setup -q -n boinc-%{version} -D -a 1
|
||||
%patch0
|
||||
#patch1
|
||||
%patch2
|
||||
#patch3
|
||||
%patch4
|
||||
#patch5
|
||||
%if 0%{?suse_version} >= 1220
|
||||
#patch6
|
||||
%patch7
|
||||
%endif
|
||||
%patch8
|
||||
|
||||
# Install user hints
|
||||
@ -304,13 +262,8 @@ sed -i 's/\r//' clientgui/DlgItemProperties.cpp
|
||||
# hence we jump into clientgui and build it manually
|
||||
pushd clientgui
|
||||
%{__make} libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \
|
||||
%if 0%{?suse_version} >= 1210
|
||||
CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \
|
||||
CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \
|
||||
%else
|
||||
CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
|
||||
CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
|
||||
%endif
|
||||
DESTDIR=%{_prefix} %{?_smp_mflags}
|
||||
popd
|
||||
pushd locale
|
||||
@ -355,19 +308,12 @@ popd
|
||||
# Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv
|
||||
%{__rm} -f %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
|
||||
# Install init and create symlink to /etc/init.d/boinc-client
|
||||
%if 0%{?has_systemd}
|
||||
# Install init and create symlink for rcboinc
|
||||
%{__install} -D -m0644 %{S:20} %{buildroot}%{_unitdir}/%{name}.service
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
# And remove sysvinit script installed by boinc
|
||||
%{__rm} -r %{buildroot}/%{_initrddir}
|
||||
%else
|
||||
%{__install} -Dm0755 %{S:10} %{buildroot}%{_initrddir}/%{name}
|
||||
%{__install} -dm0755 %{buildroot}%{_sbindir}
|
||||
/bin/ln -sf %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||
|
||||
# Install template for sysconfig
|
||||
%{__install} -Dm0644 %{S:4} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
|
||||
%endif
|
||||
|
||||
# Install logrotate
|
||||
%{__install} -Dm0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
@ -422,32 +368,17 @@ if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then
|
||||
mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save
|
||||
fi
|
||||
fi
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun %{name}.service
|
||||
%else
|
||||
%stop_on_removal %{name}
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_post %{name}.service
|
||||
%else
|
||||
%fillup_and_insserv %{name}
|
||||
%endif
|
||||
%{_sbindir}/usermod -c "BOINC Client" -s /sbin/nologin boinc 2>/dev/null || :
|
||||
|
||||
%postun
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_postun %{name}.service
|
||||
%else
|
||||
%restart_on_update %{name}
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%post -n boinc-manager
|
||||
/usr/bin/touch --no-create %{_datadir}/icons/hicolor || :
|
||||
@ -481,13 +412,8 @@ fi
|
||||
%{_bindir}/switcher
|
||||
%{_mandir}/man1/boinccmd.1.gz
|
||||
%{_mandir}/man1/boinc.1.gz
|
||||
%if 0%{?has_systemd}
|
||||
%{_unitdir}/%{name}.service
|
||||
%else
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_initrddir}/%{name}
|
||||
/var/adm/fillup-templates/sysconfig.%{name}
|
||||
%endif
|
||||
%defattr(-,boinc,boinc,-)
|
||||
%{_localstatedir}/lib/boinc/
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
Index: client/scripts/boinc.bash
|
||||
===================================================================
|
||||
--- client/scripts/boinc.bash.orig
|
||||
+++ client/scripts/boinc.bash
|
||||
@@ -36,7 +36,7 @@ _boinc()
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
-complete -F _boinc -o default boinc
|
||||
+complete -F _boinc -o default-boinc
|
||||
|
||||
_boinccmd()
|
||||
{
|
Loading…
Reference in New Issue
Block a user