From b51b72c2d72bedd5227a4fd24e7d8cede666bc63 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Fri, 14 Oct 2011 09:52:25 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'glite-lb_R_3_1_0_1'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sprout from branch_3_0 2011-06-17 09:16:52 UTC František Dvořák 'Fix removing of .la files (for ETICS build).' Cherrypick from branch_3_0 2011-10-14 09:52:24 UTC Zdeněk Šustr 'Forgotten sticky tag': org.glite.lb.nagios/Makefile org.glite.lb.nagios/configure org.glite.lb.nagios/project/ChangeLog org.glite.lb.nagios/project/package.description org.glite.lb.nagios/project/package.summary org.glite.lb.nagios/project/version.properties org.glite.lb.nagios/src/LB-probe org.glite.lb/etics-tag-with-subsystems.pl org.glite.lb/project/version.properties Cherrypick from branch_3_0 2011-09-30 16:38:33 UTC František Dvořák 'Tuning ETICS dependencies for planned Debian 6.': org.glite.lb/configure Delete: org.glite.jobid.api-c/Makefile org.glite.jobid.api-c/configure org.glite.jobid.api-c/interface/cjobid.h org.glite.jobid.api-c/interface/strmd5.h org.glite.jobid.api-c/project/.post org.glite.jobid.api-c/project/.postun org.glite.jobid.api-c/project/ChangeLog org.glite.jobid.api-c/project/package.description org.glite.jobid.api-c/project/package.summary org.glite.jobid.api-c/project/version.properties org.glite.jobid.api-c/src/cjobid.c org.glite.jobid.api-c/src/md32_common.h org.glite.jobid.api-c/src/md5.h org.glite.jobid.api-c/src/md5_dgst.c org.glite.jobid.api-c/src/md5_locl.h org.glite.jobid.api-c/src/strmd5.c org.glite.jobid.api-c/test/base64_test.cpp org.glite.jobid.api-cpp/Makefile org.glite.jobid.api-cpp/configure org.glite.jobid.api-cpp/interface/JobId.h org.glite.jobid.api-cpp/project/ChangeLog org.glite.jobid.api-cpp/project/package.description org.glite.jobid.api-cpp/project/package.summary org.glite.jobid.api-cpp/project/version.properties org.glite.jobid.api-java/Makefile org.glite.jobid.api-java/build.xml org.glite.jobid.api-java/configure org.glite.jobid.api-java/nbproject/build-impl.xml org.glite.jobid.api-java/nbproject/genfiles.properties org.glite.jobid.api-java/nbproject/private/config.properties org.glite.jobid.api-java/nbproject/private/private.properties org.glite.jobid.api-java/nbproject/private/private.xml org.glite.jobid.api-java/nbproject/project.properties org.glite.jobid.api-java/nbproject/project.xml org.glite.jobid.api-java/project/ChangeLog org.glite.jobid.api-java/project/package.description org.glite.jobid.api-java/project/package.summary org.glite.jobid.api-java/project/version.properties org.glite.jobid.api-java/src/org/glite/jobid/ExampleJobid.java org.glite.jobid.api-java/src/org/glite/jobid/Jobid.java org.glite.jobid/project/version.properties org.glite.lb.glite-LB/Makefile org.glite.lb.glite-LB/configure org.glite.lb.glite-LB/project/ChangeLog org.glite.lb.glite-LB/project/package.description org.glite.lb.glite-LB/project/package.summary org.glite.lb.glite-LB/project/version.properties org.glite.lbjp-common.db/.cvsignore org.glite.lbjp-common.db/LICENSE org.glite.lbjp-common.db/Makefile org.glite.lbjp-common.db/configure org.glite.lbjp-common.db/doc/C.dox org.glite.lbjp-common.db/examples/db_expire.c org.glite.lbjp-common.db/examples/db_test.c org.glite.lbjp-common.db/interface/db-int.h org.glite.lbjp-common.db/interface/db.h org.glite.lbjp-common.db/project/.post org.glite.lbjp-common.db/project/.postun org.glite.lbjp-common.db/project/ChangeLog org.glite.lbjp-common.db/project/get_soname.sh org.glite.lbjp-common.db/project/package.description org.glite.lbjp-common.db/project/package.summary org.glite.lbjp-common.db/project/version.properties org.glite.lbjp-common.db/src/db-mysql.c org.glite.lbjp-common.db/src/db-pg.c org.glite.lbjp-common.db/src/db.c org.glite.lbjp-common.db/test/timezone.cpp org.glite.lbjp-common.gsoap-plugin/LICENSE org.glite.lbjp-common.gsoap-plugin/Makefile org.glite.lbjp-common.gsoap-plugin/configure org.glite.lbjp-common.gsoap-plugin/examples/calc.h.S org.glite.lbjp-common.gsoap-plugin/examples/wscalc_clt_ex.c org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex.c org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex2.c org.glite.lbjp-common.gsoap-plugin/interface/glite_gscompat.h.in org.glite.lbjp-common.gsoap-plugin/interface/glite_gsplugin-int.h org.glite.lbjp-common.gsoap-plugin/interface/glite_gsplugin.h org.glite.lbjp-common.gsoap-plugin/project/.post org.glite.lbjp-common.gsoap-plugin/project/.postun org.glite.lbjp-common.gsoap-plugin/project/ChangeLog org.glite.lbjp-common.gsoap-plugin/project/libtoolhack/gcc org.glite.lbjp-common.gsoap-plugin/project/package.description org.glite.lbjp-common.gsoap-plugin/project/package.summary org.glite.lbjp-common.gsoap-plugin/project/version.properties org.glite.lbjp-common.gsoap-plugin/src/glite_gsplugin.c org.glite.lbjp-common.gsoap-plugin/src/sizeof_soap.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.6.2.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.6.2.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0f.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0f.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.10.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.10.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6b.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6b.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6d.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6d.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9b.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9b.h org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9d.c org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9d.h org.glite.lbjp-common.gsoap-plugin/test/test_gsplugin_cxx.cpp org.glite.lbjp-common.gss/LICENSE org.glite.lbjp-common.gss/Makefile org.glite.lbjp-common.gss/configure org.glite.lbjp-common.gss/interface/glite_gss.h org.glite.lbjp-common.gss/project/.post org.glite.lbjp-common.gss/project/.postun org.glite.lbjp-common.gss/project/ChangeLog org.glite.lbjp-common.gss/project/package.description org.glite.lbjp-common.gss/project/package.summary org.glite.lbjp-common.gss/project/version.properties org.glite.lbjp-common.gss/src/glite_gss.c org.glite.lbjp-common.gss/test/test_gss.cpp org.glite.lbjp-common.jp-interface/Makefile org.glite.lbjp-common.jp-interface/configure org.glite.lbjp-common.jp-interface/interface/attr.h org.glite.lbjp-common.jp-interface/interface/backend.h org.glite.lbjp-common.jp-interface/interface/builtin_plugins.h org.glite.lbjp-common.jp-interface/interface/context.h org.glite.lbjp-common.jp-interface/interface/file_plugin.h org.glite.lbjp-common.jp-interface/interface/indexdb.h org.glite.lbjp-common.jp-interface/interface/known_attr.h org.glite.lbjp-common.jp-interface/interface/type_plugin.h org.glite.lbjp-common.jp-interface/interface/types.h org.glite.lbjp-common.jp-interface/project/.post org.glite.lbjp-common.jp-interface/project/.postun org.glite.lbjp-common.jp-interface/project/ChangeLog org.glite.lbjp-common.jp-interface/project/package.description org.glite.lbjp-common.jp-interface/project/package.summary org.glite.lbjp-common.jp-interface/project/version.properties org.glite.lbjp-common.jp-interface/src/attr.c org.glite.lbjp-common.jp-interface/src/context.c org.glite.lbjp-common.jp-interface/src/indexdb.c org.glite.lbjp-common.jp-interface/src/utils.c org.glite.lbjp-common.jp-interface/test/type_test.cpp org.glite.lbjp-common.log/LICENSE org.glite.lbjp-common.log/Makefile org.glite.lbjp-common.log/README org.glite.lbjp-common.log/config/log4crc org.glite.lbjp-common.log/config/log4crc.debugging org.glite.lbjp-common.log/configure org.glite.lbjp-common.log/project/.post org.glite.lbjp-common.log/project/.postun org.glite.lbjp-common.log/project/ChangeLog org.glite.lbjp-common.log/project/package.description org.glite.lbjp-common.log/project/package.summary org.glite.lbjp-common.log/project/version.properties org.glite.lbjp-common.log/src/log.c org.glite.lbjp-common.log/src/log.h org.glite.lbjp-common.log/tests/log4crc org.glite.lbjp-common.log/tests/test.c org.glite.lbjp-common.maildir/.cvsignore org.glite.lbjp-common.maildir/Makefile org.glite.lbjp-common.maildir/configure org.glite.lbjp-common.maildir/interface/maildir.h org.glite.lbjp-common.maildir/project/.post org.glite.lbjp-common.maildir/project/.postun org.glite.lbjp-common.maildir/project/ChangeLog org.glite.lbjp-common.maildir/project/package.description org.glite.lbjp-common.maildir/project/package.summary org.glite.lbjp-common.maildir/project/version.properties org.glite.lbjp-common.maildir/src/maildir.c org.glite.lbjp-common.server-bones/.cvsignore org.glite.lbjp-common.server-bones/Makefile org.glite.lbjp-common.server-bones/configure org.glite.lbjp-common.server-bones/examples/cnt_example.c org.glite.lbjp-common.server-bones/examples/srv_example.c org.glite.lbjp-common.server-bones/interface/srvbones.h org.glite.lbjp-common.server-bones/project/.post org.glite.lbjp-common.server-bones/project/.postun org.glite.lbjp-common.server-bones/project/ChangeLog org.glite.lbjp-common.server-bones/project/package.description org.glite.lbjp-common.server-bones/project/package.summary org.glite.lbjp-common.server-bones/project/version.properties org.glite.lbjp-common.server-bones/src/srvbones.c org.glite.lbjp-common.trio/.cvsignore org.glite.lbjp-common.trio/LICENSE org.glite.lbjp-common.trio/Makefile org.glite.lbjp-common.trio/configure org.glite.lbjp-common.trio/interface/escape.h org.glite.lbjp-common.trio/interface/trio.h org.glite.lbjp-common.trio/project/.post org.glite.lbjp-common.trio/project/.postun org.glite.lbjp-common.trio/project/ChangeLog org.glite.lbjp-common.trio/project/package.description org.glite.lbjp-common.trio/project/package.summary org.glite.lbjp-common.trio/project/version.properties org.glite.lbjp-common.trio/src/escape.c org.glite.lbjp-common.trio/src/strio.c org.glite.lbjp-common.trio/src/strio.h org.glite.lbjp-common.trio/src/trio.c org.glite.lbjp-common.trio/src/triop.h org.glite.lbjp-common.trio/test/trio_test.cpp org.glite.lbjp-common/project/version.properties --- org.glite.jobid.api-c/Makefile | 87 - org.glite.jobid.api-c/configure | 1400 -- org.glite.jobid.api-c/interface/cjobid.h | 154 - org.glite.jobid.api-c/interface/strmd5.h | 56 - org.glite.jobid.api-c/project/.post | 1 - org.glite.jobid.api-c/project/.postun | 1 - org.glite.jobid.api-c/project/ChangeLog | 65 - org.glite.jobid.api-c/project/package.description | 1 - org.glite.jobid.api-c/project/package.summary | 1 - org.glite.jobid.api-c/project/version.properties | 3 - org.glite.jobid.api-c/src/cjobid.c | 296 - org.glite.jobid.api-c/src/md32_common.h | 640 - org.glite.jobid.api-c/src/md5.h | 135 - org.glite.jobid.api-c/src/md5_dgst.c | 315 - org.glite.jobid.api-c/src/md5_locl.h | 193 - org.glite.jobid.api-c/src/strmd5.c | 169 - org.glite.jobid.api-c/test/base64_test.cpp | 91 - org.glite.jobid.api-cpp/Makefile | 59 - org.glite.jobid.api-cpp/configure | 1400 -- org.glite.jobid.api-cpp/interface/JobId.h | 351 - org.glite.jobid.api-cpp/project/ChangeLog | 58 - .../project/package.description | 1 - org.glite.jobid.api-cpp/project/package.summary | 1 - org.glite.jobid.api-cpp/project/version.properties | 3 - org.glite.jobid.api-java/Makefile | 24 - org.glite.jobid.api-java/build.xml | 69 - org.glite.jobid.api-java/configure | 1400 -- org.glite.jobid.api-java/nbproject/build-impl.xml | 627 - .../nbproject/genfiles.properties | 8 - .../nbproject/private/config.properties | 0 .../nbproject/private/private.properties | 6 - .../nbproject/private/private.xml | 4 - .../nbproject/project.properties | 63 - org.glite.jobid.api-java/nbproject/project.xml | 17 - org.glite.jobid.api-java/project/ChangeLog | 45 - .../project/package.description | 1 - org.glite.jobid.api-java/project/package.summary | 1 - .../project/version.properties | 3 - .../src/org/glite/jobid/ExampleJobid.java | 60 - .../src/org/glite/jobid/Jobid.java | 245 - org.glite.jobid/project/version.properties | 3 - org.glite.lb.glite-LB/Makefile | 23 - org.glite.lb.glite-LB/configure | 1353 -- org.glite.lb.glite-LB/project/ChangeLog | 43 - org.glite.lb.glite-LB/project/package.description | 1 - org.glite.lb.glite-LB/project/package.summary | 1 - org.glite.lb.glite-LB/project/version.properties | 3 - org.glite.lb.nagios/Makefile | 28 + .../configure | 185 +- org.glite.lb.nagios/project/ChangeLog | 3 + org.glite.lb.nagios/project/package.description | 1 + org.glite.lb.nagios/project/package.summary | 1 + org.glite.lb.nagios/project/version.properties | 3 + org.glite.lb.nagios/src/LB-probe | 420 + org.glite.lb/configure | 185 +- org.glite.lb/etics-tag-with-subsystems.pl | 2 +- org.glite.lb/project/version.properties | 2 +- org.glite.lbjp-common.db/.cvsignore | 3 - org.glite.lbjp-common.db/LICENSE | 69 - org.glite.lbjp-common.db/Makefile | 206 - org.glite.lbjp-common.db/configure | 1389 -- org.glite.lbjp-common.db/doc/C.dox | 16 - org.glite.lbjp-common.db/examples/db_expire.c | 164 - org.glite.lbjp-common.db/examples/db_test.c | 279 - org.glite.lbjp-common.db/interface/db-int.h | 78 - org.glite.lbjp-common.db/interface/db.h | 424 - org.glite.lbjp-common.db/project/.post | 1 - org.glite.lbjp-common.db/project/.postun | 1 - org.glite.lbjp-common.db/project/ChangeLog | 107 - org.glite.lbjp-common.db/project/get_soname.sh | 39 - .../project/package.description | 1 - org.glite.lbjp-common.db/project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.db/src/db-mysql.c | 1152 -- org.glite.lbjp-common.db/src/db-pg.c | 636 - org.glite.lbjp-common.db/src/db.c | 452 - org.glite.lbjp-common.db/test/timezone.cpp | 162 - org.glite.lbjp-common.gsoap-plugin/LICENSE | 69 - org.glite.lbjp-common.gsoap-plugin/Makefile | 372 - org.glite.lbjp-common.gsoap-plugin/configure | 1400 -- .../examples/calc.h.S | 13 - .../examples/wscalc_clt_ex.c | 69 - .../examples/wscalc_srv_ex.c | 128 - .../examples/wscalc_srv_ex2.c | 167 - .../interface/glite_gscompat.h.in | 119 - .../interface/glite_gsplugin-int.h | 45 - .../interface/glite_gsplugin.h | 51 - org.glite.lbjp-common.gsoap-plugin/project/.post | 1 - org.glite.lbjp-common.gsoap-plugin/project/.postun | 1 - .../project/ChangeLog | 97 - .../project/libtoolhack/gcc | 1 - .../project/package.description | 1 - .../project/package.summary | 1 - .../project/version.properties | 3 - .../src/glite_gsplugin.c | 594 - .../src/sizeof_soap.c | 26 - .../src/stdsoap2_2.6.2.c | 11020 -------------- .../src/stdsoap2_2.6.2.h | 1647 -- .../src/stdsoap2_2.7.0.c | 11692 --------------- .../src/stdsoap2_2.7.0.h | 1764 --- .../src/stdsoap2_2.7.0f.c | 12026 --------------- .../src/stdsoap2_2.7.0f.h | 1885 --- .../src/stdsoap2_2.7.10.c | 14890 ------------------- .../src/stdsoap2_2.7.10.h | 2281 --- .../src/stdsoap2_2.7.6b.c | 13101 ---------------- .../src/stdsoap2_2.7.6b.h | 2053 --- .../src/stdsoap2_2.7.6d.c | 13362 ----------------- .../src/stdsoap2_2.7.6d.h | 2075 --- .../src/stdsoap2_2.7.9b.c | 14172 ------------------ .../src/stdsoap2_2.7.9b.h | 2166 --- .../src/stdsoap2_2.7.9d.c | 14414 ------------------ .../src/stdsoap2_2.7.9d.h | 2184 --- .../test/test_gsplugin_cxx.cpp | 63 - org.glite.lbjp-common.gss/LICENSE | 69 - org.glite.lbjp-common.gss/Makefile | 170 - org.glite.lbjp-common.gss/interface/glite_gss.h | 196 - org.glite.lbjp-common.gss/project/.post | 1 - org.glite.lbjp-common.gss/project/.postun | 1 - org.glite.lbjp-common.gss/project/ChangeLog | 87 - .../project/package.description | 1 - org.glite.lbjp-common.gss/project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.gss/src/glite_gss.c | 1641 -- org.glite.lbjp-common.gss/test/test_gss.cpp | 237 - org.glite.lbjp-common.jp-interface/Makefile | 113 - org.glite.lbjp-common.jp-interface/configure | 1400 -- .../interface/attr.h | 49 - .../interface/backend.h | 131 - .../interface/builtin_plugins.h | 25 - .../interface/context.h | 43 - .../interface/file_plugin.h | 103 - .../interface/indexdb.h | 76 - .../interface/known_attr.h | 58 - .../interface/type_plugin.h | 91 - .../interface/types.h | 83 - org.glite.lbjp-common.jp-interface/project/.post | 1 - org.glite.lbjp-common.jp-interface/project/.postun | 1 - .../project/ChangeLog | 79 - .../project/package.description | 1 - .../project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.jp-interface/src/attr.c | 308 - org.glite.lbjp-common.jp-interface/src/context.c | 162 - org.glite.lbjp-common.jp-interface/src/indexdb.c | 88 - org.glite.lbjp-common.jp-interface/src/utils.c | 80 - .../test/type_test.cpp | 219 - org.glite.lbjp-common.log/LICENSE | 69 - org.glite.lbjp-common.log/Makefile | 94 - org.glite.lbjp-common.log/README | 18 - org.glite.lbjp-common.log/config/log4crc | 41 - org.glite.lbjp-common.log/config/log4crc.debugging | 38 - org.glite.lbjp-common.log/configure | 1389 -- org.glite.lbjp-common.log/project/.post | 1 - org.glite.lbjp-common.log/project/.postun | 1 - org.glite.lbjp-common.log/project/ChangeLog | 64 - .../project/package.description | 1 - org.glite.lbjp-common.log/project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.log/src/log.c | 146 - org.glite.lbjp-common.log/src/log.h | 122 - org.glite.lbjp-common.log/tests/log4crc | 17 - org.glite.lbjp-common.log/tests/test.c | 32 - org.glite.lbjp-common.maildir/.cvsignore | 1 - org.glite.lbjp-common.maildir/Makefile | 104 - org.glite.lbjp-common.maildir/configure | 1400 -- org.glite.lbjp-common.maildir/interface/maildir.h | 43 - org.glite.lbjp-common.maildir/project/.post | 1 - org.glite.lbjp-common.maildir/project/.postun | 1 - org.glite.lbjp-common.maildir/project/ChangeLog | 70 - .../project/package.description | 1 - .../project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.maildir/src/maildir.c | 417 - org.glite.lbjp-common.server-bones/.cvsignore | 1 - org.glite.lbjp-common.server-bones/Makefile | 98 - org.glite.lbjp-common.server-bones/configure | 1400 -- .../examples/cnt_example.c | 196 - .../examples/srv_example.c | 241 - .../interface/srvbones.h | 117 - org.glite.lbjp-common.server-bones/project/.post | 1 - org.glite.lbjp-common.server-bones/project/.postun | 1 - .../project/ChangeLog | 75 - .../project/package.description | 1 - .../project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.server-bones/src/srvbones.c | 787 - org.glite.lbjp-common.trio/.cvsignore | 1 - org.glite.lbjp-common.trio/LICENSE | 69 - org.glite.lbjp-common.trio/Makefile | 115 - org.glite.lbjp-common.trio/configure | 1400 -- org.glite.lbjp-common.trio/interface/escape.h | 76 - org.glite.lbjp-common.trio/interface/trio.h | 187 - org.glite.lbjp-common.trio/project/.post | 1 - org.glite.lbjp-common.trio/project/.postun | 1 - org.glite.lbjp-common.trio/project/ChangeLog | 79 - .../project/package.description | 1 - org.glite.lbjp-common.trio/project/package.summary | 1 - .../project/version.properties | 3 - org.glite.lbjp-common.trio/src/escape.c | 243 - org.glite.lbjp-common.trio/src/strio.c | 581 - org.glite.lbjp-common.trio/src/strio.h | 227 - org.glite.lbjp-common.trio/src/trio.c | 5705 ------- org.glite.lbjp-common.trio/src/triop.h | 138 - org.glite.lbjp-common.trio/test/trio_test.cpp | 103 - org.glite.lbjp-common/project/version.properties | 3 - 205 files changed, 750 insertions(+), 160154 deletions(-) delete mode 100644 org.glite.jobid.api-c/Makefile delete mode 100755 org.glite.jobid.api-c/configure delete mode 100755 org.glite.jobid.api-c/interface/cjobid.h delete mode 100755 org.glite.jobid.api-c/interface/strmd5.h delete mode 100644 org.glite.jobid.api-c/project/.post delete mode 100644 org.glite.jobid.api-c/project/.postun delete mode 100644 org.glite.jobid.api-c/project/ChangeLog delete mode 100644 org.glite.jobid.api-c/project/package.description delete mode 100644 org.glite.jobid.api-c/project/package.summary delete mode 100644 org.glite.jobid.api-c/project/version.properties delete mode 100644 org.glite.jobid.api-c/src/cjobid.c delete mode 100644 org.glite.jobid.api-c/src/md32_common.h delete mode 100644 org.glite.jobid.api-c/src/md5.h delete mode 100644 org.glite.jobid.api-c/src/md5_dgst.c delete mode 100644 org.glite.jobid.api-c/src/md5_locl.h delete mode 100755 org.glite.jobid.api-c/src/strmd5.c delete mode 100644 org.glite.jobid.api-c/test/base64_test.cpp delete mode 100644 org.glite.jobid.api-cpp/Makefile delete mode 100755 org.glite.jobid.api-cpp/configure delete mode 100755 org.glite.jobid.api-cpp/interface/JobId.h delete mode 100644 org.glite.jobid.api-cpp/project/ChangeLog delete mode 100644 org.glite.jobid.api-cpp/project/package.description delete mode 100644 org.glite.jobid.api-cpp/project/package.summary delete mode 100644 org.glite.jobid.api-cpp/project/version.properties delete mode 100644 org.glite.jobid.api-java/Makefile delete mode 100755 org.glite.jobid.api-java/build.xml delete mode 100755 org.glite.jobid.api-java/configure delete mode 100755 org.glite.jobid.api-java/nbproject/build-impl.xml delete mode 100755 org.glite.jobid.api-java/nbproject/genfiles.properties delete mode 100644 org.glite.jobid.api-java/nbproject/private/config.properties delete mode 100755 org.glite.jobid.api-java/nbproject/private/private.properties delete mode 100644 org.glite.jobid.api-java/nbproject/private/private.xml delete mode 100755 org.glite.jobid.api-java/nbproject/project.properties delete mode 100755 org.glite.jobid.api-java/nbproject/project.xml delete mode 100644 org.glite.jobid.api-java/project/ChangeLog delete mode 100644 org.glite.jobid.api-java/project/package.description delete mode 100644 org.glite.jobid.api-java/project/package.summary delete mode 100644 org.glite.jobid.api-java/project/version.properties delete mode 100644 org.glite.jobid.api-java/src/org/glite/jobid/ExampleJobid.java delete mode 100644 org.glite.jobid.api-java/src/org/glite/jobid/Jobid.java delete mode 100644 org.glite.jobid/project/version.properties delete mode 100644 org.glite.lb.glite-LB/Makefile delete mode 100755 org.glite.lb.glite-LB/configure delete mode 100644 org.glite.lb.glite-LB/project/ChangeLog delete mode 100644 org.glite.lb.glite-LB/project/package.description delete mode 100644 org.glite.lb.glite-LB/project/package.summary delete mode 100644 org.glite.lb.glite-LB/project/version.properties create mode 100644 org.glite.lb.nagios/Makefile rename {org.glite.lbjp-common.gss => org.glite.lb.nagios}/configure (89%) create mode 100644 org.glite.lb.nagios/project/ChangeLog create mode 100644 org.glite.lb.nagios/project/package.description create mode 100644 org.glite.lb.nagios/project/package.summary create mode 100644 org.glite.lb.nagios/project/version.properties create mode 100755 org.glite.lb.nagios/src/LB-probe delete mode 100644 org.glite.lbjp-common.db/.cvsignore delete mode 100644 org.glite.lbjp-common.db/LICENSE delete mode 100644 org.glite.lbjp-common.db/Makefile delete mode 100755 org.glite.lbjp-common.db/configure delete mode 100644 org.glite.lbjp-common.db/doc/C.dox delete mode 100644 org.glite.lbjp-common.db/examples/db_expire.c delete mode 100644 org.glite.lbjp-common.db/examples/db_test.c delete mode 100644 org.glite.lbjp-common.db/interface/db-int.h delete mode 100644 org.glite.lbjp-common.db/interface/db.h delete mode 100644 org.glite.lbjp-common.db/project/.post delete mode 100644 org.glite.lbjp-common.db/project/.postun delete mode 100644 org.glite.lbjp-common.db/project/ChangeLog delete mode 100755 org.glite.lbjp-common.db/project/get_soname.sh delete mode 100644 org.glite.lbjp-common.db/project/package.description delete mode 100644 org.glite.lbjp-common.db/project/package.summary delete mode 100644 org.glite.lbjp-common.db/project/version.properties delete mode 100644 org.glite.lbjp-common.db/src/db-mysql.c delete mode 100644 org.glite.lbjp-common.db/src/db-pg.c delete mode 100644 org.glite.lbjp-common.db/src/db.c delete mode 100644 org.glite.lbjp-common.db/test/timezone.cpp delete mode 100644 org.glite.lbjp-common.gsoap-plugin/LICENSE delete mode 100644 org.glite.lbjp-common.gsoap-plugin/Makefile delete mode 100755 org.glite.lbjp-common.gsoap-plugin/configure delete mode 100644 org.glite.lbjp-common.gsoap-plugin/examples/calc.h.S delete mode 100644 org.glite.lbjp-common.gsoap-plugin/examples/wscalc_clt_ex.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/examples/wscalc_srv_ex2.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/interface/glite_gscompat.h.in delete mode 100644 org.glite.lbjp-common.gsoap-plugin/interface/glite_gsplugin-int.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/interface/glite_gsplugin.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/.post delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/.postun delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/ChangeLog delete mode 100755 org.glite.lbjp-common.gsoap-plugin/project/libtoolhack/gcc delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/package.description delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/package.summary delete mode 100644 org.glite.lbjp-common.gsoap-plugin/project/version.properties delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/glite_gsplugin.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/sizeof_soap.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.6.2.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.6.2.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0f.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.0f.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.10.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.10.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6b.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6b.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6d.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.6d.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9b.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9b.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9d.c delete mode 100644 org.glite.lbjp-common.gsoap-plugin/src/stdsoap2_2.7.9d.h delete mode 100644 org.glite.lbjp-common.gsoap-plugin/test/test_gsplugin_cxx.cpp delete mode 100644 org.glite.lbjp-common.gss/LICENSE delete mode 100644 org.glite.lbjp-common.gss/Makefile delete mode 100644 org.glite.lbjp-common.gss/interface/glite_gss.h delete mode 100644 org.glite.lbjp-common.gss/project/.post delete mode 100644 org.glite.lbjp-common.gss/project/.postun delete mode 100644 org.glite.lbjp-common.gss/project/ChangeLog delete mode 100644 org.glite.lbjp-common.gss/project/package.description delete mode 100644 org.glite.lbjp-common.gss/project/package.summary delete mode 100644 org.glite.lbjp-common.gss/project/version.properties delete mode 100644 org.glite.lbjp-common.gss/src/glite_gss.c delete mode 100644 org.glite.lbjp-common.gss/test/test_gss.cpp delete mode 100644 org.glite.lbjp-common.jp-interface/Makefile delete mode 100755 org.glite.lbjp-common.jp-interface/configure delete mode 100644 org.glite.lbjp-common.jp-interface/interface/attr.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/backend.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/builtin_plugins.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/context.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/file_plugin.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/indexdb.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/known_attr.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/type_plugin.h delete mode 100644 org.glite.lbjp-common.jp-interface/interface/types.h delete mode 100644 org.glite.lbjp-common.jp-interface/project/.post delete mode 100644 org.glite.lbjp-common.jp-interface/project/.postun delete mode 100644 org.glite.lbjp-common.jp-interface/project/ChangeLog delete mode 100644 org.glite.lbjp-common.jp-interface/project/package.description delete mode 100644 org.glite.lbjp-common.jp-interface/project/package.summary delete mode 100644 org.glite.lbjp-common.jp-interface/project/version.properties delete mode 100644 org.glite.lbjp-common.jp-interface/src/attr.c delete mode 100644 org.glite.lbjp-common.jp-interface/src/context.c delete mode 100644 org.glite.lbjp-common.jp-interface/src/indexdb.c delete mode 100644 org.glite.lbjp-common.jp-interface/src/utils.c delete mode 100644 org.glite.lbjp-common.jp-interface/test/type_test.cpp delete mode 100644 org.glite.lbjp-common.log/LICENSE delete mode 100644 org.glite.lbjp-common.log/Makefile delete mode 100644 org.glite.lbjp-common.log/README delete mode 100644 org.glite.lbjp-common.log/config/log4crc delete mode 100644 org.glite.lbjp-common.log/config/log4crc.debugging delete mode 100755 org.glite.lbjp-common.log/configure delete mode 100644 org.glite.lbjp-common.log/project/.post delete mode 100644 org.glite.lbjp-common.log/project/.postun delete mode 100644 org.glite.lbjp-common.log/project/ChangeLog delete mode 100644 org.glite.lbjp-common.log/project/package.description delete mode 100644 org.glite.lbjp-common.log/project/package.summary delete mode 100644 org.glite.lbjp-common.log/project/version.properties delete mode 100644 org.glite.lbjp-common.log/src/log.c delete mode 100644 org.glite.lbjp-common.log/src/log.h delete mode 100644 org.glite.lbjp-common.log/tests/log4crc delete mode 100644 org.glite.lbjp-common.log/tests/test.c delete mode 100644 org.glite.lbjp-common.maildir/.cvsignore delete mode 100644 org.glite.lbjp-common.maildir/Makefile delete mode 100755 org.glite.lbjp-common.maildir/configure delete mode 100644 org.glite.lbjp-common.maildir/interface/maildir.h delete mode 100644 org.glite.lbjp-common.maildir/project/.post delete mode 100644 org.glite.lbjp-common.maildir/project/.postun delete mode 100644 org.glite.lbjp-common.maildir/project/ChangeLog delete mode 100644 org.glite.lbjp-common.maildir/project/package.description delete mode 100644 org.glite.lbjp-common.maildir/project/package.summary delete mode 100644 org.glite.lbjp-common.maildir/project/version.properties delete mode 100644 org.glite.lbjp-common.maildir/src/maildir.c delete mode 100644 org.glite.lbjp-common.server-bones/.cvsignore delete mode 100644 org.glite.lbjp-common.server-bones/Makefile delete mode 100755 org.glite.lbjp-common.server-bones/configure delete mode 100644 org.glite.lbjp-common.server-bones/examples/cnt_example.c delete mode 100644 org.glite.lbjp-common.server-bones/examples/srv_example.c delete mode 100644 org.glite.lbjp-common.server-bones/interface/srvbones.h delete mode 100644 org.glite.lbjp-common.server-bones/project/.post delete mode 100644 org.glite.lbjp-common.server-bones/project/.postun delete mode 100644 org.glite.lbjp-common.server-bones/project/ChangeLog delete mode 100644 org.glite.lbjp-common.server-bones/project/package.description delete mode 100644 org.glite.lbjp-common.server-bones/project/package.summary delete mode 100644 org.glite.lbjp-common.server-bones/project/version.properties delete mode 100644 org.glite.lbjp-common.server-bones/src/srvbones.c delete mode 100644 org.glite.lbjp-common.trio/.cvsignore delete mode 100644 org.glite.lbjp-common.trio/LICENSE delete mode 100644 org.glite.lbjp-common.trio/Makefile delete mode 100755 org.glite.lbjp-common.trio/configure delete mode 100644 org.glite.lbjp-common.trio/interface/escape.h delete mode 100644 org.glite.lbjp-common.trio/interface/trio.h delete mode 100644 org.glite.lbjp-common.trio/project/.post delete mode 100644 org.glite.lbjp-common.trio/project/.postun delete mode 100644 org.glite.lbjp-common.trio/project/ChangeLog delete mode 100644 org.glite.lbjp-common.trio/project/package.description delete mode 100644 org.glite.lbjp-common.trio/project/package.summary delete mode 100644 org.glite.lbjp-common.trio/project/version.properties delete mode 100644 org.glite.lbjp-common.trio/src/escape.c delete mode 100644 org.glite.lbjp-common.trio/src/strio.c delete mode 100644 org.glite.lbjp-common.trio/src/strio.h delete mode 100644 org.glite.lbjp-common.trio/src/trio.c delete mode 100644 org.glite.lbjp-common.trio/src/triop.h delete mode 100644 org.glite.lbjp-common.trio/test/trio_test.cpp delete mode 100644 org.glite.lbjp-common/project/version.properties diff --git a/org.glite.jobid.api-c/Makefile b/org.glite.jobid.api-c/Makefile deleted file mode 100644 index f1de15c..0000000 --- a/org.glite.jobid.api-c/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# Default values -top_srcdir=.. -stagedir=. -globalprefix=glite -jobidprefix=jobid -package=glite-jobid-api-c -version=0.0.0 - -CC:=gcc -CXX:=g++ - --include Makefile.inc --include ${top_srcdir}/project/version.properties - -version=${module.version} - -VPATH=${top_srcdir}/src:${top_srcdir}/interface:${top_srcdir}/test - -DEBUG:=-g -O0 -Wall - -CFLAGS:=${DEBUG} \ - -I${top_srcdir}/interface -I${top_srcdir}/src \ - ${COVERAGE_FLAGS} \ - -D_GNU_SOURCE - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS} -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install - -LIBOBJS:=cjobid.o strmd5.o -HDRS:=cjobid.h strmd5.h - -LIBLOBJS:=${LIBOBJS:.o=.lo} - -LIB:=libglite_jobid.la - -TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit -ldl -TEST_INC:=-I${cppunit_prefix}/include - -compile all: ${LIB} - -# In order to use libtool versioning correcty, we must have: -# -# current = major + minor + offset -# revision = patch -# age = minor -# -# where offset is a sum of maximal released minor's of all previous major's -# - -# counted minors: 1.0 -offset=0 -version_info:=-version-info ${shell \ - perl -e '$$,=":"; @F=split /\./,"${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } - -${LIB}: ${LIBOBJS} - ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${stagedir}${prefix}/${libdir} - -check: compile base64_test - ./base64_test base64_test.xml - -base64_test: %: %.cpp compile - ${CXX} -c ${CFLAGS} ${TEST_INC} $< - ${LINKXX} -o $@ $@.o ${LIB} ${TEST_LIBS} - -clean: - rm -rvf *.o *.lo .libs/ lib* *.c *.cpp *.h - rm -vf base64_test base64_test.xml - rm -rvf log.xml rpmbuild/ RPMS/ tgz/ debian/ - -stage: - $(MAKE) install PREFIX=${stagedir} - -install: ${LIB} - mkdir -p ${DESTDIR}${PREFIX}${prefix}/${libdir} - mkdir -p ${DESTDIR}${PREFIX}${prefix}/include/${globalprefix}/${jobidprefix} - ${INSTALL} -m 644 ${LIB} ${DESTDIR}${PREFIX}${prefix}/${libdir} - (cd ${top_srcdir}/interface; ${INSTALL} -m 644 ${HDRS} ${DESTDIR}${PREFIX}${prefix}/include/${globalprefix}/${jobidprefix}) - - -%.o: %.c - ${COMPILE} -o $@ -c $< - - -.PHONY: default all compile check stage install clean diff --git a/org.glite.jobid.api-c/configure b/org.glite.jobid.api-c/configure deleted file mode 100755 index e2b3330..0000000 --- a/org.glite.jobid.api-c/configure +++ /dev/null @@ -1,1400 +0,0 @@ -#!/usr/bin/perl - -# WARNING: Don't edit this file unless it is the master copy in org.glite.lb -# -# For the purpose of standalone builds of lb/jobid/lbjp-common components -# it is copied on tagging - -# $Header$ -# -# Copyright (c) Members of the EGEE Collaboration. 2004-2010. -# See http://www.eu-egee.org/partners/ for details on the copyright holders. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -use Getopt::Long; - -my $pwd = `pwd`; chomp $pwd; -my $prefix = '/usr'; -my $stagedir = undef; -my $root = $pwd.'/stage'; -my $sysroot = ''; -my $sysconfdir; -my $localstatedir; -my $staged; -my $module; -my $thrflavour = 'gcc64dbgpthr'; -my $nothrflavour = 'gcc64dbg'; -my $mode = 'build'; -my $help = 0; -my $listmodules; -my $version; -my $branch; -my $output; -my $lb_tag = ''; -my $lbjp_tag = ''; -my $jp_tag = ''; -my $jobid_tag = ''; -my $libdir = getlibdir(); -my $project = 'glite'; -my (%projects, %project); -my $debug = 0; -my $pkg_config_env = (defined $ENV{PKG_CONFIG_PATH}) ? "$ENV{PKG_CONFIG_PATH}:" : ''; - -my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; -my @default_nodes = qw/lb px proxyrenewal/; -my %enable_nodes; -my %disable_nodes; -my %default_nodes; @default_nodes{@default_nodes} = (1) x ($#default_nodes + 1); - -# key: internal package name (arguments, ...) -# 'pkg': pkg-config name -# 'prefix': used when pkg-config fails -my %externs = ( - cares => { - prefix => '/opt/c-ares', - pkg => 'libcares' - }, - classads => { - prefix=> '/usr', - pkg => 'classads' - }, - cppunit => { - prefix=> '/usr', - pkg => 'cppunit' - }, - expat => { - prefix=> '/usr', - pkg => 'expat' - }, - globus => { - prefix=> '/opt/globus', - pkg => 'globus-gssapi-gsi' - }, - 'myproxy-devel' => { - prefix=> '/opt/globus', - pkg => 'myproxy' - }, - 'myproxy-server' => { - prefix=> '', - }, - 'myproxy-libs' => { - prefix=> '', - }, - 'myproxy-admin' => { - prefix=> '', - }, - gsoap => { - prefix=> '/usr', - pkg => 'gsoap' - }, - gsoapxx => { - prefix=> '/usr', - pkg => 'gsoap++' - }, - mysql => { - prefix=> '/usr' - }, - 'mysql-devel' => { - prefix=> '' - }, - 'mysql-server' => { - prefix => '' - }, - voms => { - prefix => '/opt/glite', - pkg => 'voms-2.0' - }, - gridsite => { - prefix => '/opt/glite' - }, - lcas => { - prefix => '/opt/glite', - pkg => 'lcas' - }, - trustmanager => { - prefix => '/opt/glite' - }, - trustmanager_axis => { - prefix => '/opt/glite' - }, - utiljava => { - prefix=> '/opt/glite' - }, - ant => { - prefix=> '/usr' - }, - jdk => { - prefix=> '/usr/java/latest' - }, - libtar => { - prefix=> '/usr' - }, - axis => { - prefix=> '/usr' - }, - log4c => { - prefix=> '/usr' - }, - postgresql => { - prefix=> '/usr' - }, - activemq => { - prefix=>'/opt/activemq-cpp-library', - pkg => 'activemq-cpp' - }, - apr => { - prefix=>'/opt/apr', - pkg => 'apr-1' - }, - aprutil => { - prefix=>'/opt/apr-util', - pkg => 'apr-util-1' - }, -); - -my %jar = ( - 'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar', - 'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar', -); - - -my %glite_prefix; -my %need_externs; -my %need_externs_type; -my %need_jars; -my %extrafull; -my %extranodmod; -my %deps; -my %deps_type; -my %buildroot; -my (%etics_externs, %etics_projects); - -# -# modules of the subsystems -# -# additional modules from $project{modules} are automatically added -# -my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim logger-msg/], - 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/], - 'jobid' => [qw/api-c api-cpp api-java/], - 'jp' => [ qw/client doc index primary server-common ws-interface/ ], - 'gridsite' => [ qw/apache shared commands core devel slashgrid services service-clients gsexec/ ], - 'px' => [ qw/proxyrenewal myproxy-yaim/ ], - ); - - -my @opts = ( - 'prefix:s' => \$prefix, - 'staged=s' => \$staged, - 'module=s' => \$module, - 'thrflavour:s' => \$thrflavour, - 'nothrflavour:s' => \$nothrflavour, - 'mode=s' => \$mode, - 'listmodules=s' => \$listmodules, - 'version=s' => \$version, - 'branch=s' => \$branch, - 'output=s' => \$output, - 'stage=s' => \$stagedir, - 'root:s' => \$root, - 'sysroot:s' => \$sysroot, - 'sysconfdir=s' => \$sysconfdir, - 'localstatedir=s' => \$localstatedir, - 'lb-tag=s' => \$lb_tag, - 'lbjp-common-tag=s' => \$lbjp_tag, - 'jp-tag=s' => \$jp_tag, - 'jobid-tag=s' => \$jobid_tag, - 'help' => \$help, - 'libdir=s' => \$libdir, - 'project=s' => \$project, - 'debug' => \$debug, -); - -for (@nodes) { - $enable_nodes{$_} = 0; - $disable_nodes{$_} = 0; - - push @opts,"disable-$_",\$disable_nodes{$_}; - push @opts,"enable-$_",\$enable_nodes{$_}; -} - -push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs; -push @opts,"with-$_=s",\$jar{$_} for keys %jar; - -my @keeparg = @ARGV; - -GetOptions @opts or die "Errors parsing command line\n"; -$prefix=~s/\/$//; -$root=~s/\/$//; -$sysroot=~s/\/$//; -if (not $sysconfdir) { $sysconfdir = $prefix eq '/usr' ? '/etc' : "$prefix/etc"; } -if (not $localstatedir) { $localstatedir = $prefix eq '/usr' ? '/var' : "$prefix/var"; } -$sysconfdir=~s/\/$//; -$localstatedir=~s/\/$//; - -$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq ''; -$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq ''; -$externs{'gsoapxx'}{prefix}=$externs{gsoap}{prefix} if $externs{'gsoapxx'}{prefix} eq ''; - -$externs{'mysql-server'}{withprefix}=$externs{mysql}{withprefix} if $externs{'mysql-server'}{withprefix} eq ''; -$externs{'mysql-devel'}{wihtprefix}=$externs{mysql}{withprefix} if $externs{'mysql-devel'}{withprefix} eq ''; -$externs{'gsoapxx'}{withprefix}=$externs{gsoap}{withprefix} if $externs{'gsoapxx'}{withprefix} eq ''; - -%project = %{$projects{$project}}; -for $_ (keys %{$project{etics_externs}}) { - $etics_externs{$_} = $project{etics_externs}{$_}; -} -for $_ (keys %{$project{etics_projects}}) { - $etics_projects{$_} = $project{etics_projects}{$_}; -} -for $_ (keys %{$project{need_externs_aux}}) { - $need_externs_aux{$_} = $project{need_externs_aux}{$_}; -} -for my $ext (keys %need_externs_aux) { - for (@{$need_externs_aux{$ext}}) { - my ($pkg, $type) =/([^:]*)(?::(.*))?/; - $type = 'BR' unless ($type); - - push @{$need_externs{$ext}},$pkg; - $need_externs_type{$ext}->{$pkg} = $type; - } -} -for $_ (keys %{$project{modules}}) { - push @{$lbmodules{$_}},@{$project{modules}{$_}}; -} - - -if ($help) { usage(); exit 0; } - -if ($listmodules) { - my $name_prefix = ($listmodules eq 'gridsite' and $project eq 'glite') ? 'org' : $project{etics_name}; - my @m = map "$name_prefix.$listmodules.$_",@{$lbmodules{$listmodules}}; - print "@m\n"; - exit 0; -} - -warn "$0: --version, --branch and --output make sense only in --mode=etics\n" - if ($version || $output || $branch) && $mode ne 'etics'; - -my $en; -for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } - -my $dis; -for (keys %disable_nodes) { $dis = 1 if $disable_nodes{$_}; } - -die "--enable-* and --disable-* are mutually exclusive\n" - if $en && $dis; - -die "--module cannot be used with --enable-* or --disable-*\n" - if $module && ($en || $dis); - -die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}}; - -if ($dis) { - for (@nodes) { - $enable_nodes{$_} = 1 unless ($disable_nodes{$_} or not $default_nodes{$_}); - } -} - -if (!$en && !$dis) { for (@nodes) { $enable_nodes{$_} = 1 if ($default_nodes{$_}) } }; - -for (keys %enable_nodes) { delete $enable_nodes{$_} unless $enable_nodes{$_}; } - -$stagedir = $root unless $stagedir; -$stagedir=~s/\/$// if ($stagedir); - -if ($mode eq 'build') { for my $ext (keys %externs) { - if (defined $externs{$ext} and defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; } - elsif (defined $externs{$ext}{pkg}) { - my ($flag, $env, $cmd, $ret); - my $pkg = $externs{$ext}{pkg}; - my $flagname = uc $externs{$ext}{pkg}; - $flagname =~ s/-[0-9\.]*$//; - $flagname =~ y/-\+/_X/; - - print "Checking $pkg ... "; - $env = "PKG_CONFIG_PATH=$pkg_config_env$stagedir$prefix/$libdir/pkgconfig"; - $cmd = "$env pkg-config $pkg --exists >/dev/null"; - `$cmd`; $ret = $?; - print "('$cmd' => $ret)\n" if ($debug); - if ($ret == 0) { - $externs{$ext}{prefix}=`$env pkg-config $pkg --variable=prefix`; - chomp $externs{$ext}{prefix}; - print "$externs{$ext}{prefix}\n"; - - $flag=`$env pkg-config $pkg --cflags`; - $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag); - $flag=`$env pkg-config $pkg --libs`; - $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag); - } else { - print "(using default $externs{$ext}{prefix})\n"; - } - print "\n" if ($debug); - } - elsif ($ext eq 'jdk') { - my $jdk_prefix; - - print "Looking for some caffein ... "; - if (defined $ENV{'JDK_HOME'}) { - $jdk_prefix = $ENV{'JDK_HOME'}; - print "JDK_HOME=$jdk_prefix\n"; - } elsif (defined $ENV{'JAVA_HOME'}) { - $jdk_prefix = $ENV{'JAVA_HOME'}; - print "JAVA_HOME=$jdk_prefix\n"; - } else { - print "(using default $externs{$ext}{prefix}))\n" - } - $externs{$ext}{prefix} = $jdk_prefix if ($jdk_prefix); - } -} } - -if ($mode eq 'build') { - print "Writing config.status\n"; - open CONF,">config.status" or die "config.status: $!\n"; - for ('JDK_HOME', 'JAVA_HOME', 'PKG_CONFIG_PATH') { - print CONF "$_=$ENV{$_} " if (defined $ENV{$_}); - } - print CONF "$0 @keeparg\n"; - close CONF; -} - - -my @modules; -my %aux; - -if ($module) { -# push @modules,split(/[,.]+/,$module); - push @modules,$module; -} -else { - @modules = map(($extranodmod{$_} ? $extranodmod{$_} : 'lb.'.$_),(keys %enable_nodes)); - - my $n; - - do { - local $"="\n"; - $n = $#modules; - push @modules,(map @{$deps{$_}},@modules); - - undef %aux; @aux{@modules} = (1) x ($#modules+1); - @modules = keys %aux; - } while ($#modules > $n); -} - -@aux{@modules} = (1) x ($#modules+1); -delete $aux{$_} for (split /,/,$staged); -@modules = keys %aux; - -mode_build() if $mode eq 'build'; -mode_checkout() if $mode eq 'checkout'; -mode_etics($module) if $mode eq 'etics'; - -sub mode_build { - print "\nBuilding modules: @modules\n"; - print "Mode: "; print $module ? "single module" : "multiple modules"; print "\n"; - - my @ext = map @{$need_externs{$_}},@modules; - my @myjars = map @{$need_jars{$_}},@modules; - undef %aux; @aux{@ext} = 1; - @ext = keys %aux; - undef %aux; @aux{@myjars} = (1) x ($#myjars+1); - @myjars = keys %aux; - - print "\nRequired externals:\n"; - print "\t$_: ".($externs{$_}{prefix}?$externs{$_}{prefix}:'-')."\n" for @ext; - print "\t$_: $jar{$_}\n" for @myjars; - for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } }; - print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n"; - - mkinc($_) for @modules; - - if ($module) { - print "Not creating summary Makefile\n" if $debug; - } else { - print "Creating Makefile\n"; - - open MAK,">Makefile" or die "Makefile: $!\n"; - - print MAK "all: @modules\n\n"; - print MAK "stage: ".(join '-stage ', @modules)."-stage\n\n"; - print MAK "clean check install:\n"; - - for (@modules) { - my $full = full($_); - print MAK "\tcd $full/$buildroot{$_} && \${MAKE} \$@\n" - } - - print MAK "\ndistclean:\n"; - - for (@modules) { - my $full = full($_); - print MAK $buildroot{$_} eq '' ? - "\tcd $full && \${MAKE} distclean\n" : - "\trm -rf $full/$buildroot{$_}\n" - } - - print MAK "\n"; - - for (@modules) { - my %ldeps; undef %ldeps; - @ldeps{@{$deps{$_}}} = 1; - for my $x (split /,/,$staged) { delete $ldeps{$x}; } - my @dnames = $module ? () : keys %ldeps; - my $snames = $#dnames == -1 ? '' : join('-stage ', @dnames).'-stage'; - - my $full = full($_); - my $build = $buildroot{$_}; - - print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n"; - print MAK "$_-stage: $snames\n\tcd $full/$build && \${MAKE} && \${MAKE} stage\n\n"; - } - - close MAK; - } -} - -sub mode_checkout() { - for (@modules) { - my $module = $_; - my $tag = ""; - if ($lb_tag){ - for (@{$lbmodules{lb}}){ - if ("lb.".$_ eq $module){ - $tag = '-r '.$lb_tag; - } - } - } - if ($lbjp_tag){ - for (@{$lbmodules{'lbjp-common'}}){ - if ("lbjp-common.".$_ eq $module){ - $tag = '-r '.$lbjp_tag; - } - } - } - if ($jp_tag){ - for (@{$lbmodules{'jp'}}){ - if ("jp.".$_ eq $module){ - $tag = '-r '.$jp_tag; - } - } - } - if ($jobid_tag){ - for (@{$lbmodules{jobid}}){ - if ("jobid.".$_ eq $module){ - $tag = '-r '.$jobid_tag; - } - } - } - #if (grep {"lb.".$_ eq $module} @{$lbmodules{lb}}){ - # print "found"; - #} - $_ = full($_); - print "\n*** Checking out $_\n"; - system("cvs checkout $tag $_") == 0 or die "cvs checkout $tag $_: $?\n"; - } -} - -BEGIN{ -%etics_externs = ( - 'myproxy-devel'=>'myproxy-devel', - 'myproxy-libs'=>'myproxy-libs', - 'myproxy-server'=>'myproxy-server', - 'myproxy-admin'=>'myproxy-admin', - cares=>'c-ares', - voms=>'org.glite.security.voms-api-cpp', - utiljava=>'org.glite.security.util-java', - gpt=>'gpt', - fetchcrl=>'fetch-crl', - activemq=>'activemq-cpp-library', - apr=>'apr-dev', - aprutil=>'aprutil-dev', -); - -%etics_projects = ( -); - -%need_externs_aux = ( - 'lb.client' => [ qw/cppunit:B classads libtool:B/ ], - 'lb.common' => [ qw/expat cares:B cppunit:B classads libtool:B/ ], - 'lb.doc' => [ qw/tetex-latex:B/ ], - 'lb.logger' => [ qw/cppunit:B libtool:B/ ], - 'lb.logger-msg' => [ qw/cppunit:B activemq libtool:B/ ], - 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite bison:B libtool:B libxml2 flex:B/ ], - 'lb.state-machine' => [ qw/classads libtool:B libxslt:B expat:B/ ], - 'lb.utils' => [ qw/cppunit:B libtool:B/ ], - 'lb.ws-interface' => [ qw/libxslt:B/ ], - 'lb.ws-test' => [ qw/gsoap:B libtool:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/docbook-utils:B libtool:B/ ], - 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.log' => [ qw/log4c libtool:B/ ], - 'lbjp-common.maildir' => [ qw/libtool:B/ ], - 'lbjp-common.server-bones' => [ qw/libtool:B/ ], - 'lbjp-common.trio' => [ qw/cppunit:B libtool:B/ ], - 'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B libtool:B/ ], - 'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap gsoapxx libtool:B/ ], - 'jobid.api-c' => [ qw/cppunit:B libtool:B openssl:B/ ], - 'jobid.api-cpp' => [ qw/cppunit:B libtool:B/ ], - 'jobid.api-java' => [ qw/ant:B jdk:B/ ], - 'jp.client' => [ qw/gsoap libtar globus_essentials:R globus:B/ ], - 'jp.doc' => [], - 'jp.index' => [ qw/gsoap globus_essentials:R globus:B/ ], - 'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ], - 'jp.server-common' => [], - 'jp.ws-interface' => [], - 'gridsite.core' => [ qw/httpd-devel:B gsoap:B globus:B curl:B doxygen:B fuse-devel:B libxml2 openssl:B build_common_cpp:B doxygen:B/ ], - 'gridsite.commands' => [ qw/curl:R openssl:R/ ], - 'gridsite.apache' => [ qw/libxml2:R openssl:R curl:R/ ], - 'gridsite.shared' => [ qw/libxml2:R openssl:R/ ], - 'gridsite.devel' => [ qw// ], - 'gridsite.slashgrid' => [ qw/curl:R fuse-libs:R fuse:R/], - 'gridsite.services' => [ qw/curl:R gsoap:R/ ], - 'gridsite.service-clients' => [ qw/curl:R gsoap:R gsoapxx:R/ ], - 'gridsite.gsexec' => [ qw// ], - 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-devel:B myproxy-libs:R voms libtool:B/ ], - 'px.myproxy-config' => [ qw/myproxy-admin:R/ ], # in myproxy-config.spec -); - -%need_jars = ( - 'jobid.api-java' => [ qw/jakarta-commons-codec/ ], - 'lb.client-java' => [ qw/jakarta-commons-lang/ ], -); - -for my $jar (keys %need_jars) { - for (@{$need_jars{$jar}}) { - $need_externs_type{$jar}->{$_} = 'BR'; # XXX - } -} - -%deps_aux = ( - 'lb.client' => [ qw/ - lb.types:B lb.common - lbjp-common.trio - jobid.api-cpp:B jobid.api-c - lbjp-common.gss - / ], - 'lb.client-java' => [ qw/ - lb.types:B - lb.ws-interface:B - jobid.api-java - / ], - 'lb.common' => [ qw/ - jobid.api-cpp:B jobid.api-c - lb.types:B lbjp-common.trio lbjp-common.gss - / ], - 'lb.doc' => [ qw/lb.types:B/ ], - 'lb.logger' => [ qw/ - lbjp-common.trio - lbjp-common.log - jobid.api-c - lb.common - lbjp-common.gss - / ], - 'lb.logger-msg' => [ qw/ - lb.logger - / ], - 'lb.server' => [ qw/ - lb.ws-interface lb.types:B lb.common lb.state-machine - lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log - jobid.api-c - lbjp-common.gsoap-plugin lbjp-common.gss - / ], - 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ], - 'lb.utils' => [ qw/ - lbjp-common.jp-interface - jobid.api-c - lbjp-common.trio lbjp-common.maildir - lb.client lb.state-machine lb.types:B - / ], - 'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ], - 'lb.ws-interface' => [ qw/lb.types:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/ - jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client - lbjp-common.gss lbjp-common.log - / ], - 'lb.yaim' => [ qw// ], - 'lb.glite-LB' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lb.emi-lb' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ], - 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.log' => [ qw// ], - 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], - 'lbjp-common.trio' => [ qw// ], - 'lbjp-common.gss' => [ qw// ], - 'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ], - 'jobid.api-c' => [ qw// ], - 'jobid.api-cpp' => [ qw/jobid.api-c/ ], - 'jobid.api-java' => [ qw// ], - - 'lbjp-common.jp-interface' => [ qw/lbjp-common.db jobid.api-c/ ], - - 'jp.client' => [ qw/ - jp.ws-interface - lbjp-common.jp-interface lbjp-common.maildir - jobid.api-c - lbjp-common.gsoap-plugin - / ], - 'jp.doc' => [ qw// ], - 'jp.index' => [ qw/ - jp.server-common jp.ws-interface - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.primary' => [ qw/ - jobid.api-c - jp.server-common jp.ws-interface - lb.state-machine - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.server-common' => [ qw/ - lbjp-common.jp-interface lbjp-common.db - / ], - 'jp.ws-interface' => [ qw// ], - - 'gridsite.core' => [ qw// ], - 'gridsite.commands' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.apache' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.shared' => [ qw/gridsite.core:B / ], - 'gridsite.devel' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.slashgrid' => [ qw/gridsite.core:B gridsite.shared:R/], - 'gridsite.services' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.service-clients' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.gsexec' => [ qw/gridsite.core:B/ ], - - 'px.proxyrenewal' => [ qw// ], - 'px.glite-PX' => [qw/px.myproxy-yaim:R/], - 'px.emi-px' => [qw/px.myproxy-yaim:R/], - 'px.myproxy-yaim' => [ qw// ], - 'px.myproxy-config' => [], -); - -for my $ext (keys %deps_aux) { - for (@{$deps_aux{$ext}}) { - /([^:]*)(?::(.*))?/; - push @{$deps{$ext}},$1; - my $type = $2 ? $2 : 'BR'; - $deps_type{$ext}->{$1} = $type; - } -} - - -%extrafull = ( gridsite=>'org.gridsite.core'); - -#( java => 'client-java' ); -%extranodmod = ( - db => 'lbjp-common.db', - jpprimary => 'jp.primary', - jpindex => 'jp.index', - jpclient => 'jp.client', - lb => 'lb.glite-LB', - px => 'px.glite-PX', - proxyrenewal => 'px.proxyrenewal' -); - -%obsoletes = ( - 'lb.yaim' => [ qq/glite-yaim-lb/ ], - 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ], - 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ], - 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%conflicts = ( -); - -%provides = ( - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%cvs_prefix = ( - 'lb' => 'org.glite', - 'jp' => 'org.glite', - 'jobid' => 'org.glite', - 'lbjp-common' => 'org.glite', - 'gridsite' => 'org', - 'px' => 'org.glite', -); - -%cvs_tag_prefix = ( - 'lb' => 'glite-', - 'jp' => 'glite-', - 'jobid' => 'glite-', - 'lbjp-common' => 'glite-', - 'gridsite' => '', - 'px' => 'glite-', -); - -# ==== projects specification ==== -# etics_name ........... ETICS project name -# conf_prefix .......... ETICS configurations name prefix -# tag_prefix ........... VCS tag prefix -# local_prefix ......... prefix (relative to stage) -# etics_externs ........ ETICS modules names of externals -# (${NAME.location}, ETICS conf. dependencies) -# etics_projects ....... ETICS project names of externals -# etics_externs_devel .. ETICS modules names of devel versions of externals -# need_externs_aux ..... project-specific external dependencies -# supported_platforms .. platforms supported by the project -# modules .............. additional modules in subsystems -%projects = ( - glite => { - etics_name => 'org.glite', - conf_prefix => { %cvs_tag_prefix }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour=${globus.thr.flavor} --nothrflavour=${globus.nothr.flavor}', - local_prefix => '', - etics_externs => { - globus_essentials=>'vdt_globus_essentials', - globus=>'globus', - gridsite=>'org.gridsite.shared', - yaim_core=>'org.glite.yaim.core', - gip_release=>'glite-info-provider-release', - gip_service=>'glite-info-provider-service', - bdii=>'bdii', - glite_version=>'glite-version', - glite_info_templates=>'glite-info-templates', - glue_schema=>'glue-schema', - trustmanager=>'org.glite.security.trustmanager', - axis=>'axis', - lcas=>'org.glite.security.lcas', - gsoapxx=>'-', - build_common_cpp=>'org.glite.build.common-cpp', - }, - etics_externs_devel => { - gridsite=>'org.gridsite.devel', - }, - etics_projects => { - vdt=>[qw/globus globus_essentials gpt/], - 'org.glite'=>[qw/voms gridsite lcas gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager utiljava libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R/ ], - }, - modules => { - 'lb' => [ qw/glite-LB/ ], - 'px' => [ qw/glite-PX/ ], - } - }, - - emi => { - etics_name => 'emi', - conf_prefix => { - 'lb' => 'emi-', - 'jp' => 'emi-', - 'jobid' => 'emi-', - 'lbjp-common' => 'emi-', - 'gridsite' => '', - 'px' => 'emi-', - }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour= --nothrflavour=', - local_prefix => '/usr', - etics_externs => { - globus_essentials=>'globus-gssapi-gsi', - globus=>'globus-gssapi-gsi-devel', - gridsite=>'emi.gridsite.shared', - yaim_core=>'emi.yaim.yaim-core', - yaim_bdii=>'emi.bdii.yaim-bdii', - gip_service=>'emi.bdii.glite-info-provider-service', - bdii=>'emi.bdii.core', - glite_version=>'emi.misc.glite-version', - glue_schema=>'emi.bdii.glue-schema', - trustmanager=>'emi.java-security.trustmanager', - trustmanager_axis=>'emi.java-security.trustmanager-axis', - axis=>'axis1.4', - lcas=>'emi.sac.lcas', - gsoapxx=>'-', - build_common_cpp=>'emi.misc.glite.build-common-cpp', - jdk=>'java', - }, - etics_externs_devel => { - cares => 'c-ares-devel', - classads => 'classads-devel', - cppunit => 'cppunit-devel', - expat => 'expat-devel', - gsoap => 'gsoap-devel', - voms => 'org.glite.security.voms-api', - libtar => 'libtar-devel', - log4c => 'log4c-devel', - postgresql => 'postgresql-devel', - curl => 'curl-devel', - libxml2 => 'libxml2-devel', - openssl => 'openssl-devel', - gridsite=>'emi.gridsite.devel', - jdk=>'java-devel', - }, - etics_projects => { - 'emi'=>[qw/voms voms-devel gridsite lcas gip_service bdii glite_version glue_schema yaim_core yaim_bdii trustmanager trustmanager_axis/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager trustmanager_axis libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R yaim_bdii:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R yaim_bdii:R/ ], - }, - supported_platforms => { - sl5_x86_64_gcc412EPEL => 1, - sl5_ia32_gcc412EPEL => 1, - }, - modules => { - 'lb' => [ qw/emi-lb/ ], - 'px' => [ qw/emi-px/ ], - } - }, -); - -%platform_properties = ( - 'gridsite.core' => { - sl5_x86_64_gcc412 => { aprSuffix => '1' }, - sl5_ia32_gcc412 => { aprSuffix => '1' }, - sl5_x86_64_gcc412EPEL => { aprSuffix => '1' }, - sl5_ia32_gcc412EPEL => { aprSuffix => '1' }, - deb5_x86_64_gcc432 => { aprSuffix => '1.0' }, - deb5_ia32_gcc432 => { aprSuffix => '1.0' }, - slc4_x86_64_gcc346 => { aprSuffix => '0' }, - slc4_ia32_gcc346 => { aprSuffix => '0' }, - default => { - } - }, - 'jobid.api-java' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.types' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.doc' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.ws-interface' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.myproxy-config' => { - default => { 'package.buildarch' => 'noarch' }, - }, -); - -my @k = keys %deps_aux; -@buildroot{@k} = ('') x ($#k+1); - -$buildroot{'gridsite.core'} = 'src'; -} - -sub full -{ - my $short = shift; - return $extrafull{$short} ? $extrafull{$short} : 'org.glite.'.$short; -} - -sub mkinc -{ - my %aux; - undef %aux; - my @m=qw/ -lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB -lbjp-common.gss lbjp-common.gsoap-plugin -jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin -jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface -px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config -/; - @aux{@m} = (1) x ($#m+1); - - my $short = shift; - my $full = full $short; - - unless ($aux{$short}) { - print "Makefile.inc not needed in $full\n"; - return; - } - - my $top_srcdir = '.'; - my $build = ''; - - if ($module) { - $top_srcdir = $0; - $top_srcdir =~ s,/?[^/]*$,,; - $top_srcdir =~ s,^$,\.,; - } else { - $build = "$full/"; - unless ($buildroot{$_} eq '') { - $top_srcdir = '..'; - $build .= "$buildroot{$_}/"; - unless (-d "$build") { - mkdir "$build" or die "mkdir $build: $!\n"; - } - } - } - unless ($top_srcdir eq '.') { - unlink $build."Makefile"; - symlink "$top_srcdir/Makefile",$build."Makefile" or die "symlink $top_srcdir/Makefile ".$build."Makefile: $!\n"; - for my $file ('.pre', '.post', '.preun', '.postun changelog') { - my $pfile = "project/$file"; - if (-f "$full/$pfile") { - mkdir "$build/project" unless (-d "$build/project"); - unlink $build.$pfile; - symlink "../$top_srcdir/$pfile", $build.$pfile or die "symlink ../$top_srcdir/$pfile ".$build."$pfile: $!\n"; - } - } - } - - open MKINC,">".$build."Makefile.inc" - or die $build."Makefile.inc: $!\n"; - - print "Creating ".$build."Makefile.inc\n"; - - print MKINC qq{project = $project -PREFIX = $root -prefix = $prefix -stagedir = $stagedir -sysroot = $sysroot -sysconfdir = $sysconfdir -localstatedir = $localstatedir -thrflavour = $thrflavour -nothrflavour = $nothrflavour -libdir = $libdir -top_srcdir = $top_srcdir -}; - - for (@{$need_externs{$short}}) { - next unless defined $externs{$_} and defined $externs{$_}{prefix}; - print MKINC "${_}_prefix = $externs{$_}{prefix}\n"; - print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags}; - } - - for (@{$need_jars{$short}}) { - print MKINC "${_}_jar = $jar{$_}\n" - } - - my $need_gsoap = 0; - for (@{$need_externs{$short}}) { $need_gsoap = 1 if $_ eq 'gsoap'; } - - print MKINC "gsoap_default_version=".gsoap_version()."\n" if $need_gsoap; - - close MKINC; -} - -BEGIN{ -}; - -sub mode_etics { - $fmod = shift; - - die "$0: --module required with --etics\n" unless $fmod; - - my ($subsys,$module) = split /\./,$fmod; - - my ($major,$minor,$rev,$age); - - if ($version) { - $version =~ /([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-(.+)/; - ($major,$minor,$rev,$age) = ($1,$2,$3,$4); - } - else { - my $path = "$cvs_prefix{$subsys}.$subsys.$module/project"; - if ($subsys eq 'gridsite') { - $path = "$cvs_prefix{$subsys}.$subsys.core/project"; - } - open V,"$path/version.properties" - or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n"; - - while ($_ = ) { - chomp; - ($major,$minor,$rev) = ($1,$2,$3) if /module\.version\s*=\s*([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/; - $age = $1 if /module\.age\s*=\s*([[:digit:]]+)/; - } - close V; - } - - my @copts = (); - my %ge; - @ge{@{$etics_projects{$project{etics_name}}}} = (1) x ($#{$etics_projects{$project{etics_name}}}+1); - - for (@{$need_externs{"$subsys.$module"}}) { - if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/ and (defined $externs{$_} or defined $jar{$_})) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - next if ($eext eq '-'); - if ($project ne 'glite') { - if ($ge{$_} and not defined $externs{$_}{pkg}) { - push @copts, "--with-$_=\${stageDir}"; - } - } else { - push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; - } - } - } - - for (@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - - push @copts,"--with-$_ \${$eext.location}$jar{$_}" if ($project eq 'glite'); - } - - my $conf; - my $conftag; - my ($confprefix, $nameprefix); - - $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; - - $confprefix = $project{conf_prefix}{$subsys}; - $nameprefix = $confprefix; - $nameprefix =~ s/-$//; - $nameprefix =~ s/-/\./g; - - if ($branch) { - $conf = "$confprefix${subsys}-${module}_$branch"; - $conftag = $branch; - # forced low age number - $age = $branch eq 'HEAD' ? '0head' : '0dev'; } - else { - $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; - -# XXX: gridsite hack - $conftag = $subsys eq 'gridsite' ? "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : - "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; } - - my $file = $output ? $output : "$conf.ini"; - open C,">$file" or die "$file: $!\n"; - - my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"}; - - my $confdir = $buildroot{"$subsys.$module"} eq '' ? '.' : '..'; - - my $package_description = ""; - my $package_summary = ""; - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description"; - $package_description = join ("", ); - close V; - chomp $package_description; - $package_description =~ s/\n/\\n/g; - $package_description = "package.description = $package_description\n"; - } - else { - print STDERR "package.description not found for $subsys.$module!\n"; } - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary"; - $package_summary = join ("", ); - close V; - chomp $package_summary; - $package_summary =~ s/\n/\\n/g; - $package_summary = "package.summary = $package_summary\n"; - } - else { - print STDERR "package.summary not found for $subsys.$module!\n"; } - - my %cmd; - @cmd{qw/configure compile test install packaging clean/} = ('None') x 6; - $cmd{clean} = 'make clean'; - $cmd{checkout} = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null"; - #$cmd{checkout} = "(test -d jra1mw/.git && (cd jra1mw; git pull) || git clone http://scientific.zcu.cz/git/jra1mw.git)"; - #$cmd{checkout} .= " && (cd jra1mw; git checkout \${tag})" unless ($conftag =~ /HEAD/); - #$cmd{checkout} .= " && ln -s jra1mw/$cvs_prefix{$subsys}.$subsys.$module \${moduleName}"; - $cmd{tag} = "cvs -d \${vcsroot} tag -R \${tag} ${moduleName}"; - - if ($subsys eq 'gridsite') { - $cmd{tag} = 'None'; - - if ($module eq 'core') { - my ($flags, $prefix); - - if ($project ne 'glite') { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"'; - $prefix = 'prefix=${prefix}/usr'; - } else { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"'; - $prefix = 'prefix=${prefix}'; - } - - $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build"; - $cmd{clean} = "rm -rvf build.sh; $cmd{clean}"; - $cmd{install} = "make $prefix $flags install"; - $cmd{packaging} = "mkdir \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz - make $prefix $flags rpm && \ - cp \${moduleDir}/RPMTMP/SOURCES/gridsite-\${version}.src.tar.gz \${moduleDir}/src/tgz"; - } - else { - $cmd{clean} = 'None'; - $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this"; - $cmd{checkout} = "mkdir -v \${moduleName} 2>/dev/null || true"; - } - } - elsif ($subsys eq 'px' and $module eq 'myproxy-config') { - $cmd{configure} = "/usr/bin/perl $confdir/configure --root=\${prefix} --prefix= --stage=\${stageDir} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config"; - } - else { - $cmd{configure} = "/usr/bin/perl $confdir/configure $project{flavours} --root=\${prefix} --prefix=$project{local_prefix} --stage=\${stageDir} --sysroot=\${package.prefix} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{compile} = 'make'; - $cmd{test} = 'make check'; - $cmd{install} = 'make install'; - } - - my $defprops = ''; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) { - $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n"; - } - - print STDERR "Writing $file\n"; - print C qq{ -[Configuration-$conf] -profile = None -moduleName = $project{etics_name}.$subsys.$module -displayName = $conf -description = $cvs_prefix{$subsys}.$subsys.$module -projectName = $project{etics_name} -age = $age -deploymentType = None -vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite -tag = $conftag -version = $major.$minor.$rev -$dwpath -[Platform-default:VcsCommand] -displayName = None -description = None -tag = $cmd{tag} -branch = None -commit = None -checkout = $cmd{checkout} - -[Platform-default:BuildCommand] -postpublish = None -packaging = $cmd{packaging} -displayName = None -description = None -doc = None -prepublish = None -publish = None -compile = $cmd{compile} -init = None -install = $cmd{install} -clean = $cmd{clean} -test = $cmd{test} -configure = $cmd{configure} -checkstyle = None - -[Platform-default:Property] -$buildroot -aprSuffix = 0 -package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS -package.preserve.libtool = false -$package_description$package_summary$defprops}; - - for (@{$obsoletes{"$subsys.$module"}}) { - print C "package.obsoletes = $_\n"; - print C "package.replaces = $_\n"; - } - for (@{$conflicts{"$subsys.$module"}}) { - print C "package.conflicts = $_\n"; - } - for (@{$provides{"$subsys.$module"}}) { - print C "package.provides = $_\n"; - } - - for my $pp (keys %{$platform_properties{"$subsys.$module"}}) { - next if $pp eq 'default'; - next if exists $project{supported_platforms} and not exists $project{supported_platforms}{$pp}; - - print C "[Platform-$pp:Property]\n$buildroot\n"; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) { - print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n"; - } - print C "package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS\n"; - print C "$package_description$package_summary\n"; - } - - print C qq{ -[Platform-default:DynamicDependency] -}; - for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - my $edev = $project{etics_externs_devel}{$_}; - next if ($eext eq '-'); - - my $proj = 'externals'; - for my $p (keys %etics_projects) { - for $m (@{$etics_projects{$p}}) { - $proj = $p if $m eq $_; - } - } - - my $type = $need_externs_type{"$subsys.$module"}->{$_}; - - if ($edev) { - if ($type eq 'B') { - $eext = $edev; # no runtime - change to devel pkg - } elsif ($type eq 'BR' or $type eq 'RB') { - print C "$proj|$edev = B\n"; # additional devel pkg - } - } - print C "$proj|$eext = $type\n"; - } - - for (@{$deps{"$subsys.$module"}}) { - my $type = $deps_type{"$subsys.$module"}->{$_}; - print C "$project{etics_name}|$project{etics_name}.$_ = $type\n"; - } - - close C; -} - -sub gsoap_version { - local $_; - my $gsoap_version; - open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n"; - - while ($_ = ) { - chomp; - - $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/; - $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/; - } - close S; - return $gsoap_version; -} - -sub getlibdir { - if ( -e "/etc/debian_version") { # We are on Debian - $lib64="lib"; - $lib32="lib32"; } - else { # Another distribution - $lib64="lib64"; - $lib32="lib"; } - $libdir=$lib32; - - open INP, "uname -s | "; # Check kernel name - $kname= ; - chomp($kname); - close INP; - - if ( $kname eq "Linux") { - $arch = ("x86_64\npowerpc\nppc64\n"); - - open INP, "uname -p | "; # Check processor type - $procname= ; - chomp($procname); - close INP; - - if ($arch =~/^$procname\n/) { - return ($lib64); } - - open INP, "uname -m | "; # Check machine hardware - $machname= ; - chomp($machname); - close INP; - - if ($arch =~/^$machname\n/) { - return ($lib64); } - - # special cases (hyperlink lib64, Debian) - if (-l "/usr/lib64") { - $libdir=$lib32; } - - # if /usr/lib64 doesn't exist at all (AIX) - unless ( -e "/usr/lib64" ) { - $libdir=$lib32; } - } - - if ( $kname eq "SunOS") { - if (-e "/usr/lib/64") { - $libdir="lib/64"; } - } - - return $libdir; -} - -sub usage { - my @ext = keys %externs; - my @myjars = keys %jar; - - print STDERR qq{ -Usage: $0 options - -General options (defaults in []): - --prefix=PREFIX destination directory [./stage] - --stage=DIR staging directory [./stage] - --root=DIR installation root (custom relocation root -> sysroot) [./stage] - --sysroot=DIR system root (custom relocation root -> sysroot) [] - --sysconfdir=DIR system configuration directory [PREFIX/etc] - --staged=module,module,... what is already in PREFIX (specify without org.glite.) - --thrflavour=flavour - --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] - --listmodules=subsys list modules of a subsystem - --version=maj.min.rev-age specify version here instead of reading version.properties - --branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...) - --libdir=libdir typically [lib,lib64] postfix - --project=PROJECT build or generate etics for a project (glite/emi) [emi] - --debug print more details - -Mode of operation: - --mode=\{checkout|build|etics\} what to do [build] - -What to build: - --module=module build this module only - --enable-NODE build this "node" (set of modules) only - --disable-NODE don't build this node - --lb-tag=tag checkout LB modules with specific tag - --jp-tag=tag checkout JP modules with specific tag - --lbjp-common-tag=tag checkout lbjp-common modules with specific tag - --jobid-tag=tag checkout jobid modules with specific tag - -Dependencies (summary of what will be used is always printed): - --with-EXTERNAL=PATH where to look for an external [autodetect] - --with-JAR=JAR where to look for jars - -Available nodes: - @nodes - -Default nodes: - @default_nodes - -Externals (not all for all modules) are: - @ext - -External jars are: - @myjars - -}; - -} diff --git a/org.glite.jobid.api-c/interface/cjobid.h b/org.glite.jobid.api-c/interface/cjobid.h deleted file mode 100755 index 0945d24..0000000 --- a/org.glite.jobid.api-c/interface/cjobid.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef _GLITE_JOBID_H -#define _GLITE_JOBID_H - -/*! - * \file cjobid.h - * \brief L&B consumer API - */ - -#ident "$Header$" -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _edg_wlc_JobId *glite_jobid_t; -typedef const struct _edg_wlc_JobId *glite_jobid_const_t; -typedef glite_jobid_t edg_wlc_JobId; - -#define edg_wlc_JobIdCreate glite_jobid_create -#define edg_wlc_JobIdRecreate glite_jobid_recreate -#define edg_wlc_JobIdDup glite_jobid_dup -#define edg_wlc_JobIdFree glite_jobid_free -#define edg_wlc_JobIdParse glite_jobid_parse -#define edg_wlc_JobIdUnparse glite_jobid_unparse -#define edg_wlc_JobIdGetServer glite_jobid_getServer -#define edg_wlc_JobIdGetServerParts glite_jobid_getServerParts -#define edg_wlc_JobIdGetUnique glite_jobid_getUnique - -#define GLITE_JOBID_DEFAULT_PORT 9000 /**< Default port where bookkeeping server listens */ -#define GLITE_JOBID_PROTO_PREFIX "https://" /**< JobId protocol prefix */ - - -/* All the pointer functions return malloc'ed objects (or NULL on error) */ - -/** - * Create a Job ID. - * See the lb_draft document for details on its construction and components - * \param bkserver book keeping server hostname - * \param port port for the bk service - * \param jobid new created job id - * \ret al 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int glite_jobid_create(const char * bkserver, int port, glite_jobid_t * jobid); - -/** - * Recreate a Job ID - * \param bkserver bookkeeping server hostname - * \param port port for the bk service - * \param unique string which represent created jobid (if NULL then new - * one is created) - * \param jobid new created job id - * \retval 0 success - * \retval EINVAL invalid bkserver - * \retval ENOMEM if memory allocation fails - */ -int glite_jobid_recreate(const char *bkserver, int port, const char * unique, edg_wlc_JobId * jobid); - -/** - * Create copy of Job ID - * \param in jobid for duplication - * \param jobid duplicated jobid - * \retval 0 for success - * \retval EINVAL invalid jobid - * \retval ENOMEM if memory allocation fails - */ -int glite_jobid_dup(glite_jobid_const_t in, glite_jobid_t * jobid); - -/* - * Free jobid structure - * \param jobid for dealocation - */ -void glite_jobid_free(glite_jobid_t jobid); - -/** - * Parse Job ID string and creates jobid structure - * \param jobidstr string representation of jobid - * \param jobid parsed job id - * \retval 0 for success - * \retval EINVAL jobidstr can't be parsed - * \retval ENOMEM if memory allocation fails - */ -int glite_jobid_parse(const char* jobidstr, glite_jobid_t * jobid); - -/** - * Unparse Job ID (produce the string form of JobId). - * \param jobid to be converted to string - * \return allocated string which represents jobid - */ -char* glite_jobid_unparse(glite_jobid_const_t jobid); - -/** - * Extract bookkeeping server address (address:port) - * \param jobid from which the bkserver address should be extracted - * \retval pointer to allocated string with bkserver address - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* glite_jobid_getServer(glite_jobid_const_t jobid); - -/** - * Extract bookkeeping server address and port - * \param jobid from which the bkserver address should be extracted - * \param srvName pointer where to return server name - * \param srvPort pointer where to return server port - * */ -void glite_jobid_getServerParts(glite_jobid_const_t jobid, char **srvName, unsigned int *srvPort); - -/** - * Extract bookkeeping server address and port - * \param jobid from which the bkserver address should be extracted - * \param srvName pointer where to return server name - * \param srvPort pointer where to return server port - * */ -void glite_jobid_getServerParts_internal(glite_jobid_const_t jobid, char **srvName, unsigned int *srvPort); - -/** - * Extract unique string - * \param jobid - * \retval pointer to allocated unique string representing jobid - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* glite_jobid_getUnique(glite_jobid_const_t jobid); - -/** - * Extract unique string - * \param jobid - * \retval pointer to allocated unique string representing jobid - * \retval NULL if jobid is 0 or memory allocation fails - */ -char* glite_jobid_getUnique_internal(glite_jobid_const_t jobid); - -#ifdef __cplusplus -} -#endif - -#endif /* _GLITE_JOBID_H */ diff --git a/org.glite.jobid.api-c/interface/strmd5.h b/org.glite.jobid.api-c/interface/strmd5.h deleted file mode 100755 index 3da25f5..0000000 --- a/org.glite.jobid.api-c/interface/strmd5.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _GLITE_STRMD5_H -#define _GLITE_STRMD5_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ident "$Header$" -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -/* Compute MD5 sum of the first argument. - * The sum is returned in the 16-byte array pointed to by 2nd argument - * (if not NULL) - * - * Return value: ASCII string of the sum, i.e. 32 characters [0-9a-f] - * (pointer to static area, changed by subsequent calls) - */ - -char *strmd5(const char *src, unsigned char *dst); - -/** - * Returns: allocated 32bytes long ASCII string with md5 sum - * of the first argument - */ -char *str2md5(const char *src); - -/** - * Returns: allocated 22bytes long ASCII string with md5 sum in base64 - * format of the source argument - */ -char *str2md5base64(const char *src); - -int base64_encode(const void *enc, int enc_size, char *out, int out_max_size); -int base64_decode(const char *enc,char *out,int out_size); - -#ifdef __cplusplus -}; -#endif - -#endif /* _GLITE_STRMD5_H */ diff --git a/org.glite.jobid.api-c/project/.post b/org.glite.jobid.api-c/project/.post deleted file mode 100644 index 8b0c822..0000000 --- a/org.glite.jobid.api-c/project/.post +++ /dev/null @@ -1 +0,0 @@ -/sbin/ldconfig diff --git a/org.glite.jobid.api-c/project/.postun b/org.glite.jobid.api-c/project/.postun deleted file mode 100644 index 8b0c822..0000000 --- a/org.glite.jobid.api-c/project/.postun +++ /dev/null @@ -1 +0,0 @@ -/sbin/ldconfig diff --git a/org.glite.jobid.api-c/project/ChangeLog b/org.glite.jobid.api-c/project/ChangeLog deleted file mode 100644 index 82eeef4..0000000 --- a/org.glite.jobid.api-c/project/ChangeLog +++ /dev/null @@ -1,65 +0,0 @@ -1.0.0-1 -- ChangeLog created - -1.0.0-2 -- fixes in etics' invocation of configure - -1.0.0-4 -- configure script update - -1.0.0-5 -- install libraries into $libdir - -1.0.1-1 -- additional includes in base64_test to fix build on Deb5 - -1.0.2-1 -- Generic lbdir settings in the Makefile -- Fixed package description and summary - -1.0.3-1 -- Fix library versioning - -1.0.4-1 -- Fixed libtool version numbering - -1.0.5-1 -- Fixed target 'clean' in the Makefile - -1.0.6-1 -- Support for IPv6 literal addresses -- Fixed notification ID parsing - -1.0.7-1 -- Handling error returned by gethostbyname() (Savannah Bug #67627) - -2.0.0-1 -- Version numbering fixed - -2.0.0-2 -- Module rebuilt - -2.0.1-1 -- Root directory option (ETICS performs own files relocation) -- Prefix option as prefix inside stage -- Sysconfdir option (for /etc vs /usr) -- DESTDIR in makefiles - -2.0.2-1 -- Relocatable build directory. - -2.0.2-2 -- Module rebuilt - -2.0.2-3 -- Module rebuilt - -2.0.2-4 -- Module rebuilt - -2.0.2-5 -- Module rebuilt - -2.0.3-1 -- Handling error returned by gethostbyname() (Savannah Bug #67627) - diff --git a/org.glite.jobid.api-c/project/package.description b/org.glite.jobid.api-c/project/package.description deleted file mode 100644 index 9c326af..0000000 --- a/org.glite.jobid.api-c/project/package.description +++ /dev/null @@ -1 +0,0 @@ -C library handling gLite jobid. diff --git a/org.glite.jobid.api-c/project/package.summary b/org.glite.jobid.api-c/project/package.summary deleted file mode 100644 index 53293ca..0000000 --- a/org.glite.jobid.api-c/project/package.summary +++ /dev/null @@ -1 +0,0 @@ -C library handling gLite jobid diff --git a/org.glite.jobid.api-c/project/version.properties b/org.glite.jobid.api-c/project/version.properties deleted file mode 100644 index 2196c4d..0000000 --- a/org.glite.jobid.api-c/project/version.properties +++ /dev/null @@ -1,3 +0,0 @@ -# : /cvs/jra1mw/org.glite.jobid.api-c/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $ -module.version=2.0.3 -module.age=1 diff --git a/org.glite.jobid.api-c/src/cjobid.c b/org.glite.jobid.api-c/src/cjobid.c deleted file mode 100644 index 57da65c..0000000 --- a/org.glite.jobid.api-c/src/cjobid.c +++ /dev/null @@ -1,296 +0,0 @@ -#ident "$Header$" -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "cjobid.h" -#include "strmd5.h" - -struct _edg_wlc_JobId { - char *id; /* unique job identification */ - /* additional information */ - char *BShost;/* bookkeeping server hostname */ - unsigned int BSport; /* bookkeeping server port */ - char *info; /* additional information (after ? in URI) */ -}; - -int glite_jobid_create(const char *bkserver, int port, glite_jobid_t *jobId) -{ - return glite_jobid_recreate(bkserver, port, NULL, jobId); -} - - -int glite_jobid_recreate(const char* bkserver, int port, const char *unique, glite_jobid_t *jobId) -{ - glite_jobid_t out; - char hostname[200]; /* used to hold string for encrypt */ - struct timeval tv; - int skip; - char* portbeg; - char* rndaddr = NULL; - - struct hostent* he; - - if (!bkserver) - return EINVAL; - - if (unique == NULL) { - gettimeofday(&tv, NULL); - srandom(tv.tv_usec); - gethostname(hostname, 100); - he = gethostbyname(hostname); - if (!he) asprintf(&rndaddr,"%d.%d.%d.%d",rand()%256,rand()%256,rand()%256,rand()%256); - - skip = strlen(hostname); - skip += sprintf(hostname + skip, "-IP:0x%x-pid:%d-rnd:%d-time:%d:%d", - rndaddr ? rndaddr : *((int*)he->h_addr_list[0]), - getpid(), (int)random(), (int)tv.tv_sec, (int)tv.tv_usec); - free(rndaddr); - } - - *jobId = NULL; - out = (glite_jobid_t) malloc (sizeof(*out)); - if (!out) - return ENOMEM; - - memset(out, 0, sizeof(*out)); - - /* check if it begins with prefix */ - /* unsupported */ - /* FIXME: fill in PROTO_PREFIX if missing */ - if (strncmp(bkserver, GLITE_JOBID_PROTO_PREFIX, sizeof(GLITE_JOBID_PROTO_PREFIX)-1) == 0) - return EINVAL; - - out->BShost = strdup(bkserver); - portbeg = strrchr(out->BShost, ':'); - if (portbeg) { - *portbeg = 0; - /* try to get port number */ - if (port == 0) - port = atoi(portbeg + 1); - } - - if (port == 0) - port = GLITE_JOBID_DEFAULT_PORT; - - out->BSport = port; - - out->id = (unique) ? strdup(unique) : str2md5base64(hostname); - //printf("Encrypt: %s\nBASE64 %s\n", hostname, out->id); - - if (!out->id || !out->BShost) { - glite_jobid_free(out); - return ENOMEM; - } - - *jobId = out; - return 0; -} - - -int glite_jobid_dup(glite_jobid_const_t in, glite_jobid_t *out) -{ - glite_jobid_t jid; - *out = NULL; - if (in == NULL) - return 0; - - jid = malloc(sizeof(*jid)); - if (!jid) - return ENOMEM; - - memset(jid, 0,sizeof(*jid)); - jid->BShost = strdup(in->BShost); - jid->id = strdup(in->id); - if (in->info) - jid->info = strdup(in->info); - - if (jid->BShost == NULL || jid->id == NULL) { - glite_jobid_free(jid); - return ENOMEM; - } - - jid->BSport = in->BSport; - *out = jid; - return 0; -} - - -// XXX -// use recreate -// parse name, port, unique -int glite_jobid_parse(const char *idString, glite_jobid_t *jobId) -{ - char *pom, *pom1, *pom2; - glite_jobid_t out; - - *jobId = NULL; - - out = (glite_jobid_t) malloc (sizeof(*out)); - if (out == NULL ) - return ENOMEM; - - memset(out,0,sizeof(*out)); - - if (strncmp(idString, GLITE_JOBID_PROTO_PREFIX, sizeof(GLITE_JOBID_PROTO_PREFIX) - 1)) { - out->BShost = (char *) NULL; - out->BSport = 0; - - free(out); - return EINVAL; - } - - pom = strdup(idString + sizeof(GLITE_JOBID_PROTO_PREFIX) - 1); - pom1 = strchr(pom, '/'); - - if (!pom1) { free(pom); free(out); return EINVAL; } - pom1[0] = '\0'; - - pom2 = strrchr(pom, ':'); - if (pom2 && strchr(pom2,']')) pom2 = NULL; - - if ( pom2 ) { - pom[pom2-pom] = '\0'; - out->BShost = strdup(pom); - pom[pom1-pom] = '\0'; - out->BSport = (unsigned int) strtoul(pom2 + 1,NULL,10); - } else { - pom[pom1-pom] = '\0'; - out->BShost = strdup(pom); - out->BSport = GLITE_JOBID_DEFAULT_PORT; - } - - /* XXX: localhost not supported in jobid - if (!strncmp(out->BShost,"localhost",9) { - free(pom); - free(out->BShost); - free(out); - return EINVAL; - } - */ - - /* additional info from URI */ - pom2 = strchr(pom1+1,'?'); - if (pom2) { - *pom2 = 0; - out->info = strdup(pom2+1); - } - - /* extract the unique part */ - out->id = strdup(pom1+1); - - for (pom1 = out->BShost; *pom1; pom1++) - if (isspace(*pom1)) break; - - for (pom2 = out->id; *pom2; pom2++) - if (isspace(*pom2)) break; - - if (*pom1 || *pom2) { - free(pom); - glite_jobid_free(out); - return EINVAL; - } - - free(pom); - *jobId = out; - return 0; -} - - -void glite_jobid_free(glite_jobid_t job) -{ - if (job) { - free(job->id); - free(job->BShost); - free(job->info); - free(job); - } -} - - -char* glite_jobid_unparse(glite_jobid_const_t jobid) -{ - char *out, port[40]; - - if (!jobid) - return NULL; - - if (jobid->BSport) - sprintf(port,":%d",jobid->BSport); - else - *port = 0; - - asprintf(&out, GLITE_JOBID_PROTO_PREFIX"%s%s/%s%s%s", - jobid->BShost,port, - jobid->id, - (jobid->info ? "?" : ""), - (jobid->info ? jobid->info : "")); - - return out; -} - - -char* glite_jobid_getServer(glite_jobid_const_t jobid) -{ - char *bs = NULL; - - if (jobid) - asprintf(&bs, "%s:%u", jobid->BShost, - jobid->BSport ? jobid->BSport : GLITE_JOBID_DEFAULT_PORT); - - return bs; -} - - -void glite_jobid_getServerParts(glite_jobid_const_t jobid, char **srvName, unsigned int *srvPort) -{ - if (jobid) { - *srvName = strdup(jobid->BShost); - *srvPort = jobid->BSport ? jobid->BSport : GLITE_JOBID_DEFAULT_PORT; - } -} - - -char* glite_jobid_getUnique(glite_jobid_const_t jobid) -{ - return jobid ? strdup(jobid->id) : NULL; -} - - -void glite_jobid_getServerParts_internal(glite_jobid_const_t jobid, char **srvName, unsigned int *srvPort) -{ - if (jobid) { - *srvName = jobid->BShost; - *srvPort = jobid->BSport ? jobid->BSport : GLITE_JOBID_DEFAULT_PORT; - } -} - - -char* glite_jobid_getUnique_internal(glite_jobid_const_t jobid) -{ - return jobid ? jobid->id : NULL; -} diff --git a/org.glite.jobid.api-c/src/md32_common.h b/org.glite.jobid.api-c/src/md32_common.h deleted file mode 100644 index a8a539b..0000000 --- a/org.glite.jobid.api-c/src/md32_common.h +++ /dev/null @@ -1,640 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* crypto/md32_common.h */ -/* ==================================================================== - * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -/* - * This is a generic 32 bit "collector" for message digest algorithms. - * Whenever needed it collects input character stream into chunks of - * 32 bit values and invokes a block function that performs actual hash - * calculations. - * - * Porting guide. - * - * Obligatory macros: - * - * DATA_ORDER_IS_BIG_ENDIAN or DATA_ORDER_IS_LITTLE_ENDIAN - * this macro defines byte order of input stream. - * HASH_CBLOCK - * size of a unit chunk HASH_BLOCK operates on. - * HASH_LONG - * has to be at lest 32 bit wide, if it's wider, then - * HASH_LONG_LOG2 *has to* be defined along - * HASH_CTX - * context structure that at least contains following - * members: - * typedef struct { - * ... - * HASH_LONG Nl,Nh; - * HASH_LONG data[HASH_LBLOCK]; - * unsigned int num; - * ... - * } HASH_CTX; - * HASH_UPDATE - * name of "Update" function, implemented here. - * HASH_TRANSFORM - * name of "Transform" function, implemented here. - * HASH_FINAL - * name of "Final" function, implemented here. - * HASH_BLOCK_HOST_ORDER - * name of "block" function treating *aligned* input message - * in host byte order, implemented externally. - * HASH_BLOCK_DATA_ORDER - * name of "block" function treating *unaligned* input message - * in original (data) byte order, implemented externally (it - * actually is optional if data and host are of the same - * "endianess"). - * HASH_MAKE_STRING - * macro convering context variables to an ASCII hash string. - * - * Optional macros: - * - * B_ENDIAN or L_ENDIAN - * defines host byte-order. - * HASH_LONG_LOG2 - * defaults to 2 if not states otherwise. - * HASH_LBLOCK - * assumed to be HASH_CBLOCK/4 if not stated otherwise. - * HASH_BLOCK_DATA_ORDER_ALIGNED - * alternative "block" function capable of treating - * aligned input message in original (data) order, - * implemented externally. - * - * MD5 example: - * - * #define DATA_ORDER_IS_LITTLE_ENDIAN - * - * #define HASH_LONG MD5_LONG - * #define HASH_LONG_LOG2 MD5_LONG_LOG2 - * #define HASH_CTX MD5_CTX - * #define HASH_CBLOCK MD5_CBLOCK - * #define HASH_LBLOCK MD5_LBLOCK - * #define HASH_UPDATE MD5_Update - * #define HASH_TRANSFORM MD5_Transform - * #define HASH_FINAL MD5_Final - * #define HASH_BLOCK_HOST_ORDER md5_block_host_order - * #define HASH_BLOCK_DATA_ORDER md5_block_data_order - * - * - */ - -#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) -#error "DATA_ORDER must be defined!" -#endif - -#ifndef HASH_CBLOCK -#error "HASH_CBLOCK must be defined!" -#endif -#ifndef HASH_LONG -#error "HASH_LONG must be defined!" -#endif -#ifndef HASH_CTX -#error "HASH_CTX must be defined!" -#endif - -#ifndef HASH_UPDATE -#error "HASH_UPDATE must be defined!" -#endif -#ifndef HASH_TRANSFORM -#error "HASH_TRANSFORM must be defined!" -#endif -#ifndef HASH_FINAL -#error "HASH_FINAL must be defined!" -#endif - -#ifndef HASH_BLOCK_HOST_ORDER -#error "HASH_BLOCK_HOST_ORDER must be defined!" -#endif - -#if 0 -/* - * Moved below as it's required only if HASH_BLOCK_DATA_ORDER_ALIGNED - * isn't defined. - */ -#ifndef HASH_BLOCK_DATA_ORDER -#error "HASH_BLOCK_DATA_ORDER must be defined!" -#endif -#endif - -#ifndef HASH_LBLOCK -#define HASH_LBLOCK (HASH_CBLOCK/4) -#endif - -#ifndef HASH_LONG_LOG2 -#define HASH_LONG_LOG2 2 -#endif - -/* - * Engage compiler specific rotate intrinsic function if available. - */ -#undef ROTATE -#ifndef PEDANTIC -# if defined(_MSC_VER) || defined(__ICC) -# define ROTATE(a,n) _lrotl(a,n) -# elif defined(__MWERKS__) -# if defined(__POWERPC__) -# define ROTATE(a,n) __rlwinm(a,n,0,31) -# elif defined(__MC68K__) - /* Motorola specific tweak. */ -# define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) ) -# else -# define ROTATE(a,n) __rol(a,n) -# endif -# elif defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) - /* - * Some GNU C inline assembler templates. Note that these are - * rotates by *constant* number of bits! But that's exactly - * what we need here... - * - */ -# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) -# define ROTATE(a,n) ({ register unsigned int ret; \ - asm ( \ - "roll %1,%0" \ - : "=r"(ret) \ - : "I"(n), "0"(a) \ - : "cc"); \ - ret; \ - }) -# elif defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) -# define ROTATE(a,n) ({ register unsigned int ret; \ - asm ( \ - "rlwinm %0,%1,%2,0,31" \ - : "=r"(ret) \ - : "r"(a), "I"(n)); \ - ret; \ - }) -# endif -# endif -#endif /* PEDANTIC */ - -#if HASH_LONG_LOG2==2 /* Engage only if sizeof(HASH_LONG)== 4 */ -/* A nice byte order reversal from Wei Dai */ -#ifdef ROTATE -/* 5 instructions with rotate instruction, else 9 */ -#define REVERSE_FETCH32(a,l) ( \ - l=*(const HASH_LONG *)(a), \ - ((ROTATE(l,8)&0x00FF00FF)|(ROTATE((l&0x00FF00FF),24))) \ - ) -#else -/* 6 instructions with rotate instruction, else 8 */ -#define REVERSE_FETCH32(a,l) ( \ - l=*(const HASH_LONG *)(a), \ - l=(((l>>8)&0x00FF00FF)|((l&0x00FF00FF)<<8)), \ - ROTATE(l,16) \ - ) -/* - * Originally the middle line started with l=(((l&0xFF00FF00)>>8)|... - * It's rewritten as above for two reasons: - * - RISCs aren't good at long constants and have to explicitely - * compose 'em with several (well, usually 2) instructions in a - * register before performing the actual operation and (as you - * already realized:-) having same constant should inspire the - * compiler to permanently allocate the only register for it; - * - most modern CPUs have two ALUs, but usually only one has - * circuitry for shifts:-( this minor tweak inspires compiler - * to schedule shift instructions in a better way... - * - * - */ -#endif -#endif - -#ifndef ROTATE -#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) -#endif - -/* - * Make some obvious choices. E.g., HASH_BLOCK_DATA_ORDER_ALIGNED - * and HASH_BLOCK_HOST_ORDER ought to be the same if input data - * and host are of the same "endianess". It's possible to mask - * this with blank #define HASH_BLOCK_DATA_ORDER though... - * - * - */ -#if defined(B_ENDIAN) -# if defined(DATA_ORDER_IS_BIG_ENDIAN) -# if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_LONG_LOG2==2 -# define HASH_BLOCK_DATA_ORDER_ALIGNED HASH_BLOCK_HOST_ORDER -# endif -# endif -#elif defined(L_ENDIAN) -# if defined(DATA_ORDER_IS_LITTLE_ENDIAN) -# if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_LONG_LOG2==2 -# define HASH_BLOCK_DATA_ORDER_ALIGNED HASH_BLOCK_HOST_ORDER -# endif -# endif -#endif - -#if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) -#ifndef HASH_BLOCK_DATA_ORDER -#error "HASH_BLOCK_DATA_ORDER must be defined!" -#endif -#endif - -#if defined(DATA_ORDER_IS_BIG_ENDIAN) - -#ifndef PEDANTIC -# if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) -# if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ - (defined(__x86_64) || defined(__x86_64__)) - /* - * This gives ~30-40% performance improvement in SHA-256 compiled - * with gcc [on P4]. Well, first macro to be frank. We can pull - * this trick on x86* platforms only, because these CPUs can fetch - * unaligned data without raising an exception. - */ -# define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ - asm ("bswapl %0":"=r"(r):"0"(r)); \ - (c)+=4; (l)=r; }) -# define HOST_l2c(l,c) ({ unsigned int r=(l); \ - asm ("bswapl %0":"=r"(r):"0"(r)); \ - *((unsigned int *)(c))=r; (c)+=4; r; }) -# endif -# endif -#endif - -#ifndef HOST_c2l -#define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++)))<<24), \ - l|=(((unsigned long)(*((c)++)))<<16), \ - l|=(((unsigned long)(*((c)++)))<< 8), \ - l|=(((unsigned long)(*((c)++))) ), \ - l) -#endif -#define HOST_p_c2l(c,l,n) { \ - switch (n) { \ - case 0: l =((unsigned long)(*((c)++)))<<24; \ - case 1: l|=((unsigned long)(*((c)++)))<<16; \ - case 2: l|=((unsigned long)(*((c)++)))<< 8; \ - case 3: l|=((unsigned long)(*((c)++))); \ - } } -#define HOST_p_c2l_p(c,l,sc,len) { \ - switch (sc) { \ - case 0: l =((unsigned long)(*((c)++)))<<24; \ - if (--len == 0) break; \ - case 1: l|=((unsigned long)(*((c)++)))<<16; \ - if (--len == 0) break; \ - case 2: l|=((unsigned long)(*((c)++)))<< 8; \ - } } -/* NOTE the pointer is not incremented at the end of this */ -#define HOST_c2l_p(c,l,n) { \ - l=0; (c)+=n; \ - switch (n) { \ - case 3: l =((unsigned long)(*(--(c))))<< 8; \ - case 2: l|=((unsigned long)(*(--(c))))<<16; \ - case 1: l|=((unsigned long)(*(--(c))))<<24; \ - } } -#ifndef HOST_l2c -#define HOST_l2c(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ - *((c)++)=(unsigned char)(((l)>>16)&0xff), \ - *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ - *((c)++)=(unsigned char)(((l) )&0xff), \ - l) -#endif - -#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) - -#if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) -# ifndef B_ENDIAN - /* See comment in DATA_ORDER_IS_BIG_ENDIAN section. */ -# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, l) -# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, l) -# endif -#endif - -#ifndef HOST_c2l -#define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++))) ), \ - l|=(((unsigned long)(*((c)++)))<< 8), \ - l|=(((unsigned long)(*((c)++)))<<16), \ - l|=(((unsigned long)(*((c)++)))<<24), \ - l) -#endif -#define HOST_p_c2l(c,l,n) { \ - switch (n) { \ - case 0: l =((unsigned long)(*((c)++))); \ - case 1: l|=((unsigned long)(*((c)++)))<< 8; \ - case 2: l|=((unsigned long)(*((c)++)))<<16; \ - case 3: l|=((unsigned long)(*((c)++)))<<24; \ - } } -#define HOST_p_c2l_p(c,l,sc,len) { \ - switch (sc) { \ - case 0: l =((unsigned long)(*((c)++))); \ - if (--len == 0) break; \ - case 1: l|=((unsigned long)(*((c)++)))<< 8; \ - if (--len == 0) break; \ - case 2: l|=((unsigned long)(*((c)++)))<<16; \ - } } -/* NOTE the pointer is not incremented at the end of this */ -#define HOST_c2l_p(c,l,n) { \ - l=0; (c)+=n; \ - switch (n) { \ - case 3: l =((unsigned long)(*(--(c))))<<16; \ - case 2: l|=((unsigned long)(*(--(c))))<< 8; \ - case 1: l|=((unsigned long)(*(--(c)))); \ - } } -#ifndef HOST_l2c -#define HOST_l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ - *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ - *((c)++)=(unsigned char)(((l)>>16)&0xff), \ - *((c)++)=(unsigned char)(((l)>>24)&0xff), \ - l) -#endif - -#endif - -/* - * Time for some action:-) - */ - -MD5_JOBID_PROTO int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len) - { - const unsigned char *data=data_; - register HASH_LONG * p; - register HASH_LONG l; - size_t sw,sc,ew,ec; - - if (len==0) return 1; - - l=(c->Nl+(((HASH_LONG)len)<<3))&0xffffffffUL; - /* 95-05-24 eay Fixed a bug with the overflow handling, thanks to - * Wei Dai for pointing it out. */ - if (l < c->Nl) /* overflow */ - c->Nh++; - c->Nh+=(len>>29); /* might cause compiler warning on 16-bit */ - c->Nl=l; - - if (c->num != 0) - { - p=c->data; - sw=c->num>>2; - sc=c->num&0x03; - - if ((c->num+len) >= HASH_CBLOCK) - { - l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l; - for (; swnum); - c->num=0; - /* drop through and do the rest */ - } - else - { - c->num+=(unsigned int)len; - if ((sc+len) < 4) /* ugly, add char's to a word */ - { - l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l; - } - else - { - ew=(c->num>>2); - ec=(c->num&0x03); - if (sc) - l=p[sw]; - HOST_p_c2l(data,l,sc); - p[sw++]=l; - for (; sw < ew; sw++) - { - HOST_c2l(data,l); p[sw]=l; - } - if (ec) - { - HOST_c2l_p(data,l,ec); p[sw]=l; - } - } - return 1; - } - } - - sw=len/HASH_CBLOCK; - if (sw > 0) - { -#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED) - /* - * Note that HASH_BLOCK_DATA_ORDER_ALIGNED gets defined - * only if sizeof(HASH_LONG)==4. - */ - if ((((size_t)data)%4) == 0) - { - /* data is properly aligned so that we can cast it: */ - HASH_BLOCK_DATA_ORDER_ALIGNED (c,(const HASH_LONG *)data,sw); - sw*=HASH_CBLOCK; - data+=sw; - len-=sw; - } - else -#if !defined(HASH_BLOCK_DATA_ORDER) - while (sw--) - { - memcpy (p=c->data,data,HASH_CBLOCK); - HASH_BLOCK_DATA_ORDER_ALIGNED(c,p,1); - data+=HASH_CBLOCK; - len-=HASH_CBLOCK; - } -#endif -#endif -#if defined(HASH_BLOCK_DATA_ORDER) - { - HASH_BLOCK_DATA_ORDER(c,data,sw); - sw*=HASH_CBLOCK; - data+=sw; - len-=sw; - } -#endif - } - - if (len!=0) - { - p = c->data; - c->num = len; - ew=len>>2; /* words to copy */ - ec=len&0x03; - for (; ew; ew--,p++) - { - HOST_c2l(data,l); *p=l; - } - HOST_c2l_p(data,l,ec); - *p=l; - } - return 1; - } - - -MD5_JOBID_PROTO void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data) - { -#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED) - if ((((size_t)data)%4) == 0) - /* data is properly aligned so that we can cast it: */ - HASH_BLOCK_DATA_ORDER_ALIGNED (c,(const HASH_LONG *)data,1); - else -#if !defined(HASH_BLOCK_DATA_ORDER) - { - - HASH_BLOCK_DATA_ORDER_ALIGNED (c,c->data,1); - } -#endif -#endif -#if defined(HASH_BLOCK_DATA_ORDER) - HASH_BLOCK_DATA_ORDER (c,data,1); -#endif - } - - -MD5_JOBID_PROTO int HASH_FINAL (unsigned char *md, HASH_CTX *c) - { - register HASH_LONG *p; - register unsigned long l; - register int i,j; - static const unsigned char end[4]={0x80,0x00,0x00,0x00}; - const unsigned char *cp=end; - - /* c->num should definitly have room for at least one more byte. */ - p=c->data; - i=c->num>>2; - j=c->num&0x03; - -#if 0 - /* purify often complains about the following line as an - * Uninitialized Memory Read. While this can be true, the - * following p_c2l macro will reset l when that case is true. - * This is because j&0x03 contains the number of 'valid' bytes - * already in p[i]. If and only if j&0x03 == 0, the UMR will - * occur but this is also the only time p_c2l will do - * l= *(cp++) instead of l|= *(cp++) - * Many thanks to Alex Tang for pickup this - * 'potential bug' */ -#ifdef PURIFY - if (j==0) p[i]=0; /* Yeah, but that's not the way to fix it:-) */ -#endif - l=p[i]; -#else - l = (j==0) ? 0 : p[i]; -#endif - HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */ - - if (i>(HASH_LBLOCK-2)) /* save room for Nl and Nh */ - { - if (iNh; - p[HASH_LBLOCK-1]=c->Nl; -#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) - p[HASH_LBLOCK-2]=c->Nl; - p[HASH_LBLOCK-1]=c->Nh; -#endif - HASH_BLOCK_HOST_ORDER (c,p,1); - -#ifndef HASH_MAKE_STRING -#error "HASH_MAKE_STRING must be defined!" -#else - HASH_MAKE_STRING(c,md); -#endif - - c->num=0; - /* clear stuff, HASH_BLOCK may be leaving some stuff on the stack - * but I'm not worried :-) - OPENSSL_cleanse((void *)c,sizeof(HASH_CTX)); - */ - return 1; - } - -#ifndef MD32_REG_T -#define MD32_REG_T long -/* - * This comment was originaly written for MD5, which is why it - * discusses A-D. But it basically applies to all 32-bit digests, - * which is why it was moved to common header file. - * - * In case you wonder why A-D are declared as long and not - * as MD5_LONG. Doing so results in slight performance - * boost on LP64 architectures. The catch is we don't - * really care if 32 MSBs of a 64-bit register get polluted - * with eventual overflows as we *save* only 32 LSBs in - * *either* case. Now declaring 'em long excuses the compiler - * from keeping 32 MSBs zeroed resulting in 13% performance - * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. - * Well, to be honest it should say that this *prevents* - * performance degradation. - * - * Apparently there're LP64 compilers that generate better - * code if A-D are declared int. Most notably GCC-x86_64 - * generates better code. - * - */ -#endif diff --git a/org.glite.jobid.api-c/src/md5.h b/org.glite.jobid.api-c/src/md5.h deleted file mode 100644 index faec0fc..0000000 --- a/org.glite.jobid.api-c/src/md5.h +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* crypto/md5/md5.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD5_H -#define HEADER_MD5_H - -/* ljocha -#include -*/ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef OPENSSL_NO_MD5 -#error MD5 is disabled. -#endif - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! MD5_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) -#define MD5_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -#define MD5_LONG unsigned long -#define MD5_LONG_LOG2 3 - -/* _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... * - */ -#else -#define MD5_LONG unsigned int -#endif - -#define MD5_CBLOCK 64 -#define MD5_LBLOCK (MD5_CBLOCK/4) -#define MD5_DIGEST_LENGTH 16 - -typedef struct MD5state_st - { - MD5_LONG A,B,C,D; - MD5_LONG Nl,Nh; - MD5_LONG data[MD5_LBLOCK]; - unsigned int num; - } MD5_CTX; - -MD5_JOBID_PROTO int MD5_Init(MD5_CTX *c); -MD5_JOBID_PROTO int MD5_Update(MD5_CTX *c, const void *data, size_t len); -MD5_JOBID_PROTO int MD5_Final(unsigned char *md, MD5_CTX *c); -MD5_JOBID_PROTO unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); -MD5_JOBID_PROTO void MD5_Transform(MD5_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/org.glite.jobid.api-c/src/md5_dgst.c b/org.glite.jobid.api-c/src/md5_dgst.c deleted file mode 100644 index c00fee8..0000000 --- a/org.glite.jobid.api-c/src/md5_dgst.c +++ /dev/null @@ -1,315 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* crypto/md5/md5_dgst.c */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef MD5_JOBID_PROTO -#define MD5_JOBID_PROTO -#endif - -#include -#include "md5_locl.h" -/* ljocha -#include - -const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT; -*/ - -/* Implemented from RFC1321 The MD5 Message-Digest Algorithm - */ - -#define INIT_DATA_A (unsigned long)0x67452301L -#define INIT_DATA_B (unsigned long)0xefcdab89L -#define INIT_DATA_C (unsigned long)0x98badcfeL -#define INIT_DATA_D (unsigned long)0x10325476L - -MD5_JOBID_PROTO int MD5_Init(MD5_CTX *c) - { - c->A=INIT_DATA_A; - c->B=INIT_DATA_B; - c->C=INIT_DATA_C; - c->D=INIT_DATA_D; - c->Nl=0; - c->Nh=0; - c->num=0; - return 1; - } - -#ifndef md5_block_host_order -MD5_JOBID_PROTO void md5_block_host_order (MD5_CTX *c, const void *data, size_t num) - { - const MD5_LONG *X=data; - register unsigned MD32_REG_T A,B,C,D; - - A=c->A; - B=c->B; - C=c->C; - D=c->D; - - for (;num--;X+=HASH_LBLOCK) - { - /* Round 0 */ - R0(A,B,C,D,X[ 0], 7,0xd76aa478L); - R0(D,A,B,C,X[ 1],12,0xe8c7b756L); - R0(C,D,A,B,X[ 2],17,0x242070dbL); - R0(B,C,D,A,X[ 3],22,0xc1bdceeeL); - R0(A,B,C,D,X[ 4], 7,0xf57c0fafL); - R0(D,A,B,C,X[ 5],12,0x4787c62aL); - R0(C,D,A,B,X[ 6],17,0xa8304613L); - R0(B,C,D,A,X[ 7],22,0xfd469501L); - R0(A,B,C,D,X[ 8], 7,0x698098d8L); - R0(D,A,B,C,X[ 9],12,0x8b44f7afL); - R0(C,D,A,B,X[10],17,0xffff5bb1L); - R0(B,C,D,A,X[11],22,0x895cd7beL); - R0(A,B,C,D,X[12], 7,0x6b901122L); - R0(D,A,B,C,X[13],12,0xfd987193L); - R0(C,D,A,B,X[14],17,0xa679438eL); - R0(B,C,D,A,X[15],22,0x49b40821L); - /* Round 1 */ - R1(A,B,C,D,X[ 1], 5,0xf61e2562L); - R1(D,A,B,C,X[ 6], 9,0xc040b340L); - R1(C,D,A,B,X[11],14,0x265e5a51L); - R1(B,C,D,A,X[ 0],20,0xe9b6c7aaL); - R1(A,B,C,D,X[ 5], 5,0xd62f105dL); - R1(D,A,B,C,X[10], 9,0x02441453L); - R1(C,D,A,B,X[15],14,0xd8a1e681L); - R1(B,C,D,A,X[ 4],20,0xe7d3fbc8L); - R1(A,B,C,D,X[ 9], 5,0x21e1cde6L); - R1(D,A,B,C,X[14], 9,0xc33707d6L); - R1(C,D,A,B,X[ 3],14,0xf4d50d87L); - R1(B,C,D,A,X[ 8],20,0x455a14edL); - R1(A,B,C,D,X[13], 5,0xa9e3e905L); - R1(D,A,B,C,X[ 2], 9,0xfcefa3f8L); - R1(C,D,A,B,X[ 7],14,0x676f02d9L); - R1(B,C,D,A,X[12],20,0x8d2a4c8aL); - /* Round 2 */ - R2(A,B,C,D,X[ 5], 4,0xfffa3942L); - R2(D,A,B,C,X[ 8],11,0x8771f681L); - R2(C,D,A,B,X[11],16,0x6d9d6122L); - R2(B,C,D,A,X[14],23,0xfde5380cL); - R2(A,B,C,D,X[ 1], 4,0xa4beea44L); - R2(D,A,B,C,X[ 4],11,0x4bdecfa9L); - R2(C,D,A,B,X[ 7],16,0xf6bb4b60L); - R2(B,C,D,A,X[10],23,0xbebfbc70L); - R2(A,B,C,D,X[13], 4,0x289b7ec6L); - R2(D,A,B,C,X[ 0],11,0xeaa127faL); - R2(C,D,A,B,X[ 3],16,0xd4ef3085L); - R2(B,C,D,A,X[ 6],23,0x04881d05L); - R2(A,B,C,D,X[ 9], 4,0xd9d4d039L); - R2(D,A,B,C,X[12],11,0xe6db99e5L); - R2(C,D,A,B,X[15],16,0x1fa27cf8L); - R2(B,C,D,A,X[ 2],23,0xc4ac5665L); - /* Round 3 */ - R3(A,B,C,D,X[ 0], 6,0xf4292244L); - R3(D,A,B,C,X[ 7],10,0x432aff97L); - R3(C,D,A,B,X[14],15,0xab9423a7L); - R3(B,C,D,A,X[ 5],21,0xfc93a039L); - R3(A,B,C,D,X[12], 6,0x655b59c3L); - R3(D,A,B,C,X[ 3],10,0x8f0ccc92L); - R3(C,D,A,B,X[10],15,0xffeff47dL); - R3(B,C,D,A,X[ 1],21,0x85845dd1L); - R3(A,B,C,D,X[ 8], 6,0x6fa87e4fL); - R3(D,A,B,C,X[15],10,0xfe2ce6e0L); - R3(C,D,A,B,X[ 6],15,0xa3014314L); - R3(B,C,D,A,X[13],21,0x4e0811a1L); - R3(A,B,C,D,X[ 4], 6,0xf7537e82L); - R3(D,A,B,C,X[11],10,0xbd3af235L); - R3(C,D,A,B,X[ 2],15,0x2ad7d2bbL); - R3(B,C,D,A,X[ 9],21,0xeb86d391L); - - A = c->A += A; - B = c->B += B; - C = c->C += C; - D = c->D += D; - } - } -#endif - -#ifndef md5_block_data_order -#ifdef X -#undef X -#endif -MD5_JOBID_PROTO void md5_block_data_order (MD5_CTX *c, const void *data_, size_t num) - { - const unsigned char *data=data_; - register unsigned MD32_REG_T A,B,C,D,l; -#ifndef MD32_XARRAY - /* See comment in crypto/sha/sha_locl.h for details. */ - unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, - XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15; -# define X(i) XX##i -#else - MD5_LONG XX[MD5_LBLOCK]; -# define X(i) XX[i] -#endif - - A=c->A; - B=c->B; - C=c->C; - D=c->D; - - for (;num--;) - { - HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l; - /* Round 0 */ - R0(A,B,C,D,X( 0), 7,0xd76aa478L); HOST_c2l(data,l); X( 2)=l; - R0(D,A,B,C,X( 1),12,0xe8c7b756L); HOST_c2l(data,l); X( 3)=l; - R0(C,D,A,B,X( 2),17,0x242070dbL); HOST_c2l(data,l); X( 4)=l; - R0(B,C,D,A,X( 3),22,0xc1bdceeeL); HOST_c2l(data,l); X( 5)=l; - R0(A,B,C,D,X( 4), 7,0xf57c0fafL); HOST_c2l(data,l); X( 6)=l; - R0(D,A,B,C,X( 5),12,0x4787c62aL); HOST_c2l(data,l); X( 7)=l; - R0(C,D,A,B,X( 6),17,0xa8304613L); HOST_c2l(data,l); X( 8)=l; - R0(B,C,D,A,X( 7),22,0xfd469501L); HOST_c2l(data,l); X( 9)=l; - R0(A,B,C,D,X( 8), 7,0x698098d8L); HOST_c2l(data,l); X(10)=l; - R0(D,A,B,C,X( 9),12,0x8b44f7afL); HOST_c2l(data,l); X(11)=l; - R0(C,D,A,B,X(10),17,0xffff5bb1L); HOST_c2l(data,l); X(12)=l; - R0(B,C,D,A,X(11),22,0x895cd7beL); HOST_c2l(data,l); X(13)=l; - R0(A,B,C,D,X(12), 7,0x6b901122L); HOST_c2l(data,l); X(14)=l; - R0(D,A,B,C,X(13),12,0xfd987193L); HOST_c2l(data,l); X(15)=l; - R0(C,D,A,B,X(14),17,0xa679438eL); - R0(B,C,D,A,X(15),22,0x49b40821L); - /* Round 1 */ - R1(A,B,C,D,X( 1), 5,0xf61e2562L); - R1(D,A,B,C,X( 6), 9,0xc040b340L); - R1(C,D,A,B,X(11),14,0x265e5a51L); - R1(B,C,D,A,X( 0),20,0xe9b6c7aaL); - R1(A,B,C,D,X( 5), 5,0xd62f105dL); - R1(D,A,B,C,X(10), 9,0x02441453L); - R1(C,D,A,B,X(15),14,0xd8a1e681L); - R1(B,C,D,A,X( 4),20,0xe7d3fbc8L); - R1(A,B,C,D,X( 9), 5,0x21e1cde6L); - R1(D,A,B,C,X(14), 9,0xc33707d6L); - R1(C,D,A,B,X( 3),14,0xf4d50d87L); - R1(B,C,D,A,X( 8),20,0x455a14edL); - R1(A,B,C,D,X(13), 5,0xa9e3e905L); - R1(D,A,B,C,X( 2), 9,0xfcefa3f8L); - R1(C,D,A,B,X( 7),14,0x676f02d9L); - R1(B,C,D,A,X(12),20,0x8d2a4c8aL); - /* Round 2 */ - R2(A,B,C,D,X( 5), 4,0xfffa3942L); - R2(D,A,B,C,X( 8),11,0x8771f681L); - R2(C,D,A,B,X(11),16,0x6d9d6122L); - R2(B,C,D,A,X(14),23,0xfde5380cL); - R2(A,B,C,D,X( 1), 4,0xa4beea44L); - R2(D,A,B,C,X( 4),11,0x4bdecfa9L); - R2(C,D,A,B,X( 7),16,0xf6bb4b60L); - R2(B,C,D,A,X(10),23,0xbebfbc70L); - R2(A,B,C,D,X(13), 4,0x289b7ec6L); - R2(D,A,B,C,X( 0),11,0xeaa127faL); - R2(C,D,A,B,X( 3),16,0xd4ef3085L); - R2(B,C,D,A,X( 6),23,0x04881d05L); - R2(A,B,C,D,X( 9), 4,0xd9d4d039L); - R2(D,A,B,C,X(12),11,0xe6db99e5L); - R2(C,D,A,B,X(15),16,0x1fa27cf8L); - R2(B,C,D,A,X( 2),23,0xc4ac5665L); - /* Round 3 */ - R3(A,B,C,D,X( 0), 6,0xf4292244L); - R3(D,A,B,C,X( 7),10,0x432aff97L); - R3(C,D,A,B,X(14),15,0xab9423a7L); - R3(B,C,D,A,X( 5),21,0xfc93a039L); - R3(A,B,C,D,X(12), 6,0x655b59c3L); - R3(D,A,B,C,X( 3),10,0x8f0ccc92L); - R3(C,D,A,B,X(10),15,0xffeff47dL); - R3(B,C,D,A,X( 1),21,0x85845dd1L); - R3(A,B,C,D,X( 8), 6,0x6fa87e4fL); - R3(D,A,B,C,X(15),10,0xfe2ce6e0L); - R3(C,D,A,B,X( 6),15,0xa3014314L); - R3(B,C,D,A,X(13),21,0x4e0811a1L); - R3(A,B,C,D,X( 4), 6,0xf7537e82L); - R3(D,A,B,C,X(11),10,0xbd3af235L); - R3(C,D,A,B,X( 2),15,0x2ad7d2bbL); - R3(B,C,D,A,X( 9),21,0xeb86d391L); - - A = c->A += A; - B = c->B += B; - C = c->C += C; - D = c->D += D; - } - } -#endif - -#ifdef undef -int printit(unsigned long *l) - { - int i,ii; - - for (i=0; i<2; i++) - { - for (ii=0; ii<8; ii++) - { - fprintf(stderr,"%08lx ",l[i*8+ii]); - } - fprintf(stderr,"\n"); - } - } -#endif diff --git a/org.glite.jobid.api-c/src/md5_locl.h b/org.glite.jobid.api-c/src/md5_locl.h deleted file mode 100644 index e9e5b08..0000000 --- a/org.glite.jobid.api-c/src/md5_locl.h +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* crypto/md5/md5_locl.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#include -#include -#include -#include - -#ifndef MD5_LONG_LOG2 -#define MD5_LONG_LOG2 2 /* default to 32 bits */ -#endif - -#ifdef MD5_ASM -# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || defined(__x86_64) || defined(__x86_64__) -# if !defined(B_ENDIAN) -# define md5_block_host_order md5_block_asm_host_order -# endif -# elif defined(__sparc) && defined(OPENSSL_SYS_ULTRASPARC) - void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,size_t num); -# define HASH_BLOCK_DATA_ORDER_ALIGNED md5_block_asm_data_order_aligned -# endif -#endif - -MD5_JOBID_PROTO void md5_block_host_order (MD5_CTX *c, const void *p,size_t num); -MD5_JOBID_PROTO void md5_block_data_order (MD5_CTX *c, const void *p,size_t num); - -#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || defined(__x86_64) || defined(__x86_64__) -# if !defined(B_ENDIAN) -/* - * *_block_host_order is expected to handle aligned data while - * *_block_data_order - unaligned. As algorithm and host (x86) - * are in this case of the same "endianness" these two are - * otherwise indistinguishable. But normally you don't want to - * call the same function because unaligned access in places - * where alignment is expected is usually a "Bad Thing". Indeed, - * on RISCs you get punished with BUS ERROR signal or *severe* - * performance degradation. Intel CPUs are in turn perfectly - * capable of loading unaligned data without such drastic side - * effect. Yes, they say it's slower than aligned load, but no - * exception is generated and therefore performance degradation - * is *incomparable* with RISCs. What we should weight here is - * costs of unaligned access against costs of aligning data. - * According to my measurements allowing unaligned access results - * in ~9% performance improvement on Pentium II operating at - * 266MHz. I won't be surprised if the difference will be higher - * on faster systems:-) - * - * - */ -# define md5_block_data_order md5_block_host_order -# endif -#endif - -#define DATA_ORDER_IS_LITTLE_ENDIAN - -#define HASH_LONG MD5_LONG -#define HASH_LONG_LOG2 MD5_LONG_LOG2 -#define HASH_CTX MD5_CTX -#define HASH_CBLOCK MD5_CBLOCK -#define HASH_LBLOCK MD5_LBLOCK -#define HASH_UPDATE MD5_Update -#define HASH_TRANSFORM MD5_Transform -#define HASH_FINAL MD5_Final -#define HASH_MAKE_STRING(c,s) do { \ - unsigned long ll; \ - ll=(c)->A; HOST_l2c(ll,(s)); \ - ll=(c)->B; HOST_l2c(ll,(s)); \ - ll=(c)->C; HOST_l2c(ll,(s)); \ - ll=(c)->D; HOST_l2c(ll,(s)); \ - } while (0) -#define HASH_BLOCK_HOST_ORDER md5_block_host_order -#if !defined(L_ENDIAN) || defined(md5_block_data_order) -#define HASH_BLOCK_DATA_ORDER md5_block_data_order -/* - * Little-endians (Intel and Alpha) feel better without this. - * It looks like memcpy does better job than generic - * md5_block_data_order on copying-n-aligning input data. - * But frankly speaking I didn't expect such result on Alpha. - * On the other hand I've got this with egcs-1.0.2 and if - * program is compiled with another (better?) compiler it - * might turn out other way around. - * - * - */ -#endif - -#include "md32_common.h" - -/* -#define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) -#define G(x,y,z) (((x) & (z)) | ((y) & (~(z)))) -*/ - -/* As pointed out by Wei Dai , the above can be - * simplified to the code below. Wei attributes these optimizations - * to Peter Gutmann's SHS code, and he attributes it to Rich Schroeppel. - */ -#define F(b,c,d) ((((c) ^ (d)) & (b)) ^ (d)) -#define G(b,c,d) ((((b) ^ (c)) & (d)) ^ (c)) -#define H(b,c,d) ((b) ^ (c) ^ (d)) -#define I(b,c,d) (((~(d)) | (b)) ^ (c)) - -#define R0(a,b,c,d,k,s,t) { \ - a+=((k)+(t)+F((b),(c),(d))); \ - a=ROTATE(a,s); \ - a+=b; };\ - -#define R1(a,b,c,d,k,s,t) { \ - a+=((k)+(t)+G((b),(c),(d))); \ - a=ROTATE(a,s); \ - a+=b; }; - -#define R2(a,b,c,d,k,s,t) { \ - a+=((k)+(t)+H((b),(c),(d))); \ - a=ROTATE(a,s); \ - a+=b; }; - -#define R3(a,b,c,d,k,s,t) { \ - a+=((k)+(t)+I((b),(c),(d))); \ - a=ROTATE(a,s); \ - a+=b; }; diff --git a/org.glite.jobid.api-c/src/strmd5.c b/org.glite.jobid.api-c/src/strmd5.c deleted file mode 100755 index 8543cea..0000000 --- a/org.glite.jobid.api-c/src/strmd5.c +++ /dev/null @@ -1,169 +0,0 @@ -#ident "$Header$" -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -#include -#include -#include - -#define MD5_JOBID_PROTO static -#include "md5.h" -#include "strmd5.h" - -#include "md5_dgst.c" - - -static char mbuf[33]; -static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; -static char *b64r; - -int base64_encode(const void *enc, int enc_size, char *out, int out_max_size) -{ - - unsigned char* enc_buf = (unsigned char*)enc; - int out_size = 0; - unsigned int bits = 0; - unsigned int shift = 0; - - while ( out_size < out_max_size ) { - if ( enc_size>0 ) { - // Shift in byte - bits <<= 8; - bits |= *enc_buf; - shift += 8; - // Next byte - enc_buf++; - enc_size--; - } else if ( shift>0 ) { - // Pad last bits to 6 bits - will end next loop - bits <<= 6 - shift; - shift = 6; - } else { - // Terminate with Mime style '=' - *out = '='; - out_size++; - - return out_size; - } - - // Encode 6 bit segments - while ( shift>=6 ) { - shift -= 6; - *out = b64[ (bits >> shift) & 0x3F ]; - out++; - out_size++; - } - } - - // Output overflow - return -1; -} - -int base64_decode(const char *enc,char *out,int max_out_size) -{ - unsigned int bits = 0; - int shift = 0; - int out_size = 0; - - if (!b64r) { - int i; - b64r = calloc(128,1); - - for (i=0; b64[i]; i++) b64r[(int)b64[i]] = i; - } - - while (*enc && *enc != '=') { - bits <<= 6; - bits |= b64r[(int)*enc++]; - shift += 6; - - while (shift >= 8) { - if (out_size >= max_out_size) return -1; - shift -= 8; - *out++ = (bits >> shift) & 0xff; - out_size++; - } - } - - return out_size; -} - -char *strmd5(const char *s, unsigned char *digest) -{ - MD5_CTX md5; - unsigned char d[16]; - int i; - - MD5_Init(&md5); - MD5_Update(&md5,s,strlen(s)); - MD5_Final(d,&md5); - - if (digest) memcpy(digest,d,sizeof(d)); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - mbuf[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - mbuf[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - mbuf[32] = 0; - return (char *) mbuf; -} - -char *str2md5(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char* ret = malloc(33); - int i; - - if (!ret) - return NULL; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - for (i=0; i<16; i++) { - int dd = d[i] & 0x0f; - ret[2*i+1] = dd<10 ? dd+'0' : dd-10+'a'; - dd = d[i] >> 4; - ret[2*i] = dd<10 ? dd+'0' : dd-10+'a'; - } - ret[32] = 0; - return ret; -} - -char *str2md5base64(const char *s) -{ - MD5_CTX md5; - unsigned char d[16]; - char buf[50]; - int l; - - MD5_Init(&md5); - MD5_Update(&md5, s, strlen(s)); - MD5_Final(d, &md5); - - l = base64_encode(d, 16, buf, sizeof(buf) - 1); - if (l < 1) - return NULL; - buf[l - 1] = 0; - return strdup(buf); -} diff --git a/org.glite.jobid.api-c/test/base64_test.cpp b/org.glite.jobid.api-c/test/base64_test.cpp deleted file mode 100644 index b7003a7..0000000 --- a/org.glite.jobid.api-c/test/base64_test.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "strmd5.h" - -class Base64Test: public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(Base64Test); - CPPUNIT_TEST(test); - CPPUNIT_TEST_SUITE_END(); -public: - void test(); -}; - -void Base64Test::test() -{ - int i; - unsigned char in[2000], b[4000], out[2000]; - - srandom(0xDEAD); - in[0] = 'x'; - for (i=1; i<2000; i++) { - char s[20]; - int len; - sprintf(s,"%d",i); - in[i] = random() % 256; - - std::cerr << '.'; - - base64_encode(in,i,(char *) b,sizeof b); - len = base64_decode((const char *) b,(char *) out,sizeof out); - - CPPUNIT_ASSERT_MESSAGE(std::string("len"),i == len); - CPPUNIT_ASSERT_MESSAGE(std::string(s),!memcmp(in,out,i)); - } - std::cerr << std::endl; -} - -CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test); - - -int main (int argc,const char *argv[]) -{ - CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); - - assert(argc == 2); - std::ofstream xml(argv[1]); - - CppUnit::TestResult controller; - CppUnit::TestResultCollector result; - controller.addListener( &result ); - - CppUnit::TestRunner runner; - runner.addTest(suite); - runner.run(controller); - - CppUnit::XmlOutputter xout( &result, xml ); - CppUnit::CompilerOutputter tout( &result, std::cout); - xout.write(); - tout.write(); - - return result.wasSuccessful() ? 0 : 1 ; -} diff --git a/org.glite.jobid.api-cpp/Makefile b/org.glite.jobid.api-cpp/Makefile deleted file mode 100644 index ebb9ab0..0000000 --- a/org.glite.jobid.api-cpp/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# Default values -top_srcdir=.. -stagedir=. -globalprefix=glite -jobidprefix=jobid -package=glite-jobid-api-cpp -version=0.0.0 - -CC:=gcc -CXX:=g++ - --include Makefile.inc - -version=${module.version} - -VPATH=${top_srcdir}/src:${top_srcdir}/interface:${top_srcdir}/test - -DEBUG:=-g -O0 -Wall - -CFLAGS:=${DEBUG} \ - -I${top_srcdir}/interface -I${top_srcdir}/src \ - ${COVERAGE_FLAGS} \ - -D_GNU_SOURCE - -COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS} -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} -INSTALL:=libtool --mode=install install - -LIBOBJS:= -HDRS:=JobId.h - -LIBLOBJS:=${LIBOBJS:.o=.lo} - -LIB:= - -compile all: - - -check: compile -# - -clean: - rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h - rm -rvf log.xml rpmbuild/ RPMS/ tgz/ debian/ - -install: - mkdir -p ${DESTDIR}${PREFIX}${prefix}/include/${globalprefix}/${jobidprefix} - (cd ${top_srcdir}/interface; ${INSTALL} -m 644 ${HDRS} ${DESTDIR}${PREFIX}${prefix}/include/${globalprefix}/${jobidprefix}) - -stage: - ${MAKE} install PREFIX=${stagedir} staging=1 - -%.o: %.c - ${COMPILE} -o $@ -c $< - - -.PHONY: default all compile check install clean diff --git a/org.glite.jobid.api-cpp/configure b/org.glite.jobid.api-cpp/configure deleted file mode 100755 index e2b3330..0000000 --- a/org.glite.jobid.api-cpp/configure +++ /dev/null @@ -1,1400 +0,0 @@ -#!/usr/bin/perl - -# WARNING: Don't edit this file unless it is the master copy in org.glite.lb -# -# For the purpose of standalone builds of lb/jobid/lbjp-common components -# it is copied on tagging - -# $Header$ -# -# Copyright (c) Members of the EGEE Collaboration. 2004-2010. -# See http://www.eu-egee.org/partners/ for details on the copyright holders. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -use Getopt::Long; - -my $pwd = `pwd`; chomp $pwd; -my $prefix = '/usr'; -my $stagedir = undef; -my $root = $pwd.'/stage'; -my $sysroot = ''; -my $sysconfdir; -my $localstatedir; -my $staged; -my $module; -my $thrflavour = 'gcc64dbgpthr'; -my $nothrflavour = 'gcc64dbg'; -my $mode = 'build'; -my $help = 0; -my $listmodules; -my $version; -my $branch; -my $output; -my $lb_tag = ''; -my $lbjp_tag = ''; -my $jp_tag = ''; -my $jobid_tag = ''; -my $libdir = getlibdir(); -my $project = 'glite'; -my (%projects, %project); -my $debug = 0; -my $pkg_config_env = (defined $ENV{PKG_CONFIG_PATH}) ? "$ENV{PKG_CONFIG_PATH}:" : ''; - -my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; -my @default_nodes = qw/lb px proxyrenewal/; -my %enable_nodes; -my %disable_nodes; -my %default_nodes; @default_nodes{@default_nodes} = (1) x ($#default_nodes + 1); - -# key: internal package name (arguments, ...) -# 'pkg': pkg-config name -# 'prefix': used when pkg-config fails -my %externs = ( - cares => { - prefix => '/opt/c-ares', - pkg => 'libcares' - }, - classads => { - prefix=> '/usr', - pkg => 'classads' - }, - cppunit => { - prefix=> '/usr', - pkg => 'cppunit' - }, - expat => { - prefix=> '/usr', - pkg => 'expat' - }, - globus => { - prefix=> '/opt/globus', - pkg => 'globus-gssapi-gsi' - }, - 'myproxy-devel' => { - prefix=> '/opt/globus', - pkg => 'myproxy' - }, - 'myproxy-server' => { - prefix=> '', - }, - 'myproxy-libs' => { - prefix=> '', - }, - 'myproxy-admin' => { - prefix=> '', - }, - gsoap => { - prefix=> '/usr', - pkg => 'gsoap' - }, - gsoapxx => { - prefix=> '/usr', - pkg => 'gsoap++' - }, - mysql => { - prefix=> '/usr' - }, - 'mysql-devel' => { - prefix=> '' - }, - 'mysql-server' => { - prefix => '' - }, - voms => { - prefix => '/opt/glite', - pkg => 'voms-2.0' - }, - gridsite => { - prefix => '/opt/glite' - }, - lcas => { - prefix => '/opt/glite', - pkg => 'lcas' - }, - trustmanager => { - prefix => '/opt/glite' - }, - trustmanager_axis => { - prefix => '/opt/glite' - }, - utiljava => { - prefix=> '/opt/glite' - }, - ant => { - prefix=> '/usr' - }, - jdk => { - prefix=> '/usr/java/latest' - }, - libtar => { - prefix=> '/usr' - }, - axis => { - prefix=> '/usr' - }, - log4c => { - prefix=> '/usr' - }, - postgresql => { - prefix=> '/usr' - }, - activemq => { - prefix=>'/opt/activemq-cpp-library', - pkg => 'activemq-cpp' - }, - apr => { - prefix=>'/opt/apr', - pkg => 'apr-1' - }, - aprutil => { - prefix=>'/opt/apr-util', - pkg => 'apr-util-1' - }, -); - -my %jar = ( - 'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar', - 'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar', -); - - -my %glite_prefix; -my %need_externs; -my %need_externs_type; -my %need_jars; -my %extrafull; -my %extranodmod; -my %deps; -my %deps_type; -my %buildroot; -my (%etics_externs, %etics_projects); - -# -# modules of the subsystems -# -# additional modules from $project{modules} are automatically added -# -my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim logger-msg/], - 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/], - 'jobid' => [qw/api-c api-cpp api-java/], - 'jp' => [ qw/client doc index primary server-common ws-interface/ ], - 'gridsite' => [ qw/apache shared commands core devel slashgrid services service-clients gsexec/ ], - 'px' => [ qw/proxyrenewal myproxy-yaim/ ], - ); - - -my @opts = ( - 'prefix:s' => \$prefix, - 'staged=s' => \$staged, - 'module=s' => \$module, - 'thrflavour:s' => \$thrflavour, - 'nothrflavour:s' => \$nothrflavour, - 'mode=s' => \$mode, - 'listmodules=s' => \$listmodules, - 'version=s' => \$version, - 'branch=s' => \$branch, - 'output=s' => \$output, - 'stage=s' => \$stagedir, - 'root:s' => \$root, - 'sysroot:s' => \$sysroot, - 'sysconfdir=s' => \$sysconfdir, - 'localstatedir=s' => \$localstatedir, - 'lb-tag=s' => \$lb_tag, - 'lbjp-common-tag=s' => \$lbjp_tag, - 'jp-tag=s' => \$jp_tag, - 'jobid-tag=s' => \$jobid_tag, - 'help' => \$help, - 'libdir=s' => \$libdir, - 'project=s' => \$project, - 'debug' => \$debug, -); - -for (@nodes) { - $enable_nodes{$_} = 0; - $disable_nodes{$_} = 0; - - push @opts,"disable-$_",\$disable_nodes{$_}; - push @opts,"enable-$_",\$enable_nodes{$_}; -} - -push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs; -push @opts,"with-$_=s",\$jar{$_} for keys %jar; - -my @keeparg = @ARGV; - -GetOptions @opts or die "Errors parsing command line\n"; -$prefix=~s/\/$//; -$root=~s/\/$//; -$sysroot=~s/\/$//; -if (not $sysconfdir) { $sysconfdir = $prefix eq '/usr' ? '/etc' : "$prefix/etc"; } -if (not $localstatedir) { $localstatedir = $prefix eq '/usr' ? '/var' : "$prefix/var"; } -$sysconfdir=~s/\/$//; -$localstatedir=~s/\/$//; - -$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq ''; -$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq ''; -$externs{'gsoapxx'}{prefix}=$externs{gsoap}{prefix} if $externs{'gsoapxx'}{prefix} eq ''; - -$externs{'mysql-server'}{withprefix}=$externs{mysql}{withprefix} if $externs{'mysql-server'}{withprefix} eq ''; -$externs{'mysql-devel'}{wihtprefix}=$externs{mysql}{withprefix} if $externs{'mysql-devel'}{withprefix} eq ''; -$externs{'gsoapxx'}{withprefix}=$externs{gsoap}{withprefix} if $externs{'gsoapxx'}{withprefix} eq ''; - -%project = %{$projects{$project}}; -for $_ (keys %{$project{etics_externs}}) { - $etics_externs{$_} = $project{etics_externs}{$_}; -} -for $_ (keys %{$project{etics_projects}}) { - $etics_projects{$_} = $project{etics_projects}{$_}; -} -for $_ (keys %{$project{need_externs_aux}}) { - $need_externs_aux{$_} = $project{need_externs_aux}{$_}; -} -for my $ext (keys %need_externs_aux) { - for (@{$need_externs_aux{$ext}}) { - my ($pkg, $type) =/([^:]*)(?::(.*))?/; - $type = 'BR' unless ($type); - - push @{$need_externs{$ext}},$pkg; - $need_externs_type{$ext}->{$pkg} = $type; - } -} -for $_ (keys %{$project{modules}}) { - push @{$lbmodules{$_}},@{$project{modules}{$_}}; -} - - -if ($help) { usage(); exit 0; } - -if ($listmodules) { - my $name_prefix = ($listmodules eq 'gridsite' and $project eq 'glite') ? 'org' : $project{etics_name}; - my @m = map "$name_prefix.$listmodules.$_",@{$lbmodules{$listmodules}}; - print "@m\n"; - exit 0; -} - -warn "$0: --version, --branch and --output make sense only in --mode=etics\n" - if ($version || $output || $branch) && $mode ne 'etics'; - -my $en; -for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } - -my $dis; -for (keys %disable_nodes) { $dis = 1 if $disable_nodes{$_}; } - -die "--enable-* and --disable-* are mutually exclusive\n" - if $en && $dis; - -die "--module cannot be used with --enable-* or --disable-*\n" - if $module && ($en || $dis); - -die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}}; - -if ($dis) { - for (@nodes) { - $enable_nodes{$_} = 1 unless ($disable_nodes{$_} or not $default_nodes{$_}); - } -} - -if (!$en && !$dis) { for (@nodes) { $enable_nodes{$_} = 1 if ($default_nodes{$_}) } }; - -for (keys %enable_nodes) { delete $enable_nodes{$_} unless $enable_nodes{$_}; } - -$stagedir = $root unless $stagedir; -$stagedir=~s/\/$// if ($stagedir); - -if ($mode eq 'build') { for my $ext (keys %externs) { - if (defined $externs{$ext} and defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; } - elsif (defined $externs{$ext}{pkg}) { - my ($flag, $env, $cmd, $ret); - my $pkg = $externs{$ext}{pkg}; - my $flagname = uc $externs{$ext}{pkg}; - $flagname =~ s/-[0-9\.]*$//; - $flagname =~ y/-\+/_X/; - - print "Checking $pkg ... "; - $env = "PKG_CONFIG_PATH=$pkg_config_env$stagedir$prefix/$libdir/pkgconfig"; - $cmd = "$env pkg-config $pkg --exists >/dev/null"; - `$cmd`; $ret = $?; - print "('$cmd' => $ret)\n" if ($debug); - if ($ret == 0) { - $externs{$ext}{prefix}=`$env pkg-config $pkg --variable=prefix`; - chomp $externs{$ext}{prefix}; - print "$externs{$ext}{prefix}\n"; - - $flag=`$env pkg-config $pkg --cflags`; - $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag); - $flag=`$env pkg-config $pkg --libs`; - $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag); - } else { - print "(using default $externs{$ext}{prefix})\n"; - } - print "\n" if ($debug); - } - elsif ($ext eq 'jdk') { - my $jdk_prefix; - - print "Looking for some caffein ... "; - if (defined $ENV{'JDK_HOME'}) { - $jdk_prefix = $ENV{'JDK_HOME'}; - print "JDK_HOME=$jdk_prefix\n"; - } elsif (defined $ENV{'JAVA_HOME'}) { - $jdk_prefix = $ENV{'JAVA_HOME'}; - print "JAVA_HOME=$jdk_prefix\n"; - } else { - print "(using default $externs{$ext}{prefix}))\n" - } - $externs{$ext}{prefix} = $jdk_prefix if ($jdk_prefix); - } -} } - -if ($mode eq 'build') { - print "Writing config.status\n"; - open CONF,">config.status" or die "config.status: $!\n"; - for ('JDK_HOME', 'JAVA_HOME', 'PKG_CONFIG_PATH') { - print CONF "$_=$ENV{$_} " if (defined $ENV{$_}); - } - print CONF "$0 @keeparg\n"; - close CONF; -} - - -my @modules; -my %aux; - -if ($module) { -# push @modules,split(/[,.]+/,$module); - push @modules,$module; -} -else { - @modules = map(($extranodmod{$_} ? $extranodmod{$_} : 'lb.'.$_),(keys %enable_nodes)); - - my $n; - - do { - local $"="\n"; - $n = $#modules; - push @modules,(map @{$deps{$_}},@modules); - - undef %aux; @aux{@modules} = (1) x ($#modules+1); - @modules = keys %aux; - } while ($#modules > $n); -} - -@aux{@modules} = (1) x ($#modules+1); -delete $aux{$_} for (split /,/,$staged); -@modules = keys %aux; - -mode_build() if $mode eq 'build'; -mode_checkout() if $mode eq 'checkout'; -mode_etics($module) if $mode eq 'etics'; - -sub mode_build { - print "\nBuilding modules: @modules\n"; - print "Mode: "; print $module ? "single module" : "multiple modules"; print "\n"; - - my @ext = map @{$need_externs{$_}},@modules; - my @myjars = map @{$need_jars{$_}},@modules; - undef %aux; @aux{@ext} = 1; - @ext = keys %aux; - undef %aux; @aux{@myjars} = (1) x ($#myjars+1); - @myjars = keys %aux; - - print "\nRequired externals:\n"; - print "\t$_: ".($externs{$_}{prefix}?$externs{$_}{prefix}:'-')."\n" for @ext; - print "\t$_: $jar{$_}\n" for @myjars; - for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } }; - print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n"; - - mkinc($_) for @modules; - - if ($module) { - print "Not creating summary Makefile\n" if $debug; - } else { - print "Creating Makefile\n"; - - open MAK,">Makefile" or die "Makefile: $!\n"; - - print MAK "all: @modules\n\n"; - print MAK "stage: ".(join '-stage ', @modules)."-stage\n\n"; - print MAK "clean check install:\n"; - - for (@modules) { - my $full = full($_); - print MAK "\tcd $full/$buildroot{$_} && \${MAKE} \$@\n" - } - - print MAK "\ndistclean:\n"; - - for (@modules) { - my $full = full($_); - print MAK $buildroot{$_} eq '' ? - "\tcd $full && \${MAKE} distclean\n" : - "\trm -rf $full/$buildroot{$_}\n" - } - - print MAK "\n"; - - for (@modules) { - my %ldeps; undef %ldeps; - @ldeps{@{$deps{$_}}} = 1; - for my $x (split /,/,$staged) { delete $ldeps{$x}; } - my @dnames = $module ? () : keys %ldeps; - my $snames = $#dnames == -1 ? '' : join('-stage ', @dnames).'-stage'; - - my $full = full($_); - my $build = $buildroot{$_}; - - print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n"; - print MAK "$_-stage: $snames\n\tcd $full/$build && \${MAKE} && \${MAKE} stage\n\n"; - } - - close MAK; - } -} - -sub mode_checkout() { - for (@modules) { - my $module = $_; - my $tag = ""; - if ($lb_tag){ - for (@{$lbmodules{lb}}){ - if ("lb.".$_ eq $module){ - $tag = '-r '.$lb_tag; - } - } - } - if ($lbjp_tag){ - for (@{$lbmodules{'lbjp-common'}}){ - if ("lbjp-common.".$_ eq $module){ - $tag = '-r '.$lbjp_tag; - } - } - } - if ($jp_tag){ - for (@{$lbmodules{'jp'}}){ - if ("jp.".$_ eq $module){ - $tag = '-r '.$jp_tag; - } - } - } - if ($jobid_tag){ - for (@{$lbmodules{jobid}}){ - if ("jobid.".$_ eq $module){ - $tag = '-r '.$jobid_tag; - } - } - } - #if (grep {"lb.".$_ eq $module} @{$lbmodules{lb}}){ - # print "found"; - #} - $_ = full($_); - print "\n*** Checking out $_\n"; - system("cvs checkout $tag $_") == 0 or die "cvs checkout $tag $_: $?\n"; - } -} - -BEGIN{ -%etics_externs = ( - 'myproxy-devel'=>'myproxy-devel', - 'myproxy-libs'=>'myproxy-libs', - 'myproxy-server'=>'myproxy-server', - 'myproxy-admin'=>'myproxy-admin', - cares=>'c-ares', - voms=>'org.glite.security.voms-api-cpp', - utiljava=>'org.glite.security.util-java', - gpt=>'gpt', - fetchcrl=>'fetch-crl', - activemq=>'activemq-cpp-library', - apr=>'apr-dev', - aprutil=>'aprutil-dev', -); - -%etics_projects = ( -); - -%need_externs_aux = ( - 'lb.client' => [ qw/cppunit:B classads libtool:B/ ], - 'lb.common' => [ qw/expat cares:B cppunit:B classads libtool:B/ ], - 'lb.doc' => [ qw/tetex-latex:B/ ], - 'lb.logger' => [ qw/cppunit:B libtool:B/ ], - 'lb.logger-msg' => [ qw/cppunit:B activemq libtool:B/ ], - 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite bison:B libtool:B libxml2 flex:B/ ], - 'lb.state-machine' => [ qw/classads libtool:B libxslt:B expat:B/ ], - 'lb.utils' => [ qw/cppunit:B libtool:B/ ], - 'lb.ws-interface' => [ qw/libxslt:B/ ], - 'lb.ws-test' => [ qw/gsoap:B libtool:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/docbook-utils:B libtool:B/ ], - 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.log' => [ qw/log4c libtool:B/ ], - 'lbjp-common.maildir' => [ qw/libtool:B/ ], - 'lbjp-common.server-bones' => [ qw/libtool:B/ ], - 'lbjp-common.trio' => [ qw/cppunit:B libtool:B/ ], - 'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B libtool:B/ ], - 'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap gsoapxx libtool:B/ ], - 'jobid.api-c' => [ qw/cppunit:B libtool:B openssl:B/ ], - 'jobid.api-cpp' => [ qw/cppunit:B libtool:B/ ], - 'jobid.api-java' => [ qw/ant:B jdk:B/ ], - 'jp.client' => [ qw/gsoap libtar globus_essentials:R globus:B/ ], - 'jp.doc' => [], - 'jp.index' => [ qw/gsoap globus_essentials:R globus:B/ ], - 'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ], - 'jp.server-common' => [], - 'jp.ws-interface' => [], - 'gridsite.core' => [ qw/httpd-devel:B gsoap:B globus:B curl:B doxygen:B fuse-devel:B libxml2 openssl:B build_common_cpp:B doxygen:B/ ], - 'gridsite.commands' => [ qw/curl:R openssl:R/ ], - 'gridsite.apache' => [ qw/libxml2:R openssl:R curl:R/ ], - 'gridsite.shared' => [ qw/libxml2:R openssl:R/ ], - 'gridsite.devel' => [ qw// ], - 'gridsite.slashgrid' => [ qw/curl:R fuse-libs:R fuse:R/], - 'gridsite.services' => [ qw/curl:R gsoap:R/ ], - 'gridsite.service-clients' => [ qw/curl:R gsoap:R gsoapxx:R/ ], - 'gridsite.gsexec' => [ qw// ], - 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-devel:B myproxy-libs:R voms libtool:B/ ], - 'px.myproxy-config' => [ qw/myproxy-admin:R/ ], # in myproxy-config.spec -); - -%need_jars = ( - 'jobid.api-java' => [ qw/jakarta-commons-codec/ ], - 'lb.client-java' => [ qw/jakarta-commons-lang/ ], -); - -for my $jar (keys %need_jars) { - for (@{$need_jars{$jar}}) { - $need_externs_type{$jar}->{$_} = 'BR'; # XXX - } -} - -%deps_aux = ( - 'lb.client' => [ qw/ - lb.types:B lb.common - lbjp-common.trio - jobid.api-cpp:B jobid.api-c - lbjp-common.gss - / ], - 'lb.client-java' => [ qw/ - lb.types:B - lb.ws-interface:B - jobid.api-java - / ], - 'lb.common' => [ qw/ - jobid.api-cpp:B jobid.api-c - lb.types:B lbjp-common.trio lbjp-common.gss - / ], - 'lb.doc' => [ qw/lb.types:B/ ], - 'lb.logger' => [ qw/ - lbjp-common.trio - lbjp-common.log - jobid.api-c - lb.common - lbjp-common.gss - / ], - 'lb.logger-msg' => [ qw/ - lb.logger - / ], - 'lb.server' => [ qw/ - lb.ws-interface lb.types:B lb.common lb.state-machine - lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log - jobid.api-c - lbjp-common.gsoap-plugin lbjp-common.gss - / ], - 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ], - 'lb.utils' => [ qw/ - lbjp-common.jp-interface - jobid.api-c - lbjp-common.trio lbjp-common.maildir - lb.client lb.state-machine lb.types:B - / ], - 'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ], - 'lb.ws-interface' => [ qw/lb.types:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/ - jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client - lbjp-common.gss lbjp-common.log - / ], - 'lb.yaim' => [ qw// ], - 'lb.glite-LB' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lb.emi-lb' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ], - 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.log' => [ qw// ], - 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], - 'lbjp-common.trio' => [ qw// ], - 'lbjp-common.gss' => [ qw// ], - 'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ], - 'jobid.api-c' => [ qw// ], - 'jobid.api-cpp' => [ qw/jobid.api-c/ ], - 'jobid.api-java' => [ qw// ], - - 'lbjp-common.jp-interface' => [ qw/lbjp-common.db jobid.api-c/ ], - - 'jp.client' => [ qw/ - jp.ws-interface - lbjp-common.jp-interface lbjp-common.maildir - jobid.api-c - lbjp-common.gsoap-plugin - / ], - 'jp.doc' => [ qw// ], - 'jp.index' => [ qw/ - jp.server-common jp.ws-interface - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.primary' => [ qw/ - jobid.api-c - jp.server-common jp.ws-interface - lb.state-machine - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.server-common' => [ qw/ - lbjp-common.jp-interface lbjp-common.db - / ], - 'jp.ws-interface' => [ qw// ], - - 'gridsite.core' => [ qw// ], - 'gridsite.commands' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.apache' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.shared' => [ qw/gridsite.core:B / ], - 'gridsite.devel' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.slashgrid' => [ qw/gridsite.core:B gridsite.shared:R/], - 'gridsite.services' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.service-clients' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.gsexec' => [ qw/gridsite.core:B/ ], - - 'px.proxyrenewal' => [ qw// ], - 'px.glite-PX' => [qw/px.myproxy-yaim:R/], - 'px.emi-px' => [qw/px.myproxy-yaim:R/], - 'px.myproxy-yaim' => [ qw// ], - 'px.myproxy-config' => [], -); - -for my $ext (keys %deps_aux) { - for (@{$deps_aux{$ext}}) { - /([^:]*)(?::(.*))?/; - push @{$deps{$ext}},$1; - my $type = $2 ? $2 : 'BR'; - $deps_type{$ext}->{$1} = $type; - } -} - - -%extrafull = ( gridsite=>'org.gridsite.core'); - -#( java => 'client-java' ); -%extranodmod = ( - db => 'lbjp-common.db', - jpprimary => 'jp.primary', - jpindex => 'jp.index', - jpclient => 'jp.client', - lb => 'lb.glite-LB', - px => 'px.glite-PX', - proxyrenewal => 'px.proxyrenewal' -); - -%obsoletes = ( - 'lb.yaim' => [ qq/glite-yaim-lb/ ], - 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ], - 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ], - 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%conflicts = ( -); - -%provides = ( - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%cvs_prefix = ( - 'lb' => 'org.glite', - 'jp' => 'org.glite', - 'jobid' => 'org.glite', - 'lbjp-common' => 'org.glite', - 'gridsite' => 'org', - 'px' => 'org.glite', -); - -%cvs_tag_prefix = ( - 'lb' => 'glite-', - 'jp' => 'glite-', - 'jobid' => 'glite-', - 'lbjp-common' => 'glite-', - 'gridsite' => '', - 'px' => 'glite-', -); - -# ==== projects specification ==== -# etics_name ........... ETICS project name -# conf_prefix .......... ETICS configurations name prefix -# tag_prefix ........... VCS tag prefix -# local_prefix ......... prefix (relative to stage) -# etics_externs ........ ETICS modules names of externals -# (${NAME.location}, ETICS conf. dependencies) -# etics_projects ....... ETICS project names of externals -# etics_externs_devel .. ETICS modules names of devel versions of externals -# need_externs_aux ..... project-specific external dependencies -# supported_platforms .. platforms supported by the project -# modules .............. additional modules in subsystems -%projects = ( - glite => { - etics_name => 'org.glite', - conf_prefix => { %cvs_tag_prefix }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour=${globus.thr.flavor} --nothrflavour=${globus.nothr.flavor}', - local_prefix => '', - etics_externs => { - globus_essentials=>'vdt_globus_essentials', - globus=>'globus', - gridsite=>'org.gridsite.shared', - yaim_core=>'org.glite.yaim.core', - gip_release=>'glite-info-provider-release', - gip_service=>'glite-info-provider-service', - bdii=>'bdii', - glite_version=>'glite-version', - glite_info_templates=>'glite-info-templates', - glue_schema=>'glue-schema', - trustmanager=>'org.glite.security.trustmanager', - axis=>'axis', - lcas=>'org.glite.security.lcas', - gsoapxx=>'-', - build_common_cpp=>'org.glite.build.common-cpp', - }, - etics_externs_devel => { - gridsite=>'org.gridsite.devel', - }, - etics_projects => { - vdt=>[qw/globus globus_essentials gpt/], - 'org.glite'=>[qw/voms gridsite lcas gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager utiljava libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R/ ], - }, - modules => { - 'lb' => [ qw/glite-LB/ ], - 'px' => [ qw/glite-PX/ ], - } - }, - - emi => { - etics_name => 'emi', - conf_prefix => { - 'lb' => 'emi-', - 'jp' => 'emi-', - 'jobid' => 'emi-', - 'lbjp-common' => 'emi-', - 'gridsite' => '', - 'px' => 'emi-', - }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour= --nothrflavour=', - local_prefix => '/usr', - etics_externs => { - globus_essentials=>'globus-gssapi-gsi', - globus=>'globus-gssapi-gsi-devel', - gridsite=>'emi.gridsite.shared', - yaim_core=>'emi.yaim.yaim-core', - yaim_bdii=>'emi.bdii.yaim-bdii', - gip_service=>'emi.bdii.glite-info-provider-service', - bdii=>'emi.bdii.core', - glite_version=>'emi.misc.glite-version', - glue_schema=>'emi.bdii.glue-schema', - trustmanager=>'emi.java-security.trustmanager', - trustmanager_axis=>'emi.java-security.trustmanager-axis', - axis=>'axis1.4', - lcas=>'emi.sac.lcas', - gsoapxx=>'-', - build_common_cpp=>'emi.misc.glite.build-common-cpp', - jdk=>'java', - }, - etics_externs_devel => { - cares => 'c-ares-devel', - classads => 'classads-devel', - cppunit => 'cppunit-devel', - expat => 'expat-devel', - gsoap => 'gsoap-devel', - voms => 'org.glite.security.voms-api', - libtar => 'libtar-devel', - log4c => 'log4c-devel', - postgresql => 'postgresql-devel', - curl => 'curl-devel', - libxml2 => 'libxml2-devel', - openssl => 'openssl-devel', - gridsite=>'emi.gridsite.devel', - jdk=>'java-devel', - }, - etics_projects => { - 'emi'=>[qw/voms voms-devel gridsite lcas gip_service bdii glite_version glue_schema yaim_core yaim_bdii trustmanager trustmanager_axis/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager trustmanager_axis libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R yaim_bdii:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R yaim_bdii:R/ ], - }, - supported_platforms => { - sl5_x86_64_gcc412EPEL => 1, - sl5_ia32_gcc412EPEL => 1, - }, - modules => { - 'lb' => [ qw/emi-lb/ ], - 'px' => [ qw/emi-px/ ], - } - }, -); - -%platform_properties = ( - 'gridsite.core' => { - sl5_x86_64_gcc412 => { aprSuffix => '1' }, - sl5_ia32_gcc412 => { aprSuffix => '1' }, - sl5_x86_64_gcc412EPEL => { aprSuffix => '1' }, - sl5_ia32_gcc412EPEL => { aprSuffix => '1' }, - deb5_x86_64_gcc432 => { aprSuffix => '1.0' }, - deb5_ia32_gcc432 => { aprSuffix => '1.0' }, - slc4_x86_64_gcc346 => { aprSuffix => '0' }, - slc4_ia32_gcc346 => { aprSuffix => '0' }, - default => { - } - }, - 'jobid.api-java' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.types' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.doc' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.ws-interface' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.myproxy-config' => { - default => { 'package.buildarch' => 'noarch' }, - }, -); - -my @k = keys %deps_aux; -@buildroot{@k} = ('') x ($#k+1); - -$buildroot{'gridsite.core'} = 'src'; -} - -sub full -{ - my $short = shift; - return $extrafull{$short} ? $extrafull{$short} : 'org.glite.'.$short; -} - -sub mkinc -{ - my %aux; - undef %aux; - my @m=qw/ -lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB -lbjp-common.gss lbjp-common.gsoap-plugin -jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin -jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface -px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config -/; - @aux{@m} = (1) x ($#m+1); - - my $short = shift; - my $full = full $short; - - unless ($aux{$short}) { - print "Makefile.inc not needed in $full\n"; - return; - } - - my $top_srcdir = '.'; - my $build = ''; - - if ($module) { - $top_srcdir = $0; - $top_srcdir =~ s,/?[^/]*$,,; - $top_srcdir =~ s,^$,\.,; - } else { - $build = "$full/"; - unless ($buildroot{$_} eq '') { - $top_srcdir = '..'; - $build .= "$buildroot{$_}/"; - unless (-d "$build") { - mkdir "$build" or die "mkdir $build: $!\n"; - } - } - } - unless ($top_srcdir eq '.') { - unlink $build."Makefile"; - symlink "$top_srcdir/Makefile",$build."Makefile" or die "symlink $top_srcdir/Makefile ".$build."Makefile: $!\n"; - for my $file ('.pre', '.post', '.preun', '.postun changelog') { - my $pfile = "project/$file"; - if (-f "$full/$pfile") { - mkdir "$build/project" unless (-d "$build/project"); - unlink $build.$pfile; - symlink "../$top_srcdir/$pfile", $build.$pfile or die "symlink ../$top_srcdir/$pfile ".$build."$pfile: $!\n"; - } - } - } - - open MKINC,">".$build."Makefile.inc" - or die $build."Makefile.inc: $!\n"; - - print "Creating ".$build."Makefile.inc\n"; - - print MKINC qq{project = $project -PREFIX = $root -prefix = $prefix -stagedir = $stagedir -sysroot = $sysroot -sysconfdir = $sysconfdir -localstatedir = $localstatedir -thrflavour = $thrflavour -nothrflavour = $nothrflavour -libdir = $libdir -top_srcdir = $top_srcdir -}; - - for (@{$need_externs{$short}}) { - next unless defined $externs{$_} and defined $externs{$_}{prefix}; - print MKINC "${_}_prefix = $externs{$_}{prefix}\n"; - print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags}; - } - - for (@{$need_jars{$short}}) { - print MKINC "${_}_jar = $jar{$_}\n" - } - - my $need_gsoap = 0; - for (@{$need_externs{$short}}) { $need_gsoap = 1 if $_ eq 'gsoap'; } - - print MKINC "gsoap_default_version=".gsoap_version()."\n" if $need_gsoap; - - close MKINC; -} - -BEGIN{ -}; - -sub mode_etics { - $fmod = shift; - - die "$0: --module required with --etics\n" unless $fmod; - - my ($subsys,$module) = split /\./,$fmod; - - my ($major,$minor,$rev,$age); - - if ($version) { - $version =~ /([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-(.+)/; - ($major,$minor,$rev,$age) = ($1,$2,$3,$4); - } - else { - my $path = "$cvs_prefix{$subsys}.$subsys.$module/project"; - if ($subsys eq 'gridsite') { - $path = "$cvs_prefix{$subsys}.$subsys.core/project"; - } - open V,"$path/version.properties" - or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n"; - - while ($_ = ) { - chomp; - ($major,$minor,$rev) = ($1,$2,$3) if /module\.version\s*=\s*([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/; - $age = $1 if /module\.age\s*=\s*([[:digit:]]+)/; - } - close V; - } - - my @copts = (); - my %ge; - @ge{@{$etics_projects{$project{etics_name}}}} = (1) x ($#{$etics_projects{$project{etics_name}}}+1); - - for (@{$need_externs{"$subsys.$module"}}) { - if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/ and (defined $externs{$_} or defined $jar{$_})) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - next if ($eext eq '-'); - if ($project ne 'glite') { - if ($ge{$_} and not defined $externs{$_}{pkg}) { - push @copts, "--with-$_=\${stageDir}"; - } - } else { - push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; - } - } - } - - for (@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - - push @copts,"--with-$_ \${$eext.location}$jar{$_}" if ($project eq 'glite'); - } - - my $conf; - my $conftag; - my ($confprefix, $nameprefix); - - $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; - - $confprefix = $project{conf_prefix}{$subsys}; - $nameprefix = $confprefix; - $nameprefix =~ s/-$//; - $nameprefix =~ s/-/\./g; - - if ($branch) { - $conf = "$confprefix${subsys}-${module}_$branch"; - $conftag = $branch; - # forced low age number - $age = $branch eq 'HEAD' ? '0head' : '0dev'; } - else { - $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; - -# XXX: gridsite hack - $conftag = $subsys eq 'gridsite' ? "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : - "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; } - - my $file = $output ? $output : "$conf.ini"; - open C,">$file" or die "$file: $!\n"; - - my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"}; - - my $confdir = $buildroot{"$subsys.$module"} eq '' ? '.' : '..'; - - my $package_description = ""; - my $package_summary = ""; - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description"; - $package_description = join ("", ); - close V; - chomp $package_description; - $package_description =~ s/\n/\\n/g; - $package_description = "package.description = $package_description\n"; - } - else { - print STDERR "package.description not found for $subsys.$module!\n"; } - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary"; - $package_summary = join ("", ); - close V; - chomp $package_summary; - $package_summary =~ s/\n/\\n/g; - $package_summary = "package.summary = $package_summary\n"; - } - else { - print STDERR "package.summary not found for $subsys.$module!\n"; } - - my %cmd; - @cmd{qw/configure compile test install packaging clean/} = ('None') x 6; - $cmd{clean} = 'make clean'; - $cmd{checkout} = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null"; - #$cmd{checkout} = "(test -d jra1mw/.git && (cd jra1mw; git pull) || git clone http://scientific.zcu.cz/git/jra1mw.git)"; - #$cmd{checkout} .= " && (cd jra1mw; git checkout \${tag})" unless ($conftag =~ /HEAD/); - #$cmd{checkout} .= " && ln -s jra1mw/$cvs_prefix{$subsys}.$subsys.$module \${moduleName}"; - $cmd{tag} = "cvs -d \${vcsroot} tag -R \${tag} ${moduleName}"; - - if ($subsys eq 'gridsite') { - $cmd{tag} = 'None'; - - if ($module eq 'core') { - my ($flags, $prefix); - - if ($project ne 'glite') { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"'; - $prefix = 'prefix=${prefix}/usr'; - } else { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"'; - $prefix = 'prefix=${prefix}'; - } - - $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build"; - $cmd{clean} = "rm -rvf build.sh; $cmd{clean}"; - $cmd{install} = "make $prefix $flags install"; - $cmd{packaging} = "mkdir \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz - make $prefix $flags rpm && \ - cp \${moduleDir}/RPMTMP/SOURCES/gridsite-\${version}.src.tar.gz \${moduleDir}/src/tgz"; - } - else { - $cmd{clean} = 'None'; - $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this"; - $cmd{checkout} = "mkdir -v \${moduleName} 2>/dev/null || true"; - } - } - elsif ($subsys eq 'px' and $module eq 'myproxy-config') { - $cmd{configure} = "/usr/bin/perl $confdir/configure --root=\${prefix} --prefix= --stage=\${stageDir} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config"; - } - else { - $cmd{configure} = "/usr/bin/perl $confdir/configure $project{flavours} --root=\${prefix} --prefix=$project{local_prefix} --stage=\${stageDir} --sysroot=\${package.prefix} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{compile} = 'make'; - $cmd{test} = 'make check'; - $cmd{install} = 'make install'; - } - - my $defprops = ''; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) { - $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n"; - } - - print STDERR "Writing $file\n"; - print C qq{ -[Configuration-$conf] -profile = None -moduleName = $project{etics_name}.$subsys.$module -displayName = $conf -description = $cvs_prefix{$subsys}.$subsys.$module -projectName = $project{etics_name} -age = $age -deploymentType = None -vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite -tag = $conftag -version = $major.$minor.$rev -$dwpath -[Platform-default:VcsCommand] -displayName = None -description = None -tag = $cmd{tag} -branch = None -commit = None -checkout = $cmd{checkout} - -[Platform-default:BuildCommand] -postpublish = None -packaging = $cmd{packaging} -displayName = None -description = None -doc = None -prepublish = None -publish = None -compile = $cmd{compile} -init = None -install = $cmd{install} -clean = $cmd{clean} -test = $cmd{test} -configure = $cmd{configure} -checkstyle = None - -[Platform-default:Property] -$buildroot -aprSuffix = 0 -package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS -package.preserve.libtool = false -$package_description$package_summary$defprops}; - - for (@{$obsoletes{"$subsys.$module"}}) { - print C "package.obsoletes = $_\n"; - print C "package.replaces = $_\n"; - } - for (@{$conflicts{"$subsys.$module"}}) { - print C "package.conflicts = $_\n"; - } - for (@{$provides{"$subsys.$module"}}) { - print C "package.provides = $_\n"; - } - - for my $pp (keys %{$platform_properties{"$subsys.$module"}}) { - next if $pp eq 'default'; - next if exists $project{supported_platforms} and not exists $project{supported_platforms}{$pp}; - - print C "[Platform-$pp:Property]\n$buildroot\n"; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) { - print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n"; - } - print C "package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS\n"; - print C "$package_description$package_summary\n"; - } - - print C qq{ -[Platform-default:DynamicDependency] -}; - for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - my $edev = $project{etics_externs_devel}{$_}; - next if ($eext eq '-'); - - my $proj = 'externals'; - for my $p (keys %etics_projects) { - for $m (@{$etics_projects{$p}}) { - $proj = $p if $m eq $_; - } - } - - my $type = $need_externs_type{"$subsys.$module"}->{$_}; - - if ($edev) { - if ($type eq 'B') { - $eext = $edev; # no runtime - change to devel pkg - } elsif ($type eq 'BR' or $type eq 'RB') { - print C "$proj|$edev = B\n"; # additional devel pkg - } - } - print C "$proj|$eext = $type\n"; - } - - for (@{$deps{"$subsys.$module"}}) { - my $type = $deps_type{"$subsys.$module"}->{$_}; - print C "$project{etics_name}|$project{etics_name}.$_ = $type\n"; - } - - close C; -} - -sub gsoap_version { - local $_; - my $gsoap_version; - open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n"; - - while ($_ = ) { - chomp; - - $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/; - $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/; - } - close S; - return $gsoap_version; -} - -sub getlibdir { - if ( -e "/etc/debian_version") { # We are on Debian - $lib64="lib"; - $lib32="lib32"; } - else { # Another distribution - $lib64="lib64"; - $lib32="lib"; } - $libdir=$lib32; - - open INP, "uname -s | "; # Check kernel name - $kname= ; - chomp($kname); - close INP; - - if ( $kname eq "Linux") { - $arch = ("x86_64\npowerpc\nppc64\n"); - - open INP, "uname -p | "; # Check processor type - $procname= ; - chomp($procname); - close INP; - - if ($arch =~/^$procname\n/) { - return ($lib64); } - - open INP, "uname -m | "; # Check machine hardware - $machname= ; - chomp($machname); - close INP; - - if ($arch =~/^$machname\n/) { - return ($lib64); } - - # special cases (hyperlink lib64, Debian) - if (-l "/usr/lib64") { - $libdir=$lib32; } - - # if /usr/lib64 doesn't exist at all (AIX) - unless ( -e "/usr/lib64" ) { - $libdir=$lib32; } - } - - if ( $kname eq "SunOS") { - if (-e "/usr/lib/64") { - $libdir="lib/64"; } - } - - return $libdir; -} - -sub usage { - my @ext = keys %externs; - my @myjars = keys %jar; - - print STDERR qq{ -Usage: $0 options - -General options (defaults in []): - --prefix=PREFIX destination directory [./stage] - --stage=DIR staging directory [./stage] - --root=DIR installation root (custom relocation root -> sysroot) [./stage] - --sysroot=DIR system root (custom relocation root -> sysroot) [] - --sysconfdir=DIR system configuration directory [PREFIX/etc] - --staged=module,module,... what is already in PREFIX (specify without org.glite.) - --thrflavour=flavour - --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] - --listmodules=subsys list modules of a subsystem - --version=maj.min.rev-age specify version here instead of reading version.properties - --branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...) - --libdir=libdir typically [lib,lib64] postfix - --project=PROJECT build or generate etics for a project (glite/emi) [emi] - --debug print more details - -Mode of operation: - --mode=\{checkout|build|etics\} what to do [build] - -What to build: - --module=module build this module only - --enable-NODE build this "node" (set of modules) only - --disable-NODE don't build this node - --lb-tag=tag checkout LB modules with specific tag - --jp-tag=tag checkout JP modules with specific tag - --lbjp-common-tag=tag checkout lbjp-common modules with specific tag - --jobid-tag=tag checkout jobid modules with specific tag - -Dependencies (summary of what will be used is always printed): - --with-EXTERNAL=PATH where to look for an external [autodetect] - --with-JAR=JAR where to look for jars - -Available nodes: - @nodes - -Default nodes: - @default_nodes - -Externals (not all for all modules) are: - @ext - -External jars are: - @myjars - -}; - -} diff --git a/org.glite.jobid.api-cpp/interface/JobId.h b/org.glite.jobid.api-cpp/interface/JobId.h deleted file mode 100755 index 7c96993..0000000 --- a/org.glite.jobid.api-cpp/interface/JobId.h +++ /dev/null @@ -1,351 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -#ifndef GLITE_JOBID_JOBID_H -#define GLITE_JOBID_JOBID_H - -#include -#include -#include -#include -#include -#include - -#include "glite/jobid/cjobid.h" - - -namespace glite { -namespace jobid { - - -/** - * class glite::jobid::JobIdError - */ - -class JobIdError : public std::runtime_error { -public: - /** Constructor for mandatory fields. - * - * Updates all the mandatory fields and names the exception. - * \param[in] exception Error message describing the exception. - */ - JobIdError(std::string const& exception) - : std::runtime_error(std::string("JobId: bad argument (") + exception + ")") - {} - - virtual ~JobIdError() throw() - {} - -}; - - -/** - * class glite::jobid::JobId - */ - -class JobId -{ -public: - class Hostname { - public: - std::string const& name; - Hostname(std::string const& n) : name(n) - {} - }; - - //@name Constructors/Destructor - //@{ - - /** - * Constructor from string format. - * @param job_id_string - * @throws Exception When a string is passed in a wrong format - */ - JobId(std::string const& job_id_string); - - /** - * Constructor from job id components. - * \param host - * \param port - * \param unique - */ - explicit JobId(Hostname const& host = Hostname("localhost"), - int port = GLITE_JOBID_DEFAULT_PORT, - std::string const& unique = std::string("")); - - /** - * Destructor. - */ - ~JobId(); - - //@} - - //@ Conversions, assignments, comparisons - //@{ - - /** - * Copy constructor. - */ - JobId(JobId const&); - - /** - * Constructor from C jobid. - * \param src C API job id - */ - explicit JobId(glite_jobid_const_t src); - - /** - * Assignment operator. - * Create a deep copy of the JobId instance. - */ - JobId& operator=(JobId const& src); - - /** - * Casting operator. - */ - glite_jobid_const_t c_jobid() const; - - /** - * Returns the string representing the job id - * @return String representation of a JobId - */ - std::string toString() const; - - - /** - * Comparison given by lexicographical ordering of string representations. - * @return Result of comparison. - */ - int operator< (const JobId &j) const; - //@} - - - /**@name Member access - * @{ - */ - - /** - * Get server:port. - * @return hostname and port - */ - std::string server() const; - - /** - * Get host. - * @return hostname - */ - std::string host() const; - - /** - * Get port. - * @return port - */ - int port() const; - - /** - * Get unique. - * @return unique string - */ - std::string unique() const; - - //@} - -private: - glite_jobid_t m_jobid; -}; - - - -// -------------------- implementation ------------------------ - -inline -JobId::JobId(std::string const& job_id_string) -{ - int ret = glite_jobid_parse(job_id_string.c_str(), - &m_jobid); - switch(ret) { - case EINVAL: - throw JobIdError(job_id_string); - - case ENOMEM: - throw std::bad_alloc(); - - default: - break; - } -} - - -inline -JobId::JobId(JobId::Hostname const& host, int port, std::string const& unique) -{ - if(port < 0) { - throw JobIdError("negative port"); - } - - int ret = glite_jobid_recreate(host.name.c_str(), port, - unique.empty() ? NULL : unique.c_str(), - &m_jobid); - switch(ret) { - case EINVAL: - throw JobIdError(host.name); - - case ENOMEM: - throw std::bad_alloc(); - - default: - break; - } -} - - -inline -JobId::~JobId() { - glite_jobid_free(m_jobid); -} - - -inline -JobId::JobId(JobId const& src) -{ - int ret = glite_jobid_dup(src.m_jobid, - &m_jobid); - if(ret) { - // we rely on dup returning only ENOMEM on error - assert(ret == ENOMEM); - throw std::bad_alloc(); - } -} - - -inline -JobId::JobId(glite_jobid_const_t src) -{ - if(src == NULL) { - throw JobIdError("null"); - } - - int ret = glite_jobid_dup(src, - &m_jobid); - if(ret) { - throw std::bad_alloc(); - } -} - - -inline -JobId& -JobId::operator=(JobId const& src) -{ - if(this == &src) { - return *this; - } - - glite_jobid_free(m_jobid); - int ret = glite_jobid_dup(src.m_jobid, - &m_jobid); - if(ret) { - throw std::bad_alloc(); - } - return *this; -} - - -inline -glite_jobid_const_t -JobId::c_jobid() const -{ - return m_jobid; -} - - -inline -std::string -JobId::toString() const -{ - char *out = glite_jobid_unparse(m_jobid); - std::string res(out); - - free(out); - return res; -} - - -inline -int -JobId::operator< (const JobId &j) const -{ - std::string me(toString()); - std::string js(j.toString()); - - return(me < js); -} - - -inline -std::string -JobId::server() const -{ - char *server = glite_jobid_getServer(m_jobid); - std::string res(server); - - free(server); - return res; -} - - -inline -std::string -JobId::host() const -{ - char *name; - unsigned int port; - - glite_jobid_getServerParts_internal(m_jobid, - &name, &port); - return std::string(name); -} - - -inline -int -JobId::port() const -{ - char *name; - unsigned int port; - - glite_jobid_getServerParts_internal(m_jobid, - &name, &port); - return port; -} - - -inline -std::string -JobId::unique() const -{ - char *unique = glite_jobid_getUnique_internal(m_jobid); - std::string res(unique); - - return res; -} - - -} // namespace jobid -} // namespace glite - -#endif // GLITE_JOBID_JOBID_H diff --git a/org.glite.jobid.api-cpp/project/ChangeLog b/org.glite.jobid.api-cpp/project/ChangeLog deleted file mode 100644 index a1099cf..0000000 --- a/org.glite.jobid.api-cpp/project/ChangeLog +++ /dev/null @@ -1,58 +0,0 @@ -1.0.0-1 -- initial release - -1.0.0-2 -- fixes in etics' invocation of configure - -1.0.0-4 -- configure script update -- compatibility with g++ 4.3.2 - -1.0.0-5 -- module rebuilt - -1.0.0-6 -- module rebuilt - -1.0.1-1 -- Fixed target 'clean' in the Makefile - -1.0.1-2 -- Module rebuilt - -1.0.1-3 -- Module rebuilt - -1.1.0-1 -- Fixes for parallel release in EMI & gLite - -1.1.0-2 -- Module rebuilt - -1.1.1-1 -- Root directory option (ETICS performs own files relocation) -- Prefix option as prefix inside stage -- Sysconfdir option (for /etc vs /usr) -- DESTDIR in makefiles - -1.1.2-1 -- Relocatable build directory. - -1.1.2-2 -- Module rebuilt - -1.1.2-3 -- Module rebuilt - -1.1.2-4 -- Module rebuilt - -1.1.2-5 -- Module rebuilt - -1.1.2-6 -- Module rebuilt - -1.1.3-1 -- experiments with staging in summary Makefile in etics-less build - diff --git a/org.glite.jobid.api-cpp/project/package.description b/org.glite.jobid.api-cpp/project/package.description deleted file mode 100644 index e140a25..0000000 --- a/org.glite.jobid.api-cpp/project/package.description +++ /dev/null @@ -1 +0,0 @@ -C++ API handling gLite jobid. It is a thin wrapper of the C implementation (glite-jobid-api-c). diff --git a/org.glite.jobid.api-cpp/project/package.summary b/org.glite.jobid.api-cpp/project/package.summary deleted file mode 100644 index e73220a..0000000 --- a/org.glite.jobid.api-cpp/project/package.summary +++ /dev/null @@ -1 +0,0 @@ -C++ API handling gLite jobid diff --git a/org.glite.jobid.api-cpp/project/version.properties b/org.glite.jobid.api-cpp/project/version.properties deleted file mode 100644 index 01957f0..0000000 --- a/org.glite.jobid.api-cpp/project/version.properties +++ /dev/null @@ -1,3 +0,0 @@ -# : /cvs/glite/org.glite.jobid.api-cpp/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $ -module.version=1.1.3 -module.age=1 diff --git a/org.glite.jobid.api-java/Makefile b/org.glite.jobid.api-java/Makefile deleted file mode 100644 index 77bde52..0000000 --- a/org.glite.jobid.api-java/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -top_srcdir=. -stagedir=../stage - --include Makefile.inc - -ANT_ARGS=-f ${top_srcdir}/build.xml -Dfile.reference.commons-codec.jar=${jakarta-commons-codec_jar} -Dsrc.dir=${top_srcdir}/src -Dbuild.dir=$(shell pwd)/build -Ddist.dir=$(shell pwd)/dist - -all compile: - ${ant_prefix}/bin/ant ${ANT_ARGS} - -stage: - $(MAKE) install PREFIX=${stagedir} - -install: - mkdir -p ${DESTDIR}${PREFIX}${prefix}/share/java - cp dist/jobid-api-java.jar ${DESTDIR}${PREFIX}${prefix}/share/java - -check: - -clean: - ${ant_prefix}/bin/ant ${ANT_ARGS} clean - rm -rvf log.xml rpmbuild/ RPMS/ tgz/ debian/ - -.PHONY: all compile stage install check clean diff --git a/org.glite.jobid.api-java/build.xml b/org.glite.jobid.api-java/build.xml deleted file mode 100755 index 90e26a7..0000000 --- a/org.glite.jobid.api-java/build.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Builds, tests, and runs the project jobid-api-java. - - - diff --git a/org.glite.jobid.api-java/configure b/org.glite.jobid.api-java/configure deleted file mode 100755 index e2b3330..0000000 --- a/org.glite.jobid.api-java/configure +++ /dev/null @@ -1,1400 +0,0 @@ -#!/usr/bin/perl - -# WARNING: Don't edit this file unless it is the master copy in org.glite.lb -# -# For the purpose of standalone builds of lb/jobid/lbjp-common components -# it is copied on tagging - -# $Header$ -# -# Copyright (c) Members of the EGEE Collaboration. 2004-2010. -# See http://www.eu-egee.org/partners/ for details on the copyright holders. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -use Getopt::Long; - -my $pwd = `pwd`; chomp $pwd; -my $prefix = '/usr'; -my $stagedir = undef; -my $root = $pwd.'/stage'; -my $sysroot = ''; -my $sysconfdir; -my $localstatedir; -my $staged; -my $module; -my $thrflavour = 'gcc64dbgpthr'; -my $nothrflavour = 'gcc64dbg'; -my $mode = 'build'; -my $help = 0; -my $listmodules; -my $version; -my $branch; -my $output; -my $lb_tag = ''; -my $lbjp_tag = ''; -my $jp_tag = ''; -my $jobid_tag = ''; -my $libdir = getlibdir(); -my $project = 'glite'; -my (%projects, %project); -my $debug = 0; -my $pkg_config_env = (defined $ENV{PKG_CONFIG_PATH}) ? "$ENV{PKG_CONFIG_PATH}:" : ''; - -my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; -my @default_nodes = qw/lb px proxyrenewal/; -my %enable_nodes; -my %disable_nodes; -my %default_nodes; @default_nodes{@default_nodes} = (1) x ($#default_nodes + 1); - -# key: internal package name (arguments, ...) -# 'pkg': pkg-config name -# 'prefix': used when pkg-config fails -my %externs = ( - cares => { - prefix => '/opt/c-ares', - pkg => 'libcares' - }, - classads => { - prefix=> '/usr', - pkg => 'classads' - }, - cppunit => { - prefix=> '/usr', - pkg => 'cppunit' - }, - expat => { - prefix=> '/usr', - pkg => 'expat' - }, - globus => { - prefix=> '/opt/globus', - pkg => 'globus-gssapi-gsi' - }, - 'myproxy-devel' => { - prefix=> '/opt/globus', - pkg => 'myproxy' - }, - 'myproxy-server' => { - prefix=> '', - }, - 'myproxy-libs' => { - prefix=> '', - }, - 'myproxy-admin' => { - prefix=> '', - }, - gsoap => { - prefix=> '/usr', - pkg => 'gsoap' - }, - gsoapxx => { - prefix=> '/usr', - pkg => 'gsoap++' - }, - mysql => { - prefix=> '/usr' - }, - 'mysql-devel' => { - prefix=> '' - }, - 'mysql-server' => { - prefix => '' - }, - voms => { - prefix => '/opt/glite', - pkg => 'voms-2.0' - }, - gridsite => { - prefix => '/opt/glite' - }, - lcas => { - prefix => '/opt/glite', - pkg => 'lcas' - }, - trustmanager => { - prefix => '/opt/glite' - }, - trustmanager_axis => { - prefix => '/opt/glite' - }, - utiljava => { - prefix=> '/opt/glite' - }, - ant => { - prefix=> '/usr' - }, - jdk => { - prefix=> '/usr/java/latest' - }, - libtar => { - prefix=> '/usr' - }, - axis => { - prefix=> '/usr' - }, - log4c => { - prefix=> '/usr' - }, - postgresql => { - prefix=> '/usr' - }, - activemq => { - prefix=>'/opt/activemq-cpp-library', - pkg => 'activemq-cpp' - }, - apr => { - prefix=>'/opt/apr', - pkg => 'apr-1' - }, - aprutil => { - prefix=>'/opt/apr-util', - pkg => 'apr-util-1' - }, -); - -my %jar = ( - 'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar', - 'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar', -); - - -my %glite_prefix; -my %need_externs; -my %need_externs_type; -my %need_jars; -my %extrafull; -my %extranodmod; -my %deps; -my %deps_type; -my %buildroot; -my (%etics_externs, %etics_projects); - -# -# modules of the subsystems -# -# additional modules from $project{modules} are automatically added -# -my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim logger-msg/], - 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/], - 'jobid' => [qw/api-c api-cpp api-java/], - 'jp' => [ qw/client doc index primary server-common ws-interface/ ], - 'gridsite' => [ qw/apache shared commands core devel slashgrid services service-clients gsexec/ ], - 'px' => [ qw/proxyrenewal myproxy-yaim/ ], - ); - - -my @opts = ( - 'prefix:s' => \$prefix, - 'staged=s' => \$staged, - 'module=s' => \$module, - 'thrflavour:s' => \$thrflavour, - 'nothrflavour:s' => \$nothrflavour, - 'mode=s' => \$mode, - 'listmodules=s' => \$listmodules, - 'version=s' => \$version, - 'branch=s' => \$branch, - 'output=s' => \$output, - 'stage=s' => \$stagedir, - 'root:s' => \$root, - 'sysroot:s' => \$sysroot, - 'sysconfdir=s' => \$sysconfdir, - 'localstatedir=s' => \$localstatedir, - 'lb-tag=s' => \$lb_tag, - 'lbjp-common-tag=s' => \$lbjp_tag, - 'jp-tag=s' => \$jp_tag, - 'jobid-tag=s' => \$jobid_tag, - 'help' => \$help, - 'libdir=s' => \$libdir, - 'project=s' => \$project, - 'debug' => \$debug, -); - -for (@nodes) { - $enable_nodes{$_} = 0; - $disable_nodes{$_} = 0; - - push @opts,"disable-$_",\$disable_nodes{$_}; - push @opts,"enable-$_",\$enable_nodes{$_}; -} - -push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs; -push @opts,"with-$_=s",\$jar{$_} for keys %jar; - -my @keeparg = @ARGV; - -GetOptions @opts or die "Errors parsing command line\n"; -$prefix=~s/\/$//; -$root=~s/\/$//; -$sysroot=~s/\/$//; -if (not $sysconfdir) { $sysconfdir = $prefix eq '/usr' ? '/etc' : "$prefix/etc"; } -if (not $localstatedir) { $localstatedir = $prefix eq '/usr' ? '/var' : "$prefix/var"; } -$sysconfdir=~s/\/$//; -$localstatedir=~s/\/$//; - -$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq ''; -$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq ''; -$externs{'gsoapxx'}{prefix}=$externs{gsoap}{prefix} if $externs{'gsoapxx'}{prefix} eq ''; - -$externs{'mysql-server'}{withprefix}=$externs{mysql}{withprefix} if $externs{'mysql-server'}{withprefix} eq ''; -$externs{'mysql-devel'}{wihtprefix}=$externs{mysql}{withprefix} if $externs{'mysql-devel'}{withprefix} eq ''; -$externs{'gsoapxx'}{withprefix}=$externs{gsoap}{withprefix} if $externs{'gsoapxx'}{withprefix} eq ''; - -%project = %{$projects{$project}}; -for $_ (keys %{$project{etics_externs}}) { - $etics_externs{$_} = $project{etics_externs}{$_}; -} -for $_ (keys %{$project{etics_projects}}) { - $etics_projects{$_} = $project{etics_projects}{$_}; -} -for $_ (keys %{$project{need_externs_aux}}) { - $need_externs_aux{$_} = $project{need_externs_aux}{$_}; -} -for my $ext (keys %need_externs_aux) { - for (@{$need_externs_aux{$ext}}) { - my ($pkg, $type) =/([^:]*)(?::(.*))?/; - $type = 'BR' unless ($type); - - push @{$need_externs{$ext}},$pkg; - $need_externs_type{$ext}->{$pkg} = $type; - } -} -for $_ (keys %{$project{modules}}) { - push @{$lbmodules{$_}},@{$project{modules}{$_}}; -} - - -if ($help) { usage(); exit 0; } - -if ($listmodules) { - my $name_prefix = ($listmodules eq 'gridsite' and $project eq 'glite') ? 'org' : $project{etics_name}; - my @m = map "$name_prefix.$listmodules.$_",@{$lbmodules{$listmodules}}; - print "@m\n"; - exit 0; -} - -warn "$0: --version, --branch and --output make sense only in --mode=etics\n" - if ($version || $output || $branch) && $mode ne 'etics'; - -my $en; -for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } - -my $dis; -for (keys %disable_nodes) { $dis = 1 if $disable_nodes{$_}; } - -die "--enable-* and --disable-* are mutually exclusive\n" - if $en && $dis; - -die "--module cannot be used with --enable-* or --disable-*\n" - if $module && ($en || $dis); - -die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}}; - -if ($dis) { - for (@nodes) { - $enable_nodes{$_} = 1 unless ($disable_nodes{$_} or not $default_nodes{$_}); - } -} - -if (!$en && !$dis) { for (@nodes) { $enable_nodes{$_} = 1 if ($default_nodes{$_}) } }; - -for (keys %enable_nodes) { delete $enable_nodes{$_} unless $enable_nodes{$_}; } - -$stagedir = $root unless $stagedir; -$stagedir=~s/\/$// if ($stagedir); - -if ($mode eq 'build') { for my $ext (keys %externs) { - if (defined $externs{$ext} and defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; } - elsif (defined $externs{$ext}{pkg}) { - my ($flag, $env, $cmd, $ret); - my $pkg = $externs{$ext}{pkg}; - my $flagname = uc $externs{$ext}{pkg}; - $flagname =~ s/-[0-9\.]*$//; - $flagname =~ y/-\+/_X/; - - print "Checking $pkg ... "; - $env = "PKG_CONFIG_PATH=$pkg_config_env$stagedir$prefix/$libdir/pkgconfig"; - $cmd = "$env pkg-config $pkg --exists >/dev/null"; - `$cmd`; $ret = $?; - print "('$cmd' => $ret)\n" if ($debug); - if ($ret == 0) { - $externs{$ext}{prefix}=`$env pkg-config $pkg --variable=prefix`; - chomp $externs{$ext}{prefix}; - print "$externs{$ext}{prefix}\n"; - - $flag=`$env pkg-config $pkg --cflags`; - $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag); - $flag=`$env pkg-config $pkg --libs`; - $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag); - } else { - print "(using default $externs{$ext}{prefix})\n"; - } - print "\n" if ($debug); - } - elsif ($ext eq 'jdk') { - my $jdk_prefix; - - print "Looking for some caffein ... "; - if (defined $ENV{'JDK_HOME'}) { - $jdk_prefix = $ENV{'JDK_HOME'}; - print "JDK_HOME=$jdk_prefix\n"; - } elsif (defined $ENV{'JAVA_HOME'}) { - $jdk_prefix = $ENV{'JAVA_HOME'}; - print "JAVA_HOME=$jdk_prefix\n"; - } else { - print "(using default $externs{$ext}{prefix}))\n" - } - $externs{$ext}{prefix} = $jdk_prefix if ($jdk_prefix); - } -} } - -if ($mode eq 'build') { - print "Writing config.status\n"; - open CONF,">config.status" or die "config.status: $!\n"; - for ('JDK_HOME', 'JAVA_HOME', 'PKG_CONFIG_PATH') { - print CONF "$_=$ENV{$_} " if (defined $ENV{$_}); - } - print CONF "$0 @keeparg\n"; - close CONF; -} - - -my @modules; -my %aux; - -if ($module) { -# push @modules,split(/[,.]+/,$module); - push @modules,$module; -} -else { - @modules = map(($extranodmod{$_} ? $extranodmod{$_} : 'lb.'.$_),(keys %enable_nodes)); - - my $n; - - do { - local $"="\n"; - $n = $#modules; - push @modules,(map @{$deps{$_}},@modules); - - undef %aux; @aux{@modules} = (1) x ($#modules+1); - @modules = keys %aux; - } while ($#modules > $n); -} - -@aux{@modules} = (1) x ($#modules+1); -delete $aux{$_} for (split /,/,$staged); -@modules = keys %aux; - -mode_build() if $mode eq 'build'; -mode_checkout() if $mode eq 'checkout'; -mode_etics($module) if $mode eq 'etics'; - -sub mode_build { - print "\nBuilding modules: @modules\n"; - print "Mode: "; print $module ? "single module" : "multiple modules"; print "\n"; - - my @ext = map @{$need_externs{$_}},@modules; - my @myjars = map @{$need_jars{$_}},@modules; - undef %aux; @aux{@ext} = 1; - @ext = keys %aux; - undef %aux; @aux{@myjars} = (1) x ($#myjars+1); - @myjars = keys %aux; - - print "\nRequired externals:\n"; - print "\t$_: ".($externs{$_}{prefix}?$externs{$_}{prefix}:'-')."\n" for @ext; - print "\t$_: $jar{$_}\n" for @myjars; - for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } }; - print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n"; - - mkinc($_) for @modules; - - if ($module) { - print "Not creating summary Makefile\n" if $debug; - } else { - print "Creating Makefile\n"; - - open MAK,">Makefile" or die "Makefile: $!\n"; - - print MAK "all: @modules\n\n"; - print MAK "stage: ".(join '-stage ', @modules)."-stage\n\n"; - print MAK "clean check install:\n"; - - for (@modules) { - my $full = full($_); - print MAK "\tcd $full/$buildroot{$_} && \${MAKE} \$@\n" - } - - print MAK "\ndistclean:\n"; - - for (@modules) { - my $full = full($_); - print MAK $buildroot{$_} eq '' ? - "\tcd $full && \${MAKE} distclean\n" : - "\trm -rf $full/$buildroot{$_}\n" - } - - print MAK "\n"; - - for (@modules) { - my %ldeps; undef %ldeps; - @ldeps{@{$deps{$_}}} = 1; - for my $x (split /,/,$staged) { delete $ldeps{$x}; } - my @dnames = $module ? () : keys %ldeps; - my $snames = $#dnames == -1 ? '' : join('-stage ', @dnames).'-stage'; - - my $full = full($_); - my $build = $buildroot{$_}; - - print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n"; - print MAK "$_-stage: $snames\n\tcd $full/$build && \${MAKE} && \${MAKE} stage\n\n"; - } - - close MAK; - } -} - -sub mode_checkout() { - for (@modules) { - my $module = $_; - my $tag = ""; - if ($lb_tag){ - for (@{$lbmodules{lb}}){ - if ("lb.".$_ eq $module){ - $tag = '-r '.$lb_tag; - } - } - } - if ($lbjp_tag){ - for (@{$lbmodules{'lbjp-common'}}){ - if ("lbjp-common.".$_ eq $module){ - $tag = '-r '.$lbjp_tag; - } - } - } - if ($jp_tag){ - for (@{$lbmodules{'jp'}}){ - if ("jp.".$_ eq $module){ - $tag = '-r '.$jp_tag; - } - } - } - if ($jobid_tag){ - for (@{$lbmodules{jobid}}){ - if ("jobid.".$_ eq $module){ - $tag = '-r '.$jobid_tag; - } - } - } - #if (grep {"lb.".$_ eq $module} @{$lbmodules{lb}}){ - # print "found"; - #} - $_ = full($_); - print "\n*** Checking out $_\n"; - system("cvs checkout $tag $_") == 0 or die "cvs checkout $tag $_: $?\n"; - } -} - -BEGIN{ -%etics_externs = ( - 'myproxy-devel'=>'myproxy-devel', - 'myproxy-libs'=>'myproxy-libs', - 'myproxy-server'=>'myproxy-server', - 'myproxy-admin'=>'myproxy-admin', - cares=>'c-ares', - voms=>'org.glite.security.voms-api-cpp', - utiljava=>'org.glite.security.util-java', - gpt=>'gpt', - fetchcrl=>'fetch-crl', - activemq=>'activemq-cpp-library', - apr=>'apr-dev', - aprutil=>'aprutil-dev', -); - -%etics_projects = ( -); - -%need_externs_aux = ( - 'lb.client' => [ qw/cppunit:B classads libtool:B/ ], - 'lb.common' => [ qw/expat cares:B cppunit:B classads libtool:B/ ], - 'lb.doc' => [ qw/tetex-latex:B/ ], - 'lb.logger' => [ qw/cppunit:B libtool:B/ ], - 'lb.logger-msg' => [ qw/cppunit:B activemq libtool:B/ ], - 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite bison:B libtool:B libxml2 flex:B/ ], - 'lb.state-machine' => [ qw/classads libtool:B libxslt:B expat:B/ ], - 'lb.utils' => [ qw/cppunit:B libtool:B/ ], - 'lb.ws-interface' => [ qw/libxslt:B/ ], - 'lb.ws-test' => [ qw/gsoap:B libtool:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/docbook-utils:B libtool:B/ ], - 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.log' => [ qw/log4c libtool:B/ ], - 'lbjp-common.maildir' => [ qw/libtool:B/ ], - 'lbjp-common.server-bones' => [ qw/libtool:B/ ], - 'lbjp-common.trio' => [ qw/cppunit:B libtool:B/ ], - 'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B libtool:B/ ], - 'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap gsoapxx libtool:B/ ], - 'jobid.api-c' => [ qw/cppunit:B libtool:B openssl:B/ ], - 'jobid.api-cpp' => [ qw/cppunit:B libtool:B/ ], - 'jobid.api-java' => [ qw/ant:B jdk:B/ ], - 'jp.client' => [ qw/gsoap libtar globus_essentials:R globus:B/ ], - 'jp.doc' => [], - 'jp.index' => [ qw/gsoap globus_essentials:R globus:B/ ], - 'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ], - 'jp.server-common' => [], - 'jp.ws-interface' => [], - 'gridsite.core' => [ qw/httpd-devel:B gsoap:B globus:B curl:B doxygen:B fuse-devel:B libxml2 openssl:B build_common_cpp:B doxygen:B/ ], - 'gridsite.commands' => [ qw/curl:R openssl:R/ ], - 'gridsite.apache' => [ qw/libxml2:R openssl:R curl:R/ ], - 'gridsite.shared' => [ qw/libxml2:R openssl:R/ ], - 'gridsite.devel' => [ qw// ], - 'gridsite.slashgrid' => [ qw/curl:R fuse-libs:R fuse:R/], - 'gridsite.services' => [ qw/curl:R gsoap:R/ ], - 'gridsite.service-clients' => [ qw/curl:R gsoap:R gsoapxx:R/ ], - 'gridsite.gsexec' => [ qw// ], - 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-devel:B myproxy-libs:R voms libtool:B/ ], - 'px.myproxy-config' => [ qw/myproxy-admin:R/ ], # in myproxy-config.spec -); - -%need_jars = ( - 'jobid.api-java' => [ qw/jakarta-commons-codec/ ], - 'lb.client-java' => [ qw/jakarta-commons-lang/ ], -); - -for my $jar (keys %need_jars) { - for (@{$need_jars{$jar}}) { - $need_externs_type{$jar}->{$_} = 'BR'; # XXX - } -} - -%deps_aux = ( - 'lb.client' => [ qw/ - lb.types:B lb.common - lbjp-common.trio - jobid.api-cpp:B jobid.api-c - lbjp-common.gss - / ], - 'lb.client-java' => [ qw/ - lb.types:B - lb.ws-interface:B - jobid.api-java - / ], - 'lb.common' => [ qw/ - jobid.api-cpp:B jobid.api-c - lb.types:B lbjp-common.trio lbjp-common.gss - / ], - 'lb.doc' => [ qw/lb.types:B/ ], - 'lb.logger' => [ qw/ - lbjp-common.trio - lbjp-common.log - jobid.api-c - lb.common - lbjp-common.gss - / ], - 'lb.logger-msg' => [ qw/ - lb.logger - / ], - 'lb.server' => [ qw/ - lb.ws-interface lb.types:B lb.common lb.state-machine - lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log - jobid.api-c - lbjp-common.gsoap-plugin lbjp-common.gss - / ], - 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ], - 'lb.utils' => [ qw/ - lbjp-common.jp-interface - jobid.api-c - lbjp-common.trio lbjp-common.maildir - lb.client lb.state-machine lb.types:B - / ], - 'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ], - 'lb.ws-interface' => [ qw/lb.types:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/ - jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client - lbjp-common.gss lbjp-common.log - / ], - 'lb.yaim' => [ qw// ], - 'lb.glite-LB' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lb.emi-lb' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ], - 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.log' => [ qw// ], - 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], - 'lbjp-common.trio' => [ qw// ], - 'lbjp-common.gss' => [ qw// ], - 'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ], - 'jobid.api-c' => [ qw// ], - 'jobid.api-cpp' => [ qw/jobid.api-c/ ], - 'jobid.api-java' => [ qw// ], - - 'lbjp-common.jp-interface' => [ qw/lbjp-common.db jobid.api-c/ ], - - 'jp.client' => [ qw/ - jp.ws-interface - lbjp-common.jp-interface lbjp-common.maildir - jobid.api-c - lbjp-common.gsoap-plugin - / ], - 'jp.doc' => [ qw// ], - 'jp.index' => [ qw/ - jp.server-common jp.ws-interface - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.primary' => [ qw/ - jobid.api-c - jp.server-common jp.ws-interface - lb.state-machine - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.server-common' => [ qw/ - lbjp-common.jp-interface lbjp-common.db - / ], - 'jp.ws-interface' => [ qw// ], - - 'gridsite.core' => [ qw// ], - 'gridsite.commands' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.apache' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.shared' => [ qw/gridsite.core:B / ], - 'gridsite.devel' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.slashgrid' => [ qw/gridsite.core:B gridsite.shared:R/], - 'gridsite.services' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.service-clients' => [ qw/gridsite.core:B gridsite.shared:R/ ], - 'gridsite.gsexec' => [ qw/gridsite.core:B/ ], - - 'px.proxyrenewal' => [ qw// ], - 'px.glite-PX' => [qw/px.myproxy-yaim:R/], - 'px.emi-px' => [qw/px.myproxy-yaim:R/], - 'px.myproxy-yaim' => [ qw// ], - 'px.myproxy-config' => [], -); - -for my $ext (keys %deps_aux) { - for (@{$deps_aux{$ext}}) { - /([^:]*)(?::(.*))?/; - push @{$deps{$ext}},$1; - my $type = $2 ? $2 : 'BR'; - $deps_type{$ext}->{$1} = $type; - } -} - - -%extrafull = ( gridsite=>'org.gridsite.core'); - -#( java => 'client-java' ); -%extranodmod = ( - db => 'lbjp-common.db', - jpprimary => 'jp.primary', - jpindex => 'jp.index', - jpclient => 'jp.client', - lb => 'lb.glite-LB', - px => 'px.glite-PX', - proxyrenewal => 'px.proxyrenewal' -); - -%obsoletes = ( - 'lb.yaim' => [ qq/glite-yaim-lb/ ], - 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ], - 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ], - 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%conflicts = ( -); - -%provides = ( - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], -); - -%cvs_prefix = ( - 'lb' => 'org.glite', - 'jp' => 'org.glite', - 'jobid' => 'org.glite', - 'lbjp-common' => 'org.glite', - 'gridsite' => 'org', - 'px' => 'org.glite', -); - -%cvs_tag_prefix = ( - 'lb' => 'glite-', - 'jp' => 'glite-', - 'jobid' => 'glite-', - 'lbjp-common' => 'glite-', - 'gridsite' => '', - 'px' => 'glite-', -); - -# ==== projects specification ==== -# etics_name ........... ETICS project name -# conf_prefix .......... ETICS configurations name prefix -# tag_prefix ........... VCS tag prefix -# local_prefix ......... prefix (relative to stage) -# etics_externs ........ ETICS modules names of externals -# (${NAME.location}, ETICS conf. dependencies) -# etics_projects ....... ETICS project names of externals -# etics_externs_devel .. ETICS modules names of devel versions of externals -# need_externs_aux ..... project-specific external dependencies -# supported_platforms .. platforms supported by the project -# modules .............. additional modules in subsystems -%projects = ( - glite => { - etics_name => 'org.glite', - conf_prefix => { %cvs_tag_prefix }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour=${globus.thr.flavor} --nothrflavour=${globus.nothr.flavor}', - local_prefix => '', - etics_externs => { - globus_essentials=>'vdt_globus_essentials', - globus=>'globus', - gridsite=>'org.gridsite.shared', - yaim_core=>'org.glite.yaim.core', - gip_release=>'glite-info-provider-release', - gip_service=>'glite-info-provider-service', - bdii=>'bdii', - glite_version=>'glite-version', - glite_info_templates=>'glite-info-templates', - glue_schema=>'glue-schema', - trustmanager=>'org.glite.security.trustmanager', - axis=>'axis', - lcas=>'org.glite.security.lcas', - gsoapxx=>'-', - build_common_cpp=>'org.glite.build.common-cpp', - }, - etics_externs_devel => { - gridsite=>'org.gridsite.devel', - }, - etics_projects => { - vdt=>[qw/globus globus_essentials gpt/], - 'org.glite'=>[qw/voms gridsite lcas gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager utiljava libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R/ ], - }, - modules => { - 'lb' => [ qw/glite-LB/ ], - 'px' => [ qw/glite-PX/ ], - } - }, - - emi => { - etics_name => 'emi', - conf_prefix => { - 'lb' => 'emi-', - 'jp' => 'emi-', - 'jobid' => 'emi-', - 'lbjp-common' => 'emi-', - 'gridsite' => '', - 'px' => 'emi-', - }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour= --nothrflavour=', - local_prefix => '/usr', - etics_externs => { - globus_essentials=>'globus-gssapi-gsi', - globus=>'globus-gssapi-gsi-devel', - gridsite=>'emi.gridsite.shared', - yaim_core=>'emi.yaim.yaim-core', - yaim_bdii=>'emi.bdii.yaim-bdii', - gip_service=>'emi.bdii.glite-info-provider-service', - bdii=>'emi.bdii.core', - glite_version=>'emi.misc.glite-version', - glue_schema=>'emi.bdii.glue-schema', - trustmanager=>'emi.java-security.trustmanager', - trustmanager_axis=>'emi.java-security.trustmanager-axis', - axis=>'axis1.4', - lcas=>'emi.sac.lcas', - gsoapxx=>'-', - build_common_cpp=>'emi.misc.glite.build-common-cpp', - jdk=>'java', - }, - etics_externs_devel => { - cares => 'c-ares-devel', - classads => 'classads-devel', - cppunit => 'cppunit-devel', - expat => 'expat-devel', - gsoap => 'gsoap-devel', - voms => 'org.glite.security.voms-api', - libtar => 'libtar-devel', - log4c => 'log4c-devel', - postgresql => 'postgresql-devel', - curl => 'curl-devel', - libxml2 => 'libxml2-devel', - openssl => 'openssl-devel', - gridsite=>'emi.gridsite.devel', - jdk=>'java-devel', - }, - etics_projects => { - 'emi'=>[qw/voms voms-devel gridsite lcas gip_service bdii glite_version glue_schema yaim_core yaim_bdii trustmanager trustmanager_axis/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager trustmanager_axis libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R yaim_bdii:R perl-LDAP:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R yaim_bdii:R/ ], - }, - supported_platforms => { - sl5_x86_64_gcc412EPEL => 1, - sl5_ia32_gcc412EPEL => 1, - }, - modules => { - 'lb' => [ qw/emi-lb/ ], - 'px' => [ qw/emi-px/ ], - } - }, -); - -%platform_properties = ( - 'gridsite.core' => { - sl5_x86_64_gcc412 => { aprSuffix => '1' }, - sl5_ia32_gcc412 => { aprSuffix => '1' }, - sl5_x86_64_gcc412EPEL => { aprSuffix => '1' }, - sl5_ia32_gcc412EPEL => { aprSuffix => '1' }, - deb5_x86_64_gcc432 => { aprSuffix => '1.0' }, - deb5_ia32_gcc432 => { aprSuffix => '1.0' }, - slc4_x86_64_gcc346 => { aprSuffix => '0' }, - slc4_ia32_gcc346 => { aprSuffix => '0' }, - default => { - } - }, - 'jobid.api-java' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.types' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.doc' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.ws-interface' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.myproxy-config' => { - default => { 'package.buildarch' => 'noarch' }, - }, -); - -my @k = keys %deps_aux; -@buildroot{@k} = ('') x ($#k+1); - -$buildroot{'gridsite.core'} = 'src'; -} - -sub full -{ - my $short = shift; - return $extrafull{$short} ? $extrafull{$short} : 'org.glite.'.$short; -} - -sub mkinc -{ - my %aux; - undef %aux; - my @m=qw/ -lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB -lbjp-common.gss lbjp-common.gsoap-plugin -jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin -jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface -px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config -/; - @aux{@m} = (1) x ($#m+1); - - my $short = shift; - my $full = full $short; - - unless ($aux{$short}) { - print "Makefile.inc not needed in $full\n"; - return; - } - - my $top_srcdir = '.'; - my $build = ''; - - if ($module) { - $top_srcdir = $0; - $top_srcdir =~ s,/?[^/]*$,,; - $top_srcdir =~ s,^$,\.,; - } else { - $build = "$full/"; - unless ($buildroot{$_} eq '') { - $top_srcdir = '..'; - $build .= "$buildroot{$_}/"; - unless (-d "$build") { - mkdir "$build" or die "mkdir $build: $!\n"; - } - } - } - unless ($top_srcdir eq '.') { - unlink $build."Makefile"; - symlink "$top_srcdir/Makefile",$build."Makefile" or die "symlink $top_srcdir/Makefile ".$build."Makefile: $!\n"; - for my $file ('.pre', '.post', '.preun', '.postun changelog') { - my $pfile = "project/$file"; - if (-f "$full/$pfile") { - mkdir "$build/project" unless (-d "$build/project"); - unlink $build.$pfile; - symlink "../$top_srcdir/$pfile", $build.$pfile or die "symlink ../$top_srcdir/$pfile ".$build."$pfile: $!\n"; - } - } - } - - open MKINC,">".$build."Makefile.inc" - or die $build."Makefile.inc: $!\n"; - - print "Creating ".$build."Makefile.inc\n"; - - print MKINC qq{project = $project -PREFIX = $root -prefix = $prefix -stagedir = $stagedir -sysroot = $sysroot -sysconfdir = $sysconfdir -localstatedir = $localstatedir -thrflavour = $thrflavour -nothrflavour = $nothrflavour -libdir = $libdir -top_srcdir = $top_srcdir -}; - - for (@{$need_externs{$short}}) { - next unless defined $externs{$_} and defined $externs{$_}{prefix}; - print MKINC "${_}_prefix = $externs{$_}{prefix}\n"; - print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags}; - } - - for (@{$need_jars{$short}}) { - print MKINC "${_}_jar = $jar{$_}\n" - } - - my $need_gsoap = 0; - for (@{$need_externs{$short}}) { $need_gsoap = 1 if $_ eq 'gsoap'; } - - print MKINC "gsoap_default_version=".gsoap_version()."\n" if $need_gsoap; - - close MKINC; -} - -BEGIN{ -}; - -sub mode_etics { - $fmod = shift; - - die "$0: --module required with --etics\n" unless $fmod; - - my ($subsys,$module) = split /\./,$fmod; - - my ($major,$minor,$rev,$age); - - if ($version) { - $version =~ /([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-(.+)/; - ($major,$minor,$rev,$age) = ($1,$2,$3,$4); - } - else { - my $path = "$cvs_prefix{$subsys}.$subsys.$module/project"; - if ($subsys eq 'gridsite') { - $path = "$cvs_prefix{$subsys}.$subsys.core/project"; - } - open V,"$path/version.properties" - or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n"; - - while ($_ = ) { - chomp; - ($major,$minor,$rev) = ($1,$2,$3) if /module\.version\s*=\s*([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/; - $age = $1 if /module\.age\s*=\s*([[:digit:]]+)/; - } - close V; - } - - my @copts = (); - my %ge; - @ge{@{$etics_projects{$project{etics_name}}}} = (1) x ($#{$etics_projects{$project{etics_name}}}+1); - - for (@{$need_externs{"$subsys.$module"}}) { - if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/ and (defined $externs{$_} or defined $jar{$_})) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - next if ($eext eq '-'); - if ($project ne 'glite') { - if ($ge{$_} and not defined $externs{$_}{pkg}) { - push @copts, "--with-$_=\${stageDir}"; - } - } else { - push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; - } - } - } - - for (@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - - push @copts,"--with-$_ \${$eext.location}$jar{$_}" if ($project eq 'glite'); - } - - my $conf; - my $conftag; - my ($confprefix, $nameprefix); - - $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; - - $confprefix = $project{conf_prefix}{$subsys}; - $nameprefix = $confprefix; - $nameprefix =~ s/-$//; - $nameprefix =~ s/-/\./g; - - if ($branch) { - $conf = "$confprefix${subsys}-${module}_$branch"; - $conftag = $branch; - # forced low age number - $age = $branch eq 'HEAD' ? '0head' : '0dev'; } - else { - $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; - -# XXX: gridsite hack - $conftag = $subsys eq 'gridsite' ? "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : - "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; } - - my $file = $output ? $output : "$conf.ini"; - open C,">$file" or die "$file: $!\n"; - - my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"}; - - my $confdir = $buildroot{"$subsys.$module"} eq '' ? '.' : '..'; - - my $package_description = ""; - my $package_summary = ""; - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description"; - $package_description = join ("", ); - close V; - chomp $package_description; - $package_description =~ s/\n/\\n/g; - $package_description = "package.description = $package_description\n"; - } - else { - print STDERR "package.description not found for $subsys.$module!\n"; } - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary"; - $package_summary = join ("", ); - close V; - chomp $package_summary; - $package_summary =~ s/\n/\\n/g; - $package_summary = "package.summary = $package_summary\n"; - } - else { - print STDERR "package.summary not found for $subsys.$module!\n"; } - - my %cmd; - @cmd{qw/configure compile test install packaging clean/} = ('None') x 6; - $cmd{clean} = 'make clean'; - $cmd{checkout} = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null"; - #$cmd{checkout} = "(test -d jra1mw/.git && (cd jra1mw; git pull) || git clone http://scientific.zcu.cz/git/jra1mw.git)"; - #$cmd{checkout} .= " && (cd jra1mw; git checkout \${tag})" unless ($conftag =~ /HEAD/); - #$cmd{checkout} .= " && ln -s jra1mw/$cvs_prefix{$subsys}.$subsys.$module \${moduleName}"; - $cmd{tag} = "cvs -d \${vcsroot} tag -R \${tag} ${moduleName}"; - - if ($subsys eq 'gridsite') { - $cmd{tag} = 'None'; - - if ($module eq 'core') { - my ($flags, $prefix); - - if ($project ne 'glite') { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"'; - $prefix = 'prefix=${prefix}/usr'; - } else { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"'; - $prefix = 'prefix=${prefix}'; - } - - $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build"; - $cmd{clean} = "rm -rvf build.sh; $cmd{clean}"; - $cmd{install} = "make $prefix $flags install"; - $cmd{packaging} = "mkdir \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz - make $prefix $flags rpm && \ - cp \${moduleDir}/RPMTMP/SOURCES/gridsite-\${version}.src.tar.gz \${moduleDir}/src/tgz"; - } - else { - $cmd{clean} = 'None'; - $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this"; - $cmd{checkout} = "mkdir -v \${moduleName} 2>/dev/null || true"; - } - } - elsif ($subsys eq 'px' and $module eq 'myproxy-config') { - $cmd{configure} = "/usr/bin/perl $confdir/configure --root=\${prefix} --prefix= --stage=\${stageDir} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config"; - } - else { - $cmd{configure} = "/usr/bin/perl $confdir/configure $project{flavours} --root=\${prefix} --prefix=$project{local_prefix} --stage=\${stageDir} --sysroot=\${package.prefix} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{compile} = 'make'; - $cmd{test} = 'make check'; - $cmd{install} = 'make install'; - } - - my $defprops = ''; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) { - $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n"; - } - - print STDERR "Writing $file\n"; - print C qq{ -[Configuration-$conf] -profile = None -moduleName = $project{etics_name}.$subsys.$module -displayName = $conf -description = $cvs_prefix{$subsys}.$subsys.$module -projectName = $project{etics_name} -age = $age -deploymentType = None -vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite -tag = $conftag -version = $major.$minor.$rev -$dwpath -[Platform-default:VcsCommand] -displayName = None -description = None -tag = $cmd{tag} -branch = None -commit = None -checkout = $cmd{checkout} - -[Platform-default:BuildCommand] -postpublish = None -packaging = $cmd{packaging} -displayName = None -description = None -doc = None -prepublish = None -publish = None -compile = $cmd{compile} -init = None -install = $cmd{install} -clean = $cmd{clean} -test = $cmd{test} -configure = $cmd{configure} -checkstyle = None - -[Platform-default:Property] -$buildroot -aprSuffix = 0 -package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS -package.preserve.libtool = false -$package_description$package_summary$defprops}; - - for (@{$obsoletes{"$subsys.$module"}}) { - print C "package.obsoletes = $_\n"; - print C "package.replaces = $_\n"; - } - for (@{$conflicts{"$subsys.$module"}}) { - print C "package.conflicts = $_\n"; - } - for (@{$provides{"$subsys.$module"}}) { - print C "package.provides = $_\n"; - } - - for my $pp (keys %{$platform_properties{"$subsys.$module"}}) { - next if $pp eq 'default'; - next if exists $project{supported_platforms} and not exists $project{supported_platforms}{$pp}; - - print C "[Platform-$pp:Property]\n$buildroot\n"; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) { - print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n"; - } - print C "package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS\n"; - print C "$package_description$package_summary\n"; - } - - print C qq{ -[Platform-default:DynamicDependency] -}; - for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - my $edev = $project{etics_externs_devel}{$_}; - next if ($eext eq '-'); - - my $proj = 'externals'; - for my $p (keys %etics_projects) { - for $m (@{$etics_projects{$p}}) { - $proj = $p if $m eq $_; - } - } - - my $type = $need_externs_type{"$subsys.$module"}->{$_}; - - if ($edev) { - if ($type eq 'B') { - $eext = $edev; # no runtime - change to devel pkg - } elsif ($type eq 'BR' or $type eq 'RB') { - print C "$proj|$edev = B\n"; # additional devel pkg - } - } - print C "$proj|$eext = $type\n"; - } - - for (@{$deps{"$subsys.$module"}}) { - my $type = $deps_type{"$subsys.$module"}->{$_}; - print C "$project{etics_name}|$project{etics_name}.$_ = $type\n"; - } - - close C; -} - -sub gsoap_version { - local $_; - my $gsoap_version; - open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n"; - - while ($_ = ) { - chomp; - - $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/; - $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/; - } - close S; - return $gsoap_version; -} - -sub getlibdir { - if ( -e "/etc/debian_version") { # We are on Debian - $lib64="lib"; - $lib32="lib32"; } - else { # Another distribution - $lib64="lib64"; - $lib32="lib"; } - $libdir=$lib32; - - open INP, "uname -s | "; # Check kernel name - $kname= ; - chomp($kname); - close INP; - - if ( $kname eq "Linux") { - $arch = ("x86_64\npowerpc\nppc64\n"); - - open INP, "uname -p | "; # Check processor type - $procname= ; - chomp($procname); - close INP; - - if ($arch =~/^$procname\n/) { - return ($lib64); } - - open INP, "uname -m | "; # Check machine hardware - $machname= ; - chomp($machname); - close INP; - - if ($arch =~/^$machname\n/) { - return ($lib64); } - - # special cases (hyperlink lib64, Debian) - if (-l "/usr/lib64") { - $libdir=$lib32; } - - # if /usr/lib64 doesn't exist at all (AIX) - unless ( -e "/usr/lib64" ) { - $libdir=$lib32; } - } - - if ( $kname eq "SunOS") { - if (-e "/usr/lib/64") { - $libdir="lib/64"; } - } - - return $libdir; -} - -sub usage { - my @ext = keys %externs; - my @myjars = keys %jar; - - print STDERR qq{ -Usage: $0 options - -General options (defaults in []): - --prefix=PREFIX destination directory [./stage] - --stage=DIR staging directory [./stage] - --root=DIR installation root (custom relocation root -> sysroot) [./stage] - --sysroot=DIR system root (custom relocation root -> sysroot) [] - --sysconfdir=DIR system configuration directory [PREFIX/etc] - --staged=module,module,... what is already in PREFIX (specify without org.glite.) - --thrflavour=flavour - --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] - --listmodules=subsys list modules of a subsystem - --version=maj.min.rev-age specify version here instead of reading version.properties - --branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...) - --libdir=libdir typically [lib,lib64] postfix - --project=PROJECT build or generate etics for a project (glite/emi) [emi] - --debug print more details - -Mode of operation: - --mode=\{checkout|build|etics\} what to do [build] - -What to build: - --module=module build this module only - --enable-NODE build this "node" (set of modules) only - --disable-NODE don't build this node - --lb-tag=tag checkout LB modules with specific tag - --jp-tag=tag checkout JP modules with specific tag - --lbjp-common-tag=tag checkout lbjp-common modules with specific tag - --jobid-tag=tag checkout jobid modules with specific tag - -Dependencies (summary of what will be used is always printed): - --with-EXTERNAL=PATH where to look for an external [autodetect] - --with-JAR=JAR where to look for jars - -Available nodes: - @nodes - -Default nodes: - @default_nodes - -Externals (not all for all modules) are: - @ext - -External jars are: - @myjars - -}; - -} diff --git a/org.glite.jobid.api-java/nbproject/build-impl.xml b/org.glite.jobid.api-java/nbproject/build-impl.xml deleted file mode 100755 index 7e87743..0000000 --- a/org.glite.jobid.api-java/nbproject/build-impl.xml +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - diff --git a/org.glite.jobid.api-java/nbproject/genfiles.properties b/org.glite.jobid.api-java/nbproject/genfiles.properties deleted file mode 100755 index bb605a8..0000000 --- a/org.glite.jobid.api-java/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=dbd878b7 -build.xml.script.CRC32=3fb96f09 -build.xml.stylesheet.CRC32=be360661 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=dbd878b7 -nbproject/build-impl.xml.script.CRC32=02cb42d1 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 diff --git a/org.glite.jobid.api-java/nbproject/private/config.properties b/org.glite.jobid.api-java/nbproject/private/config.properties deleted file mode 100644 index e69de29..0000000 diff --git a/org.glite.jobid.api-java/nbproject/private/private.properties b/org.glite.jobid.api-java/nbproject/private/private.properties deleted file mode 100755 index b6aa80e..0000000 --- a/org.glite.jobid.api-java/nbproject/private/private.properties +++ /dev/null @@ -1,6 +0,0 @@ -do.depend=false -do.jar=true -javac.debug=true -javadoc.preview=true -jaxws.endorsed.dir=/home/pavel/netbeans-6.0.1/java1/modules/ext/jaxws21/api -user.properties.file=/home/pavel/.netbeans/6.0/build.properties diff --git a/org.glite.jobid.api-java/nbproject/private/private.xml b/org.glite.jobid.api-java/nbproject/private/private.xml deleted file mode 100644 index c1f155a..0000000 --- a/org.glite.jobid.api-java/nbproject/private/private.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/org.glite.jobid.api-java/nbproject/project.properties b/org.glite.jobid.api-java/nbproject/project.properties deleted file mode 100755 index 7b4b8be..0000000 --- a/org.glite.jobid.api-java/nbproject/project.properties +++ /dev/null @@ -1,63 +0,0 @@ -application.title=jobid-api-java -application.vendor=xpiskac -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/jobid-api-java.jar -dist.javadoc.dir=${dist.dir}/javadoc -excludes= -# file.reference.commons-codec-1.3.jar=/home/etics/repository/externals/commons-codec/1.3.0/noarch/ -includes=** -jar.compress=false -jar.index=true -javac.classpath=\ - ${file.reference.commons-codec.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.source= -javac.target= -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=org.glite.test.Test -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test -javac.compilerargs.jaxws= diff --git a/org.glite.jobid.api-java/nbproject/project.xml b/org.glite.jobid.api-java/nbproject/project.xml deleted file mode 100755 index 0db31a3..0000000 --- a/org.glite.jobid.api-java/nbproject/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - jobid-api-java - 1.6.5 - - - - - - - - - - diff --git a/org.glite.jobid.api-java/project/ChangeLog b/org.glite.jobid.api-java/project/ChangeLog deleted file mode 100644 index 72a3fde..0000000 --- a/org.glite.jobid.api-java/project/ChangeLog +++ /dev/null @@ -1,45 +0,0 @@ -1.0.1-1 -- Initial release of the api-java module - -1.0.2-1 -- Fixed target 'clean' in the Makefile - -1.0.3-1 -- Target 'clean' fixed to handle debian builds as well - -1.0.3-2 -- Module rebuilt - -1.0.4-1 -- Makefile using external modules jakarta-commons-* - -1.1.0-1 -- Fixes for parallel release in EMI & gLite - -1.1.0-2 -- Module rebuilt - -1.1.1-1 -- DESTDIR in makefiles - -1.1.2-1 -- Building JAR file indexes - -1.1.3-1 -- Relocatable build directory. - -1.1.3-2 -- Module rebuilt - -1.1.3-3 -- Module rebuilt - -1.1.3-4 -- Module rebuilt - -1.1.3-5 -- Module rebuilt - -1.1.3-6 -- Module rebuilt - diff --git a/org.glite.jobid.api-java/project/package.description b/org.glite.jobid.api-java/project/package.description deleted file mode 100644 index 860d7dd..0000000 --- a/org.glite.jobid.api-java/project/package.description +++ /dev/null @@ -1 +0,0 @@ -JAVA implementation of handling gLite jobid diff --git a/org.glite.jobid.api-java/project/package.summary b/org.glite.jobid.api-java/project/package.summary deleted file mode 100644 index 860d7dd..0000000 --- a/org.glite.jobid.api-java/project/package.summary +++ /dev/null @@ -1 +0,0 @@ -JAVA implementation of handling gLite jobid diff --git a/org.glite.jobid.api-java/project/version.properties b/org.glite.jobid.api-java/project/version.properties deleted file mode 100644 index 4ed0652..0000000 --- a/org.glite.jobid.api-java/project/version.properties +++ /dev/null @@ -1,3 +0,0 @@ -# : /cvs/glite/org.glite.jobid.api-java/project/version.properties,v 1.5 2009/01/20 17:25:13 akrenek Exp $ -module.version=1.1.3 -module.age=6 diff --git a/org.glite.jobid.api-java/src/org/glite/jobid/ExampleJobid.java b/org.glite.jobid.api-java/src/org/glite/jobid/ExampleJobid.java deleted file mode 100644 index 2f061b9..0000000 --- a/org.glite.jobid.api-java/src/org/glite/jobid/ExampleJobid.java +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package org.glite.jobid; - -/** - * This class shows how Jobid works and how to work with it. - * @author Pavel Piskac - */ -public class ExampleJobid { - - public static void main(String[] args) { - //how Jobid class works - //unique part is automatically generated - Jobid jobid1 = new Jobid("https://somewhere.cz", 5000); - System.out.println("bkserver "+ jobid1.getBkserver()); - System.out.println("port "+ jobid1.getPort()); - System.out.println("unique "+ jobid1.getUnique()); - System.out.println("-------------------"); - - //unique part is set by user - Jobid jobid2 = new Jobid("https://somewhere.cz", 5000, "my_unique_part"); - System.out.println("bkserver "+ jobid2.getBkserver()); - System.out.println("port "+ jobid2.getPort()); - System.out.println("unique "+ jobid2.getUnique()); - System.out.println("-------------------"); - - //whole jobid is set by user and then parsed - Jobid jobid3 = new Jobid("https://somewhere.cz:5000/my_unique_part"); - System.out.println("bkserver "+ jobid3.getBkserver()); - System.out.println("port "+ jobid3.getPort()); - System.out.println("unique "+ jobid3.getUnique()); - System.out.println("-------------------"); - - //each part is set separately - Jobid jobid4 = new Jobid(); - jobid4.setBkserver("https://somewhere.cz"); - jobid4.setPort(5000); - jobid4.setUnique("my_unique_part"); - System.out.println("bkserver "+ jobid4.getBkserver()); - System.out.println("port "+ jobid4.getPort()); - System.out.println("unique "+ jobid4.getUnique()); - System.out.println("-------------------"); - } - -} diff --git a/org.glite.jobid.api-java/src/org/glite/jobid/Jobid.java b/org.glite.jobid.api-java/src/org/glite/jobid/Jobid.java deleted file mode 100644 index 840f661..0000000 --- a/org.glite.jobid.api-java/src/org/glite/jobid/Jobid.java +++ /dev/null @@ -1,245 +0,0 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package org.glite.jobid; - -import java.net.UnknownHostException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Calendar; -import java.util.Random; -//import org.apache.commons.codec.binary.Base64; -import org.apache.commons.codec.binary.Base64; - -/** - * Class representing jobId - * - * @author Pavel Piskac (173297@mail.muni.cz) - * @version 15. 3. 2008 - */ -public class Jobid { - - String unique; - String bkserver; - int port; - - /** - * Creates new instance of Jobid class. - */ - public Jobid() { - } - - /** - * Creates new instace of JobId with BK server address and port number, unique part - * is generated. If some exception is catched during generating the unique part, then - * System.exit(-1); is called. - * - * @param bkserver BK server address - * @param port BK server port - * @throws java.land.IllegalArgumentException if bkserver is null - * @throws java.lang.IllegalArgumentException if port is lower than 1 or - * bigger than 65535 - */ - - public Jobid(String bkserver, int port) { - if (bkserver == null) { - throw new IllegalArgumentException("Jobid bkserver"); - } - - if (port < 1 || port > 65535) { - throw new IllegalArgumentException("Jobid port"); - } - - if (bkserver.indexOf("https://") == -1) - this.bkserver = "https://" + bkserver; - else this.bkserver = bkserver; - - this.port = port; - - MessageDigest digest = null; - - try { - String hostname = ""; - try { - hostname = java.net.InetAddress.getLocalHost().getHostName(); - } catch (UnknownHostException ex) { - System.err.println(ex); - } - - digest = java.security.MessageDigest.getInstance("MD5"); - unique = hostname + bkserver + port + Calendar.getInstance().getTimeInMillis() + - new Random().nextInt(999999); - - digest.update(unique.getBytes(),0,unique.length()); - Base64 base64 = new Base64(); - byte[] tmp = base64.encode(digest.digest()); - unique = new String(tmp, 0, tmp.length-2); - unique = unique.replaceAll("/", "_"); - unique = unique.replaceAll("\\+", "-"); - } catch (NoSuchAlgorithmException ex) { - System.err.println(ex); - System.exit(-1); - } - } - - /** - * Creates new instace of Jobid with BK server address, port number and - * unique part as parameters. - * - * @param bkserver BK server address - * @param port BK server port - * @param unique unique part of jobid - * @throws java.lang.IllegalArgumentException if bkserver is null - * @throws java.lang.IllegalArgumentException if port is lower than 1 or - * bigger than 65535 - * @throws java.lang.IllegalArgumentException if unique is null - */ - public Jobid(String bkserver, int port, String unique) { - if (bkserver == null) { - throw new IllegalArgumentException("Jobid bkserver"); - } - - if (port < 1 || port > 65535) { - throw new IllegalArgumentException("Jobid port"); - } - - if (unique == null) { - throw new IllegalArgumentException("Jobid unique"); - } - - if (bkserver.indexOf("https://") == -1) - this.bkserver = "https://" + bkserver; - else this.bkserver = bkserver; - - this.port = port; - this.unique = unique; - } - - /** - * Creates new instace of Jobid from string which represents jobid - * - * @param jobidString jobid string representation - * @throws java.lang.IllegalArgumentException if jobidString is null - */ - public Jobid(String jobidString) { - if (jobidString == null) { - throw new IllegalArgumentException("Jobid jobidString"); - } - - int doubleSlashPosition = jobidString.indexOf("https://"); - if (doubleSlashPosition == -1) { - throw new IllegalArgumentException("wrong jobid https"); - } - - int colonPosition = jobidString.indexOf(":", doubleSlashPosition + 8); - if (colonPosition == -1) { - throw new IllegalArgumentException("wrong jobid colon"); - } - - int dashAfterPort = jobidString.indexOf("/", colonPosition); - String bkserverS = jobidString.substring(0, colonPosition); - Integer portS = new Integer(jobidString.substring(colonPosition+1, - dashAfterPort)); - String uniqueS = jobidString.substring(dashAfterPort+1, jobidString.length()); - - this.bkserver = bkserverS; - this.port = portS.intValue(); - this.unique = uniqueS; - } - - /** - * Returns BK server address - * - * @return bkserver BK server address - */ - public String getBkserver() { - return bkserver; - } - - /** - * Sets BK server address - * - * @param bkserver BK server address - * @throws java.lang.IllegalArgumentException if bkserver is null - */ - public void setBkserver(String bkserver) { - - if (bkserver == null) { - throw new IllegalArgumentException("Jobid bkserver"); - } - - this.bkserver = bkserver; - } - - /** - * Returns unique part of jobId - * - * @return unique part of jobId - */ - public String getUnique() { - return unique; - } - - /** - * Sets unique part of jobId - * - * @param unique - * @throws java.lang.IllegalArgumentException if unique is null - */ - public void setUnique(String unique) { - - if (unique == null) { - throw new IllegalArgumentException("Jobid unique"); - } - - this.unique = unique; - } - - /** - * Returns port number - * - * @return port number - */ - public int getPort() { - return port; - } - - /** - * Sets port number - * - * @param port number - * @throws java.lang.IllegalArgumentException if port is lower than 0 or - * bigger than 65535 - */ - public void setPort(int port) { - - if (port <= 0 || port >= 65536) { - throw new IllegalArgumentException("Jobid port"); - } - - this.port = port; - } - - /** - * Returns Jobid string representation in format bkserver:port/unique - * - * @return Jobid string representation in format bkserver:port/unique - */ - public String toString() { - return bkserver + ":" + port + "/" + unique; - } -} diff --git a/org.glite.jobid/project/version.properties b/org.glite.jobid/project/version.properties deleted file mode 100644 index f7d88ed..0000000 --- a/org.glite.jobid/project/version.properties +++ /dev/null @@ -1,3 +0,0 @@ -# : /cvs/jra1mw/org.glite.jobid.api-c/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $ -module.version=2.0.4 -module.age=1 diff --git a/org.glite.lb.glite-LB/Makefile b/org.glite.lb.glite-LB/Makefile deleted file mode 100644 index 13a1e41..0000000 --- a/org.glite.lb.glite-LB/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -top_srcdir=.. -stagedir=. -package=glite-lb-yaim -version=0.0.0 -PREFIX=/opt/glite -prefix= - --include Makefile.inc --include ${top_srcdir}/project/version.properties - -default all: - -install: - -stage: - $(MAKE) install PREFIX=${stagedir} - -check: - -clean: - rm -rvf log.xml rpmbuild/ RPMS/ tgz/ debian/ - -.PHONY: default all check install stage clean diff --git a/org.glite.lb.glite-LB/configure b/org.glite.lb.glite-LB/configure deleted file mode 100755 index 96cd3e0..0000000 --- a/org.glite.lb.glite-LB/configure +++ /dev/null @@ -1,1353 +0,0 @@ -#!/usr/bin/perl - -# WARNING: Don't edit this file unless it is the master copy in org.glite.lb -# -# For the purpose of standalone builds of lb/jobid/lbjp-common components -# it is copied on tagging - -# $Header$ -# -# Copyright (c) Members of the EGEE Collaboration. 2004-2010. -# See http://www.eu-egee.org/partners/ for details on the copyright holders. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -use Getopt::Long; - -my $pwd = `pwd`; chomp $pwd; -my $prefix = '/usr'; -my $stagedir = undef; -my $root = $pwd.'/stage'; -my $sysroot = ''; -my $sysconfdir; -my $localstatedir; -my $staged; -my $module; -my $thrflavour = 'gcc64dbgpthr'; -my $nothrflavour = 'gcc64dbg'; -my $mode = 'build'; -my $help = 0; -my $listmodules; -my $version; -my $branch; -my $output; -my $lb_tag = ''; -my $lbjp_tag = ''; -my $jp_tag = ''; -my $jobid_tag = ''; -my $libdir = getlibdir(); -my $project = 'glite'; -my (%projects, %project); -my $debug = 0; -my $pkg_config_env = (defined $ENV{PKG_CONFIG_PATH}) ? "$ENV{PKG_CONFIG_PATH}:" : ''; - -my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; -my @default_nodes = qw/lb px proxyrenewal/; -my %enable_nodes; -my %disable_nodes; -my %default_nodes; @default_nodes{@default_nodes} = (1) x ($#default_nodes + 1); - -# key: internal package name (arguments, ...) -# 'pkg': pkg-config name -# 'prefix': used when pkg-config fails -my %externs = ( - cares => { - prefix => '/opt/c-ares', - pkg => 'libcares' - }, - classads => { - prefix=> '/usr', - pkg => 'classads' - }, - cppunit => { - prefix=> '/usr', - pkg => 'cppunit' - }, - expat => { - prefix=> '/usr', - pkg => 'expat' - }, - globus => { - prefix=> '/opt/globus', - pkg => 'globus-gssapi-gsi' - }, - 'myproxy-devel' => { - prefix=> '/opt/globus', - pkg => 'myproxy' - }, - 'myproxy-server' => { - prefix=> '', - }, - 'myproxy-libs' => { - prefix=> '', - }, - 'myproxy-admin' => { - prefix=> '', - }, - gsoap => { - prefix=> '/usr', - pkg => 'gsoap' - }, - gsoapxx => { - prefix=> '/usr', - pkg => 'gsoap++' - }, - mysql => { - prefix=> '/usr' - }, - 'mysql-devel' => { - prefix=> '' - }, - 'mysql-server' => { - prefix => '' - }, - voms => { - prefix => '/opt/glite', - pkg => 'voms-2.0' - }, - gridsite => { - prefix => '/opt/glite' - }, - lcas => { - prefix => '/opt/glite', - pkg => 'lcas' - }, - trustmanager => { - prefix => '/opt/glite' - }, - trustmanager_axis => { - prefix => '/opt/glite' - }, - utiljava => { - prefix=> '/opt/glite' - }, - ant => { - prefix=> '/usr' - }, - jdk => { - prefix=> '/usr/java/latest' - }, - libtar => { - prefix=> '/usr' - }, - axis => { - prefix=> '/usr' - }, - log4c => { - prefix=> '/usr' - }, - postgresql => { - prefix=> '/usr' - }, - activemq => { - prefix=>'/opt/activemq-cpp-library', - pkg => 'activemq-cpp' - }, - apr => { - prefix=>'/opt/apr', - pkg => 'apr-1' - }, - aprutil => { - prefix=>'/opt/apr-util', - pkg => 'apr-util-1' - }, -); - -my %jar = ( - 'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar', - 'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar', -); - - -my %glite_prefix; -my %need_externs; -my %need_externs_type; -my %need_jars; -my %extrafull; -my %extranodmod; -my %deps; -my %deps_type; -my %buildroot; -my (%etics_externs, %etics_projects); - -my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/], - 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/], - 'jobid' => [qw/api-c api-cpp api-java/], - 'jp' => [ qw/client doc index primary server-common ws-interface/ ], - 'gridsite' => [ qw/apache shared commands core devel slashgrid services service-clients gsexec/ ], - 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim/ ], - ); - - -my @opts = ( - 'prefix:s' => \$prefix, - 'staged=s' => \$staged, - 'module=s' => \$module, - 'thrflavour:s' => \$thrflavour, - 'nothrflavour:s' => \$nothrflavour, - 'mode=s' => \$mode, - 'listmodules=s' => \$listmodules, - 'version=s' => \$version, - 'branch=s' => \$branch, - 'output=s' => \$output, - 'stage=s' => \$stagedir, - 'root:s' => \$root, - 'sysroot:s' => \$sysroot, - 'sysconfdir=s' => \$sysconfdir, - 'localstatedir=s' => \$localstatedir, - 'lb-tag=s' => \$lb_tag, - 'lbjp-common-tag=s' => \$lbjp_tag, - 'jp-tag=s' => \$jp_tag, - 'jobid-tag=s' => \$jobid_tag, - 'help' => \$help, - 'libdir=s' => \$libdir, - 'project=s' => \$project, - 'debug' => \$debug, -); - -for (@nodes) { - $enable_nodes{$_} = 0; - $disable_nodes{$_} = 0; - - push @opts,"disable-$_",\$disable_nodes{$_}; - push @opts,"enable-$_",\$enable_nodes{$_}; -} - -push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs; -push @opts,"with-$_=s",\$jar{$_} for keys %jar; - -my @keeparg = @ARGV; - -GetOptions @opts or die "Errors parsing command line\n"; -$prefix=~s/\/$//; -$stagedir=~s/\/$// if ($stagedir); -$root=~s/\/$//; -$sysroot=~s/\/$//; -if (not $sysconfdir) { $sysconfdir = $prefix eq '/usr' ? '/etc' : "$prefix/etc"; } -if (not $localstatedir) { $localstatedir = $prefix eq '/usr' ? '/var' : "$prefix/var"; } -$sysconfdir=~s/\/$//; -$localstatedir=~s/\/$//; - -$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq ''; -$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq ''; -$externs{'gsoapxx'}{prefix}=$externs{gsoap}{prefix} if $externs{'gsoapxx'}{prefix} eq ''; - -%project = %{$projects{$project}}; -for $_ (keys %{$project{etics_externs}}) { - $etics_externs{$_} = $project{etics_externs}{$_}; -} -for $_ (keys %{$project{etics_projects}}) { - $etics_projects{$_} = $project{etics_projects}{$_}; -} -for $_ (keys %{$project{need_externs_aux}}) { - $need_externs_aux{$_} = $project{need_externs_aux}{$_}; -} -for my $ext (keys %need_externs_aux) { - for (@{$need_externs_aux{$ext}}) { - my ($pkg, $type) =/([^:]*)(?::(.*))?/; - $type = 'BR' unless ($type); - - push @{$need_externs{$ext}},$pkg; - $need_externs_type{$ext}->{$pkg} = $type; - } -} - - -if ($help) { usage(); exit 0; } - -if ($listmodules) { - my $name_prefix = ($listmodules eq 'gridsite' and $project eq 'glite') ? 'org' : $project{etics_name}; - my @m = map "$name_prefix.$listmodules.$_",@{$lbmodules{$listmodules}}; - print "@m\n"; - exit 0; -} - -warn "$0: --version, --branch and --output make sense only in --mode=etics\n" - if ($version || $output || $branch) && $mode ne 'etics'; - -my $en; -for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } - -my $dis; -for (keys %disable_nodes) { $dis = 1 if $disable_nodes{$_}; } - -die "--enable-* and --disable-* are mutually exclusive\n" - if $en && $dis; - -die "--module cannot be used with --enable-* or --disable-*\n" - if $module && ($en || $dis); - -die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}}; - -if ($dis) { - for (@nodes) { - $enable_nodes{$_} = 1 unless ($disable_nodes{$_} or not $default_nodes{$_}); - } -} - -if (!$en && !$dis) { for (@nodes) { $enable_nodes{$_} = 1 if ($default_nodes{$_}) } }; - -for (keys %enable_nodes) { delete $enable_nodes{$_} unless $enable_nodes{$_}; } - -$stagedir = $root unless $stagedir; - -if ($mode eq 'build') { for my $ext (keys %externs) { - if (defined $externs{$ext} and defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; } - elsif (defined $externs{$ext}{pkg}) { - my ($flag, $env, $cmd, $ret); - my $pkg = $externs{$ext}{pkg}; - my $flagname = uc $externs{$ext}{pkg}; - $flagname =~ s/-[0-9\.]*$//; - $flagname =~ y/-\+/_X/; - - print "Checking $pkg ... "; - $env = "PKG_CONFIG_PATH=$pkg_config_env$stagedir$prefix/$libdir/pkgconfig"; - $cmd = "$env pkg-config $pkg --exists >/dev/null"; - `$cmd`; $ret = $?; - print "('$cmd' => $ret)\n" if ($debug); - if ($ret == 0) { - $externs{$ext}{prefix}=`$env pkg-config $pkg --variable=prefix`; - chomp $externs{$ext}{prefix}; - print "$externs{$ext}{prefix}\n"; - - $flag=`$env pkg-config $pkg --cflags`; - $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag); - $flag=`$env pkg-config $pkg --libs`; - $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag); - } else { - print "(using default $externs{$ext}{prefix})\n"; - } - print "\n" if ($debug); - } - elsif ($ext eq 'jdk') { - my $jdk_prefix; - - print "Looking for some caffein ... "; - if (defined $ENV{'JDK_HOME'}) { - $jdk_prefix = $ENV{'JDK_HOME'}; - print "JDK_HOME=$jdk_prefix\n"; - } elsif (defined $ENV{'JAVA_HOME'}) { - $jdk_prefix = $ENV{'JAVA_HOME'}; - print "JAVA_HOME=$jdk_prefix\n"; - } else { - print "(using default $externs{$ext}{prefix}))\n" - } - $externs{$ext}{prefix} = $jdk_prefix if ($jdk_prefix); - } -} } - -if ($mode eq 'build') { - print "Writing config.status\n"; - open CONF,">config.status" or die "config.status: $!\n"; - for ('JDK_HOME', 'JAVA_HOME', 'PKG_CONFIG_PATH') { - print CONF "$_=$ENV{$_} " if (defined $ENV{$_}); - } - print CONF "$0 @keeparg\n"; - close CONF; -} - - -my @modules; -my %aux; - -if ($module) { -# push @modules,split(/[,.]+/,$module); - push @modules,$module; -} -else { - @modules = map(($extranodmod{$_} ? $extranodmod{$_} : 'lb.'.$_),(keys %enable_nodes)); - - my $n; - - do { - local $"="\n"; - $n = $#modules; - push @modules,(map @{$deps{$_}},@modules); - - undef %aux; @aux{@modules} = (1) x ($#modules+1); - @modules = keys %aux; - } while ($#modules > $n); -} - -@aux{@modules} = (1) x ($#modules+1); -delete $aux{$_} for (split /,/,$staged); -@modules = keys %aux; - -mode_build() if $mode eq 'build'; -mode_checkout() if $mode eq 'checkout'; -mode_etics($module) if $mode eq 'etics'; - -sub mode_build { - print "\nBuilding modules: @modules\n"; - print "Mode: "; print $module ? "single module" : "multiple modules"; print "\n"; - - my @ext = map @{$need_externs{$_}},@modules; - my @myjars = map @{$need_jars{$_}},@modules; - undef %aux; @aux{@ext} = 1; - @ext = keys %aux; - undef %aux; @aux{@myjars} = (1) x ($#myjars+1); - @myjars = keys %aux; - - print "\nRequired externals:\n"; - print "\t$_: ".($externs{$_}{prefix}?$externs{$_}{prefix}:'-')."\n" for @ext; - print "\t$_: $jar{$_}\n" for @myjars; - for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } }; - print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n"; - - mkinc($_) for @modules; - - if ($module) { - print "Not creating summary Makefile\n" if $debug; - } else { - print "Creating Makefile\n"; - - open MAK,">Makefile" or die "Makefile: $!\n"; - - print MAK "all: @modules\n\nclean check:\n"; - - for (@modules) { - my $full = full($_); - print MAK "\tcd $full/$buildroot{$_} && \${MAKE} \$@\n" - } - - print MAK "\ndistclean:\n"; - - for (@modules) { - my $full = full($_); - print MAK $buildroot{$_} eq '' ? - "\tcd $full && \${MAKE} distclean\n" : - "\trm -rf $full/$buildroot{$_}\n" - } - - print MAK "\n"; - - for (@modules) { - my %ldeps; undef %ldeps; - @ldeps{@{$deps{$_}}} = 1; - for my $x (split /,/,$staged) { delete $ldeps{$x}; } - my @dnames = $module ? () : keys %ldeps; - - my $full = full($_); - my $build = $buildroot{$_}; - - print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n"; - } - - close MAK; - } -} - -sub mode_checkout() { - for (@modules) { - my $module = $_; - my $tag = ""; - if ($lb_tag){ - for (@{$lbmodules{lb}}){ - if ("lb.".$_ eq $module){ - $tag = '-r '.$lb_tag; - } - } - } - if ($lbjp_tag){ - for (@{$lbmodules{'lbjp-common'}}){ - if ("lbjp-common.".$_ eq $module){ - $tag = '-r '.$lbjp_tag; - } - } - } - if ($jp_tag){ - for (@{$lbmodules{'jp'}}){ - if ("jp.".$_ eq $module){ - $tag = '-r '.$jp_tag; - } - } - } - if ($jobid_tag){ - for (@{$lbmodules{jobid}}){ - if ("jobid.".$_ eq $module){ - $tag = '-r '.$jobid_tag; - } - } - } - #if (grep {"lb.".$_ eq $module} @{$lbmodules{lb}}){ - # print "found"; - #} - $_ = full($_); - print "\n*** Checking out $_\n"; - system("cvs checkout $tag $_") == 0 or die "cvs checkout $tag $_: $?\n"; - } -} - -BEGIN{ -%etics_externs = ( - 'myproxy-devel'=>'myproxy-devel', - 'myproxy-libs'=>'myproxy-libs', - 'myproxy-server'=>'myproxy-server', - 'myproxy-admin'=>'myproxy-admin', - cares=>'c-ares', - voms=>'org.glite.security.voms-api-cpp', - utiljava=>'org.glite.security.util-java', - gpt=>'gpt', - fetchcrl=>'fetch-crl', - activemq=>'activemq-cpp-library', - apr=>'apr-dev', - aprutil=>'aprutil-dev', -); - -%etics_projects = ( -); - -%need_externs_aux = ( - 'lb.client' => [ qw/cppunit:B classads libtool:B/ ], - 'lb.common' => [ qw/expat cares:B cppunit:B classads libtool:B/ ], - 'lb.doc' => [ qw/tetex-latex:B/ ], - 'lb.logger' => [ qw/cppunit:B libtool:B/ ], - 'lb.logger-msg' => [ qw/cppunit:B activemq libtool:B/ ], - 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite bison:B libtool:B/ ], - 'lb.state-machine' => [ qw/classads libtool:B/ ], - 'lb.utils' => [ qw/cppunit:B libtool:B/ ], - 'lb.ws-interface' => [], - 'lb.ws-test' => [ qw/gsoap:B libtool:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/docbook-utils:B libtool:B/ ], - 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.log' => [ qw/log4c libtool:B/ ], - 'lbjp-common.maildir' => [ qw/libtool:B/ ], - 'lbjp-common.server-bones' => [ qw/libtool:B/ ], - 'lbjp-common.trio' => [ qw/cppunit:B libtool:B/ ], - 'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B libtool:B/ ], - 'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B libtool:B/ ], - 'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap gsoapxx libtool:B/ ], - 'jobid.api-c' => [ qw/cppunit:B libtool:B/ ], - 'jobid.api-cpp' => [ qw/cppunit:B/ ], - 'jobid.api-java' => [ qw/ant:B jdk:B/ ], - 'jp.client' => [ qw/gsoap libtar globus_essentials:R globus:B/ ], - 'jp.doc' => [], - 'jp.index' => [ qw/gsoap globus_essentials:R globus:B/ ], - 'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ], - 'jp.server-common' => [], - 'jp.ws-interface' => [], - 'gridsite.core' => [ qw/httpd-devel:B gsoap:B globus:B curl:B doxygen:B fuse-devel:B libxml2 openssl:B build_common_cpp:B doxygen:B/ ], - 'gridsite.commands' => [ qw/curl:R openssl:R/ ], - 'gridsite.apache' => [ qw/libxml2:R openssl:R curl:R/ ], - 'gridsite.shared' => [ qw/libxml2:R openssl:R/ ], - 'gridsite.devel' => [], - 'gridsite.slashgrid' => [ qw/curl:R fuse-libs:R fuse:R/], - 'gridsite.services' => [ qw/curl:R gsoap:R/ ], - 'gridsite.service-clients' => [ qw/curl:R gsoap:R gsoapxx:R/ ], - 'gridsite.gsexec' => [ qw// ], - 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-devel:B myproxy-libs:R voms libtool:R/ ], - 'px.myproxy-config' => [ qw/myproxy-admin:R/ ], # in myproxy-config.spec -); - -%need_jars = ( - 'jobid.api-java' => [ qw/jakarta-commons-codec/ ], - 'lb.client-java' => [ qw/jakarta-commons-lang/ ], -); - -for my $jar (keys %need_jars) { - for (@{$need_jars{$jar}}) { - $need_externs_type{$jar}->{$_} = 'BR'; # XXX - } -} - -%deps_aux = ( - 'lb.client' => [ qw/ - lb.types:B lb.common - lbjp-common.trio - jobid.api-cpp:B jobid.api-c - lbjp-common.gss - / ], - 'lb.client-java' => [ qw/ - lb.types:B - lb.ws-interface:B - jobid.api-java - / ], - 'lb.common' => [ qw/ - jobid.api-cpp:B jobid.api-c - lb.types:B lbjp-common.trio lbjp-common.gss - / ], - 'lb.doc' => [ qw/lb.types:B/ ], - 'lb.logger' => [ qw/ - lbjp-common.trio - lbjp-common.log - jobid.api-c - lb.common - lbjp-common.gss - / ], - 'lb.logger-msg' => [ qw/ - lb.logger - / ], - 'lb.server' => [ qw/ - lb.ws-interface lb.types:B lb.common lb.state-machine - lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log - jobid.api-c - lbjp-common.gsoap-plugin lbjp-common.gss - / ], - 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ], - 'lb.utils' => [ qw/ - lbjp-common.jp-interface - jobid.api-c - lbjp-common.trio lbjp-common.maildir - lb.client lb.state-machine - / ], - 'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ], - 'lb.ws-interface' => [ qw/lb.types:B/ ], - 'lb.types' => [ qw// ], - 'lb.harvester' => [ qw/ - jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client - lbjp-common.gss lbjp-common.log - / ], - 'lb.yaim' => [ qw// ], - 'lb.glite-LB' => [ qw/ - lb.logger:R lb.server:R lb.utils:R lb.doc:R - lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R - lb.logger-msg:R - / ], - 'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ], - 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.log' => [ qw// ], - 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], - 'lbjp-common.trio' => [ qw// ], - 'lbjp-common.gss' => [ qw// ], - 'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ], - 'jobid.api-c' => [ qw// ], - 'jobid.api-cpp' => [ qw/jobid.api-c/ ], - 'jobid.api-java' => [ qw// ], - - 'lbjp-common.jp-interface' => [ qw/lbjp-common.db jobid.api-c/ ], - - 'jp.client' => [ qw/ - jp.ws-interface - lbjp-common.jp-interface lbjp-common.maildir - jobid.api-c - lbjp-common.gsoap-plugin - / ], - 'jp.doc' => [ qw// ], - 'jp.index' => [ qw/ - jp.server-common jp.ws-interface - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.primary' => [ qw/ - jobid.api-c - jp.server-common jp.ws-interface - lb.state-machine - lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones - lbjp-common.gsoap-plugin - / ], - 'jp.server-common' => [ qw/ - lbjp-common.jp-interface lbjp-common.db - / ], - 'jp.ws-interface' => [ qw// ], - - 'gridsite.core' => [ qw// ], - 'gridsite.commands' => [ qw/gridsite.shared:R/ ], - 'gridsite.apache' => [ qw/gridsite.shared:R/ ], - 'gridsite.shared' => [ qw// ], - 'gridsite.devel' => [ qw/gridsite.shared:R/ ], - 'gridsite.slashgrid' => [ qw/gridsite.shared:R/], - 'gridsite.services' => [ qw/gridsite.shared:R/ ], - 'gridsite.service-clients' => [ qw/gridsite.shared:R/ ], - 'gridsite.gsexec' => [ qw// ], - - 'px.proxyrenewal' => [ qw// ], - 'px.glite-PX' => [qw/px.myproxy-yaim:R/], - 'px.myproxy-yaim' => [ qw// ], - 'px.myproxy-config' => [], -); - -for my $ext (keys %deps_aux) { - for (@{$deps_aux{$ext}}) { - /([^:]*)(?::(.*))?/; - push @{$deps{$ext}},$1; - my $type = $2 ? $2 : 'BR'; - $deps_type{$ext}->{$1} = $type; - } -} - - -%extrafull = ( gridsite=>'org.gridsite.core'); - -#( java => 'client-java' ); -%extranodmod = ( - db => 'lbjp-common.db', - jpprimary => 'jp.primary', - jpindex => 'jp.index', - jpclient => 'jp.client', - lb => 'lb.glite-LB', - px => 'px.glite-PX', - proxyrenewal => 'px.proxyrenewal' -); - -%obsoletes = ( - 'lb.yaim' => [ qq/glite-yaim-lb/ ], - 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ], - 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ], - 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec - 'lbjp-common.gss' => [ qq/glite-security-gss/ ], - 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], - 'lb.glite-LB' => [ qq/glite-LB/ ], - 'px.glite-PX' => [ qq/glite-PX/ ], -); - -%cvs_prefix = ( - 'lb' => 'org.glite', - 'jp' => 'org.glite', - 'jobid' => 'org.glite', - 'lbjp-common' => 'org.glite', - 'gridsite' => 'org', - 'px' => 'org.glite', -); - -%cvs_tag_prefix = ( - 'lb' => 'glite-', - 'jp' => 'glite-', - 'jobid' => 'glite-', - 'lbjp-common' => 'glite-', - 'gridsite' => '', - 'px' => 'glite-', -); - -# ==== projects specification ==== -# etics_name ........... ETICS project name -# conf_prefix .......... ETICS configurations name prefix -# tag_prefix ........... VCS tag prefix -# local_prefix ......... prefix (relative to stage) -# etics_externs ........ ETICS modules names of externals -# (${NAME.location}, ETICS conf. dependencies) -# etics_projects ....... ETICS project names of externals -# etics_externs_devel .. ETICS modules names of devel versions of externals -# need_externs_aux ..... project-specific external dependencies -# supported_platforms .. platforms supported by the project -%projects = ( - glite => { - etics_name => 'org.glite', - conf_prefix => { %cvs_tag_prefix }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour=${globus.thr.flavor} --nothrflavour=${globus.nothr.flavor}', - local_prefix => '', - etics_externs => { - globus_essentials=>'vdt_globus_essentials', - globus=>'globus', - gridsite=>'org.gridsite.shared', - yaim_core=>'org.glite.yaim.core', - gip_release=>'glite-info-provider-release', - gip_service=>'glite-info-provider-service', - bdii=>'bdii', - glite_version=>'glite-version', - glite_info_templates=>'glite-info-templates', - glue_schema=>'glue-schema', - trustmanager=>'org.glite.security.trustmanager', - axis=>'axis', - lcas=>'org.glite.security.lcas', - gsoapxx=>'-', - build_common_cpp=>'org.glite.build.common-cpp', - }, - etics_externs_devel => { - gridsite=>'org.gridsite.devel', - }, - etics_projects => { - vdt=>[qw/globus globus_essentials gpt/], - 'org.glite'=>[qw/voms gridsite lcas gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager utiljava libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R/ ], - }, - }, - - emi => { - etics_name => 'emi', - conf_prefix => { - 'lb' => 'emi-', - 'jp' => 'emi-', - 'jobid' => 'emi-', - 'lbjp-common' => 'emi-', - 'gridsite' => '', - 'px' => 'emi-', - }, - tag_prefix => { %cvs_tag_prefix }, - flavours => '--thrflavour= --nothrflavour=', - local_prefix => '/usr', - etics_externs => { - globus_essentials=>'globus-gssapi-gsi', - globus=>'globus-gssapi-gsi-devel', - gridsite=>'emi.gridsite.shared', - yaim_core=>'emi.yaim.yaim-core', - yaim_bdii=>'emi.bdii.yaim-bdii', - gip_release=>'emi.bdii.glite-info-provider-release', - gip_service=>'emi.bdii.glite-info-provider-service', - bdii=>'emi.bdii.bdii-core', - glite_version=>'emi.misc.glite-version', - glue_schema=>'emi.bdii.glue-schema', - trustmanager=>'emi.java-security.trustmanager', - trustmanager_axis=>'emi.java-security.trustmanager-axis', - axis=>'axis1.4', - lcas=>'emi.sac.lcas', - gsoapxx=>'-', - build_common_cpp=>'emi.misc.glite.build-common-cpp', - }, - etics_externs_devel => { - cares => 'c-ares-devel', - classads => 'classads-devel', - cppunit => 'cppunit-devel', - expat => 'expat-devel', - gsoap => 'gsoap-devel', - voms => 'org.glite.security.voms-api', - libtar => 'libtar-devel', - log4c => 'log4c-devel', - postgresql => 'postgresql-devel', - curl => 'curl-devel', - libxml2 => 'libxml2-devel', - openssl => 'openssl-devel', - gridsite=>'emi.gridsite.devel', - }, - etics_projects => { - 'emi'=>[qw/voms voms-devel gridsite lcas gip_release gip_service bdii glite_version glue_schema yaim_core yaim_bdii trustmanager trustmanager_axis/], - }, - need_externs_aux => { - 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager trustmanager_axis libtool:B/ ], - 'lb.glite-LB' => [ qw/fetchcrl:R gip_release:R gip_service:R bdii:R glite_version:R glue_schema:R/ ], - 'lb.yaim' => [ qw/yaim_core:R yaim_bdii:R/ ], - 'px.glite-PX' => [qw/myproxy-server:R myproxy-admin:R fetchcrl:R gip_service:R bdii:R glite_version:R glue_schema:R/], - 'px.myproxy-yaim' => [ qw/yaim_core:R yaim_bdii:R/ ], - }, - supported_platforms => { - sl5_x86_64_gcc412EPEL => 1, - sl5_ia32_gcc412EPEL => 1, - }, - }, -); - -%platform_properties = ( - 'gridsite.core' => { - sl5_x86_64_gcc412 => { aprSuffix => '1' }, - sl5_ia32_gcc412 => { aprSuffix => '1' }, - sl5_x86_64_gcc412EPEL => { aprSuffix => '1' }, - sl5_ia32_gcc412EPEL => { aprSuffix => '1' }, - deb5_x86_64_gcc432 => { aprSuffix => '1.0' }, - deb5_ia32_gcc432 => { aprSuffix => '1.0' }, - slc4_x86_64_gcc346 => { aprSuffix => '0' }, - slc4_ia32_gcc346 => { aprSuffix => '0' }, - default => { - } - }, - 'jobid.api-java' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.types' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.doc' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.ws-interface' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'lb.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.yaim' => { - default => { 'package.buildarch' => 'noarch' }, - }, - 'px.myproxy-config' => { - default => { 'package.buildarch' => 'noarch' }, - }, -); - -my @k = keys %deps_aux; -@buildroot{@k} = ('') x ($#k+1); - -$buildroot{'gridsite.core'} = 'src'; -} - -sub full -{ - my $short = shift; - return $extrafull{$short} ? $extrafull{$short} : 'org.glite.'.$short; -} - -sub mkinc -{ - my %aux; - undef %aux; - my @m=qw/ -lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB -lbjp-common.gss lbjp-common.gsoap-plugin -jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin -jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface -px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config -/; - @aux{@m} = (1) x ($#m+1); - - my $short = shift; - my $full = full $short; - - unless ($aux{$short}) { - print "Makefile.inc not needed in $full\n"; - return; - } - - my $top_srcdir = '.'; - my $build = ''; - - if ($module) { - $top_srcdir = $0; - $top_srcdir =~ s,/?[^/]*$,,; - $top_srcdir =~ s,^$,\.,; - } else { - $build = "$full/"; - unless ($buildroot{$_} eq '') { - $top_srcdir = '..'; - $build .= "$buildroot{$_}/"; - unless (-d "$build") { - mkdir "$build" or die "mkdir $build: $!\n"; - } - } - } - unless ($top_srcdir eq '.') { - unlink $build."Makefile"; - symlink "$top_srcdir/Makefile",$build."Makefile" or die "symlink $top_srcdir/Makefile ".$build."Makefile: $!\n"; - for my $file ('.pre', '.post', '.preun', '.postun changelog') { - my $pfile = "project/$file"; - if (-f "$full/$pfile") { - mkdir "$build/project" unless (-d "$build/project"); - unlink $build.$pfile; - symlink "../$top_srcdir/$pfile", $build.$pfile or die "symlink ../$top_srcdir/$pfile ".$build."$pfile: $!\n"; - } - } - } - - open MKINC,">".$build."Makefile.inc" - or die $build."Makefile.inc: $!\n"; - - print "Creating ".$build."Makefile.inc\n"; - - print MKINC qq{project = $project -PREFIX = $root -prefix = $prefix -stagedir = $stagedir -sysroot = $sysroot -sysconfdir = $sysconfdir -localstatedir = $localstatedir -thrflavour = $thrflavour -nothrflavour = $nothrflavour -libdir = $libdir -top_srcdir = $top_srcdir -}; - - for (@{$need_externs{$short}}) { - next unless defined $externs{$_} and defined $externs{$_}{prefix}; - print MKINC "${_}_prefix = $externs{$_}{prefix}\n"; - print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags}; - } - - for (@{$need_jars{$short}}) { - print MKINC "${_}_jar = $jar{$_}\n" - } - - my $need_gsoap = 0; - for (@{$need_externs{$short}}) { $need_gsoap = 1 if $_ eq 'gsoap'; } - - print MKINC "gsoap_default_version=".gsoap_version()."\n" if $need_gsoap; - - close MKINC; -} - -BEGIN{ -}; - -sub mode_etics { - $fmod = shift; - - die "$0: --module required with --etics\n" unless $fmod; - - my ($subsys,$module) = split /\./,$fmod; - - my ($major,$minor,$rev,$age); - - if ($version) { - $version =~ /([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-(.+)/; - ($major,$minor,$rev,$age) = ($1,$2,$3,$4); - } - else { - my $path = "$cvs_prefix{$subsys}.$subsys.$module/project"; - if ($subsys eq 'gridsite') { - $path = "$cvs_prefix{$subsys}.$subsys.core/project"; - } - open V,"$path/version.properties" - or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n"; - - while ($_ = ) { - chomp; - ($major,$minor,$rev) = ($1,$2,$3) if /module\.version\s*=\s*([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/; - $age = $1 if /module\.age\s*=\s*([[:digit:]]+)/; - } - close V; - } - - my @copts = (); - my %ge; - @ge{@{$etics_projects{$project{etics_name}}}} = (1) x ($#{$etics_projects{$project{etics_name}}}+1); - - for (@{$need_externs{"$subsys.$module"}}) { - if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/ and (defined $externs{$_} or defined $jar{$_})) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - next if ($eext eq '-'); - if ($project ne 'glite') { - if ($ge{$_} and not defined $externs{$_}{pkg}) { - push @copts, "--with-$_=\${stageDir}"; - } - } else { - push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; - } - } - } - - for (@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - - push @copts,"--with-$_ \${$eext.location}$jar{$_}" if ($project eq 'glite'); - } - - my $conf; - my $conftag; - my ($confprefix, $nameprefix); - - $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; - - $confprefix = $project{conf_prefix}{$subsys}; - $nameprefix = $confprefix; - $nameprefix =~ s/-$//; - $nameprefix =~ s/-/\./g; - - if ($branch) { - $conf = "$confprefix${subsys}-${module}_$branch"; - $conftag = $branch; - # forced low age number - $age = $branch eq 'HEAD' ? '0head' : '0dev'; } - else { - $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; - -# XXX: gridsite hack - $conftag = $subsys eq 'gridsite' ? "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : - "$project{tag_prefix}{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; } - - my $file = $output ? $output : "$conf.ini"; - open C,">$file" or die "$file: $!\n"; - - my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"}; - - my $confdir = $buildroot{"$subsys.$module"} eq '' ? '.' : '..'; - - my $package_description = ""; - my $package_summary = ""; - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description"; - $package_description = join ("", ); - close V; - chomp $package_description; - $package_description =~ s/\n/\\n/g; - $package_description = "package.description = $package_description\n"; - } - else { - print STDERR "package.description not found for $subsys.$module!\n"; } - - if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") { - open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary"; - $package_summary = join ("", ); - close V; - chomp $package_summary; - $package_summary =~ s/\n/\\n/g; - $package_summary = "package.summary = $package_summary\n"; - } - else { - print STDERR "package.summary not found for $subsys.$module!\n"; } - - my %cmd; - @cmd{qw/configure compile test install packaging clean/} = ('None') x 6; - $cmd{clean} = 'make clean'; - $cmd{checkout} = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null"; - #$cmd{checkout} = "(test -d \${moduleName}/.git && (cd \${moduleName}; git pull) || git clone http://scientific.zcu.cz/git/jra1mw.git \${moduleName})"; - #$cmd{checkout} .= " && (cd \${moduleName}; git checkout ${tag})" unless ($conftag =~ /HEAD/); - $cmd{tag} = "cvs -d \${vcsroot} tag -R \${tag} ${moduleName}"; - - if ($subsys eq 'gridsite') { - $cmd{tag} = 'None'; - - if ($module eq 'core') { - my ($flags, $prefix); - - if ($project ne 'glite') { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"'; - $prefix = "prefix=${prefix}/usr"; - } else { - $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"'; - $prefix = "prefix=${prefix}"; - } - - $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build"; - $cmd{clean} = "rm -rvf build.sh; $cmd{clean}"; - $cmd{install} = "make $prefix $flags install"; - $cmd{packaging} = "make $prefix $flags rpm"; - } - else { - $cmd{clean} = 'None'; - $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this"; - $cmd{checkout} = "mkdir -v \${moduleName} 2>/dev/null || true"; - } - } - elsif ($subsys eq 'px' and $module eq 'myproxy-config') { - $cmd{configure} = "/usr/bin/perl $confdir/configure --root=\${prefix} --prefix= --stage=\${stageDir} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config"; - } - else { - $cmd{configure} = "/usr/bin/perl $confdir/configure $project{flavours} --root=\${prefix} --prefix=$project{local_prefix} --stage=\${stageDir} --sysroot=\${package.prefix} --libdir=\${libdir} --project=\${projectName} --module $subsys.$module @copts"; - $cmd{compile} = 'make'; - $cmd{test} = 'make check'; - $cmd{install} = 'make install'; - } - - my $defprops = ''; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) { - $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n"; - } - - print STDERR "Writing $file\n"; - print C qq{ -[Configuration-$conf] -profile = None -moduleName = $project{etics_name}.$subsys.$module -displayName = $conf -description = $cvs_prefix{$subsys}.$subsys.$module -projectName = $project{etics_name} -age = $age -deploymentType = None -vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite -tag = $conftag -version = $major.$minor.$rev -$dwpath -[Platform-default:VcsCommand] -displayName = None -description = None -tag = $cmd{tag} -branch = None -commit = None -checkout = $cmd{checkout} - -[Platform-default:BuildCommand] -postpublish = None -packaging = $cmd{packaging} -displayName = None -description = None -doc = None -prepublish = None -publish = None -compile = $cmd{compile} -init = None -install = $cmd{install} -clean = $cmd{clean} -test = $cmd{test} -configure = $cmd{configure} -checkstyle = None - -[Platform-default:Property] -$buildroot -aprSuffix = 0 -package.RPMSLocation = \${moduleDir}/$cvs_prefix{$subsys}.$subsys.$module/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/$cvs_prefix{$subsys}.$subsys.$module/RPMTMP/SRPMS -package.preserve.libtool = false -$package_description$package_summary$defprops}; - - for (@{$obsoletes{"$subsys.$module"}}) { - print C "package.obsoletes = $_\n"; - print C "package.replaces = $_\n"; - } - - for my $pp (keys %{$platform_properties{"$subsys.$module"}}) { - next if $pp eq 'default'; - next if exists $project{supported_platforms} and not exists $project{supported_platforms}{$pp}; - - print C "[Platform-$pp:Property]\n$buildroot\n"; - - for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) { - print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n"; - } - print C "package.RPMSLocation = \${moduleDir}/$cvs_prefix{$subsys}.$subsys.$module/RPMTMP/RPMS -package.SRPMSLocation = \${moduleDir}/$cvs_prefix{$subsys}.$subsys.$module/RPMTMP/SRPMS\n"; - print C "$package_description$package_summary\n"; - } - - print C qq{ -[Platform-default:DynamicDependency] -}; - for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; - my $edev = $project{etics_externs_devel}{$_}; - next if ($eext eq '-'); - - my $proj = 'externals'; - for my $p (keys %etics_projects) { - for $m (@{$etics_projects{$p}}) { - $proj = $p if $m eq $_; - } - } - - my $type = $need_externs_type{"$subsys.$module"}->{$_}; - - if ($edev) { - if ($type eq 'B') { - $eext = $edev; # no runtime - change to devel pkg - } elsif ($type eq 'BR' or $type eq 'RB') { - print C "$proj|$edev = B\n"; # additional devel pkg - } - } - print C "$proj|$eext = $type\n"; - } - - for (@{$deps{"$subsys.$module"}}) { - my $type = $deps_type{"$subsys.$module"}->{$_}; - print C "$project{etics_name}|$project{etics_name}.$_ = $type\n"; - } - - close C; -} - -sub gsoap_version { - local $_; - my $gsoap_version; - open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n"; - - while ($_ = ) { - chomp; - - $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/; - $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/; - } - close S; - return $gsoap_version; -} - -sub getlibdir { - if ( -e "/etc/debian_version") { # We are on Debian - $lib64="lib"; - $lib32="lib32"; } - else { # Another distribution - $lib64="lib64"; - $lib32="lib"; } - $libdir=$lib32; - - open INP, "uname -s | "; # Check kernel name - $kname= ; - chomp($kname); - close INP; - - if ( $kname eq "Linux") { - $arch = ("x86_64\npowerpc\nppc64\n"); - - open INP, "uname -p | "; # Check processor type - $procname= ; - chomp($procname); - close INP; - - if ($arch =~/^$procname\n/) { - return ($lib64); } - - open INP, "uname -m | "; # Check machine hardware - $machname= ; - chomp($machname); - close INP; - - if ($arch =~/^$machname\n/) { - return ($lib64); } - - # special cases (hyperlink lib64, Debian) - if (-l "/usr/lib64") { - $libdir=$lib32; } - - # if /usr/lib64 doesn't exist at all (AIX) - unless ( -e "/usr/lib64" ) { - $libdir=$lib32; } - } - - if ( $kname eq "SunOS") { - if (-e "/usr/lib/64") { - $libdir="lib/64"; } - } - - return $libdir; -} - -sub usage { - my @ext = keys %externs; - my @myjars = keys %jar; - - print STDERR qq{ -Usage: $0 options - -General options (defaults in []): - --prefix=PREFIX destination directory [./stage] - --stage=DIR staging directory [./stage] - --root=DIR installation root (custom relocation root -> sysroot) [./stage] - --sysroot=DIR system root (custom relocation root -> sysroot) [] - --sysconfdir=DIR system configuration directory [PREFIX/etc] - --staged=module,module,... what is already in PREFIX (specify without org.glite.) - --thrflavour=flavour - --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] - --listmodules=subsys list modules of a subsystem - --version=maj.min.rev-age specify version here instead of reading version.properties - --branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...) - --libdir=libdir typically [lib,lib64] postfix - --project=PROJECT build or generate etics for a project (glite/emi) [emi] - --debug print more details - -Mode of operation: - --mode=\{checkout|build|etics\} what to do [build] - -What to build: - --module=module build this module only - --enable-NODE build this "node" (set of modules) only - --disable-NODE don't build this node - --lb-tag=tag checkout LB modules with specific tag - --jp-tag=tag checkout JP modules with specific tag - --lbjp-common-tag=tag checkout lbjp-common modules with specific tag - --jobid-tag=tag checkout jobid modules with specific tag - -Dependencies (summary of what will be used is always printed): - --with-EXTERNAL=PATH where to look for an external [autodetect] - --with-JAR=JAR where to look for jars - -Available nodes: - @nodes - -Default nodes: - @default_nodes - -Externals (not all for all modules) are: - @ext - -External jars are: - @myjars - -}; - -} diff --git a/org.glite.lb.glite-LB/project/ChangeLog b/org.glite.lb.glite-LB/project/ChangeLog deleted file mode 100644 index a3aee8e..0000000 --- a/org.glite.lb.glite-LB/project/ChangeLog +++ /dev/null @@ -1,43 +0,0 @@ -3.2.10-1 -- glite-LB Metapackage module now CVS-based -- compile and build by make rather than inline commands - -3.2.11-1 -- Fixed handling of target 'clean' in Makefile - -3.2.12-1 -- Fixed target 'clean' in the Makefile to handle debian builds - -3.2.12-2 -- Module rebuilt - -3.3.0-1 -- Fixes for parallel release in EMI & gLite - -3.3.1-1 -- DESTDIR in makefiles - -3.3.2-1 -- MP installs no files - -3.3.2-2 -- Module rebuilt - -3.3.2-3 -- Module rebuilt - -3.3.3-1 -- Relocatable build directory - -3.3.3-2 -- Module rebuilt - -3.3.3-3 -- Module rebuilt - -3.2.12-10 -- Module rebuilt - -3.2.12-11 -- Module rebuilt - diff --git a/org.glite.lb.glite-LB/project/package.description b/org.glite.lb.glite-LB/project/package.description deleted file mode 100644 index ebc46ce..0000000 --- a/org.glite.lb.glite-LB/project/package.description +++ /dev/null @@ -1 +0,0 @@ -Metapackage to install the L&B service on an LB node diff --git a/org.glite.lb.glite-LB/project/package.summary b/org.glite.lb.glite-LB/project/package.summary deleted file mode 100644 index ebc46ce..0000000 --- a/org.glite.lb.glite-LB/project/package.summary +++ /dev/null @@ -1 +0,0 @@ -Metapackage to install the L&B service on an LB node diff --git a/org.glite.lb.glite-LB/project/version.properties b/org.glite.lb.glite-LB/project/version.properties deleted file mode 100644 index 53d4ec6..0000000 --- a/org.glite.lb.glite-LB/project/version.properties +++ /dev/null @@ -1,3 +0,0 @@ -# $Header -module.version=3.3.3 -module.age=3 diff --git a/org.glite.lb.nagios/Makefile b/org.glite.lb.nagios/Makefile new file mode 100644 index 0000000..1676c7e --- /dev/null +++ b/org.glite.lb.nagios/Makefile @@ -0,0 +1,28 @@ +top_srcdir=.. +stagedir=. +package=emi-nagios-lb +version=0.0.0 +prefix= +INSTALL=install + +-include Makefile.inc +-include ${top_srcdir}/project/version.properties + +install: + mkdir -p ${DESTDIR}${PREFIX}/var/lib/grid-monitoring/emi.lb + mkdir -p ${DESTDIR}${PREFIX}${prefix}/share/doc/${package}-${version} + chmod 750 ${DESTDIR}${PREFIX}/var/lib/grid-monitoring/emi.lb + -chown nagios:nagios ${DESTDIR}${PREFIX}/var/lib/grid-monitoring/emi.lb + mkdir -p ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb + ${INSTALL} -m 0755 src/LB-probe ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb + ( cd ${top_srcdir}/project && ${INSTALL} -m 644 ChangeLog package.description package.summary ${DESTDIR}${PREFIX}${prefix}/share/doc/${package}-${version} ) + +stage: + $(MAKE) install PREFIX=${stagedir} + +check: + @echo "No test" + +clean: + +.PHONY: all install stage clean check diff --git a/org.glite.lbjp-common.gss/configure b/org.glite.lb.nagios/configure similarity index 89% rename from org.glite.lbjp-common.gss/configure rename to org.glite.lb.nagios/configure index 2e34da2..76af732 100755 --- a/org.glite.lbjp-common.gss/configure +++ b/org.glite.lb.nagios/configure @@ -24,6 +24,7 @@ # use Getopt::Long; +use POSIX qw(locale_h strftime); my $pwd = `pwd`; chomp $pwd; my $prefix = '/usr'; @@ -52,7 +53,7 @@ my (%projects, %project); my $debug = 0; my $pkg_config_env = (defined $ENV{PKG_CONFIG_PATH}) ? "$ENV{PKG_CONFIG_PATH}:" : ''; -my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; +my @nodes = qw/client server logger logger-msg nagios utils client-java doc ws-test db jpprimary jpindex jpclient harvester lb px proxyrenewal/; my @default_nodes = qw/lb px proxyrenewal/; my %enable_nodes; my %disable_nodes; @@ -179,7 +180,7 @@ my (%etics_externs, %etics_projects); # additional modules from $project{modules} are automatically added # my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim logger-msg/], + 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim logger-msg nagios/], 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/], 'jobid' => [qw/api-c api-cpp api-java/], 'jp' => [ qw/client doc index primary server-common ws-interface/ ], @@ -527,6 +528,7 @@ BEGIN{ 'lb.doc' => [ qw/tetex-latex:B/ ], 'lb.logger' => [ qw/cppunit:B libtool:B/ ], 'lb.logger-msg' => [ qw/cppunit:B activemq libtool:B/ ], + 'lb.nagios' => [ qw/globus_proxy_utils:R/ ], 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite bison:B libtool:B libxml2 flex:B/ ], 'lb.state-machine' => [ qw/classads libtool:B libxslt:B expat:B/ ], 'lb.utils' => [ qw/cppunit:B libtool:B/ ], @@ -602,6 +604,11 @@ for my $jar (keys %need_jars) { 'lb.logger-msg' => [ qw/ lb.logger / ], + 'lb.nagios' => [ qw/ + lb.client:R + lb.ws-test:R + lb.utils:R + / ], 'lb.server' => [ qw/ lb.ws-interface lb.types:B lb.common lb.state-machine lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log @@ -725,6 +732,7 @@ for my $ext (keys %deps_aux) { %provides = ( 'lbjp-common.gss' => [ qq/glite-security-gss/ ], 'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ], + 'lb.nagios' => [ qq/glite-lb-nagios-plugins/ ], ); %cvs_prefix = ( @@ -769,6 +777,7 @@ for my $ext (keys %deps_aux) { default => { globus_essentials=>'vdt_globus_essentials', globus=>'globus', + globus_proxy_utils=>'vdt_globus_essentials', gridsite=>'org.gridsite.shared', yaim_core=>'org.glite.yaim.core', gip_release=>'glite-info-provider-release', @@ -791,7 +800,7 @@ for my $ext (keys %deps_aux) { }, }, etics_projects => { - vdt=>[qw/globus globus_essentials gpt/], + vdt=>[qw/globus globus_essentials globus_proxy_utils gpt/], 'org.glite'=>[qw/voms gridsite lcas gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/], }, etics_locations => { @@ -825,7 +834,7 @@ for my $ext (keys %deps_aux) { 'jp' => 'emi-', 'jobid' => 'emi-', 'lbjp-common' => 'emi-', - 'gridsite' => '', + 'gridsite' => 'emi-', 'px' => 'emi-', }, tag_prefix => { %cvs_tag_prefix }, @@ -835,6 +844,7 @@ for my $ext (keys %deps_aux) { default => { globus_essentials=>'globus-gssapi-gsi', globus=>'globus-gssapi-gsi-devel', + globus_proxy_utils=>'globus-proxy-utils', gridsite=>'emi.gridsite.shared', yaim_core=>'emi.yaim.yaim-core', yaim_bdii=>'emi.bdii.yaim-bdii', @@ -853,6 +863,28 @@ for my $ext (keys %deps_aux) { sl5_x86_64_gcc412EPEL => { 'myproxy-devel' => 'myproxy-devel.x86_64', }, + sl6_x86_64_gcc444EPEL => { + 'myproxy-devel' => 'myproxy-devel.x86_64', + }, + deb6_x86_64_gcc445 => { + globus_essentials => 'libglobus-gssapi-gsi4', + globus => 'libglobus-gssapi-gsi-dev', + axis => 'libaxis-java', + cares => 'libc-ares2', + cppunit => 'libcppunit', + expat => 'libexpat1', + log4c => 'liblog4c3', + curl => 'libcurl3', + 'mysql' => 'libmysqlclient6', + 'mysql-devel' => 'libmysqlclient-dev', + libxslt => 'xsltproc', + 'jakarta-commons-codec' => 'libcommons-codec-java', + 'jakarta-commons-lang' => 'libcommons-lang-java', + 'tetex-latex' => 'texlive-latex-extra', + 'perl-LDAP' => 'libnet-ldap-perl', + 'fuse-lib' => 'libfuse2', + 'fuse' => 'fuse-utils', + }, }, etics_externs_devel => { default => { @@ -871,6 +903,21 @@ for my $ext (keys %deps_aux) { gridsite=>'emi.gridsite.devel', jdk=>'java-devel', }, + deb6_x86_64_gcc445 => { + cares => 'libc-ares-dev', + cppunit => 'libcppunit-dev', + expat => 'libexpat1-dev', + libtar => 'libtar-dev', + log4c => 'liblog4c-dev', + postgresql => 'libpq-dev', + curl => 'libcurl4-openssl-dev', + libxml2 => 'libxml2-dev', + openssl => 'libssl-dev', + 'tetex-latex' => 'texlive-latex-extra', + libxslt=>'xsltproc', + 'httpd-devel' => 'apache2-prefork-dev', + 'fuse-devel' => 'libfuse-dev', + }, }, etics_projects => { 'emi'=>[qw/voms voms-devel gridsite lcas gip_service bdii glite_version glue_schema yaim_core yaim_bdii trustmanager trustmanager_axis/], @@ -888,6 +935,8 @@ for my $ext (keys %deps_aux) { supported_platforms => { sl5_x86_64_gcc412EPEL => 1, sl5_ia32_gcc412EPEL => 1, + sl6_x86_64_gcc444EPEL => 1, +# deb6_x86_64_gcc445 => 1, }, modules => { 'lb' => [ qw/emi-lb/ ], @@ -906,6 +955,8 @@ for my $ext (keys %deps_aux) { deb5_ia32_gcc432 => { aprSuffix => '1.0' }, slc4_x86_64_gcc346 => { aprSuffix => '0' }, slc4_ia32_gcc346 => { aprSuffix => '0' }, + sl6_x86_64_gcc444 => { aprSuffix => '1' }, + deb6_x86_64_gcc445 => { aprSuffix => '1.0' }, default => { } }, @@ -924,6 +975,9 @@ for my $ext (keys %deps_aux) { 'lb.yaim' => { default => { 'package.buildarch' => 'noarch' }, }, + 'lb.nagios' => { + default => { 'package.buildarch' => 'noarch' }, + }, 'px.yaim' => { default => { 'package.buildarch' => 'noarch' }, }, @@ -947,9 +1001,10 @@ sub full sub mkinc { my %aux; + my ($old_locale, $date); undef %aux; my @m=qw/ -lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB +lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.nagios lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB lbjp-common.gss lbjp-common.gsoap-plugin jobid.api-c jobid.api-cpp jobid.api-java lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin @@ -983,10 +1038,23 @@ px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config } } } + + mkdir $build."project" unless (-d $build."project"); + open PKGCHL,">".$build."project/changelog" + or die $build."project/changelog: $!\n"; + $old_locale = setlocale(LC_TIME); + setlocale(LC_TIME, "C"); + $date = strftime("%a %b %d %Y", gmtime()); + setlocale(LC_TIME, $old_locale); + print PKGCHL qq{* $date CESNET team +- automatically generated package +}; + close PKGCHL; + unless ($top_srcdir eq '.') { unlink $build."Makefile"; symlink "$top_srcdir/Makefile",$build."Makefile" or die "symlink $top_srcdir/Makefile ".$build."Makefile: $!\n"; - for my $file ('.pre', '.post', '.preun', '.postun changelog') { + for my $file ('.pre', '.post', '.preun', '.postun') { my $pfile = "project/$file"; if (-f "$full/$pfile") { mkdir "$build/project" unless (-d "$build/project"); @@ -1158,7 +1226,7 @@ sub mode_etics { $cmd{tag} = 'None'; if ($module eq 'core') { - my ($flags, $prefix); + my ($flags, $prefix, $make_patches); if ($project ne 'glite') { $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"'; @@ -1167,11 +1235,19 @@ sub mode_etics { $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"'; $prefix = 'prefix=${prefix}'; } + if ($project eq 'emi') { + # proper dependency name in spec-file + $cmd{checkout} .= " && \\ + (cd \${moduleName}; test -f src/make-gridsite-spec.orig || sed -i.orig 's/\\(Buildrequires: libxml2-devel.*\\)/\\1,globus-gssapi-gsi-devel/' src/make-gridsite-spec)"; + $make_patches = " + diff -up make-gridsite-spec.orig make-gridsite-spec > \${moduleDir}/RPMTMP/SOURCES/emi-deps.patch + diff -up make-gridsite-spec.orig make-gridsite-spec > \${moduleDir}/src/tgz/emi-deps.patch"; + } - $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build"; - $cmd{clean} = "rm -rvf build.sh; $cmd{clean}"; + $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $prefix $flags build"; + $cmd{clean} = "rm -rvf build.sh \${moduleDir}/src/tgz; $cmd{clean}"; $cmd{install} = "make $prefix $flags install"; - $cmd{packaging} = "mkdir \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz + $cmd{packaging} = "mkdir -p \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz 2>/dev/null || true $make_patches make $prefix $flags rpm && \ cp \${moduleDir}/RPMTMP/SOURCES/gridsite-\${version}.src.tar.gz \${moduleDir}/src/tgz"; } @@ -1275,26 +1351,27 @@ package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS\n"; for my $platform ('default', keys %{$project{supported_platforms}}) { my $used = 0; + my $output = ''; for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) { - my $eext = $etics_externs{$platform}{$_} ? $etics_externs{$platform}{$_} : $_; + my $eext = $etics_externs{$platform}{$_}; my $edev = $project{etics_externs_devel}{$platform}{$_}; - next if ($eext eq '-'); - # dependencies not listed in etics_externs only for - # default platform - if (not defined $etics_externs{$platform}{$_} and - $platform ne 'default') { + + # for the default platform using package of the same + # name for runtime dependency + if (not $eext) { + if ($platform eq 'default') { +#print "default runtime $_ on default\n"; + $eext = $_; } + else { +#print "no runtime $_ on $platform\n"; + $eext = '-'; } + } + if ($eext eq '-' and $edev eq '-') { #print "skipping $_ on $platform\n"; next; } - if (not $used) { - print C qq{ -[Platform-$platform:DynamicDependency] -}; - $used = 1; - } - my $proj = 'externals'; for my $p (keys %etics_projects) { for $m (@{$etics_projects{$p}}) { @@ -1306,26 +1383,31 @@ package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS\n"; if ($edev) { if ($type eq 'B') { - $eext = $edev; # no runtime - change to devel pkg + # no runtime - change to devel pkg + $eext = $edev; } elsif ($type eq 'BR' or $type eq 'RB') { - print C "$proj|$edev = B\n"; # additional devel pkg + # additional devel pkg + if ($edev ne '-') { $output .= "$proj|$edev = B\n"; } } } - print C "$proj|$eext = $type\n"; + if ($eext ne '-') { $output .= "$proj|$eext = $type\n"; } } if ($platform eq 'default') { for (@{$deps{"$subsys.$module"}}) { my $type = $deps_type{"$subsys.$module"}->{$_}; if (not $used) { - print C qq{ -[Platform-$platform:DynamicDependency] -}; $used = 1; } - print C "$project{etics_name}|$project{etics_name}.$_ = $type\n"; + $output .= "$project{etics_name}|$project{etics_name}.$_ = $type\n"; } } + + if ($output) { + print C qq{ +[Platform-$platform:DynamicDependency] +$output}; + } } close C; @@ -1412,16 +1494,41 @@ sub reshuffle_platforms($$) { } for $_ (keys %blacklist) { - if (defined $data->{default}{$_}) { - $value = $data->{default}{$_}; - $data->{default}{$_} = '-'; -#print " deleted $_ from default\n"; + $value = $data->{default}{$_} ? $data->{default}{$_} : $_; + for $platform (keys %$platforms) { + next if $platform eq 'default'; + if (not defined $data->{$platform}{$_}) { + $data->{$platform}{$_} = $value; +#print "added $value to $platform\n" + } + } + $data->{default}{$_} = '-'; +#print "deleted $_ from default\n"; + } + + # merge dependencies across the supported platforms + %blacklist = []; + for $platform (keys %$platforms) { + next if $platform eq 'default'; + for $_ (keys %{$data->{$platform}}) { + $blacklist{$_} = 1; + } + } + for $_ (keys %blacklist) { + $value = undef; + $same = 1; + for $platform (keys %$platforms) { + if (not $value) { $value = $data->{$platform}{$_}; } + if (not $data->{$platform}{$_} or $value ne $data->{$platform}{$_}) { + $same = 0; + last; + } + } + if ($same and $value) { +#print "merged dependency $_\n"; + $data->{default}{$_} = $value; for $platform (keys %$platforms) { - next if $platform eq 'default'; - if (not defined $data->{$platform}{$_}) { - $data->{$platform}{$_} = $value; -#print " added $value to $platform\n" - } + delete $data->{$platform}{$_}; } } } diff --git a/org.glite.lb.nagios/project/ChangeLog b/org.glite.lb.nagios/project/ChangeLog new file mode 100644 index 0000000..37a33d8 --- /dev/null +++ b/org.glite.lb.nagios/project/ChangeLog @@ -0,0 +1,3 @@ +1.0.0-1 +- Initial version of the nagios module + diff --git a/org.glite.lb.nagios/project/package.description b/org.glite.lb.nagios/project/package.description new file mode 100644 index 0000000..a0d9316 --- /dev/null +++ b/org.glite.lb.nagios/project/package.description @@ -0,0 +1 @@ +This is a nagios probe, a shell script to check the L&B server. diff --git a/org.glite.lb.nagios/project/package.summary b/org.glite.lb.nagios/project/package.summary new file mode 100644 index 0000000..49a7171 --- /dev/null +++ b/org.glite.lb.nagios/project/package.summary @@ -0,0 +1 @@ +This is a package to distribute a nagios probe that checks the EMI L&B server. diff --git a/org.glite.lb.nagios/project/version.properties b/org.glite.lb.nagios/project/version.properties new file mode 100644 index 0000000..aa496b1 --- /dev/null +++ b/org.glite.lb.nagios/project/version.properties @@ -0,0 +1,3 @@ +# $Header +module.version=1.0.0 +module.age=1 diff --git a/org.glite.lb.nagios/src/LB-probe b/org.glite.lb.nagios/src/LB-probe new file mode 100755 index 0000000..5bd11a6 --- /dev/null +++ b/org.glite.lb.nagios/src/LB-probe @@ -0,0 +1,420 @@ +#!/bin/bash +# +# Copyright (c) Members of the EGEE Collaboration. 2004-2010. +# See http://www.eu-egee.org/partners for details on the copyright holders. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# show help and usage +progname=`basename $0` +showHelp() +{ +cat << EndHelpHeader +Nagios probe for testing the status of L&B + +Tests called: + 1. Register job + 2. Register to receive notifications + 3. Log events + 4. Check job state + 5. Receive notifications + +Return values: + 0: Passed + 1: Warning + 2: Critical + 3: Unknown + +Console output: + OK|