On 15/04/15 16:26, Martin Basti wrote:
https://fedorahosted.org/freeipa/ticket/4904

Patches attached.

Also ipa-upgradeconfig part is called as a subprocess. This will be removed after installer modifications.

This patch may cause temporal upgrade issues (corner cases), until installer part will be finished.

If somebody will be hit by them, please use --skip-version-check for ipactl and ipa-server-upgrade.



Updated patches attached.

--
Martin Basti

From c7421c744d3b42c5530324df7a84632900a77d14 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Thu, 2 Apr 2015 14:14:15 +0200
Subject: [PATCH 1/3] Server Upgrade: ipa-server-upgrade command

---
 freeipa.spec.in                         |  2 +
 install/tools/Makefile.am               |  1 +
 install/tools/ipa-server-upgrade        | 12 +++++
 install/tools/man/Makefile.am           |  1 +
 install/tools/man/ipa-server-upgrade.1  | 96 +++++++++++++++++++++++++++++++++
 ipaserver/install/ipa_server_upgrade.py | 74 +++++++++++++++++++++++++
 6 files changed, 186 insertions(+)
 create mode 100644 install/tools/ipa-server-upgrade
 create mode 100644 install/tools/man/ipa-server-upgrade.1
 create mode 100644 ipaserver/install/ipa_server_upgrade.py

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 8d58f2568e1de418c25cb1bd34fc7d4736a15e54..0e262d445b80a279488fa77860168f46a0c8a045 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -660,6 +660,7 @@ fi
 %{_sbindir}/ipa-replica-manage
 %{_sbindir}/ipa-csreplica-manage
 %{_sbindir}/ipa-server-certinstall
+%{_sbindir}/ipa-server-upgrade
 %{_sbindir}/ipa-ldap-updater
 %{_sbindir}/ipa-otptoken-import
 %{_sbindir}/ipa-compat-manage
@@ -804,6 +805,7 @@ fi
 %{_mandir}/man1/ipa-replica-prepare.1.gz
 %{_mandir}/man1/ipa-server-certinstall.1.gz
 %{_mandir}/man1/ipa-server-install.1.gz
+%{_mandir}/man1/ipa-server-upgrade.1.gz
 %{_mandir}/man1/ipa-dns-install.1.gz
 %{_mandir}/man1/ipa-ca-install.1.gz
 %{_mandir}/man1/ipa-kra-install.1.gz
diff --git a/install/tools/Makefile.am b/install/tools/Makefile.am
index b791a8c748a18602f88522c3a0e3d74499700ae0..e5d45c47966a503da9f25aec13175793a36962e4 100644
--- a/install/tools/Makefile.am
+++ b/install/tools/Makefile.am
@@ -16,6 +16,7 @@ sbin_SCRIPTS =			\
 	ipa-replica-manage	\
 	ipa-csreplica-manage	\
 	ipa-server-certinstall  \
+	ipa-server-upgrade	\
 	ipactl			\
 	ipa-compat-manage	\
 	ipa-nis-manage		\
diff --git a/install/tools/ipa-server-upgrade b/install/tools/ipa-server-upgrade
new file mode 100644
index 0000000000000000000000000000000000000000..747024847a7c9d8837b4968395e2c63648a792cf
--- /dev/null
+++ b/install/tools/ipa-server-upgrade
@@ -0,0 +1,12 @@
+#!/usr/bin/python2
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+# Documentation can be found at:
+#     http://freeipa.org/page/LdapUpdate
+#     http://www.freeipa.org/page/V4/Server_Upgrade_Refactoring
+
+from ipaserver.install.ipa_server_upgrade import IPAServerUpgrade
+
+IPAServerUpgrade.run_cli()
diff --git a/install/tools/man/Makefile.am b/install/tools/man/Makefile.am
index 38c049c79fbd2ce22888b47ee576c4574e98c45b..6db1776191ca855986a152dbd4854a0dc1b744d7 100644
--- a/install/tools/man/Makefile.am
+++ b/install/tools/man/Makefile.am
@@ -12,6 +12,7 @@ man1_MANS = 				\
 	ipa-replica-prepare.1		\
 	ipa-server-certinstall.1	\
 	ipa-server-install.1		\
