forked from pool/boinc-client
Accepting request 460328 from home:computersalat:devel:network
do not build manager for sles, some reverts and fixes OBS-URL: https://build.opensuse.org/request/show/460328 OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=54
This commit is contained in:
parent
9e2b13005a
commit
ca8030fcc5
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Feb 25 00:24:19 UTC 2017 - chris@computersalat.de
|
||||||
|
|
||||||
|
- do not build boinc-manager on SLES 11/12
|
||||||
|
* bcond_with manager
|
||||||
|
- revert conditionals for SLES 11
|
||||||
|
* add SysVinit file
|
||||||
|
- fix wrong bashism fix by ledest
|
||||||
|
- sysconfig file
|
||||||
|
* needed for client listen remote (--allow_remote_gui_rpc)
|
||||||
|
* add missing fillup for systemd
|
||||||
|
* add some updates
|
||||||
|
- rework service file (EnvironmentFile)
|
||||||
|
* disable not needed log files settings
|
||||||
|
- mv boincscr to manager pkg, built with manager
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 2 10:31:59 UTC 2017 - jengelh@inai.de
|
Mon Jan 2 10:31:59 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
216
boinc-client.init
Normal file
216
boinc-client.init
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
#!/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
|
@ -3,17 +3,19 @@ Description=Berkeley Open Infrastructure Network Computing Client
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/sysconfig/boinc-client
|
||||||
Nice=10
|
Nice=10
|
||||||
User=boinc
|
User=boinc
|
||||||
CPUSchedulingPolicy=batch
|
CPUSchedulingPolicy=batch
|
||||||
Slice=background.slice
|
Slice=background.slice
|
||||||
PermissionsStartOnly=yes
|
PermissionsStartOnly=yes
|
||||||
ExecStartPre=/bin/sleep 1
|
### boinc logs (with --redirectio) to stdoutdae.txt and stderrdae.txt
|
||||||
ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log
|
#ExecStartPre=/bin/sleep 1
|
||||||
ExecStartPre=/usr/bin/chown boinc:boinc /var/log/boinc.log /var/log/boincerr.log
|
#ExecStartPre=/usr/bin/touch /var/log/boinc-client.log /var/log/boinc-client.err.log
|
||||||
ExecStart=/usr/bin/boinc --dir /var/lib/boinc
|
#ExecStartPre=/usr/bin/chown $BOINC_BOINC_USR:$BOINC_BOINC_GRP /var/log/boinc-client.log /var/log/boinc-client.err.log
|
||||||
|
ExecStart=/usr/bin/boinc --dir $BOINC_BOINC_DIR $BOINC_BOINC_OPTS
|
||||||
ExecReload=/usr/bin/boinccmd --read_cc_config
|
ExecReload=/usr/bin/boinccmd --read_cc_config
|
||||||
ExecStopPost=/bin/rm -f /var/lib/boinc/lockfile
|
ExecStopPost=/bin/rm -f $BOINC_BOINC_DIR/lockfile
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
|
|
||||||
%define sonum 7
|
%define sonum 7
|
||||||
%define boinc_dir %{_localstatedir}/lib/boinc
|
%define boinc_dir %{_localstatedir}/lib/boinc
|
||||||
|
|
||||||
|
# do not build boinc-manager on SLES 11/12
|
||||||
|
%if 0%{?is_opensuse}
|
||||||
|
%bcond_without manager
|
||||||
|
%else
|
||||||
|
%bcond_with manager
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: boinc-client
|
Name: boinc-client
|
||||||
Version: 7.6.33
|
Version: 7.6.33
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -29,13 +37,14 @@ Group: Productivity/Clustering/Computing
|
|||||||
Url: http://boinc.berkeley.edu/
|
Url: http://boinc.berkeley.edu/
|
||||||
|
|
||||||
#Git-Clone: git://github.com/BOINC/boinc
|
#Git-Clone: git://github.com/BOINC/boinc
|
||||||
Source: https://github.com/BOINC/boinc/archive/client_release/7.6/%version.tar.gz
|
Source0: https://github.com/BOINC/boinc/archive/client_release/7.6/%{version}.tar.gz
|
||||||
Source1: boinc-icons.tar.bz2
|
Source1: boinc-icons.tar.bz2
|
||||||
Source2: boinc-gui.desktop
|
Source2: boinc-gui.desktop
|
||||||
Source3: README.SUSE
|
Source3: README.SUSE
|
||||||
Source4: sysconfig.%{name}
|
Source4: sysconfig.%{name}
|
||||||
Source5: boinc-logrotate
|
Source5: boinc-logrotate
|
||||||
Source6: boinc-manager
|
Source6: boinc-manager
|
||||||
|
Source10: %{name}.init
|
||||||
Source20: %{name}.service
|
Source20: %{name}.service
|
||||||
Source100: %{name}-rpmlintrc
|
Source100: %{name}-rpmlintrc
|
||||||
# PATCH-FIX-OPENSUSE boinc-guirpcauth.patch
|
# PATCH-FIX-OPENSUSE boinc-guirpcauth.patch
|
||||||
@ -47,6 +56,8 @@ Patch0: boinc-guirpcauth.patch
|
|||||||
# PATCH-FIX-OPENSUSE boinc-docbook2x.patch
|
# PATCH-FIX-OPENSUSE boinc-docbook2x.patch
|
||||||
Patch4: boinc-docbook2x.patch
|
Patch4: boinc-docbook2x.patch
|
||||||
Patch5: 0001-Fix-1530-null-pointer-dereference.patch
|
Patch5: 0001-Fix-1530-null-pointer-dereference.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
#
|
||||||
BuildRequires: Mesa-devel
|
BuildRequires: Mesa-devel
|
||||||
BuildRequires: docbook2x
|
BuildRequires: docbook2x
|
||||||
BuildRequires: docbook_4
|
BuildRequires: docbook_4
|
||||||
@ -64,14 +75,11 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: pwdutils
|
BuildRequires: pwdutils
|
||||||
BuildRequires: sqlite3-devel
|
BuildRequires: sqlite3-devel
|
||||||
BuildRequires: systemd
|
|
||||||
BuildRequires: update-desktop-files
|
|
||||||
BuildRequires: wxWidgets-3_0-devel >= 3.0.2
|
|
||||||
BuildRequires: xorg-x11-libXmu-devel
|
BuildRequires: xorg-x11-libXmu-devel
|
||||||
Recommends: boinc-client-lang = %{version}
|
Recommends: boinc-client-lang = %{version}
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
Requires(pre): pwdutils
|
Requires(pre): pwdutils
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
#
|
||||||
%if 0%{?suse_version} >= 1310
|
%if 0%{?suse_version} >= 1310
|
||||||
BuildRequires: libXScrnSaver-devel
|
BuildRequires: libXScrnSaver-devel
|
||||||
BuildRequires: libXi-devel
|
BuildRequires: libXi-devel
|
||||||
@ -80,8 +88,22 @@ BuildRequires: xcb-util-devel
|
|||||||
%else
|
%else
|
||||||
BuildRequires: xorg-x11-libxcb-devel
|
BuildRequires: xorg-x11-libxcb-devel
|
||||||
%endif
|
%endif
|
||||||
%lang_package
|
#
|
||||||
|
%if 0%{?suse_version} >= 1210
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%define has_systemd 1
|
||||||
|
%else
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
%if %{with manager}
|
||||||
|
BuildRequires: update-desktop-files
|
||||||
|
BuildRequires: wxWidgets-3_0-devel >= 3.0.2
|
||||||
%lang_package -n boinc-manager
|
%lang_package -n boinc-manager
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
%lang_package
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Berkeley Open Infrastructure for Network Computing (BOINC) is an open-
|
The Berkeley Open Infrastructure for Network Computing (BOINC) is an open-
|
||||||
@ -98,6 +120,7 @@ computer time to search for cures for diseases, model protein folding, study
|
|||||||
global warming, discover sources of gravitational waves, and many other types
|
global warming, discover sources of gravitational waves, and many other types
|
||||||
of scientific and mathematical research.
|
of scientific and mathematical research.
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
%package -n boinc-manager
|
%package -n boinc-manager
|
||||||
Summary: GUI to control and monitor boinc-client
|
Summary: GUI to control and monitor boinc-client
|
||||||
Group: Productivity/Scientific/Astronomy
|
Group: Productivity/Scientific/Astronomy
|
||||||
@ -110,6 +133,7 @@ core client. It gives a detailed overview of the state of the client it is
|
|||||||
monitoring. The BOINC Manager has two modes of operation, the "Simple View" in
|
monitoring. The BOINC Manager has two modes of operation, the "Simple View" in
|
||||||
which it only displays the most important information and the "Advanced View"
|
which it only displays the most important information and the "Advanced View"
|
||||||
in which all information and all control elements are available.
|
in which all information and all control elements are available.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for boinc-client
|
Summary: Development files for boinc-client
|
||||||
@ -134,7 +158,9 @@ in which all information and all control elements are available.
|
|||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation files for boinc-client
|
Summary: Documentation files for boinc-client
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
|
%if 0%{?suse_version} >= 1120
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
This package contains documentation files for the BOINC client.
|
This package contains documentation files for the BOINC client.
|
||||||
@ -165,9 +191,11 @@ iconv -f ISO88591 -t UTF8 < checkin_notes_2010 > checkin_notes_2010.utf8
|
|||||||
touch -r checkin_notes_2010 checkin_notes_2010.utf8
|
touch -r checkin_notes_2010 checkin_notes_2010.utf8
|
||||||
mv checkin_notes_2010.utf8 checkin_notes_2010
|
mv checkin_notes_2010.utf8 checkin_notes_2010
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
# fix permissions and newlines on source files
|
# fix permissions and newlines on source files
|
||||||
chmod 644 clientgui/{DlgItemProperties.h,AsyncRPC.cpp,DlgItemProperties.cpp}
|
chmod 644 clientgui/{DlgItemProperties.h,AsyncRPC.cpp,DlgItemProperties.cpp}
|
||||||
sed -i 's/\r//' clientgui/DlgItemProperties.cpp
|
sed -i 's/\r//' clientgui/DlgItemProperties.cpp
|
||||||
|
%endif
|
||||||
|
|
||||||
## remove files with questionable licenses
|
## remove files with questionable licenses
|
||||||
# removing NVIDIA owned file that does not clearly allow redistribution or
|
# removing NVIDIA owned file that does not clearly allow redistribution or
|
||||||
@ -180,11 +208,16 @@ autoreconf -fi
|
|||||||
--enable-shared \
|
--enable-shared \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-dynamic-client-linkage \
|
--enable-dynamic-client-linkage \
|
||||||
|
--enable-unicode \
|
||||||
--disable-server \
|
--disable-server \
|
||||||
--disable-fcgi \
|
--disable-fcgi \
|
||||||
--enable-unicode \
|
%if ! %{with manager}
|
||||||
--with-ssl \
|
--disable-manager \
|
||||||
--with-x
|
%endif
|
||||||
|
%if %{with manager}
|
||||||
|
--with-x \
|
||||||
|
%endif
|
||||||
|
--with-ssl
|
||||||
|
|
||||||
# Disable rpaths
|
# Disable rpaths
|
||||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||||
@ -199,7 +232,11 @@ make libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
|
%if %{with manager}
|
||||||
for i in clientgui locale; do
|
for i in clientgui locale; do
|
||||||
|
%else
|
||||||
|
for i in locale; do
|
||||||
|
%endif
|
||||||
pushd $i
|
pushd $i
|
||||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
@ -213,34 +250,47 @@ install -dm0755 %{buildroot}%{_mandir}/man1
|
|||||||
rm -f %{buildroot}%{_bindir}/boinc
|
rm -f %{buildroot}%{_bindir}/boinc
|
||||||
mv -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/%{name}
|
mv -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/%{name}
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
# Rename boincmgr and wrap it
|
# Rename boincmgr and wrap it
|
||||||
mv %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc-gui
|
mv %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc-gui
|
||||||
|
|
||||||
# Install boinc-manager wrapper script
|
# Install boinc-manager wrapper script
|
||||||
install -Dm0755 %{SOURCE6} %{buildroot}%{_bindir}/boinc-manager
|
install -Dm0755 %{SOURCE6} %{buildroot}%{_bindir}/boinc-manager
|
||||||
|
%endif
|
||||||
|
|
||||||
# Use symlink instead of hardlink
|
# Use symlink instead of hardlink
|
||||||
pushd %{buildroot}%{_bindir}
|
pushd %{buildroot}%{_bindir}
|
||||||
ln -s -f %{name} boinc
|
ln -s -f %{name} boinc
|
||||||
|
%if %{with manager}
|
||||||
ln -s -f boinc-manager boincmgr
|
ln -s -f boinc-manager boincmgr
|
||||||
ln -s -f boinc-manager boincmanager
|
ln -s -f boinc-manager boincmanager
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
# replace @boinc_dir@, @bindir@
|
# replace @boinc_dir@, @bindir@
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s,@boinc_dir@,%{boinc_dir},g" \
|
-e "s,@boinc_dir@,%{boinc_dir},g" \
|
||||||
-e "s,@bindir@,%{_bindir},g" \
|
-e "s,@bindir@,%{_bindir},g" \
|
||||||
%{buildroot}%{_bindir}/boinc-manager
|
%{buildroot}%{_bindir}/boinc-manager
|
||||||
|
%endif
|
||||||
|
|
||||||
# Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv
|
# Remove {buildroot}/etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv
|
||||||
rm -f %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
rm -f %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||||
|
|
||||||
# Install init and create symlink for rcboinc
|
# Install init and create symlink for rcboinc
|
||||||
|
install -dm0755 %{buildroot}%{_sbindir}
|
||||||
|
%if 0%{?has_systemd}
|
||||||
install -D -m0644 %{SOURCE20} %{buildroot}%{_unitdir}/%{name}.service
|
install -D -m0644 %{SOURCE20} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|
||||||
# And remove sysvinit script installed by boinc
|
# And remove sysvinit script installed by boinc
|
||||||
rm -r %{buildroot}/%{_initddir}
|
rm -r %{buildroot}/%{_initddir}
|
||||||
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
%else
|
||||||
|
install -Dm0755 %{SOURCE10} %{buildroot}%{_initddir}/%{name}
|
||||||
|
/bin/ln -sf %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
%endif
|
||||||
|
# Install template for sysconfig
|
||||||
|
install -Dm0644 %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
||||||
|
|
||||||
# Install logrotate
|
# Install logrotate
|
||||||
install -Dm0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
install -Dm0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
@ -248,6 +298,7 @@ install -Dm0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|||||||
# Install bash completion
|
# Install bash completion
|
||||||
install -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc
|
install -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
# Install desktop-file and icons
|
# Install desktop-file and icons
|
||||||
install -Dm0644 boinc-gui-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png
|
install -Dm0644 boinc-gui-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png
|
||||||
install -Dm0644 boinc-gui-64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/boinc-gui.png
|
install -Dm0644 boinc-gui-64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/boinc-gui.png
|
||||||
@ -258,12 +309,15 @@ install -Dm0644 boinc-gui-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/app
|
|||||||
|
|
||||||
# Install *.desktop File
|
# Install *.desktop File
|
||||||
%suse_update_desktop_file -i boinc-gui Utility
|
%suse_update_desktop_file -i boinc-gui Utility
|
||||||
|
%endif
|
||||||
|
|
||||||
# Remove static libraries, libtool archives
|
# Remove static libraries, libtool archives
|
||||||
rm %{buildroot}%{_libdir}/*.{a,la}
|
rm %{buildroot}%{_libdir}/*.{a,la}
|
||||||
|
|
||||||
# Relinking Manpages
|
# Relinking Manpages
|
||||||
|
%if %{with manager}
|
||||||
ln -s -f boincmgr.1.gz %{buildroot}%{_mandir}/man1/boinc-manager.1.gz
|
ln -s -f boincmgr.1.gz %{buildroot}%{_mandir}/man1/boinc-manager.1.gz
|
||||||
|
%endif
|
||||||
ln -s -f boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz
|
ln -s -f boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz
|
||||||
ln -s -f boinc.1.gz %{buildroot}%{_mandir}/man1/boinc.1.gz
|
ln -s -f boinc.1.gz %{buildroot}%{_mandir}/man1/boinc.1.gz
|
||||||
|
|
||||||
@ -275,7 +329,11 @@ install -dm0755 %{buildroot}%{_var}/lib/boinc
|
|||||||
|
|
||||||
# Prepare $LANG Packages
|
# Prepare $LANG Packages
|
||||||
%find_lang BOINC-Client
|
%find_lang BOINC-Client
|
||||||
|
%if %{with manager}
|
||||||
%find_lang BOINC-Manager
|
%find_lang BOINC-Manager
|
||||||
|
%else
|
||||||
|
find %{buildroot}/%{_datadir}/locale/ -name "BOINC-Manager.mo" -print0 | xargs -0 rm -f --
|
||||||
|
%endif
|
||||||
|
|
||||||
%fdupes -s %{buildroot}
|
%fdupes -s %{buildroot}
|
||||||
|
|
||||||
@ -285,23 +343,41 @@ install -dm0755 %{buildroot}%{_var}/lib/boinc
|
|||||||
# add user
|
# add user
|
||||||
%{_sbindir}/useradd -c "BOINC Client" -d "%{_localstatedir}/lib/boinc" \
|
%{_sbindir}/useradd -c "BOINC Client" -d "%{_localstatedir}/lib/boinc" \
|
||||||
-g boinc -r -s /sbin/nologin boinc 2>/dev/null || :
|
-g boinc -r -s /sbin/nologin boinc 2>/dev/null || :
|
||||||
|
# fix replacing old sysconfig file (r21)
|
||||||
if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then
|
if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then
|
||||||
if grep "BOINC_BOINC_USR" %{_sysconfdir}/sysconfig/boinc-client | grep -q grep; then
|
if ! grep -q "BOINC_BOINC_USR" %{_sysconfdir}/sysconfig/boinc-client; then
|
||||||
mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save
|
mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
%if 0%{?has_systemd}
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if 0%{?has_systemd}
|
||||||
%service_del_preun %{name}.service
|
%service_del_preun %{name}.service
|
||||||
|
%else
|
||||||
|
%stop_on_removal %{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%if 0%{?has_systemd}
|
||||||
|
%{fillup_only}
|
||||||
%service_add_post %{name}.service
|
%service_add_post %{name}.service
|
||||||
|
%else
|
||||||
|
%fillup_and_insserv %{name}
|
||||||
|
%endif
|
||||||
%{_sbindir}/usermod -c "BOINC Client" -s /sbin/nologin boinc 2>/dev/null || :
|
%{_sbindir}/usermod -c "BOINC Client" -s /sbin/nologin boinc 2>/dev/null || :
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%if 0%{?has_systemd}
|
||||||
%service_del_postun %{name}.service
|
%service_del_postun %{name}.service
|
||||||
|
%else
|
||||||
|
%restart_on_update %{name}
|
||||||
|
%insserv_cleanup
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
%post -n boinc-manager
|
%post -n boinc-manager
|
||||||
%{_bindir}/touch --no-create %{_datadir}/icons/hicolor || :
|
%{_bindir}/touch --no-create %{_datadir}/icons/hicolor || :
|
||||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
@ -313,6 +389,7 @@ fi
|
|||||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post -n libboinc%{sonum} -p /sbin/ldconfig
|
%post -n libboinc%{sonum} -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -330,12 +407,16 @@ fi
|
|||||||
%{_bindir}/boinc
|
%{_bindir}/boinc
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/boinccmd
|
%{_bindir}/boinccmd
|
||||||
%{_bindir}/boincscr
|
|
||||||
%{_bindir}/switcher
|
%{_bindir}/switcher
|
||||||
%{_mandir}/man1/boinccmd.1.gz
|
%{_mandir}/man1/boinccmd.1.gz
|
||||||
%{_mandir}/man1/boinc.1.gz
|
%{_mandir}/man1/boinc.1.gz
|
||||||
|
%if 0%{?has_systemd}
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
|
%else
|
||||||
|
%{_initddir}/%{name}
|
||||||
|
%endif
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
|
/var/adm/fillup-templates/sysconfig.%{name}
|
||||||
%defattr(-,boinc,boinc,-)
|
%defattr(-,boinc,boinc,-)
|
||||||
%{_localstatedir}/lib/boinc/
|
%{_localstatedir}/lib/boinc/
|
||||||
|
|
||||||
@ -344,22 +425,25 @@ fi
|
|||||||
%doc checkin_*
|
%doc checkin_*
|
||||||
%doc doc/*.txt doc/bolt doc/logo doc/*.php doc/*.png doc/*.html
|
%doc doc/*.txt doc/bolt doc/logo doc/*.php doc/*.png doc/*.html
|
||||||
|
|
||||||
|
%files -n %{name}-lang -f BOINC-Client.lang
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
|
%if %{with manager}
|
||||||
%files -n boinc-manager
|
%files -n boinc-manager
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/boinc-gui
|
%{_bindir}/boinc-gui
|
||||||
%{_bindir}/boinc-manager
|
%{_bindir}/boinc-manager
|
||||||
%{_bindir}/boincmgr
|
%{_bindir}/boincmgr
|
||||||
%{_bindir}/boincmanager
|
%{_bindir}/boincmanager
|
||||||
|
%{_bindir}/boincscr
|
||||||
%{_datadir}/applications/boinc-gui.desktop
|
%{_datadir}/applications/boinc-gui.desktop
|
||||||
%{_datadir}/icons/hicolor/*/apps/*
|
%{_datadir}/icons/hicolor/*/apps/*
|
||||||
%{_mandir}/man1/boincmgr.1.gz
|
%{_mandir}/man1/boincmgr.1.gz
|
||||||
%{_mandir}/man1/boinc-manager.1.gz
|
%{_mandir}/man1/boinc-manager.1.gz
|
||||||
|
|
||||||
%files -n %{name}-lang -f BOINC-Client.lang
|
|
||||||
%defattr(-,root,root)
|
|
||||||
|
|
||||||
%files -n boinc-manager-lang -f BOINC-Manager.lang
|
%files -n boinc-manager-lang -f BOINC-Manager.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n libboinc%{sonum}
|
%files -n libboinc%{sonum}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
## Path: Productivity/Clustering/Computing
|
## Path: Productivity/Clustering/Computing
|
||||||
## Description: define BOINC user
|
## Description: define BOINC user
|
||||||
## Type: string
|
## Type: string
|
||||||
@ -25,9 +24,9 @@ BOINC_BOINC_GRP="boinc"
|
|||||||
## Default: "/var/lib/boinc"
|
## Default: "/var/lib/boinc"
|
||||||
## Config: BOINC
|
## Config: BOINC
|
||||||
##
|
##
|
||||||
## An empty setting will point to /var/lib/boinc
|
## An empty setting will point to /var/lib/boinc (SysVinit)
|
||||||
##
|
##
|
||||||
BOINC_BOINC_DIR=""
|
BOINC_BOINC_DIR="/var/lib/boinc"
|
||||||
|
|
||||||
## Path: Productivity/Clustering/Computing
|
## Path: Productivity/Clustering/Computing
|
||||||
## Description: define BOINC options
|
## Description: define BOINC options
|
||||||
@ -38,15 +37,30 @@ BOINC_BOINC_DIR=""
|
|||||||
## --allow_remote_gui_rpc
|
## --allow_remote_gui_rpc
|
||||||
## allow boinc manager connections from remote machines
|
## allow boinc manager connections from remote machines
|
||||||
##
|
##
|
||||||
## --daemon
|
|
||||||
## turn off all logging
|
|
||||||
##
|
|
||||||
## --redirectio
|
|
||||||
## redirect logging to the files stderrdae.txt and stdoutdae.txt
|
|
||||||
## in BOINCDIR rather than LOGFILE and ERRORLOG
|
|
||||||
##
|
|
||||||
## --check_all_logins
|
## --check_all_logins
|
||||||
## run only when no logins from anywhere are active
|
## for idle detection, check remote logins too
|
||||||
|
## run only when no logins from anywhere are active
|
||||||
|
##
|
||||||
|
## --gui_rpc_port <port>
|
||||||
|
## port for GUI RPCs
|
||||||
|
##
|
||||||
|
## --gui_rpc_unix_domain
|
||||||
|
## use Unix domain for GUI RPCs
|
||||||
|
##
|
||||||
|
## --no_gpus
|
||||||
|
## don't check for GPUs
|
||||||
|
##
|
||||||
|
## --redirectio
|
||||||
|
## redirect stdout and stderr to log files
|
||||||
|
##
|
||||||
|
## --no_gui_rpc
|
||||||
|
## don't allow GUI RPC, don't make socket
|
||||||
|
##
|
||||||
|
## --run_cpu_benchmarks
|
||||||
|
## run the CPU benchmarks
|
||||||
|
##
|
||||||
|
## --skip_cpu_benchmarks
|
||||||
|
## don't run CPU benchmarks
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
BOINC_BOINC_OPTS=""
|
BOINC_BOINC_OPTS=""
|
||||||
|
Loading…
Reference in New Issue
Block a user