[pkg-boinc-commits] r407 - in trunk/boinc/debian: . extra manpages

Frank S. Thomas fst-guest at costa.debian.org
Sat Apr 15 22:37:29 UTC 2006


Author: fst-guest
Date: 2006-04-15 22:37:28 +0000 (Sat, 15 Apr 2006)
New Revision: 407

Added:
   trunk/boinc/debian/extra/update-boinc-applinks
   trunk/boinc/debian/manpages/update-boinc-applinks.xml
Modified:
   trunk/boinc/debian/boinc-client.install
   trunk/boinc/debian/boinc-client.manpages
   trunk/boinc/debian/changelog
   trunk/boinc/debian/control
   trunk/boinc/debian/rules
Log:
Moved update-boinc-applinks to trunk.


Modified: trunk/boinc/debian/boinc-client.install
===================================================================
--- trunk/boinc/debian/boinc-client.install	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/boinc-client.install	2006-04-15 22:37:28 UTC (rev 407)
@@ -1,4 +1,5 @@
 debian/extra/global_prefs_override.xml  etc/boinc-client
-debian/extra/gui_rpc_auth.cfg   etc/boinc-client
-debian/extra/remote_hosts.cfg   etc/boinc-client
-debian/tmp/usr/bin/boinc_cmd    usr/bin
+debian/extra/gui_rpc_auth.cfg           etc/boinc-client
+debian/extra/remote_hosts.cfg           etc/boinc-client
+debian/extra/update-boinc-applinks      usr/bin
+debian/tmp/usr/bin/boinc_cmd            usr/bin

Modified: trunk/boinc/debian/boinc-client.manpages
===================================================================
--- trunk/boinc/debian/boinc-client.manpages	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/boinc-client.manpages	2006-04-15 22:37:28 UTC (rev 407)
@@ -1,2 +1,3 @@
 boinc_client.1
 boinc_cmd.1
+update-boinc-applinks.1

Modified: trunk/boinc/debian/changelog
===================================================================
--- trunk/boinc/debian/changelog	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/changelog	2006-04-15 22:37:28 UTC (rev 407)
@@ -18,8 +18,13 @@
   * Clarified and expanded the explanation of the -no_gui_rpc option in
     boinc_client's manpage based on Steffen's suggestion. Thanks to
     David Coe for the report. (closes: #362257)
+  * Added the update-boinc-applinks tool that creates (or removes) symlinks to
+    "anonymous" BOINC applications and their app_info.xml files in a given
+    data directory. The "anonymous" applications and their app_info.xml files
+    are provided by boinc-app-* packages (e.g. boinc-app-seti). Note that
+    currently there are no boinc-app-* packages in the Debian archive.
 
- -- Frank S. Thomas <frank at thomas-alfeld.de>  Thu, 13 Apr 2006 16:33:57 +0200
+ -- Frank S. Thomas <frank at thomas-alfeld.de>  Sun, 16 Apr 2006 00:29:41 +0200
 
 boinc (5.2.15-3) unstable; urgency=low
 
@@ -187,7 +192,7 @@
 
   * The "You are a credit junkie!" release.
   * New upstream release.
-  
+
   [ Frank S. Thomas ]
   * debian/rules:
     - Set default C/C++ compiler flags to "-g -O3 -ffast-math".

Modified: trunk/boinc/debian/control
===================================================================
--- trunk/boinc/debian/control	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/control	2006-04-15 22:37:28 UTC (rev 407)
@@ -4,12 +4,12 @@
 Maintainer: Debian BOINC Maintainers <pkg-boinc-devel at lists.alioth.debian.org>
 Uploaders: Steffen Moeller <steffen_moeller at gmx.de>, Frank S. Thomas <frank at thomas-alfeld.de>, Christoph Martin <christoph.martin at uni-mainz.de>, Greg Norris <adric at debian.org>
 Standards-Version: 3.6.2
-Build-Depends: debhelper (>= 5), dpatch, zlib1g-dev, libssl-dev, libcurl3-openssl-dev (>= 7.13.2), freeglut3-dev, libsm-dev, libice-dev, libxmu-dev, libxi-dev, libx11-dev, libjpeg62-dev, libwxgtk2.6-dev, automake1.9 (>= 1.9.3), autoconf (>= 2.59), autotools-dev, docbook2x, docbook-xml, dh-buildinfo
+Build-Depends: debhelper (>= 5), dpatch, python, zlib1g-dev, libssl-dev, libcurl3-openssl-dev (>= 7.13.2), freeglut3-dev, libsm-dev, libice-dev, libxmu-dev, libxi-dev, libx11-dev, libjpeg62-dev, libwxgtk2.6-dev, automake1.9 (>= 1.9.3), autoconf (>= 2.59), autotools-dev, docbook2x, docbook-xml, dh-buildinfo
 
 Package: boinc-client
 Section: net
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6)
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, adduser, lsb-base (>= 3.0-6)
 Suggests: boinc-manager | kboincspy
 Description: core client for the BOINC distributed computing infrastructure
  The Berkeley Open Infrastructure for Network Computing (BOINC) is a