+	ipa-server-upgrade.1		\
 	ipa-dns-install.1		\
 	ipa-adtrust-install.1		\
 	ipa-ca-install.1		\
diff --git a/install/tools/man/ipa-server-upgrade.1 b/install/tools/man/ipa-server-upgrade.1
new file mode 100644
index 0000000000000000000000000000000000000000..9b5387301faf749515dcee6f7f5025d9916b2882
--- /dev/null
+++ b/install/tools/man/ipa-server-upgrade.1
@@ -0,0 +1,96 @@
+.\"
+.\" Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+.\"
+
+.TH "ipa-server-upgrade" "1" "April 02 2015" "FreeIPA" "FreeIPA Manual Pages"
+.SH "NAME"
+ipa\-server\-upgrade \- upgrade IPA server
+.SH "SYNOPSIS"
+ipa\-server\-upgrade [options]
+.SH "DESCRIPTION"
+ipa\-server\-upgrade is used to upgrade IPA server when the IPA packages are being updated. It is not intended to be executed by end\-users.
+
+ipa\-server\-upgrade will:
+
+    * update LDAP schema
+    * process all files with the extension .update in /usr/share/ipa/updates (including update plugins).
+    * upgrade local configurations of IPA services
+
+An update file describes an LDAP entry and a set of operations to be performed on that entry. It can be used to add new entries or modify existing entries.
+
+Blank lines and lines beginning with # are ignored.
+
+There are 7 keywords:
+
+    * default: the starting value
+    * add: add a value (or values) to an attribute
+    * remove: remove a value (or values) from an attribute
+    * only: set an attribute to this
+    * onlyifexist: set an attribute to this only if the entry exists
+    * deleteentry: remove the entry
+    * replace: replace an existing value, format is old: new
+    * addifnew: add a new attribute and value only if the attribute doesn't already exist. Only works with single\-value attributes.
+    * addifexist: add a new attribute and value only if the entry exists. This is used to update optional entries.
+
+Values is a comma\-separated field so multi\-values may be added at one time. Double or single quotes may be put around individual values that contain embedded commas.
+
+The difference between the default and add keywords is if the DN of the entry exists then default is ignored. So for updating something like schema, which will be under cn=schema, you must always use add (because cn=schema is guaranteed to exist). It will not re\-add the same information again and again.
+
+It also provides some things that can be templated such as architecture (for plugin paths), realm and domain name.
+
+The available template variables are:
+
+    * $REALM \- the kerberos realm (EXAMPLE.COM)
+    * $FQDN \- the fully\-qualified domain name of the IPA server being updated (ipa.example.com)
+    * $DOMAIN \- the domain name (example.com)
+    * $SUFFIX \- the IPA LDAP suffix (dc=example,dc=com)
+    * $ESCAPED_SUFFIX \- the ldap\-escaped IPA LDAP suffix
+    * $LIBARCH \- set to 64 on x86_64 systems to be used for plugin paths
+    * $TIME \- an integer representation of current time
+
+A few rules:
+
+   1. Only one rule per line
+   2. Each line stands alone (e.g. an only followed by an only results in the last only being used)
+   3. Adding a value that exists is ok. The request is ignored, duplicate values are not added
+   4. Removing a value that doesn't exist is ok. It is simply ignored.
+   5. If a DN doesn't exist it is created from the 'default' entry and all updates are applied
+   6. If a DN does exist the default values are skipped
+   7. Only the first rule on a line is respected
+
+ipa-server-upgrade allows to execute update plugins.
+Plugins to be executed are specified with following keyword, in update files:
+    * plugin: name of plugin
+
+This keyword is not bounded to DN, and plugin names have to be registered in API.
+
+ipa-server-upgrade updates the schema based on LDIF files.
+Any missing object classes and attribute types are added, and differing ones are updated to match the LDIF file.
+To enable this behavior, use the \-\-schema or \-\-schema-file options.
+Schema files should be in LDIF format, and may only specify attributeTypes and objectClasses attributes of cn=schema.
+
+.SH "OPTIONS"
+.TP
+\fB\-\-skip-version-check\fR
+Skip check of installed version (force upgrade)
+.TP
+\fB\-\-version\fR
+Show IPA version
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show help message and exit
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+Print debugging information
+.TP
+\fB\-q\fR, \fB\-\-quiet\fR
+Output only errors
+.TP
+\fB-\-log-file=FILE\fR
+Log to given file
+.TP
+
+.SH "EXIT STATUS"
+0 if the command was successful
+
+1 if an error occurred
diff --git a/ipaserver/install/ipa_server_upgrade.py b/ipaserver/install/ipa_server_upgrade.py
new file mode 100644
index 0000000000000000000000000000000000000000..828178407477e84d9d4a1875fa011f5874ed7456
--- /dev/null
+++ b/ipaserver/install/ipa_server_upgrade.py
@@ -0,0 +1,74 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+import sys
+
+import krbV
+
+from ipalib import api
+from ipapython import admintool, ipautil
+from ipaserver.install import installutils
+from ipaserver.install.upgradeinstance import IPAUpgrade
+
+
+class IPAServerUpgrade(admintool.AdminTool):
+    log_file_name = paths.IPAUPGRADE_LOG
+    command_name = 'ipa-server-upgrade'
+
+    usage = "%prog [options]"
+
+    @classmethod
+    def add_options(cls, parser):
+        super(IPAServerUpgrade, cls).add_options(parser, debug_option=True)
+        parser.add_option("--skip-version-check", action="store_true",
+                          dest="skip_version_check", default=False,
+                          help="skip check of installed version (force "
+                               "upgrade)")
+
+    def validate_options(self):
+        super(IPAServerUpgrade, self).validate_options(needs_root=True)
+
+        try:
+            installutils.check_server_configuration()
+        except RuntimeError as e:
+            print unicode(e)
+            sys.exit(1)
+
+    def setup_logging(self):
+        super(IPAServerUpgrade, self).setup_logging(log_file_mode='a')
+
+    def run(self):
+        super(IPAServerUpgrade, self).run()
+
+        api.bootstrap(in_server=True, context='updates')
+        api.finalize()
+
+        options = self.options
+
+        realm = krbV.default_context().default_realm
+        data_upgrade = IPAUpgrade(realm)
+        data_upgrade.create_instance()
+
+        if data_upgrade.badsyntax:
+            raise admintool.ScriptError(
+                'Bad syntax detected in upgrade file(s).', 1)
+        elif data_upgrade.upgradefailed:
+            raise admintool.ScriptError('IPA upgrade failed.', 1)
+        elif data_upgrade.modified:
+            self.log.info('Data update complete')
+        else:
+            self.log.info('Data update complete, no data were modified')
+
+        # FIXME: remove this when new installer will be ready
+        # execute upgrade of configuration
+        cmd = ['ipa-upgradeconfig', ]
+        if options.verbose:
+            cmd.append('--debug')
+        if options.quiet:
+            cmd.append('--quiet')
+            self.log.info('Executing ipa-upgradeconfig, please wait')
+        ipautil.run(cmd)
+
+    def handle_error(self, exception):
+        return installutils.handle_error(exception, self.log_file_name)
-- 
2.1.0

