[pkg-boinc-commits] r514 - in /trunk/boinc/debian: boinc-client.examples changelog extra/move-boinc-dir.sh extra/use-32bit-on-amd64.sh

fst-guest at users.alioth.debian.org fst-guest at users.alioth.debian.org
Sun Aug 27 12:51:24 UTC 2006


Author: fst-guest
Date: Sun Aug 27 12:51:22 2006
New Revision: 514

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=514
Log:
Added two helper scripts as example in the boinc-client package.

Added:
    trunk/boinc/debian/boinc-client.examples
    trunk/boinc/debian/extra/move-boinc-dir.sh   (with props)
    trunk/boinc/debian/extra/use-32bit-on-amd64.sh   (with props)
Modified:
    trunk/boinc/debian/changelog

Added: trunk/boinc/debian/boinc-client.examples
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/debian/boinc-client.examples?rev=514&op=file
==============================================================================
--- trunk/boinc/debian/boinc-client.examples (added)
+++ trunk/boinc/debian/boinc-client.examples Sun Aug 27 12:51:22 2006
@@ -1,0 +1,2 @@
+debian/extra/move-boinc-dir.sh
+debian/extra/use-32bit-on-amd64.sh

Modified: trunk/boinc/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/debian/changelog?rev=514&op=diff
==============================================================================
--- trunk/boinc/debian/changelog (original)
+++ trunk/boinc/debian/changelog Sun Aug 27 12:51:22 2006
@@ -23,8 +23,10 @@
     client so that it downloads 32bit applications on AMD64. The
     01_amd64-disable-platform-reset.dpatch patch is mandatory for this
     procedure to work correctly. (also related to: #366741, LP#51948)
-
- -- Frank S. Thomas <frank at thomas-alfeld.de>  Sat, 26 Aug 2006 16:33:00 +0200
+  * Added two helper scripts (move-boinc-dir.sh and use-32bit-on-amd64.sh)
+    as examples in the boinc-client package.
+
+ -- Frank S. Thomas <frank at thomas-alfeld.de>  Sun, 27 Aug 2006 14:50:00 +0200
 
 boinc (5.4.10-2) unstable; urgency=medium
 

Added: trunk/boinc/debian/extra/move-boinc-dir.sh
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/debian/extra/move-boinc-dir.sh?rev=514&op=file
==============================================================================
--- trunk/boinc/debian/extra/move-boinc-dir.sh (added)
+++ trunk/boinc/debian/extra/move-boinc-dir.sh Sun Aug 27 12:51:22 2006
@@ -1,0 +1,57 @@
+#!/bin/sh
+#
+# This script can be used to move an BOINC data directory to Debian's
+# default location of the BOINC data directory /var/lib/boinc-client.
+# Invoke it with the old data directory as it's only argument,
+# for example:
+#    % move-boinc-dir.sh /home/john/BOINC
+#
+# Copyright © 2006 Debian BOINC Maintainers
+#                  <pkg-boinc-devel at lists.alioth.debian.org>
+#
+# This file is licensed under the terms of the GNU General Public License,
+# Version 2 or any later version published by the Free Software Foundation.
+
+set -e
+
+OLD_DIR="$1"
+if [ -z "$OLD_DIR" ]; then
+    echo "Error: Old BOINC directory not specified."
+    exit 1
+elif [ ! -d "$OLD_DIR" ]; then
+    echo "Error: $OLD_DIR does not exists or is not a directory."
+    exit 1
+fi
+
+BOINC_DIR=/var/lib/boinc-client
+CONF_DIR=/etc/boinc-client
+
+move_configfile_and_symlink()
+{
+    if [ ! -L $BOINC_DIR/$1 -a -f $BOINC_DIR/$1 ]; then
+        mv -f $BOINC_DIR/$1 $CONF_DIR/$1
+    fi
+    ln -sf $CONF_DIR/$1 $BOINC_DIR/$1
+    chown boinc:boinc $BOINC_DIR/$1 || true
+}
+
+# Stop the BOINC core client.
+invoke-rc.d boinc-client stop
+
+# Copy the old BOINC directory to the new location.
+mkdir -p $BOINC_DIR || true
+cp -R -T "$OLD_DIR" $BOINC_DIR
+
+# Set the user boinc as the owner for
+# all files in /var/lib/boinc-client.
+chown -R boinc:boinc $BOINC_DIR || true
+
+# Move old configuration files to /etc/boinc-client/ and
+# create symlinks for the BOINC core client.
+move_configfile_and_symlink global_prefs_override.xml
+move_configfile_and_symlink gui_rpc_auth.cfg
+move_configfile_and_symlink log_flags.xml
+move_configfile_and_symlink remote_hosts.cfg
+
+# Start the BOINC core client again.
+invoke-rc.d boinc-client start

Propchange: trunk/boinc/debian/extra/move-boinc-dir.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/boinc/debian/extra/use-32bit-on-amd64.sh
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/debian/extra/use-32bit-on-amd64.sh?rev=514&op=file
==============================================================================
--- trunk/boinc/debian/extra/use-32bit-on-amd64.sh (added)
+++ trunk/boinc/debian/extra/use-32bit-on-amd64.sh Sun Aug 27 12:51:22 2006
@@ -1,0 +1,34 @@
+#!/bin/sh
+#
+# This script modifies the default BOINC installation on AMD64 to
+# download and use 32bit applications. See paragraph 4. in
+# /usr/share/doc/boinc-client/README.Debian for more information.
+#
+# Copyright © 2006 Debian BOINC Maintainers
+#                  <pkg-boinc-devel at lists.alioth.debian.org>
+#
+# This file is licensed under the terms of the GNU General Public License,
+# Version 2 or any later version published by the Free Software Foundation.
+
+BOINC_DIR=/var/lib/boinc-client
+
+ARCH=`dpkg --print-architecture`
+if [ "$ARCH" != "amd64" ]; then
+    echo "Error: dpkg architecture ($ARCH) is not amd64."
+    exit 1
+fi
+
+LIBC6_STATUS=`dpkg-query -f '${Status}' -W libc6-i386 | grep not-installed`
+if [ -n "$LIBC6_STATUS" ]; then
+    apt-get install libc6-i386
+fi
+
+invoke-rc.d boinc-client stop
+
+PLATFORM_AMD64="<platform_name>x86_64-pc-linux-gnu<\/platform_name>"
+PLATFORM_I386="<platform_name>i686-pc-linux-gnu<\/platform_name>"
+
+echo "Trying to substitute platform name in client state file..."
+sed -i -e "s/$PLATFORM_AMD64/$PLATFORM_I386/" "$BOINC_DIR/client_state.xml"
+
+invoke-rc.d boinc-client start

Propchange: trunk/boinc/debian/extra/use-32bit-on-amd64.sh
------------------------------------------------------------------------------
    svn:executable = *




More information about the pkg-boinc-commits mailing list