Added: trunk/boinc/debian/extra/update-boinc-applinks
===================================================================
--- trunk/boinc/debian/extra/update-boinc-applinks	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/extra/update-boinc-applinks	2006-04-15 22:37:28 UTC (rev 407)
@@ -0,0 +1,121 @@
+#!/usr/bin/python2.3
+# -*- coding: utf-8 -*-
+#
+# This script creates symlinks for anonymous BOINC applications.
+# 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.
+#
+# $Id$
+
+import ConfigParser
+import optparse
+import os
+import sys
+
+APPS_INFO_DIR = '/usr/share/boinc-apps/info/'
+
+def main():
+    opts = parse_options()
+
+    if not os.path.isdir(APPS_INFO_DIR):
+        sys.exit(0)
+
+    projects = parse_app_info_files()
+
+    # Show list of all available projects.
+    if opts.list_projects == True:
+        for project in projects:
+            print project
+
+    # Manage symbolic links and directories.
+    if opts.create == None:
+        return
+    for project in projects:
+        if opts.project == '' or project == opts.project:
+            for url in projects[project]['urls']:
+                project_dir = opts.data_dir + '/projects/' + url + '/'
+                manage_symlink(projects[project]['app_info'],
+                    project_dir + 'app_info.xml', opts.create)
+
+                for app_src in projects[project]['apps']:
+                    app_dst = project_dir + os.path.basename(app_src)
+                    manage_symlink(app_src, app_dst, opts.create)
+    return
+
+def get_list(res):
+    """ convert a space separated option value to a list """
+    res = res.replace('\n', ' ')
+    if ' ' in res:
+        res = res.split(' ')
+    else:
+        res = [res]
+    while '' in res:
+        res.remove('')
+    return res
+
+
+def parse_app_info_files():
+    projects = {}
+
+    for file in os.listdir(APPS_INFO_DIR):
+        if file.endswith('.cfg'):
+            cfg = ConfigParser.ConfigParser()
+            cfg.readfp(open(APPS_INFO_DIR + file))
+
+            project = cfg.get('DEFAULT', 'project')
+            cfg.remove_option('DEFAULT', 'project')
+
+            projects[project] = {}
+            list_options = ['apps', 'urls']
+            for item in cfg.items('DEFAULT'):
+                if item[0] in list_options:
+                    projects[project][item[0]] = get_list(item[1])
+                else:
+                    projects[project][item[0]] = item[1]
+    return projects
+
+def manage_symlink(src, dst, bool):
+    dirname = os.path.dirname(dst)
+
+    try:
+        if bool == True:
+            os.makedirs(dirname)
+            os.symlink(src, dst)
+        else:
+            if os.path.isfile(dst) and not os.path.islink(dst):
+                return
+            elif os.path.islink(dst):
+                os.remove(dst)
+
+            os.removedirs(dirname)
+    except OSError:
+        pass
+    return
+
+def parse_options():
+    parser = optparse.OptionParser()
+
+    parser.add_option('--create', action='store_true', dest='create',
+        help='create symlinks and project directories')
+
+    parser.add_option('--remove', action='store_false', dest='create',
+        help='remove symlinks and empty project directories')
+
+    parser.add_option('--data-dir', dest='data_dir', default='.',
+        metavar='DIR', help='destination directory for the symlinks')
+
+    parser.add_option('--project', dest='project', default='',
+        metavar='PROJECT', help='create only symlinks for project PROJECT')
+
+    parser.add_option('--list-projects', action='store_true',
+        dest='list_projects', default=False,
+        help='list all available projects')
+
+    (opts, args) = parser.parse_args()
+    return opts
+
+if __name__ == '__main__':
+    main()


Property changes on: trunk/boinc/debian/extra/update-boinc-applinks
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Id

