[SCM] tango branch, master, updated. debian/8.0.5+dfsg-1-1-g1dd4c13
Picca Frédéric-Emma?==?UTF-8?Q?nuel
picca at debian.org
Tue May 7 07:14:32 UTC 2013
The following commit has been merged in the master branch:
commit 12edfcb3ffda0dd9512dcda42842d489f53cfc6b
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Mon May 28 19:55:13 2012 +0200
create an sql target to ease the dbconfig-common upgrade file creation
diff --git a/debian/sql/upgrade-7.2.0~rc1+dfsg-1 b/debian/mysql/7.2.0~rc1+dfsg-1
similarity index 100%
rename from debian/sql/upgrade-7.2.0~rc1+dfsg-1
rename to debian/mysql/7.2.0~rc1+dfsg-1
diff --git a/debian/sql/upgrade-7.2.6+dfsg-1 b/debian/mysql/7.2.6+dfsg-1
similarity index 100%
copy from debian/sql/upgrade-7.2.6+dfsg-1
copy to debian/mysql/7.2.6+dfsg-1
diff --git a/debian/sql/upgrade-7.2.6+dfsg-1 b/debian/mysql/8.0.5+dfsg-1
similarity index 93%
rename from debian/sql/upgrade-7.2.6+dfsg-1
rename to debian/mysql/8.0.5+dfsg-1
index 3f28462..6ca70e6 100644
--- a/debian/sql/upgrade-7.2.6+dfsg-1
+++ b/debian/mysql/8.0.5+dfsg-1
@@ -33,7 +33,7 @@ DELIMITER |
CREATE PROCEDURE tango.ds_start
(IN ds_name VARCHAR(255),
IN host VARCHAR(255),
- OUT res_str BLOB) READS SQL DATA COMMENT 'release 1.4'
+ OUT res_str BLOB) READS SQL DATA COMMENT 'release 1.8'
proc: BEGIN
DECLARE notifd_event_name VARCHAR(255) DEFAULT 'notifd/factory/';
@@ -240,7 +240,8 @@ BEGIN
DECLARE tmp_version VARCHAR(8);
DECLARE tmp_host VARCHAR(255);
DECLARE tmp_ev_name VARCHAR(255);
- DECLARE tmp_exp, tmp_pid INT;
+ DECLARE tmp_ev_name_canon VARCHAR(255);
+ DECLARE tmp_exp, tmp_pid, dot INT;
DECLARE not_found INT DEFAULT 0;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET not_found = 1;
@@ -255,7 +256,24 @@ BEGIN
WHERE name = tmp_ev_name;
IF not_found = 1 THEN
- SET res_str = CONCAT_WS(CHAR(0),res_str,ev_name,'Not Found');
+ SET dot = LOCATE('.',tmp_ev_name);
+ IF dot != 0 THEN
+ SET tmp_ev_name_canon = SUBSTRING(tmp_ev_name,1,dot - 1);
+ SET not_found = 0;
+
+ SELECT exported,ior,version,pid,host
+ INTO tmp_exp,tmp_ior,tmp_version,tmp_pid,tmp_host
+ FROM tango.event
+ WHERE name = tmp_ev_name_canon;
+
+ IF not_found = 1 THEN
+ SET res_str = CONCAT_WS(CHAR(0),res_str,ev_name,'Not Found');
+ ELSE
+ SET res_str = CONCAT_WS(CHAR(0),res_str,ev_name,tmp_ior,tmp_version,tmp_host,CONCAT(tmp_exp),CONCAT(tmp_pid));
+ END IF;
+ ELSE
+ SET res_str = CONCAT_WS(CHAR(0),res_str,ev_name,'Not Found');
+ END IF;
ELSE
SET res_str = CONCAT_WS(CHAR(0),res_str,ev_name,tmp_ior,tmp_version,tmp_host,CONCAT(tmp_exp),CONCAT(tmp_pid));
END IF;
@@ -662,9 +680,9 @@ BEGIN
DECLARE class_name_pos INT;
DECLARE cur_dev_list CURSOR FOR
- SELECT name
+ SELECT DISTINCT name
FROM tango.device
- WHERE class = class_name AND server = serv;
+ WHERE class = class_name AND server = serv ORDER BY name;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION SET res_str = CONCAT_WS(CHAR(0),res_str,'MySQL Error');
@@ -714,7 +732,7 @@ BEGIN
DECLARE cur_dev CURSOR FOR
SELECT name,count,value
FROM tango.property
- WHERE object = obj_name ORDER BY count;
+ WHERE object = obj_name ORDER BY name,count;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION SET res_str = CONCAT_WS(CHAR(0),res_str,'MySQL Error');
@@ -746,6 +764,9 @@ BEGIN
IF serv_defined = 1 THEN
IF LOCATE('AccessControl/tango:',tmp_value) != 0 THEN
SET serv_dev_name = SUBSTRING(tmp_value,21);
+ IF LOCATE('tango://',serv_dev_name) != 0 THEN
+ SET serv_dev_name = SUBSTRING_INDEX(serv_dev_name,'/',-3);
+ END IF;
END IF;
END IF;
@@ -768,3 +789,13 @@ BEGIN
END |
DELIMITER ;
+USE tango;
+
+#
+# Update entries in the property_class tables for controlled access service
+#
+
+INSERT INTO property_class VALUES('Database','AllowedAccessCmd',32,'DbImportEvent',NULL,NULL,NULL);
+INSERT INTO property_class VALUES('Database','AllowedAccessCmd',33,'DbGetDeviceAlias',NULL,NULL,NULL);
+INSERT INTO property_class VALUES('Database','AllowedAccessCmd',34,'DbGetCSDbServerList',NULL,NULL,NULL);
+
diff --git a/debian/rules b/debian/rules
index e17dc3c..72f51dc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@
BUILDROOT=build
PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)+.*/\1/p')
+FULLDEBVERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*-.*\)/\1/p')
export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
@@ -17,6 +18,11 @@ get-orig-source:
gzip -9 ../$(PACKAGE)-$(VERSION)+dfsg.tar
ln -fs $(PACKAGE)-$(VERSION)+dfsg.tar.gz ../$(PACKAGE)_$(VERSION)+dfsg.orig.tar.gz
+sql: override_dh_auto_configure
+ # use this target to generate the dbconfig-common upgrade script once the debian/changelog is ok
+ cat $(CURDIR)/$(BUILDROOT)/cppserver/database/stored_proc.sql\
+ $(CURDIR)/$(BUILDROOT)/cppserver/database/update_db.sql > debian/sql/$(FULLDEBVERSION)
+
override_dh_auto_configure:
dh_auto_configure -- --with-omni=/usr --disable-dbcreate --disable-java --with-doxygen --disable-jpegmmx
@@ -25,9 +31,8 @@ override_dh_auto_install:
# install dbconfig-common scripts
install -d debian/tmp/usr/share/dbconfig-common/data/tango-db/install
install -p -m 644 $(CURDIR)/$(BUILDROOT)/cppserver/database/create_db.sql debian/tmp/usr/share/dbconfig-common/data/tango-db/install/mysql
- install -d debian/tmp/usr/share/dbconfig-common/data/tango-db/upgrade/mysql
- install -p -m 644 $(CURDIR)/debian/sql/upgrade-7.2.0~rc1+dfsg-1 debian/tmp/usr/share/dbconfig-common/data/tango-db/upgrade/mysql/7.2.0~rc1+dfsg-1
- install -p -m 644 $(CURDIR)/debian/sql/upgrade-7.2.6+dfsg-1 debian/tmp/usr/share/dbconfig-common/data/tango-db/upgrade/mysql/7.2.6+dfsg-1
+ install -d debian/tmp/usr/share/dbconfig-common/data/tango-db/upgrade
+ install -p -m 644 debian/mysql debian/tmp/usr/share/dbconfig-common/data/tango-db/upgrade/
# install scripts used during the configuration
install -d debian/tmp/usr/share/tango-db
--
TANGO distributed control system.
More information about the debian-science-commits
mailing list