Sebastien Jodogne pushed to branch master at Debian Med / orthanc-postgresql
Commits: 37e19e5b by jodogne-guest at 2018-09-03T15:25:06Z Ignore loading of pg_trgm extension if insufficient privileges. Closes: #906771 - - - - - 6458a6ab by jodogne-guest at 2018-09-03T15:33:41Z typo, upgrade Standards-Version - - - - - 9683f775 by jodogne-guest at 2018-09-03T15:42:40Z Upload to unstable - - - - - 4 changed files: - debian/changelog - debian/control - + debian/patches/pg_trgm - debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,9 @@ +orthanc-postgresql (2.2-2) unstable; urgency=medium + + * Ignore loading of pg_trgm extension if insufficient privileges. Closes: #906771 + + -- Sebastien Jodogne <[email protected]> Mon, 03 Sep 2018 16:59:26 +0200 + orthanc-postgresql (2.2-1) unstable; urgency=medium * New upstream version ===================================== debian/control ===================================== @@ -13,7 +13,7 @@ Build-Depends: cmake, postgresql-server-dev-all, unzip, uuid-dev -Standards-Version: 4.1.5 +Standards-Version: 4.2.1 Vcs-Browser: https://salsa.debian.org/med-team/orthanc-postgresql Vcs-Git: https://salsa.debian.org/med-team/orthanc-postgresql.git Homepage: https://www.orthanc-server.com/static.php?page=postgresql ===================================== debian/patches/pg_trgm ===================================== @@ -0,0 +1,51 @@ +Description: Fix uncaught exception preventing db initialization (related to pg_trgm) +Author: Sebastien Jodogne <[email protected]> +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: OrthancPostgreSQL-2.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp +=================================================================== +--- OrthancPostgreSQL-2.2.orig/PostgreSQL/Plugins/PostgreSQLIndex.cpp ++++ OrthancPostgreSQL-2.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp +@@ -113,6 +113,18 @@ namespace OrthancDatabases + SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision); + } + ++ if (revision != 1) ++ { ++ LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema revision: " << revision; ++ throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); ++ } ++ ++ t.Commit(); ++ } ++ ++ { ++ PostgreSQLTransaction t(*db); ++ + int hasTrigram = 0; + if (!LookupGlobalIntegerProperty(hasTrigram, *db, t, Orthanc::GlobalProperty_HasTrigramIndex) || + hasTrigram != 1) +@@ -139,6 +151,8 @@ namespace OrthancDatabases + + SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1); + LOG(WARNING) << "Trigram index has been created"; ++ ++ t.Commit(); + } + catch (Orthanc::OrthancException&) + { +@@ -148,14 +162,6 @@ namespace OrthancDatabases + << "PostgreSQL server, e.g. on Debian: sudo apt install postgresql-contrib"; + } + } +- +- if (revision != 1) +- { +- LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema revision: " << revision; +- throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); +- } +- +- t.Commit(); + } + + return db.release(); ===================================== debian/patches/series ===================================== @@ -1,2 +1,3 @@ find-orthanc-dev shlibs +pg_trgm View it on GitLab: https://salsa.debian.org/med-team/orthanc-postgresql/compare/0e74423e737fe50157195ec4be7921d85b142ef6...9683f775efc618409b7111cb664ccb2ad3444626 -- View it on GitLab: https://salsa.debian.org/med-team/orthanc-postgresql/compare/0e74423e737fe50157195ec4be7921d85b142ef6...9683f775efc618409b7111cb664ccb2ad3444626 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
