Package: bacula-director-sqlite3
Version: 3.0.2-1
Severity: normal
Tags: patch

Hi.

After the conversion from sqlite2 to sqlite3 the new database is owned
by root:root.

The attached patch fixes this by adding another chown after the conversion.

Grüße,
Sven.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.30.5-353 (SMP w/4 CPU cores; PREEMPT)
Locale: lang=de...@euro, lc_ctype=de...@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
diff -u bacula-3.0.2/debian/bacula-director-sqlite3.postinst bacula-3.0.2/debian/bacula-director-sqlite3.postinst
--- bacula-3.0.2/debian/bacula-director-sqlite3.postinst
+++ bacula-3.0.2/debian/bacula-director-sqlite3.postinst
@@ -67,9 +67,11 @@
                 else 
                     if [ -f "$DB" ] && file "$DB" | grep -q "SQLite 2"; then
                         echo -n "Converting SQLite2 database to SQLite3 format..."
-                        sqlite "$DB" .dump | sqlite3 "$DB.sqlite3"
+                        sqlite "$DB" .dump | sed 's/ INTEGER UNSIGNED AUTOINCREMENT,/ INTEGER,/' | sqlite3 "$DB.sqlite3"
                         mv "$DB" "$DB.sqlite2"
                         mv "$DB.sqlite3" "$DB"
+                        touch $DB;	#Bug 243983
+                        chown bacula:bacula $DB
                         echo "Ok."
 			# On upgrade, unconditionally change Catalog 
 			echo -n "Upgrading SQLite3 tables to v11 format..."

Reply via email to