[pkg-bacula-commits] [bacula] 01/03: Added debian/patches/upstream-fix-sqlite-db-creation.patch
Carsten Leonhardt
leo at moszumanska.debian.org
Mon Aug 28 23:53:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
leo pushed a commit to branch master
in repository bacula.
commit 3bb954f5fb2b1768cbcf6626bedcdf9dcb7977e9
Author: Carsten Leonhardt <leo at debian.org>
Date: Tue Aug 29 00:38:21 2017 +0200
Added debian/patches/upstream-fix-sqlite-db-creation.patch
This change still needs testing
---
debian/changelog | 1 +
debian/patches/series | 1 +
.../patches/upstream-fix-sqlite-db-creation.patch | 68 ++++++++++++++++++++++
debian/scripts/install-dbconfig | 6 +-
4 files changed, 71 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 5481aad..efb0a8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,7 @@ bacula (9.0.3+dfsg-1) unstable; urgency=low
* Added debian/patches/upstream-fix-sqlite-update.patch
* Renamed debian patches to indicate whether they are debian specific or
fit for upstream
+ * Added debian/patches/upstream-fix-sqlite-db-creation.patch
--
diff --git a/debian/patches/series b/debian/patches/series
index e0f340d..2213db9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ debian-enable-hardening-for-bat.patch
non-forking-systemd-units.patch
upstream-bring-back-tmpfiles-configuration.patch
upstream-fix-sqlite-update.patch
+upstream-fix-sqlite-db-creation.patch
diff --git a/debian/patches/upstream-fix-sqlite-db-creation.patch b/debian/patches/upstream-fix-sqlite-db-creation.patch
new file mode 100644
index 0000000..7b78d2c
--- /dev/null
+++ b/debian/patches/upstream-fix-sqlite-db-creation.patch
@@ -0,0 +1,68 @@
+Description: Fix sqlite3 database creation script
+Author: Carsten Leonhardt <leo at debian.org>
+Bug: http://bugs.bacula.org/view.php?id=2305
+Last-Update: 2017-08-29
+--- a/src/cats/make_sqlite3_tables.in
++++ b/src/cats/make_sqlite3_tables.in
+@@ -175,6 +175,8 @@
+ PRIMARY KEY(FileSetId)
+ );
+
++CREATE INDEX fileset_name_idx on FileSet (FileSet);
++
+ CREATE TABLE JobMedia (
+ JobMediaId INTEGER,
+ JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+@@ -246,6 +248,7 @@
+ PRIMARY KEY(MediaId)
+ );
+
++CREATE UNIQUE INDEX Media_Volumename_Id ON Media (VolumeName);
+ CREATE INDEX inx8 ON Media (PoolId);
+ CREATE INDEX inx9 ON Media (StorageId);
+
+@@ -315,6 +318,7 @@
+ PRIMARY KEY (PoolId)
+ );
+
++CREATE INDEX pool_name_idx on Pool (Name);
+
+ CREATE TABLE Client (
+ ClientId INTEGER,
+@@ -327,6 +331,8 @@
+ PRIMARY KEY(ClientId)
+ );
+
++CREATE UNIQUE INDEX client_name_idx on Client (Name);
++
+ CREATE TABLE BaseFiles (
+ BaseId BIGINT,
+ BaseJobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+@@ -346,18 +352,6 @@
+ PRIMARY KEY (UnsavedId)
+ );
+
+-
+-CREATE TABLE NextId (
+- id INTEGER UNSIGNED DEFAULT 0,
+- TableName TEXT NOT NULL,
+- PRIMARY KEY (TableName)
+- );
+-
+-
+-
+--- Initialize JobId to start at 1
+-INSERT INTO NextId (id, TableName) VALUES (1, 'Job');
+-
+ CREATE TABLE Version (
+ VersionId INTEGER UNSIGNED NOT NULL
+ );
+@@ -472,7 +466,7 @@
+ ('I', 'Incomplete Job',25);
+
+ -- Initialize Version
+-INSERT INTO Version (VersionId) VALUES (15);
++INSERT INTO Version (VersionId) VALUES (16);
+
+ PRAGMA default_cache_size = 100000;
+ PRAGMA synchronous = NORMAL;
diff --git a/debian/scripts/install-dbconfig b/debian/scripts/install-dbconfig
index 1ed2fb0..3ad5408 100755
--- a/debian/scripts/install-dbconfig
+++ b/debian/scripts/install-dbconfig
@@ -113,11 +113,7 @@ done
# check if this script needs to be updated
# we check for all db types just to be on the safe side
-### begin temporary fix XXX
-working_variants="mysql pgsql"
-for db in $working_variants; do
-#for db in $variants; do
-### end temporary fix XXX
+for db in $variants; do
set_longdb
sourcefile="src/cats/make_"$longdb"_tables"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list