Added: trunk/boinc/debian/manpages/update-boinc-applinks.xml
===================================================================
--- trunk/boinc/debian/manpages/update-boinc-applinks.xml	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/manpages/update-boinc-applinks.xml	2006-04-15 22:37:28 UTC (rev 407)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ This is the manual page for update-boinc-applinks, a tool that creates/removes
+ symlinks for anonymous platform applications and their associated app_info.xml
+ files in a given BOINC data directory.
+
+ 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.
+
+ Copyright © 2006 Debian BOINC Maintainers
+-->
+
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
+
+  <!ENTITY dhgroupname "Debian BOINC Maintainers">
+  <!ENTITY dhgroupmail "<email>pkg-boinc-devel at lists.alioth.debian.org</email>">
+
+  <!ENTITY dhbinary    "update-boinc-applinks">
+  <!ENTITY dhdate      "<date>March 05, 2006</date>">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhgroupmail;
+    </address>
+    <author>
+      <firstname>Frank</firstname>
+      <lastname>Thomas</lastname>
+      <email>frank at thomas-alfeld.de</email>
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhgroupname;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>&dhbinary;</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>&dhbinary;</refname> 
+    <refpurpose>create/remove symbolic links for anonymous BOINC
+      applications</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhbinary;</command>
+      <arg><replaceable>options</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>DESCRIPTION</title>
+    <para>&dhbinary; creates (or removes) symbolic links for anonymous BOINC
+      applications and their associated app_info.xml files in a given BOINC
+      data directory.</para>
+    <para>Note: &dhbinary; is an extension for &debian; users and is only
+      available in &debian;'s boinc-client package.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+    <para>For a full summary of options, run <command>&dhbinary;
+      --help</command>.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h, --help</option></term>
+        <listitem>
+          <para>Show help message and all options.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--create</option></term>
+        <listitem>
+          <para>Create symbolic links and project directories.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--remove</option></term>
+        <listitem>
+          <para>Remove symbolic links and empty project directories.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--data-dir=<replaceable>DIR</replaceable></option>
+        </term>
+        <listitem>
+          <para>Manage symbolic links in the given directory
+            <replaceable>DIR</replaceable>. If this option is not present,
+            <replaceable>DIR</replaceable> defaults to the current working
+            directory.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--project=<replaceable>PROJECT</replaceable></option>
+        </term>
+        <listitem>
+          <para>Manage symbolic links only for the given project
+            <replaceable>PROJECT</replaceable>.
+            Run <command>&dhbinary; --list-projects</command> to get a list
+            of projects for which anonymous applications are available and
+            therefore can be replaced with
+            <replaceable>PROJECT</replaceable>. If this option is not present,
+            &dhbinary; will manage symbolic links for all available
+            projects.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--list-projects</option>
+        </term>
+        <listitem>
+          <para>Show a list of projects for which anonymous applications are
+            available. Normally those applications are provided by packages
+            called boinc-app-<replaceable>PROJECT</replaceable>
+            (e.g. boinc-app-seti).</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>AUTHOR</title>
+    <para>Written by Frank S. Thomas.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>COPYRIGHT</title>
+    <para>Copyright &copy; 2006 &dhgroupname;.</para>
+    <para>
+      This is free software; you can redistribute it and/or modify it under the
+      terms of the &gnu; General Public License, Version 2 or any later version
+      published by the Free Software Foundation.</para>
+  </refsect1>
+</refentry>

Modified: trunk/boinc/debian/rules
===================================================================
--- trunk/boinc/debian/rules	2006-04-15 21:24:59 UTC (rev 406)
+++ trunk/boinc/debian/rules	2006-04-15 22:37:28 UTC (rev 407)
@@ -72,6 +72,7 @@
 	docbook2x-man debian/manpages/boinc_client.xml
 	docbook2x-man debian/manpages/boinc_cmd.xml
 	docbook2x-man debian/manpages/boincmgr.xml
+	docbook2x-man debian/manpages/update-boinc-applinks.xml
 	touch $@
 
 build: pre-build build-stamp
@@ -107,7 +108,8 @@
 	dh_clean \
 	  boinc_client.1 \
 	  boinc_cmd.1 \
-	  boincmgr.1
+	  boincmgr.1 \
+	  update-boinc-applinks.1
 	  
 	dh_clean \
 	  api/Makefile.in \
@@ -186,6 +188,7 @@
 	dh_strip -a
 	dh_compress -a
 	dh_fixperms -a
+	dh_python -a
 	dh_installdeb -a
 	dh_shlibdeps -a
 	dh_gencontrol -a




More information about the pkg-boinc-commits mailing list