[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnunet] Re: ebuilds
From: |
Benjamin Kay |
Subject: |
Re: [Help-gnunet] Re: ebuilds |
Date: |
Sun, 11 Apr 2004 00:58:29 +0000 |
User-agent: |
KMail/1.6.1 |
On Sunday 11 April 2004 12:32 am, Steven wrote:
> Someone posted a question about gentoo ebuilds, and this is a response to
> that post.
>
> The ebuild for Freenet has a very nice feature: The ebuild can be used to
> automatically update to the latest version of freenet, so the gentoo dev's
> don't have to make a new ebuild every time freenet releases a new build. I
> think it would be nice if the gnunet ebuild had a similar feature.
> (perhaps this is only possible in freenet because it is written in java,
> and doesn't actually have to be compiled?)
Updating freenet is a simple as downloading a new .jar file. Updating GNUnet
is not nearly so easy; stuff has to get recompiled, configuration files get
changed, and database updates are sometimes necessary. All in all, the Gentoo
devs have done a remarkable job at keeping the ebuilds working - and they
typically get new releases of GNUnet into portage within a couple of days!
Unfortunately, portage is not very good at doing CVS. Since I try to help out
the GNUnet devs by applying CVS patches, etc., I have a script that I use to
more or less automatically update GNUnet on my machine. Judging by the number
of times I've lost my entire database or crashed my computer do to careless
errors relating to this script, I suggest you think very hard before
implementing it.
In my setup, GNUnet has its own user and its own group. All files to be shared
are placed under the GNUnet group; the theory being that a renegade gnunetd
can't trash my entire system. You will have to run the install script as
root, or modify it to be run some other way. The /etc/init.d script works,
but rc-update doesn't seem to work on it, so you'll have to invoke GNUnet
manually every reboot (for example, add it to /etc/conf.d/local.start).
Here is gnunetinstall.sh:
---------------------------------------
#!/bin/sh
cd /root
echo Removing old GNUnet source directory...
rm -R GNUnet
echo Authenticating to CVS server, please press ENTER
cvs -d :pserver:address@hidden:/var/cvs/GNUnet login
echo Authenticated. Downloading sources...
cvs -d :pserver:address@hidden:/var/cvs/GNUnet checkout GNUnet
echo Setting permissions...
cd GNUnet
chmod u+x bootstrap
echo Creating scripts...
./bootstrap
echo Configuring...
./configure --with-crypto=/usr
echo Building GNUnet...
make && echo "Installing GNUnet..." && make install && echo " done."
---------------------------------------
And /etc/init.d/gnunet (somewhat blindly adapted from the original Gentoo init
script):
---------------------------------------
#!/bin/sh
#
# GNUnet Start/Stop GNUnet server
#
# chkconfig: - 35 65
# description: GNUnet is an anonymous distributed secure network
# this server is required to connect to the network,
# it will open a TCP port to communicate with the
# GUI and an UDP port to communicate with the world.
# The configuration file /etc/gnunet.conf will be used.
# processname: gnunetd
# pidfile: /var/run/gnunetd.pid
#
# This script was initially written on/for RH/Zen. You may have
# to adapt it.
#
# Source function library.
. /etc/init.d/functions.sh
# Get config.
. /etc/conf.d/net
# Check that networking is up.
#if [ ${NETWORKING} = "no" ]
#then
# exit 0
#fi
depend() {
need net mysql ddclient
}
#[ -x `which gnunetd` ] || exit 0
#RETVAL=0
#prog="gnunet"
start() {
ebegin "Starting GNUnet"
/usr/local/bin/gnunetd --user=gnunet --config=/etc/gnunet.conf
eend $?
}
stop() {
ebegin "Stopping GNUnet"
start-stop-daemon --stop --quiet --pidfile /var/lib/GNUnet/gnunetd.pid
eend $?
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status gnunet
;;
restart|reload)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/gnunetd ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $RETVAL
---------------------------------------
Remember, if you use this stuff and something breaks, I told you not to do it.
Good luck!
-Benjamin Kay