distributed.net client RPM Package

This week I decided to dust off my RPM hat and build an RPM for the distributed.net client application.  Firstly to test my setup here and secondly to make the client easier to deploy and remove from my systems.  I have packaged the core DNETC application (v2.9104.510), and added my own DNETC System V init script

I thought I would post the files here, as they maybe of use. 


Spec File:

Summary: distributed.net Client
Name: dnetc
Version: 2.9104.510
Release: 2
Source0: dnetc-2.9104.510.tar.gz
License: UNKNOWN
BuildArch: i386
BuildRoot: %{_tmppath}/%{name}-buildroot

This distributed.net client will make your computer a part of the world's largest computer, distributed.net. The client is capable of working on two of distributed.net's ongoing projects: The brute-force decryption of a RC5-72 message, and the search for Optimal Golomb Rulers (OGR). Both are long-term projects that will go on for some time. (http://www.distributed.net)


%setup -q


install -m 0755 -d $RPM_BUILD_ROOT/etc/init.d
install -m 0755 init/dnetc $RPM_BUILD_ROOT/etc/init.d/dnetc
install -m 0755 -d $RPM_BUILD_ROOT/opt/dnetc
install -m 0755 dnetc $RPM_BUILD_ROOT/opt/dnetc/dnetc
install -m 0755 dnetc.1 $RPM_BUILD_ROOT/opt/dnetc/dnetc.1
install -m 0755 -d $RPM_BUILD_ROOT/opt/dnetc/docs/
install -m 0755 docs/readme.1st $RPM_BUILD_ROOT/opt/dnetc/docs/readme.1st
install -m 0755 docs/readme.linux $RPM_BUILD_ROOT/opt/dnetc/docs/readme.linux
install -m 0755 docs/readme.uclib $RPM_BUILD_ROOT/opt/dnetc/docs/readme.uclib
install -m 0755 docs/CHANGES.txt $RPM_BUILD_ROOT/opt/dnetc/docs/CHANGES.txt
install -m 0755 docs/dnetc.txt $RPM_BUILD_ROOT/opt/dnetc/docs/dnetc.txt


echo " "
echo "This will display after rpm installs the package!"

%dir /opt/dnetc
%dir /opt/dnetc/docs/

* Wed Feb 24 2010 Rob Jervis 
- added my own dnetc System V init script (http://www.jervis.ws/2010/01/22/dnetc-system-v-init-script/)

* Tue Feb 23 2010 Rob Jervis 
- First RPM package of core dnetc v2.9104.510 for EL5

dnetc.init script:

# dnetc This shell script takes care of starting and stopping distributed.net client
# chkconfig: 345 90 12
# description: distributed.net client program, a \
# distributed computing project. The program \
# uses only the computers idle time.
# processname: dnetc

# config: /etc/dnetc/dnetc.ini
# pidfile: /var/run/dnetc.pid

# Get function from functions library
. /etc/init.d/functions

start() {
echo -n "Starting DNET client: "
/opt/dnetc/dnetc -quiet
touch /var/lock/subsys/dnetc
success $"DNET client startup"

stop() {
echo -n "Stopping DNET client: "
killproc dnetc
rm -f /var/lock/subsys/dnetc

# ......................
case "$1" in
status dnetc
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1

exit 0

Distributed.net recommend that you only download and install clients from their site, I have packaged the above and use it on my systems so the choice is yours, but if you wish to build your own RPM, the spec file etc may save you a few mins.

(Visited 182 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.