From c2d5a8ea14e1cd634a51782bb6e01206c9f8e3b5 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 10 Apr 2015 15:42:58 +0200
Subject: [PATCH 2/3] Server Upgrade: Verify version and platform

Verify version and platform before upgrade or ipactl start|restart

Upgrade:
* do not allow upgrade on different platforms
* do not allow upgrade data with higher version than build has

Start:
* do not start services if platform mismatch
* do not start services if upgrade is needed
* do not start services if data with higher version than build has

https://fedorahosted.org/freeipa/ticket/4904
---
 Makefile                                |  2 ++
 install/tools/ipactl                    | 20 +++++++++++
 ipaplatform/__init__.py                 | 22 ------------
 ipaplatform/__init__.py.in              | 12 +++++++
 ipaplatform/base/tasks.py               | 10 ++++++
 ipaserver/install/dsinstance.py         |  2 ++
 ipaserver/install/installutils.py       | 60 ++++++++++++++++++++++++++++++++-
 ipaserver/install/ipa_server_upgrade.py | 18 +++++++++-
 8 files changed, 122 insertions(+), 24 deletions(-)
 delete mode 100644 ipaplatform/__init__.py
 create mode 100644 ipaplatform/__init__.py.in

diff --git a/Makefile b/Makefile
index 3225a61b5b80e1ca0968e0c45f18c0ec3645df05..abf58382960099a54b8920dd0e741b9fda17682f 100644
--- a/Makefile
+++ b/Makefile
@@ -157,6 +157,8 @@ version-update: release-update
 		> ipa-client/version.m4
 
 	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
