[SCM] BOINC packaging branch, SZTAKI, updated. debian/6.10.17+dfsg-3-320-g05a36d6

Steffen Moeller moeller at debian.org
Mon Jun 13 11:52:27 UTC 2011


The following commit has been merged in the SZTAKI branch:
commit 4994d37c11b92d7ac53d26c27b2d3f6133fb95b6
Author: Steffen Moeller <moeller at debian.org>
Date:   Mon Jun 13 13:14:09 2011 +0200

    Another two patch units transformed for quilt

diff --git a/SZTAKI_patches_remaining_to_move_into_debian.patch b/SZTAKI_patches_remaining_to_move_into_debian.patch
index 5277eeb..2ead1e5 100644
--- a/SZTAKI_patches_remaining_to_move_into_debian.patch
+++ b/SZTAKI_patches_remaining_to_move_into_debian.patch
@@ -527,95 +527,6 @@ def builddir(*dirs):
 -crypt_prog_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT_STATIC) $(SSL_LIBS) 
 +crypt_prog_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT) $(SSL_LIBS)
  
---- boinc-server-6.11.0+r18946.orig/lib/crypt_prog.cpp
-+++ boinc-server-6.11.0+r18946/lib/crypt_prog.cpp
-@@ -52,6 +52,9 @@
- #include <openssl/engine.h>
- #include <openssl/err.h>
- 
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
- #include "crypt.h"
- #include "md5_file.h"
- 
-@@ -60,38 +63,6 @@
-     exit(2);
- }
- 
--unsigned int random_int() {
--    unsigned int n;
--#if defined(_WIN32)
--#if defined(__CYGWIN32__)
--    HMODULE hLib=LoadLibrary((const char *)"ADVAPI32.DLL");
--#else
--    HMODULE hLib=LoadLibrary("ADVAPI32.DLL");
--#endif
--    if (!hLib) {
--        die("Can't load ADVAPI32.DLL");
--    }
--    BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
--    (BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(hLib,"SystemFunction036");
--    if (pfn) {
--        char buff[32];
--        ULONG ulCbBuff = sizeof(buff);
--        if(pfn(buff,ulCbBuff)) {
--            // use buff full of random goop
--            memcpy(&n,buff,sizeof(n));
--        }
--    }
--    FreeLibrary(hLib);
--#else
--    FILE* f = fopen("/dev/random", "r");
--    if (!f) {
--        die("can't open /dev/random\n");
--    }
--    fread(&n, sizeof(n), 1, f);
--#endif
--    return n;
--}
--
- int main(int argc, char** argv) {
-     R_RSA_PUBLIC_KEY public_key;
-     R_RSA_PRIVATE_KEY private_key;
-@@ -115,6 +86,11 @@
-         printf("missing command\n");
-         exit(1);
-     }
-+
-+    OpenSSL_add_all_algorithms();
-+    ERR_load_crypto_strings();
-+    ENGINE_load_builtin_engines();
-+
-     if (!strcmp(argv[1], "-genkey")) {
-         if (argc < 5) {
-             fprintf(stderr, "missing cmdline args\n");
-@@ -123,11 +99,14 @@
-         printf("creating keys in %s and %s\n", argv[3], argv[4]);
-         n = atoi(argv[2]);
- 
--        srand(random_int());
-         RSA* rp = RSA_generate_key(n,  65537, 0, 0);
-         openssl_to_keys(rp, n, private_key, public_key);
-+        // Make sure the private key is not world readable
-+        mode_t oldmask = umask(0);
-+        umask(oldmask | S_IROTH | S_IWOTH);
-         fpriv = fopen(argv[3], "w");
-         if (!fpriv) die("fopen");
-+        umask(oldmask);
-         fpub = fopen(argv[4], "w");
-         if (!fpub) die("fopen");
-         print_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
-@@ -247,9 +226,6 @@
-             kpriv = true;
-         else
-             die("either 'pub' or 'priv' must be defined for -convkey\n");
--        OpenSSL_add_all_algorithms();
--		ERR_load_crypto_strings(); 
--		ENGINE_load_builtin_engines();
- 		if (bio_err == NULL)
- 		    bio_err = BIO_new_fp(stdout, BIO_NOCLOSE);
-         //enc=EVP_get_cipherbyname("des");
 --- boinc-server-6.11.0+r18946.orig/tools/Makefile.am
 +++ boinc-server-6.11.0+r18946/tools/Makefile.am
 @@ -6,11 +6,17 @@
@@ -658,25 +569,6 @@ def builddir(*dirs):
  
  dir_hier_move_SOURCES = dir_hier_move.cpp
 -dir_hier_move_LDADD = $(SERVERLIBS)
---- boinc-server-6.11.0+r18946.orig/tools/update_szdg_stats
-+++ boinc-server-6.11.0+r18946/tools/update_szdg_stats
-@@ -0,0 +1,16 @@
-+#!/bin/sh
-+
-+cd $HOME/project/html/szdg-stat
-+
-+./stat_hosts.php
-+./chart_hosts.php
-+
-+./stat_users.php
-+./chart_users.php
-+
-+./stat_wu_inprogress.php
-+./chart_wu_inprogress.php
-+./stat_wu_unsent.php
-+./chart_wu_unsent.php
-+./stat_wu_total.php
-+./chart_wu_total.php
 --- boinc-server-6.11.0+r18946.orig/tools/vote_monitor
 +++ boinc-server-6.11.0+r18946/tools/vote_monitor
 @@ -1,7 +1,16 @@
@@ -761,15 +653,6 @@ def builddir(*dirs):
  
  function median_host_query() {
    $MYSQL --execute="
---- boinc-server-6.11.0+r18946.orig/tools/update_rrd_data
-+++ boinc-server-6.11.0+r18946/tools/update_rrd_data
-@@ -0,0 +1,6 @@
-+#!/bin/sh
-+
-+cd $HOME/project/html/szdg-stat
-+
-+./rrd_result.php
-+./rrd_host.php
 --- boinc-server-6.11.0+r18946.orig/tools/backend_lib.cpp
 +++ boinc-server-6.11.0+r18946/tools/backend_lib.cpp
 @@ -187,9 +187,9 @@
@@ -1038,24 +921,6 @@ def builddir(*dirs):
 -for important additional instructions.
 -'''%locals()
 +print "Done creating project."
---- boinc-server-6.11.0+r18946.orig/tools/update_szdg_performance
-+++ boinc-server-6.11.0+r18946/tools/update_szdg_performance
-@@ -0,0 +1,6 @@
-+#!/bin/sh
-+
-+cd $HOME/project/html/szdg-stat
-+
-+./stat_performance.php
-+./chart_performance.php
---- boinc-server-6.11.0+r18946.orig/tools/update_rrd_graph
-+++ boinc-server-6.11.0+r18946/tools/update_rrd_graph
-@@ -0,0 +1,6 @@
-+#!/bin/sh
-+
-+cd $HOME/project/html/szdg-stat
-+
-+./rrd_result.php graph
-+./rrd_host.php graph
 --- boinc-server-6.11.0+r18946.orig/api/Makefile.am
 +++ boinc-server-6.11.0+r18946/api/Makefile.am
 @@ -35,12 +35,14 @@
diff --git a/debian/patches/local_sztaki_toolsSZDG.patch b/debian/patches/local_sztaki_toolsSZDG.patch
new file mode 100644
index 0000000..410f2c8
--- /dev/null
+++ b/debian/patches/local_sztaki_toolsSZDG.patch
@@ -0,0 +1,54 @@
+Index: boinc/tools/update_rrd_data
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ boinc/tools/update_rrd_data	2011-06-13 13:12:49.000000000 +0200
+@@ -0,0 +1,6 @@
++#!/bin/sh
++
++cd $HOME/project/html/szdg-stat
++
++./rrd_result.php
++./rrd_host.php
+Index: boinc/tools/update_rrd_graph
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ boinc/tools/update_rrd_graph	2011-06-13 13:12:49.000000000 +0200
+@@ -0,0 +1,6 @@
++#!/bin/sh
++
++cd $HOME/project/html/szdg-stat
++
++./rrd_result.php graph
++./rrd_host.php graph
+Index: boinc/tools/update_szdg_performance
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ boinc/tools/update_szdg_performance	2011-06-13 13:12:49.000000000 +0200
+@@ -0,0 +1,6 @@
++#!/bin/sh
++
++cd $HOME/project/html/szdg-stat
++
++./stat_performance.php
++./chart_performance.php
+Index: boinc/tools/update_szdg_stats
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ boinc/tools/update_szdg_stats	2011-06-13 13:12:49.000000000 +0200
+@@ -0,0 +1,16 @@
++#!/bin/sh
++
++cd $HOME/project/html/szdg-stat
++
++./stat_hosts.php
++./chart_hosts.php
++
++./stat_users.php
++./chart_users.php
++
++./stat_wu_inprogress.php
++./chart_wu_inprogress.php
++./stat_wu_unsent.php
++./chart_wu_unsent.php
++./stat_wu_total.php
++./chart_wu_total.php
diff --git a/debian/patches/series b/debian/patches/series
index 75f0bbd..ba5ebcb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
+upstream_sztaki_cryptProg_simplification.patch
+local_sztaki_toolsSZDG.patch
 debian_adjust_path_boinc_make_project.patch
 debian_sztaki_UpgradPathBoinc.patch
 upstream_sztaki_NewInstallFunctions.patch
diff --git a/debian/patches/upstream_sztaki_cryptProg_simplification.patch b/debian/patches/upstream_sztaki_cryptProg_simplification.patch
new file mode 100644
index 0000000..e57ae4e
--- /dev/null
+++ b/debian/patches/upstream_sztaki_cryptProg_simplification.patch
@@ -0,0 +1,99 @@
+Index: boinc/lib/crypt_prog.cpp
+===================================================================
+--- boinc.orig/lib/crypt_prog.cpp	2011-06-13 13:06:28.000000000 +0200
++++ boinc/lib/crypt_prog.cpp	2011-06-13 13:10:35.000000000 +0200
+@@ -52,6 +52,9 @@
+ #include <openssl/engine.h>
+ #include <openssl/err.h>
+ 
++#include <sys/types.h>
++#include <sys/stat.h>
++
+ #include "crypt.h"
+ #include "md5_file.h"
+ 
+@@ -81,38 +84,6 @@
+     );
+ }
+ 
+-unsigned int random_int() {
+-    unsigned int n;
+-#if defined(_WIN32)
+-#if defined(__CYGWIN32__)
+-    HMODULE hLib=LoadLibrary((const char *)"ADVAPI32.DLL");
+-#else
+-    HMODULE hLib=LoadLibrary("ADVAPI32.DLL");
+-#endif
+-    if (!hLib) {
+-        die("Can't load ADVAPI32.DLL");
+-    }
+-    BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
+-    (BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(hLib,"SystemFunction036");
+-    if (pfn) {
+-        char buff[32];
+-        ULONG ulCbBuff = sizeof(buff);
+-        if(pfn(buff,ulCbBuff)) {
+-            // use buff full of random goop
+-            memcpy(&n,buff,sizeof(n));
+-        }
+-    }
+-    FreeLibrary(hLib);
+-#else
+-    FILE* f = fopen("/dev/random", "r");
+-    if (!f) {
+-        die("can't open /dev/random\n");
+-    }
+-    fread(&n, sizeof(n), 1, f);
+-#endif
+-    return n;
+-}
+-
+ int main(int argc, char** argv) {
+     R_RSA_PUBLIC_KEY public_key;
+     R_RSA_PRIVATE_KEY private_key;
+@@ -134,6 +105,11 @@
+         usage();
+         exit(1);
+     }
++
++    OpenSSL_add_all_algorithms();
++    ERR_load_crypto_strings();
++    ENGINE_load_builtin_engines();
++
+     if (!strcmp(argv[1], "-genkey")) {
+         if (argc < 5) {
+             usage();
+@@ -142,11 +118,14 @@
+         printf("creating keys in %s and %s\n", argv[3], argv[4]);
+         n = atoi(argv[2]);
+ 
+-        srand(random_int());
+         RSA* rp = RSA_generate_key(n,  65537, 0, 0);
+         openssl_to_keys(rp, n, private_key, public_key);
++        // Make sure the private key is not world readable
++        mode_t oldmask = umask(0);
++        umask(oldmask | S_IROTH | S_IWOTH);
+         fpriv = fopen(argv[3], "w");
+         if (!fpriv) die("fopen");
++        umask(oldmask);
+         fpub = fopen(argv[4], "w");
+         if (!fpub) die("fopen");
+         print_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
+@@ -289,11 +268,13 @@
+         } else {
+             die("either 'pub' or 'priv' must be defined for -convkey\n");
+         }
++        /* // removed by SZTAKI folks 
+         OpenSSL_add_all_algorithms();
+-		ERR_load_crypto_strings();
+-		ENGINE_load_builtin_engines();
+-		if (bio_err == NULL) {
+-		    bio_err = BIO_new_fp(stdout, BIO_NOCLOSE);
++        ERR_load_crypto_strings();
++        ENGINE_load_builtin_engines();
++        */
++        if (bio_err == NULL) {
++            bio_err = BIO_new_fp(stdout, BIO_NOCLOSE);
+         }
+         //enc=EVP_get_cipherbyname("des");
+         //if (enc == NULL)

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list