[med-svn] r7476 - in trunk/packages/biomaj/trunk/debian: . patches

olivier sallou osallou-guest at alioth.debian.org
Fri Aug 19 07:01:03 UTC 2011


Author: osallou-guest
Date: 2011-08-19 07:01:03 +0000 (Fri, 19 Aug 2011)
New Revision: 7476

Added:
   trunk/packages/biomaj/trunk/debian/biomaj-properties.install
   trunk/packages/biomaj/trunk/debian/biomaj.install
   trunk/packages/biomaj/trunk/debian/biomaj.links
   trunk/packages/biomaj/trunk/debian/patches/removeSqlToolDependency
   trunk/packages/biomaj/trunk/debian/watch
Modified:
   trunk/packages/biomaj/trunk/debian/changelog
   trunk/packages/biomaj/trunk/debian/control
   trunk/packages/biomaj/trunk/debian/get-orig-source
   trunk/packages/biomaj/trunk/debian/patches/series
   trunk/packages/biomaj/trunk/debian/postinst
   trunk/packages/biomaj/trunk/debian/rules
Log:
updates for upstream 1.2

Added: trunk/packages/biomaj/trunk/debian/biomaj-properties.install
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj-properties.install	                        (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj-properties.install	2011-08-19 07:01:03 UTC (rev 7476)
@@ -0,0 +1 @@
+usr/share/biomaj/examples/db_properties

Added: trunk/packages/biomaj/trunk/debian/biomaj.install
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.install	                        (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.install	2011-08-19 07:01:03 UTC (rev 7476)
@@ -0,0 +1,10 @@
+usr/share/biomaj/sql
+usr/share/biomaj/bin
+usr/share/biomaj/conf
+usr/share/biomaj/workflows
+usr/share/biomaj/lib
+usr/share/doc/biomaj
+var/lib/biomaj
+var/log/biomaj
+etc/biomaj
+usr/bin

Added: trunk/packages/biomaj/trunk/debian/biomaj.links
===================================================================
--- trunk/packages/biomaj/trunk/debian/biomaj.links	                        (rev 0)
+++ trunk/packages/biomaj/trunk/debian/biomaj.links	2011-08-19 07:01:03 UTC (rev 7476)
@@ -0,0 +1,2 @@
+etc/biomaj/general.conf usr/share/biomaj/general.conf
+etc/biomaj/unix_command_system.cfg usr/share/biomaj/conf/process/unix_command_system.cfg

Modified: trunk/packages/biomaj/trunk/debian/changelog
===================================================================
--- trunk/packages/biomaj/trunk/debian/changelog	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/changelog	2011-08-19 07:01:03 UTC (rev 7476)
@@ -1,3 +1,11 @@
+biomaj (1.2.0-1) unstable; urgency=low
+
+  * New upstream release with new features and bug fixes.
+  * Change in database model, migration script ran at install
+  * New post processes added in default install (emboss)
+
+ -- Olivier Sallou <olivier.sallou at irisa.fr>  Thu, 18 Aug 2011 09:55:23 +0200
+
 biomaj (1.1.0-3) unstable; urgency=low
 
   * Change priority in debconf message for jdk home

Modified: trunk/packages/biomaj/trunk/debian/control
===================================================================
--- trunk/packages/biomaj/trunk/debian/control	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/control	2011-08-19 07:01:03 UTC (rev 7476)
@@ -9,19 +9,33 @@
 Homepage: http://biomaj.genouest.org
 Build-Depends: debhelper (>= 7.1)
 Build-Depends-Indep: debconf, po-debconf, openjdk-6-jdk|default-jdk|sun-java6-jdk, ant, libhsqldb-java, ant-contrib,
- liblog4j1.2-java, libcommons-net-java, libcommons-dbcp-java, libgnumail-java, libcommons-pool-java,
- libgnujaf-java, libjgoodies-forms-java, liboro-java, libregexp-java, libjfreechart-java,
+ liblog4j1.2-java, libcommons-net2-java, libcommons-dbcp-java, libgnumail-java, libcommons-pool-java,
+ libgnujaf-java, libjgoodies-forms-java, liboro-java, libregexp-java, 
  libjcommon-java, libjsch-java, libjdom1-java, junit4, libsaxonb-java, junit4, libjdepend-java,
- javahelper (>=0.25)
+ javahelper (>=0.25), libcommons-cli-java, libcommons-codec-java, libcommons-httpclient-java, libcommons-logging-java,
+ libjets3t-java
 Standards-Version: 3.9.1
 
 Package: biomaj
 Architecture: all
 Depends: openjdk-6-jdk|default-jdk|sun-java6-jdk, ant, libmysql-java, debconf, ${misc:Depends}, ${java:Depends},
- libhsqldb-java,ant-contrib,liblog4j1.2-java,libcommons-net-java (>= 1.4),libcommons-dbcp-java (>= 1.2), libgnumail-java, libcommons-pool-java (>= 1.5), libgnujaf-java, libjgoodies-forms-java (>= 1.2),liboro-java (>= 2.0),libregexp-java (>= 1.4),libjfreechart-java (>= 1.0),libjcommon-java (>= 1.0),libjsch-java (>= 0.1.42),libjdom1-java (>= 1.1),junit4,libsaxonb-java (>= 0.9)
+ libhsqldb-java,ant-contrib,liblog4j1.2-java,libcommons-net2-java (>= 2.2),libcommons-dbcp-java (>= 1.2),
+ libgnumail-java, libcommons-pool-java (>= 1.5), libgnujaf-java, libjgoodies-forms-java (>= 1.2),
+ liboro-java (>= 2.0),libregexp-java (>= 1.4),libjcommon-java (>= 1.0),libjsch-java (>= 0.1.42),
+ libjdom1-java (>= 1.1),junit4,libsaxonb-java (>= 0.9), libcommons-cli-java, libcommons-codec-java,
+ libcommons-httpclient-java, libcommons-logging-java,libjets3t-java, perl
 Suggests: mysql-community-server-5.0, ncbi-tools-bin, blast2
 Description: Biological banks updater
  BioMAJ downloads remote data banks, check their status and apply transformation
  workflows, with consistent state,to provide ready-to-use data to biologists and
  bioinformaticians. For example, it can transform original fasta files to blast 
  indexes. It is very flexible and post-processes can be extended very easily.
+
+Package: biomaj-properties
+Architecture: all
+Depends: ${misc:Depends}
+Description: bank properties file examples
+ This package contains a set of bank properties that can be used
+ as examples for biomaj. It contains many existing banks descriptions
+ with or without workflows to transform data.
+ Some files may required additional programs for post processes (blast..)

Modified: trunk/packages/biomaj/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/biomaj/trunk/debian/get-orig-source	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/get-orig-source	2011-08-19 07:01:03 UTC (rev 7476)
@@ -1,12 +1,12 @@
 #!/bin/bash -e
 
 #biomaj version
-export BMAJVERSION="1.1.0"
+export BMAJVERSION="1.2.0"
 
-svn export svn://scm.gforge.inria.fr/svn/biomaj/tags/1.1.0/biomaj_deb
+svn export svn://scm.gforge.inria.fr/svn/biomaj/trunk/biomaj_deb
 rmdir biomaj_deb/usr/share/biomaj/apache-tomcat-6.0.24
 
-svn export svn://scm.gforge.inria.fr/svn/biomaj/BioMAJ-$BMAJVERSION
+svn export svn://scm.gforge.inria.fr/svn/biomaj/biomaj_dev BioMAJ-$BMAJVERSION
 chmod 755 BioMAJ-$BMAJVERSION/bin/*
 cp -R BioMAJ-$BMAJVERSION/bin/* biomaj_deb/usr/share/biomaj/bin/
 mkdir -p biomaj_deb/usr/share/doc/biomaj
@@ -15,11 +15,6 @@
 cp -R BioMAJ-$BMAJVERSION/doc/UsersGuide_BioMAJ_EN.odt biomaj_deb/usr/share/doc/biomaj/
 cp -R BioMAJ-$BMAJVERSION/doc/UsersGuide_BioMAJ_FR.odt biomaj_deb/usr/share/doc/biomaj/
 
-#cp BioMAJ-$BMAJVERSION/lib/commons-cli-2.0-SNAPSHOT.jar biomaj_deb/usr/share/biomaj/lib/
-
-svn export http://svn.apache.org/repos/asf/commons/sandbox/cli2/trunk biomaj_deb/usr/share/biomaj/lib/vendor/commons-cli2
-chmod 644 biomaj_deb/usr/share/biomaj/lib/vendor/commons-cli2/src/site/resources/images/1x1.gif
-
 if [ -e biomaj_deb/usr/share/biomaj/lib/biomaj.jar ]
 then
 rm biomaj_deb/usr/share/biomaj/lib/biomaj.jar
@@ -27,6 +22,9 @@
 echo "Copy files..."
 cp -R BioMAJ-$BMAJVERSION/src/* biomaj_deb/usr/share/biomaj/src/
 cp -R BioMAJ-$BMAJVERSION/sql/* biomaj_deb/usr/share/biomaj/sql/
+mkdir -p biomaj_deb/var/lib/biomaj/
+chmod 755 biomaj_deb/usr/share/biomaj/sql/migration/*.pl
+mv biomaj_deb/usr/share/biomaj/sql/migration biomaj_deb/var/lib/biomaj/
 cp -R BioMAJ-$BMAJVERSION/workflows/* biomaj_deb/usr/share/biomaj/workflows/
 cp -R BioMAJ-$BMAJVERSION/xslt/* biomaj_deb/usr/share/biomaj/xslt/
 cp BioMAJ-$BMAJVERSION/*.* biomaj_deb/usr/share/biomaj/
@@ -38,15 +36,26 @@
 
 echo "Delete unnecessary files"
 
-rm biomaj_deb/usr/share/biomaj/general.conf
+#rm -f  biomaj_deb/usr/share/biomaj/general.conf
 rm -rf biomaj_deb/usr/share/biomaj/xslt/css
 rm -rf biomaj_deb/usr/share/biomaj/doc
 
 echo "Update configuration"
+sed -i 's/$BIOMAJ_ROOT=$Bin\."\/\.\.\/\.\."/$BIOMAJ_ROOT="\/usr\/share\/biomaj"/'  biomaj_deb/var/lib/biomaj/migration/update.pl
 cp -R BioMAJ-$BMAJVERSION/conf/* biomaj_deb/etc/biomaj/
+mkdir -p biomaj_deb/usr/share/biomaj/examples/db_properties
+mv biomaj_deb/etc/biomaj/db_properties/workflow_withprocess biomaj_deb/usr/share/biomaj/examples/db_properties/
+mv biomaj_deb/etc/biomaj/db_properties/workflow_without_process biomaj_deb/usr/share/biomaj/examples/db_properties/
 sed 's/data.dir=/data.dir=\/var\/lib\/biomaj\//' biomaj_deb/etc/biomaj/db_properties/global.properties > biomaj_deb/etc/biomaj/db_properties/global.properties.tmp
 mv biomaj_deb/etc/biomaj/db_properties/global.properties.tmp biomaj_deb/etc/biomaj/db_properties/global.properties
+mkdir -p biomaj_deb/etc/biomaj/db_properties/admin
+# put banks
+mv biomaj_deb/etc/biomaj/db_properties/alu.properties biomaj_deb/etc/biomaj/db_properties/admin/
+mv biomaj_deb/etc/biomaj/db_properties/sts.properties biomaj_deb/etc/biomaj/db_properties/admin/
+
+
 mv biomaj_deb/etc/biomaj/process/* biomaj_deb/usr/share/biomaj/conf/process/
+mv biomaj_deb/usr/share/biomaj/conf/process/unix_command_system.cfg biomaj_deb/etc/biomaj/
 rmdir biomaj_deb/etc/biomaj/process
 
 echo "Updating file rights"

Added: trunk/packages/biomaj/trunk/debian/patches/removeSqlToolDependency
===================================================================
--- trunk/packages/biomaj/trunk/debian/patches/removeSqlToolDependency	                        (rev 0)
+++ trunk/packages/biomaj/trunk/debian/patches/removeSqlToolDependency	2011-08-19 07:01:03 UTC (rev 7476)
@@ -0,0 +1,351 @@
+Author: Olivier Sallou <olivier.sallou at irisa.fr>
+Subject: remove usage of hsqld2
+Description: remote sqltool references, not used in debian packaging as hsqldb2 is not packaged.
+Last-Update: 2011-08
+--- a/usr/share/biomaj/src/org/inria/biomaj/exe/migration/CoreMigrationFrom1_1To1_2.java
++++ b/usr/share/biomaj/src/org/inria/biomaj/exe/migration/CoreMigrationFrom1_1To1_2.java
+@@ -14,8 +14,8 @@
+ import java.util.List;
+ import java.util.UUID;
+ 
+-import org.hsqldb.cmdline.SqlFile;
+-import org.hsqldb.cmdline.SqlToolError;
++//import org.hsqldb.cmdline.SqlFile;
++//import org.hsqldb.cmdline.SqlToolError;
+ import org.inria.biomaj.singleton.BiomajInformation;
+ import org.inria.biomaj.sql.SQLConnection;
+ import org.inria.biomaj.sql.SQLConnectionFactory;
+@@ -210,19 +210,6 @@
+ 	}
+ 	
+ 	private static void createNewHSQLTables(Statement stat) {
+-		File file = new File(biomajRoot + "/sql/hsql-to_1.2.sql");
+-		try {
+-			SqlFile sqlFile = new SqlFile(file);
+-			sqlFile.setConnection(stat.getConnection());
+-			
+-			sqlFile.execute();
+-		} catch (IOException e) {
+-			e.printStackTrace();
+-		} catch (SQLException e) {
+-			e.printStackTrace();
+-		} catch (SqlToolError e) {
+-			e.printStackTrace();
+-		}
+ 	}
+ 	
+ 	private static boolean createNewMySQLTables(SQLConnection connection, Statement stat) {
+--- a/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java
++++ b/usr/share/biomaj/src/org/inria/biomaj/sql/HSQLDBConnection.java
+@@ -21,8 +21,6 @@
+ import java.util.UUID;
+ 
+ import org.apache.commons.dbcp.BasicDataSource;
+-import org.hsqldb.cmdline.SqlFile;
+-import org.hsqldb.cmdline.SqlToolError;
+ import org.inria.biomaj.singleton.BiomajLogger;
+ import org.inria.biomaj.utils.BiomajConst;
+ import org.inria.biomaj.utils.BiomajUtils;
+@@ -131,156 +129,7 @@
+ 	@Override
+ 	public boolean createDB(String adminLogin, String adminPasswd, String adminMail) {
+ 		
+-		Statement statement = getStatement();
+-		try {
+-			
+-			TreeSet<String> versions = new TreeSet<String>(); 
+-			File[] filz = new File(dbPath).listFiles(new FilenameFilter() {
+-				
+-				@Override
+-				public boolean accept(File dir, String name) {
+-					return name.startsWith("hsql-to");
+-				}
+-			});
+-			
+-			for (File fl : filz) {
+-				versions.add(fl.getName()); // sort versions
+-			}
+-			
+-			List<String> runFiles = new ArrayList<String>();
+-			Collections.addAll(runFiles, new File(dbPath + "/migration").list());
+-			
+-			if (!runFiles.contains("hsql.sql")) { // Run all
+-				System.out.println("Run all sql scripts...");
+-				/*
+-				 * Base file
+-				 */
+-				File file = new File(dbPath + "/hsql.sql");
+-				SqlFile sqlFile = new SqlFile(file);
+-				sqlFile.setConnection(statement.getConnection());
+-				
+-				sqlFile.execute();
+-				
+-				System.out.println("hsql.sql run.");
+-				writeFileVersion("hsql.sql");
+-				
+-				/*
+-				 * New versions
+-				 */
+-				for (String name : versions) {
+-					File nf = new File(dbPath + "/" + name);
+-					sqlFile = new SqlFile(nf);
+-					sqlFile.setConnection(statement.getConnection());
+-					sqlFile.execute();
+-					
+-					System.out.println(name + " run.");
+-					writeFileVersion(name);
+-				}
+-				
+-			} else {
+-				System.out.println("Run new sql scripts...");
+-				/*
+-				 * New versions only
+-				 */
+-				for (String name : versions) {
+-					if (!runFiles.contains(name)) {
+-						File file = new File(dbPath + "/" + name);
+-						SqlFile sqlFile = new SqlFile(file);
+-						sqlFile.setConnection(statement.getConnection());
+-						
+-						sqlFile.execute();
+-						
+-						System.out.println(name + " run.");
+-						writeFileVersion(name);
+-					}
+-				}
+-			}
+-			
+-			/*
+-			 * Insert admin records
+-			 */
+-			
+-			// Generates admin auth_key
+-			String key = UUID.randomUUID().toString();
+-			String hash = "";
+-			
+-			// Generates password hash
+-			MessageDigest digest;
+-			try {
+-				digest = MessageDigest.getInstance("SHA1");
+-				digest.update(passwd.getBytes());
+-				byte[] hashedPasswd = digest.digest();
+-				hash = BiomajUtils.getHexString(hashedPasswd);
+-			} catch (NoSuchAlgorithmException e) {
+-				e.printStackTrace();
+-			}
+-			
+-			String testUser = "SELECT * FROM bw_user WHERE login='" + adminLogin + "'";
+-			ResultSet rs = executeQuery(testUser, statement);
+-			if (!rs.next()) {
+-			
+-				String insertUser = "INSERT INTO bw_user(login, password, auth_type, auth_key, mail_address) " +
+-						"VALUES('" + adminLogin + "','" + hash + "','local','" + key + "','" + adminMail + "')";
+-				int userId = executeUpdateAndGetGeneratedKey(insertUser, statement);
+-				
+-				String testGroup = "SELECT idgroup FROM bw_group WHERE name='admin'";
+-				rs = executeQuery(testGroup, statement);
+-				int groupId;
+-				if (rs.next()) {
+-					System.out.println("Adding " + adminLogin + " to current admin group");
+-					groupId = rs.getInt(1);
+-				} else {
+-					String createGroup = "INSERT INTO bw_group(name) VALUES('admin')";
+-					groupId = executeUpdateAndGetGeneratedKey(createGroup, statement);
+-				}
+-				
+-				String userToGroup = "INSERT INTO bw_user_has_group(ref_iduser, ref_idgroup) VALUES(" + userId + "," + groupId + ")";
+-				executeUpdate(userToGroup, statement);
+-				
+-				
+-				boolean updated = false;
+-				try {
+-					String testTable = "SELECT visibility FROM bank";
+-					statement.executeQuery(testTable);
+-					updated = true; // No error, column already added
+-				} catch (SQLException e) {
+-					updated = false;
+-				}
+-				
+-				if (!updated) { // Not yet updated
+-					
+-					String hsql_addColumnToBank = "ALTER TABLE bank ADD COLUMN ref_iduser INT DEFAULT " + userId;
+-					executeUpdate(hsql_addColumnToBank, statement);
+-					
+-					hsql_addColumnToBank = "ALTER TABLE bank ADD COLUMN visibility BOOLEAN DEFAULT false";
+-					executeUpdate(hsql_addColumnToBank, statement);
+-					
+-					String hsql_addConstraint = "ALTER TABLE bank ADD CONSTRAINT fk_bank_to_user FOREIGN KEY (ref_iduser) REFERENCES bw_user(iduser)";
+-					executeUpdate(hsql_addConstraint, statement);
+-				}
+-				
+-			} else {
+-				System.err.println("User " + adminLogin + " already exists");
+-			}
+-			
+-			
+-			
+-			SQLConnectionFactory.closeConnection(statement);
+-//			statement.executeBatch();
+-		} catch (SQLException e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		} catch (IOException e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		} catch (SqlToolError e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		}
+-		return true;
++		return false;
+ 	}
+ 	
+ 	private void writeFileVersion(String name) throws IOException {
+--- a/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java
++++ b/usr/share/biomaj/src/org/inria/biomaj/sql/TestConnection.java
+@@ -16,8 +16,6 @@
+ import java.util.UUID;
+ 
+ import org.apache.commons.dbcp.BasicDataSource;
+-import org.hsqldb.cmdline.SqlFile;
+-import org.hsqldb.cmdline.SqlToolError;
+ import org.inria.biomaj.singleton.BiomajLogger;
+ import org.inria.biomaj.utils.BiomajUtils;
+ 
+@@ -61,132 +59,7 @@
+ 	@Override
+ 	public boolean createDB(String adminLogin, String adminPasswd, String adminMail) {
+ 		
+-		Statement statement = getStatement();
+-		try {
+-			
+-			TreeSet<String> versions = new TreeSet<String>(); 
+-			File[] filz = new File(dbPath).listFiles(new FilenameFilter() {
+-				
+-				@Override
+-				public boolean accept(File dir, String name) {
+-					return name.startsWith("hsql-to");
+-				}
+-			});
+-			
+-			for (File fl : filz) {
+-				versions.add(fl.getName()); // sort versions
+-			}
+-			
+-			
+-			/*
+-			 * Base file
+-			 */
+-			File file = new File(dbPath + "/hsql.sql");
+-			SqlFile sqlFile = new SqlFile(file);
+-			sqlFile.setConnection(statement.getConnection());
+-			
+-			sqlFile.execute();
+-			
+-			System.out.println("hsql.sql run.");
+-			
+-			/*
+-			 * New versions
+-			 */
+-			for (String name : versions) {
+-				File nf = new File(dbPath + "/" + name);
+-				sqlFile = new SqlFile(nf);
+-				sqlFile.setConnection(statement.getConnection());
+-				sqlFile.execute();
+-				
+-				System.out.println(name + " run.");
+-			}
+-				
+-			
+-			
+-			/*
+-			 * Insert admin records
+-			 */
+-			
+-			// Generates admin auth_key
+-			String key = UUID.randomUUID().toString();
+-			String hash = "";
+-			
+-			// Generates password hash
+-			MessageDigest digest;
+-			try {
+-				digest = MessageDigest.getInstance("SHA1");
+-				digest.update(passwd.getBytes());
+-				byte[] hashedPasswd = digest.digest();
+-				hash = BiomajUtils.getHexString(hashedPasswd);
+-			} catch (NoSuchAlgorithmException e) {
+-				e.printStackTrace();
+-			}
+-			
+-			String testUser = "SELECT * FROM bw_user WHERE login='" + adminLogin + "'";
+-			ResultSet rs = executeQuery(testUser, statement);
+-			if (!rs.next()) {
+-			
+-				String insertUser = "INSERT INTO bw_user(login, password, auth_type, auth_key, mail_address) " +
+-						"VALUES('" + adminLogin + "','" + hash + "','local','" + key + "','" + adminMail + "')";
+-				int userId = executeUpdateAndGetGeneratedKey(insertUser, statement);
+-				
+-				String testGroup = "SELECT idgroup FROM bw_group WHERE name='admin'";
+-				rs = executeQuery(testGroup, statement);
+-				int groupId;
+-				if (rs.next()) {
+-					System.out.println("Adding " + adminLogin + " to current admin group");
+-					groupId = rs.getInt(1);
+-				} else {
+-					String createGroup = "INSERT INTO bw_group(name) VALUES('admin')";
+-					groupId = executeUpdateAndGetGeneratedKey(createGroup, statement);
+-				}
+-				
+-				String userToGroup = "INSERT INTO bw_user_has_group(ref_iduser, ref_idgroup) VALUES(" + userId + "," + groupId + ")";
+-				executeUpdate(userToGroup, statement);
+-				
+-				boolean updated = false;
+-				try {
+-					String testTable = "SELECT visibility FROM bank";
+-					statement.executeQuery(testTable);
+-					updated = true; // No error, column already added
+-				} catch (SQLException e) {
+-					updated = false;
+-				}
+-				
+-				if (!updated) { // Not yet updated
+-					
+-					String hsql_addColumnToBank = "ALTER TABLE bank ADD COLUMN ref_iduser INT DEFAULT " + userId;
+-					executeUpdate(hsql_addColumnToBank, statement);
+-					
+-					hsql_addColumnToBank = "ALTER TABLE bank ADD COLUMN visibility BOOLEAN DEFAULT false";
+-					executeUpdate(hsql_addColumnToBank, statement);
+-					
+-					String hsql_addConstraint = "ALTER TABLE bank ADD CONSTRAINT fk_bank_to_user FOREIGN KEY (ref_iduser) REFERENCES bw_user(iduser)";
+-					executeUpdate(hsql_addConstraint, statement);
+-				}
+-				
+-			} else {
+-				System.err.println("User " + adminLogin + " already exists");
+-			}
+-			
+-			
+-			
+-			SQLConnectionFactory.closeConnection(statement);
+-//			statement.executeBatch();
+-		} catch (SQLException e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		} catch (IOException e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		} catch (SqlToolError e) {
+-			SQLConnectionFactory.closeConnection(statement);
+-			e.printStackTrace();
+-			return false;
+-		}
+-		return true;
++		return false;
+ 	}
+ 	
+ 	private Connection getConnection() {

Modified: trunk/packages/biomaj/trunk/debian/patches/series
===================================================================
--- trunk/packages/biomaj/trunk/debian/patches/series	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/patches/series	2011-08-19 07:01:03 UTC (rev 7476)
@@ -1 +1 @@
-fix623558_remove_pid
+removeSqlToolDependency

Modified: trunk/packages/biomaj/trunk/debian/postinst
===================================================================
--- trunk/packages/biomaj/trunk/debian/postinst	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/postinst	2011-08-19 07:01:03 UTC (rev 7476)
@@ -10,8 +10,6 @@
       ant_home="/usr/share/ant"
       biomaj_root="/usr/share/biomaj"
       jdk_home=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")      
-      #db_get biomaj/jdk_home
-      #jdk_home="$RET"
       db_type="MySQL"
       db_get biomaj/mysql_host
       db_url="jdbc:mysql://$RET/biomaj_log"
@@ -24,15 +22,13 @@
 
       cd $biomaj_root
 
-      #javac -d $biomaj_root/bin $biomaj_root/bin/Configurator.java
-
       java -cp $biomaj_root/bin Configurator java_home:=$jdk_home ant_home:=$ant_home biomaj_root:=$biomaj_root use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter db_type:=$db_type db_url:=$db_url db_login:=$db_login db_passwd:=$db_passwd app_login:=$app_login app_passwd:=$app_passwd tomcat_port:=$tomcat_port
 
-      if [ $db_type = "MySQL" ]; then
-	echo "Installation Complete."
-        echo "You now need to create the biomaj_log database on your MySQL server."
-        echo "The creation script is provided at /usr/share/biomaj/sql/mysql.sql."
-      fi
+        if [ ! -e /usr/share/biomaj/sql/migration ]; then
+          ln -s /var/lib/biomaj/migration /usr/share/biomaj/sql/migration
+        fi
+        # Database and scripts install and upgrades
+	perl /var/lib/biomaj/migration/update.pl  -dbuser $db_login -dbpwd $db_passwd -db mysql
 
     ;;
 

Modified: trunk/packages/biomaj/trunk/debian/rules
===================================================================
--- trunk/packages/biomaj/trunk/debian/rules	2011-08-18 23:49:14 UTC (rev 7475)
+++ trunk/packages/biomaj/trunk/debian/rules	2011-08-19 07:01:03 UTC (rev 7476)
@@ -10,36 +10,21 @@
 export DH_OPTIONS
 
 export ANT_HOME=/usr/share/ant
-#export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
 JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
 
 %:
 	dh $@ --with javahelper
 
 override_dh_auto_build:
-	ant -f usr/share/biomaj/lib/vendor/commons-cli2.xml
-	cp usr/share/biomaj/lib/vendor/commons-cli2-build/dist/commons-cli-2.0-SNAPSHOT.jar usr/share/biomaj/lib/
-	ant -f usr/share/biomaj/lib/vendor/commons-cli2.xml clean
 	ant -f usr/share/biomaj/build.xml
 	javac -d usr/share/biomaj/bin usr/share/biomaj/bin/Configurator.java
 
 override_dh_clean:
 	dh_clean
-	if test -e usr/share/biomaj/lib/vendor/commons-cli2-build;then ant -f usr/share/biomaj/lib/vendor/commons-cli2.xml clean;fi;
-	rm -f usr/share/biomaj/lib/commons-cli-2.0-SNAPSHOT.jar
 	rm -rf usr/share/biomaj/build
 	rm -rf usr/share/biomaj/dist
 	rm -f usr/share/biomaj/lib/biomaj.jar
 	rm -f usr/share/biomaj/bin/*.class
 
-override_dh_install:
-	# dh_install
-	dh_install --exclude=usr/share/biomaj/lib/vendor --exclude=usr/share/biomaj/build --exclude=usr/share/biomaj/dist usr/share/biomaj
-	dh_install usr/share/doc
-	dh_install usr/bin/biomaj
-	dh_install var/lib/biomaj
-	dh_install var/log/biomaj
-	dh_install etc/biomaj
-
 get-orig-source:
 	. debian/get-orig-source

Added: trunk/packages/biomaj/trunk/debian/watch
===================================================================
--- trunk/packages/biomaj/trunk/debian/watch	                        (rev 0)
+++ trunk/packages/biomaj/trunk/debian/watch	2011-08-19 07:01:03 UTC (rev 7476)
@@ -0,0 +1,2 @@
+version=3
+https://gforge.inria.fr/frs/?group_id=369 .*/biomaj_(\d[\d.-]+)\.orig.(?:tar(?:\.gz|\.bz2)?|tgz|zip)




More information about the debian-med-commit mailing list