+		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
+			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
 		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py; \
 		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
 		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
diff --git a/install/tools/ipactl b/install/tools/ipactl
index b1b0b6e26fa97cdc953c86eee22e160782b57379..a978ea72bd946336e1391322639e92ec8e1c8120 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -92,6 +92,10 @@ def parse_options():
     parser.add_option("-f", "--force", action="store_true", dest="force",
                       help="If any service start fails, do not rollback the"
                       + " services, continue with the operation")
+    parser.add_option("--skip-version-check", action="store_true",
+                      dest="skip_version_check", default=False,
+                      help="skip check of installed version (force "
+                      "upgrade). WARNING: this may break your system")
 
     options, args = parser.parse_args()
     safe_options = parser.get_safe_opts(options)
@@ -101,6 +105,17 @@ def parse_options():
 def emit_err(err):
     sys.stderr.write(err + '\n')
 
+
+def version_check():
+    try:
+        installutils.check_ipa_version()
+    except installutils.IPAVersionError as e:
+        emit_err("IPA version error: %s" % e)
+        if isinstance(e, installutils.DataUpgradeRequiredError):
+            emit_err("Upgrade required: please run ipa-server-upgrade command")
+        raise IpactlError("Aborting ipactl")
+
+
 def get_config(dirsrv):
     base = DN(('cn', api.env.host), ('cn', 'masters'), ('cn', 'ipa'), ('cn', 'etc'), api.env.basedn)
     srcfilter = '(ipaConfigString=enabledService)'
@@ -217,6 +232,9 @@ def stop_dirsrv(dirsrv):
 
 def ipa_start(options):
 
+    if not options.skip_version_check:
+        version_check()
+
     if os.path.isfile(tasks.get_svc_list_file()):
         emit_err("Existing service file detected!")
         emit_err("Assuming stale, cleaning and proceeding")
@@ -313,6 +331,8 @@ def ipa_stop(options):
 
 
 def ipa_restart(options):
+    if not options.skip_version_check:
+        version_check()
     dirsrv = services.knownservices.dirsrv
     new_svc_list = []
     dirsrv_restart = True
diff --git a/ipaplatform/__init__.py b/ipaplatform/__init__.py
deleted file mode 100644
index cf342aa3f24ebcc2b3825a77c1fc66e2be512c45..0000000000000000000000000000000000000000
--- a/ipaplatform/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# Authors:
-#   Tomas Babej <tba...@redhat.com>
-#
-# Copyright (C) 2014  Red Hat
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-'''
-Module containing platform-specific functionality for every platform.
-'''
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
new file mode 100644
index 0000000000000000000000000000000000000000..61f6f3c4a36065486fb4e7a333c47127c1ea0994
--- /dev/null
+++ b/ipaplatform/__init__.py.in
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+'''
+Module containing platform-specific functionality for every platform.
+'''
+
+NAME = "__PLATFORM__"
+
+# FIXME: too much cyclic dependencies
+# from __PLATFORM__ import paths, tasks, services
diff --git a/ipaplatform/base/tasks.py b/ipaplatform/base/tasks.py
index ff71c2bd12be3b775a0ed43c8038ee3924d2c9f6..10c5e835d0d585caa989c7744d3bae9f253de0d3 100644
--- a/ipaplatform/base/tasks.py
+++ b/ipaplatform/base/tasks.py
@@ -24,6 +24,9 @@ This module contains default platform-specific implementations of system tasks.
 
 import pwd
 import grp
