[ovirt-engine/f18] Fixes for #884444 and #869457

Juan Hernandez jhernand at fedoraproject.org
Thu Dec 6 15:13:27 UTC 2012


commit 7a15891d2fb7ad840e4c042be2de6e287ada7a18
Author: Juan Hernandez <juan.hernandez at redhat.com>
Date:   Thu Dec 6 15:48:40 2012 +0100

    Fixes for #884444 and #869457
    
    Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>

 .gitignore                                         |    1 -
 ovirt-engine-check-for-postgresql-9-not-91.patch   |   36 ++++++++++++++++++++
 ...engine-dont-try-to-lock-frontend-packages.patch |   30 ++++++++++++++++
 ovirt-engine-fix-postgresdbenginedialect.patch     |   25 --------------
 ...ed-allinone-plugin-for-new-security-model.patch |   30 ++++++++++++++++
 ovirt-engine-use-pid-instead-of-procpid.patch      |   30 ++++++++++++++++
 ovirt-engine.spec                                  |   27 +++++++++++++--
 7 files changed, 150 insertions(+), 29 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c0dcf01..db6c097 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,4 +28,3 @@ target
 /frontend/webadmin/modules/userportal-gwtp/gen
 /frontend/webadmin/modules/webadmin/gen
 /frontend/webadmin/modules/webadmin/war
-/ovirt-engine-3.1.0.tar.gz
diff --git a/ovirt-engine-check-for-postgresql-9-not-91.patch b/ovirt-engine-check-for-postgresql-9-not-91.patch
new file mode 100644
index 0000000..6c94b52
--- /dev/null
+++ b/ovirt-engine-check-for-postgresql-9-not-91.patch
@@ -0,0 +1,36 @@
+From 90f4704144272c5adfcbae31a132b20079c1b0ef Mon Sep 17 00:00:00 2001
+From: Juan Hernandez <juan.hernandez at redhat.com>
+Date: Thu, 6 Dec 2012 14:59:28 +0100
+Subject: [PATCH] Check for PostgreSQL 9.*, not 9.1
+
+The script used to create the database checks the version number of
+PostgreSQL in order to decide how to create the UUID extension, as this
+has to be done differently in PostgreSQL 8 and PostgreSQL 9. But the
+scripts checks if the version number starts with "9.1" and this means
+that if the version is 9.2 it will fail. This is the case in the latest
+Fedora 18, the version of PostgreSQL included is 9.2.
+
+This patch changes the script so that it will check if the version
+number starts with "9.", this should work correctly in Fedora 18.
+
+Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
+---
+ backend/manager/dbscripts/engine-db-install.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/manager/dbscripts/engine-db-install.sh b/backend/manager/dbscripts/engine-db-install.sh
+index fe17273..add9e24 100755
+--- a/backend/manager/dbscripts/engine-db-install.sh
++++ b/backend/manager/dbscripts/engine-db-install.sh
+@@ -367,7 +367,7 @@ updateDBUsers()
+         pushd $ENGINE_DB_SCRIPTS_DIR >> $LOGFILE
+         source ./dbfunctions.sh
+         source ./dbcustomfunctions.sh
+-        if [ $(pg_version | egrep "^9.1") ]; then
++        if [ $(pg_version | egrep "^9\.") ]; then
+             echo "Creating uuid-ossp extension..."
+             USERNAME=$DB_ADMIN
+             DATABASE=$TEMPLATE
+-- 
+1.7.11.7
+
diff --git a/ovirt-engine-dont-try-to-lock-frontend-packages.patch b/ovirt-engine-dont-try-to-lock-frontend-packages.patch
new file mode 100644
index 0000000..cb79272
--- /dev/null
+++ b/ovirt-engine-dont-try-to-lock-frontend-packages.patch
@@ -0,0 +1,30 @@
+From c55d9731f5f31c4f3b7ceac04541bcd31bd381b0 Mon Sep 17 00:00:00 2001
+From: Juan Hernandez <juan.hernandez at redhat.com>
+Date: Thu, 6 Dec 2012 15:56:51 +0100
+Subject: [PATCH] Don't try to lock frontend packages
+
+The frontend packages are not available in Fedora 18 and the newer
+versions of the yum locking plugin don't accept packages that are not
+installed.
+---
+ packaging/fedora/setup/basedefs.py | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/packaging/fedora/setup/basedefs.py b/packaging/fedora/setup/basedefs.py
+index 022dc4d..bf7cf4b 100644
+--- a/packaging/fedora/setup/basedefs.py
++++ b/packaging/fedora/setup/basedefs.py
+@@ -154,10 +154,7 @@ RPM_LOCK_LIST = """
+ ovirt-engine
+ ovirt-engine-backend
+ ovirt-engine-config
+-ovirt-engine-genericapi
+ ovirt-engine-notification-service
+ ovirt-engine-restapi
+ ovirt-engine-tools-common
+-ovirt-engine-userportal
+-ovirt-engine-webadmin-portal
+ """
+-- 
+1.7.11.7
+
diff --git a/ovirt-engine-updated-allinone-plugin-for-new-security-model.patch b/ovirt-engine-updated-allinone-plugin-for-new-security-model.patch
new file mode 100644
index 0000000..8a41427
--- /dev/null
+++ b/ovirt-engine-updated-allinone-plugin-for-new-security-model.patch
@@ -0,0 +1,30 @@
+From 2697b71ed8e67250c9d3928e6f5707ff60504c7d Mon Sep 17 00:00:00 2001
+From: Alex Lourie <alourie at redhat.com>
+Date: Mon, 3 Sep 2012 18:30:01 +0300
+Subject: [PATCH] packaging: Updated allinone plugin for new security mode
+
+Change-Id: I0cec49b25fedba3994b84571e8a4845f3d0da536
+Signed-off-by: Alex Lourie <alourie at redhat.com>
+(cherry picked from commit c833bba55a19b2e2383d532b87c363a7895a8927)
+---
+ packaging/fedora/setup/plugins/all_in_one_100.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/packaging/fedora/setup/plugins/all_in_one_100.py b/packaging/fedora/setup/plugins/all_in_one_100.py
+index f6fa7ce..1e517ae 100644
+--- a/packaging/fedora/setup/plugins/all_in_one_100.py
++++ b/packaging/fedora/setup/plugins/all_in_one_100.py
+@@ -201,7 +201,9 @@ def initAPI():
+     try:
+         controller.CONF["API_OBJECT"] = API(url=URL,
+                                         username=USERNAME,
+-                                        password=controller.CONF['AUTH_PASS'])
++                                        password=controller.CONF['AUTH_PASS'],
++                                        ca_file=basedefs.FILE_CA_CRT_SRC,
++                                    )
+     except:
+         logging.error(traceback.format_exc())
+         raise Exception(ERROR_CREATE_API_OBJECT)
+-- 
+1.7.11.7
+
diff --git a/ovirt-engine-use-pid-instead-of-procpid.patch b/ovirt-engine-use-pid-instead-of-procpid.patch
new file mode 100644
index 0000000..214d8f9
--- /dev/null
+++ b/ovirt-engine-use-pid-instead-of-procpid.patch
@@ -0,0 +1,30 @@
+From eb6b82c9549fd38eb680d6b0f04cf5db900ca469 Mon Sep 17 00:00:00 2001
+From: Juan Hernandez <juan.hernandez at redhat.com>
+Date: Thu, 6 Dec 2012 15:42:14 +0100
+Subject: [PATCH] Use pid instead of procpid
+
+The version of PostgreSQL included in Fedora 18 changed the name of
+column procpid in table pg_stat_activity to pid. This affects the
+engine-cleanup script.
+
+Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
+---
+ packaging/fedora/setup/common_utils.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/packaging/fedora/setup/common_utils.py b/packaging/fedora/setup/common_utils.py
+index 0af2130..d5ef254 100755
+--- a/packaging/fedora/setup/common_utils.py
++++ b/packaging/fedora/setup/common_utils.py
+@@ -753,7 +753,7 @@ def clearDbConnections(dbName):
+ 
+     # Disconnect active connections
+     logging.info("Disconnect active connections from DB '%s'" % dbName)
+-    query = "SELECT pg_terminate_backend(procpid) FROM pg_stat_activity WHERE datname = '%s'" % dbName
++    query = "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '%s'" % dbName
+     cmd = [basedefs.EXEC_PSQL, "-U", getDbAdminUser(), "-c", query]
+     execCmd(cmd, None, True, output_messages.ERR_DB_CONNECTIONS_CLEAR)
+ 
+-- 
+1.7.11.7
+
diff --git a/ovirt-engine.spec b/ovirt-engine.spec
index e5472f5..9795b4f 100644
--- a/ovirt-engine.spec
+++ b/ovirt-engine.spec
@@ -24,7 +24,7 @@ bin/getent group %{engine_group} >/dev/null || /sbin/groupadd -r %{engine_group}
 
 Name: ovirt-engine
 Version: 3.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Management server for Open Virtualization
 Group: Applications/System
 License: ASL 2.0
