perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r6382 - in trunk: . perfsonar-base/base/src/test/java/net/geant/perfsonar perfsonar-java-rrd-ma-SQL_backend perfsonar-java-rrd-ma-SQL_backend/src/deb/control
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r6382 - in trunk: . perfsonar-base/base/src/test/java/net/geant/perfsonar perfsonar-java-rrd-ma-SQL_backend perfsonar-java-rrd-ma-SQL_backend/src/deb/control
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r6382 - in trunk: . perfsonar-base/base/src/test/java/net/geant/perfsonar perfsonar-java-rrd-ma-SQL_backend perfsonar-java-rrd-ma-SQL_backend/src/deb/control
- Date: Thu, 16 May 2013 18:24:24 +0100 (BST)
- Authentication-results: sfpop-ironport01.merit.edu; dkim=neutral (message not signed) header.i=none
Author: dante.delvaux
Date: 2013-05-16 18:24:24 +0100 (Thu, 16 May 2013)
New Revision: 6382
Removed:
trunk/test.txt
Modified:
trunk/perfsonar-base/base/src/test/java/net/geant/perfsonar/Handlers.java
trunk/perfsonar-java-rrd-ma-SQL_backend/pom.xml
trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/conffiles
trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postinst
trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postrm
trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/preinst
trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/prerm
Log:
RRD MA: correcting and simplifying the Debian packaging.
Modified:
trunk/perfsonar-base/base/src/test/java/net/geant/perfsonar/Handlers.java
===================================================================
--- trunk/perfsonar-base/base/src/test/java/net/geant/perfsonar/Handlers.java
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-base/base/src/test/java/net/geant/perfsonar/Handlers.java
2013-05-16 17:24:24 UTC (rev 6382)
@@ -4,16 +4,23 @@
//import static net.geant.perfsonar.Configuration.configure;
//import static net.geant.perfsonar.Configuration.when;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Test class for testing handler methods.
*
* @author <a
href="mailto:">Blazej
Pietrzak</a>
*/
public class Handlers {
+ protected Logger logger = LoggerFactory.getLogger(getClass());
public Handlers() {
try {
+ logger.info("Configuring the handler for dummyMethod");
configure(when("TestRequest").then(net.geant.perfsonar.PerfSONARTest.class).dummyMethod());
- } catch (Exception ex) { }
+ } catch (Exception ex) {
+ logger.warn("Problem when trying to configure handler for
dummyMethod ({}): {}", ex.getClass(), ex.getMessage());
+ }
}
}
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/pom.xml
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/pom.xml 2013-05-14 21:29:06
UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/pom.xml 2013-05-16 17:24:24
UTC (rev 6382)
@@ -18,8 +18,7 @@
<properties>
<axis2Id>axis2-1.4.1</axis2Id>
<aar.name>${project.artifactId}</aar.name>
- <installName>${project.artifactId}</installName>
- <installPath>/usr/lib/perfsonar/services/${installName}</installPath>
+ <installPath>/usr/lib/perfsonar/services</installPath>
</properties>
<issueManagement>
@@ -243,25 +242,16 @@
<goal>jdeb</goal>
</goals>
<configuration>
-
<deb>[[buildDir]]/[[installName]]_[[version]]_all.[[extension]]</deb>
+
<deb>[[buildDir]]/${project.artifactId}_[[version]]_all.[[extension]]</deb>
<timestamped>true</timestamped>
<verbose>false</verbose>
<dataSet>
<data>
- <!-- Configuration files need to
be in /etc We'll make a symlink to it in postinst. -->
-
<src>${project.build.directory}/${project.build.finalName}/WEB-INF/classes/perfsonar/conf</src>
- <type>directory</type>
- <mapper>
- <type>perm</type>
-
<prefix>/etc/${installName}</prefix>
- </mapper>
- </data>
- <data>
<src>${project.build.directory}/${project.build.finalName}</src>
<type>directory</type>
<mapper>
<type>perm</type>
-
<prefix>${installPath}</prefix>
+
<prefix>${installPath}/${project.artifactId}</prefix>
</mapper>
</data>
<data>
@@ -269,7 +259,7 @@
<type>directory</type>
<mapper>
<type>perm</type>
-
<prefix>${installPath}/WEB-INF/samples</prefix>
+
<prefix>${installPath}/${project.artifactId}/WEB-INF/samples</prefix>
</mapper>
</data>
<data>
@@ -286,10 +276,18 @@
<type>directory</type>
<mapper>
<type>perm</type>
-
<prefix>/usr/share/doc/${installName}</prefix>
+
<prefix>/usr/share/doc/${project.artifactId}</prefix>
</mapper>
</data>
<data>
+
<src>src/deb/control/changelog</src>
+ <type>file</type>
+ <mapper>
+ <type>perm</type>
+
<prefix>/usr/share/doc/${project.artifactId}</prefix>
+ </mapper>
+ </data>
+ <data>
<src>src/main/sbin/nmwg-sql-converter</src>
<type>file</type>
<mapper>
@@ -301,11 +299,12 @@
<data>
<type>template</type>
<paths>
-
<path>var/log/${installName}</path>
+
<path>var/log/${project.artifactId}</path>
+
<path>etc/${project.artifactId}</path>
</paths>
<mapper>
<type>perm</type>
- <!-- FIXME: This doesn't
seem to work, we need to do it in th postinst script too! -->
+ <!-- FIXME: This doesn't
seem to work, we need to do it in the postinst script too! -->
<user>tomcat6</user>
<group>tomcat6</group>
</mapper>
@@ -333,7 +332,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<configuration>
- <name>${installName}</name>
+ <name>${project.artifactId}</name>
<packager>Antoine Delvaux
<></packager>
<defineStatements>
<defineStatement>prefix
${installPath}</defineStatement>
@@ -381,7 +380,7 @@
</sources>
</mapping>
<mapping>
-
<directory>/usr/share/doc/${installName}</directory>
+
<directory>/usr/share/doc/${project.artifactId}</directory>
<documentation>true</documentation>
<recurseDirectories>false</recurseDirectories>
<sources>
@@ -421,13 +420,13 @@
</sources>
</mapping>
<mapping>
-
<directory>/var/log/${installName}</directory>
+
<directory>/var/log/${project.artifactId}</directory>
<username>tomcat</username>
<groupname>tomcat</groupname>
<filemode>755</filemode>
</mapping>
<mapping>
-
<directory>/etc/${installName}</directory>
+
<directory>/etc/${project.artifactId}</directory>
</mapping>
</mappings>
</configuration>
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/conffiles
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/conffiles
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/conffiles
2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,9 +1,9 @@
-/etc/perfsonar-java-rrd-ma/configuration.xml
-/etc/perfsonar-java-rrd-ma/webAdminConfig.xml
-/etc/perfsonar-java-rrd-ma/rrdma_db.sql
-/etc/perfsonar-java-rrd-ma/test_rrdma_db.sql
-/usr/lib/perfsonar/services/perfsonar-java-rrd-ma/WEB-INF/classes/log4j.properties
-/usr/lib/perfsonar/services/perfsonar-java-rrd-ma/WEB-INF/conf/axis2.xml
-/usr/lib/perfsonar/services/perfsonar-java-rrd-ma/WEB-INF/web.xml
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/classes/perfsonar/conf/configuration.xml
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/classes/perfsonar/conf/webAdminConfig.xml
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/classes/perfsonar/conf/rrdma_db.sql
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/classes/perfsonar/conf/test_rrdma_db.sql
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/classes/log4j.properties
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/conf/axis2.xml
+/usr/lib/perfsonar/services/[[artifactId]]/WEB-INF/web.xml
/etc/tomcat6/Catalina/localhost/geant2-java-rrd-ma.xml
-/etc/tomcat6/Catalina/localhost/perfsonar-java-rrd-ma.xml
+/etc/tomcat6/Catalina/localhost/[[artifactId]].xml
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postinst
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postinst
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postinst
2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,5 +1,5 @@
#!/bin/sh
-# postinst script for perfsonar-java-rrd-ma
+# postinst script for [[artifactId]]
#
# see: dh_installdeb(1)
@@ -17,50 +17,47 @@
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
-SERVICENAME="perfsonar-java-rrd-ma"
-SERVICEPATH="/usr/lib/perfsonar/services"
+SERVICENAME="[[artifactId]]"
+SERVICEPATH="[[installPath]]"
case "$1" in
configure)
- service tomcat6 stop
-
- #Bug fix for a previous package version, where symbolic links where not
removed on package removal
- OLD_SERVICE_NAME=geant2-java-rrd-ma
- if [ -e /var/lib/tomcat5.5/webapps/$OLD_SERVICE_NAME ]; then
- rm -rf /var/lib/tomcat5.5/webapps/$OLD_SERVICE_NAME
- fi
- if [ -e /etc/$OLD_SERVICE_NAME ]; then
- rm -rf /etc/$OLD_SERVICE_NAME/*
- rm -rf /etc/$OLD_SERVICE_NAME
- fi
- if [ -e /var/log/$OLD_SERVICE_NAME ]; then
- rm -rf /var/log/$OLD_SERVICE_NAME
- fi
- if [ -e /usr/share/doc/$OLD_SERVICE_NAME ]; then
- rm -rf /usr/share/doc/$OLD_SERVICE_NAME
- fi
+ service tomcat6 stop
+
+ #Bug fix for a previous package version, where symbolic links
where not removed on package removal
+ OLD_SERVICE_NAME=geant2-java-rrd-ma
+ if [ -e /var/lib/tomcat5.5/webapps/$OLD_SERVICE_NAME ]; then
+ rm -rf /var/lib/tomcat5.5/webapps/$OLD_SERVICE_NAME
+ fi
+ if [ -e /etc/$OLD_SERVICE_NAME ]; then
+ rm -rf /etc/$OLD_SERVICE_NAME/*
+ rm -rf /etc/$OLD_SERVICE_NAME
+ fi
+ if [ -e /var/log/$OLD_SERVICE_NAME ]; then
+ rm -rf /var/log/$OLD_SERVICE_NAME
+ fi
+ if [ -e /usr/share/doc/$OLD_SERVICE_NAME ]; then
+ rm -rf /usr/share/doc/$OLD_SERVICE_NAME
+ fi
+
+ # We create the link to the configuration files and set correct
permissions
+
CONFDIR=${SERVICEPATH}/${SERVICENAME}/WEB-INF/classes/perfsonar/conf
+ ln -s ${CONFDIR}/*.xml /etc/${SERVICENAME}/
+ ln -s ${CONFDIR}/*.sql /etc/${SERVICENAME}/
+ chown tomcat6:tomcat6 ${CONFDIR}/*.xml
+ chown tomcat6:tomcat6 /var/log/${SERVICENAME}
+
+ service tomcat6 start
+ ;;
- # We create the link to the configuration files and set correct
permissions
- CONFDIR=${SERVICEPATH}/${SERVICENAME}/WEB-INF/classes/perfsonar/conf
- if [ -d ${CONFDIR} ] || [ -h ${CONFDIR} ]; then
- rm -rf ${CONFDIR}
- fi
- ln -s /etc/${SERVICENAME}/*.xml ${CONFDIR}/
- ln -s /etc/${SERVICENAME}/*.sql ${CONFDIR}/
- chown tomcat6:tomcat6 /etc/${SERVICENAME}/*
- chown tomcat6:tomcat6 /var/log/${SERVICENAME}/*
-
- service tomcat6 start
- ;;
-
abort-upgrade|abort-remove|abort-deconfigure)
- ;;
+ ;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
- ;;
+ ;;
esac
# dh_installdeb will replace this with shell code automatically
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postrm
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postrm
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/postrm
2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,5 +1,5 @@
#!/bin/sh
-# postrm script for perfsonar-java-rrd-ma
+# postrm script for [[artifactId]]
#
# see: dh_installdeb(1)
@@ -19,24 +19,27 @@
# the debian-policy package
-SERVICENAME="perfsonar-java-rrd-ma"
-SERVICEPATH="/usr/lib/perfsonar/services"
+SERVICENAME="[[artifactId]]"
+SERVICEPATH="[[installPath]]"
case "$1" in
purge)
- #TODO: Do we need to remove some symlinks?
- service tomcat6 restart
- ;;
+ rm /etc/[[artifactId]]/configuration.xml
+ rm /etc/[[artifactId]]/webAdminConfig.xml
+ rm /etc/[[artifactId]]/rrdma_db.sql
+ rm /etc/[[artifactId]]/test_rrdma_db.sql
+ ;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- service tomcat6 restart
- ;;
+ service tomcat6 restart
+ ;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
- ;;
+ ;;
+
esac
# dh_installdeb will replace this with shell code automatically
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/preinst
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/preinst
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/preinst
2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,5 +1,5 @@
#!/bin/sh
-# preinst script for perfsonar-java-rrd-ma
+# preinst script for [[artifactId]]
#
# see: dh_installdeb(1)
@@ -13,20 +13,20 @@
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
-SERVICEPATH="/usr/lib/perfsonar/services"
-SERVICENAME="perfsonar-java-rrd-ma"
+SERVICENAME="[[artifactId]]"
+SERVICEPATH="[[installPath]]"
case "$1" in
install|upgrade)
- ;;
+ ;;
abort-upgrade)
- ;;
+ ;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
- ;;
+ ;;
esac
# dh_installdeb will replace this with shell code automatically
Modified: trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/prerm
===================================================================
--- trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/prerm
2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/perfsonar-java-rrd-ma-SQL_backend/src/deb/control/prerm
2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,5 +1,5 @@
#!/bin/sh
-# prerm script for perfsonar-java-rrd-ma
+# prerm script for [[artifactId]]
#
# see: dh_installdeb(1)
@@ -18,15 +18,15 @@
case "$1" in
remove|upgrade|deconfigure)
- ;;
+ ;;
failed-upgrade)
- ;;
+ ;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
- ;;
+ ;;
esac
# dh_installdeb will replace this with shell code automatically
Deleted: trunk/test.txt
===================================================================
--- trunk/test.txt 2013-05-14 21:29:06 UTC (rev 6381)
+++ trunk/test.txt 2013-05-16 17:24:24 UTC (rev 6382)
@@ -1,14 +0,0 @@
- private PerfSONAR service = new PerfSONAR() {
-
- @Override
- public ServiceType getServiceType() {
- return ServiceType.MP;
- }
-
- @Override
- public String getServiceName() {
- return "SSHTELNET";
- }
- };
-
-
- [pS-dev] [GEANT/SA2/ps-java-services] r6382 - in trunk: . perfsonar-base/base/src/test/java/net/geant/perfsonar perfsonar-java-rrd-ma-SQL_backend perfsonar-java-rrd-ma-SQL_backend/src/deb/control, svn-noreply, 05/16/2013
Archive powered by MHonArc 2.6.16.