+
+from pkg_resources import parse_version
+
 from ipaplatform.paths import paths
 from ipapython.ipa_log_manager import log_mgr
 from ipapython import ipautil
@@ -208,5 +211,12 @@ class BaseTaskNamespace(object):
         else:
             log.debug('user %s exists', name)
 
+    def parse_ipa_version(self, version):
+        """
+        :param version: textual version
+        :return: object implementing proper __cmp__ method for version compare
+        """
+        return parse_version(version)
+
 
 task_namespace = BaseTaskNamespace()
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 8a76e773f0a464529331d9e2e459c9cc5ea0522e..aea35999381e972a6021bd35253593e982260669 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -511,6 +511,8 @@ class DsInstance(service.Service):
                                    sub_dict=self.sub_dict)
         files = ld.get_all_files(ldapupdate.UPDATES_DIR)
         ld.update(files)
+        installutils.store_ipa_version()
+
 
     def __add_referint_module(self):
         self._ldap_mod("referint-conf.ldif")
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 787a1207abfbd378074719a88734338ef79485c8..d5601436617a5bbb9490f955e9417811e451f3e7 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -35,6 +35,8 @@ from dns.exception import DNSException
 import ldap
 from nss.error import NSPRError
 
+import ipaplatform
+
 from ipapython import ipautil, sysrestore, admintool, dogtag, version
 from ipapython.admintool import ScriptError
 from ipapython.ipa_log_manager import root_logger, log_mgr
@@ -42,9 +44,10 @@ from ipalib.util import validate_hostname
 from ipapython import config
 from ipalib import errors, x509
 from ipapython.dn import DN
-from ipaserver.install import certs, service
+from ipaserver.install import certs, service, sysupgrade
 from ipaplatform import services
 from ipaplatform.paths import paths