@@ -73,6 +73,15 @@ Patch110: %{name}-add-readme.patch
 # or webadmin:
 Patch120: %{name}-replace-index-page.patch
 
+# Don't try to lock the frontend packages, as they are not provided in
+# Fedora yet:
+Patch130: %{name}-dont-try-to-lock-frontend-packages.patch
+
+# Check for PostgreSQL version 9, not 9.1:
+Patch200: %{name}-check-for-postgresql-9-not-91.patch
+Patch210: %{name}-updated-allinone-plugin-for-new-security-model.patch
+Patch220: %{name}-use-pid-instead-of-procpid.patch
+
 
 BuildArch: noarch
 
@@ -304,7 +313,7 @@ The configuration tool for oVirt Engine
 Summary: All-in-one plugin for oVirt Engine's setup
 Group: Applications/System
 Requires: %{name}-setup
-Requires: %{name}-sdk
+Requires: %{name}-sdk >= 3.2
 Requires: vdsm
 
 %description setup-plugin-allinone
@@ -316,7 +325,7 @@ All-in-one plugin for oVirt Engine's setup
 # Unpack and patch the sources:
 %setup -q -c -n %{name}-%{version}
 
-# Apply the patches:
+# Adjustments for Fedora:
 %patch10 -p1
 %patch20 -p1
 %patch30 -p1
@@ -329,6 +338,12 @@ All-in-one plugin for oVirt Engine's setup
 %patch100 -p1
 %patch110 -p1
 %patch120 -p1
+%patch130 -p1
+
+# Backports and fixes:
+%patch200 -p1
+%patch210 -p1
+%patch220 -p1
 
 
 %build
@@ -752,6 +767,12 @@ fi
 
 
 %changelog
+* Thu Dec 06 2012 Juan Hernandez <juan.hernandez at redhat.com> - 3.1.0-2
+- Check for PostgreSQL 9 instead of 9.1 (#884444)
+- Update all in one plugin for new security model (#869457)
+- Use pid instead of procpid in engine-cleanup
+- Don't try to lock frontend packages
+
 * Thu Aug 09 2012 Juan Hernandez <juan.hernandez at redhat.com> - 3.1.0-1
 - Update to upstream 3.1 release
 


More information about the scm-commits mailing list