+from ipaplatform.tasks import tasks
 
 # Used to determine install status
 IPA_MODULES = [
@@ -67,6 +70,18 @@ class HostReverseLookupError(HostLookupError):
 class HostnameLocalhost(HostLookupError):
     pass
 
+class IPAVersionError(Exception):
+    pass
+
+class PlatformMismatchError(IPAVersionError):
+    pass
+
+class DataUpgradeRequiredError(IPAVersionError):
+    pass
+
+class DataInNewerVersionError(IPAVersionError):
+    pass
+
 class ReplicaConfig:
     def __init__(self, top_dir=None):
         self.realm_name = ""
@@ -1037,3 +1052,46 @@ def load_external_cert(files, subject_base):
     ca_file.flush()
 
     return cert_file, ca_file
+
+
+def store_ipa_version():
+    """Store current data version and platform. This is required for check if
+    upgrade is required.
+    """
+    sysupgrade.set_upgrade_state('ipa', 'data_version',
+                                 version.VENDOR_VERSION)
+    sysupgrade.set_upgrade_state('ipa', 'platform', ipaplatform.NAME)
+
+
+def check_ipa_version():
+    """
+    :raise PlatformMismatchError: if platform is not the same
+    :raise DataUpgradeRequiredError: if data needs to be upgraded
+    :raise DataInNewerVersionError: older version of IPA was detected than data
+    """
+    platform = sysupgrade.get_upgrade_state('ipa', 'platform')
+    if platform is not None:
+        if platform != ipaplatform.NAME:
+            raise PlatformMismatchError(
+                "platform mismatch (expected '%s', current '%s')" % (
+                platform, ipaplatform.NAME)
+            )
+    else:
+        root_logger.debug("check_ipa_version: no platform stored")
+
+    data_version = sysupgrade.get_upgrade_state('ipa', 'data_version')
+    if data_version is not None:
+        parsed_data_ver = tasks.parse_ipa_version(data_version)
+        parsed_ipa_ver = tasks.parse_ipa_version(version.VENDOR_VERSION)
+        if parsed_data_ver < parsed_ipa_ver:
+            raise DataUpgradeRequiredError(
+                "data needs to be upgraded (expected version '%s', current "
+                "version '%s')" % (version.VENDOR_VERSION, data_version)
+            )
+        elif parsed_data_ver > parsed_ipa_ver:
+            raise DataInNewerVersionError(
+                "data are in newer version than IPA (data version '%s', IPA "
+                "version '%s')" % (data_version, version.VENDOR_VERSION)
+            )
+    else:
+        root_logger.debug("check_ipa_version: no data_version stored")
diff --git a/ipaserver/install/ipa_server_upgrade.py b/ipaserver/install/ipa_server_upgrade.py
index 828178407477e84d9d4a1875fa011f5874ed7456..00723aa2a1f9e6b0405bd72546aad87da6a87722 100644
--- a/ipaserver/install/ipa_server_upgrade.py
+++ b/ipaserver/install/ipa_server_upgrade.py
@@ -7,6 +7,7 @@ import sys
 import krbV
 
 from ipalib import api
+from ipaplatform.paths import paths
 from ipapython import admintool, ipautil
 from ipaserver.install import installutils
 from ipaserver.install.upgradeinstance import IPAUpgrade
@@ -24,7 +25,7 @@ class IPAServerUpgrade(admintool.AdminTool):
         parser.add_option("--skip-version-check", action="store_true",
                           dest="skip_version_check", default=False,
                           help="skip check of installed version (force "
-                               "upgrade)")
+                               "upgrade). WARNING: this may break your system")
 
     def validate_options(self):
         super(IPAServerUpgrade, self).validate_options(needs_root=True)
@@ -46,6 +47,18 @@ class IPAServerUpgrade(admintool.AdminTool):
 
         options = self.options
 
+        if not options.skip_version_check:
+            # check IPA version and data version
+            try:
+                installutils.check_ipa_version()
+            except (installutils.PlatformMismatchError,
+                    installutils.DataInNewerVersionError) as e:
+                raise admintool.ScriptError(
+                    'Unable to execute IPA upgrade: %s' % e, 1)
+            except installutils.IPAVersionError:
+                # Ignore other errors
+                pass
+
         realm = krbV.default_context().default_realm
         data_upgrade = IPAUpgrade(realm)
         data_upgrade.create_instance()
@@ -60,6 +73,9 @@ class IPAServerUpgrade(admintool.AdminTool):
         else:
             self.log.info('Data update complete, no data were modified')
 
+        # store new data version after upgrade
+        installutils.store_ipa_version()
+
         # FIXME: remove this when new installer will be ready
         # execute upgrade of configuration
         cmd = ['ipa-upgradeconfig', ]
-- 
2.1.0

From 54a69930279070599c43683219e4b6d39f7a930c Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 10 Apr 2015 15:47:25 +0200
Subject: [PATCH 3/3] Server Upgrade: use ipa-server-upgrade in RPM upgrade

https://fedorahosted.org/freeipa/ticket/4904
---
 freeipa.spec.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 0e262d445b80a279488fa77860168f46a0c8a045..af8c3aa2ec53a89ad8e26d5ef124d2fcf8b34316 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -513,8 +513,7 @@ fi
 %posttrans server
 # This must be run in posttrans so that updates from previous
 # execution that may no longer be shipped are not applied.
-/usr/sbin/ipa-ldap-updater --upgrade --quiet >/dev/null || :
-/usr/sbin/ipa-upgradeconfig --quiet >/dev/null || :
+/usr/sbin/ipa-server-upgrade --quiet >/dev/null || :
 
 # Restart IPA processes. This must be also run in postrans so that plugins
 # and software is in consistent state
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to