diff --git a/base/anaconda/centos/build_srpm.data b/base/anaconda/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/anaconda/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/anaconda/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/anaconda/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 51769f19a..000000000 --- a/base/anaconda/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d52fda6215af4f2d51884a10c04d3c7a44d100dd Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 13 Nov 2017 16:38:15 -0500 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/anaconda.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index e2d706d..00b19c4 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -3,7 +3,7 @@ - Summary: Graphical system installer - Name: anaconda - Version: 21.48.22.147 --Release: 1%{?dist} -+Release: 1.el7.centos%{?_tis_dist}.%{tis_patch_ver} - License: GPLv2+ and MIT - Group: Applications/System - URL: http://fedoraproject.org/wiki/Anaconda --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/0002-Add-TIS-patches.patch b/base/anaconda/centos/meta_patches/0002-Add-TIS-patches.patch deleted file mode 100644 index 93eee09c5..000000000 --- a/base/anaconda/centos/meta_patches/0002-Add-TIS-patches.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6bec7d96120f7eef019ab2841265bf4b74ebc64d Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 13 Nov 2017 17:22:49 -0500 -Subject: [PATCH] Add TIS patches - ---- - SPECS/anaconda.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index 00b19c4..79e1c55 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -24,6 +24,9 @@ Patch8: 9800-rpmostreepayload-Rework-remote-add-handling.patch - Patch9: yumpayload-dont-verify-disabled-repos.patch - Patch10: anaconda-centos-armhfp-extloader.patch - -+# WRS -+Patch10001: 0001-TIS-Progress-and-error-handling.patch -+ - # Versions of required components (done so we make sure the buildrequires - # match the requires versions of things). - %define dbusver 1.2.3 -@@ -250,6 +253,9 @@ runtime on NFS/HTTP/FTP servers or local disks. - %patch10 -p1 - %endif - -+# WRS -+%patch10001 -p1 -+ - %build - %configure --disable-static \ - --enable-introspection \ --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/0003-revert-7.4-grub2-efi-handling.patch b/base/anaconda/centos/meta_patches/0003-revert-7.4-grub2-efi-handling.patch deleted file mode 100644 index ad42e87b8..000000000 --- a/base/anaconda/centos/meta_patches/0003-revert-7.4-grub2-efi-handling.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9ebc2f9343cc214fb1e590221e4791f10a2f87d1 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 17 Nov 2017 12:08:27 -0500 -Subject: [PATCH] revert 7.4 grub2 efi handling - ---- - SPECS/anaconda.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index 79e1c55..2e5ece9 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -26,6 +26,7 @@ Patch10: anaconda-centos-armhfp-extloader.patch - - # WRS - Patch10001: 0001-TIS-Progress-and-error-handling.patch -+Patch10002: 0002-revert-7.4-grub2-efi-handling.patch - - # Versions of required components (done so we make sure the buildrequires - # match the requires versions of things). -@@ -255,6 +256,7 @@ runtime on NFS/HTTP/FTP servers or local disks. - - # WRS - %patch10001 -p1 -+%patch10002 -p1 - - %build - %configure --disable-static \ --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/0004-Upversion-rpm-devel-dependency.patch b/base/anaconda/centos/meta_patches/0004-Upversion-rpm-devel-dependency.patch deleted file mode 100644 index d49cc0627..000000000 --- a/base/anaconda/centos/meta_patches/0004-Upversion-rpm-devel-dependency.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 709f54c6e799c23a9a374dfca6196ec08102b658 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 23 Nov 2017 16:35:13 -0500 -Subject: [PATCH] Upversion rpm-devel dependency - ---- - SPECS/anaconda.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index 2e5ece9..174dbee 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -51,7 +51,7 @@ Patch10002: 0002-revert-7.4-grub2-efi-handling.patch - %define pypartedver 2.5-2 - %define pythonpyblockver 0.45 - %define pythonurlgrabberver 3.9.1-5 --%define rpmver 4.10.0 -+%define rpmver 4.14.0 - %define sckeyboardver 1.3.1 - %define utillinuxver 2.15.1 - %define yumutilsver 1.1.11-3 --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/0005-Add-TIS-patches-for-host-lookup.patch b/base/anaconda/centos/meta_patches/0005-Add-TIS-patches-for-host-lookup.patch deleted file mode 100644 index 3b6ced3ae..000000000 --- a/base/anaconda/centos/meta_patches/0005-Add-TIS-patches-for-host-lookup.patch +++ /dev/null @@ -1,53 +0,0 @@ -From e54422230c27e53436fe94a639a04aaf65f787e1 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 23 Nov 2017 16:50:10 -0500 -Subject: [PATCH] Add TIS patches for host lookup - ---- - SPECS/anaconda.spec | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index 174dbee..8541334 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -27,6 +27,8 @@ Patch10: anaconda-centos-armhfp-extloader.patch - # WRS - Patch10001: 0001-TIS-Progress-and-error-handling.patch - Patch10002: 0002-revert-7.4-grub2-efi-handling.patch -+Patch10003: 0003-Set-default-hostname-to-localhost.patch -+Patch10004: 0004-Cache-server-ip-in-etc-hosts.patch - - # Versions of required components (done so we make sure the buildrequires - # match the requires versions of things). -@@ -257,6 +259,8 @@ runtime on NFS/HTTP/FTP servers or local disks. - # WRS - %patch10001 -p1 - %patch10002 -p1 -+%patch10003 -p1 -+%patch10004 -p1 - - %build - %configure --disable-static \ -@@ -275,6 +279,10 @@ desktop-file-install ---dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_ - mkdir -p %{buildroot}%{_datadir}/anaconda/site-python - install -m 0644 pyanaconda/sitecustomize.py %{buildroot}%{_datadir}/anaconda/site-python/ - %endif -+ -+# Add anaconda-preexec script -+install -m 0755 scripts/anaconda-preexec %{buildroot}%{_sbindir}/anaconda-preexec -+ - # NOTE: If you see "error: Installed (but unpackaged) file(s) found" that include liveinst files, - # check the IS_LIVEINST_ARCH in configure.ac to make sure your architecture is properly defined - -@@ -323,6 +331,7 @@ update-desktop-database &> /dev/null || : - %{_sysconfdir}/X11/xinit/xinitrc.d/* - %{_datadir}/applications/*.desktop - %endif -+%{_sbindir}/anaconda-preexec - - %files gui - %{_libdir}/python*/site-packages/pyanaconda/ui/gui/* --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/0006-Add-support-for-https-and-IPv6-to-anaconda-preexec.patch b/base/anaconda/centos/meta_patches/0006-Add-support-for-https-and-IPv6-to-anaconda-preexec.patch deleted file mode 100644 index a32fe7a33..000000000 --- a/base/anaconda/centos/meta_patches/0006-Add-support-for-https-and-IPv6-to-anaconda-preexec.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 9a2fa4a719df870296f8559bbf775696b49847c5 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 7 Feb 2020 14:09:28 -0500 -Subject: [PATCH] Add support for https and IPv6 to anaconda-preexec - -Include the source patch that adds support for https and IPv6. - -Signed-off-by: Don Penney ---- - SPECS/anaconda.spec | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec -index c482f38..8fea2fa 100644 ---- a/SPECS/anaconda.spec -+++ b/SPECS/anaconda.spec -@@ -24,11 +24,12 @@ Patch8: 9800-rpmostreepayload-Rework-remote-add-handling.patch - Patch9: yumpayload-dont-verify-disabled-repos.patch - Patch10: anaconda-centos-armhfp-extloader.patch - --# WRS -+# StarlingX - Patch10001: 0001-TIS-Progress-and-error-handling.patch - Patch10002: 0002-revert-7.4-grub2-efi-handling.patch - Patch10003: 0003-Set-default-hostname-to-localhost.patch - Patch10004: 0004-Cache-server-ip-in-etc-hosts.patch -+Patch10005: 0005-Add-support-for-IPv6-and-https-to-anaconda-preexec.patch - - # Versions of required components (done so we make sure the buildrequires - # match the requires versions of things). -@@ -256,11 +257,12 @@ runtime on NFS/HTTP/FTP servers or local disks. - %patch10 -p1 - %endif - --# WRS -+# StarlingX - %patch10001 -p1 - %patch10002 -p1 - %patch10003 -p1 - %patch10004 -p1 -+%patch10005 -p1 - - %build - %configure --disable-static \ --- -1.8.3.1 - diff --git a/base/anaconda/centos/meta_patches/PATCH_ORDER b/base/anaconda/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 6381637f3..000000000 --- a/base/anaconda/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,6 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-patches.patch -0003-revert-7.4-grub2-efi-handling.patch -0004-Upversion-rpm-devel-dependency.patch -0005-Add-TIS-patches-for-host-lookup.patch -0006-Add-support-for-https-and-IPv6-to-anaconda-preexec.patch diff --git a/base/anaconda/centos/patches/0001-TIS-Progress-and-error-handling.patch b/base/anaconda/centos/patches/0001-TIS-Progress-and-error-handling.patch deleted file mode 100644 index 3fbc5581d..000000000 --- a/base/anaconda/centos/patches/0001-TIS-Progress-and-error-handling.patch +++ /dev/null @@ -1,394 +0,0 @@ -From fa37cfcf560506f49bb00b9d216b1e7646a6905b Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 13 Nov 2017 17:21:05 -0500 -Subject: [PATCH] TIS Progress and error handling - ---- - data/tmux.conf | 3 +- - pyanaconda/errors.py | 24 +++++++-- - pyanaconda/flags.py | 1 + - pyanaconda/install.py | 4 ++ - pyanaconda/kickstart.py | 3 ++ - pyanaconda/packaging/rpmostreepayload.py | 5 ++ - pyanaconda/packaging/yumpayload.py | 15 +++++- - pyanaconda/tisnotify.py | 91 ++++++++++++++++++++++++++++++++ - pyanaconda/ui/gui/hubs/progress.py | 4 ++ - pyanaconda/ui/tui/spokes/progress.py | 4 ++ - 10 files changed, 147 insertions(+), 7 deletions(-) - create mode 100644 pyanaconda/tisnotify.py - -diff --git a/data/tmux.conf b/data/tmux.conf -index 89f788b..7903b06 100644 ---- a/data/tmux.conf -+++ b/data/tmux.conf -@@ -1,6 +1,7 @@ - # tmux.conf for the anaconda environment - - bind -n M-tab next -+bind -n C-o next - bind -n F1 list-keys - - set-option -s exit-unattached off -@@ -10,7 +11,7 @@ set-option -g history-limit 10000 - - new-session -s anaconda -n main "anaconda" - --set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab | Help: F1 ")' -+set-option status-right '#[fg=blue]#(echo -n "Switch: Alt+Tab or Ctrl-o ")' - - new-window -d -n shell "bash --login" - new-window -d -n log "tail -F /tmp/anaconda.log" -diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py -index 860b228..1d1d34b 100644 ---- a/pyanaconda/errors.py -+++ b/pyanaconda/errors.py -@@ -19,6 +19,7 @@ - # Author(s): Chris Lumens - - from pyanaconda.i18n import _ -+from pyanaconda.tisnotify import tisnotify - - __all__ = ["ERROR_RAISE", "ERROR_CONTINUE", "ERROR_RETRY", - "InvalidImageSizeError", "MissingImageError", "MediaUnmountError", -@@ -81,6 +82,19 @@ ERROR_RAISE = 0 - ERROR_CONTINUE = 1 - ERROR_RETRY = 2 - -+# -+# WRS: If a fatal error occurs in a %pre, anaconda hasn't setup the UI yet, -+# and an exception occurs in the error handler. This is a basic dummy UI -+# to avoid this exception and print the error message. -+# -+class DefaultUI(object): -+ def __init__(self): -+ pass -+ -+ def showError(self, msg): -+ print "\n\n", msg -+ -+ - ### - ### TOP-LEVEL ERROR HANDLING OBJECT - ### -@@ -304,12 +318,12 @@ class ErrorHandler(object): - """ - rc = ERROR_RAISE - -+ # WRS: Notify the controller installation has failed -+ tisnotify.failed() -+ - if not self.ui: -- # While Pylint thinks something else, this should be likely OK -- # for an exception handler. -- # -- # pylint: disable=misplaced-bare-raise -- raise -+ # WRS: Use the basic UI -+ self.ui = DefaultUI() - - _map = {"PartitioningError": self._partitionErrorHandler, - "FSResizeError": self._fsResizeHandler, -diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py -index 8a97f95..3d0d2da 100644 ---- a/pyanaconda/flags.py -+++ b/pyanaconda/flags.py -@@ -71,6 +71,7 @@ class Flags(object): - self.ksprompt = True - self.rescue_mode = False - self.kexec = False -+ self.tisNotifyPort = "0" - # nosave options - self.nosave_input_ks = False - self.nosave_output_ks = False -diff --git a/pyanaconda/install.py b/pyanaconda/install.py -index 26e1b26..bd8f85b 100644 ---- a/pyanaconda/install.py -+++ b/pyanaconda/install.py -@@ -35,6 +35,9 @@ from pyanaconda.ui.lib.entropy import wait_for_entropy - from pyanaconda.kexec import setup_kexec - from pyanaconda.kickstart import runPostScripts, runPreInstallScripts - from pykickstart.constants import SNAPSHOT_WHEN_POST_INSTALL -+ -+from pyanaconda.tisnotify import tisnotify -+ - import logging - import blivet - log = logging.getLogger("anaconda") -@@ -139,6 +142,7 @@ def doConfiguration(storage, payload, ksdata, instClass): - with progress_report(N_("Creating snapshots")): - ksdata.snapshot.execute(storage, ksdata, instClass) - -+ tisnotify.installed() - progress_complete() - - def doInstall(storage, payload, ksdata, instClass): -diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py -index 50515c8..d95b2df 100644 ---- a/pyanaconda/kickstart.py -+++ b/pyanaconda/kickstart.py -@@ -90,6 +90,8 @@ from pykickstart.sections import NullSection, PackageSection, PostScriptSection, - from pykickstart.version import returnClassForVersion, RHEL7 - from pykickstart.options import KSOptionParser - -+from pyanaconda.tisnotify import tisnotify -+ - import logging - log = logging.getLogger("anaconda") - stderrLog = logging.getLogger("anaconda.stderr") -@@ -2481,6 +2483,7 @@ def runPreScripts(scripts): - if len(preScripts) == 0: - return - -+ tisnotify.preinstall() - log.info("Running kickstart %%pre script(s)") - stdoutLog.info(_("Running pre-installation scripts")) - -diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py -index 7cf59d7..8896ba1 100644 ---- a/pyanaconda/packaging/rpmostreepayload.py -+++ b/pyanaconda/packaging/rpmostreepayload.py -@@ -36,6 +36,8 @@ from gi.repository import Gio - - from blivet.size import Size - -+from pyanaconda.tisnotify import tisnotify -+ - import logging - log = logging.getLogger("anaconda") - -@@ -69,6 +71,7 @@ class RPMOSTreePayload(ArchivePayload): - """Like iutil.execWithRedirect, but treat errors as fatal""" - rc = iutil.execWithRedirect(cmd, argv, **kwargs) - if rc != 0: -+ tisnotify.failed() - exn = PayloadInstallError("%s %s exited with code %d" % (cmd, argv, rc)) - if errors.errorHandler.cb(exn) == errors.ERROR_RAISE: - raise exn -@@ -183,6 +186,7 @@ class RPMOSTreePayload(ArchivePayload): - GLib.Variant('a{sv}', pull_opts), - progress, cancellable) - except GLib.GError as e: -+ tisnotify.failed() - exn = PayloadInstallError("Failed to pull from repository: %s" % e) - log.error(str(exn)) - if errors.errorHandler.cb(exn) == errors.ERROR_RAISE: -@@ -227,6 +231,7 @@ class RPMOSTreePayload(ArchivePayload): - try: - self._copyBootloaderData() - except (OSError, RuntimeError) as e: -+ tisnotify.failed() - exn = PayloadInstallError("Failed to copy bootloader data: %s" % e) - log.error(str(exn)) - if errors.errorHandler.cb(exn) == errors.ERROR_RAISE: -diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py -index c6aa234..a0497e0 100644 ---- a/pyanaconda/packaging/yumpayload.py -+++ b/pyanaconda/packaging/yumpayload.py -@@ -46,6 +46,8 @@ from pyanaconda.simpleconfig import simple_replace - from functools import wraps - from urlgrabber.grabber import URLGrabber, URLGrabError - -+from pyanaconda.tisnotify import tisnotify -+ - import logging - log = logging.getLogger("packaging") - -@@ -181,6 +183,8 @@ class YumPayload(PackagePayload): - # save repomd metadata - self._repoMD_list = [] - -+ self.tisNotifyPort = flags.cmdline.get("tisNotifyPort") -+ - self.reset() - - def reset(self, root=None, releasever=None): -@@ -1347,6 +1351,8 @@ reposdir=%s - if self.data.packages.handleMissing == KS_MISSING_IGNORE: - return - -+ tisnotify.failed() -+ - # If we're doing non-interactive ks install, raise CmdlineError, - # otherwise the system will just reboot automatically - if flags.automatedInstall and not flags.ksprompt: -@@ -1524,6 +1530,7 @@ reposdir=%s - try: - self.checkSoftwareSelection() - except DependencyError as e: -+ tisnotify.failed() - if errorHandler.cb(e) == ERROR_RAISE: - progressQ.send_quit(1) - while True: -@@ -1578,6 +1585,10 @@ reposdir=%s - key, text = line.split(":", 1) - msg = progress_map[key] + text - progressQ.send_message(msg) -+ if line.startswith("PROGRESS_POST"): -+ tisnotify.postinstall() -+ elif not text.startswith(" error "): -+ tisnotify.installing(text) - log.debug(msg) - elif line.startswith("DEBUG:"): - log.debug(line[6:]) -@@ -1590,7 +1601,8 @@ reposdir=%s - install_errors.append(line[6:]) - else: - log.debug(line) -- except IOError as e: -+ except (IOError, OSError) as e: -+ tisnotify.failed() - log.error("Error running anaconda-yum: %s", e) - exn = PayloadInstallError(str(e)) - if errorHandler.cb(exn) == ERROR_RAISE: -@@ -1612,6 +1624,7 @@ reposdir=%s - shutil.rmtree(iutil.getSysroot()+"/var/tmp/yum.cache") - - if install_errors: -+ tisnotify.failed() - exn = PayloadInstallError("\n".join(install_errors)) - if errorHandler.cb(exn) == ERROR_RAISE: - progressQ.send_quit(1) -diff --git a/pyanaconda/tisnotify.py b/pyanaconda/tisnotify.py -new file mode 100644 -index 0000000..bf5d9bd ---- /dev/null -+++ b/pyanaconda/tisnotify.py -@@ -0,0 +1,91 @@ -+""" -+Copyright (c) 2016-2017 Wind River Systems, Inc. -+ SPDX-License-Identifier: Apache-2.0 -+ -+ -+ -+""" -+ -+import os -+import re -+import subprocess -+import time -+ -+from pyanaconda.flags import flags -+ -+class TisNotify(): -+ -+ def __init__(self): -+ self.tisnotify = flags.cmdline.get("tisnotify") -+ self.regex = re.compile(r'\(([\d\/]*)\)$') -+ self.DEVNULL = open(os.devnull, "w") -+ self.last_installing = 0 -+ -+ def sendNotification(self, data): -+ try: -+ subprocess.call(['/usr/bin/curl', -+ '--data', data, -+ self.tisnotify], -+ stdout=self.DEVNULL, -+ stderr=self.DEVNULL) -+ except: -+ pass -+ -+ def preinstall(self): -+ if self.tisnotify is None: -+ return -+ -+ data = "install_state=preinstall" -+ self.sendNotification(data) -+ -+ def installing(self, text): -+ if self.tisnotify is None: -+ return -+ -+ match = self.regex.search(text) -+ if match is None: -+ return -+ -+ if (time.time() - self.last_installing) >= 5: -+ self.last_installing = time.time() -+ data = "install_state=installing&install_state_info=%s" % match.groups()[0] -+ self.sendNotification(data) -+ -+ def postinstall(self): -+ if self.tisnotify is None: -+ return -+ -+ data = "install_state=postinstall" -+ self.sendNotification(data) -+ -+ def installed(self): -+ if self.tisnotify is None: -+ return -+ -+ data = "install_state=installed" -+ self.sendNotification(data) -+ -+ def failed(self): -+ if self.tisnotify is None: -+ return -+ -+ data = "install_state=failed" -+ self.sendNotification(data) -+ -+ etc_dir = '/mnt/sysimage/etc' -+ platform_dir = etc_dir + '/platform' -+ failed_flag = platform_dir + '/platform/installation_failed' -+ motd_file = etc_dir + '/motd' -+ -+ # Set installation_failed flag, if possible and not already done -+ if os.path.exists(platform_dir) and not os.path.exists(failed_flag): -+ try: -+ subprocess.call(['touch', '/mnt/sysimage/etc/platform/installation_failed']) -+ with open(motd_file, 'a') as f: -+ f.write('Installation failure. Please check logs or reinstall.\n\n') -+ except: -+ pass -+ -+ -+tisnotify = TisNotify() -+ -diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py -index 0e4dbed..b342bd5 100644 ---- a/pyanaconda/ui/gui/hubs/progress.py -+++ b/pyanaconda/ui/gui/hubs/progress.py -@@ -44,6 +44,8 @@ from pykickstart.constants import KS_SHUTDOWN, KS_REBOOT - from pyanaconda.ui.gui.hubs import Hub - from pyanaconda.ui.gui.utils import gtk_action_nowait, gtk_call_once - -+from pyanaconda.tisnotify import tisnotify -+ - __all__ = ["ProgressHub"] - - class ProgressHub(Hub): -@@ -124,6 +126,8 @@ class ProgressHub(Hub): - # to indicate this method should be removed from the idle loop. - return False - elif code == progressQ.PROGRESS_CODE_QUIT: -+ if args[0] != 0: -+ tisnotify.failed() - sys.exit(args[0]) - - q.task_done() -diff --git a/pyanaconda/ui/tui/spokes/progress.py b/pyanaconda/ui/tui/spokes/progress.py -index 1feeb08..8221e31 100644 ---- a/pyanaconda/ui/tui/spokes/progress.py -+++ b/pyanaconda/ui/tui/spokes/progress.py -@@ -31,6 +31,8 @@ from pyanaconda.ui.tui.spokes import StandaloneTUISpoke - from pyanaconda.ui.tui.hubs.summary import SummaryHub - from pyanaconda.ui.tui.simpleline.base import ExitAllMainLoops - -+from pyanaconda.tisnotify import tisnotify -+ - __all__ = ["ProgressSpoke"] - - class ProgressSpoke(StandaloneTUISpoke): -@@ -101,6 +103,8 @@ class ProgressSpoke(StandaloneTUISpoke): - print('') - return True - elif code == progressQ.PROGRESS_CODE_QUIT: -+ if args[0] != 0: -+ tisnotify.failed() - sys.exit(args[0]) - - q.task_done() --- -1.8.3.1 - diff --git a/base/anaconda/centos/patches/0002-revert-7.4-grub2-efi-handling.patch b/base/anaconda/centos/patches/0002-revert-7.4-grub2-efi-handling.patch deleted file mode 100644 index d76071dcc..000000000 --- a/base/anaconda/centos/patches/0002-revert-7.4-grub2-efi-handling.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 76cd2b90fd4e550e162bc8fc7e247ed2f4e6e310 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 17 Nov 2017 12:06:39 -0500 -Subject: [PATCH] revert 7.4 grub2 efi handling - ---- - pyanaconda/bootloader.py | 36 +++--------------------------------- - 1 file changed, 3 insertions(+), 33 deletions(-) - -diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py -index 9db9cf3..24e8b56 100644 ---- a/pyanaconda/bootloader.py -+++ b/pyanaconda/bootloader.py -@@ -1404,9 +1404,7 @@ class GRUB2(GRUB): - - """ - name = "GRUB2" -- # grub2 is a virtual provides that's provided by grub2-pc, grub2-ppc64le, -- # and all of the primary grub components that aren't grub2-efi-${EFIARCH} -- packages = ["grub2", "grub2-tools"] -+ packages = ["grub2"] - _config_file = "grub.cfg" - _config_dir = "grub2" - _passwd_file = "user.cfg" -@@ -1680,28 +1678,12 @@ class GRUB2(GRUB): - return ret - - class EFIGRUB(GRUB2): -- _packages32 = ["grub2-efi-ia32", "shim-ia32"] -- _packages64 = ["grub2-efi-x64", "shim-x64"] -- _packages_common = ["efibootmgr"] -+ packages = ["grub2-efi", "efibootmgr", "shim"] - can_dual_boot = False - stage2_is_valid_stage1 = False - stage2_bootable = False - -- _is_32bit_firmware = False -- -- @property -- def _efi_binary(self): -- if self._is_32bit_firmware: -- return "\\shimia32.efi" -- return "\\shimx64.efi" -- -- @property -- def packages(self): -- if self._is_32bit_firmware: -- return self._packages32 + self._packages_common + \ -- super(EFIGRUB, self).packages -- return self._packages64 + self._packages_common + \ -- super(EFIGRUB, self).packages -+ _efi_binary = "\\shim.efi" - - @property - def _config_dir(self): -@@ -1711,15 +1693,6 @@ class EFIGRUB(GRUB2): - super(EFIGRUB, self).__init__() - self.efi_dir = 'BOOT' - -- try: -- f = open("/sys/firmware/efi/fw_platform_size", "r") -- value = f.readline().strip() -- except IOError: -- log.info("Reading /sys/firmware/efi/fw_platform_size failed, defaulting to 64-bit install.") -- value = '64' -- if value == '32': -- self._is_32bit_firmware = True -- - def efibootmgr(self, *args, **kwargs): - if flags.imageInstall or flags.dirInstall: - log.info("Skipping efibootmgr for image/directory install.") -@@ -1812,12 +1785,9 @@ class EFIGRUB(GRUB2): - return True - - class Aarch64EFIGRUB(EFIGRUB): -- _packages64 = ["grub2-efi-aa64", "shim-aa64"] - _serial_consoles = ["ttyAMA", "ttyS"] -- _efi_binary = "\\shimaa64.efi" - - class MacEFIGRUB(EFIGRUB): -- packages = [ "grub2-tools-efi", "mactel-boot" ] - def mactel_config(self): - if os.path.exists(iutil.getSysroot() + "/usr/libexec/mactel-boot-setup"): - rc = iutil.execInSysroot("/usr/libexec/mactel-boot-setup", []) --- -1.8.3.1 - diff --git a/base/anaconda/centos/patches/0003-Set-default-hostname-to-localhost.patch b/base/anaconda/centos/patches/0003-Set-default-hostname-to-localhost.patch deleted file mode 100644 index 0a52ee5d4..000000000 --- a/base/anaconda/centos/patches/0003-Set-default-hostname-to-localhost.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d14b48ec201b4f90042f6292d537d5af5d78c6a6 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 23 Nov 2017 16:43:58 -0500 -Subject: [PATCH] Set default hostname to localhost - ---- - pyanaconda/network.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pyanaconda/network.py b/pyanaconda/network.py -index c6f7bb7..26c24a3 100644 ---- a/pyanaconda/network.py -+++ b/pyanaconda/network.py -@@ -65,7 +65,7 @@ networkConfFile = "%s/network" % (sysconfigDir) - hostnameFile = "/etc/hostname" - ipv6ConfFile = "/etc/sysctl.d/anaconda.conf" - ifcfgLogFile = "/tmp/ifcfg.log" --DEFAULT_HOSTNAME = "localhost.localdomain" -+DEFAULT_HOSTNAME = "localhost" - - ifcfglog = None - --- -1.8.3.1 - diff --git a/base/anaconda/centos/patches/0004-Cache-server-ip-in-etc-hosts.patch b/base/anaconda/centos/patches/0004-Cache-server-ip-in-etc-hosts.patch deleted file mode 100644 index 320a7bdff..000000000 --- a/base/anaconda/centos/patches/0004-Cache-server-ip-in-etc-hosts.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 0b9c332f7101c890c5bb1c65f9c89d82bd759a04 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 23 Nov 2017 16:46:31 -0500 -Subject: [PATCH] Cache server ip in /etc/hosts - ---- - data/systemd/anaconda.service | 1 + - scripts/anaconda-preexec | 50 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 51 insertions(+) - create mode 100644 scripts/anaconda-preexec - -diff --git a/data/systemd/anaconda.service b/data/systemd/anaconda.service -index a80c6bb..8966258 100644 ---- a/data/systemd/anaconda.service -+++ b/data/systemd/anaconda.service -@@ -7,4 +7,5 @@ Wants=anaconda-noshell.service - Type=forking - Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp GIO_USE_VFS=local - WorkingDirectory=/root -+ExecStartPre=/usr/sbin/anaconda-preexec - ExecStart=/usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start -diff --git a/scripts/anaconda-preexec b/scripts/anaconda-preexec -new file mode 100644 -index 0000000..e3f79a4 ---- /dev/null -+++ b/scripts/anaconda-preexec -@@ -0,0 +1,50 @@ -+#!/bin/bash -+# -+# Copyright (c) 2017 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -+ -+exec >>/tmp/anaconda-preexec.log -+exec 2>>/tmp/anaconda-preexec.log -+set -x -+ -+function get_ip() -+{ -+ local host=$1 -+ -+ # Try the DNS query -+ host -t A $host | awk '{print $4}' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' | head -1 -+} -+ -+# If the kickstart is net-based, wait for connectivity to server -+cat /proc/cmdline | grep -q 'inst\.ks=http://' -+if [ $? -eq 0 ] -+then -+ server=$(cat /proc/cmdline | sed -r 's#.*inst\.ks=http://([^/:]*)(:[^/]*)?/.*#\1#') -+ if [ -n "$server" ] -+ then -+ echo "Testing connectivity to server: $server" -+ let -i ping_count=0 -+ ping -c 1 -w 60 $server -+ while [ $? -ne 0 -a $ping_count -lt 600 ] -+ do -+ echo "Waiting for connectivity to server: $server" -+ sleep 1 -+ let -i ping_count++ -+ ping -c 1 -w 60 $server -+ done -+ -+ # Cache the host IP -+ ipaddr=$(get_ip $server) -+ if [ -n "$ipaddr" -a "$ipaddr" != "$server" ] -+ then -+ echo "$ipaddr $server" >> /etc/hosts -+ fi -+ -+ fi -+fi -+ -+exit 0 --- -1.8.3.1 - diff --git a/base/anaconda/centos/patches/0005-Add-support-for-IPv6-and-https-to-anaconda-preexec.patch b/base/anaconda/centos/patches/0005-Add-support-for-IPv6-and-https-to-anaconda-preexec.patch deleted file mode 100644 index 03d6b1561..000000000 --- a/base/anaconda/centos/patches/0005-Add-support-for-IPv6-and-https-to-anaconda-preexec.patch +++ /dev/null @@ -1,113 +0,0 @@ -From fbf22f153f415b1dfed1f01879c22b15ac030652 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 10 Feb 2020 20:00:19 -0500 -Subject: [PATCH] Add support for IPv6 and https to anaconda-preexec - -The anaconda-preexec script runs ahead of Anaconda to cache the IP -address of the network boot server in the /etc/hosts file, to avoid -further DNS queries during installation. - -This update extends the checks to add support for IPv6 and to allow -for https network access. - -Signed-off-by: Don Penney ---- - scripts/anaconda-preexec | 69 +++++++++++++++++++++++++++++++----------------- - 1 file changed, 45 insertions(+), 24 deletions(-) - -diff --git a/scripts/anaconda-preexec b/scripts/anaconda-preexec -index d491173..22e6833 100644 ---- a/scripts/anaconda-preexec -+++ b/scripts/anaconda-preexec -@@ -1,6 +1,6 @@ - #!/bin/bash - # --# Copyright (c) 2017 Wind River Systems, Inc. -+# Copyright (c) 2017-2019 Wind River Systems, Inc. - # SPDX-License-Identifier: Apache-2.0 - # - # -@@ -14,36 +14,57 @@ set -x - function get_ip() - { - local host=$1 -+ local host_ip= - - # Try the DNS query -- host -t A $host | awk '{print $4}' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' | head -1 -+ host_ip=$(host -t A $host | awk '{print $4}' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' | head -1) -+ -+ if [ -z "${host_ip}" ]; then -+ # Check for IPv6 -+ host_ip=$(host -t AAAA $host | grep 'has IPv6 address' | awk '{print $5}') -+ fi -+ -+ echo -n ${host_ip} -+} -+ -+function get_server() -+{ -+ # Check for http/https first -+ cat /proc/cmdline | grep -q 'inst\.ks=http' -+ if [ $? -ne 0 ]; then -+ return -+ fi -+ -+ local server_and_port= -+ server_and_port=$(cat /proc/cmdline | sed -r 's#.*inst\.ks=https*://([^/]*)/.*#\1#') -+ -+ echo "${server_and_port}" | grep -q '^\[' -+ if [ $? -eq 0 ]; then -+ echo "${server_and_port}" | sed -r 's#.*\[(.*)\].*#\1#' -+ else -+ echo "${server_and_port}" | sed -r 's#([^/:]*)(:[^/]*)?#\1#' -+ fi - } - - # If the kickstart is net-based, wait for connectivity to server --cat /proc/cmdline | grep -q 'inst\.ks=http://' --if [ $? -eq 0 ] -+server=$(get_server) -+if [ -n "$server" ] - then -- server=$(cat /proc/cmdline | sed -r 's#.*inst\.ks=http://([^/:]*)(:[^/]*)?/.*#\1#') -- if [ -n "$server" ] -- then -- echo "Testing connectivity to server: $server" -- let -i ping_count=0 -- ping -c 1 -w 60 $server -- while [ $? -ne 0 -a $ping_count -lt 600 ] -- do -- echo "Waiting for connectivity to server: $server" -- sleep 1 -- let -i ping_count++ -- ping -c 1 -w 60 $server -- done -- -- # Cache the host IP -- ipaddr=$(get_ip $server) -- if [ -n "$ipaddr" -a "$ipaddr" != "$server" ] -- then -- echo "$ipaddr $server" >> /etc/hosts -- fi -+ echo "Testing connectivity to server: $server" -+ let -i TIMEOUT=${SECONDS}+600 -+ ping -c 1 -w 60 $server || ping6 -c 1 -w 60 $server -+ while [ $? -ne 0 -a ${SECONDS} -lt ${TIMEOUT} ] -+ do -+ echo "Waiting for connectivity to server: $server" -+ sleep 1 -+ ping -c 1 -w 60 $server || ping6 -c 1 -w 60 $server -+ done - -+ # Cache the host IP -+ ipaddr=$(get_ip $server) -+ if [ -n "$ipaddr" -a "$ipaddr" != "$server" ] -+ then -+ echo "$ipaddr $server" >> /etc/hosts - fi - fi - --- -1.8.3.1 - diff --git a/base/anaconda/centos/srpm_path b/base/anaconda/centos/srpm_path deleted file mode 100644 index 6edf86917..000000000 --- a/base/anaconda/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/anaconda-21.48.22.147-1.el7.centos.src.rpm diff --git a/base/cluster-resource-agents/centos/build_srpm.data b/base/cluster-resource-agents/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/cluster-resource-agents/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/cluster-resource-agents/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/cluster-resource-agents/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 3672bf4dc..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 85cd40238fb1f76483848007bd1e5663bb3f21ff Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:11:59 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - ---- - SPECS/resource-agents.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec -index 21fa049..fd8bc97 100644 ---- a/SPECS/resource-agents.spec -+++ b/SPECS/resource-agents.spec -@@ -89,7 +89,7 @@ - Name: resource-agents - Summary: Open Source HA Reusable Cluster Resource Scripts - Version: 4.1.1 --Release: 12%{?dist}.7 -+Release: 12.el7_6.7%{?_tis_dist}.%{tis_patch_ver} - License: GPLv2+ and LGPLv2+ and ASL 2.0 - URL: https://github.com/ClusterLabs/resource-agents - %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} --- -2.7.4 - diff --git a/base/cluster-resource-agents/centos/meta_patches/Disable-creation-of-the-debug-package.patch b/base/cluster-resource-agents/centos/meta_patches/Disable-creation-of-the-debug-package.patch deleted file mode 100644 index 7737c992c..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/Disable-creation-of-the-debug-package.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d48b31c66589b0c5a9831dcf4123a80fa8ccd89a Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 6 Mar 2018 12:19:53 -0600 -Subject: [PATCH 1/1] Disable creation of the debug package as it causes a seg - fault in dwz - ---- - SPECS/resource-agents.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec -index 2536cb7..e5fbbeb 100644 ---- a/SPECS/resource-agents.spec -+++ b/SPECS/resource-agents.spec -@@ -35,6 +35,9 @@ - } || %{?__transaction_systemd_inhibit:1}%{?!__transaction_systemd_inhibit:0}%{nil \ - } || %(test -f /usr/lib/os-release; test $? -ne 0; echo $?)) - -+# Disable debug package, it currently triggers a segfault in dwz tool -+%define debug_package %{nil} -+ - %global upstream_prefix ClusterLabs-resource-agents - %global upstream_version e711383f - --- -1.8.3.1 - diff --git a/base/cluster-resource-agents/centos/meta_patches/Do-not-log-at-debug-log-level-when-HAdebug-is-unset.patch b/base/cluster-resource-agents/centos/meta_patches/Do-not-log-at-debug-log-level-when-HAdebug-is-unset.patch deleted file mode 100644 index 0107e0f8c..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/Do-not-log-at-debug-log-level-when-HAdebug-is-unset.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8d4d5620ae40468e4aea4cdd42ace1c288bd4d58 Mon Sep 17 00:00:00 2001 -From: jmusico -Date: Fri, 8 Oct 2021 01:21:30 +0000 -Subject: [PATCH 1/1] Adding missed patch to not log at debug log level when - HA_debug is unset. - -Signed-off-by: jmusico ---- - SPECS/resource-agents.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec -index 941cb8b..ea888a7 100644 ---- a/SPECS/resource-agents.spec -+++ b/SPECS/resource-agents.spec -@@ -141,6 +141,7 @@ Patch28: bz1641944-rabbitmq-cluster-monitor-mnesia-status.patch - Patch29: bz1641946-1-rabbitmq-cluster-fail-in-minority-partition.patch - Patch30: bz1641946-2-rabbitmq-cluster-fix-stop-regression.patch - Patch31: bz1657138-rabbitmq-cluster-ensure-node-attribures-removed.patch -+Patch32: Do-not-log-at-debug-log-level-when-HA_debug-is-unset.patch - # bundle patches - Patch1000: bz1568588-7-gcp-bundled.patch - Patch1001: bz1568588-8-google-cloud-sdk-fixes.patch -@@ -369,6 +370,7 @@ exit 1 - %patch29 -p1 - %patch30 -p1 - %patch31 -p1 -+%patch32 -p1 - - # add SAPHana agents to Makefile.am - mv %{saphana_prefix}-%{saphana_hash}/SAPHana/ra/SAPHana* heartbeat --- -2.29.2 - diff --git a/base/cluster-resource-agents/centos/meta_patches/PATCH_ORDER b/base/cluster-resource-agents/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index ecd6ac7db..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,5 +0,0 @@ -spec-include-TiS-patches.patch -spec-avoid-dir-collisions.patch -0001-Update-package-versioning-for-TIS-format.patch -Disable-creation-of-the-debug-package.patch -Do-not-log-at-debug-log-level-when-HAdebug-is-unset.patch diff --git a/base/cluster-resource-agents/centos/meta_patches/spec-avoid-dir-collisions.patch b/base/cluster-resource-agents/centos/meta_patches/spec-avoid-dir-collisions.patch deleted file mode 100644 index d9b08171e..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/spec-avoid-dir-collisions.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 8c725e6e7a4931066488a74227f902269850a263 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:11:58 -0400 -Subject: [PATCH 02/10] WRS: spec-avoid-dir-collisions.patch - -Signed-off-by: zhipengl ---- - SPECS/resource-agents.spec | 14 ++++---------- - 1 file changed, 4 insertions(+), 10 deletions(-) - -diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec -index ec85fc2..bb96485 100644 ---- a/SPECS/resource-agents.spec -+++ b/SPECS/resource-agents.spec -@@ -725,14 +725,11 @@ rm -rf %{buildroot} - %endif - - %if %{with linuxha} --%dir /usr/lib/ocf --%dir /usr/lib/ocf/resource.d --%dir /usr/lib/ocf/lib -+/usr/lib/ocf/lib/heartbeat/* - --/usr/lib/ocf/lib/heartbeat -- --/usr/lib/ocf/resource.d/heartbeat --/usr/lib/ocf/resource.d/openstack -+/usr/lib/ocf/resource.d/heartbeat/* -+/usr/lib/ocf/resource.d/heartbeat/.ocf-* -+/usr/lib/ocf/resource.d/openstack/* - %if %{with rgmanager} - /usr/lib/ocf/resource.d/redhat - %endif -@@ -758,8 +755,6 @@ rm -rf %{buildroot} - - %{_includedir}/heartbeat - --%dir %attr (1755, root, root) %{_var}/run/resource-agents -- - %{_mandir}/man7/*.7* - - ### -@@ -912,7 +907,6 @@ rm -rf %{buildroot} - %exclude %{_mandir}/man8/ldirectord.8.gz - - # For compatability with pre-existing agents --%dir %{_sysconfdir}/ha.d - %{_sysconfdir}/ha.d/shellfuncs - - %{_libexecdir}/heartbeat --- -1.8.3.1 - diff --git a/base/cluster-resource-agents/centos/meta_patches/spec-include-TiS-patches.patch b/base/cluster-resource-agents/centos/meta_patches/spec-include-TiS-patches.patch deleted file mode 100644 index 1bc1ea023..000000000 --- a/base/cluster-resource-agents/centos/meta_patches/spec-include-TiS-patches.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 1f6128eb7bf5287db6def45f278acf771a711a42 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:11:58 -0400 -Subject: [PATCH] WRS: spec-include-TiS-patches.patch - -Signed-off-by: zhipengl ---- - SPECS/resource-agents.spec | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) - -diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec -index a16660a..ec85fc2 100644 ---- a/SPECS/resource-agents.spec -+++ b/SPECS/resource-agents.spec -@@ -148,6 +148,24 @@ Patch1002: bz1568588-9-google-cloud-sdk-oauth2client-python-rsa-to-cryptography. - Patch1003: bz1568588-10-gcloud-support-info.patch - Patch1004: bz1568589-4-aliyun-vpc-move-ip-bundled.patch - -+# STX -+ -+Patch1106: new_ocf_return_codes.patch -+Patch1107: ipaddr2_check_if_state.patch -+Patch1108: copyright.patch -+Patch1109: umount-in-namespace.patch -+Patch1110: lvm_vg_activation.patch -+Patch1111: pgsql.patch -+ -+ -+ -+Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch -+Patch1116: ocf-shellfuncs_change_logtag.patch -+Patch1117: lvm_cleanup_refs_on_stop.patch -+Patch1118: ipaddr2_if_down.patch -+Patch1119: ipaddr2_ignore_lo_if_state.patch -+Patch1121: ipaddr2-avoid-failing-svc-if-down.patch -+Patch1122: ipaddr2-use-host-scope-for-addresses-on-loopback.patch - Obsoletes: heartbeat-resources <= %{version} - Provides: heartbeat-resources = %{version} - -@@ -508,6 +526,25 @@ cp %{aliyuncli_dir}/LICENSE %{aliyuncli}_LICENSE - %patch1004 -p1 - %endif - -+# STX -+ -+%patch1106 -p1 -+%patch1107 -p1 -+%patch1108 -p1 -+%patch1109 -p1 -+%patch1110 -p1 -+%patch1111 -p1 -+ -+ -+ -+%patch1115 -p1 -+%patch1116 -p1 -+%patch1117 -p1 -+%patch1118 -p1 -+%patch1119 -p1 -+%patch1121 -p1 -+%patch1122 -p1 -+ - %build - if [ ! -f configure ]; then - ./autogen.sh --- -1.8.3.1 - diff --git a/base/cluster-resource-agents/centos/patches/Do-not-log-at-debug-log-level-when-HA_debug-is-unset.patch b/base/cluster-resource-agents/centos/patches/Do-not-log-at-debug-log-level-when-HA_debug-is-unset.patch deleted file mode 100644 index 0c882a73b..000000000 --- a/base/cluster-resource-agents/centos/patches/Do-not-log-at-debug-log-level-when-HA_debug-is-unset.patch +++ /dev/null @@ -1,35 +0,0 @@ -From aae26ca70ef910e83485778c1fb450941fe79e8a Mon Sep 17 00:00:00 2001 -From: Michele Baldessari -Date: Mon, 3 Dec 2018 16:48:14 +0100 -Subject: [PATCH] Do not log at debug log level when HA_debug is unset - -There might be situations (e.g. bundles) where the HA_debug variable -is unset. It makes little sense to enable debug logging when the HA_debug env -variable is unset. -So let's skip debug logs when HA_debug is set to 0 or is unset. - -Tested inside a bundle and observed that previously seen 'ocf_log debug' -calls are now correctly suppressed (w/ HA_debug being unset inside the -container) - -Signed-off-by: Michele Baldessari ---- - heartbeat/ocf-shellfuncs.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in -index 043ab9bf..b17297e1 100644 ---- a/heartbeat/ocf-shellfuncs.in -+++ b/heartbeat/ocf-shellfuncs.in -@@ -257,7 +257,7 @@ ha_log() - - ha_debug() { - -- if [ "x${HA_debug}" = "x0" ] ; then -+ if [ "x${HA_debug}" = "x0" ] || [ -z "${HA_debug}" ] ; then - return 0 - fi - if tty >/dev/null; then --- -2.29.2 - diff --git a/base/cluster-resource-agents/centos/patches/Fix-VG-activity-bug-in-heartbeat-LVM-script.patch b/base/cluster-resource-agents/centos/patches/Fix-VG-activity-bug-in-heartbeat-LVM-script.patch deleted file mode 100644 index ff40c97b4..000000000 --- a/base/cluster-resource-agents/centos/patches/Fix-VG-activity-bug-in-heartbeat-LVM-script.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 7c181a1afdc85456333f9cbf9c5827ceb0554a91 Mon Sep 17 00:00:00 2001 -From: Chris Friesen -Date: Fri, 24 Aug 2018 03:51:37 +0800 -Subject: [PATCH] Fix VG activity bug in heartbeat/LVM script - -There is currently an issue in the lvm2 package where if you create an LVM thin -pool, then create a thin volume in the pool, then the udev rule doesn't think -there should be a /dev// symlink for the thin pool, but "vgmknodes" and -"vgscan --mknodes" both think that there should be such a symlink. This is a -bug, but it's in the field in CentOS 7 at least and likely elsewhere. - -The end result of this is that on such a system running either "vgscan ---mknodes" or "vgmknodes" and then running "vgchange -an " will -leave the /dev/ directory with a dangling symlink in it. - -This breaks the LVM_status() function in this OCF script, since the -/dev/ directory exists and is not empty even though the volume -group is not active. - -This commit changes the code to directly query lvm about the volume group -activity rather than relying on side effects. - -Signed-off-by: zhipengl - ---- - heartbeat/LVM | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/heartbeat/LVM b/heartbeat/LVM -index 893ece8..1efb207 100755 ---- a/heartbeat/LVM -+++ b/heartbeat/LVM -@@ -191,18 +191,15 @@ LVM_status() { - fi - fi - -- if [ -d /dev/$1 ]; then -- test "`cd /dev/$1 && ls`" != "" -- rc=$? -- if [ $rc -ne 0 ]; then -- ocf_exit_reason "VG $1 with no logical volumes is not supported by this RA!" -- fi -- fi -- -- if [ $rc -ne 0 ]; then -+ # Ask lvm whether the volume group is active. This maps to -+ # the question "Are there any logical volumes that are active in -+ # the specified volume group?". -+ lvs --noheadings -o selected -S lv_active=active,vg_name=${1}|grep -q 1 -+ if [ $? -ne 0 ]; then - ocf_log $loglevel "LVM Volume $1 is not available (stopped)" - rc=$OCF_NOT_RUNNING - else -+ rc=0 - lvm_status - rc=$? - fi --- -2.7.4 - diff --git a/base/cluster-resource-agents/centos/patches/copyright.patch b/base/cluster-resource-agents/centos/patches/copyright.patch deleted file mode 100644 index b91b47b49..000000000 --- a/base/cluster-resource-agents/centos/patches/copyright.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 81bcbfb829001ccf61b515edb3d53ac8f15df334 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Fri, 26 Aug 2016 15:06:10 -0400 -Subject: [PATCH 04/12] WRS: Patch108: copyright.patch - ---- - heartbeat/Filesystem | 2 ++ - heartbeat/LVM | 1 + - heartbeat/pgsql | 1 + - 3 files changed, 4 insertions(+) - -diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem -index 27f03d2..af821b2 100755 ---- a/heartbeat/Filesystem -+++ b/heartbeat/Filesystem -@@ -2,6 +2,8 @@ - # - # Support: users@clusterlabs.org - # License: GNU General Public License (GPL) -+# -+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. - # - # Filesystem - # Description: Manages a Filesystem on a shared storage medium. -diff --git a/heartbeat/LVM b/heartbeat/LVM -index e435e7b..c11fed7 100755 ---- a/heartbeat/LVM -+++ b/heartbeat/LVM -@@ -10,6 +10,7 @@ - # Support: users@clusterlabs.org - # License: GNU General Public License (GPL) - # Copyright: (C) 2002 - 2005 International Business Machines, Inc. -+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. - # - # This code significantly inspired by the LVM resource - # in FailSafe by Lars Marowsky-Bree -diff --git a/heartbeat/pgsql b/heartbeat/pgsql -index 794f85e..b176b1d 100755 ---- a/heartbeat/pgsql -+++ b/heartbeat/pgsql -@@ -10,6 +10,7 @@ - # - # Copyright: 2006-2012 Serge Dubrouski - # and other Linux-HA contributors -+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. - # License: GNU General Public License (GPL) - # - ############################################################################### --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/ipaddr2-avoid-failing-svc-if-down.patch b/base/cluster-resource-agents/centos/patches/ipaddr2-avoid-failing-svc-if-down.patch deleted file mode 100644 index 60ac5705a..000000000 --- a/base/cluster-resource-agents/centos/patches/ipaddr2-avoid-failing-svc-if-down.patch +++ /dev/null @@ -1,61 +0,0 @@ -From c3448b1536d50291dc5ca49dce5957c39403cc82 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Wed, 29 Aug 2018 11:00:22 -0400 -Subject: [PATCH 1/1] avoid failing service when I/F is down - ---- - heartbeat/IPaddr2 | 24 ++++++------------------ - 1 file changed, 6 insertions(+), 18 deletions(-) - -diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 -index 86009b9..2da5c5e 100755 ---- a/heartbeat/IPaddr2 -+++ b/heartbeat/IPaddr2 -@@ -968,12 +968,8 @@ ip_start() { - then - exit $OCF_SUCCESS - else -- if [ "$OCF_RESKEY_dc" = "yes" ]; then -- ocf_log info "NIC $NIC is DOWN..." -- exit $OCF_SUCCESS -- else -- exit $OCF_ERR_GENERIC -- fi -+ ocf_log info "NIC $NIC is DOWN..." -+ exit $OCF_SUCCESS - fi - fi - -@@ -1037,12 +1033,8 @@ ip_start() { - then - exit $OCF_SUCCESS - else -- if [ "$OCF_RESKEY_dc" = "yes" ]; then -- ocf_log info "NIC $NIC is DOWN" -- exit $OCF_SUCCESS -- else -- exit $OCF_ERR_GENERIC -- fi -+ ocf_log info "NIC $NIC is DOWN" -+ exit $OCF_SUCCESS - fi - } - -@@ -1123,12 +1115,8 @@ ip_monitor() { - then - return $OCF_SUCCESS - else -- if [ "$OCF_RESKEY_dc" = "yes" ]; then -- ocf_log info "NIC $NIC is DOWN" -- return $OCF_SUCCESS -- else -- return $OCF_NOT_RUNNING -- fi -+ ocf_log info "NIC $NIC is DOWN" -+ exit $OCF_SUCCESS - fi - ;; - partial|no|partial2) --- -1.8.3.1 - diff --git a/base/cluster-resource-agents/centos/patches/ipaddr2-use-host-scope-for-addresses-on-loopback.patch b/base/cluster-resource-agents/centos/patches/ipaddr2-use-host-scope-for-addresses-on-loopback.patch deleted file mode 100644 index 6980369cc..000000000 --- a/base/cluster-resource-agents/centos/patches/ipaddr2-use-host-scope-for-addresses-on-loopback.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a39c83dbaf4054cc96cd4a0a2b671509dd10af28 Mon Sep 17 00:00:00 2001 -From: Bart Wensley -Date: Wed, 21 Nov 2018 12:14:20 -0600 -Subject: [PATCH 1/1] ipaddr2 use host scope for addresses on loopback - ---- - heartbeat/IPaddr2 | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 -index 2da5c5e..79dbdcf 100755 ---- a/heartbeat/IPaddr2 -+++ b/heartbeat/IPaddr2 -@@ -622,10 +622,18 @@ add_interface () { - add_ipv6_addrlabel $ipaddr - fi - -- cmd="$IP2UTIL -f $FAMILY addr add $ipaddr/$netmask dev $iface" -+ # Addresses assigned to the loopback interfaces must be assigned -+ # using the host scope or assignment is prevented (can't have -+ # multiple global scope addresses on the loopback interface). -+ if [ "$iface" = "lo" ] ;then -+ option="scope host" -+ else -+ option="" -+ fi -+ cmd="$IP2UTIL -f $FAMILY addr add $ipaddr/$netmask dev $iface $option" - msg="Adding $FAMILY address $ipaddr/$netmask to device $iface" - if [ "$broadcast" != "none" ]; then -- cmd="$IP2UTIL -f $FAMILY addr add $ipaddr/$netmask brd $broadcast dev $iface" -+ cmd="$IP2UTIL -f $FAMILY addr add $ipaddr/$netmask brd $broadcast dev $iface $option" - msg="Adding $FAMILY address $ipaddr/$netmask with broadcast address $broadcast to device $iface" - fi - --- -1.8.3.1 - diff --git a/base/cluster-resource-agents/centos/patches/ipaddr2_check_if_state.patch b/base/cluster-resource-agents/centos/patches/ipaddr2_check_if_state.patch deleted file mode 100644 index 098896b52..000000000 --- a/base/cluster-resource-agents/centos/patches/ipaddr2_check_if_state.patch +++ /dev/null @@ -1,58 +0,0 @@ -From fb5a76d9050c60b601a5dbbad65ed3dbff041af1 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:12:36 -0400 -Subject: [PATCH 03/13] WRS: Patch1107: ipaddr2_check_if_state.patch - ---- - heartbeat/IPaddr2 | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 -index aef6dc7..67a7ca3 100755 ---- a/heartbeat/IPaddr2 -+++ b/heartbeat/IPaddr2 -@@ -964,7 +964,12 @@ ip_start() { - local ip_status=`ip_served` - - if [ "$ip_status" = "ok" ]; then -- exit $OCF_SUCCESS -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ then -+ exit $OCF_SUCCESS -+ else -+ exit $OCF_ERR_GENERIC -+ fi - fi - - if [ -n "$IP_CIP" ] && ([ $ip_status = "no" ] || [ $ip_status = "partial2" ]); then -@@ -1023,7 +1028,12 @@ ip_start() { - fi - ;; - esac -- exit $OCF_SUCCESS -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ then -+ exit $OCF_SUCCESS -+ else -+ exit $OCF_ERR_GENERIC -+ fi - } - - ip_stop() { -@@ -1099,7 +1109,12 @@ ip_monitor() { - case $ip_status in - ok) - run_arp_sender refresh -- return $OCF_SUCCESS -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ then -+ return $OCF_SUCCESS -+ else -+ return $OCF_NOT_RUNNING -+ fi - ;; - partial|no|partial2) - exit $OCF_NOT_RUNNING --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/ipaddr2_if_down.patch b/base/cluster-resource-agents/centos/patches/ipaddr2_if_down.patch deleted file mode 100644 index 40c10c52f..000000000 --- a/base/cluster-resource-agents/centos/patches/ipaddr2_if_down.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 573f0835621c5e64c6270260f607624aea29d21a Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Sat, 21 Jan 2017 02:36:39 -0500 -Subject: [PATCH 1/1] ipaddr2_if_down - ---- - heartbeat/IPaddr2 | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 -index 67a7ca3..2cd822d 100755 ---- a/heartbeat/IPaddr2 -+++ b/heartbeat/IPaddr2 -@@ -968,7 +968,12 @@ ip_start() { - then - exit $OCF_SUCCESS - else -- exit $OCF_ERR_GENERIC -+ if [ "$OCF_RESKEY_dc" = "yes" ]; then -+ ocf_log info "NIC $NIC is DOWN..." -+ exit $OCF_SUCCESS -+ else -+ exit $OCF_ERR_GENERIC -+ fi - fi - fi - -@@ -1032,7 +1037,12 @@ ip_start() { - then - exit $OCF_SUCCESS - else -- exit $OCF_ERR_GENERIC -+ if [ "$OCF_RESKEY_dc" = "yes" ]; then -+ ocf_log info "NIC $NIC is DOWN" -+ exit $OCF_SUCCESS -+ else -+ exit $OCF_ERR_GENERIC -+ fi - fi - } - -@@ -1113,7 +1123,12 @@ ip_monitor() { - then - return $OCF_SUCCESS - else -- return $OCF_NOT_RUNNING -+ if [ "$OCF_RESKEY_dc" = "yes" ]; then -+ ocf_log info "NIC $NIC is DOWN" -+ return $OCF_SUCCESS -+ else -+ return $OCF_NOT_RUNNING -+ fi - fi - ;; - partial|no|partial2) --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/ipaddr2_ignore_lo_if_state.patch b/base/cluster-resource-agents/centos/patches/ipaddr2_ignore_lo_if_state.patch deleted file mode 100644 index 551a2d15c..000000000 --- a/base/cluster-resource-agents/centos/patches/ipaddr2_ignore_lo_if_state.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 81bb87debd2a683bad2173d6cb16327c776fe3b3 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:13:46 -0400 -Subject: [PATCH 13/13] WRS: Patch1119: ipaddr2_ignore_lo_if_state.patch - ---- - heartbeat/IPaddr2 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 -index 2cd822d..59620d2 100755 ---- a/heartbeat/IPaddr2 -+++ b/heartbeat/IPaddr2 -@@ -964,7 +964,7 @@ ip_start() { - local ip_status=`ip_served` - - if [ "$ip_status" = "ok" ]; then -- if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ] - then - exit $OCF_SUCCESS - else -@@ -1033,7 +1033,7 @@ ip_start() { - fi - ;; - esac -- if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ] - then - exit $OCF_SUCCESS - else -@@ -1119,7 +1119,7 @@ ip_monitor() { - case $ip_status in - ok) - run_arp_sender refresh -- if [ -n "`ip link show $NIC | grep \"state UP\"`" ] -+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ] - then - return $OCF_SUCCESS - else --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch b/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch deleted file mode 100644 index ac5186c83..000000000 --- a/base/cluster-resource-agents/centos/patches/lvm_cleanup_refs_on_stop.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 72fcaed4a9cc3c847278dd4fca88ba0bca88125a Mon Sep 17 00:00:00 2001 -From: Vu Tran -Date: Thu Sep 29 19:07:25 2016 -0400 -Subject: CGTS-5173: LVM ocf cleanup refs on stop - -In LVM ocf script, LVM_stop() fails if any of the created logical volume -dm block devices are being held by any process with the following error - -err ERROR: Logical volume cinder-volumes/volume-96a8becd-a1c1-4508-8b25-9bcbcfeff2fa -contains a filesystem in use. Can't deactivate volume group "cinder-volumes" -with 1 open logical volume(s) - -So here we want to have defensive code to scan through any process that -holds what dm block devices and causes LVM_stop() to fail. There are -2 cases: - -* dm block devices are mounted and processes are accessing files located -in this mount point. We first need to kill all the processes which are -opening files and then umount the dm block devices. - -* processes just hold/open dm block devices directly. We need to kill -these processes. - -Signed-off-by: Sun Austin ---- - heartbeat/LVM | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 76 insertions(+) - -diff --git a/heartbeat/LVM b/heartbeat/LVM -index 1efb207..bde381c 100755 ---- a/heartbeat/LVM -+++ b/heartbeat/LVM -@@ -367,6 +367,81 @@ LVM_start() { - } - - # -+# Kill provided process that holds lv -+# -+log_and_kill_process_hold_lv() { -+ p_info=$(ps -lfLp ${1} | tail -1) -+ ocf_log warn "lv ${2} is being held by this process (will be forced killed):" -+ ocf_log warn ${p_info} -+ kill -s KILL ${1} -+} -+ -+# -+# Scan for processes that hold any lvs and kill them -+# -+scan_and_kill_processes_hold_lv() { -+ vg_name=${1} -+ -+ # Get list of logical volumes which are busy -+ lv_paths=$(lvdisplay -c ${vg_name} | awk -F ":" '{print $1}') -+ for lv_path in ${lv_paths}; do -+ open_num=$(lvdisplay ${lv_path} | grep "# open" | awk '{print $3}') -+ if [ ${open_num} -gt 0 ]; then -+ lv_name=$(lvdisplay ${lv_path} | grep "LV Name" | awk '{print $3}') -+ lv_block=$(lvdisplay ${lv_path} | grep "Block device" | awk '{print $3}') -+ -+ lv_list="${lv_list} -+${lv_name}|${lv_block}" -+ lv_block_list="${lv_block_list} ${lv_block}" -+ fi -+ done -+ -+ # Exit if there is no busy logical volume -+ [ -z "${lv_list}" ] && exit 0 -+ -+ # Checking to see if any of these busy logical volumes are caused by mount -+ mountinfo=$(cat /proc/1/mountinfo) -+ while read -r line; do -+ mount_majorminor=$(echo ${line} | awk '{print $3}') -+ mount_point=$(echo ${line} | awk '{print $5}') -+ -+ for lv in ${lv_block_list}; do -+ if [ "${lv}" == "${mount_majorminor}" ]; then -+ lv_name=$(echo "${lv_list}" | grep ${lv} | awk -F "|" '{print $1}') -+ ocf_log warn "lv ${lv_name} is busy mounted at ${mount_point} (will be forced unmounted)" -+ processes_holding_mount_point=$(fuser -m ${mount_point} 2>/dev/null) -+ if [ -n "${processes_holding_mount_point}" ]; then -+ for p in ${processes_holding_mount_point}; do -+ log_and_kill_process_hold_lv "${p}" "${lv_name}" -+ done -+ fi -+ umount ${mount_point} -+ [ $? -ne 0 ] && ocf_log warn "Cannot umount ${mount_point}" -+ fi -+ done -+ done <<< "${mountinfo}" -+ -+ # Now checking to see if any process holding these logical volumes -+ all_processes=$(ps -e | awk '{print $1}') -+ for p in ${all_processes}; do -+ [ ! -d /proc/${p}/fd ] && continue -+ opened_file_list=$(ls -l /proc/${p}/fd | awk -F "->" '{print $2}') -+ -+ for f in ${opened_file_list}; do -+ [ ! -b "${f}" ] && continue -+ f_majorminor=$(printf "%d:%d" $(stat -c '0x%t 0x%T' ${f})) -+ -+ for lv in ${lv_block_list}; do -+ if [ "${lv}" == "${f_majorminor}" ]; then -+ lv_name=$(echo "${lv_list}" | grep ${lv} | awk -F "|" '{print $1}') -+ log_and_kill_process_hold_lv "${p}" "${lv_name}" -+ fi -+ done -+ done -+ done -+} -+ -+# - # Disable the LVM volume - # - LVM_stop() { -@@ -395,6 +470,7 @@ LVM_stop() { - break - fi - -+ scan_and_kill_processes_hold_lv $vg - res=$OCF_ERR_GENERIC - ocf_log warn "$vg still Active" - ocf_log info "Retry deactivating volume group $vg" --- -2.7.4 - diff --git a/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch b/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch deleted file mode 100644 index abb7c5843..000000000 --- a/base/cluster-resource-agents/centos/patches/lvm_vg_activation.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 577055560d55b388d479ef398ffd839792dc1996 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:12:54 -0400 -Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch - ---- - heartbeat/LVM | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 116 insertions(+), 1 deletion(-) - -diff --git a/heartbeat/LVM b/heartbeat/LVM -index b0ca87a..38092f9 100755 ---- a/heartbeat/LVM -+++ b/heartbeat/LVM -@@ -222,6 +222,81 @@ LVM_status() { - } - - # -+# Activate one volume explicitly. -+# -+activate_volume() { -+ ocf_run lvchange $1 /dev/${2}/$3 -+ if [ $? -eq 0 ] ; then -+ ocf_log info "Succesfully activated $LV." -+ else -+ ocf_log err "Problem activating $LV." -+ fi -+} -+ -+# -+# Kick off parallel activation of all volumes -+# -+activate_all_volumes() { -+ VG=$1 -+ shift -+ lvchange_args="$*" -+ -+ # Get the list of volumes, without the first line which is column headings. -+ VOLS=`lvs $VG |tail -n +2` -+ -+ while read -r LINE; do -+ # Convert the line into an array. -+ LINE_ARRAY=($LINE) -+ -+ # First array element is the volume/snapshot name. -+ LV=${LINE_ARRAY[0]} -+ -+ # Third array element is the attributes. -+ ATTR=${LINE_ARRAY[2]} -+ -+ # Fifth character in the attributes is "a" if it's active. -+ ACTIVE=${ATTR:4:1} -+ if [ "$ACTIVE" == "a" ]; then -+ ocf_log info "$LV is already active." -+ continue -+ fi -+ -+ SNAPSHOT_ORIGIN=${LINE_ARRAY[4]} -+ if [ "$SNAPSHOT_ORIGIN" != "" ] ; then -+ # If this is a snapshot, don't activate it. -+ continue -+ fi -+ -+ ( activate_volume "$*" $VG $LV ) & -+ done <<< "$VOLS" -+} -+ -+# -+# Scan for inactive volumes and log any that are found. -+# -+log_inactive_volumes() { -+ # Get the list of volumes, without the first line which is column headings. -+ VOLS=`lvs $1 |tail -n +2` -+ -+ while read -r LINE; do -+ # Convert the line into an array. -+ LINE_ARRAY=($LINE) -+ -+ # First array element is the volume/snapshot name. -+ LV=${LINE_ARRAY[0]} -+ -+ # Third array element is the attributes. -+ ATTR=${LINE_ARRAY[2]} -+ -+ # Fifth character in the attributes is "a" if it's active. -+ ACTIVE=${ATTR:4:1} -+ if [ "$ACTIVE" != "a" ]; then -+ ocf_log err "Volume $LV is not active after expiry of timeout." -+ fi -+ done <<< "$VOLS" -+} -+ -+# - # Enable LVM volume - # - LVM_start() { -@@ -241,10 +316,50 @@ LVM_start() { - ocf_run vgscan - fi - -+ # Kick off activation of all volumes. If it doesn't complete within -+ # the timeout period, then we'll log the not-yet-activated volumes and -+ # continue on. - lvm_pre_activate || exit -- ocf_run vgchange $vgchange_activate_options $vg -+ (ocf_run vgchange $vgchange_activate_options $1) & PID=$! - lvm_post_activate $? - -+ # Check every second for up to TIMEOUT seconds whether the vgchange has -+ # completed. -+ TIMEOUT=300 -+ TIMED_OUT=true -+ SECONDS=0; -+ PARALLEL_ACTIVATE_DELAY=10 -+ PARALLEL_ACTIVATE_DONE=false -+ while [ $SECONDS -lt $TIMEOUT ] ; do -+ kill -0 $PID &> /dev/null -+ if [ $? -eq 1 ] ; then -+ # process with pid of $PID doesn't exist, vgchange command completed -+ TIMED_OUT=false -+ break -+ fi -+ if [ $SECONDS -ge $PARALLEL_ACTIVATE_DELAY ] && \ -+ [ "$PARALLEL_ACTIVATE_DONE" != true ] && \ -+ [ "$1" == "cinder-volumes" ] ; then -+ # This will kick off parallel activation of all LVs in the VG. -+ # The delay is to ensure the VG is activated first. -+ PARALLEL_ACTIVATE_DONE=true -+ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_activate_options -+ activate_all_volumes $1 $vgchange_activate_options -+ fi -+ sleep 1 -+ done -+ -+ if [ "$TIMED_OUT" = true ] ; then -+ ocf_log err "Timed out running ocf_run vgchange $vgchange_activate_options $1" -+ log_inactive_volumes $1 -+ else -+ # Child process completed, get its status. -+ wait $PID -+ if [ $? -ne 0 ] ; then -+ return $OCF_ERR_GENERIC -+ fi -+ fi -+ - if LVM_status $vg; then - : OK Volume $vg activated just fine! - return $OCF_SUCCESS --- -2.7.4 - diff --git a/base/cluster-resource-agents/centos/patches/new_ocf_return_codes.patch b/base/cluster-resource-agents/centos/patches/new_ocf_return_codes.patch deleted file mode 100644 index dc078291b..000000000 --- a/base/cluster-resource-agents/centos/patches/new_ocf_return_codes.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 111343419dd381d81303354dad48cca5095ab080 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Fri, 26 Aug 2016 15:06:02 -0400 -Subject: [PATCH 02/12] WRS: Patch106: new_ocf_return_codes.patch - ---- - heartbeat/ocf-returncodes | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -diff --git a/heartbeat/ocf-returncodes b/heartbeat/ocf-returncodes -index dd5f017..9200889 100644 ---- a/heartbeat/ocf-returncodes -+++ b/heartbeat/ocf-returncodes -@@ -4,6 +4,7 @@ - # - # Copyright (c) 2004 SUSE LINUX AG, Andrew Beekhof - # All Rights Reserved. -+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. - # - # - # This library is free software; you can redistribute it and/or -@@ -53,3 +54,37 @@ OCF_NOT_RUNNING=7 - # - OCF_RUNNING_MASTER=8 - OCF_FAILED_MASTER=9 -+ -+# Non-standard values particular to Wind River deployments. -+# -+# OCF does not include the concept of data sync states for master/slave -+# resources. -+# -+# OCF_DATA_INCONSISTENT: -+# The resource's data is not useable. -+# -+# OCF_DATA_OUTDATED: -+# The resource's data is consistent, but a peer with more recent data -+# has been seen. -+# -+# OCF_DATA_CONSISTENT: -+# The resource's data is consistent, but it is unsure that this is the -+# most recent data. -+# -+# OCF_SYNC: -+# The resource is syncing data. -+# -+# OCF_STANDALONE: -+# The resource is operating as standalone. No peer is available or -+# syncing is not possible (i.e. split brain fencing). -+# -+OCF_DATA_INCONSISTENT=32 -+OCF_DATA_OUTDATED=33 -+OCF_DATA_CONSISTENT=34 -+OCF_DATA_SYNC=35 -+OCF_DATA_STANDALONE=36 -+OCF_RUNNING_MASTER_DATA_INCONSISTENT=37 -+OCF_RUNNING_MASTER_DATA_OUTDATED=38 -+OCF_RUNNING_MASTER_DATA_CONSISTENT=39 -+OCF_RUNNING_MASTER_DATA_SYNC=40 -+OCF_RUNNING_MASTER_DATA_STANDALONE=41 --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/ocf-shellfuncs_change_logtag.patch b/base/cluster-resource-agents/centos/patches/ocf-shellfuncs_change_logtag.patch deleted file mode 100644 index bce1699b1..000000000 --- a/base/cluster-resource-agents/centos/patches/ocf-shellfuncs_change_logtag.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 64f5534579e8f14f723c48f317cd56badca225ee Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 25 Aug 2016 13:07:16 -0400 -Subject: [PATCH 1/1] Set OCF_ prefix in logs for syslog destination sorting - ---- - heartbeat/ocf-shellfuncs.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in -index 3565e20..688c150 100644 ---- a/heartbeat/ocf-shellfuncs.in -+++ b/heartbeat/ocf-shellfuncs.in -@@ -176,9 +176,9 @@ hadate() { - set_logtag() { - if [ -z "$HA_LOGTAG" ]; then - if [ -n "$OCF_RESOURCE_INSTANCE" ]; then -- HA_LOGTAG="$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]" -+ HA_LOGTAG="OCF_$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]" - else -- HA_LOGTAG="$__SCRIPT_NAME[$$]" -+ HA_LOGTAG="OCF_$__SCRIPT_NAME[$$]" - fi - fi - } --- -2.7.4 - diff --git a/base/cluster-resource-agents/centos/patches/pgsql.patch b/base/cluster-resource-agents/centos/patches/pgsql.patch deleted file mode 100644 index 71f1e220e..000000000 --- a/base/cluster-resource-agents/centos/patches/pgsql.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 386e3919b703c5a3d06edfc5b078ab67604139ab Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:12:59 -0400 -Subject: [PATCH 07/13] WRS: Patch1111: pgsql.patch - ---- - heartbeat/pgsql | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -diff --git a/heartbeat/pgsql b/heartbeat/pgsql -index 768608e..28cc046 100755 ---- a/heartbeat/pgsql -+++ b/heartbeat/pgsql -@@ -46,6 +46,7 @@ get_pgsql_param() { - OCF_RESKEY_pgctl_default=/usr/bin/pg_ctl - OCF_RESKEY_psql_default=/usr/bin/psql - OCF_RESKEY_pgdata_default=/var/lib/pgsql/data -+OCF_RESKEY_pgconf_default=/etc/postgresql - OCF_RESKEY_pgdba_default=postgres - OCF_RESKEY_pghost_default="" - OCF_RESKEY_pgport_default=5432 -@@ -78,11 +79,12 @@ OCF_RESKEY_replication_slot_name_default="" - : ${OCF_RESKEY_pgctl=${OCF_RESKEY_pgctl_default}} - : ${OCF_RESKEY_psql=${OCF_RESKEY_psql_default}} - : ${OCF_RESKEY_pgdata=${OCF_RESKEY_pgdata_default}} -+: ${OCF_RESKEY_pgconf=${OCF_RESKEY_pgconf_default}} - : ${OCF_RESKEY_pgdba=${OCF_RESKEY_pgdba_default}} - : ${OCF_RESKEY_pghost=${OCF_RESKEY_pghost_default}} - : ${OCF_RESKEY_pgport=${OCF_RESKEY_pgport_default}} - : ${OCF_RESKEY_pglibs=${OCF_RESKEY_pglibs_default}} --: ${OCF_RESKEY_config=${OCF_RESKEY_pgdata}/postgresql.conf} -+: ${OCF_RESKEY_config=${OCF_RESKEY_pgconf}/postgresql.conf} - : ${OCF_RESKEY_start_opt=${OCF_RESKEY_start_opt_default}} - : ${OCF_RESKEY_ctl_opt=${OCF_RESKEY_ctl_opt_default}} - : ${OCF_RESKEY_pgdb=${OCF_RESKEY_pgdb_default}} -@@ -180,6 +182,14 @@ Path to PostgreSQL data directory. - - - -+ -+ -+Path to PostgreSQL config directory. -+ -+pgconf -+ -+ -+ - - - User that owns PostgreSQL. -@@ -243,7 +253,7 @@ SQL script that will be used for monitor operations. - Path to the PostgreSQL configuration file for the instance. - - Configuration file -- -+ - - - -@@ -630,6 +640,12 @@ pgsql_real_start() { - fi - fi - -+ # WRS: Create an unversioned symlink under /var/run so SM can easily -+ # find the PID file. -+ if [ ! -h $PIDFILE_SYMLINK ]; then -+ /bin/ln -s $PIDFILE $PIDFILE_SYMLINK -+ fi -+ - ocf_log info "PostgreSQL is started." - return $rc - } -@@ -2078,10 +2094,11 @@ then - fi - - PIDFILE=${OCF_RESKEY_pgdata}/postmaster.pid -+PIDFILE_SYMLINK=/var/run/postmaster.pid - BACKUPLABEL=${OCF_RESKEY_pgdata}/backup_label - RESOURCE_NAME=`echo $OCF_RESOURCE_INSTANCE | cut -d ":" -f 1` - PGSQL_WAL_RECEIVER_STATUS_ATTR="${RESOURCE_NAME}-receiver-status" --RECOVERY_CONF=${OCF_RESKEY_pgdata}/recovery.conf -+RECOVERY_CONF=${OCF_RESKEY_pgconf}/recovery.conf - NODENAME=$(ocf_local_nodename | tr '[A-Z]' '[a-z]') - - case "$1" in --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/patches/umount-in-namespace.patch b/base/cluster-resource-agents/centos/patches/umount-in-namespace.patch deleted file mode 100644 index 41f27c1fa..000000000 --- a/base/cluster-resource-agents/centos/patches/umount-in-namespace.patch +++ /dev/null @@ -1,27 +0,0 @@ -From eb45b8271ce64a046d41c93b1cffd641245ce55f Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:12:48 -0400 -Subject: [PATCH 05/13] WRS: Patch1109: umount-in-namespace.patch - ---- - heartbeat/Filesystem | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem -index f536298..05e4097 100755 ---- a/heartbeat/Filesystem -+++ b/heartbeat/Filesystem -@@ -503,6 +503,10 @@ signal_processes() { - } - try_umount() { - local SUB=$1 -+ -+ # We need to ensure we umount in namespaces, too -+ /usr/sbin/umount-in-namespace $SUB -+ - $UMOUNT $umount_force $SUB - list_mounts | grep -q " $SUB " >/dev/null 2>&1 || { - ocf_log info "unmounted $SUB successfully" --- -1.9.1 - diff --git a/base/cluster-resource-agents/centos/srpm_path b/base/cluster-resource-agents/centos/srpm_path deleted file mode 100644 index c58e456ad..000000000 --- a/base/cluster-resource-agents/centos/srpm_path +++ /dev/null @@ -1,2 +0,0 @@ -mirror:Source/resource-agents-4.1.1-12.el7_6.7.src.rpm - diff --git a/base/dhcp/centos/build_srpm.data b/base/dhcp/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/dhcp/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index c7aa36ca7..000000000 --- a/base/dhcp/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1eeae27ddc87dc61928b96baa63fe2ff767e35b0 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/dhcp.spec ---- - SPECS/dhcp.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 42409f6..70c7a6d 100644 ---- a/SPECS/dhcp.spec -+++ b/SPECS/dhcp.spec -@@ -18,7 +18,7 @@ - Summary: Dynamic host configuration protocol software - Name: dhcp - Version: 4.2.5 --Release: 82%{?dist} -+Release: 82.el7.centos%{?_tis_dist}.%{tis_patch_ver} - # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to - # dcantrell maintaining the package) made incorrect use of the epoch and - # that's why it is at 12 now. It should have never been used, but it was. --- -2.7.4 - diff --git a/base/dhcp/centos/meta_patches/0001-dhcp-set-the-prefixlen-to-64.patch b/base/dhcp/centos/meta_patches/0001-dhcp-set-the-prefixlen-to-64.patch deleted file mode 100644 index 2d487f14a..000000000 --- a/base/dhcp/centos/meta_patches/0001-dhcp-set-the-prefixlen-to-64.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 54d85d8a0378a6610012adeae7abaefaf01ea9a1 Mon Sep 17 00:00:00 2001 -From: Zhixiong Chi -Date: Tue, 9 Feb 2021 18:30:14 -0800 -Subject: [PATCH] WRS: dhcp: set the prefixlen to 64 - -Drop the patch dhcp-dhclient_ipv6_prefix.patch to keep the default -value of the prefixlen to 64, since we don't need this patch to set -the default value 128 as usual, otherwise it will occurs that all hosts -(controller|compute node) offline after booting off the controller-0, -or the other usage scenes. -As usual, 128 is usually the specifications call for host address -and it doesn't include any on-link information. -By contrast, 64 indicates that's subnet area, and this vaule is used -frequently as usual. So we still use the previous vaule 64. -Meanwhile we don't need to modify the relevant place where every -application code needed for the compatibility any more. - -Signed-off-by: Zhixiong Chi ---- - SPECS/dhcp.spec | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index c893632..f7add1a 100644 ---- a/SPECS/dhcp.spec -+++ b/SPECS/dhcp.spec -@@ -111,7 +111,8 @@ Patch70: dhcp-4.2.5-reference_count_overflow.patch - Patch71: dhcp-replay_file_limit.patch - Patch72: dhcp-4.2.5-expiry_before_renewal_v2.patch - Patch73: dhcp-4.2.5-bind-config.patch --Patch74: dhcp-dhclient_ipv6_prefix.patch -+#Drop dhcp-dhclient_ipv6_prefix.patch not to set the default prefixlen 128 -+#Patch74: dhcp-dhclient_ipv6_prefix.patch - # Support build with bind 9.11.3+ - Patch75: dhcp-4.2.5-isc-util.patch - -@@ -452,7 +453,8 @@ rm -rf includes/isc-dhcp - - # https://bugzilla.redhat.com/show_bug.cgi?id=1647784 - %patch72 -p1 -b .t2-expirity --%patch74 -p1 -b .ipv6-prefix -+# Drop this patch not to set the default prefixlen 128 -+#%patch74 -p1 -b .ipv6-prefix - - # Support for BIND 9.11 - %patch73 -p1 -b .bind-config --- -2.17.0 - diff --git a/base/dhcp/centos/meta_patches/PATCH_ORDER b/base/dhcp/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index a61335fa7..000000000 --- a/base/dhcp/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,4 +0,0 @@ -spec-include-TiS-patches.patch -dhclient-dhcp6-set-hostname.patch -0001-dhcp-set-the-prefixlen-to-64.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch b/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch deleted file mode 100644 index 5f043d0c9..000000000 --- a/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 484178cab006e67cc132eec2587e59c5605edac7 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: WRS: dhclient-dhcp6-set-hostname.patch - ---- - SOURCES/dhclient-script | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script -index 87bad65..fb51eb5 100644 ---- a/SOURCES/dhclient-script -+++ b/SOURCES/dhclient-script -@@ -653,6 +653,10 @@ dh6config() { - - add_ipv6_addr_with_DAD - -+ -+ if [ -n "${new_fqdn_hostname}" ] && need_hostname; then -+ hostname ${new_fqdn_hostname} || echo "See -nc option in dhclient(8) man page." -+ fi - ;; - - RENEW6|REBIND6) -@@ -670,6 +674,10 @@ dh6config() { - [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then - make_resolv_conf - fi -+ -+ if [ -n "${new_fqdn_hostname}" ] && need_hostname; then -+ hostname ${new_fqdn_hostname} || echo "See -nc option in dhclient(8) man page." -+ fi - ;; - - DEPREF6) --- -2.7.4 - diff --git a/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch b/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch deleted file mode 100644 index de42aab08..000000000 --- a/base/dhcp/centos/meta_patches/spec-include-TiS-patches.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7e7a9f1bce5884da1e57d5bdc4f5215b7231924e Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:05 -0400 -Subject: [PATCH] WRS: spec-include-TiS-patches.patch - ---- - SPECS/dhcp.spec | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec -index 14da097..904e3ad 100644 ---- a/SPECS/dhcp.spec -+++ b/SPECS/dhcp.spec -@@ -111,6 +115,11 @@ Patch70: dhcp-4.2.5-reference_count_overflow.patch - Patch71: dhcp-4.2.5-centos-branding.patch - - -+# WRS -+Patch101: dhclient-restrict-interfaces-to-command-line.patch -+Patch102: dhclient-ipv6-bind-to-interface.patch -+Patch103: dhclient-ipv6-conditionally-set-hostname.patch -+ - BuildRequires: autoconf - BuildRequires: automake - BuildRequires: libtool -@@ -439,6 +451,11 @@ rm -rf includes/isc-dhcp - %patch70 -p1 -b .reference_overflow - %patch71 -p1 - -+# WRS -+%patch101 -p1 -+%patch102 -p1 -+%patch103 -p1 -+ - # Update paths in all man pages - for page in client/dhclient.conf.5 client/dhclient.leases.5 \ - client/dhclient-script.8 client/dhclient.8 ; do --- -2.7.4 - diff --git a/base/dhcp/centos/patches/dhclient-ipv6-bind-to-interface.patch b/base/dhcp/centos/patches/dhclient-ipv6-bind-to-interface.patch deleted file mode 100644 index 55c8c1e8d..000000000 --- a/base/dhcp/centos/patches/dhclient-ipv6-bind-to-interface.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f1df67309b435da1d9e02b77100a793ba0165f04 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:18 -0400 -Subject: [PATCH 3/7] WRS: Patch103: dhclient-ipv6-bind-to-interface.patch - ---- - common/socket.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/common/socket.c b/common/socket.c -index f30c171..b236c4a 100644 ---- a/common/socket.c -+++ b/common/socket.c -@@ -236,6 +236,15 @@ if_register_socket(struct interface_info *info, int family, - } - #endif - -+#if defined(SO_BINDTODEVICE) -+ /* Bind this socket to this interface. */ -+ if ((!do_multicast || !*do_multicast) && info->ifp && -+ setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, -+ (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) { -+ log_error("setsockopt: SO_BINDTODEVICE: %m"); -+ } -+#endif -+ - /* Bind the socket to this interface's IP address. */ - if (bind(sock, (struct sockaddr *)&name, name_len) < 0) { - log_error("Can't bind to dhcp address: %m"); -@@ -246,15 +255,6 @@ if_register_socket(struct interface_info *info, int family, - log_fatal("includes a bootp server."); - } - --#if defined(SO_BINDTODEVICE) -- /* Bind this socket to this interface. */ -- if ((local_family != AF_INET6) && (info->ifp != NULL) && -- setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, -- (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) { -- log_fatal("setsockopt: SO_BINDTODEVICE: %m"); -- } --#endif -- - /* IP_BROADCAST_IF instructs the kernel which interface to send - * IP packets whose destination address is 255.255.255.255. These - * will be treated as subnet broadcasts on the interface identified --- -1.9.1 - diff --git a/base/dhcp/centos/patches/dhclient-ipv6-conditionally-set-hostname.patch b/base/dhcp/centos/patches/dhclient-ipv6-conditionally-set-hostname.patch deleted file mode 100644 index 83464be99..000000000 --- a/base/dhcp/centos/patches/dhclient-ipv6-conditionally-set-hostname.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 04e5bef0d9bb0e1b3c8bbecccf11228ae809dfd2 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:21 -0400 -Subject: [PATCH 4/7] WRS: Patch104: - dhclient-ipv6-conditionally-set-hostname.patch - ---- - client/scripts/linux | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/client/scripts/linux b/client/scripts/linux -index 14655f0..59e764f 100755 ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -254,6 +254,19 @@ if [ x$reason = xPREINIT6 ] ; then - exit_with_hooks 0 - fi - -+if [ x$reason = xBOUND6 ] || [ x$reason = xRENEW6 ] || \ -+ [ x$reason = xREBIND6 ] || [ x$reason = xREBOOT6 ]; then -+ current_hostname=`hostname` -+ if [ x$current_hostname = x ] || \ -+ [ x$current_hostname = "x(none)" ] || \ -+ [ x$current_hostname = xlocalhost ] || \ -+ [ x$current_hostname = x$old_fqdn_hostname ]; then -+ if [ x$new_fqdn_hostname != x$old_fqdn_hostname ]; then -+ hostname "$new_fqdn_hostname" -+ fi -+ fi -+fi -+ - if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then - echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix} - --- -1.9.1 - diff --git a/base/dhcp/centos/patches/dhclient-restrict-interfaces-to-command-line.patch b/base/dhcp/centos/patches/dhclient-restrict-interfaces-to-command-line.patch deleted file mode 100644 index 382f17fd7..000000000 --- a/base/dhcp/centos/patches/dhclient-restrict-interfaces-to-command-line.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 15b7057f9b9f2b232cf2f9f674c63140e903e379 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:25:15 -0400 -Subject: [PATCH 2/7] WRS: Patch102: - dhclient-restrict-interfaces-to-command-line.patch - ---- - client/clparse.c | 8 ++++++-- - client/dhclient.c | 3 +++ - includes/dhcpd.h | 1 + - 3 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/client/clparse.c b/client/clparse.c -index b609caf..3ae632a 100644 ---- a/client/clparse.c -+++ b/client/clparse.c -@@ -943,8 +943,12 @@ void parse_interface_declaration (cfile, outer_config, name) - if (!client -> config) - make_client_config (client, outer_config); - -- ip -> flags &= ~INTERFACE_AUTOMATIC; -- interfaces_requested = 1; -+ if (restrict_interfaces != ISC_TRUE) { -+ ip -> flags &= ~INTERFACE_AUTOMATIC; -+ interfaces_requested = 1; -+ } else { -+ log_info("%s not in command line interfaces; ignoring", ip->name); -+ } - - token = next_token (&val, (unsigned *)0, cfile); - if (token != LBRACE) { -diff --git a/client/dhclient.c b/client/dhclient.c -index 0db4703..00b4240 100644 ---- a/client/dhclient.c -+++ b/client/dhclient.c -@@ -71,6 +71,7 @@ isc_boolean_t no_pid_file = ISC_FALSE; - int dhcp_max_agent_option_packet_length = 0; - - int interfaces_requested = 0; -+int restrict_interfaces = ISC_FALSE; - - struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } }; - struct iaddr iaddr_any = { 4, { 0, 0, 0, 0 } }; -@@ -242,6 +243,8 @@ main(int argc, char **argv) { - no_dhclient_pid = 1; - } else if (!strcmp(argv[i], "--no-pid")) { - no_pid_file = ISC_TRUE; -+ } else if (!strcmp(argv[i], "--restrict-interfaces")) { -+ restrict_interfaces = ISC_TRUE; - } else if (!strcmp(argv[i], "-cf")) { - if (++i == argc) - usage(); -diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 1d2bf2c..b1f16bf 100644 ---- a/includes/dhcpd.h -+++ b/includes/dhcpd.h -@@ -2693,6 +2693,7 @@ extern const char *path_dhclient_db; - extern const char *path_dhclient_pid; - extern char *path_dhclient_script; - extern int interfaces_requested; -+extern int restrict_interfaces; - extern struct data_string default_duid; - extern int duid_type; - --- -1.9.1 - diff --git a/base/dhcp/centos/srpm_path b/base/dhcp/centos/srpm_path deleted file mode 100644 index 1a1fad91e..000000000 --- a/base/dhcp/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/dhcp-4.2.5-82.el7.centos.src.rpm diff --git a/base/dnsmasq/centos/build_srpm.data b/base/dnsmasq/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/dnsmasq/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index adbefe4ab..000000000 --- a/base/dnsmasq/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 402d56affb9e0767c4406260522fb356ecc420a0 Mon Sep 17 00:00:00 2001 -From: jmckenna -Date: Fri, 9 Feb 2018 13:51:24 -0500 -Subject: [PATCH] update package patching - -Signed-off-by: zhipengl ---- - SPECS/dnsmasq.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec -index 4d30b0a..689158e 100644 ---- a/SPECS/dnsmasq.spec -+++ b/SPECS/dnsmasq.spec -@@ -13,7 +13,7 @@ - - Name: dnsmasq - Version: 2.76 --Release: 7%{?extraversion}%{?dist} -+Release: 7.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A lightweight DHCP/caching DNS server - - Group: System Environment/Daemons --- -1.8.3.1 - diff --git a/base/dnsmasq/centos/meta_patches/PATCH_ORDER b/base/dnsmasq/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 44da2f427..000000000 --- a/base/dnsmasq/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -spec-include-TiS-patch.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch b/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch deleted file mode 100644 index 66e0ec7d3..000000000 --- a/base/dnsmasq/centos/meta_patches/spec-include-TiS-patch.patch +++ /dev/null @@ -1,67 +0,0 @@ -From ecbe3b4e138cb5076b8cbbedf86fea3044449132 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:27:13 -0400 -Subject: [PATCH 1/5] WRS: spec-include-TiS-patch.patch - -Signed-off-by: zhipengl ---- - SPECS/dnsmasq.spec | 26 ++++++++++---------------- - 1 file changed, 10 insertions(+), 16 deletions(-) - -diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec -index b312ef3..4d30b0a 100644 ---- a/SPECS/dnsmasq.spec -+++ b/SPECS/dnsmasq.spec -@@ -57,6 +57,10 @@ Patch19: dnsmasq-2.76-misc-cleanups.patch - Patch20: dnsmasq-2.76-CVE-2017-14491-2.patch - Patch21: dnsmasq-2.76-inotify.patch - -+# WRS patches -+Patch30: dnsmasq-update-ipv6-leases-from-config.patch -+Patch31: close-tftp-sockets-immediately.patch -+ - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - - BuildRequires: dbus-devel -@@ -113,6 +117,10 @@ query/remove a DHCP server's leases. - %patch20 -p1 -b .CVE-2017-14491-2 - %patch21 -p1 -b .inotify - -+# WRS patches -+%patch30 -p1 -+%patch31 -p1 -+ - # use /var/lib/dnsmasq instead of /var/lib/misc - for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do - sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file" -@@ -168,25 +176,11 @@ rm -rf %{buildroot}%{_initrddir} - %clean - rm -rf $RPM_BUILD_ROOT - --%post --%systemd_post dnsmasq.service -- --%preun --%systemd_preun dnsmasq.service -- --%postun --%systemd_postun_with_restart dnsmasq.service -- --%triggerun -- dnsmasq < 2.52-3 --%{_bindir}/systemd-sysv-convert --save dnsmasq >/dev/null 2>&1 ||: --/sbin/chkconfig --del dnsmasq >/dev/null 2>&1 || : --/bin/systemctl try-restart dnsmasq.service >/dev/null 2>&1 || : -- - %files - %defattr(-,root,root,-) - %doc CHANGELOG COPYING COPYING-v3 FAQ doc.html setup.html dbus/DBus-interface --%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf --%dir /etc/dnsmasq.d -+%config(noreplace) %attr(640,root,root) %{_sysconfdir}/dnsmasq.conf -+%dir %attr(750,root,root) %{_sysconfdir}/dnsmasq.d - %dir %{_var}/lib/dnsmasq - %config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf - %{_unitdir}/%{name}.service --- -1.8.3.1 - diff --git a/base/dnsmasq/centos/patches/close-tftp-sockets-immediately.patch b/base/dnsmasq/centos/patches/close-tftp-sockets-immediately.patch deleted file mode 100644 index 9ca838b09..000000000 --- a/base/dnsmasq/centos/patches/close-tftp-sockets-immediately.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 858e259bf7125695c068301d0ef56cc4750d6544 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 15 Sep 2016 13:32:03 -0400 -Subject: [PATCH 1/1] Close tftp sockets immediately - ---- - src/tftp.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/tftp.c b/src/tftp.c -index d7d050f..ecc6ce8 100644 ---- a/src/tftp.c -+++ b/src/tftp.c -@@ -768,9 +768,11 @@ int do_tftp_script_run(void) - if ((transfer = daemon->tftp_done_trans)) - { - daemon->tftp_done_trans = transfer->next; -+#if 0 /* Disable delayed closing of TFTP UDP socket */ - #ifdef HAVE_SCRIPT - queue_tftp(transfer->file->size, transfer->file->filename, &transfer->peer); - #endif -+#endif - free_transfer(transfer); - return 1; - } --- -1.9.1 - diff --git a/base/dnsmasq/centos/patches/dnsmasq-update-ipv6-leases-from-config.patch b/base/dnsmasq/centos/patches/dnsmasq-update-ipv6-leases-from-config.patch deleted file mode 100644 index 1304435cf..000000000 --- a/base/dnsmasq/centos/patches/dnsmasq-update-ipv6-leases-from-config.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 1a91b72146893dab1cca1354dd3b0a8fa74d6b55 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 18 Oct 2016 13:07:56 -0400 -Subject: WRS: Patch22: dnsmasq-update-ipv6-leases-from-config.patch - ---- - src/lease.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 43 insertions(+), 10 deletions(-) - -diff --git a/src/lease.c b/src/lease.c -index 69e698c..bc56c47 100644 ---- a/src/lease.c -+++ b/src/lease.c -@@ -210,6 +210,18 @@ void lease_init(time_t now) - dns_dirty = 1; - } - -+static int lease_match_config_addr(struct dhcp_lease *lease, struct dhcp_config *config) -+{ -+ if (!(lease->flags & (LEASE_TA | LEASE_NA)) && (config->flags & CONFIG_ADDR)) -+ return (lease->addr.s_addr == config->addr.s_addr); -+#ifdef HAVE_DHCP6 -+ else if ((lease->flags & (LEASE_TA | LEASE_NA)) && (config->flags & CONFIG_ADDR6)) -+ return IN6_ARE_ADDR_EQUAL(&config->addr6, &lease->addr6); -+#endif -+ else -+ return 0; -+} -+ - void lease_update_from_configs(void) - { - /* changes to the config may change current leases. */ -@@ -218,16 +230,37 @@ void lease_update_from_configs(void) - struct dhcp_config *config; - char *name; - -- for (lease = leases; lease; lease = lease->next) -- if (lease->flags & (LEASE_TA | LEASE_NA)) -- continue; -- else if ((config = find_config(daemon->dhcp_conf, NULL, lease->clid, lease->clid_len, -- lease->hwaddr, lease->hwaddr_len, lease->hwaddr_type, NULL)) && -- (config->flags & CONFIG_NAME) && -- (!(config->flags & CONFIG_ADDR) || config->addr.s_addr == lease->addr.s_addr)) -- lease_set_hostname(lease, config->hostname, 1, get_domain(lease->addr), NULL); -- else if ((name = host_from_dns(lease->addr))) -- lease_set_hostname(lease, name, 1, get_domain(lease->addr), NULL); /* updates auth flag only */ -+ for (lease = leases; lease; lease = lease->next) { -+ if (lease->flags & LEASE_TA) -+ continue; /* we do not update temporary ipv6 leases */ -+ -+ config = find_config(daemon->dhcp_conf, NULL, lease->clid, lease->clid_len, -+ (lease->hwaddr_len > 0 ? lease->hwaddr : NULL), -+ lease->hwaddr_len, lease->hwaddr_type, NULL); -+ if (config) -+ { -+ if ((!(config->flags & (CONFIG_ADDR | CONFIG_ADDR6))) || -+ lease_match_config_addr(lease, config)) -+ { -+ /* -+ * Either we matched on a config that doesn't have an address in -+ * which case we'll just use the hostname, or we matched on a -+ * config that has the same IP address. -+ */ -+ if (!(lease->flags & (LEASE_TA | LEASE_NA))) -+ lease_set_hostname(lease, config->hostname, 1, get_domain(lease->addr), NULL); -+#ifdef HAVE_DHCP6 -+ else -+ lease_set_hostname(lease, config->hostname, 1, get_domain6(&lease->addr6), NULL); -+#endif -+ continue; /* lease updated; move on to next lease */ -+ } -+ } -+ -+ /* attempt to find a matching DNS cache entry for an IPv4 entry */ -+ if (!(lease->flags & (LEASE_TA | LEASE_NA)) && (name = host_from_dns(lease->addr))) -+ lease_set_hostname(lease, name, 1, get_domain(lease->addr), NULL); /* updates auth flag only */ -+ } - } - - static void ourprintf(int *errp, char *format, ...) --- -2.7.4 - diff --git a/base/dnsmasq/centos/srpm_path b/base/dnsmasq/centos/srpm_path deleted file mode 100644 index 2f40525ea..000000000 --- a/base/dnsmasq/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/dnsmasq-2.76-7.el7.src.rpm diff --git a/base/dpkg/centos/build_srpm.data b/base/dpkg/centos/build_srpm.data deleted file mode 100644 index cf4c1b57c..000000000 --- a/base/dpkg/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/dpkg_1.18.24.tar.xz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/dpkg/centos/dpkg.spec b/base/dpkg/centos/dpkg.spec deleted file mode 100644 index b893ebedc..000000000 --- a/base/dpkg/centos/dpkg.spec +++ /dev/null @@ -1,43 +0,0 @@ -Summary: dpkg -Name: dpkg -Version: 1.18.24 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD -Group: base -Packager: Wind River -URL: unknown -Source0: %{name}_%{version}.tar.xz - -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: ncurses-static -BuildRequires: perl-version - -%description -dpkg - -%define local_bindir /usr/bin/ - -%prep -%setup - -%build -./configure --prefix=$RPM_BUILD_ROOT \ - --disable-dselect \ - --disable-update-alternatives \ - --without-liblzma -make -j"%(nproc)" - -%install -# Don't install everything, it's too dangerous -# make install - -install -d -m 755 %{buildroot}%{local_bindir} -install -p -D -m 700 utils/start-stop-daemon %{buildroot}%{local_bindir}/start-stop-daemon - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%{local_bindir}/* diff --git a/base/haproxy/centos/build_srpm.data b/base/haproxy/centos/build_srpm.data deleted file mode 100644 index b0740891c..000000000 --- a/base/haproxy/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR="files" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/haproxy/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/haproxy/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 10c010eeb..000000000 --- a/base/haproxy/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 55d52d8bc9f649b4871336aaffd87fb7d931eac8 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 16:12:36 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Signed-off-by: zhipengl ---- - SPECS/haproxy.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec -index 39c0c86..b0d5862 100644 ---- a/SPECS/haproxy.spec -+++ b/SPECS/haproxy.spec -@@ -8,7 +8,7 @@ - - Name: haproxy - Version: 1.5.18 --Release: 8%{?dist} -+Release: 8.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: TCP/HTTP proxy and load balancer for high availability environments - - Group: System Environment/Daemons --- -1.8.3.1 - diff --git a/base/haproxy/centos/meta_patches/PATCH_ORDER b/base/haproxy/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 51c926e48..000000000 --- a/base/haproxy/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -spec-include-TiS-changes.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/base/haproxy/centos/meta_patches/spec-include-TiS-changes.patch b/base/haproxy/centos/meta_patches/spec-include-TiS-changes.patch deleted file mode 100644 index 53c01538f..000000000 --- a/base/haproxy/centos/meta_patches/spec-include-TiS-changes.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0b326ac9fcee3fbac7e41e3bc269cc7251dcf9dd Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 16:12:36 -0400 -Subject: WRS: spec-include-TiS-changes.patch - -Signed-off-by: zhipengl ---- - SPECS/haproxy.spec | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/SPECS/haproxy.spec b/SPECS/haproxy.spec -index 30dca25..53def97 100644 ---- a/SPECS/haproxy.spec -+++ b/SPECS/haproxy.spec -@@ -26,6 +26,8 @@ Patch0: halog-unused-variables.patch - Patch1: iprange-return-type.patch - Patch2: haproxy-tcp-user-timeout.patch - Patch3: haproxy-systemd-wrapper-exit-code.patch -+Patch4: haproxy-env-var.patch -+Patch5: haproxy-tpm-support.patch - - BuildRequires: pcre-devel - BuildRequires: zlib-devel -@@ -37,6 +39,8 @@ Requires(post): systemd - Requires(preun): systemd - Requires(postun): systemd - -+Requires: tpm2-openssl-engine -+ - %description - HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high - availability environments. Indeed, it can: -@@ -57,6 +61,8 @@ availability environments. Indeed, it can: - %patch1 -p0 - %patch2 -p1 - %patch3 -p1 -+%patch4 -p1 -+%patch5 -p1 - - %build - regparm_opts= -@@ -79,7 +85,7 @@ popd - %{__make} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix} - - %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service --%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg -+%{__install} -p -D -m 0640 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg - %{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} - %{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name} - %{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/halog.1 --- -1.8.3.1 - diff --git a/base/haproxy/centos/patches/haproxy-env-var.patch b/base/haproxy/centos/patches/haproxy-env-var.patch deleted file mode 100644 index ac88480e1..000000000 --- a/base/haproxy/centos/patches/haproxy-env-var.patch +++ /dev/null @@ -1,245 +0,0 @@ -diff --git a/src/cfgparse.c b/src/cfgparse.c -index 39abf6b..6a7f80c 100644 ---- a/src/cfgparse.c -+++ b/src/cfgparse.c -@@ -5821,12 +5821,19 @@ out: - */ - int readcfgfile(const char *file) - { -- char thisline[LINESIZE]; -+ char *thisline; -+ int linesize = LINESIZE; - FILE *f; - int linenum = 0; - int err_code = 0; - struct cfg_section *cs = NULL; - struct cfg_section *ics; -+ int readbytes = 0; -+ -+ if ((thisline = malloc(sizeof(*thisline) * linesize)) == NULL) { -+ Alert("parsing [%s] : out of memory.\n", file); -+ return -1; -+ } - - /* Register internal sections */ - if (!cfg_register_section("listen", cfg_parse_listen) || -@@ -5842,11 +5849,14 @@ int readcfgfile(const char *file) - if ((f=fopen(file,"r")) == NULL) - return -1; - -- while (fgets(thisline, sizeof(thisline), f) != NULL) { -+next_line: -+ while (fgets(thisline + readbytes, linesize - readbytes, f) != NULL) { - int arg, kwm = KWM_STD; - char *end; - char *args[MAX_LINE_ARGS + 1]; - char *line = thisline; -+ int dquote = 0; /* double quote */ -+ int squote = 0; /* simple quote */ - - linenum++; - -@@ -5856,11 +5866,25 @@ int readcfgfile(const char *file) - /* Check if we reached the limit and the last char is not \n. - * Watch out for the last line without the terminating '\n'! - */ -- Alert("parsing [%s:%d]: line too long, limit: %d.\n", -- file, linenum, (int)sizeof(thisline)-1); -- err_code |= ERR_ALERT | ERR_FATAL; -+ char *newline; -+ int newlinesize = linesize * 2; -+ -+ newline = realloc(thisline, sizeof(*thisline) * newlinesize); -+ if (newline == NULL) { -+ Alert("parsing [%s:%d]: line too long, cannot allocate memory.\n", -+ file, linenum); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ continue; -+ } -+ -+ readbytes = linesize - 1; -+ linesize = newlinesize; -+ thisline = newline; -+ continue; - } - -+ readbytes = 0; -+ - /* skip leading spaces */ - while (isspace((unsigned char)*line)) - line++; -@@ -5869,10 +5893,26 @@ int readcfgfile(const char *file) - args[arg] = line; - - while (*line && arg < MAX_LINE_ARGS) { -- /* first, we'll replace \\, \, \#, \r, \n, \t, \xXX with their -- * C equivalent value. Other combinations left unchanged (eg: \1). -- */ -- if (*line == '\\') { -+ if (*line == '"' && !squote) { /* double quote outside single quotes */ -+ if (dquote) -+ dquote = 0; -+ else -+ dquote = 1; -+ memmove(line, line + 1, end - line); -+ end--; -+ } -+ else if (*line == '\'' && !dquote) { /* single quote outside double quotes */ -+ if (squote) -+ squote = 0; -+ else -+ squote = 1; -+ memmove(line, line + 1, end - line); -+ end--; -+ } -+ else if (*line == '\\' && !squote) { -+ /* first, we'll replace \\, \, \#, \r, \n, \t, \xXX with their -+ * C equivalent value. Other combinations left unchanged (eg: \1). -+ */ - int skip = 0; - if (line[1] == ' ' || line[1] == '\\' || line[1] == '#') { - *line = line[1]; -@@ -5904,6 +5944,15 @@ int readcfgfile(const char *file) - Alert("parsing [%s:%d] : invalid or incomplete '\\x' sequence in '%s'.\n", file, linenum, args[0]); - err_code |= ERR_ALERT | ERR_FATAL; - } -+ } else if (line[1] == '"') { -+ *line = '"'; -+ skip = 1; -+ } else if (line[1] == '\'') { -+ *line = '\''; -+ skip = 1; -+ } else if (line[1] == '$' && dquote) { /* escaping of $ only inside double quotes */ -+ *line = '$'; -+ skip = 1; - } - if (skip) { - memmove(line + 1, line + 1 + skip, end - (line + skip)); -@@ -5911,23 +5960,117 @@ int readcfgfile(const char *file) - } - line++; - } -- else if (*line == '#' || *line == '\n' || *line == '\r') { -+ else if ((!squote && !dquote && *line == '#') || *line == '\n' || *line == '\r') { - /* end of string, end of loop */ - *line = 0; - break; - } -- else if (isspace((unsigned char)*line)) { -+ else if (!squote && !dquote && isspace((unsigned char)*line)) { - /* a non-escaped space is an argument separator */ - *line++ = '\0'; - while (isspace((unsigned char)*line)) - line++; - args[++arg] = line; - } -+ else if (dquote && *line == '$') { -+ /* environment variables are evaluated inside double quotes */ -+ char *var_beg; -+ char *var_end; -+ char save_char; -+ char *value; -+ int val_len; -+ int newlinesize; -+ int braces = 0; -+ -+ var_beg = line + 1; -+ var_end = var_beg; -+ -+ if (*var_beg == '{') { -+ var_beg++; -+ var_end++; -+ braces = 1; -+ } -+ -+ if (!isalpha((int)(unsigned char)*var_beg) && *var_beg != '_') { -+ Alert("parsing [%s:%d] : Variable expansion: Unrecognized character '%c' in variable name.\n", file, linenum, *var_beg); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ goto next_line; /* skip current line */ -+ } -+ -+ while (isalnum((int)(unsigned char)*var_end) || *var_end == '_') -+ var_end++; -+ -+ save_char = *var_end; -+ *var_end = '\0'; -+ value = getenv(var_beg); -+ *var_end = save_char; -+ val_len = value ? strlen(value) : 0; -+ -+ if (braces) { -+ if (*var_end == '}') { -+ var_end++; -+ braces = 0; -+ } else { -+ Alert("parsing [%s:%d] : Variable expansion: Mismatched braces.\n", file, linenum); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ goto next_line; /* skip current line */ -+ } -+ } -+ -+ newlinesize = (end - thisline) - (var_end - line) + val_len + 1; -+ -+ /* if not enough space in thisline */ -+ if (newlinesize > linesize) { -+ char *newline; -+ -+ newline = realloc(thisline, newlinesize * sizeof(*thisline)); -+ if (newline == NULL) { -+ Alert("parsing [%s:%d] : Variable expansion: Not enough memory.\n", file, linenum); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ goto next_line; /* slip current line */ -+ } -+ /* recompute pointers if realloc returns a new pointer */ -+ if (newline != thisline) { -+ int i; -+ int diff; -+ -+ for (i = 0; i <= arg; i++) { -+ diff = args[i] - thisline; -+ args[i] = newline + diff; -+ } -+ -+ diff = var_end - thisline; -+ var_end = newline + diff; -+ diff = end - thisline; -+ end = newline + diff; -+ diff = line - thisline; -+ line = newline + diff; -+ thisline = newline; -+ } -+ linesize = newlinesize; -+ } -+ -+ /* insert value inside the line */ -+ memmove(line + val_len, var_end, end - var_end + 1); -+ memcpy(line, value, val_len); -+ end += val_len - (var_end - line); -+ line += val_len; -+ } - else { - line++; - } - } - -+ if (dquote) { -+ Alert("parsing [%s:%d] : Mismatched double quotes.\n", file, linenum); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ } -+ -+ if (squote) { -+ Alert("parsing [%s:%d] : Mismatched simple quotes.\n", file, linenum); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ } -+ - /* empty line */ - if (!**args) - continue; -@@ -5998,6 +6141,7 @@ int readcfgfile(const char *file) - break; - } - cursection = NULL; -+ free(thisline); - fclose(f); - return err_code; - } diff --git a/base/haproxy/centos/patches/haproxy-tpm-support.patch b/base/haproxy/centos/patches/haproxy-tpm-support.patch deleted file mode 100644 index eb4545da7..000000000 --- a/base/haproxy/centos/patches/haproxy-tpm-support.patch +++ /dev/null @@ -1,319 +0,0 @@ -From a2a25214f6f4913b774bdd6c0b80d3ea424d3a1b Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Wed, 22 Mar 2017 12:07:24 -0400 -Subject: [PATCH] haproxy tpm support - ---- - include/types/global.h | 13 +++++ - src/cfgparse.c | 28 ++++++++++ - src/haproxy.c | 26 ++++++++- - src/ssl_sock.c | 147 +++++++++++++++++++++++++++++++++++++++++++------ - 4 files changed, 197 insertions(+), 17 deletions(-) - -diff --git a/include/types/global.h b/include/types/global.h -index f1525ae..2e9c077 100644 ---- a/include/types/global.h -+++ b/include/types/global.h -@@ -30,6 +30,10 @@ - #include - #include - -+#ifdef USE_OPENSSL -+#include -+#endif -+ - #ifndef UNIX_MAX_PATH - #define UNIX_MAX_PATH 108 - #endif -@@ -71,6 +75,14 @@ enum { - SSL_SERVER_VERIFY_REQUIRED = 1, - }; - -+// WRS: Define a new TPM configuration structure -+struct tpm_conf { -+ char *tpm_object; -+ char *tpm_engine; -+ EVP_PKEY *tpm_key; -+ ENGINE *tpm_engine_ref; -+}; -+ - /* FIXME : this will have to be redefined correctly */ - struct global { - #ifdef USE_OPENSSL -@@ -87,6 +99,7 @@ struct global { - char *connect_default_ciphers; - int listen_default_ssloptions; - int connect_default_ssloptions; -+ struct tpm_conf tpm; // tpm configuration - #endif - unsigned int ssl_server_verify; /* default verify mode on servers side */ - struct freq_ctr conn_per_sec; -diff --git a/src/cfgparse.c b/src/cfgparse.c -index 6a7f80c..3bc6e79 100644 ---- a/src/cfgparse.c -+++ b/src/cfgparse.c -@@ -1541,6 +1541,34 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) - goto out; - #endif - } -+ else if (!strcmp(args[0], "tpm-object")) { -+ if (global.tpm.tpm_object) { -+ free(global.tpm.tpm_object); -+ } -+#ifdef USE_OPENSSL -+ if (*(args[1]) && (access(args[1], F_OK) != -1)) { -+ global.tpm.tpm_object = strdup(args[1]); -+ } -+#else -+ Alert("parsing [%s:%d] : '%s' is not implemented.\n", file, linenum, args[0]); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ goto out; -+#endif -+ } -+ else if (!strcmp(args[0], "tpm-engine")) { -+ if (global.tpm.tpm_engine) { -+ free(global.tpm.tpm_engine); -+ } -+#ifdef USE_OPENSSL -+ if (*(args[1]) && (access(args[1], F_OK) != -1)) { -+ global.tpm.tpm_engine = strdup(args[1]); -+ } -+#else -+ Alert("parsing [%s:%d] : '%s' is not implemented.\n", file, linenum, args[0]); -+ err_code |= ERR_ALERT | ERR_FATAL; -+ goto out; -+#endif -+ } - else { - struct cfg_kw_list *kwl; - int index; -diff --git a/src/haproxy.c b/src/haproxy.c -index 862697d..2a1a0dc 100644 ---- a/src/haproxy.c -+++ b/src/haproxy.c -@@ -959,6 +959,24 @@ static void deinit_stick_rules(struct list *rules) - } - } - -+static void deinit_tpm_engine() -+{ -+ /* -+ * if the tpm engine is present then -+ * deinit it, this is needed to -+ * flush the TPM key handle from TPM memory -+ */ -+ if (global.tpm.tpm_engine_ref) { -+ ENGINE_finish(global.tpm.tpm_engine_ref); -+ } -+ -+ if (global.tpm.tpm_key) { -+ EVP_PKEY_free(global.tpm.tpm_key); -+ } -+ free(global.tpm.tpm_engine); global.tpm.tpm_engine = NULL; -+ free(global.tpm.tpm_object); global.tpm.tpm_object = NULL; -+} -+ - void deinit(void) - { - struct proxy *p = proxy, *p0; -@@ -1218,7 +1236,13 @@ void deinit(void) - - free(uap); - } -- -+ -+ /* if HAProxy was in TPM mode then deinit -+ * that configuration as well. -+ */ -+ if (global.tpm.tpm_object && global.tpm.tpm_object != '\0') -+ deinit_tpm_engine(); -+ - userlist_free(userlist); - - protocol_unbind_all(); -diff --git a/src/ssl_sock.c b/src/ssl_sock.c -index ead4c7b..4e16026 100644 ---- a/src/ssl_sock.c -+++ b/src/ssl_sock.c -@@ -50,6 +50,7 @@ - #ifndef OPENSSL_NO_DH - #include - #endif -+#include - - #include - #include -@@ -1115,6 +1116,80 @@ end: - return ret; - } - -+/* -+ * initialize the TPM engine and load the -+ * TPM object as private key within the Engine. -+ * Only do this for the first bind since TPM can -+ * only load 3-4 contexes before it runs out of memory -+ */ -+static int ssl_sock_load_tpm_key(SSL_CTX *ctx, char **err) { -+ if (!global.tpm.tpm_object || global.tpm.tpm_object[0] == '\0') { -+ /* not in TPM mode */ -+ return -1; -+ } -+ if (!global.tpm.tpm_key) { -+ Warning ("Could not find tpm_key; initializing engine\n"); -+ /* no key present; load the dynamic TPM engine */ -+ if (global.tpm.tpm_engine && global.tpm.tpm_engine[0]) { -+ ENGINE_load_dynamic(); -+ ENGINE *engine = ENGINE_by_id("dynamic"); -+ if (!engine) { -+ memprintf(err, "%s Unable to load the dynamic engine " -+ "(needed for loading custom TPM engine)\n", -+ err && *err ? *err : ""); -+ return 1; -+ } -+ -+ ENGINE_ctrl_cmd_string(engine, "SO_PATH", global.tpm.tpm_engine, 0); -+ ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0); -+ /* stow away for ENGINE cleanup */ -+ global.tpm.tpm_engine_ref = engine; -+ -+ if (ENGINE_init(engine) != 1) { -+ const char *error_str = ERR_error_string(ERR_get_error(), NULL); -+ memprintf(err, "%s Unable to init the TPM engine (%s). Err: %s\n", -+ err && *err ? *err : "", -+ global.tpm.tpm_engine, error_str); -+ goto tpm_err; -+ } -+ EVP_PKEY *pkey = ENGINE_load_private_key(engine, -+ global.tpm.tpm_object, -+ NULL, NULL); -+ if (!pkey) { -+ const char *error_str = ERR_error_string(ERR_get_error(), NULL); -+ memprintf(err, "%s Unable to load TPM object (%s). Err: %s\n", -+ err && *err ? *err : "", -+ global.tpm.tpm_object, error_str); -+ goto tpm_err; -+ } -+ global.tpm.tpm_key = pkey; -+ } -+ else { /* no TPM engine found */ -+ memprintf(err, "%s TPM engine option not set when TPM mode expected\n", -+ err && *err ? *err : ""); -+ goto tpm_err; -+ } -+ } -+ -+ if (SSL_CTX_use_PrivateKey(ctx, global.tpm.tpm_key) <= 0){ -+ const char *error_str = ERR_error_string(ERR_get_error(), -+ NULL); -+ memprintf(err, "%s Invalid private key provided from TPM engine(%s). Err: %s\n", -+ err && *err ? *err : "", -+ global.tpm.tpm_object, error_str); -+ goto tpm_err; -+ } -+ -+ return 0; -+ -+tpm_err: -+ ENGINE_finish(global.tpm.tpm_engine_ref); -+ global.tpm.tpm_engine_ref = NULL; -+ EVP_PKEY_free(global.tpm.tpm_key); -+ global.tpm.tpm_key = NULL; -+ return 1; -+} -+ - static int ssl_sock_load_cert_file(const char *path, struct bind_conf *bind_conf, struct proxy *curproxy, char **sni_filter, int fcount, char **err) - { - int ret; -@@ -1127,26 +1202,54 @@ static int ssl_sock_load_cert_file(const char *path, struct bind_conf *bind_conf - return 1; - } - -- if (SSL_CTX_use_PrivateKey_file(ctx, path, SSL_FILETYPE_PEM) <= 0) { -- memprintf(err, "%sunable to load SSL private key from PEM file '%s'.\n", -- err && *err ? *err : "", path); -- SSL_CTX_free(ctx); -- return 1; -+ /* NOTE (knasim-wrs): US93721: TPM support -+ * This SSL context applies to SSL frontends only. -+ * If the TPM option is set then the Private key -+ * is stored in TPM. -+ * -+ * Launch the OpenSSL TPM engine and load the TPM -+ * Private Key. The Public key will still be located -+ * at the provided path and needs to be loaded as -+ * per usual. -+ */ -+ if (global.tpm.tpm_object) { -+ ret = ssl_sock_load_tpm_key(ctx, err); -+ if (ret > 0) { -+ /* tpm configuration failed */ -+ SSL_CTX_free(ctx); -+ return 1; -+ } - } -- -- ret = ssl_sock_load_cert_chain_file(ctx, path, bind_conf, sni_filter, fcount); -- if (ret <= 0) { -- memprintf(err, "%sunable to load SSL certificate from PEM file '%s'.\n", -- err && *err ? *err : "", path); -- if (ret < 0) /* serious error, must do that ourselves */ -+ else { /* non TPM mode */ -+ if (SSL_CTX_use_PrivateKey_file(ctx, path, SSL_FILETYPE_PEM) <= 0) { -+ memprintf(err, "%sunable to load SSL private key from PEM file '%s'.\n", -+ err && *err ? *err : "", path); - SSL_CTX_free(ctx); -- return 1; -+ return 1; -+ } - } - -- if (SSL_CTX_check_private_key(ctx) <= 0) { -- memprintf(err, "%sinconsistencies between private key and certificate loaded from PEM file '%s'.\n", -- err && *err ? *err : "", path); -- return 1; -+ ret = ssl_sock_load_cert_chain_file(ctx, path, bind_conf, sni_filter, fcount); -+ if (ret <= 0) { -+ memprintf(err, "%sunable to load SSL certificate from PEM file '%s'.\n", -+ err && *err ? *err : "", path); -+ if (ret < 0) /* serious error, must do that ourselves */ -+ SSL_CTX_free(ctx); -+ return 1; -+ } -+ -+ /* -+ * only match the private key to the public key -+ * for non TPM mode. This op would never work for -+ * TPM since the private key has been wrapped, whereas -+ * the public key is still the original one. -+ */ -+ if (!global.tpm.tpm_object) { -+ if (SSL_CTX_check_private_key(ctx) <= 0) { -+ memprintf(err, "%sinconsistencies between private key and certificate loaded from PEM file '%s'.\n", -+ err && *err ? *err : "", path); -+ return 1; -+ } - } - - /* we must not free the SSL_CTX anymore below, since it's already in -@@ -1725,6 +1828,18 @@ int ssl_sock_prepare_srv_ctx(struct server *srv, struct proxy *curproxy) - cfgerr++; - return cfgerr; - } -+ -+ /* NOTE (knasim-wrs): US93721: TPM support -+ * This SSL context applies to SSL backends only. -+ * Since Titanium backends don't support SSL, there -+ * is no need to offload these keys in TPM or reuse the -+ * same TPM key for the frontend engine. -+ * -+ * If SSL backends are to be supported in the future, -+ * over TPM, then create a new TPM Engine context and -+ * load the backend key in TPM, in a similar fashion to -+ * the frontend key. -+ */ - if (srv->ssl_ctx.client_crt) { - if (SSL_CTX_use_PrivateKey_file(srv->ssl_ctx.ctx, srv->ssl_ctx.client_crt, SSL_FILETYPE_PEM) <= 0) { - Alert("config : %s '%s', server '%s': unable to load SSL private key from PEM file '%s'.\n", --- -1.8.3.1 - diff --git a/base/haproxy/centos/srpm_path b/base/haproxy/centos/srpm_path deleted file mode 100644 index 3ff579401..000000000 --- a/base/haproxy/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/haproxy-1.5.18-8.el7.src.rpm diff --git a/base/inih/centos/build_srpm.data b/base/inih/centos/build_srpm.data deleted file mode 100644 index a5b1f6a0e..000000000 --- a/base/inih/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -TAR_NAME=inih -GIT_SHA=b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69 -VERSION=44 - -COPY_LIST="$STX_BASE/downloads/$TAR_NAME-$GIT_SHA.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/inih/centos/inih.spec b/base/inih/centos/inih.spec deleted file mode 100644 index 7bc540a76..000000000 --- a/base/inih/centos/inih.spec +++ /dev/null @@ -1,45 +0,0 @@ -%global git_sha b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69 - -Summary: inih -Name: inih -Version: 44 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: New BSD -Group: base -Packager: Wind River -URL: https://github.com/benhoyt/inih/releases/tag/r44 -Source0: %{name}-%{git_sha}.tar.gz - -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: ncurses-static -BuildRequires: perl-version - -%define debug_package %{nil} -%description -Simple .INI file parser written in C - -%prep -%setup - -%build -pushd extra > /dev/null -make -f Makefile.static -popd > /dev/null - -%install -install -d -m 755 %{buildroot}%{_libdir} -install -d -m 755 %{buildroot}%{_includedir} -install -d -m 755 %{buildroot}%{_datadir}/inih/ -install -p -D -m 755 extra/libinih.a %{buildroot}%{_libdir}/libinih.a -install -p -D -m 644 ini.h %{buildroot}%{_includedir}/ini.h -install -p -D -m 644 LICENSE.txt %{buildroot}%{_datadir}/inih/LICENSE.txt - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%{_libdir}/* -%{_includedir}/* -%{_datadir}/* diff --git a/base/initscripts/centos/build_srpm.data b/base/initscripts/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/initscripts/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/initscripts/centos/meta_patches/0001-Include-starlingx-initscripts-changes.patch b/base/initscripts/centos/meta_patches/0001-Include-starlingx-initscripts-changes.patch deleted file mode 100644 index fa1b9308d..000000000 --- a/base/initscripts/centos/meta_patches/0001-Include-starlingx-initscripts-changes.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 764ce9e69477b47577fc0231f4a0190b119937f7 Mon Sep 17 00:00:00 2001 -From: Joseph Richard -Date: Tue, 19 Nov 2019 13:06:43 -0500 -Subject: [PATCH] Include starlingx initscripts changes - -This is build with build-pkgs --edit initscripts, and then rebased with -git rebase -i --root, with all existing meta-patches squashed into this -commit, and then the new meta-patch created from the output of -git format-patch HEAD~ - -Signed-off-by: Joseph Richard ---- - SPECS/initscripts.spec | 38 ++++++++++++++++++++++++++++++-------- - 1 file changed, 30 insertions(+), 8 deletions(-) - -diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec -index fb0bd96..a446775 100644 ---- a/SPECS/initscripts.spec -+++ b/SPECS/initscripts.spec -@@ -4,7 +4,7 @@ Version: 9.49.46 - # ppp-watch is GPLv2+, everything else is GPLv2 - License: GPLv2 and GPLv2+ - Group: System Environment/Base --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - URL: https://github.com/fedora-sysv/initscripts - Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -@@ -36,6 +36,20 @@ Requires(preun): /sbin/chkconfig - BuildRequires: glib2-devel popt-devel gettext pkgconfig systemd - Provides: /sbin/service - -+Patch1: support-interface-scriptlets.patch -+Patch2: relocate-dhclient-leases-to-var-run.patch -+Patch3: dhclient-restrict-interfaces-to-those-on-c.patch -+Patch4: support-interface-promisc.patch -+Patch5: 0001-dhclient-remove-1-arg.patch -+Patch6: 0001-force-delay-check-link-down.patch -+Patch7: run-ifdown-on-all-interfaces.patch -+Patch8: sysconfig-affirmative-check-for-link-carrier.patch -+Patch9: sysconfig-unsafe-usage-of-linkdelay-variable.patch -+Patch10: ipv6-static-route-support.patch -+Patch11: ifup-eth-stop-waiting-if-link-is-up.patch -+Patch12: ifup-alias-scope.patch -+Patch13: ifup-alias-check-ipaddr.patch -+ - %description - The initscripts package contains basic system scripts used - during a boot of the system. It also contains scripts which -@@ -55,6 +69,20 @@ Currently, this consists of various memory checking code. - %prep - %setup -q - -+%patch1 -p1 -+%patch2 -p1 -+%patch3 -p1 -+%patch4 -p1 -+%patch5 -p1 -+%patch6 -p1 -+%patch7 -p1 -+%patch8 -p1 -+%patch9 -p1 -+%patch10 -p1 -+%patch11 -p1 -+%patch12 -p1 -+%patch13 -p1 -+ - %build - make - -@@ -163,10 +191,7 @@ rm -rf $RPM_BUILD_ROOT - /usr/lib/systemd/rhel-* - /usr/lib/systemd/system/* - /etc/inittab --%dir /etc/rc.d --%dir /etc/rc.d/rc[0-9].d - /etc/rc[0-9].d --%dir /etc/rc.d/init.d - /etc/rc.d/init.d/* - %config(noreplace) /etc/sysctl.conf - /usr/lib/sysctl.d/00-system.conf -@@ -188,7 +213,6 @@ rm -rf $RPM_BUILD_ROOT - /usr/sbin/ppp-watch - %{_mandir}/man*/* - %dir %attr(775,root,root) /var/run/netreport --%dir /etc/ppp - %dir /etc/ppp/peers - /etc/ppp/ip-up - /etc/ppp/ip-down -@@ -196,8 +220,6 @@ rm -rf $RPM_BUILD_ROOT - /etc/ppp/ip-down.ipv6to4 - /etc/ppp/ipv6-up - /etc/ppp/ipv6-down --%dir /etc/NetworkManager --%dir /etc/NetworkManager/dispatcher.d - /etc/NetworkManager/dispatcher.d/00-netreport - %doc sysconfig.txt sysvinitfiles static-routes-ipv6 ipv6-tunnel.howto ipv6-6to4.howto changes.ipv6 COPYING - %doc examples -@@ -207,7 +229,7 @@ rm -rf $RPM_BUILD_ROOT - %ghost %attr(0664,root,utmp) /var/run/utmp - %ghost %attr(0644,root,root) /etc/sysconfig/kvm - %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab --%dir /usr/lib/tmpfiles.d -+%dir %attr(0755,root,root) /usr/lib/tmpfiles.d - /usr/lib/tmpfiles.d/initscripts.conf - %dir /usr/libexec/initscripts - %dir /usr/libexec/initscripts/legacy-actions --- -1.8.3.1 - diff --git a/base/initscripts/centos/meta_patches/PATCH_ORDER b/base/initscripts/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 237d7f91b..000000000 --- a/base/initscripts/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Include-starlingx-initscripts-changes.patch -meta-dhclient6-remove-one-shot-arg.patch diff --git a/base/initscripts/centos/meta_patches/meta-dhclient6-remove-one-shot-arg.patch b/base/initscripts/centos/meta_patches/meta-dhclient6-remove-one-shot-arg.patch deleted file mode 100644 index 73d543858..000000000 --- a/base/initscripts/centos/meta_patches/meta-dhclient6-remove-one-shot-arg.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ea055ff88680ae68f78b8807cef8c76030e3d1de Mon Sep 17 00:00:00 2001 -From: Andre Fernando Zanella Kantek - -Date: Tue, 6 Jul 2021 10:24:21 -0400 -Subject: [PATCH 1/1] meta dhclient6 remove one shot arg - -Signed-off-by: Andre Fernando Zanella Kantek ---- - SPECS/initscripts.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec -index a446775..bda0e5c 100644 ---- a/SPECS/initscripts.spec -+++ b/SPECS/initscripts.spec -@@ -49,6 +49,7 @@ Patch10: ipv6-static-route-support.patch - Patch11: ifup-eth-stop-waiting-if-link-is-up.patch - Patch12: ifup-alias-scope.patch - Patch13: ifup-alias-check-ipaddr.patch -+Patch14: dhclient6-remove-one-shot-arg.patch - - %description - The initscripts package contains basic system scripts used -@@ -82,6 +83,7 @@ Currently, this consists of various memory checking code. - %patch11 -p1 - %patch12 -p1 - %patch13 -p1 -+%patch14 -p1 - - %build - make --- -2.29.2 - diff --git a/base/initscripts/centos/patches/0001-dhclient-remove-1-arg.patch b/base/initscripts/centos/patches/0001-dhclient-remove-1-arg.patch deleted file mode 100644 index 2f5c813d4..000000000 --- a/base/initscripts/centos/patches/0001-dhclient-remove-1-arg.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 11bc780fc8c7cfc7bbc59dcd84f3735c1cabfd30 Mon Sep 17 00:00:00 2001 -From: Ludovic Beliveau -Date: Mon, 30 May 2016 10:12:43 -0400 -Subject: [PATCH 1/1] dhclient remove -1 arg - ---- - sysconfig/network-scripts/ifup-eth | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth -index fdbbf13..439c4c5 100755 ---- a/sysconfig/network-scripts/ifup-eth -+++ b/sysconfig/network-scripts/ifup-eth -@@ -212,7 +212,8 @@ if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then - generate_lease_file_name - - # Initialize the dhclient args and obtain the hostname options if needed: -- DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient-${DEVICE}.pid" -+ # DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient-${DEVICE}.pid" -+ DHCLIENTARGS="${DHCLIENTARGS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient-${DEVICE}.pid" - set_hostname_options DHCLIENTARGS - - echo --- -1.9.1 - diff --git a/base/initscripts/centos/patches/0001-force-delay-check-link-down.patch b/base/initscripts/centos/patches/0001-force-delay-check-link-down.patch deleted file mode 100644 index ce423d6c7..000000000 --- a/base/initscripts/centos/patches/0001-force-delay-check-link-down.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6afaa4c6e0f4ca0821da986e3e4cc1a0bf56bebb Mon Sep 17 00:00:00 2001 -From: Ludovic Beliveau -Date: Thu, 9 Jun 2016 23:05:17 -0400 -Subject: [PATCH 1/1] force-delay-check-link-down - ---- - sysconfig/network-scripts/network-functions | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions -index 080101b..798f28a 100644 ---- a/sysconfig/network-scripts/network-functions -+++ b/sysconfig/network-scripts/network-functions -@@ -470,7 +470,7 @@ check_link_down () - ip link set dev $1 up >/dev/null 2>&1 - fi - timeout=0 -- delay=10 -+ delay=20 - [ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2)) - while [ $timeout -le $delay ]; do - [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" != "0" ] && return 1 --- -1.9.1 - diff --git a/base/initscripts/centos/patches/dhclient-restrict-interfaces-to-those-on-c.patch b/base/initscripts/centos/patches/dhclient-restrict-interfaces-to-those-on-c.patch deleted file mode 100644 index 79dc969e3..000000000 --- a/base/initscripts/centos/patches/dhclient-restrict-interfaces-to-those-on-c.patch +++ /dev/null @@ -1,65 +0,0 @@ -From bafc4d1f7971edbe7cd411fbe2ee6876ded35c6e Mon Sep 17 00:00:00 2001 -From: Allain Legacy -Date: Thu, 14 Apr 2016 12:04:55 -0400 -Subject: [PATCH] CGTS-3416: dhclient: restrict interfaces to those on command - line only - -By default, the dhclient process does not respect the list of interfaces -supplied at the command line. It configures any interfaces found to be -specified in the config file. Since we customize options for each interface in -our config file and run a separate dhclient process for each interface we end -up with multiple dhclient processes that each service all interfaces. This is -undesirable because it is possible that a request is sent by process A but -received by process B. This leads to lease expiry events even though a valid -request packet was returned by the server. - -This change introduces a "--restrict-interfaces" option to the dhclient process -to force it to ignore all interfaces in config files other than those specified -at the command line. - -To activate this change our version of ifup/ifdown has been modified to -pass the "--restrict-interfaces" to dhclient as well as to request that each -process use its own lease file to avoid file corruption. ---- - sysconfig/network-scripts/ifdown-eth | 2 +- - sysconfig/network-scripts/ifup-eth | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth -index 7ccbddf..5b75162 100755 ---- a/sysconfig/network-scripts/ifdown-eth -+++ b/sysconfig/network-scripts/ifdown-eth -@@ -92,7 +92,7 @@ for VER in "" 6 ; do - dhcpid=$(cat /var/run/dhclient$VER-${DEVICE}.pid) - generate_lease_file_name $VER - if is_true "$DHCPRELEASE"; then -- /sbin/dhclient -r -lf ${LEASEFILE} -pf /var/run/dhclient$VER-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1 -+ /sbin/dhclient -r -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient$VER-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1 - retcode=$? - else - kill $dhcpid >/dev/null 2>&1 -diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth -index 3da5c16..9bcf57f 100755 ---- a/sysconfig/network-scripts/ifup-eth -+++ b/sysconfig/network-scripts/ifup-eth -@@ -204,7 +204,7 @@ if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then - generate_lease_file_name - - # Initialize the dhclient args and obtain the hostname options if needed: -- DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient-${DEVICE}.pid" -+ DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient-${DEVICE}.pid" - set_hostname_options DHCLIENTARGS - - echo -@@ -355,7 +355,7 @@ if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then - echo -n $"Determining IPv6 information for ${DEVICE}..." - - # Initialize the dhclient args for IPv6 and obtain the hostname options if needed: -- DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}" -+ DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}" - set_hostname_options DHCLIENTARGS - - if /sbin/dhclient $DHCLIENTARGS; then --- -1.9.1 - diff --git a/base/initscripts/centos/patches/dhclient6-remove-one-shot-arg.patch b/base/initscripts/centos/patches/dhclient6-remove-one-shot-arg.patch deleted file mode 100644 index 8c4a4de5d..000000000 --- a/base/initscripts/centos/patches/dhclient6-remove-one-shot-arg.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b6b206cdba982d8152191e8e795d15ae29ed993e Mon Sep 17 00:00:00 2001 -From: Andre Fernando Zanella Kantek - -Date: Tue, 6 Jul 2021 10:17:40 -0400 -Subject: [PATCH 1/1] dhclient6 remove one shot arg - -Signed-off-by: Andre Fernando Zanella Kantek ---- - sysconfig/network-scripts/ifup-eth | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth -index bf3f96b..cb87fd6 100755 ---- a/sysconfig/network-scripts/ifup-eth -+++ b/sysconfig/network-scripts/ifup-eth -@@ -364,7 +364,7 @@ if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then - echo -n $"Determining IPv6 information for ${DEVICE}..." - - # Initialize the dhclient args for IPv6 and obtain the hostname options if needed: -- DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}" -+ DHCLIENTARGS="-6 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}" - set_hostname_options DHCLIENTARGS - - if /sbin/dhclient $DHCLIENTARGS; then --- -2.29.2 - diff --git a/base/initscripts/centos/patches/ifup-alias-check-ipaddr.patch b/base/initscripts/centos/patches/ifup-alias-check-ipaddr.patch deleted file mode 100644 index edac24bb1..000000000 --- a/base/initscripts/centos/patches/ifup-alias-check-ipaddr.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a45766732beaa475d48907824666e501bacc69db Mon Sep 17 00:00:00 2001 -From: Teresa Ho -Date: Wed, 25 Sep 2019 15:56:36 -0400 -Subject: [PATCH 1/1] Patch14: ifup-alias-check-ipaddr - ---- - sysconfig/network-scripts/ifup-aliases | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases -index 9086763..40454ed 100755 ---- a/sysconfig/network-scripts/ifup-aliases -+++ b/sysconfig/network-scripts/ifup-aliases -@@ -175,7 +175,7 @@ function new_interface () - ipseen_${IPGLOP}=$FILE; devseen_${DEVNUM}=$FILE; - "; - -- if [ -n "$ipseen" ]; then -+ if [ -n "$IPADDR" -a -n "$ipseen" ]; then - net_log $"error in $FILE: already seen ipaddr $IPADDR in $ipseen" - return 1 - fi --- -1.8.3.1 - diff --git a/base/initscripts/centos/patches/ifup-alias-scope.patch b/base/initscripts/centos/patches/ifup-alias-scope.patch deleted file mode 100644 index e05acda5f..000000000 --- a/base/initscripts/centos/patches/ifup-alias-scope.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 59e30a344df4b661f30c0a5c629dbd13e9d88e8f Mon Sep 17 00:00:00 2001 -From: Teresa Ho -Date: Mon, 17 Dec 2018 17:47:18 -0500 -Subject: [PATCH 1/1] WRS: Patch13: ifup-alias-scope.patch - ---- - sysconfig/network-scripts/ifup-aliases | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases -index 52d43ea..9086763 100755 ---- a/sysconfig/network-scripts/ifup-aliases -+++ b/sysconfig/network-scripts/ifup-aliases -@@ -277,8 +277,14 @@ function new_interface () - fi - fi - -+ if [ "${parent_device}" = "lo" ]; then -+ SCOPE="scope host" -+ else -+ SCOPE=${SCOPE:-} -+ fi -+ - /sbin/ip addr add ${IPADDR}/${PREFIX} brd ${BROADCAST} \ -- dev ${parent_device} label ${DEVICE} -+ dev ${parent_device} ${SCOPE} label ${DEVICE} - - # update ARP cache of neighboring computers: - if ! is_false "${ARPUPDATE}" && [ "${REALDEVICE}" != "lo" ]; then --- -1.8.3.1 - diff --git a/base/initscripts/centos/patches/ifup-eth-stop-waiting-if-link-is-up.patch b/base/initscripts/centos/patches/ifup-eth-stop-waiting-if-link-is-up.patch deleted file mode 100644 index cb0106b6f..000000000 --- a/base/initscripts/centos/patches/ifup-eth-stop-waiting-if-link-is-up.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 358cb3c0c8feed5ecfaa8ebfc56b7742b88bb14a Mon Sep 17 00:00:00 2001 -From: Denny Khoerniawan -Date: Wed, 15 Nov 2017 14:02:49 -0500 -Subject: [PATCH] ifup-eth stop waiting if link is up - ---- - sysconfig/network-scripts/ifup-eth | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth -index 192ad18..4b8b992 100755 ---- a/sysconfig/network-scripts/ifup-eth -+++ b/sysconfig/network-scripts/ifup-eth -@@ -168,7 +168,7 @@ if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then - /sbin/ifup ${device##*/} || net_log "Unable to start slave device ${device##*/} for master ${DEVICE}." warning - done - -- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} -+ check_link_down ${DEVICE} - - # add the bits to setup the needed post enslavement parameters - for arg in $BONDING_OPTS ; do -@@ -188,7 +188,7 @@ if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then - /sbin/ip addr flush dev ${DEVICE} 2>/dev/null - /sbin/ip link set dev ${DEVICE} up - ethtool_set -- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} -+ check_link_down ${DEVICE} - /usr/sbin/brctl addif -- ${BRIDGE} ${DEVICE} - # add the bits to setup driver parameters here - for arg in $BRIDGING_OPTS ; do -@@ -244,7 +244,7 @@ else - # enable device without IP, useful for e.g. PPPoE - ip link set dev ${REALDEVICE} up - ethtool_set -- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} -+ check_link_down ${REALDEVICE} - else - - expand_config -@@ -259,7 +259,7 @@ else - - ethtool_set - -- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} -+ check_link_down ${REAL_DEVICE} - - if [ "${DEVICE}" = "lo" ]; then - SCOPE="scope host" --- -1.8.3.1 - diff --git a/base/initscripts/centos/patches/ipv6-static-route-support.patch b/base/initscripts/centos/patches/ipv6-static-route-support.patch deleted file mode 100644 index 52473cd87..000000000 --- a/base/initscripts/centos/patches/ipv6-static-route-support.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e47e3faa2a3a35018e111dbd061a2e529cf77f9c Mon Sep 17 00:00:00 2001 -From: Kevin Smith -Date: Tue, 17 Oct 2017 10:46:00 -0500 -Subject: [PATCH 1/1] ipv6 static route support - ---- - sysconfig/network-scripts/ifup-routes | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes -index ff8d5b5..a82d053 100755 ---- a/sysconfig/network-scripts/ifup-routes -+++ b/sysconfig/network-scripts/ifup-routes -@@ -32,9 +32,11 @@ handle_ip_file() { - if [ "$type" != "$t" ]; then - proto="-6" - fi -+ # remove proto input from below so we can keep -+ # ipv6 routes in a route- file as well. - { cat "$file" ; echo ; } | while read line; do - if [[ ! "$line" =~ $MATCH ]]; then -- /sbin/ip $proto $type add $line -+ /sbin/ip $type add $line - fi - done - } --- -1.8.3.1 - diff --git a/base/initscripts/centos/patches/relocate-dhclient-leases-to-var-run.patch b/base/initscripts/centos/patches/relocate-dhclient-leases-to-var-run.patch deleted file mode 100644 index 07899e3cc..000000000 --- a/base/initscripts/centos/patches/relocate-dhclient-leases-to-var-run.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6a3a3047ad47570ccdb9b758c8417a66447be697 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Thu, 5 Oct 2017 12:31:18 -0400 -Subject: [PATCH 2/9] WRS: Patch5-relocate-dhclient-leases-to-var-run.patch - ---- - sysconfig/network-scripts/network-functions | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions -index 1867c38..080101b 100644 ---- a/sysconfig/network-scripts/network-functions -+++ b/sysconfig/network-scripts/network-functions -@@ -65,11 +65,11 @@ get_uuid_by_config () - generate_lease_file_name () - { - local ver=$1 -- LEASEFILE="/var/lib/dhclient/dhclient$ver-${DEVICE}.leases" -+ LEASEFILE="/var/run/dhclient$ver-${DEVICE}.leases" - if [ -f $LEASEFILE ]; then - return - fi -- LEASEFILE="/var/lib/dhclient/dhclient$ver-${UUID}-${DEVICE}.lease" -+ LEASEFILE="/var/run/dhclient$ver-${UUID}-${DEVICE}.lease" - } - - generate_config_file_name () --- -1.9.1 - diff --git a/base/initscripts/centos/patches/run-ifdown-on-all-interfaces.patch b/base/initscripts/centos/patches/run-ifdown-on-all-interfaces.patch deleted file mode 100644 index 2b4e9218d..000000000 --- a/base/initscripts/centos/patches/run-ifdown-on-all-interfaces.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 76a5f892c132eed05a6cbffbdba3306e50b6a672 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Thu, 5 Oct 2017 12:40:38 -0400 -Subject: [PATCH 7/9] WRS: Patch10-run-ifdown-on-all-interfaces.patch - ---- - rc.d/init.d/network | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/rc.d/init.d/network b/rc.d/init.d/network -index a8deed3..852ef94 100755 ---- a/rc.d/init.d/network -+++ b/rc.d/init.d/network -@@ -228,6 +228,9 @@ stop) - if ! check_device_down $DEVICE; then - action $"Shutting down interface $i: " ./ifdown $i boot - [ $? -ne 0 ] && rc=1 -+ else -+ action $"Shutting down non-UP interface $i: " ./ifdown $i boot -+ logger $"Running ifdown on non-UP interface $i" - fi - ) - done --- -1.9.1 - diff --git a/base/initscripts/centos/patches/support-interface-promisc.patch b/base/initscripts/centos/patches/support-interface-promisc.patch deleted file mode 100644 index 19213adee..000000000 --- a/base/initscripts/centos/patches/support-interface-promisc.patch +++ /dev/null @@ -1,53 +0,0 @@ -From f50fd7a0a9b53ba475d85670a5428876e13dac36 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Thu, 5 Oct 2017 12:37:06 -0400 -Subject: [PATCH 4/9] WRS: Patch7-support-interface-promisc.patch - ---- - sysconfig/network-scripts/ifdown-eth | 5 +++++ - sysconfig/network-scripts/ifup-eth | 8 ++++++++ - 2 files changed, 13 insertions(+) - -diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth -index 5b75162..60f1ba2 100755 ---- a/sysconfig/network-scripts/ifdown-eth -+++ b/sysconfig/network-scripts/ifdown-eth -@@ -181,4 +181,9 @@ if [ -n "$VLAN" ]; then - fi - fi - -+# WRS: Support PROMISC -+if [ "${PROMISC}" = yes ]; then -+ ip link set dev ${DEVICE} promisc off -+fi -+ - exit $retcode -diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth -index 9bcf57f..fdbbf13 100755 ---- a/sysconfig/network-scripts/ifup-eth -+++ b/sysconfig/network-scripts/ifup-eth -@@ -128,6 +128,11 @@ if [ -n "${MTU}" ]; then - ip link set dev ${DEVICE} mtu ${MTU} - fi - -+# WRS: Support PROMISC -+if [ "${PROMISC}" = yes ]; then -+ ip link set dev ${DEVICE} promisc on -+fi -+ - # is the device wireless? If so, configure wireless device specifics - is_wireless_device ${DEVICE} && . ./ifup-wireless - -@@ -147,6 +152,9 @@ if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then - } - ethtool_set - -+ # WRS: Flush addresses -+ ip addr flush dev ${DEVICE} -+ - exit 0 - fi - --- -1.9.1 - diff --git a/base/initscripts/centos/patches/support-interface-scriptlets.patch b/base/initscripts/centos/patches/support-interface-scriptlets.patch deleted file mode 100644 index 3682fa0b8..000000000 --- a/base/initscripts/centos/patches/support-interface-scriptlets.patch +++ /dev/null @@ -1,91 +0,0 @@ -From b5fb31139b18385f295debe8acdb25c23b6f8b87 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Thu, 5 Oct 2017 12:30:03 -0400 -Subject: [PATCH 1/9] WRS: Patch4-support-interface-scriptlets.patch - ---- - sysconfig/network-scripts/ifdown | 6 ++++++ - sysconfig/network-scripts/ifdown-post | 12 ++++++++++++ - sysconfig/network-scripts/ifup | 6 ++++++ - sysconfig/network-scripts/ifup-post | 12 ++++++++++++ - 4 files changed, 36 insertions(+) - -diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown -index 90b1c83..88c1d74 100755 ---- a/sysconfig/network-scripts/ifdown -+++ b/sysconfig/network-scripts/ifdown -@@ -58,6 +58,12 @@ if [ -x /sbin/ifdown-pre-local ]; then - /sbin/ifdown-pre-local ${DEVICE} - fi - -+# WRS: Execute pre-down commands. -+if [ -n "$pre_down" ]; then -+ eval $pre_down -+ [ "$?" != "0" ] && exit 1 -+fi -+ - OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${DEVICETYPE}" - - if [ ! -x ${OTHERSCRIPT} ]; then -diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post -index 8b56e14..bd4198a 100755 ---- a/sysconfig/network-scripts/ifdown-post -+++ b/sysconfig/network-scripts/ifdown-post -@@ -69,4 +69,16 @@ if [ -x /sbin/ifdown-local ]; then - /sbin/ifdown-local ${DEVICE} - fi - -+# WRS: Execute down commands. -+if [ -n "$down" ]; then -+ eval $down -+ [ "$?" != "0" ] && exit 1 -+fi -+ -+# WRS: Execute post-down commands. -+if [ -n "$post_down" ]; then -+ eval $post_down -+ [ "$?" != "0" ] && exit 1 -+fi -+ - exit 0 -diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup -index d25db5a..07c63a5 100755 ---- a/sysconfig/network-scripts/ifup -+++ b/sysconfig/network-scripts/ifup -@@ -151,6 +151,12 @@ if [ -x /sbin/ifup-pre-local ]; then - /sbin/ifup-pre-local ${CONFIG} $2 - fi - -+# WRS: Execute pre-up commands. -+if [ -n "$pre_up" ]; then -+ eval $pre_up -+ [ "$?" != "0" ] && exit 1 -+fi -+ - OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}" - - if [ ! -x ${OTHERSCRIPT} ]; then -diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post -index ab0710b..3b76492 100755 ---- a/sysconfig/network-scripts/ifup-post -+++ b/sysconfig/network-scripts/ifup-post -@@ -148,4 +148,16 @@ if [ -x /sbin/ifup-local ]; then - /sbin/ifup-local ${DEVICE} - fi - -+# WRS: Execute up commands. -+if [ -n "$up" ]; then -+ eval $up -+ [ "$?" != "0" ] && exit 1 -+fi -+ -+# WRS: Execute post-up commands. -+if [ -n "$post_up" ]; then -+ eval $post_up -+ [ "$?" != "0" ] && exit 1 -+fi -+ - exit 0 --- -1.9.1 - diff --git a/base/initscripts/centos/patches/sysconfig-affirmative-check-for-link-carrier.patch b/base/initscripts/centos/patches/sysconfig-affirmative-check-for-link-carrier.patch deleted file mode 100644 index aff1428da..000000000 --- a/base/initscripts/centos/patches/sysconfig-affirmative-check-for-link-carrier.patch +++ /dev/null @@ -1,42 +0,0 @@ -From cd3e0b0fea9588c987db119cb6d7840ace399368 Mon Sep 17 00:00:00 2001 -From: Allain Legacy -Date: Thu, 17 Nov 2016 08:27:42 -0500 -Subject: [PATCH] sysconfig: affirmative check for link carrier - -The /sys/class/net//carrier attribute is supposed to return 0 or 1 to -indicate whether a link carrier is present or not. This holds true for regular -ethernet devices but for special devices, such as VLAN interfaces, it appears -to be possible that it returns an error on stderr and nothing on stdout in some -scenarios. One such scenario is if the lower interface of a VLAN is -administratively down then checking the carrier status of the VLAN returns -"invalid argument". - -Because of the way the check_link_down() function is currently coded a failure -to produce any output on stdout is interpreted as a sign that the link carrier -is present. That is, the empty string "" is not equal to "0" therefore the -check passes. - -To avoid this scenario we are changing this to a more affirmative check so that -it won't actually pass until stdout returns "1". - -Signed-off-by: Allain Legacy ---- - sysconfig/network-scripts/network-functions | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions -index d08f618..13cf4de 100644 ---- a/sysconfig/network-scripts/network-functions -+++ b/sysconfig/network-scripts/network-functions -@@ -473,7 +473,7 @@ check_link_down () - delay=20 - [ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2)) - while [ $timeout -le $delay ]; do -- [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" != "0" ] && return 1 -+ [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" == "1" ] && return 1 - sleep 0.5 - timeout=$((timeout+1)) - done --- -2.7.4 - diff --git a/base/initscripts/centos/patches/sysconfig-unsafe-usage-of-linkdelay-variable.patch b/base/initscripts/centos/patches/sysconfig-unsafe-usage-of-linkdelay-variable.patch deleted file mode 100644 index b7c7aebf2..000000000 --- a/base/initscripts/centos/patches/sysconfig-unsafe-usage-of-linkdelay-variable.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9b12287d8dade60c012969db3ae56b36d1e50966 Mon Sep 17 00:00:00 2001 -From: Allain Legacy -Date: Thu, 17 Nov 2016 11:37:38 -0500 -Subject: [PATCH] sysconfig: unsafe usage of linkdelay variable - -If the LINKDELAY variable is an alphabetic string instead of an integer then -the calculation in check_link_down() causes delay to be set to 0. That causes -the loop to never execute and for the caller to think that the link is always -down. - -This does not address but is related to CGTS-5821 - -Signed-off-by: Allain Legacy ---- - sysconfig/network-scripts/network-functions | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions -index 13cf4de..4bcc48f 100644 ---- a/sysconfig/network-scripts/network-functions -+++ b/sysconfig/network-scripts/network-functions -@@ -471,7 +471,7 @@ check_link_down () - fi - timeout=0 - delay=20 -- [ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2)) -+ [[ $LINKDELAY =~ ^[0-9]+$ ]] && delay=$(($LINKDELAY * 2)) - while [ $timeout -le $delay ]; do - [ "$(cat /sys/class/net/$REALDEVICE/carrier 2>/dev/null)" == "1" ] && return 1 - sleep 0.5 --- -2.7.4 - diff --git a/base/initscripts/centos/srpm_path b/base/initscripts/centos/srpm_path deleted file mode 100644 index f3a752297..000000000 --- a/base/initscripts/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/initscripts-9.49.46-1.el7.src.rpm diff --git a/base/libevent/centos/build_srpm.data b/base/libevent/centos/build_srpm.data deleted file mode 100644 index c3c7e2378..000000000 --- a/base/libevent/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/libevent/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/libevent/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 69fd4fcea..000000000 --- a/base/libevent/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d63b56b8511b808a4c23c4c15ed81e368f9b020c Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 27 Sep 2016 10:59:20 -0400 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/libevent.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/libevent.spec b/SPECS/libevent.spec -index 9c6cc3e..7d98b8f 100644 ---- a/SPECS/libevent.spec -+++ b/SPECS/libevent.spec -@@ -1,6 +1,6 @@ - Name: libevent - Version: 2.0.21 --Release: 4%{?dist} -+Release: 4.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Abstract asynchronous event notification library - - Group: System Environment/Libraries --- -1.8.3.1 - diff --git a/base/libevent/centos/meta_patches/PATCH_ORDER b/base/libevent/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 7ebccf68e..000000000 --- a/base/libevent/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -spec-include-TiS-patches.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/base/libevent/centos/meta_patches/spec-include-TiS-patches.patch b/base/libevent/centos/meta_patches/spec-include-TiS-patches.patch deleted file mode 100644 index 38cb9be49..000000000 --- a/base/libevent/centos/meta_patches/spec-include-TiS-patches.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/SPECS/libevent.spec b/SPECS/libevent.spec -index fd59ca3..9c6cc3e 100644 ---- a/SPECS/libevent.spec -+++ b/SPECS/libevent.spec -@@ -13,6 +13,7 @@ BuildRequires: doxygen openssl-devel - Patch00: libevent-2.0.10-stable-configure.patch - # Disable network tests - Patch01: libevent-nonettests.patch -+Patch02: libevent-ipv6-client-socket.patch - - %description - The libevent API provides a mechanism to execute a callback function -@@ -49,6 +50,7 @@ need to install %{name}-doc. - # 477685 - libevent-devel multilib conflict - %patch00 -p1 - %patch01 -p1 -b .nonettests -+%patch02 -p1 - - %build - %configure \ diff --git a/base/libevent/centos/srpm_path b/base/libevent/centos/srpm_path deleted file mode 100644 index 9c7a677cf..000000000 --- a/base/libevent/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/libevent-2.0.21-4.el7.src.rpm diff --git a/base/libfdt/centos/build_srpm.data b/base/libfdt/centos/build_srpm.data deleted file mode 100644 index 1a9fb5ae5..000000000 --- a/base/libfdt/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/dtc-1.4.4.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/libfdt/centos/libfdt.spec b/base/libfdt/centos/libfdt.spec deleted file mode 100644 index a50449027..000000000 --- a/base/libfdt/centos/libfdt.spec +++ /dev/null @@ -1,51 +0,0 @@ -Summary: libfdt -Name: libfdt -Version: 1.4.4 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: GPLv2 -Group: base -Packager: Wind River -URL: unknown -Source0: dtc-1.4.4.tar.gz - -BuildRequires: gcc -BuildRequires: bison -BuildRequires: flex - -%define debug_package %{nil} - -%description -Device Tree Compiler - -%package -n libfdt-devel -Summary: libfdt devel - -%description -n libfdt-devel -libfdt devel - -%define prefix /usr/ - -%prep -%setup -n dtc-1.4.4 - -%build -make - -%install -make install PREFIX=%{buildroot}%{prefix} - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%license GPL README.license -%defattr(-,root,root,-) - -# TODO: Devel shouldn't contain bin -%files -n libfdt-devel -%license GPL README.license -%defattr(-,root,root,-) -%{prefix}/bin/* -%dir %{prefix}/include -%{prefix}/include/* -%{prefix}/lib/* diff --git a/base/lighttpd/centos/build_srpm.data b/base/lighttpd/centos/build_srpm.data deleted file mode 100755 index 69abd61b8..000000000 --- a/base/lighttpd/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/lighttpd/centos/meta_patches/PATCH_ORDER b/base/lighttpd/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 50776dfef..000000000 --- a/base/lighttpd/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,4 +0,0 @@ -spec-include-TiS-changes.patch -Update-package-versioning-for-TIS-format.patch -spec-check-content-length.patch -meta_add_support_for_tpm.patch diff --git a/base/lighttpd/centos/meta_patches/Update-package-versioning-for-TIS-format.patch b/base/lighttpd/centos/meta_patches/Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 7990fbf64..000000000 --- a/base/lighttpd/centos/meta_patches/Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1c4a8d83d96eab943d1cb7b4f0d9b7175e6858f1 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 10:21:28 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/lighttpd.spec ---- - SPECS/lighttpd.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec -index 2f7b261..2553b27 100644 ---- a/SPECS/lighttpd.spec -+++ b/SPECS/lighttpd.spec -@@ -46,7 +46,7 @@ - Summary: Lightning fast webserver with light system requirements - Name: lighttpd - Version: 1.4.54 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - License: BSD - Group: System Environment/Daemons - URL: http://www.lighttpd.net/ --- -2.7.4 - diff --git a/base/lighttpd/centos/meta_patches/meta_add_support_for_tpm.patch b/base/lighttpd/centos/meta_patches/meta_add_support_for_tpm.patch deleted file mode 100644 index 70fa6ff04..000000000 --- a/base/lighttpd/centos/meta_patches/meta_add_support_for_tpm.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2cfc139ffabdb52c82834be2f88333f99c181677 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Tue, 28 Mar 2017 17:33:34 -0400 -Subject: [PATCH] Adding support for TPM 2.0 - ---- - SPECS/lighttpd.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec -index c27f78f..bc11989 100644 ---- a/SPECS/lighttpd.spec -+++ b/SPECS/lighttpd.spec -@@ -76,6 +76,7 @@ Patch3: lighttpd-1.4.39-socket.patch - - # WRS Patches - Patch100: check-content-length.patch -+Patch101: lighttpd-tpm-support.patch - - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - # For the target poweredby.png image (skip requirement + provide image on EL5) -@@ -191,6 +192,7 @@ Authentication module for lighttpd that uses PAM. - - # WRS Patches - %patch100 -p1 -b .content_length -+%patch101 -p1 -b .tpm_support - - #install -p -m 0644 %{SOURCE100} src/mod_geoip.c - #install -p -m 0644 %{SOURCE101} mod_geoip.txt --- -2.7.4 - diff --git a/base/lighttpd/centos/meta_patches/spec-check-content-length.patch b/base/lighttpd/centos/meta_patches/spec-check-content-length.patch deleted file mode 100644 index 8a22b6152..000000000 --- a/base/lighttpd/centos/meta_patches/spec-check-content-length.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 730a5321581e70790da4e94085698fd299072be5 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 10:21:28 -0400 -Subject: [PATCH] WRS: spec-check-content-length.patch - -Conflicts: - SPECS/lighttpd.spec ---- - SPECS/lighttpd.spec | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec -index 2553b27..c27f78f 100644 ---- a/SPECS/lighttpd.spec -+++ b/SPECS/lighttpd.spec -@@ -73,6 +73,10 @@ Patch3: lighttpd-1.4.39-socket.patch - #Patch7: lighttpd-1.4.42-bignum.patch - #Patch8: lighttpd-1.4.43-mysql.patch - #Patch9: lighttpd-1.4.48-autoconf.patch -+ -+# WRS Patches -+Patch100: check-content-length.patch -+ - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - # For the target poweredby.png image (skip requirement + provide image on EL5) - %if %{with systemlogos} -@@ -184,6 +188,10 @@ Authentication module for lighttpd that uses PAM. - #%patch7 -p0 -b .bignum - #%patch8 -p0 -b .mysql - #%patch9 -p0 -b .autoconf -+ -+# WRS Patches -+%patch100 -p1 -b .content_length -+ - #install -p -m 0644 %{SOURCE100} src/mod_geoip.c - #install -p -m 0644 %{SOURCE101} mod_geoip.txt - --- -2.7.4 - diff --git a/base/lighttpd/centos/meta_patches/spec-include-TiS-changes.patch b/base/lighttpd/centos/meta_patches/spec-include-TiS-changes.patch deleted file mode 100644 index d4e66ca1e..000000000 --- a/base/lighttpd/centos/meta_patches/spec-include-TiS-changes.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 8f91c53ae95b97e12d4a7b16fac8f3d5195ccd52 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 10:21:28 -0400 -Subject: [PATCH 1/4] WRS: spec-include-TiS-changes.patch - ---- - SPECS/lighttpd.spec | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec -index de52e46..7acdc84 100644 ---- a/SPECS/lighttpd.spec -+++ b/SPECS/lighttpd.spec -@@ -62,6 +62,7 @@ Source13: http://www.lighttpd.net/light_logo.png - Source14: lighttpd-empty.png - #Source100: lighttpd-mod_geoip.c - #Source101: lighttpd-mod_geoip.txt -+ - Patch0: lighttpd-1.4.39-defaultconf.patch - #Patch1: lighttpd-1.4.40-mod_geoip.patch - Patch2: lighttpd-1.4.54-system-crypto-policy.patch -@@ -194,17 +195,19 @@ autoreconf -if - --libdir='%{_libdir}/lighttpd' \ - %{confswitch mysql} \ - %{confswitch pam} \ -- %{confswitch ldap} \ -+ --without-ldap \ - %{confswitch attr} \ -- %{confswitch openssl} \ -+ --with-openssl \ - %{confswitch kerberos5} \ -- %{confswitch pcre} \ -+ --with-pcre \ - %{confswitch fam} \ -- %{?with_webdavprops:--with-webdav-props} \ -- %{?with_webdavlocks:--with-webdav-locks} \ -+ --without-webdav-props \ -+ --without-webdav-locks \ - %{confswitch gdbm} \ -- %{confswitch memcache} \ -- %{confswitch lua} \ -+ --without-memcache \ -+ --without-lua \ -+ --without-bzip2 \ -+ --disable-static \ - %{confswitch geoip} \ - %{confswitch krb5} - make %{?_smp_mflags} -@@ -223,13 +226,14 @@ install -D -p -m 0644 %{SOURCE2} \ - %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini - - # Install our own init script (included one is old style) or systemd service --%if %{with systemd} -+#%if %{with systemd} - install -D -p -m 0644 %{SOURCE4} \ - %{buildroot}%{_unitdir}/lighttpd.service --%else -+#%else -+mkdir -p /etc/rc.d/init.d - install -D -p -m 0755 %{SOURCE3} \ - %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd --%endif -+#%endif - - # Install our own default web page and images - mkdir -p %{buildroot}%{webroot} -@@ -267,11 +271,9 @@ echo 'D /var/run/lighttpd 0750 lighttpd lighttpd -' > \ - %{buildroot}%{_sysconfdir}/tmpfiles.d/lighttpd.conf - %endif - -- - %clean - rm -rf %{buildroot} - -- - %pre - /usr/sbin/useradd -s /sbin/nologin -M -r -d %{webroot} \ - -c 'lighttpd web server' lighttpd &>/dev/null || : -@@ -315,11 +317,8 @@ fi - %config %{_sysconfdir}/lighttpd/conf.d/mod.template - %config %{_sysconfdir}/lighttpd/vhosts.d/vhosts.template - %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd --%if %{with systemd} - %{_unitdir}/lighttpd.service --%else - %{_sysconfdir}/rc.d/init.d/lighttpd --%endif - %if %{with tmpfiles} - %config(noreplace) %{_sysconfdir}/tmpfiles.d/lighttpd.conf - %endif --- -2.7.4 - diff --git a/base/lighttpd/centos/patches/check-content-length.patch b/base/lighttpd/centos/patches/check-content-length.patch deleted file mode 100644 index af0fe4c09..000000000 --- a/base/lighttpd/centos/patches/check-content-length.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 65107586a55c594c44b0a97a2d6756f6a0f0a5ca Mon Sep 17 00:00:00 2001 -From: Giao Le -Date: Mon, 27 Aug 2018 19:41:36 +0800 -Subject: [PATCH] check-length - -Signed-off-by: zhipengl ---- - src/request.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 45 insertions(+) - -diff --git a/src/request.c b/src/request.c -index d25e1e7..fe541a5 100644 ---- a/src/request.c -+++ b/src/request.c -@@ -8,9 +8,38 @@ - #include "log.h" - #include "sock_addr.h" - -+#include - #include - #include - #include -+#include -+ -+static size_t get_tempdirs_free_space(server *srv) -+{ -+ int i; -+ int valid = 0; -+ size_t total = 0; -+ array *dirs = srv->srvconf.upload_tempdirs; -+ -+ for (i = 0; i < (int)dirs->used; ++i) { -+ struct statvfs stat; -+ const char *name = ((data_string *)dirs->data[i])->value->ptr; -+ int ret = statvfs(name, &stat); -+ -+ if (ret >= 0) { -+ size_t df = (size_t)(stat.f_bsize * stat.f_bfree); -+ total += df; -+ valid = 1; -+ } -+ else { -+ log_error_write(srv, __FILE__, __LINE__, "ssss", -+ "dir:", name, -+ "error:", strerror(errno)); -+ } -+ } -+ -+ return (valid) ? total : SSIZE_MAX; -+} - - static int request_check_hostname(buffer *host) { - enum { DOMAINLABEL, TOPLABEL } stage = TOPLABEL; -@@ -901,6 +930,22 @@ int http_request_parse(server *srv, connection *con, buffer *hdrs) { - if (!state.con_length_set) { - return http_request_header_line_invalid(srv, 411, "POST-request, but content-length missing -> 411"); - } -+ /* content-length is larger than 64k */ -+ if (con->request.content_length > 64*1024) { -+ size_t disk_free = get_tempdirs_free_space(srv); -+ if (con->request.content_length > disk_free) { -+ con->http_status = 413; -+ con->keep_alive = 0; -+ -+ log_error_write(srv, __FILE__, __LINE__, "ssosos", -+ "not enough free space in tempdirs:", -+ "length =", (off_t) con->request.content_length, -+ "free =", (off_t) disk_free, -+ "-> 413"); -+ return 0; -+ } -+ } -+ - break; - default: - break; --- -2.21.0 - diff --git a/base/lighttpd/centos/patches/lighttpd-tpm-support.patch b/base/lighttpd/centos/patches/lighttpd-tpm-support.patch deleted file mode 100644 index c63d963b4..000000000 --- a/base/lighttpd/centos/patches/lighttpd-tpm-support.patch +++ /dev/null @@ -1,288 +0,0 @@ -From c58d174a1d2872272bfa9d83c642591f04effcb1 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Wed, 29 Mar 2017 21:56:41 -0400 -Subject: [PATCH] lighttpd tpm support - ---- - src/base.h | 24 ++++++++++ - src/configfile.c | 4 ++ - src/mod_openssl.c | 116 +++++++++++++++++++++++++++++++++++++--------- - src/server.c | 17 ++++++- - 4 files changed, 139 insertions(+), 22 deletions(-) - -diff --git a/src/base.h b/src/base.h -index f21973b..f7b5777 100644 ---- a/src/base.h -+++ b/src/base.h -@@ -15,6 +15,21 @@ - #include "sock_addr.h" - #include "etag.h" - -+#if defined HAVE_LIBSSL && defined HAVE_OPENSSL_SSL_H -+# define USE_OPENSSL -+# include -+# ifndef USE_OPENSSL_KERBEROS -+# ifndef OPENSSL_NO_KRB5 -+# define OPENSSL_NO_KRB5 -+# endif -+# endif -+# include -+# include -+# if ! defined OPENSSL_NO_TLSEXT && ! defined SSL_CTRL_SET_TLSEXT_HOSTNAME -+# define OPENSSL_NO_TLSEXT -+# endif -+#endif -+ - struct fdevents; /* declaration */ - struct stat_cache; /* declaration */ - -@@ -342,6 +357,14 @@ typedef struct { - unsigned short high_precision_timestamps; - time_t loadts; - double loadavg[3]; -+#ifdef USE_OPENSSL -+ // TPM engine and object configuration -+ buffer *tpm_object; -+ buffer *tpm_engine; -+ ENGINE *tpm_engine_ref; -+ EVP_PKEY *tpm_key; -+#endif -+ - buffer *syslog_facility; - - unsigned short compat_module_load; -@@ -380,6 +403,7 @@ struct server { - int con_written; - int con_closed; - -+ int tpm_is_init; // has TPM been initialized already - int max_fds; /* max possible fds */ - int max_fds_lowat;/* low watermark */ - int max_fds_hiwat;/* high watermark */ -diff --git a/src/configfile.c b/src/configfile.c -index b870b59..5b91b35 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -282,6 +282,8 @@ static int config_insert(server *srv) { - { "server.socket-perms", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 81 */ - { "server.http-parseopts", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_SERVER }, /* 82 */ - { "server.systemd-socket-activation", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 83 */ -+ { "server.tpm-object", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 84 */ -+ { "server.tpm-engine", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 85 */ - - { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET } - }; -@@ -327,6 +329,8 @@ static int config_insert(server *srv) { - http_parseopts = array_init(); - cv[82].destination = http_parseopts; - cv[83].destination = &(srv->srvconf.systemd_socket_activation); -+ cv[84].destination = srv->srvconf.tpm_object; -+ cv[85].destination = srv->srvconf.tpm_engine; - - srv->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); - -diff --git a/src/mod_openssl.c b/src/mod_openssl.c -index f9a4fe8..e38605c 100644 ---- a/src/mod_openssl.c -+++ b/src/mod_openssl.c -@@ -488,6 +488,29 @@ error: - return NULL; - } - -+static EVP_PKEY* -+evp_pkey_load_tpm_object_file(server *srv) { -+ if (!srv->tpm_is_init || !srv->srvconf.tpm_engine_ref) -+ return NULL; -+ -+ if (srv->srvconf.tpm_key) { -+ // if a TPM key was previously loaded -+ // then return that as there is no need to -+ // reload this key into TPM -+ return srv->srvconf.tpm_key; -+ } -+ -+ EVP_PKEY *pkey = ENGINE_load_private_key(srv->srvconf.tpm_engine_ref, -+ srv->srvconf.tpm_object->ptr, -+ NULL, NULL); -+ if (!pkey) { -+ log_error_write(srv, __FILE__, __LINE__, "SSS", "SSL:", -+ ERR_error_string(ERR_get_error(), NULL)); -+ return NULL; -+ } -+ srv->srvconf.tpm_key = pkey; -+ return pkey; -+} - - static EVP_PKEY * - evp_pkey_load_pem_file (server *srv, const char *file) -@@ -542,17 +565,24 @@ network_openssl_load_pemfile (server *srv, plugin_config *s, size_t ndx) - - s->ssl_pemfile_x509 = x509_load_pem_file(srv, s->ssl_pemfile->ptr); - if (NULL == s->ssl_pemfile_x509) return -1; -- s->ssl_pemfile_pkey = !buffer_string_is_empty(s->ssl_privkey) -- ? evp_pkey_load_pem_file(srv, s->ssl_privkey->ptr) -- : evp_pkey_load_pem_file(srv, s->ssl_pemfile->ptr); -- if (NULL == s->ssl_pemfile_pkey) return -1; -- -- if (!X509_check_private_key(s->ssl_pemfile_x509, s->ssl_pemfile_pkey)) { -- log_error_write(srv, __FILE__, __LINE__, "sssbb", "SSL:", -- "Private key does not match the certificate public key," -- " reason:", ERR_error_string(ERR_get_error(), NULL), -- s->ssl_pemfile, s->ssl_privkey); -- return -1; -+ // If TPM mode is enabled thenload the TPM key, otherwise load -+ // the regular SSL private key. -+ if (srv->tpm_is_init) { -+ s->ssl_pemfile_pkey = evp_pkey_load_tpm_object_file(srv); -+ if (NULL == s->ssl_pemfile_pkey) return -1; -+ } else { -+ s->ssl_pemfile_pkey = !buffer_string_is_empty(s->ssl_privkey) -+ ? evp_pkey_load_pem_file(srv, s->ssl_privkey->ptr) -+ : evp_pkey_load_pem_file(srv, s->ssl_pemfile->ptr); -+ if (NULL == s->ssl_pemfile_pkey) return -1; -+ -+ if (!X509_check_private_key(s->ssl_pemfile_x509, s->ssl_pemfile_pkey)) { -+ log_error_write(srv, __FILE__, __LINE__, "sssbb", "SSL:", -+ "Private key does not match the certificate public key," -+ " reason:", ERR_error_string(ERR_get_error(), NULL), -+ s->ssl_pemfile, s->ssl_privkey); -+ return -1; -+ } - } - - return 0; -@@ -878,6 +908,43 @@ network_init_ssl (server *srv, void *p_d) - force_assert(NULL != local_send_buffer); - } - -+ /* NOTE (knasim-wrs): US93721: TPM support -+ * if TPM mode is configured, and we have not previously -+ * initialized the engine then do so now -+ */ -+ if (!buffer_string_is_empty(srv->srvconf.tpm_object) && -+ (!srv->tpm_is_init)) { -+ if (!buffer_string_is_empty(srv->srvconf.tpm_engine)) { -+ // load the dynamic TPM engine -+ ENGINE_load_dynamic(); -+ ENGINE *engine = ENGINE_by_id("dynamic"); -+ if (!engine) { -+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", -+ "Unable to load the dynamic engine " -+ "(needed for loading custom TPM engine)"); -+ return -1; -+ } -+ -+ ENGINE_ctrl_cmd_string(engine, "SO_PATH", -+ srv->srvconf.tpm_engine->ptr, 0); -+ ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0); -+ if (ENGINE_init(engine) != 1) { -+ log_error_write(srv, __FILE__, __LINE__, "ssb", "SSL:", -+ ERR_error_string(ERR_get_error(), NULL)); -+ ENGINE_finish(engine); -+ return -1; -+ } -+ srv->tpm_is_init = 1; -+ // stow away for ENGINE cleanup -+ srv->srvconf.tpm_engine_ref = engine; -+ } -+ else { // no TPM engine found -+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", -+ "TPM engine option not set when TPM mode expected"); -+ return -1; -+ } -+ } -+ - if (!buffer_string_is_empty(s->ssl_pemfile)) { - #ifdef OPENSSL_NO_TLSEXT - data_config *dc = (data_config *)srv->config_context->data[i]; -@@ -1147,28 +1214,35 @@ network_init_ssl (server *srv, void *p_d) - } - } - -- if (1 != SSL_CTX_use_certificate_chain_file(s->ssl_ctx, -- s->ssl_pemfile->ptr)) { -+ if (1 != SSL_CTX_use_PrivateKey(s->ssl_ctx, s->ssl_pemfile_pkey)) { - log_error_write(srv, __FILE__, __LINE__, "ssb", "SSL:", - ERR_error_string(ERR_get_error(), NULL), - s->ssl_pemfile); - return -1; - } - -- if (1 != SSL_CTX_use_PrivateKey(s->ssl_ctx, s->ssl_pemfile_pkey)) { -+ if (1 != SSL_CTX_use_certificate(s->ssl_ctx, s->ssl_pemfile_x509)) { - log_error_write(srv, __FILE__, __LINE__, "ssbb", "SSL:", - ERR_error_string(ERR_get_error(), NULL), - s->ssl_pemfile, s->ssl_privkey); - return -1; - } - -- if (SSL_CTX_check_private_key(s->ssl_ctx) != 1) { -- log_error_write(srv, __FILE__, __LINE__, "sssbb", "SSL:", -- "Private key does not match the certificate public " -- "key, reason:", -- ERR_error_string(ERR_get_error(), NULL), -- s->ssl_pemfile, s->ssl_privkey); -- return -1; -+ /* -+ * Only check private key against loaded -+ * certificate, in non TPM mode, since -+ * if this is a TPM key then it is wrapped -+ * and will not match the public key. -+ */ -+ if (!srv->tpm_is_init) { -+ if (SSL_CTX_check_private_key(s->ssl_ctx) != 1) { -+ log_error_write(srv, __FILE__, __LINE__, "sssbb", "SSL:", -+ "Private key does not match the certificate public " -+ "key, reason:", -+ ERR_error_string(ERR_get_error(), NULL), -+ s->ssl_pemfile, s->ssl_privkey); -+ return -1; -+ } - } - SSL_CTX_set_default_read_ahead(s->ssl_ctx, s->ssl_read_ahead); - SSL_CTX_set_mode(s->ssl_ctx, SSL_CTX_get_mode(s->ssl_ctx) -diff --git a/src/server.c b/src/server.c -index b7086b0..b90ce61 100644 ---- a/src/server.c -+++ b/src/server.c -@@ -248,6 +248,11 @@ static server *server_init(void) { - CLEAN(srvconf.pid_file); - CLEAN(srvconf.syslog_facility); - -+#ifdef USE_OPENSSL -+ CLEAN(srvconf.tpm_object); -+ CLEAN(srvconf.tpm_engine); -+#endif -+ - CLEAN(tmp_chunk_len); - #undef CLEAN - -@@ -344,6 +349,14 @@ static void server_free(server *srv) { - CLEAN(srvconf.xattr_name); - CLEAN(srvconf.syslog_facility); - -+#ifdef USE_OPENSSL -+ CLEAN(srvconf.tpm_object); -+ CLEAN(srvconf.tpm_engine); -+ // don't free the tpm_key as that will be freed -+ // below as ssl_pemfile_pkey -+ ENGINE_finish(srv->srvconf.tpm_engine_ref); -+#endif -+ - CLEAN(tmp_chunk_len); - #undef CLEAN - -@@ -784,7 +797,9 @@ static int log_error_open(server *srv) { - if (-1 == (errfd = fdevent_open_devnull())) { - log_error_write(srv, __FILE__, __LINE__, "ss", - "opening /dev/null failed:", strerror(errno)); -- return -1; -+ /* In version 1.4.45 it will also failed here but not check return value of openDevNull(STDERR_FILENO) -+ need further check with upstream to see if there is a potential bug */ -+ //return -1; - } - } - else { --- -2.21.0 - diff --git a/base/lighttpd/centos/srpm_path b/base/lighttpd/centos/srpm_path deleted file mode 100644 index da50f043d..000000000 --- a/base/lighttpd/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/lighttpd-1.4.54-1.el7.src.rpm diff --git a/base/linuxptp/centos/build_srpm.data b/base/linuxptp/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/linuxptp/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/linuxptp/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch b/base/linuxptp/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch deleted file mode 100644 index 890b38ab3..000000000 --- a/base/linuxptp/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From da79b26cb5749800112c38cb55b1135f78c3433a Mon Sep 17 00:00:00 2001 -Message-Id: -From: Cole Walker -Date: Mon, 21 Jun 2021 15:24:03 -0400 -Subject: [PATCH 1/3] Update package versioning for STX format - -Signed-off-by: Jim Somerville ---- - SPECS/linuxptp.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/linuxptp.spec b/SPECS/linuxptp.spec -index 5ec953e..903eb79 100644 ---- a/SPECS/linuxptp.spec -+++ b/SPECS/linuxptp.spec -@@ -4,7 +4,7 @@ - - Name: linuxptp - Version: 3.1.1 --Release: 1%{?dist} -+Release: 1%{?_tis_dist}.%{tis_patch_ver} - Summary: PTP implementation for Linux - - Group: System Environment/Base --- -2.29.2 - diff --git a/base/linuxptp/centos/meta_patches/0002-STX-patches-for-default_sync-and-BC-performance.patch b/base/linuxptp/centos/meta_patches/0002-STX-patches-for-default_sync-and-BC-performance.patch deleted file mode 100644 index ea358372a..000000000 --- a/base/linuxptp/centos/meta_patches/0002-STX-patches-for-default_sync-and-BC-performance.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 51312938b7608b0d5bfff283360f0b9dc52c6ba8 Mon Sep 17 00:00:00 2001 -Message-Id: <51312938b7608b0d5bfff283360f0b9dc52c6ba8.1630421052.git.Jim.Somerville@windriver.com> -In-Reply-To: -References: -From: Cole Walker -Date: Wed, 23 Jun 2021 13:21:58 -0400 -Subject: [PATCH 2/3] STX patches for default_sync and BC performance - -Signed-off-by: Jim Somerville ---- - SPECS/linuxptp.spec | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/SPECS/linuxptp.spec b/SPECS/linuxptp.spec -index 903eb79..e4c01a8 100644 ---- a/SPECS/linuxptp.spec -+++ b/SPECS/linuxptp.spec -@@ -37,6 +37,18 @@ Patch7: linuxptp-manfix.patch - Patch8: linuxptp-fclose.patch - # fix handling of zero-length messages - Patch9: linuxptp-zerolength.patch -+# StarlingX -+Patch10: 0001-clock-Reset-state-when-switching-port-with-same-best.patch -+# StarlingX -+Patch11: 0002-clock-Reset-clock-check-on-best-clock-port-change.patch -+# StarlingX -+Patch12: 0003-port-Don-t-check-timestamps-from-non-slave-ports.patch -+# StarlingX -+Patch13: 0004-port-Don-t-renew-raw-transport.patch -+# StarlingX -+Patch14: 0005-clockcheck-Increase-minimum-interval.patch -+# StarlingX -+Patch15: 0006-Add-option-to-disable-default-port-selection-in-phc2.patch - - BuildRequires: kernel-headers > 4.18.0-87 - BuildRequires: systemd -@@ -60,6 +72,12 @@ Supporting legacy APIs and other platforms is not a goal. - %patch7 -p1 -b .manfix - %patch8 -p1 -b .fclose - %patch9 -p1 -b .zerolength -+%patch10 -p1 -+%patch11 -p1 -+%patch12 -p1 -+%patch13 -p1 -+%patch14 -p1 -+%patch15 -p1 - mv linuxptp-testsuite-%{testsuite_ver}* testsuite - mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim - --- -2.29.2 - diff --git a/base/linuxptp/centos/meta_patches/0003-STX-patches-to-fix-phc2sys-exit-with-255.patch b/base/linuxptp/centos/meta_patches/0003-STX-patches-to-fix-phc2sys-exit-with-255.patch deleted file mode 100644 index bf4649385..000000000 --- a/base/linuxptp/centos/meta_patches/0003-STX-patches-to-fix-phc2sys-exit-with-255.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0d7ba07f1c39d47b701caf2da0699f4f217d5746 Mon Sep 17 00:00:00 2001 -From: Douglas Henrique Koerich -Date: Mon, 1 Aug 2022 13:48:40 -0400 -Subject: [PATCH 3/3] STX patches to fix phc2sys exit with 255 - -Signed-off-by: Douglas Henrique Koerich ---- - SPECS/linuxptp.spec | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/SPECS/linuxptp.spec b/SPECS/linuxptp.spec -index e4c01a8..1218533 100644 ---- a/SPECS/linuxptp.spec -+++ b/SPECS/linuxptp.spec -@@ -49,6 +49,11 @@ Patch13: 0004-port-Don-t-renew-raw-transport.patch - Patch14: 0005-clockcheck-Increase-minimum-interval.patch - # StarlingX - Patch15: 0006-Add-option-to-disable-default-port-selection-in-phc2.patch -+# StarlingX: Upstream commits to fix phc2sys exit with 255 -+Patch16: 0007-sysoff-Change-sysoff_measure-to-return-errno.patch -+Patch17: 0008-sysoff-Change-log-level-of-ioctl-error-messages.patch -+Patch18: 0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch -+Patch19: 0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch - - BuildRequires: kernel-headers > 4.18.0-87 - BuildRequires: systemd -@@ -78,6 +83,10 @@ Supporting legacy APIs and other platforms is not a goal. - %patch13 -p1 - %patch14 -p1 - %patch15 -p1 -+%patch16 -p1 -+%patch17 -p1 -+%patch18 -p1 -+%patch19 -p1 - mv linuxptp-testsuite-%{testsuite_ver}* testsuite - mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim - --- -2.29.2 - diff --git a/base/linuxptp/centos/meta_patches/PATCH_ORDER b/base/linuxptp/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 33939e789..000000000 --- a/base/linuxptp/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-for-STX-format.patch -0002-STX-patches-for-default_sync-and-BC-performance.patch -0003-STX-patches-to-fix-phc2sys-exit-with-255.patch diff --git a/base/linuxptp/centos/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch b/base/linuxptp/centos/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch deleted file mode 100644 index eb65964b9..000000000 --- a/base/linuxptp/centos/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0389752e3aecf8d2b2743f16ce1408a58088bea9 Mon Sep 17 00:00:00 2001 -Message-Id: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -From: Miroslav Lichvar -Date: Mon, 31 May 2021 11:07:52 +0200 -Subject: [PATCH 1/10] clock: Reset state when switching port with same best - clock. - -When the best port is changed, but the ID of the best clock doesn't -change (e.g. a passive port is activated on link failure), reset the -current delay and other master/link-specific state to avoid the switch -throwing the clock off. - -Reviewed-by: Jacob Keller -Signed-off-by: Miroslav Lichvar -[commit 7e8eba5332671abfd95d06dd191059eded1d2cca upstream] -Signed-off-by: Jim Somerville ---- - clock.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clock.c b/clock.c -index c1b0287..d955710 100644 ---- a/clock.c -+++ b/clock.c -@@ -1909,7 +1909,7 @@ static void handle_state_decision_event(struct clock *c) - best_id = c->dds.clockIdentity; - } - -- if (!cid_eq(&best_id, &c->best_id)) { -+ if (!cid_eq(&best_id, &c->best_id) || best != c->best) { - clock_freq_est_reset(c); - tsproc_reset(c->tsproc, 1); - if (!tmv_is_zero(c->initial_delay)) --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch b/base/linuxptp/centos/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch deleted file mode 100644 index 2a16b5a43..000000000 --- a/base/linuxptp/centos/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 1779482f39e6513995b13fdbd350f7aee8495b7e Mon Sep 17 00:00:00 2001 -Message-Id: <1779482f39e6513995b13fdbd350f7aee8495b7e.1630418391.git.Jim.Somerville@windriver.com> -In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -From: Miroslav Lichvar -Date: Mon, 31 May 2021 11:07:53 +0200 -Subject: [PATCH 2/10] clock: Reset clock check on best clock/port change. - -Reset the clock check when the best clock or port changes, together with -the other state like current estimated delay and frequency. This avoids -false positives if the clock is controlled by an external process when -not synchronized by PTP (e.g. phc2sys -rr). - -Reviewed-by: Jacob Keller -Signed-off-by: Miroslav Lichvar -[commit 262a49b07eaccc0f0237e3cd4df01b185b8f664f upstream] -Signed-off-by: Jim Somerville ---- - clock.c | 2 ++ - clockcheck.c | 9 ++++++++- - clockcheck.h | 6 ++++++ - 3 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/clock.c b/clock.c -index d955710..49bd4a9 100644 ---- a/clock.c -+++ b/clock.c -@@ -1911,6 +1911,8 @@ static void handle_state_decision_event(struct clock *c) - - if (!cid_eq(&best_id, &c->best_id) || best != c->best) { - clock_freq_est_reset(c); -+ if (c->sanity_check) -+ clockcheck_reset(c->sanity_check); - tsproc_reset(c->tsproc, 1); - if (!tmv_is_zero(c->initial_delay)) - tsproc_set_delay(c->tsproc, c->initial_delay); -diff --git a/clockcheck.c b/clockcheck.c -index d48a578..d0b4714 100644 ---- a/clockcheck.c -+++ b/clockcheck.c -@@ -47,9 +47,16 @@ struct clockcheck *clockcheck_create(int freq_limit) - if (!cc) - return NULL; - cc->freq_limit = freq_limit; -+ clockcheck_reset(cc); -+ return cc; -+} -+ -+void clockcheck_reset(struct clockcheck *cc) -+{ -+ cc->freq_known = 0; - cc->max_freq = -CHECK_MAX_FREQ; - cc->min_freq = CHECK_MAX_FREQ; -- return cc; -+ cc->last_ts = 0; - } - - int clockcheck_sample(struct clockcheck *cc, uint64_t ts) -diff --git a/clockcheck.h b/clockcheck.h -index 78aca48..1ff86eb 100644 ---- a/clockcheck.h -+++ b/clockcheck.h -@@ -33,6 +33,12 @@ struct clockcheck; - */ - struct clockcheck *clockcheck_create(int freq_limit); - -+/** -+ * Reset a clock check. -+ * @param cc Pointer to a clock check obtained via @ref clockcheck_create(). -+ */ -+void clockcheck_reset(struct clockcheck *cc); -+ - /** - * Perform the sanity check on a time stamp. - * @param cc Pointer to a clock check obtained via @ref clockcheck_create(). --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch b/base/linuxptp/centos/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch deleted file mode 100644 index 06ed3bbc0..000000000 --- a/base/linuxptp/centos/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a1ed560a712d611edf8b47756bc56542a57bff7d Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -From: Miroslav Lichvar -Date: Mon, 31 May 2021 11:07:54 +0200 -Subject: [PATCH 3/10] port: Don't check timestamps from non-slave ports. - -Don't perform the sanity check on receive timestamps from ports in -non-slave states to avoid false positives in the jbod mode, where -the timestamps can be generated by different clocks. - -Reviewed-by: Jacob Keller -Signed-off-by: Miroslav Lichvar -[commit e117e37e379556fa23337db2518bb44d8793e039 upstream] -Signed-off-by: Jim Somerville ---- - port.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/port.c b/port.c -index 9e9d484..387d5a2 100644 ---- a/port.c -+++ b/port.c -@@ -2731,7 +2731,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index) - } - if (msg_sots_valid(msg)) { - ts_add(&msg->hwts.ts, -p->rx_timestamp_offset); -- clock_check_ts(p->clock, tmv_to_nanoseconds(msg->hwts.ts)); -+ if (p->state == PS_SLAVE) { -+ clock_check_ts(p->clock, -+ tmv_to_nanoseconds(msg->hwts.ts)); -+ } - } - - switch (msg_type(msg)) { --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0004-port-Don-t-renew-raw-transport.patch b/base/linuxptp/centos/patches/0004-port-Don-t-renew-raw-transport.patch deleted file mode 100644 index bbbe3b209..000000000 --- a/base/linuxptp/centos/patches/0004-port-Don-t-renew-raw-transport.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 5caa4d0a9161e6a33e269c8e445b322e4437e6b3 Mon Sep 17 00:00:00 2001 -Message-Id: <5caa4d0a9161e6a33e269c8e445b322e4437e6b3.1630418391.git.Jim.Somerville@windriver.com> -In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -From: Miroslav Lichvar -Date: Mon, 31 May 2021 11:07:55 +0200 -Subject: [PATCH 4/10] port: Don't renew raw transport. - -Renewing of the transport on announce/sync timeout is needed in the -client-only mode to avoid getting stuck with a broken multicast socket -when the link goes down. - -This shouldn't be necessary with the raw transport. Closing and binding -of raw sockets can apparently be so slow that it triggers a false -positive in the clock check. - -Reported-by: Amar Subramanyam -Signed-off-by: Miroslav Lichvar -Reviewed-by: Jacob Keller -[commit 6df84259647757bc53818a039734f8ff85618c02 upstream] -Signed-off-by: Jim Somerville ---- - port.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/port.c b/port.c -index 387d5a2..d26b87f 100644 ---- a/port.c -+++ b/port.c -@@ -1805,6 +1805,12 @@ static int port_renew_transport(struct port *p) - if (!port_is_enabled(p)) { - return 0; - } -+ -+ /* Closing and binding of raw sockets is too slow and unnecessary */ -+ if (transport_type(p->trp) == TRANS_IEEE_802_3) { -+ return 0; -+ } -+ - transport_close(p->trp, &p->fda); - port_clear_fda(p, FD_FIRST_TIMER); - res = transport_open(p->trp, p->iface, &p->fda, p->timestamping); --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0005-clockcheck-Increase-minimum-interval.patch b/base/linuxptp/centos/patches/0005-clockcheck-Increase-minimum-interval.patch deleted file mode 100644 index 6ddb5c60f..000000000 --- a/base/linuxptp/centos/patches/0005-clockcheck-Increase-minimum-interval.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3bf4f1784fa0a03a252961f400a78d963773f8f5 Mon Sep 17 00:00:00 2001 -Message-Id: <3bf4f1784fa0a03a252961f400a78d963773f8f5.1630611367.git.Jim.Somerville@windriver.com> -In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerville@windriver.com> -References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerville@windriver.com> -From: Miroslav Lichvar -Date: Mon, 31 May 2021 11:07:56 +0200 -Subject: [PATCH 5/10] clockcheck: Increase minimum interval. - -Increase the minimum check interval to 1 second to measure the frequency -offset more accurately and with default configuration make false -positives less likely due to a heavily overloaded system. - -Signed-off-by: Miroslav Lichvar -Reviewed-by: Jacob Keller -[commit a082bcd700e4955ebaa00d7039bf4bce92048ac4 upstream] -Signed-off-by: Jim Somerville ---- - clockcheck.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clockcheck.c b/clockcheck.c -index d0b4714..f0141be 100644 ---- a/clockcheck.c -+++ b/clockcheck.c -@@ -23,7 +23,7 @@ - #include "clockcheck.h" - #include "print.h" - --#define CHECK_MIN_INTERVAL 100000000 -+#define CHECK_MIN_INTERVAL 1000000000 - #define CHECK_MAX_FREQ 900000000 - - struct clockcheck { --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch b/base/linuxptp/centos/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch deleted file mode 100644 index 5947d95ee..000000000 --- a/base/linuxptp/centos/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 3a6de7b6208ccc64a20474db15abaac08e99d10b Mon Sep 17 00:00:00 2001 -Message-Id: <3a6de7b6208ccc64a20474db15abaac08e99d10b.1630418391.git.Jim.Somerville@windriver.com> -In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> -From: Cole Walker -Date: Wed, 23 Jun 2021 11:14:41 -0400 -Subject: [PATCH 6/10] Add option to disable default port selection in phc2sys - -This change serves to address an issue in phc2sys -where the local ptp clocks are not synced together properly if the local -time is far behind the reference time. This issue occurs when phc2sys -starts and there is no client port currently synced to a grandmaster. In -the original behaviour, phc2sys selects the first configured port and -proceeds to sync all of the other clocks to it by performing the -first_step operation. - -Then ptp4l will evenually lock to the Grandmaster clock, and that -single port will have its time updated to the correct value, but -phc2sys has already performed the first_step operation and will not -step the other clocks again. - -This solution provides an option to disable the selection of a -default port by phc2sys. When no default port is selected, phc2sys waits -for ptp4l to sync to the Grandmaster before bringing the other clocks -into sync with the first_step operation. - -This option is configured via the default_sync -parameter or the -D flag. The default_sync parameter is set to on by -default in order to keep the behaviour the same as upstream linuxptp -but can be configured by users via -system service-parameter-add ptp global default_sync=0 - -Signed-off-by: Jim Somerville ---- - config.c | 1 + - phc2sys.c | 15 ++++++++++++--- - 2 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/config.c b/config.c -index ef5e833..cab7e4f 100644 ---- a/config.c -+++ b/config.c -@@ -333,6 +333,7 @@ struct config_item config_tab[] = { - GLOB_ITEM_INT("utc_offset", CURRENT_UTC_OFFSET, 0, INT_MAX), - GLOB_ITEM_INT("verbose", 0, 0, 1), - GLOB_ITEM_INT("write_phase_mode", 0, 0, 1), -+ GLOB_ITEM_INT("default_sync", 1, 0, 1), - }; - - static struct unicast_master_table *current_uc_mtab; -diff --git a/phc2sys.c b/phc2sys.c -index a36cbe0..44d6872 100644 ---- a/phc2sys.c -+++ b/phc2sys.c -@@ -120,6 +120,7 @@ struct phc2sys_private { - LIST_HEAD(clock_head, clock) clocks; - LIST_HEAD(dst_clock_head, clock) dst_clocks; - struct clock *master; -+ int default_sync; - }; - - static struct config *phc2sys_config; -@@ -437,7 +438,7 @@ static void reconfigure(struct phc2sys_private *priv) - } - last = c; - } -- if (dst_cnt > 1 && !src) { -+ if (dst_cnt > 1 && !src && priv->default_sync) { - if (!rt || rt->dest_only) { - priv->master = last; - /* Reset to original state in next reconfiguration. */ -@@ -1344,6 +1345,7 @@ static void usage(char *progname) - " -N [num] number of master clock readings per update (5)\n" - " -L [limit] sanity frequency limit in ppb (200000000)\n" - " -M [num] NTP SHM segment number (0)\n" -+ " -D [num] fall back to default clock in automatic mode (1)\n" - " -u [num] number of clock updates in summary stats (0)\n" - " -n [num] domain number (0)\n" - " -x apply leap seconds by servo instead of kernel\n" -@@ -1364,7 +1366,7 @@ int main(int argc, char *argv[]) - struct clock *src, *dst; - struct config *cfg; - struct option *opts; -- int autocfg = 0, c, domain_number = 0, index, ntpshm_segment; -+ int autocfg = 0, c, domain_number = 0, default_sync = 1, index, ntpshm_segment; - int pps_fd = -1, print_level = LOG_INFO, r = -1, rt = 0, wait_sync = 0; - double phc_rate, tmp; - struct phc2sys_private priv = { -@@ -1388,7 +1390,7 @@ int main(int argc, char *argv[]) - progname = strrchr(argv[0], '/'); - progname = progname ? 1+progname : argv[0]; - while (EOF != (c = getopt_long(argc, argv, -- "arc:d:f:s:E:P:I:S:F:R:N:O:L:M:i:u:wn:xz:l:t:mqvh", -+ "arc:d:f:s:E:P:I:S:F:R:N:O:L:M:D:i:u:wn:xz:l:t:mqvh", - opts, &index))) { - switch (c) { - case 0: -@@ -1540,6 +1542,12 @@ int main(int argc, char *argv[]) - version_show(stdout); - config_destroy(cfg); - return 0; -+ case 'D': -+ if (get_arg_val_i(c, optarg, &default_sync, 0, 1) || -+ config_set_int(cfg, "default_sync", default_sync)) { -+ goto end; -+ } -+ break; - case 'h': - usage(progname); - config_destroy(cfg); -@@ -1588,6 +1596,7 @@ int main(int argc, char *argv[]) - } - priv.kernel_leap = config_get_int(cfg, NULL, "kernel_leap"); - priv.sanity_freq_limit = config_get_int(cfg, NULL, "sanity_freq_limit"); -+ priv.default_sync = config_get_int(cfg, NULL, "default_sync"); - - if (autocfg) { - if (init_pmc(cfg, &priv)) --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch b/base/linuxptp/centos/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch deleted file mode 100644 index 4d4bee37c..000000000 --- a/base/linuxptp/centos/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 6428c2628c013c408ec09355ad37eb12fa6bb20f Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Wed, 18 May 2022 11:33:35 +0200 -Subject: [PATCH 7/10] sysoff: Change sysoff_measure() to return errno. - -Return -errno from failed ioctl instead of the SYSOFF_* enum from the -measurement functions to allow the callers to check for specific errors. - -Signed-off-by: Miroslav Lichvar -[commit 7824b13db9533ddebe37cf444d7aaa5d235575d3 upstream] -Signed-off-by: Douglas Henrique Koerich ---- - sysoff.c | 15 ++++++++------- - sysoff.h | 2 +- - 2 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/sysoff.c b/sysoff.c -index 2743859..5d3b907 100644 ---- a/sysoff.c -+++ b/sysoff.c -@@ -17,6 +17,7 @@ - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -+#include - #include - #include - #include -@@ -38,11 +39,11 @@ static int sysoff_precise(int fd, int64_t *result, uint64_t *ts) - memset(&pso, 0, sizeof(pso)); - if (ioctl(fd, PTP_SYS_OFFSET_PRECISE, &pso)) { - pr_debug("ioctl PTP_SYS_OFFSET_PRECISE: %m"); -- return SYSOFF_RUN_TIME_MISSING; -+ return -errno; - } - *result = pctns(&pso.sys_realtime) - pctns(&pso.device); - *ts = pctns(&pso.sys_realtime); -- return SYSOFF_PRECISE; -+ return 0; - } - - static int64_t sysoff_estimate(struct ptp_clock_time *pct, int extended, -@@ -98,10 +99,10 @@ static int sysoff_extended(int fd, int n_samples, - pso.n_samples = n_samples; - if (ioctl(fd, PTP_SYS_OFFSET_EXTENDED, &pso)) { - pr_debug("ioctl PTP_SYS_OFFSET_EXTENDED: %m"); -- return SYSOFF_RUN_TIME_MISSING; -+ return -errno; - } - *result = sysoff_estimate(&pso.ts[0][0], 1, n_samples, ts, delay); -- return SYSOFF_EXTENDED; -+ return 0; - } - - static int sysoff_basic(int fd, int n_samples, -@@ -112,10 +113,10 @@ static int sysoff_basic(int fd, int n_samples, - pso.n_samples = n_samples; - if (ioctl(fd, PTP_SYS_OFFSET, &pso)) { - perror("ioctl PTP_SYS_OFFSET"); -- return SYSOFF_RUN_TIME_MISSING; -+ return -errno; - } - *result = sysoff_estimate(pso.ts, 0, n_samples, ts, delay); -- return SYSOFF_BASIC; -+ return 0; - } - - int sysoff_measure(int fd, int method, int n_samples, -@@ -130,7 +131,7 @@ int sysoff_measure(int fd, int method, int n_samples, - case SYSOFF_BASIC: - return sysoff_basic(fd, n_samples, result, ts, delay); - } -- return SYSOFF_RUN_TIME_MISSING; -+ return -EOPNOTSUPP; - } - - int sysoff_probe(int fd, int n_samples) -diff --git a/sysoff.h b/sysoff.h -index e4de919..5480f8f 100644 ---- a/sysoff.h -+++ b/sysoff.h -@@ -44,7 +44,7 @@ int sysoff_probe(int fd, int n_samples); - * @param result The estimated offset in nanoseconds. - * @param ts The system time corresponding to the 'result'. - * @param delay The delay in reading of the clock in nanoseconds. -- * @return One of the SYSOFF_ enumeration values. -+ * @return Zero on success, negative error code otherwise. - */ - int sysoff_measure(int fd, int method, int n_samples, - int64_t *result, uint64_t *ts, int64_t *delay); --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch b/base/linuxptp/centos/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch deleted file mode 100644 index 95392c01f..000000000 --- a/base/linuxptp/centos/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 38a530d94fc5aa73bde424d05e2e38348e64d7e5 Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Wed, 18 May 2022 11:33:36 +0200 -Subject: [PATCH 8/10] sysoff: Change log level of ioctl error messages. - -Change the log level of ioctl error messages to the error level to make -them visible in default configuration, with the exception of EOPNOTSUPP -which is expected in probing and should stay at the debug level to avoid -confusing users. - -Signed-off-by: Miroslav Lichvar -[commit 270709323a161ff1cb83af511ce50691152c75cf upstream] -Signed-off-by: Douglas Henrique Koerich ---- - sysoff.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/sysoff.c b/sysoff.c -index 5d3b907..a425275 100644 ---- a/sysoff.c -+++ b/sysoff.c -@@ -28,6 +28,14 @@ - - #define NS_PER_SEC 1000000000LL - -+static void print_ioctl_error(const char *name) -+{ -+ if (errno == EOPNOTSUPP) -+ pr_debug("ioctl %s: %s", name, strerror(errno)); -+ else -+ pr_err("ioctl %s: %s", name, strerror(errno)); -+} -+ - static int64_t pctns(struct ptp_clock_time *t) - { - return t->sec * NS_PER_SEC + t->nsec; -@@ -38,7 +46,7 @@ static int sysoff_precise(int fd, int64_t *result, uint64_t *ts) - struct ptp_sys_offset_precise pso; - memset(&pso, 0, sizeof(pso)); - if (ioctl(fd, PTP_SYS_OFFSET_PRECISE, &pso)) { -- pr_debug("ioctl PTP_SYS_OFFSET_PRECISE: %m"); -+ print_ioctl_error("PTP_SYS_OFFSET_PRECISE"); - return -errno; - } - *result = pctns(&pso.sys_realtime) - pctns(&pso.device); -@@ -98,7 +106,7 @@ static int sysoff_extended(int fd, int n_samples, - memset(&pso, 0, sizeof(pso)); - pso.n_samples = n_samples; - if (ioctl(fd, PTP_SYS_OFFSET_EXTENDED, &pso)) { -- pr_debug("ioctl PTP_SYS_OFFSET_EXTENDED: %m"); -+ print_ioctl_error("PTP_SYS_OFFSET_EXTENDED"); - return -errno; - } - *result = sysoff_estimate(&pso.ts[0][0], 1, n_samples, ts, delay); -@@ -112,7 +120,7 @@ static int sysoff_basic(int fd, int n_samples, - memset(&pso, 0, sizeof(pso)); - pso.n_samples = n_samples; - if (ioctl(fd, PTP_SYS_OFFSET, &pso)) { -- perror("ioctl PTP_SYS_OFFSET"); -+ print_ioctl_error("PTP_SYS_OFFSET"); - return -errno; - } - *result = sysoff_estimate(pso.ts, 0, n_samples, ts, delay); --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch b/base/linuxptp/centos/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch deleted file mode 100644 index e664e3bd9..000000000 --- a/base/linuxptp/centos/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 11ae077e31d9957df01aacfa17eea5b5d548b249 Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Wed, 18 May 2022 11:33:37 +0200 -Subject: [PATCH 9/10] sysoff: Retry on EBUSY when probing supported ioctls. - -Handle EBUSY when probing support for a PTP_SYS_OFFSET ioctl. Try each -ioctl up to three times before giving up on it to make the detection -more reliable. - -Signed-off-by: Miroslav Lichvar -[commit dadd2593c7beaee9eba5828a7bd8a0b5849dd8bb upstream] -Signed-off-by: Douglas Henrique Koerich ---- - sysoff.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/sysoff.c b/sysoff.c -index a425275..fc1f7ca 100644 ---- a/sysoff.c -+++ b/sysoff.c -@@ -145,8 +145,8 @@ int sysoff_measure(int fd, int method, int n_samples, - int sysoff_probe(int fd, int n_samples) - { - int64_t junk, delay; -+ int i, j, err; - uint64_t ts; -- int i; - - if (n_samples > PTP_MAX_SAMPLES) { - fprintf(stderr, "warning: %d exceeds kernel max readings %d\n", -@@ -156,9 +156,15 @@ int sysoff_probe(int fd, int n_samples) - } - - for (i = 0; i < SYSOFF_LAST; i++) { -- if (sysoff_measure(fd, i, n_samples, &junk, &ts, &delay) < 0) -- continue; -- return i; -+ for (j = 0; j < 3; j++) { -+ err = sysoff_measure(fd, i, n_samples, &junk, &ts, -+ &delay); -+ if (err == -EBUSY) -+ continue; -+ if (err) -+ break; -+ return i; -+ } - } - - return SYSOFF_RUN_TIME_MISSING; --- -2.29.2 - diff --git a/base/linuxptp/centos/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch b/base/linuxptp/centos/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch deleted file mode 100644 index 6b09fd434..000000000 --- a/base/linuxptp/centos/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch +++ /dev/null @@ -1,83 +0,0 @@ -From e4fd6a930213e6f0f009eb070d51b1e14db60d1b Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Wed, 18 May 2022 11:33:38 +0200 -Subject: [PATCH 10/10] phc2sys: Don't exit when reading of PHC fails with EBUSY. - -Reading of the PHC can occasionally fail with some drivers, e.g. the ice -driver returns EBUSY when it fails to get a lock. Continue in the loop -instead of exiting on the error. - -Signed-off-by: Miroslav Lichvar - -[ commit e8dc364f9fd5fbdac5d2c5e433f28e9da0028d49 upstream - We drop two hunks of it, namely the stuff that applies to - clockadj_compare, because they apply to the source code - ahead of baseline currently used by StarlingX ] - -Signed-off-by: Douglas Henrique Koerich ---- - phc2sys.c | 31 +++++++++++++++++++------------ - 1 file changed, 19 insertions(+), 12 deletions(-) - -diff --git a/phc2sys.c b/phc2sys.c -index 44d6872..7959015 100644 ---- a/phc2sys.c -+++ b/phc2sys.c -@@ -722,6 +722,7 @@ static int do_loop(struct phc2sys_private *priv, int subscriptions) - struct clock *clock; - uint64_t ts; - int64_t offset, delay; -+ int err; - - interval.tv_sec = priv->phc_interval; - interval.tv_nsec = (priv->phc_interval - interval.tv_sec) * 1e9; -@@ -765,28 +766,34 @@ static int do_loop(struct phc2sys_private *priv, int subscriptions) - if (clock->clkid == CLOCK_REALTIME && - priv->master->sysoff_method >= 0) { - /* use sysoff */ -- if (sysoff_measure(CLOCKID_TO_FD(priv->master->clkid), -- priv->master->sysoff_method, -- priv->phc_readings, -- &offset, &ts, &delay) < 0) -- return -1; -+ err = sysoff_measure(CLOCKID_TO_FD(priv->master->clkid), -+ priv->master->sysoff_method, -+ priv->phc_readings, -+ &offset, &ts, &delay); - } else if (priv->master->clkid == CLOCK_REALTIME && - clock->sysoff_method >= 0) { - /* use reversed sysoff */ -- if (sysoff_measure(CLOCKID_TO_FD(clock->clkid), -- clock->sysoff_method, -- priv->phc_readings, -- &offset, &ts, &delay) < 0) -- return -1; -- offset = -offset; -- ts += offset; -+ err = sysoff_measure(CLOCKID_TO_FD(clock->clkid), -+ clock->sysoff_method, -+ priv->phc_readings, -+ &offset, &ts, &delay); -+ if (!err) { -+ offset = -offset; -+ ts += offset; -+ } - } else { -+ err = 0; - /* use phc */ - if (!read_phc(priv->master->clkid, clock->clkid, - priv->phc_readings, - &offset, &ts, &delay)) - continue; - } -+ if (err == -EBUSY) -+ continue; -+ if (err) -+ return -1; -+ - update_clock(priv, clock, offset, ts, delay); - } - } --- -2.29.2 - diff --git a/base/linuxptp/centos/srpm_path b/base/linuxptp/centos/srpm_path deleted file mode 100644 index c35978776..000000000 --- a/base/linuxptp/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/linuxptp-3.1.1-1.el8.src.rpm diff --git a/base/ntp/centos/build_srpm.data b/base/ntp/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/ntp/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/ntp/centos/meta_patches/Fix-ntpq-truncates-IPV6-addresses.patch b/base/ntp/centos/meta_patches/Fix-ntpq-truncates-IPV6-addresses.patch deleted file mode 100644 index 283078ed1..000000000 --- a/base/ntp/centos/meta_patches/Fix-ntpq-truncates-IPV6-addresses.patch +++ /dev/null @@ -1,41 +0,0 @@ -From fbfbbc827d080370f71a76284dde4dc3dd1d16da Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <536afc9500d65768db35f6ca07c21c490b19bda7.1574708120.git.Jim.Somerville@windriver.com> -References: <536afc9500d65768db35f6ca07c21c490b19bda7.1574708120.git.Jim.Somerville@windriver.com> -From: Kristine Bujold -Date: Tue, 3 Sep 2019 16:18:58 -0400 -Subject: [PATCH 2/2] Fix ntpq truncates IPV6 addresses - -Signed-off-by: Kristine Bujold -Signed-off-by: Jim Somerville ---- - SPECS/ntp.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/ntp.spec b/SPECS/ntp.spec -index 84aa1ac..4d32d8c 100644 ---- a/SPECS/ntp.spec -+++ b/SPECS/ntp.spec -@@ -204,6 +204,9 @@ Patch78: ntp-4.2.6p5-netlinknobuf.patch - # add bugs for compatibility with original EL7 ntpstat - Patch100: ntpstat-compat.patch - -+# STX IPV6 ntpq patch -+Patch500: Fix-ntpq-truncates-IPV6-addresses.patch -+ - URL: http://www.ntp.org - Requires(post): systemd-units - Requires(preun): systemd-units -@@ -361,6 +364,9 @@ This package contains NTP documentation in HTML format. - - %patch100 -p1 -b .compat - -+%patch500 -p1 -b .ntpq-truncates-IPV6-addresses -+ -+ - # set default path to sntp KoD database - sed -i 's|/var/db/ntp-kod|%{_localstatedir}/lib/sntp/kod|' sntp/{sntp.1,main.c} - --- -1.8.3.1 - diff --git a/base/ntp/centos/meta_patches/PATCH_ORDER b/base/ntp/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index dd3f82721..000000000 --- a/base/ntp/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -Update-package-versioning-for-TIS-format.patch -Fix-ntpq-truncates-IPV6-addresses.patch diff --git a/base/ntp/centos/meta_patches/Update-package-versioning-for-TIS-format.patch b/base/ntp/centos/meta_patches/Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index ddcfdb507..000000000 --- a/base/ntp/centos/meta_patches/Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 536afc9500d65768db35f6ca07c21c490b19bda7 Mon Sep 17 00:00:00 2001 -Message-Id: <536afc9500d65768db35f6ca07c21c490b19bda7.1574708120.git.Jim.Somerville@windriver.com> -From: Kristine Bujold -Date: Tue, 3 Sep 2019 16:08:25 -0400 -Subject: [PATCH 1/2] Update package versioning for TIS format - -Signed-off-by: Kristine Bujold -Signed-off-by: Jim Somerville ---- - SPECS/ntp.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/ntp.spec b/SPECS/ntp.spec -index 178a961..84aa1ac 100644 ---- a/SPECS/ntp.spec -+++ b/SPECS/ntp.spec -@@ -1,7 +1,7 @@ - Summary: The NTP daemon and utilities - Name: ntp - Version: 4.2.6p5 --Release: 29%{?dist}.2 -+Release: 29.el7.centos.2%{?_tis_dist}.%{tis_patch_ver} - # primary license (COPYRIGHT) : MIT - # ElectricFence/ (not used) : GPLv2 - # kernel/sys/ppsclock.h (not used) : BSD with advertising --- -1.8.3.1 - diff --git a/base/ntp/centos/patches/Fix-ntpq-truncates-IPV6-addresses.patch b/base/ntp/centos/patches/Fix-ntpq-truncates-IPV6-addresses.patch deleted file mode 100644 index 961d69d22..000000000 --- a/base/ntp/centos/patches/Fix-ntpq-truncates-IPV6-addresses.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c135c30f1196b081619e1f4164840748b7815f24 Mon Sep 17 00:00:00 2001 -From: Kristine Bujold -Date: Tue, 3 Sep 2019 16:58:39 -0400 -Subject: [PATCH] ntpq truncates "remote" host information when system is IPV6 - -Signed-off-by: Kristine Bujold ---- - ntpq/ntpq-subs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c -index c834ce6..0ed8933 100644 ---- a/ntpq/ntpq-subs.c -+++ b/ntpq/ntpq-subs.c -@@ -1614,7 +1614,7 @@ doprintpeers( - } - if (AF_UNSPEC == af || AF(&srcadr) == af) { - strncpy(clock_name, nntohost(&srcadr), sizeof(clock_name)); -- fprintf(fp, "%c%-15.15s ", c, clock_name); -+ fprintf(fp, "%c%s\n ", c, clock_name); - drlen = strlen(dstadr_refid); - makeascii(drlen, dstadr_refid, fp); - while (drlen++ < 15) --- -1.8.3.1 - diff --git a/base/ntp/centos/srpm_path b/base/ntp/centos/srpm_path deleted file mode 100644 index 4dfc9ca7f..000000000 --- a/base/ntp/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/ntp-4.2.6p5-29.el7.centos.2.src.rpm diff --git a/base/openssh/centos/build_srpm.data b/base/openssh/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/openssh/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/openssh/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/openssh/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 881496126..000000000 --- a/base/openssh/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4da56227f47a96f37eb0e46e0222f7e1d2f95c2b Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:32:16 -0400 -Subject: 0001-Update-package-versioning-for-TIS-format.patch - -Signed-off-by: zhipengl ---- - SPECS/openssh.spec | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/SPECS/openssh.spec b/SPECS/openssh.spec -index 5c030bc..0a91b56 100644 ---- a/SPECS/openssh.spec -+++ b/SPECS/openssh.spec -@@ -71,7 +71,7 @@ - Summary: An open source implementation of SSH protocol versions 1 and 2 - Name: openssh - Version: %{openssh_ver} --Release: %{openssh_rel}%{?dist}%{?rescue_rel} -+Release: %{openssh_rel}.el7_4%{?_tis_dist}.%{tis_patch_ver} - URL: http://www.openssh.com/portable.html - #URL1: http://pamsshagentauth.sourceforge.net - Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz -@@ -346,7 +346,7 @@ Requires: openssh = %{version}-%{release} - Summary: PAM module for authentication with ssh-agent - Group: System Environment/Base - Version: %{pam_ssh_agent_ver} --Release: %{pam_ssh_agent_rel}.%{openssh_rel}%{?dist}%{?rescue_rel} -+Release: %{pam_ssh_agent_rel}.el7_2%{?_tis_dist}.%{tis_patch_ver} - License: BSD - - %description --- -1.8.3.1 - diff --git a/base/openssh/centos/meta_patches/PATCH_ORDER b/base/openssh/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 2d936ef02..000000000 --- a/base/openssh/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -spec-include-TiS-changes.patch -openssh-init-script-kill-old-instances-on-start.patch diff --git a/base/openssh/centos/meta_patches/openssh-init-script-kill-old-instances-on-start.patch b/base/openssh/centos/meta_patches/openssh-init-script-kill-old-instances-on-start.patch deleted file mode 100644 index 905fd3840..000000000 --- a/base/openssh/centos/meta_patches/openssh-init-script-kill-old-instances-on-start.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7eefd34e4adc9a4c88fc667f99bf76e967270813 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:32:16 -0400 -Subject: [PATCH 6/7] WRS: - openssh-init-script-kill-old-instances-on-start.patch - ---- - SOURCES/sshd.init | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/SOURCES/sshd.init b/SOURCES/sshd.init -index 8901b4f..cd8b4ab 100755 ---- a/SOURCES/sshd.init -+++ b/SOURCES/sshd.init -@@ -60,6 +60,14 @@ start() - # Create keys if necessary - /usr/sbin/sshd-keygen - -+ # In rare instances, sshd may be started but a pid -+ # file is not generated. This is seen usually during -+ # system reboot scenarios. A subsequent attempt to start -+ # sshd here will trigger a port bind error. As a sanity -+ # check attempt a kill call (mostly redundant) to any -+ # previously running sshd instance -+ /bin/kill `/usr/sbin/pidof "$SSHD"` >/dev/null 2>&1 -+ - echo -n $"Starting $prog: " - $SSHD $OPTIONS && success || failure - RETVAL=$? --- -1.9.1 diff --git a/base/openssh/centos/meta_patches/spec-include-TiS-changes.patch b/base/openssh/centos/meta_patches/spec-include-TiS-changes.patch deleted file mode 100644 index 6b328db57..000000000 --- a/base/openssh/centos/meta_patches/spec-include-TiS-changes.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 788beea32cfa09f61c27db117ec3b3b0500fbad8 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 15:32:16 -0400 -Subject: spec-include-TiS-changes.patch - -Signed-off-by: zhipengl ---- - SPECS/openssh.spec | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/SPECS/openssh.spec b/SPECS/openssh.spec -index 0a91b56..bbae9d7 100644 ---- a/SPECS/openssh.spec -+++ b/SPECS/openssh.spec -@@ -719,9 +723,6 @@ getent passwd sshd >/dev/null || \ - %preun server - %systemd_preun sshd.service sshd.socket - --%postun server --%systemd_postun_with_restart sshd.service -- - %files - %defattr(-,root,root) - %{!?_licensedir:%global license %%doc} -@@ -784,8 +785,6 @@ getent passwd sshd >/dev/null || \ - %attr(0644,root,root) %{_unitdir}/sshd.socket - %attr(0644,root,root) %{_unitdir}/sshd-keygen.service - --%files server-sysvinit --%defattr(-,root,root) - %attr(0755,root,root) /etc/rc.d/init.d/sshd - %endif - --- -1.8.3.1 - diff --git a/base/openssh/centos/srpm_path b/base/openssh/centos/srpm_path deleted file mode 100644 index ad21cc855..000000000 --- a/base/openssh/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/openssh-7.4p1-21.el7.src.rpm diff --git a/base/pf-bb-config/centos/build_srpm.data b/base/pf-bb-config/centos/build_srpm.data deleted file mode 100644 index 08d7d7b5e..000000000 --- a/base/pf-bb-config/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -TAR_NAME=pf-bb-config -GIT_SHA=d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585 - -COPY_LIST=" \ - $STX_BASE/downloads/$TAR_NAME-$GIT_SHA.tar.gz \ - $PKG_BASE/files/* \ -" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/pf-bb-config/centos/pf-bb-config.spec b/base/pf-bb-config/centos/pf-bb-config.spec deleted file mode 100644 index 1baab3d57..000000000 --- a/base/pf-bb-config/centos/pf-bb-config.spec +++ /dev/null @@ -1,50 +0,0 @@ -%global git_sha d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585 - -Summary: PF BBDEV (baseband device) Configuration Application. -Name: pf-bb-config -Version: 21.6 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: https://github.com/intel/pf-bb-config/tree/v21.6 -Source0: %{name}-%{git_sha}.tar.gz -Patch0: Reject-device-configuration-if-not-enabled.patch -Patch1: Fix-check-return-of-configure_device.patch -Patch2: Customize-fpga_5gnr-config-for-1-VF.patch - -BuildRequires: gcc -BuildRequires: inih - -%define debug_package %{nil} -%description -The PF BBDEV (baseband device) Configuration Application "pf_bb_config" provides a means to -configure the baseband device at the host-level. The program accesses the configuration -space and sets the various parameters through memory-mapped IO read/writes. - -%prep -%setup -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 - -%build -make - -%install - -install -d -m 755 %{buildroot}%{_bindir} -install -d -m 755 %{buildroot}%{_datadir}/pf-bb-config/acc100 -install -p -D -m 700 pf_bb_config %{buildroot}%{_bindir}/pf_bb_config -install -p -D -m 700 acc100/acc100_config_1vf_4g5g.cfg %{buildroot}%{_datadir}/pf-bb-config/acc100/acc100_config_1vf_4g5g.cfg -install -p -D -m 700 acc100/acc100_config_vf_5g.cfg %{buildroot}%{_datadir}/pf-bb-config/acc100/acc100_config_vf_5g.cfg -install -p -D -m 700 fpga_5gnr/fpga_5gnr_config_vf.cfg %{buildroot}%{_datadir}/pf-bb-config/fpga_5gnr/fpga_5gnr_config_vf.cfg -install -p -D -m 644 README.md %{buildroot}%{_datadir}/pf-bb-config/README.md - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%{_bindir}/* -%{_datadir}/* diff --git a/base/rt-setup/centos/build_srpm.data b/base/rt-setup/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/rt-setup/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/rt-setup/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch b/base/rt-setup/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch deleted file mode 100644 index a067ace29..000000000 --- a/base/rt-setup/centos/meta_patches/0001-Update-package-versioning-for-STX-format.patch +++ /dev/null @@ -1,37 +0,0 @@ -From acc7db42e01d83082072bdf3de8b7426897f7045 Mon Sep 17 00:00:00 2001 -From: Yong Fu -Date: Wed, 8 Apr 2020 11:03:15 +0800 -Subject: [PATCH] Update package versioning for STX format - -Signed-off-by: Yong Fu ---- - SPECS/rt-setup.spec | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/SPECS/rt-setup.spec b/SPECS/rt-setup.spec -index 05e2707..e350ce1 100644 ---- a/SPECS/rt-setup.spec -+++ b/SPECS/rt-setup.spec -@@ -1,8 +1,8 @@ - Name: rt-setup - Version: 2.1 --Release: 2%{?dist} -+Release: 2.el8%{?_tis_dist}.%{tis_patch_ver} - License: GPL+ --Summary: Setup RHEL-RT environment details -+Summary: Setup CentOS-RT environment details - Group: System Environment/Base - Source: rt-setup-%{version}.tar.bz2 - -@@ -22,7 +22,7 @@ Requires: systemd - %global debug_package %{nil} - - %description --The 'rt-setup' package configures details required by RHEL-RT environment. -+The 'rt-setup' package configures details required by CentOS-RT environment. - - creates realtime group - - adds realtime limits configuration for PAM - - adds /usr/bin/rt-setup-kdump to config kdump in RT --- -2.7.4 - diff --git a/base/rt-setup/centos/meta_patches/PATCH_ORDER b/base/rt-setup/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 17495c084..000000000 --- a/base/rt-setup/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -0001-Update-package-versioning-for-STX-format.patch diff --git a/base/rt-setup/centos/srpm_path b/base/rt-setup/centos/srpm_path deleted file mode 100644 index 65c8e4a4e..000000000 --- a/base/rt-setup/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -repo:stx/downloads/rt-setup-2.1-2.el8.src.rpm diff --git a/base/setup/centos/build_srpm.data b/base/setup/centos/build_srpm.data deleted file mode 100644 index c3c7e2378..000000000 --- a/base/setup/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/setup/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/setup/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 247d371e9..000000000 --- a/base/setup/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 667cc2ccdd4451ce9d943064d714bcf1a8d1e4ed Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 26 Sep 2016 17:40:54 -0400 -Subject: [PATCH 09/15] Update package versioning for TIS format - ---- - SPECS/setup.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/setup.spec b/SPECS/setup.spec -index 3ad2458..8f5fc46 100644 ---- a/SPECS/setup.spec -+++ b/SPECS/setup.spec -@@ -1,7 +1,7 @@ - Summary: A set of system configuration and setup files - Name: setup - Version: 2.8.71 --Release: 10%{?dist} -+Release: 10.el7%{?_tis_dist}.%{tis_patch_ver} - License: Public Domain - Group: System Environment/Base - URL: https://pagure.io/setup/ --- -2.7.4 - diff --git a/base/setup/centos/meta_patches/0001-WRS-change-passwd-group-uidgid.patch b/base/setup/centos/meta_patches/0001-WRS-change-passwd-group-uidgid.patch deleted file mode 100644 index e9897e23a..000000000 --- a/base/setup/centos/meta_patches/0001-WRS-change-passwd-group-uidgid.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e3aba238a88f73392d832b5ae366466f783adce4 Mon Sep 17 00:00:00 2001 -From: zhipengl -Date: Sun, 18 Nov 2018 10:06:23 +0000 -Subject: [PATCH] WRS: 0001-patch-passwd-group.patch - ---- - SPECS/setup.spec | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/SPECS/setup.spec b/SPECS/setup.spec -index 0bd1e98..a173b95 100644 ---- a/SPECS/setup.spec -+++ b/SPECS/setup.spec -@@ -23,6 +23,8 @@ Patch7: setup-2.8.71-shlocal.patch - Patch8: setup-2.8.71-protocolscrudp.patch - Patch9: setup-2.8.71-shellsnologin.patch - -+Patch1001: 0001-Change-group-passwd-and-uidgid.patch -+ - %description - The setup package contains a set of important system configuration and - setup files, such as passwd, group, and profile. -@@ -40,6 +42,8 @@ setup files, such as passwd, group, and profile. - %patch8 -p1 - %patch9 -p1 - -+%patch1001 -p1 -+ - ./shadowconvert.sh - - %build --- -1.8.3.1 - diff --git a/base/setup/centos/meta_patches/PATCH_ORDER b/base/setup/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index d87c5eaca..000000000 --- a/base/setup/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0001-WRS-change-passwd-group-uidgid.patch diff --git a/base/setup/centos/patches/0001-Change-group-passwd-and-uidgid.patch b/base/setup/centos/patches/0001-Change-group-passwd-and-uidgid.patch deleted file mode 100644 index 3841af244..000000000 --- a/base/setup/centos/patches/0001-Change-group-passwd-and-uidgid.patch +++ /dev/null @@ -1,125 +0,0 @@ -From ac1266693665ff6a266e1123109c23a6adbb399b Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 24 Oct 2019 11:53:01 -0500 -Subject: [PATCH] Change group,passwd,and uidgid - -Signed-off-by: Andy Ning -Signed-off-by: Al Bailey ---- - group | 22 ++++++++++++---------- - passwd | 19 +++++++++++-------- - uidgid | 10 ++++++---- - 3 files changed, 29 insertions(+), 22 deletions(-) - -diff --git a/group b/group -index 2753bd8..74174c3 100644 ---- a/group -+++ b/group -@@ -1,24 +1,26 @@ - root::0: --bin::1: --daemon::2: - sys::3: --adm::4: - tty::5: - disk::6: --lp::7: --mem::8: - kmem::9: - wheel::10: - cdrom::11: - mail::12: --man::15: - dialout::18: - floppy::19: --games::20: - tape::33: --video::39: --ftp::50: - lock::54: --audio::63: - nobody::99: - users::100: -+postgres:x:120: -+nova:x:162:nova -+barbican:x:978:barbican -+keystone:x:42424:keystone -+neutron:x:164:neutron -+ceilometer:x:166:ceilometer -+sysinv:x:168:sysinv -+snmpd:x:169:snmpd,fm -+fm:x:195:fm -+libvirt:x:991:nova -+ironic:x:1874:ironic -+www:x:1877:www -diff --git a/passwd b/passwd -index 6c6a8eb..b478fc3 100644 ---- a/passwd -+++ b/passwd -@@ -1,13 +1,16 @@ - root:*:0:0:root:/root:/bin/bash --bin:*:1:1:bin:/bin:/sbin/nologin --daemon:*:2:2:daemon:/sbin:/sbin/nologin --adm:*:3:4:adm:/var/adm:/sbin/nologin --lp:*:4:7:lp:/var/spool/lpd:/sbin/nologin - sync:*:5:0:sync:/sbin:/bin/sync - shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown - halt:*:7:0:halt:/sbin:/sbin/halt --mail:*:8:12:mail:/var/spool/mail:/sbin/nologin --operator:*:11:0:operator:/root:/sbin/nologin --games:*:12:100:games:/usr/games:/sbin/nologin --ftp:*:14:50:FTP User:/var/ftp:/sbin/nologin - nobody:*:99:99:Nobody:/:/sbin/nologin -+postgres:x:120:120:PostgreSQL Server:/var/lib/pgsql:/bin/sh -+neutron:x:164:164:OpenStack Neutron Daemons:/var/lib/neutron:/sbin/nologin -+sysinv:x:168:168:sysinv Daemons:/var/lib/sysinv:/sbin/nologin -+snmpd:x:169:169:net-snmp:/usr/share/snmp:/sbin/nologin -+fm:x:195:195:fm-mgr:/var/lib/fm:/sbin/nologin -+barbican:x:982:978:Barbican Key Manager user account.:/var/lib/barbican:/sbin/nologin -+ceilometer:x:991:166:OpenStack ceilometer Daemons:/var/lib/ceilometer:/sbin/nologin -+keystone:x:42424:42424:OpenStack Keystone Daemons:/var/lib/keystone:/sbin/nologin -+nova:x:994:162:OpenStack Nova Daemons:/var/lib/nova:/sbin/nologin -+ironic:x:1874:1874:OpenStack Ironic Daemons:/var/lib/ironic:/sbin/nologin -+www:x:1877:1877:www:/home/www:/sbin/nologin -diff --git a/uidgid b/uidgid -index c6bbd4b..714ba2a 100644 ---- a/uidgid -+++ b/uidgid -@@ -127,13 +127,14 @@ stapusr - 156 / - systemtap-runtime - stapsys - 157 / - systemtap-runtime - stapdev - 158 / - systemtap-runtime - swift 160 160 /var/lib/swift /sbin/nologin openstack-swift --glance 161 161 /var/lib/glance /sbin/nologin openstack-glance - nova 162 162 /var/lib/nova /sbin/nologin openstack-nova --keystone 163 163 /var/lib/keystone /sbin/nologin openstack-keystone -+barbican 982 978 /var/lib/barbican /sbin/nologin openstack-barbican -+keystone 42424 42424 /var/lib/keystone /sbin/nologin openstack-keystone - quantum 164 164 /var/lib/quantum /sbin/nologin openstack-quantum --cinder 165 165 /var/lib/cinder /sbin/nologin openstack-cinder - ceilometer 166 166 /var/lib/ceilometer /sbin/nologin openstack-ceilometer - ceph 167 167 /var/lib/ceph /sbin/nologin ceph-common -+sysinv 168 168 /var/lib/sysinv /sbin/nologin sysinv -+snmpd 169 169 /usr/share/snmp /sbin/nologin net-snmp - avahi-autoipd 170 170 /var/lib/avahi-autoipd /sbin/nologin avahi - pulse 171 171 /var/run/pulse /sbin/nologin pulseaudio - rtkit 172 172 /proc /sbin/nologin rtkit -@@ -152,7 +153,6 @@ mongodb 184 184 /var/lib/mongodb /sbin/nologin mongodb - jboss 185 185 /var/lib/jbossas /sbin/nologin jbossas-core #was jboss-as and wildfly - jbosson-agent 186 - / /sbin/nologin jboss-on-agent - jbosson - 186 - - jboss-on-agent --heat 187 187 /var/lib/heat /sbin/nologin heat - haproxy 188 188 /var/lib/haproxy /sbin/nologin haproxy - hacluster 189 - / /sbin/nologin pacemaker - haclient - 189 - - pacemaker -@@ -163,6 +163,8 @@ systemd-network 192 192 / /sbin/nologin systemd - systemd-resolve 193 193 / /sbin/nologin systemd - gnats ? ? ? ? gnats, gnats-db - listar ? ? ? ? listar -+fm 195 195 /var/lib/fm /sbin/nologin fm-mgr - nfsnobody 65534 65534 /var/lib/nfs /sbin/nologin nfs-utils -+www 1877 1877 /home/www /sbin/nologin setup - - # Note: nfsnobody is 4294967294 on 64-bit platforms (-2) --- -1.8.3.1 - diff --git a/base/setup/centos/srpm_path b/base/setup/centos/srpm_path deleted file mode 100644 index 5f011677b..000000000 --- a/base/setup/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/setup-2.8.71-10.el7.src.rpm diff --git a/base/sudo/centos/build_srpm.data b/base/sudo/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/sudo/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/sudo/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/sudo/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 0b158134e..000000000 --- a/base/sudo/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 21db84dcb55f87c792a6d59cef0c68741a9d24b1 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 16:50:44 -0400 -Subject: [PATCH 1/4] STX: 0001-Update-package-versioning-for-TIS-format.patch - ---- - SPECS/sudo.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/sudo.spec b/SPECS/sudo.spec -index c8d2f64..b6402bb 100644 ---- a/SPECS/sudo.spec -+++ b/SPECS/sudo.spec -@@ -1,7 +1,7 @@ - Summary: Allows restricted root access for specified users - Name: sudo - Version: 1.8.23 --Release: 10%{?dist}.1 -+Release: 10.el7_9.1%{?_tis_dist}.%{tis_patch_ver} - License: ISC - Group: Applications/System - URL: http://www.courtesan.com/sudo/ --- -2.7.4 - diff --git a/base/sudo/centos/meta_patches/0002-spec-include-TiS-changes.patch b/base/sudo/centos/meta_patches/0002-spec-include-TiS-changes.patch deleted file mode 100644 index 0ee52261f..000000000 --- a/base/sudo/centos/meta_patches/0002-spec-include-TiS-changes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 70046603b8d607445e2fbf5e7d934bcd43a77dc8 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 16:50:44 -0400 -Subject: [PATCH 2/4] STX: 0002-spec-include-TiS-changes.patch - ---- - SPECS/sudo.spec | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/SPECS/sudo.spec b/SPECS/sudo.spec -index b6402bb..acbcb26 100644 ---- a/SPECS/sudo.spec -+++ b/SPECS/sudo.spec -@@ -126,7 +126,7 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" SHL - --with-ignore-dot \ - --with-tty-tickets \ - --with-ldap \ -- --with-ldap-conf-file="%{_sysconfdir}/sudo-ldap.conf" \ -+ --with-ldap-conf-file="%{_sysconfdir}/openldap/ldap.conf" \ - --with-selinux \ - --with-passprompt="[sudo] password for %p: " \ - --with-linux-audit \ -@@ -153,6 +153,9 @@ install -p -c -m 0440 %{SOURCE1} %{buildroot}%{_sysconfdir}/sudoers - install -p -c -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudo.conf - install -p -c -m 0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudo-ldap.conf - -+install -d %{buildroot}%{_sysconfdir}/openldap/schema/ -+install -m 644 doc/schema.OpenLDAP %{buildroot}%{_sysconfdir}/openldap/schema/sudo.schema -+ - # Remove upstream sudoers file - rm -f %{buildroot}%{_sysconfdir}/sudoers.dist - -@@ -225,6 +228,7 @@ rm -rf %{buildroot} - %{_mandir}/man5/sudoers_timestamp.5.gz - %dir %{_docdir}/sudo-%{version} - %{_docdir}/sudo-%{version}/* -+%{_sysconfdir}/openldap/schema/sudo.schema - - # Make sure permissions are ok even if we're updating - %post --- -2.7.4 - diff --git a/base/sudo/centos/meta_patches/0003-remove-make-check.patch b/base/sudo/centos/meta_patches/0003-remove-make-check.patch deleted file mode 100644 index ded83eaf1..000000000 --- a/base/sudo/centos/meta_patches/0003-remove-make-check.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/SPECS/sudo.spec b/SPECS/sudo.spec -index 8c3f395..17531f7 100644 ---- a/SPECS/sudo.spec -+++ b/SPECS/sudo.spec -@@ -135,7 +135,8 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" SHL - make - - %check --make check -+# "make check" fails if there is no group named "bin" in the mock system -+# make check - - %install - rm -rf %{buildroot} --- -2.7.4 - diff --git a/base/sudo/centos/meta_patches/PATCH_ORDER b/base/sudo/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 36671de98..000000000 --- a/base/sudo/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-spec-include-TiS-changes.patch -0003-remove-make-check.patch diff --git a/base/sudo/centos/srpm_path b/base/sudo/centos/srpm_path deleted file mode 100644 index da7b5fb6a..000000000 --- a/base/sudo/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/sudo-1.8.23-10.el7_9.1.src.rpm diff --git a/base/systemd/centos/build_srpm.data b/base/systemd/centos/build_srpm.data deleted file mode 100644 index a97c0063d..000000000 --- a/base/systemd/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_SLOW=7 diff --git a/base/systemd/centos/meta_patches/Add-STX-patches.patch b/base/systemd/centos/meta_patches/Add-STX-patches.patch deleted file mode 100644 index 2217ded34..000000000 --- a/base/systemd/centos/meta_patches/Add-STX-patches.patch +++ /dev/null @@ -1,93 +0,0 @@ -From b2c505a9b2a532974b5f69332bd87f03087d74a4 Mon Sep 17 00:00:00 2001 -From: Li Zhou -Date: Wed, 21 Apr 2021 14:41:27 +0800 -Subject: [PATCH] Add STX patches - -Signed-off-by: Jim Somerville -Signed-off-by: Li Zhou ---- - SPECS/systemd.spec | 68 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - -diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec -index 07e022e..a9b6fe0 100644 ---- a/SPECS/systemd.spec -+++ b/SPECS/systemd.spec -@@ -884,6 +884,74 @@ Patch0842: 0842-core-don-t-update-unit-description-if-it-is-already-.patch - Patch0843: 0843-unit-don-t-emit-PropertiesChanged-signal-if-adding-a.patch - Patch0844: 0844-core-fix-unnecessary-fallback-to-the-rescue-mode-cau.patch - Patch0845: 0845-core-Detect-initial-timer-state-from-serialized-data.patch -+ -+# STX Patches -+Patch0851: 851-inject-millisec-in-syslog-date.patch -+Patch0852: 852-fix-build-error-for-unused-variable.patch -+Patch0853: 853-Fix-compile-failure-due-to-deprecated-value.patch -+ -+# This cluster of patches relates to fixing redhat bug #1819868 -+# "systemd excessively reads mountinfo and udev in dense container environments" -+ -+# Below patches are added for merging patch (1) -+Patch0901: 901-sd-event-don-t-touch-fd-s-accross-forks.patch -+Patch0902: 902-sd-event-make-sure-RT-signals-are-not-dropped.patch -+# Patch (1) for solving #1819868 -+Patch0903: 903-sd-event-split-out-helper-functions-for-reshuffling-.patch -+ -+# Below patches are added for merging patch (2) -+Patch0904: 904-sd-event-drop-pending-events-when-we-turn-off-on-an-.patch -+Patch0905: 905-sd-event-fix-call-to-event_make_signal_data.patch -+Patch0906: 906-sd-event-make-sure-to-create-a-signal-queue-for-the-.patch -+# Patch (2) for solving #1819868 -+Patch0907: 907-sd-event-split-out-enable-and-disable-codepaths-from.patch -+ -+# Below patch is added for merging patch (3) -+Patch0908: 908-sd-event-use-prioq_ensure_allocated-where-possible.patch -+# Patch (3) for solving #1819868 -+Patch0909: 909-sd-event-split-clock-data-allocation-out-of-sd_event.patch -+ -+# Patch (4) for solving #1819868 -+Patch0910: 910-sd-event-split-out-code-to-add-remove-timer-event-so.patch -+ -+# Below patch is added for merging patch (5) -+Patch0911: 911-sd-event-rename-PASSIVE-PREPARED-to-INITIAL-ARMED.patch -+# Patch (5) for solving #1819868 -+Patch0912: 912-sd-event-refuse-running-default-event-loops-in-any-o.patch -+ -+# Patch (6) for solving #1819868 -+Patch0913: 913-sd-event-remove-earliest_index-latest_index-into-com.patch -+ -+# Patch (7) for solving #1819868 -+Patch0914: 914-sd-event-update-state-at-the-end-in-event_source_ena.patch -+ -+# Patch (8) for solving #1819868 -+Patch0915: 915-sd-event-increase-n_enabled_child_sources-just-once.patch -+ -+# Below patches are added for merging patch (9) -+Patch0916: 916-sd-event-don-t-provide-priority-stability.patch -+Patch0917: 917-sd-event-when-determining-the-last-allowed-time-a-ti.patch -+Patch0918: 918-sd-event-permit-a-USEC_INFINITY-timeout-as-an-altern.patch -+# Patch (9) for solving #1819868 -+Patch0919: 919-sd-event-add-ability-to-ratelimit-event-sources.patch -+ -+# Patch (10) for solving #1819868 -+Patch0920: 920-core-prevent-excessive-proc-self-mountinfo-parsing.patch -+ -+# This patch fixes build issues related to the above patches. Our goal is to keep -+# upstream patches as unmodified as possible to facilitate maintaining them, so instead -+# of individually changing them for compilation, we just have one patch at the end to do it. -+Patch0921: 921-systemd-Fix-compiling-errors-when-merging-1819868.patch -+ -+# This cluster of patches relates to fixing redhat bug #1968528 -+# "fix rate-limiting of mount events" -+Patch0922: 922-sd-event-change-ordering-of-pending-ratelimited-even.patch -+Patch0923: 923-sd-event-drop-unnecessary-else.patch -+Patch0924: 924-sd-event-use-CMP-macro.patch -+Patch0925: 925-sd-event-use-usec_add.patch -+Patch0926: 926-sd-event-make-event_source_time_prioq_reshuffle-acce.patch -+Patch0927: 927-sd-event-always-reshuffle-time-prioq-on-changing-onl.patch -+ - Patch9999: 9999-Update-kernel-install-script-by-backporting-fedora-p.patch - - %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} --- -2.17.1 - diff --git a/base/systemd/centos/meta_patches/PATCH_ORDER b/base/systemd/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index bf2db2190..000000000 --- a/base/systemd/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -update-package-versioning-for-STX.patch -Protect-sections-of-systemd-post-from-running-on-pat.patch -Add-STX-patches.patch diff --git a/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch b/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch deleted file mode 100644 index 1e2efa43c..000000000 --- a/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch +++ /dev/null @@ -1,52 +0,0 @@ -From eece9585b5f9258c7180247b1664e92b5ef83efe Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: -References: -From: Scott Little -Date: Mon, 2 Oct 2017 17:53:00 -0400 -Subject: [PATCH 2/3] Protect sections of systemd post from running on patch - -Signed-off-by: Jim Somerville ---- - SPECS/systemd.spec | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec -index 16262fb..4c83150 100644 ---- a/SPECS/systemd.spec -+++ b/SPECS/systemd.spec -@@ -1297,6 +1297,7 @@ fi - rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || : - rm -f /etc/sysconfig/keyboard >/dev/null 2>&1 || : - -+if [ $1 -eq 1 ]; then - # Migrate HOSTNAME= from /etc/sysconfig/network - if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then - unset HOSTNAME -@@ -1304,6 +1305,7 @@ if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then - [ -n "$HOSTNAME" ] && echo $HOSTNAME > /etc/hostname 2>&1 || : - fi - sed -i '/^HOSTNAME=/d' /etc/sysconfig/network >/dev/null 2>&1 || : -+fi - - # Migrate the old systemd-setup-keyboard X11 configuration fragment - if [ ! -e /etc/X11/xorg.conf.d/00-keyboard.conf ] ; then -@@ -1312,6 +1314,7 @@ else - rm -f /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf >/dev/null 2>&1 || : - fi - -+if [ 1 -eq 0 ] ; then # TIS: Skip this. We don't want myhostname in nsswitch.conf - # sed-fu to add myhostname to the hosts line of /etc/nsswitch.conf - # Only do that when installing, not when updating. - if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then -@@ -1321,6 +1324,7 @@ if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then - s/[[:blank:]]*$/ myhostname/ - ' /etc/nsswitch.conf >/dev/null 2>&1 || : - fi -+fi - - %posttrans - # Convert old /etc/sysconfig/desktop settings --- -1.8.3.1 - diff --git a/base/systemd/centos/meta_patches/update-package-versioning-for-STX.patch b/base/systemd/centos/meta_patches/update-package-versioning-for-STX.patch deleted file mode 100644 index 944e6663f..000000000 --- a/base/systemd/centos/meta_patches/update-package-versioning-for-STX.patch +++ /dev/null @@ -1,27 +0,0 @@ -From eeb3e979288cb8c14d8546d12a27da4c88fbb0e4 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Scott Little -Date: Mon, 2 Oct 2017 17:53:00 -0400 -Subject: [PATCH 1/3] update package versioning for STX - -Signed-off-by: Jim Somerville ---- - SPECS/systemd.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec -index b1ffe88..16262fb 100644 ---- a/SPECS/systemd.spec -+++ b/SPECS/systemd.spec -@@ -7,7 +7,7 @@ - Name: systemd - Url: http://www.freedesktop.org/wiki/Software/systemd - Version: 219 --Release: 78%{?dist}.3 -+Release: 78.el7_9.3%{?_tis_dist}.%{tis_patch_ver} - # For a breakdown of the licensing, see README - License: LGPLv2+ and MIT and GPLv2+ - Summary: A System and Service Manager --- -1.8.3.1 - diff --git a/base/systemd/centos/patches/851-inject-millisec-in-syslog-date.patch b/base/systemd/centos/patches/851-inject-millisec-in-syslog-date.patch deleted file mode 100644 index 9a0074e57..000000000 --- a/base/systemd/centos/patches/851-inject-millisec-in-syslog-date.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7 Mon Sep 17 00:00:00 2001 -Message-Id: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com> -From: systemd team -Date: Tue, 8 Nov 2016 17:06:01 -0500 -Subject: [PATCH 1/3] inject millisec in syslog date - -Signed-off-by: Jim Somerville ---- - src/journal/journald-syslog.c | 48 +++++++++++++++++++++++++++++++++++++------ - 1 file changed, 42 insertions(+), 6 deletions(-) - -diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c -index 1a9db59..36288cb 100644 ---- a/src/journal/journald-syslog.c -+++ b/src/journal/journald-syslog.c -@@ -35,6 +35,44 @@ - /* Warn once every 30s if we missed syslog message */ - #define WARN_FORWARD_SYSLOG_MISSED_USEC (30 * USEC_PER_SEC) - -+/* internal function that builds a formatted time str of the -+ * tv parameter into the passed buffer. (ie Nov 7 16:28:38.109) -+ * If tv is NULL, then the clock function is used to build the formatted time -+ * returns (same as snprintf) - number of characters written to buffer. -+ */ -+static int formatSyslogDate(char * buffer, int bufLen, const struct timeval *tv) { -+ struct timeval tv_tmp; -+ long int millisec; -+ char tmpbuf[64]; -+ struct tm *tm; -+ time_t t; -+ -+ if (!tv) { -+ // no timeval input so get time data from clock -+ usec_t now_usec = now(CLOCK_REALTIME); -+ time_t now_sec = ((time_t) now_usec / USEC_PER_SEC); -+ long int now_fraction_secs = now_usec % USEC_PER_SEC; -+ tv_tmp.tv_sec = now_sec; -+ tv_tmp.tv_usec = now_fraction_secs; -+ tv = &tv_tmp; -+ } -+ -+ t = tv->tv_sec; -+ tm = localtime(&t); -+ if (!tm) -+ return 0; -+ -+ // format time to the second granularity - ie Nov 7 16:28:38 -+ if (strftime(tmpbuf,sizeof(tmpbuf),"%h %e %T", tm) <= 0) -+ return 0; -+ -+ millisec = tv->tv_usec / 1000; -+ // now append millisecond granularity (ie Nov 7 16:28:38.109) to -+ // the formatted string. -+ return snprintf(buffer, bufLen, "%s.%03lu", tmpbuf, millisec); -+} -+ -+ - static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, const struct ucred *ucred, const struct timeval *tv) { - - static const union sockaddr_union sa = { -@@ -145,13 +183,11 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons - xsprintf(header_priority, "<%i>", priority); - IOVEC_SET_STRING(iovec[n++], header_priority); - -+ - /* Second: timestamp */ -- t = tv ? tv->tv_sec : ((time_t) (now(CLOCK_REALTIME) / USEC_PER_SEC)); -- tm = localtime(&t); -- if (!tm) -- return; -- if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0) -- return; -+ if (formatSyslogDate(header_time, sizeof(header_time), tv) <=0 ) -+ return; -+ - IOVEC_SET_STRING(iovec[n++], header_time); - - /* Third: identifier and PID */ --- -1.8.3.1 - diff --git a/base/systemd/centos/patches/852-fix-build-error-for-unused-variable.patch b/base/systemd/centos/patches/852-fix-build-error-for-unused-variable.patch deleted file mode 100644 index 7de125485..000000000 --- a/base/systemd/centos/patches/852-fix-build-error-for-unused-variable.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7cc3363381f83bb060e8e686eb64b5425f2d4409 Mon Sep 17 00:00:00 2001 -Message-Id: <7cc3363381f83bb060e8e686eb64b5425f2d4409.1574264572.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com> -References: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com> -From: slin14 -Date: Thu, 9 Aug 2018 18:38:18 +0800 -Subject: [PATCH 2/3] fix build error for unused variable - -Signed-off-by: slin14 -Signed-off-by: Jim Somerville ---- - src/journal/journald-syslog.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c -index 36288cb..2e49b4c 100644 ---- a/src/journal/journald-syslog.c -+++ b/src/journal/journald-syslog.c -@@ -167,8 +167,6 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons - char header_priority[DECIMAL_STR_MAX(priority) + 3], header_time[64], - header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1]; - int n = 0; -- time_t t; -- struct tm *tm; - char *ident_buf = NULL; - - assert(s); --- -1.8.3.1 - diff --git a/base/systemd/centos/patches/853-Fix-compile-failure-due-to-deprecated-value.patch b/base/systemd/centos/patches/853-Fix-compile-failure-due-to-deprecated-value.patch deleted file mode 100644 index 11bad1bfd..000000000 --- a/base/systemd/centos/patches/853-Fix-compile-failure-due-to-deprecated-value.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 339ea8b005c037eaad217dfd3cc10b2b110bdd28 Mon Sep 17 00:00:00 2001 -Message-Id: <339ea8b005c037eaad217dfd3cc10b2b110bdd28.1574264572.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com> -References: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com> -From: Shuicheng Lin -Date: Tue, 2 Apr 2019 16:43:03 +0000 -Subject: [PATCH 3/3] Fix compile failure due to deprecated value - -Issue occur after upgrade build tool chain. Fix it per tool chain's -suggestion. -Error message is like below: -" -Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, -use MHD_HTTP_PAYLOAD_TOO_LARGE [-Werror] -Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, -use MHD_HTTP_NOT_ACCEPTABLE [-Werror] -" - -Signed-off-by: Shuicheng Lin -Signed-off-by: Mawrer Ramirez -Signed-off-by: Jim Somerville ---- - src/journal-remote/journal-gatewayd.c | 4 ++-- - src/journal-remote/journal-remote.c | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c -index d1f0ce3..8364044 100644 ---- a/src/journal-remote/journal-gatewayd.c -+++ b/src/journal-remote/journal-gatewayd.c -@@ -684,7 +684,7 @@ static int request_handler_file( - if (fstat(fd, &st) < 0) - return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n"); - -- response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0); -+ response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0); - if (!response) - return respond_oom(connection); - -@@ -824,7 +824,7 @@ static int request_handler( - assert(method); - - if (!streq(method, "GET")) -- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE, -+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE, - "Unsupported method.\n"); - - -diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c -index 431e283..476c826 100644 ---- a/src/journal-remote/journal-remote.c -+++ b/src/journal-remote/journal-remote.c -@@ -526,13 +526,13 @@ static int process_http_upload( - log_warning("Failed to process data for connection %p", connection); - if (r == -ENOBUFS) - return mhd_respondf(connection, -- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE, -+ MHD_HTTP_PAYLOAD_TOO_LARGE, - "Entry is too large, maximum is %u bytes.\n", - DATA_SIZE_MAX); - - else if (r == -E2BIG) - return mhd_respondf(connection, -- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE, -+ MHD_HTTP_PAYLOAD_TOO_LARGE, - "Entry with more fields than the maximum of %u\n", - ENTRY_FIELD_COUNT_MAX); - -@@ -586,7 +586,7 @@ static int request_handler( - *connection_cls); - - if (!streq(method, "POST")) -- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE, -+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE, - "Unsupported method.\n"); - - if (!streq(url, "/upload")) --- -1.8.3.1 - diff --git a/base/systemd/centos/patches/901-sd-event-don-t-touch-fd-s-accross-forks.patch b/base/systemd/centos/patches/901-sd-event-don-t-touch-fd-s-accross-forks.patch deleted file mode 100644 index 6a93bde91..000000000 --- a/base/systemd/centos/patches/901-sd-event-don-t-touch-fd-s-accross-forks.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 5de71cb7d887a569bfb987efdceda493338990bf Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Thu, 4 Jun 2015 16:54:45 +0200 -Subject: [PATCH 01/20] sd-event: don't touch fd's accross forks - -We protect most of the API from use accross forks, but we still allow both -sd_event and sd_event_source objects to be unref'ed. This would cause -problems as it would unregister sources from the underlying eventfd, hence -also affecting the original instance in the parent process. - -This fixes the issue by not touching the fds on unref when done accross a fork, -but still free the memory. - -This fixes a regression introduced by - "udevd: move main-loop to sd-event": 693d371d30fee - -where the worker processes were disabling the inotify event source in the -main daemon. - -[commit f68067348f58cd08d8f4f5325ce22f9a9d2c2140 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 9d48e5a..a84bfbb 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -474,6 +474,9 @@ static int source_io_unregister(sd_event_source *s) { - assert(s); - assert(s->type == SOURCE_IO); - -+ if (event_pid_changed(s->event)) -+ return 0; -+ - if (!s->io.registered) - return 0; - -@@ -604,6 +607,9 @@ static int event_update_signal_fd(sd_event *e) { - - assert(e); - -+ if (event_pid_changed(e)) -+ return 0; -+ - add_to_epoll = e->signal_fd < 0; - - r = signalfd(e->signal_fd, &e->sigset, SFD_NONBLOCK|SFD_CLOEXEC); --- -2.17.1 - diff --git a/base/systemd/centos/patches/902-sd-event-make-sure-RT-signals-are-not-dropped.patch b/base/systemd/centos/patches/902-sd-event-make-sure-RT-signals-are-not-dropped.patch deleted file mode 100644 index b66e0852f..000000000 --- a/base/systemd/centos/patches/902-sd-event-make-sure-RT-signals-are-not-dropped.patch +++ /dev/null @@ -1,815 +0,0 @@ -From 2976f3b959bef0e6f0a1f4d55d998c5d60e56b0d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 3 Sep 2015 20:13:09 +0200 -Subject: [PATCH 02/20] sd-event: make sure RT signals are not dropped - -RT signals operate in a queue, and we should be careful to never merge -two queued signals into one. Hence, makes sure we only ever dequeue a -single signal at a time and leave the remaining ones queued in the -signalfd. In order to implement correct priorities for the signals -introduce one signalfd per priority, so that we only process the highest -priority signal at a time. - -[commit 9da4cb2be260ed123f2676cb85cb350c527b1492 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 430 ++++++++++++++++++--------- - src/libsystemd/sd-event/test-event.c | 66 +++- - 2 files changed, 357 insertions(+), 139 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index a84bfbb..26ef3ea 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -56,9 +56,22 @@ typedef enum EventSourceType { - _SOURCE_EVENT_SOURCE_TYPE_INVALID = -1 - } EventSourceType; - -+/* All objects we use in epoll events start with this value, so that -+ * we know how to dispatch it */ -+typedef enum WakeupType { -+ WAKEUP_NONE, -+ WAKEUP_EVENT_SOURCE, -+ WAKEUP_CLOCK_DATA, -+ WAKEUP_SIGNAL_DATA, -+ _WAKEUP_TYPE_MAX, -+ _WAKEUP_TYPE_INVALID = -1, -+} WakeupType; -+ - #define EVENT_SOURCE_IS_TIME(t) IN_SET((t), SOURCE_TIME_REALTIME, SOURCE_TIME_BOOTTIME, SOURCE_TIME_MONOTONIC, SOURCE_TIME_REALTIME_ALARM, SOURCE_TIME_BOOTTIME_ALARM) - - struct sd_event_source { -+ WakeupType wakeup; -+ - unsigned n_ref; - - sd_event *event; -@@ -120,6 +133,7 @@ struct sd_event_source { - }; - - struct clock_data { -+ WakeupType wakeup; - int fd; - - /* For all clocks we maintain two priority queues each, one -@@ -136,11 +150,23 @@ struct clock_data { - bool needs_rearm:1; - }; - -+struct signal_data { -+ WakeupType wakeup; -+ -+ /* For each priority we maintain one signal fd, so that we -+ * only have to dequeue a single event per priority at a -+ * time. */ -+ -+ int fd; -+ int64_t priority; -+ sigset_t sigset; -+ sd_event_source *current; -+}; -+ - struct sd_event { - unsigned n_ref; - - int epoll_fd; -- int signal_fd; - int watchdog_fd; - - Prioq *pending; -@@ -157,8 +183,8 @@ struct sd_event { - - usec_t perturb; - -- sigset_t sigset; -- sd_event_source **signal_sources; -+ sd_event_source **signal_sources; /* indexed by signal number */ -+ Hashmap *signal_data; /* indexed by priority */ - - Hashmap *child_sources; - unsigned n_enabled_child_sources; -@@ -355,6 +381,7 @@ static int exit_prioq_compare(const void *a, const void *b) { - - static void free_clock_data(struct clock_data *d) { - assert(d); -+ assert(d->wakeup == WAKEUP_CLOCK_DATA); - - safe_close(d->fd); - prioq_free(d->earliest); -@@ -378,7 +405,6 @@ static void event_free(sd_event *e) { - *(e->default_event_ptr) = NULL; - - safe_close(e->epoll_fd); -- safe_close(e->signal_fd); - safe_close(e->watchdog_fd); - - free_clock_data(&e->realtime); -@@ -392,6 +418,7 @@ static void event_free(sd_event *e) { - prioq_free(e->exit); - - free(e->signal_sources); -+ hashmap_free(e->signal_data); - - hashmap_free(e->child_sources); - set_free(e->post_sources); -@@ -409,13 +436,12 @@ _public_ int sd_event_new(sd_event** ret) { - return -ENOMEM; - - e->n_ref = 1; -- e->signal_fd = e->watchdog_fd = e->epoll_fd = e->realtime.fd = e->boottime.fd = e->monotonic.fd = e->realtime_alarm.fd = e->boottime_alarm.fd = -1; -+ e->watchdog_fd = e->epoll_fd = e->realtime.fd = e->boottime.fd = e->monotonic.fd = e->realtime_alarm.fd = e->boottime_alarm.fd = -1; - e->realtime.next = e->boottime.next = e->monotonic.next = e->realtime_alarm.next = e->boottime_alarm.next = USEC_INFINITY; -+ e->realtime.wakeup = e->boottime.wakeup = e->monotonic.wakeup = e->realtime_alarm.wakeup = e->boottime_alarm.wakeup = WAKEUP_CLOCK_DATA; - e->original_pid = getpid(); - e->perturb = USEC_INFINITY; - -- assert_se(sigemptyset(&e->sigset) == 0); -- - e->pending = prioq_new(pending_prioq_compare); - if (!e->pending) { - r = -ENOMEM; -@@ -510,7 +536,6 @@ static int source_io_register( - r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_MOD, s->io.fd, &ev); - else - r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_ADD, s->io.fd, &ev); -- - if (r < 0) - return -errno; - -@@ -592,45 +617,171 @@ static struct clock_data* event_get_clock_data(sd_event *e, EventSourceType t) { - } - } - --static bool need_signal(sd_event *e, int signal) { -- return (e->signal_sources && e->signal_sources[signal] && -- e->signal_sources[signal]->enabled != SD_EVENT_OFF) -- || -- (signal == SIGCHLD && -- e->n_enabled_child_sources > 0); --} -+static int event_make_signal_data( -+ sd_event *e, -+ int sig, -+ struct signal_data **ret) { - --static int event_update_signal_fd(sd_event *e) { - struct epoll_event ev = {}; -- bool add_to_epoll; -+ struct signal_data *d; -+ bool added = false; -+ sigset_t ss_copy; -+ int64_t priority; - int r; - - assert(e); - - if (event_pid_changed(e)) -- return 0; -+ return -ECHILD; - -- add_to_epoll = e->signal_fd < 0; -+ if (e->signal_sources && e->signal_sources[sig]) -+ priority = e->signal_sources[sig]->priority; -+ else -+ priority = 0; - -- r = signalfd(e->signal_fd, &e->sigset, SFD_NONBLOCK|SFD_CLOEXEC); -- if (r < 0) -- return -errno; -+ d = hashmap_get(e->signal_data, &priority); -+ if (d) { -+ if (sigismember(&d->sigset, sig) > 0) { -+ if (ret) -+ *ret = d; -+ return 0; -+ } -+ } else { -+ r = hashmap_ensure_allocated(&e->signal_data, &uint64_hash_ops); -+ if (r < 0) -+ return r; -+ -+ d = new0(struct signal_data, 1); -+ if (!d) -+ return -ENOMEM; -+ -+ d->wakeup = WAKEUP_SIGNAL_DATA; -+ d->fd = -1; -+ d->priority = priority; -+ -+ r = hashmap_put(e->signal_data, &d->priority, d); -+ if (r < 0) -+ return r; - -- e->signal_fd = r; -+ added = true; -+ } -+ -+ ss_copy = d->sigset; -+ assert_se(sigaddset(&ss_copy, sig) >= 0); -+ -+ r = signalfd(d->fd, &ss_copy, SFD_NONBLOCK|SFD_CLOEXEC); -+ if (r < 0) { -+ r = -errno; -+ goto fail; -+ } -+ -+ d->sigset = ss_copy; - -- if (!add_to_epoll) -+ if (d->fd >= 0) { -+ if (ret) -+ *ret = d; - return 0; -+ } -+ -+ d->fd = r; - - ev.events = EPOLLIN; -- ev.data.ptr = INT_TO_PTR(SOURCE_SIGNAL); -+ ev.data.ptr = d; - -- r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, e->signal_fd, &ev); -- if (r < 0) { -- e->signal_fd = safe_close(e->signal_fd); -- return -errno; -+ r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, d->fd, &ev); -+ if (r < 0) { -+ r = -errno; -+ goto fail; - } - -+ if (ret) -+ *ret = d; -+ - return 0; -+ -+fail: -+ if (added) { -+ d->fd = safe_close(d->fd); -+ hashmap_remove(e->signal_data, &d->priority); -+ free(d); -+ } -+ -+ return r; -+} -+ -+static void event_unmask_signal_data(sd_event *e, struct signal_data *d, int sig) { -+ assert(e); -+ assert(d); -+ -+ /* Turns off the specified signal in the signal data -+ * object. If the signal mask of the object becomes empty that -+ * way removes it. */ -+ -+ if (sigismember(&d->sigset, sig) == 0) -+ return; -+ -+ assert_se(sigdelset(&d->sigset, sig) >= 0); -+ -+ if (sigisemptyset(&d->sigset)) { -+ -+ /* If all the mask is all-zero we can get rid of the structure */ -+ hashmap_remove(e->signal_data, &d->priority); -+ assert(!d->current); -+ safe_close(d->fd); -+ free(d); -+ return; -+ } -+ -+ assert(d->fd >= 0); -+ -+ if (signalfd(d->fd, &d->sigset, SFD_NONBLOCK|SFD_CLOEXEC) < 0) -+ log_debug_errno(errno, "Failed to unset signal bit, ignoring: %m"); -+} -+ -+static void event_gc_signal_data(sd_event *e, const int64_t *priority, int sig) { -+ struct signal_data *d; -+ static const int64_t zero_priority = 0; -+ -+ assert(e); -+ -+ /* Rechecks if the specified signal is still something we are -+ * interested in. If not, we'll unmask it, and possibly drop -+ * the signalfd for it. */ -+ -+ if (sig == SIGCHLD && -+ e->n_enabled_child_sources > 0) -+ return; -+ -+ if (e->signal_sources && -+ e->signal_sources[sig] && -+ e->signal_sources[sig]->enabled != SD_EVENT_OFF) -+ return; -+ -+ /* -+ * The specified signal might be enabled in three different queues: -+ * -+ * 1) the one that belongs to the priority passed (if it is non-NULL) -+ * 2) the one that belongs to the priority of the event source of the signal (if there is one) -+ * 3) the 0 priority (to cover the SIGCHLD case) -+ * -+ * Hence, let's remove it from all three here. -+ */ -+ -+ if (priority) { -+ d = hashmap_get(e->signal_data, priority); -+ if (d) -+ event_unmask_signal_data(e, d, sig); -+ } -+ -+ if (e->signal_sources && e->signal_sources[sig]) { -+ d = hashmap_get(e->signal_data, &e->signal_sources[sig]->priority); -+ if (d) -+ event_unmask_signal_data(e, d, sig); -+ } -+ -+ d = hashmap_get(e->signal_data, &zero_priority); -+ if (d) -+ event_unmask_signal_data(e, d, sig); - } - - static void source_disconnect(sd_event_source *s) { -@@ -669,17 +820,11 @@ static void source_disconnect(sd_event_source *s) { - - case SOURCE_SIGNAL: - if (s->signal.sig > 0) { -+ - if (s->event->signal_sources) - s->event->signal_sources[s->signal.sig] = NULL; - -- /* If the signal was on and now it is off... */ -- if (s->enabled != SD_EVENT_OFF && !need_signal(s->event, s->signal.sig)) { -- assert_se(sigdelset(&s->event->sigset, s->signal.sig) == 0); -- -- (void) event_update_signal_fd(s->event); -- /* If disabling failed, we might get a spurious event, -- * but otherwise nothing bad should happen. */ -- } -+ event_gc_signal_data(s->event, &s->priority, s->signal.sig); - } - - break; -@@ -689,18 +834,10 @@ static void source_disconnect(sd_event_source *s) { - if (s->enabled != SD_EVENT_OFF) { - assert(s->event->n_enabled_child_sources > 0); - s->event->n_enabled_child_sources--; -- -- /* We know the signal was on, if it is off now... */ -- if (!need_signal(s->event, SIGCHLD)) { -- assert_se(sigdelset(&s->event->sigset, SIGCHLD) == 0); -- -- (void) event_update_signal_fd(s->event); -- /* If disabling failed, we might get a spurious event, -- * but otherwise nothing bad should happen. */ -- } - } - -- hashmap_remove(s->event->child_sources, INT_TO_PTR(s->child.pid)); -+ (void) hashmap_remove(s->event->child_sources, INT_TO_PTR(s->child.pid)); -+ event_gc_signal_data(s->event, &s->priority, SIGCHLD); - } - - break; -@@ -779,6 +916,14 @@ static int source_set_pending(sd_event_source *s, bool b) { - d->needs_rearm = true; - } - -+ if (s->type == SOURCE_SIGNAL && !b) { -+ struct signal_data *d; -+ -+ d = hashmap_get(s->event->signal_data, &s->priority); -+ if (d && d->current == s) -+ d->current = NULL; -+ } -+ - return 0; - } - -@@ -828,6 +973,7 @@ _public_ int sd_event_add_io( - if (!s) - return -ENOMEM; - -+ s->wakeup = WAKEUP_EVENT_SOURCE; - s->io.fd = fd; - s->io.events = events; - s->io.callback = callback; -@@ -884,7 +1030,7 @@ static int event_setup_timer_fd( - return -errno; - - ev.events = EPOLLIN; -- ev.data.ptr = INT_TO_PTR(clock_to_event_source_type(clock)); -+ ev.data.ptr = d; - - r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, fd, &ev); - if (r < 0) { -@@ -994,9 +1140,9 @@ _public_ int sd_event_add_signal( - void *userdata) { - - sd_event_source *s; -+ struct signal_data *d; - sigset_t ss; - int r; -- bool previous; - - assert_return(e, -EINVAL); - assert_return(sig > 0, -EINVAL); -@@ -1021,8 +1167,6 @@ _public_ int sd_event_add_signal( - } else if (e->signal_sources[sig]) - return -EBUSY; - -- previous = need_signal(e, sig); -- - s = source_new(e, !ret, SOURCE_SIGNAL); - if (!s) - return -ENOMEM; -@@ -1034,14 +1178,10 @@ _public_ int sd_event_add_signal( - - e->signal_sources[sig] = s; - -- if (!previous) { -- assert_se(sigaddset(&e->sigset, sig) == 0); -- -- r = event_update_signal_fd(e); -- if (r < 0) { -- source_free(s); -- return r; -- } -+ r = event_make_signal_data(e, sig, &d); -+ if (r < 0) { -+ source_free(s); -+ return r; - } - - /* Use the signal name as description for the event source by default */ -@@ -1063,7 +1203,6 @@ _public_ int sd_event_add_child( - - sd_event_source *s; - int r; -- bool previous; - - assert_return(e, -EINVAL); - assert_return(pid > 1, -EINVAL); -@@ -1080,8 +1219,6 @@ _public_ int sd_event_add_child( - if (hashmap_contains(e->child_sources, INT_TO_PTR(pid))) - return -EBUSY; - -- previous = need_signal(e, SIGCHLD); -- - s = source_new(e, !ret, SOURCE_CHILD); - if (!s) - return -ENOMEM; -@@ -1100,14 +1237,11 @@ _public_ int sd_event_add_child( - - e->n_enabled_child_sources ++; - -- if (!previous) { -- assert_se(sigaddset(&e->sigset, SIGCHLD) == 0); -- -- r = event_update_signal_fd(e); -- if (r < 0) { -- source_free(s); -- return r; -- } -+ r = event_make_signal_data(e, SIGCHLD, NULL); -+ if (r < 0) { -+ e->n_enabled_child_sources--; -+ source_free(s); -+ return r; - } - - e->need_process_child = true; -@@ -1407,6 +1541,8 @@ _public_ int sd_event_source_get_priority(sd_event_source *s, int64_t *priority) - } - - _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority) { -+ int r; -+ - assert_return(s, -EINVAL); - assert_return(s->event->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(!event_pid_changed(s->event), -ECHILD); -@@ -1414,7 +1550,25 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority) - if (s->priority == priority) - return 0; - -- s->priority = priority; -+ if (s->type == SOURCE_SIGNAL && s->enabled != SD_EVENT_OFF) { -+ struct signal_data *old, *d; -+ -+ /* Move us from the signalfd belonging to the old -+ * priority to the signalfd of the new priority */ -+ -+ assert_se(old = hashmap_get(s->event->signal_data, &s->priority)); -+ -+ s->priority = priority; -+ -+ r = event_make_signal_data(s->event, s->signal.sig, &d); -+ if (r < 0) { -+ s->priority = old->priority; -+ return r; -+ } -+ -+ event_unmask_signal_data(s->event, old, s->signal.sig); -+ } else -+ s->priority = priority; - - if (s->pending) - prioq_reshuffle(s->event->pending, s, &s->pending_index); -@@ -1482,34 +1636,18 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - } - - case SOURCE_SIGNAL: -- assert(need_signal(s->event, s->signal.sig)); -- - s->enabled = m; - -- if (!need_signal(s->event, s->signal.sig)) { -- assert_se(sigdelset(&s->event->sigset, s->signal.sig) == 0); -- -- (void) event_update_signal_fd(s->event); -- /* If disabling failed, we might get a spurious event, -- * but otherwise nothing bad should happen. */ -- } -- -+ event_gc_signal_data(s->event, &s->priority, s->signal.sig); - break; - - case SOURCE_CHILD: -- assert(need_signal(s->event, SIGCHLD)); -- - s->enabled = m; - - assert(s->event->n_enabled_child_sources > 0); - s->event->n_enabled_child_sources--; - -- if (!need_signal(s->event, SIGCHLD)) { -- assert_se(sigdelset(&s->event->sigset, SIGCHLD) == 0); -- -- (void) event_update_signal_fd(s->event); -- } -- -+ event_gc_signal_data(s->event, &s->priority, SIGCHLD); - break; - - case SOURCE_EXIT: -@@ -1555,37 +1693,33 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - } - - case SOURCE_SIGNAL: -- /* Check status before enabling. */ -- if (!need_signal(s->event, s->signal.sig)) { -- assert_se(sigaddset(&s->event->sigset, s->signal.sig) == 0); -- -- r = event_update_signal_fd(s->event); -- if (r < 0) { -- s->enabled = SD_EVENT_OFF; -- return r; -- } -- } - - s->enabled = m; -+ -+ r = event_make_signal_data(s->event, s->signal.sig, NULL); -+ if (r < 0) { -+ s->enabled = SD_EVENT_OFF; -+ event_gc_signal_data(s->event, &s->priority, s->signal.sig); -+ return r; -+ } -+ - break; - - case SOURCE_CHILD: -- /* Check status before enabling. */ -- if (s->enabled == SD_EVENT_OFF) { -- if (!need_signal(s->event, SIGCHLD)) { -- assert_se(sigaddset(&s->event->sigset, s->signal.sig) == 0); -- -- r = event_update_signal_fd(s->event); -- if (r < 0) { -- s->enabled = SD_EVENT_OFF; -- return r; -- } -- } - -+ if (s->enabled == SD_EVENT_OFF) - s->event->n_enabled_child_sources++; -- } - - s->enabled = m; -+ -+ r = event_make_signal_data(s->event, s->signal.sig, SIGCHLD); -+ if (r < 0) { -+ s->enabled = SD_EVENT_OFF; -+ s->event->n_enabled_child_sources--; -+ event_gc_signal_data(s->event, &s->priority, SIGCHLD); -+ return r; -+ } -+ - break; - - case SOURCE_EXIT: -@@ -2029,20 +2163,35 @@ static int process_child(sd_event *e) { - return 0; - } - --static int process_signal(sd_event *e, uint32_t events) { -+static int process_signal(sd_event *e, struct signal_data *d, uint32_t events) { - bool read_one = false; - int r; - - assert(e); -- - assert_return(events == EPOLLIN, -EIO); - -+ /* If there's a signal queued on this priority and SIGCHLD is -+ on this priority too, then make sure to recheck the -+ children we watch. This is because we only ever dequeue -+ the first signal per priority, and if we dequeue one, and -+ SIGCHLD might be enqueued later we wouldn't know, but we -+ might have higher priority children we care about hence we -+ need to check that explicitly. */ -+ -+ if (sigismember(&d->sigset, SIGCHLD)) -+ e->need_process_child = true; -+ -+ /* If there's already an event source pending for this -+ * priority we don't read another */ -+ if (d->current) -+ return 0; -+ - for (;;) { - struct signalfd_siginfo si; - ssize_t n; - sd_event_source *s = NULL; - -- n = read(e->signal_fd, &si, sizeof(si)); -+ n = read(d->fd, &si, sizeof(si)); - if (n < 0) { - if (errno == EAGAIN || errno == EINTR) - return read_one; -@@ -2057,24 +2206,21 @@ static int process_signal(sd_event *e, uint32_t events) { - - read_one = true; - -- if (si.ssi_signo == SIGCHLD) { -- r = process_child(e); -- if (r < 0) -- return r; -- if (r > 0) -- continue; -- } -- - if (e->signal_sources) - s = e->signal_sources[si.ssi_signo]; -- - if (!s) - continue; -+ if (s->pending) -+ continue; - - s->signal.siginfo = si; -+ d->current = s; -+ - r = source_set_pending(s, true); - if (r < 0) - return r; -+ -+ return 1; - } - } - -@@ -2393,23 +2539,31 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { - - for (i = 0; i < m; i++) { - -- if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_REALTIME)) -- r = flush_timer(e, e->realtime.fd, ev_queue[i].events, &e->realtime.next); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_BOOTTIME)) -- r = flush_timer(e, e->boottime.fd, ev_queue[i].events, &e->boottime.next); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_MONOTONIC)) -- r = flush_timer(e, e->monotonic.fd, ev_queue[i].events, &e->monotonic.next); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_REALTIME_ALARM)) -- r = flush_timer(e, e->realtime_alarm.fd, ev_queue[i].events, &e->realtime_alarm.next); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_BOOTTIME_ALARM)) -- r = flush_timer(e, e->boottime_alarm.fd, ev_queue[i].events, &e->boottime_alarm.next); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_SIGNAL)) -- r = process_signal(e, ev_queue[i].events); -- else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_WATCHDOG)) -+ if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_WATCHDOG)) - r = flush_timer(e, e->watchdog_fd, ev_queue[i].events, NULL); -- else -- r = process_io(e, ev_queue[i].data.ptr, ev_queue[i].events); -+ else { -+ WakeupType *t = ev_queue[i].data.ptr; -+ -+ switch (*t) { -+ -+ case WAKEUP_EVENT_SOURCE: -+ r = process_io(e, ev_queue[i].data.ptr, ev_queue[i].events); -+ break; - -+ case WAKEUP_CLOCK_DATA: { -+ struct clock_data *d = ev_queue[i].data.ptr; -+ r = flush_timer(e, d->fd, ev_queue[i].events, &d->next); -+ break; -+ } -+ -+ case WAKEUP_SIGNAL_DATA: -+ r = process_signal(e, ev_queue[i].data.ptr, ev_queue[i].events); -+ break; -+ -+ default: -+ assert_not_reached("Invalid wake-up pointer"); -+ } -+ } - if (r < 0) - goto finish; - } -diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c -index 721700b..6bb1420 100644 ---- a/src/libsystemd/sd-event/test-event.c -+++ b/src/libsystemd/sd-event/test-event.c -@@ -160,7 +160,7 @@ static int exit_handler(sd_event_source *s, void *userdata) { - return 3; - } - --int main(int argc, char *argv[]) { -+static void test_basic(void) { - sd_event *e = NULL; - sd_event_source *w = NULL, *x = NULL, *y = NULL, *z = NULL, *q = NULL, *t = NULL; - static const char ch = 'x'; -@@ -248,6 +248,70 @@ int main(int argc, char *argv[]) { - safe_close_pair(b); - safe_close_pair(d); - safe_close_pair(k); -+} -+ -+static int last_rtqueue_sigval = 0; -+static int n_rtqueue = 0; -+ -+static int rtqueue_handler(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata) { -+ last_rtqueue_sigval = si->ssi_int; -+ n_rtqueue ++; -+ return 0; -+} -+ -+static void test_rtqueue(void) { -+ sd_event_source *u = NULL, *v = NULL, *s = NULL; -+ sd_event *e = NULL; -+ -+ assert_se(sd_event_default(&e) >= 0); -+ -+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+2, SIGRTMIN+3, SIGUSR2, -1) >= 0); -+ assert_se(sd_event_add_signal(e, &u, SIGRTMIN+2, rtqueue_handler, NULL) >= 0); -+ assert_se(sd_event_add_signal(e, &v, SIGRTMIN+3, rtqueue_handler, NULL) >= 0); -+ assert_se(sd_event_add_signal(e, &s, SIGUSR2, rtqueue_handler, NULL) >= 0); -+ -+ assert_se(sd_event_source_set_priority(v, -10) >= 0); -+ -+ assert(sigqueue(getpid(), SIGRTMIN+2, (union sigval) { .sival_int = 1 }) >= 0); -+ assert(sigqueue(getpid(), SIGRTMIN+3, (union sigval) { .sival_int = 2 }) >= 0); -+ assert(sigqueue(getpid(), SIGUSR2, (union sigval) { .sival_int = 3 }) >= 0); -+ assert(sigqueue(getpid(), SIGRTMIN+3, (union sigval) { .sival_int = 4 }) >= 0); -+ assert(sigqueue(getpid(), SIGUSR2, (union sigval) { .sival_int = 5 }) >= 0); -+ -+ assert_se(n_rtqueue == 0); -+ assert_se(last_rtqueue_sigval == 0); -+ -+ assert_se(sd_event_run(e, (uint64_t) -1) >= 1); -+ assert_se(n_rtqueue == 1); -+ assert_se(last_rtqueue_sigval == 2); /* first SIGRTMIN+3 */ -+ -+ assert_se(sd_event_run(e, (uint64_t) -1) >= 1); -+ assert_se(n_rtqueue == 2); -+ assert_se(last_rtqueue_sigval == 4); /* second SIGRTMIN+3 */ -+ -+ assert_se(sd_event_run(e, (uint64_t) -1) >= 1); -+ assert_se(n_rtqueue == 3); -+ assert_se(last_rtqueue_sigval == 3); /* first SIGUSR2 */ -+ -+ assert_se(sd_event_run(e, (uint64_t) -1) >= 1); -+ assert_se(n_rtqueue == 4); -+ assert_se(last_rtqueue_sigval == 1); /* SIGRTMIN+2 */ -+ -+ assert_se(sd_event_run(e, 0) == 0); /* the other SIGUSR2 is dropped, because the first one was still queued */ -+ assert_se(n_rtqueue == 4); -+ assert_se(last_rtqueue_sigval == 1); -+ -+ sd_event_source_unref(u); -+ sd_event_source_unref(v); -+ sd_event_source_unref(s); -+ -+ sd_event_unref(e); -+} -+ -+int main(int argc, char *argv[]) { -+ -+ test_basic(); -+ test_rtqueue(); - - return 0; - } --- -2.17.1 - diff --git a/base/systemd/centos/patches/903-sd-event-split-out-helper-functions-for-reshuffling-.patch b/base/systemd/centos/patches/903-sd-event-split-out-helper-functions-for-reshuffling-.patch deleted file mode 100644 index 488463e2f..000000000 --- a/base/systemd/centos/patches/903-sd-event-split-out-helper-functions-for-reshuffling-.patch +++ /dev/null @@ -1,216 +0,0 @@ -From ea762f1c0206c99d2ba4d3cba41cadf70311a3cc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= -Date: Fri, 23 Oct 2020 18:29:27 +0200 -Subject: [PATCH 03/20] sd-event: split out helper functions for reshuffling - prioqs - -We typically don't just reshuffle a single prioq at once, but always -two. Let's add two helper functions that do this, and reuse them -everywhere. - -(Note that this drops one minor optimization: -sd_event_source_set_time_accuracy() previously only reshuffled the -"latest" prioq, since changing the accuracy has no effect on the -earliest time of an event source, just the latest time an event source -can run. This optimization is removed to simplify things, given that -it's not really worth the effort as prioq_reshuffle() on properly -ordered prioqs has practically zero cost O(1)). - -(Slightly generalized, commented and split out of #17284 by Lennart) - -(cherry picked from commit e1951c16a8fbe5b0b9ecc08f4f835a806059d28f) - -Related: #1819868 - -[commit 4ce10f8e41a85a56ad9b805442eb1149ece7c82a from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 96 ++++++++++++------------------ - 1 file changed, 38 insertions(+), 58 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 26ef3ea..eb3182f 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -784,6 +784,33 @@ static void event_gc_signal_data(sd_event *e, const int64_t *priority, int sig) - event_unmask_signal_data(e, d, sig); - } - -+static void event_source_pp_prioq_reshuffle(sd_event_source *s) { -+ assert(s); -+ -+ /* Reshuffles the pending + prepare prioqs. Called whenever the dispatch order changes, i.e. when -+ * they are enabled/disabled or marked pending and such. */ -+ -+ if (s->pending) -+ prioq_reshuffle(s->event->pending, s, &s->pending_index); -+ -+ if (s->prepare) -+ prioq_reshuffle(s->event->prepare, s, &s->prepare_index); -+} -+ -+static void event_source_time_prioq_reshuffle(sd_event_source *s) { -+ struct clock_data *d; -+ -+ assert(s); -+ assert(EVENT_SOURCE_IS_TIME(s->type)); -+ -+ /* Called whenever the event source's timer ordering properties changed, i.e. time, accuracy, -+ * pending, enable state. Makes sure the two prioq's are ordered properly again. */ -+ assert_se(d = event_get_clock_data(s->event, s->type)); -+ prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -+ prioq_reshuffle(d->latest, s, &s->time.latest_index); -+ d->needs_rearm = true; -+} -+ - static void source_disconnect(sd_event_source *s) { - sd_event *event; - -@@ -905,16 +932,8 @@ static int source_set_pending(sd_event_source *s, bool b) { - } else - assert_se(prioq_remove(s->event->pending, s, &s->pending_index)); - -- if (EVENT_SOURCE_IS_TIME(s->type)) { -- struct clock_data *d; -- -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -- } -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ event_source_time_prioq_reshuffle(s); - - if (s->type == SOURCE_SIGNAL && !b) { - struct signal_data *d; -@@ -1570,11 +1589,7 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority) - } else - s->priority = priority; - -- if (s->pending) -- prioq_reshuffle(s->event->pending, s, &s->pending_index); -- -- if (s->prepare) -- prioq_reshuffle(s->event->prepare, s, &s->prepare_index); -+ event_source_pp_prioq_reshuffle(s); - - if (s->type == SOURCE_EXIT) - prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -@@ -1622,18 +1637,10 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - case SOURCE_TIME_BOOTTIME: - case SOURCE_TIME_MONOTONIC: - case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: { -- struct clock_data *d; -- -+ case SOURCE_TIME_BOOTTIME_ALARM: - s->enabled = m; -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -+ event_source_time_prioq_reshuffle(s); - break; -- } - - case SOURCE_SIGNAL: - s->enabled = m; -@@ -1679,18 +1686,10 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - case SOURCE_TIME_BOOTTIME: - case SOURCE_TIME_MONOTONIC: - case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: { -- struct clock_data *d; -- -+ case SOURCE_TIME_BOOTTIME_ALARM: - s->enabled = m; -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -+ event_source_time_prioq_reshuffle(s); - break; -- } - - case SOURCE_SIGNAL: - -@@ -1737,11 +1736,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - } - } - -- if (s->pending) -- prioq_reshuffle(s->event->pending, s, &s->pending_index); -- -- if (s->prepare) -- prioq_reshuffle(s->event->prepare, s, &s->prepare_index); -+ event_source_pp_prioq_reshuffle(s); - - return 0; - } -@@ -1757,7 +1752,6 @@ _public_ int sd_event_source_get_time(sd_event_source *s, uint64_t *usec) { - } - - _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) { -- struct clock_data *d; - - assert_return(s, -EINVAL); - assert_return(usec != (uint64_t) -1, -EINVAL); -@@ -1769,13 +1763,7 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) { - - source_set_pending(s, false); - -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -- -+ event_source_time_prioq_reshuffle(s); - return 0; - } - -@@ -1790,7 +1778,6 @@ _public_ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *use - } - - _public_ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec) { -- struct clock_data *d; - - assert_return(s, -EINVAL); - assert_return(usec != (uint64_t) -1, -EINVAL); -@@ -1805,12 +1792,7 @@ _public_ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec - - source_set_pending(s, false); - -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -- -+ event_source_time_prioq_reshuffle(s); - return 0; - } - -@@ -2088,9 +2070,7 @@ static int process_timer( - if (r < 0) - return r; - -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -+ event_source_time_prioq_reshuffle(s); - } - - return 0; --- -2.17.1 - diff --git a/base/systemd/centos/patches/904-sd-event-drop-pending-events-when-we-turn-off-on-an-.patch b/base/systemd/centos/patches/904-sd-event-drop-pending-events-when-we-turn-off-on-an-.patch deleted file mode 100644 index e53b00c16..000000000 --- a/base/systemd/centos/patches/904-sd-event-drop-pending-events-when-we-turn-off-on-an-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 76969d09522ca2ab58bc157eb9ce357af5677f3a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 25 May 2018 17:06:39 +0200 -Subject: [PATCH 04/20] sd-event: drop pending events when we turn off/on an - event source - -[commit ac989a783a31df95e6c0ce2a90a8d2e1abe73592 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index eb3182f..6e93059 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1623,6 +1623,13 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - - if (m == SD_EVENT_OFF) { - -+ /* Unset the pending flag when this event source is disabled */ -+ if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ r = source_set_pending(s, false); -+ if (r < 0) -+ return r; -+ } -+ - switch (s->type) { - - case SOURCE_IO: -@@ -1672,6 +1679,14 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - } - - } else { -+ -+ /* Unset the pending flag when this event source is enabled */ -+ if (s->enabled == SD_EVENT_OFF && !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ r = source_set_pending(s, false); -+ if (r < 0) -+ return r; -+ } -+ - switch (s->type) { - - case SOURCE_IO: --- -2.17.1 - diff --git a/base/systemd/centos/patches/905-sd-event-fix-call-to-event_make_signal_data.patch b/base/systemd/centos/patches/905-sd-event-fix-call-to-event_make_signal_data.patch deleted file mode 100644 index 68c62d8ce..000000000 --- a/base/systemd/centos/patches/905-sd-event-fix-call-to-event_make_signal_data.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7380d2cca8bda0f8c821645f8a5ddb8ac47aec46 Mon Sep 17 00:00:00 2001 -From: Thomas Hindoe Paaboel Andersen -Date: Sun, 6 Sep 2015 22:06:45 +0200 -Subject: [PATCH 05/20] sd-event: fix call to event_make_signal_data - -This looks like a typo from commit 9da4cb2b where it was added. - -[commit b8a50a99a6e158a5b3ceacf0764dbe9f42558f3e from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 6e93059..7c33dcd 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1726,7 +1726,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - - s->enabled = m; - -- r = event_make_signal_data(s->event, s->signal.sig, SIGCHLD); -+ r = event_make_signal_data(s->event, s->signal.sig, NULL); - if (r < 0) { - s->enabled = SD_EVENT_OFF; - s->event->n_enabled_child_sources--; --- -2.17.1 - diff --git a/base/systemd/centos/patches/906-sd-event-make-sure-to-create-a-signal-queue-for-the-.patch b/base/systemd/centos/patches/906-sd-event-make-sure-to-create-a-signal-queue-for-the-.patch deleted file mode 100644 index 2ab52989c..000000000 --- a/base/systemd/centos/patches/906-sd-event-make-sure-to-create-a-signal-queue-for-the-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0a2519a5ab04e775115c90039d30bdc576a79c06 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Sep 2015 00:31:24 +0200 -Subject: [PATCH 06/20] sd-event: make sure to create a signal queue for the - right signal - -We should never access the "signal" part of the event source unless the -event source is actually for a signal. In this case it's a child pid -handler however, hence make sure to use the right signal. - -This is a fix for PR #1177, which in turn was a fix for -9da4cb2be260ed123f2676cb85cb350c527b1492. - -[commit 10edebf6cd69cfbe0d38dbaf5478264fbb60a51e from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 7c33dcd..2f5ff23 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1726,7 +1726,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - - s->enabled = m; - -- r = event_make_signal_data(s->event, s->signal.sig, NULL); -+ r = event_make_signal_data(s->event, SIGCHLD, NULL); - if (r < 0) { - s->enabled = SD_EVENT_OFF; - s->event->n_enabled_child_sources--; --- -2.17.1 - diff --git a/base/systemd/centos/patches/907-sd-event-split-out-enable-and-disable-codepaths-from.patch b/base/systemd/centos/patches/907-sd-event-split-out-enable-and-disable-codepaths-from.patch deleted file mode 100644 index a52d8c95e..000000000 --- a/base/systemd/centos/patches/907-sd-event-split-out-enable-and-disable-codepaths-from.patch +++ /dev/null @@ -1,315 +0,0 @@ -From 477bbfd4f5012613144c5ba5517aa8de1f300da6 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 23 Oct 2020 21:21:58 +0200 -Subject: [PATCH 07/20] sd-event: split out enable and disable codepaths from - sd_event_source_set_enabled() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -So far half of sd_event_source_set_enabled() was doing enabling, the -other half was doing disabling. Let's split that into two separate -calls. - -(This also adds a new shortcut to sd_event_source_set_enabled(): if the -caller toggles between "ON" and "ONESHOT" we'll now shortcut this, since -the event source is already enabled in that case and shall remain -enabled.) - -This heavily borrows and is inspired from Michal Sekletár's #17284 -refactoring. - -(cherry picked from commit ddfde737b546c17e54182028153aa7f7e78804e3) - -Related: #1819868 - -[commit d7ad6ad123200f562081ff09f7bed3c6d969ac0a from -https://github.com/systemd-rhel/rhel-8/ - -LZ: Dropped SOURCE_INOTIFY related parts because it hasn't been added -in this systemd version.] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 224 +++++++++++++++-------------- - 1 file changed, 118 insertions(+), 106 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 2f5ff23..2e07478 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1606,153 +1606,165 @@ _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) { - return 0; - } - --_public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { -+static int event_source_disable(sd_event_source *s) { - int r; - -- assert_return(s, -EINVAL); -- assert_return(m == SD_EVENT_OFF || m == SD_EVENT_ON || m == SD_EVENT_ONESHOT, -EINVAL); -- assert_return(!event_pid_changed(s->event), -ECHILD); -+ assert(s); -+ assert(s->enabled != SD_EVENT_OFF); - -- /* If we are dead anyway, we are fine with turning off -- * sources, but everything else needs to fail. */ -- if (s->event->state == SD_EVENT_FINISHED) -- return m == SD_EVENT_OFF ? 0 : -ESTALE; -+ /* Unset the pending flag when this event source is disabled */ -+ if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ r = source_set_pending(s, false); -+ if (r < 0) -+ return r; -+ } - -- if (s->enabled == m) -- return 0; -+ s->enabled = SD_EVENT_OFF; - -- if (m == SD_EVENT_OFF) { -+ switch (s->type) { - -- /* Unset the pending flag when this event source is disabled */ -- if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -- r = source_set_pending(s, false); -- if (r < 0) -- return r; -- } -+ case SOURCE_IO: -+ source_io_unregister(s); -+ break; - -- switch (s->type) { -+ case SOURCE_TIME_REALTIME: -+ case SOURCE_TIME_BOOTTIME: -+ case SOURCE_TIME_MONOTONIC: -+ case SOURCE_TIME_REALTIME_ALARM: -+ case SOURCE_TIME_BOOTTIME_ALARM: -+ event_source_time_prioq_reshuffle(s); -+ break; - -- case SOURCE_IO: -- r = source_io_unregister(s); -- if (r < 0) -- return r; -+ case SOURCE_SIGNAL: -+ event_gc_signal_data(s->event, &s->priority, s->signal.sig); -+ break; - -- s->enabled = m; -- break; -+ case SOURCE_CHILD: -+ assert(s->event->n_enabled_child_sources > 0); -+ s->event->n_enabled_child_sources--; - -- case SOURCE_TIME_REALTIME: -- case SOURCE_TIME_BOOTTIME: -- case SOURCE_TIME_MONOTONIC: -- case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: -- s->enabled = m; -- event_source_time_prioq_reshuffle(s); -- break; -+ event_gc_signal_data(s->event, &s->priority, SIGCHLD); -+ break; - -- case SOURCE_SIGNAL: -- s->enabled = m; -+ case SOURCE_EXIT: -+ prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -+ break; - -- event_gc_signal_data(s->event, &s->priority, s->signal.sig); -- break; -+ case SOURCE_DEFER: -+ case SOURCE_POST: -+ break; - -- case SOURCE_CHILD: -- s->enabled = m; -+ default: -+ assert_not_reached("Wut? I shouldn't exist."); -+ } - -- assert(s->event->n_enabled_child_sources > 0); -- s->event->n_enabled_child_sources--; -+ return 0; -+} - -- event_gc_signal_data(s->event, &s->priority, SIGCHLD); -- break; -+static int event_source_enable(sd_event_source *s, int m) { -+ int r; - -- case SOURCE_EXIT: -- s->enabled = m; -- prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -- break; -+ assert(s); -+ assert(IN_SET(m, SD_EVENT_ON, SD_EVENT_ONESHOT)); -+ assert(s->enabled == SD_EVENT_OFF); - -- case SOURCE_DEFER: -- case SOURCE_POST: -- s->enabled = m; -- break; -+ /* Unset the pending flag when this event source is enabled */ -+ if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ r = source_set_pending(s, false); -+ if (r < 0) -+ return r; -+ } - -- default: -- assert_not_reached("Wut? I shouldn't exist."); -- } -+ s->enabled = m; - -- } else { -+ switch (s->type) { - -- /* Unset the pending flag when this event source is enabled */ -- if (s->enabled == SD_EVENT_OFF && !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -- r = source_set_pending(s, false); -- if (r < 0) -- return r; -+ case SOURCE_IO: -+ r = source_io_register(s, m, s->io.events); -+ if (r < 0) { -+ s->enabled = SD_EVENT_OFF; -+ return r; - } - -- switch (s->type) { -+ break; - -- case SOURCE_IO: -- r = source_io_register(s, m, s->io.events); -- if (r < 0) -- return r; -+ case SOURCE_TIME_REALTIME: -+ case SOURCE_TIME_BOOTTIME: -+ case SOURCE_TIME_MONOTONIC: -+ case SOURCE_TIME_REALTIME_ALARM: -+ case SOURCE_TIME_BOOTTIME_ALARM: -+ event_source_time_prioq_reshuffle(s); -+ break; - -- s->enabled = m; -- break; -+ case SOURCE_SIGNAL: -+ r = event_make_signal_data(s->event, s->signal.sig, NULL); -+ if (r < 0) { -+ s->enabled = SD_EVENT_OFF; -+ event_gc_signal_data(s->event, &s->priority, s->signal.sig); -+ return r; -+ } - -- case SOURCE_TIME_REALTIME: -- case SOURCE_TIME_BOOTTIME: -- case SOURCE_TIME_MONOTONIC: -- case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: -- s->enabled = m; -- event_source_time_prioq_reshuffle(s); -- break; -+ break; - -- case SOURCE_SIGNAL: -+ case SOURCE_CHILD: -+ s->event->n_enabled_child_sources++; - -- s->enabled = m; -+ r = event_make_signal_data(s->event, SIGCHLD, NULL); -+ if (r < 0) { -+ s->enabled = SD_EVENT_OFF; -+ s->event->n_enabled_child_sources--; -+ event_gc_signal_data(s->event, &s->priority, SIGCHLD); -+ return r; -+ } - -- r = event_make_signal_data(s->event, s->signal.sig, NULL); -- if (r < 0) { -- s->enabled = SD_EVENT_OFF; -- event_gc_signal_data(s->event, &s->priority, s->signal.sig); -- return r; -- } - -- break; -+ break; - -- case SOURCE_CHILD: -+ case SOURCE_EXIT: -+ prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -+ break; - -- if (s->enabled == SD_EVENT_OFF) -- s->event->n_enabled_child_sources++; -+ case SOURCE_DEFER: -+ case SOURCE_POST: -+ break; - -- s->enabled = m; -+ default: -+ assert_not_reached("Wut? I shouldn't exist."); -+ } - -- r = event_make_signal_data(s->event, SIGCHLD, NULL); -- if (r < 0) { -- s->enabled = SD_EVENT_OFF; -- s->event->n_enabled_child_sources--; -- event_gc_signal_data(s->event, &s->priority, SIGCHLD); -- return r; -- } -+ return 0; -+} - -- break; -+_public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { -+ int r; - -- case SOURCE_EXIT: -- s->enabled = m; -- prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -- break; -+ assert_return(s, -EINVAL); -+ assert_return(IN_SET(m, SD_EVENT_OFF, SD_EVENT_ON, SD_EVENT_ONESHOT), -EINVAL); -+ assert_return(!event_pid_changed(s->event), -ECHILD); - -- case SOURCE_DEFER: -- case SOURCE_POST: -- s->enabled = m; -- break; -+ /* If we are dead anyway, we are fine with turning off sources, but everything else needs to fail. */ -+ if (s->event->state == SD_EVENT_FINISHED) -+ return m == SD_EVENT_OFF ? 0 : -ESTALE; - -- default: -- assert_not_reached("Wut? I shouldn't exist."); -+ if (s->enabled == m) /* No change? */ -+ return 0; -+ -+ if (m == SD_EVENT_OFF) -+ r = event_source_disable(s); -+ else { -+ if (s->enabled != SD_EVENT_OFF) { -+ /* Switching from "on" to "oneshot" or back? If that's the case, we can take a shortcut, the -+ * event source is already enabled after all. */ -+ s->enabled = m; -+ return 0; - } -+ -+ r = event_source_enable(s, m); - } -+ if (r < 0) -+ return r; - - event_source_pp_prioq_reshuffle(s); -- - return 0; - } - --- -2.17.1 - diff --git a/base/systemd/centos/patches/908-sd-event-use-prioq_ensure_allocated-where-possible.patch b/base/systemd/centos/patches/908-sd-event-use-prioq_ensure_allocated-where-possible.patch deleted file mode 100644 index 54ae04b64..000000000 --- a/base/systemd/centos/patches/908-sd-event-use-prioq_ensure_allocated-where-possible.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 5e365321f3006d44f57bb27ff9de96ca01c1104a Mon Sep 17 00:00:00 2001 -From: Evgeny Vereshchagin -Date: Sun, 22 Nov 2015 06:41:31 +0000 -Subject: [PATCH 08/20] sd-event: use prioq_ensure_allocated where possible - -[commit c983e776c4e7e2ea6e1990123d215e639deb353b from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 30 +++++++++++------------------- - 1 file changed, 11 insertions(+), 19 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 2e07478..7074520 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -442,11 +442,9 @@ _public_ int sd_event_new(sd_event** ret) { - e->original_pid = getpid(); - e->perturb = USEC_INFINITY; - -- e->pending = prioq_new(pending_prioq_compare); -- if (!e->pending) { -- r = -ENOMEM; -+ r = prioq_ensure_allocated(&e->pending, pending_prioq_compare); -+ if (r < 0) - goto fail; -- } - - e->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (e->epoll_fd < 0) { -@@ -1096,17 +1094,13 @@ _public_ int sd_event_add_time( - d = event_get_clock_data(e, type); - assert(d); - -- if (!d->earliest) { -- d->earliest = prioq_new(earliest_time_prioq_compare); -- if (!d->earliest) -- return -ENOMEM; -- } -+ r = prioq_ensure_allocated(&d->earliest, earliest_time_prioq_compare); -+ if (r < 0) -+ return r; - -- if (!d->latest) { -- d->latest = prioq_new(latest_time_prioq_compare); -- if (!d->latest) -- return -ENOMEM; -- } -+ r = prioq_ensure_allocated(&d->latest, latest_time_prioq_compare); -+ if (r < 0) -+ return r; - - if (d->fd < 0) { - r = event_setup_timer_fd(e, d, clock); -@@ -1357,11 +1351,9 @@ _public_ int sd_event_add_exit( - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(!event_pid_changed(e), -ECHILD); - -- if (!e->exit) { -- e->exit = prioq_new(exit_prioq_compare); -- if (!e->exit) -- return -ENOMEM; -- } -+ r = prioq_ensure_allocated(&e->exit, exit_prioq_compare); -+ if (r < 0) -+ return r; - - s = source_new(e, !ret, SOURCE_EXIT); - if (!s) --- -2.17.1 - diff --git a/base/systemd/centos/patches/909-sd-event-split-clock-data-allocation-out-of-sd_event.patch b/base/systemd/centos/patches/909-sd-event-split-clock-data-allocation-out-of-sd_event.patch deleted file mode 100644 index 4e0114122..000000000 --- a/base/systemd/centos/patches/909-sd-event-split-clock-data-allocation-out-of-sd_event.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 77b772bce846db28dc447420fd380a51eadcde15 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Nov 2020 11:40:24 +0100 -Subject: [PATCH 09/20] sd-event: split clock data allocation out of - sd_event_add_time() - -Just some simple refactoring, that will make things easier for us later. -But it looks better this way even without the later function reuse. - -(cherry picked from commit 41c63f36c3352af8bebf03b6181f5d866431d0af) - -Related: #1819868 - -[commit 6cc0022115afbac9ac66c456b140601d90271687 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 34 ++++++++++++++++++++---------- - 1 file changed, 23 insertions(+), 11 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 7074520..8e6536f 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1065,6 +1065,28 @@ static int time_exit_callback(sd_event_source *s, uint64_t usec, void *userdata) - return sd_event_exit(sd_event_source_get_event(s), PTR_TO_INT(userdata)); - } - -+static int setup_clock_data(sd_event *e, struct clock_data *d, clockid_t clock) { -+ int r; -+ -+ assert(d); -+ -+ if (d->fd < 0) { -+ r = event_setup_timer_fd(e, d, clock); -+ if (r < 0) -+ return r; -+ } -+ -+ r = prioq_ensure_allocated(&d->earliest, earliest_time_prioq_compare); -+ if (r < 0) -+ return r; -+ -+ r = prioq_ensure_allocated(&d->latest, latest_time_prioq_compare); -+ if (r < 0) -+ return r; -+ -+ return 0; -+} -+ - _public_ int sd_event_add_time( - sd_event *e, - sd_event_source **ret, -@@ -1094,20 +1116,10 @@ _public_ int sd_event_add_time( - d = event_get_clock_data(e, type); - assert(d); - -- r = prioq_ensure_allocated(&d->earliest, earliest_time_prioq_compare); -- if (r < 0) -- return r; -- -- r = prioq_ensure_allocated(&d->latest, latest_time_prioq_compare); -+ r = setup_clock_data(e, d, clock); - if (r < 0) - return r; - -- if (d->fd < 0) { -- r = event_setup_timer_fd(e, d, clock); -- if (r < 0) -- return r; -- } -- - s = source_new(e, !ret, type); - if (!s) - return -ENOMEM; --- -2.17.1 - diff --git a/base/systemd/centos/patches/910-sd-event-split-out-code-to-add-remove-timer-event-so.patch b/base/systemd/centos/patches/910-sd-event-split-out-code-to-add-remove-timer-event-so.patch deleted file mode 100644 index f92e6a173..000000000 --- a/base/systemd/centos/patches/910-sd-event-split-out-code-to-add-remove-timer-event-so.patch +++ /dev/null @@ -1,120 +0,0 @@ -From dad1d000b493f98f4f5eaf4bfa34c8617f41970f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Nov 2020 15:25:35 +0100 -Subject: [PATCH 10/20] sd-event: split out code to add/remove timer event - sources to earliest/latest prioq - -Just some refactoring that makes code prettier, and will come handy -later, because we can reuse these functions at more places. - -(cherry picked from commit 1e45e3fecc303e7ae9946220c742f69675e99c34) - -Related: #1819868 - -[commit 88b2618e4de850060a1c5c22b049e6de0578fbb5 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 57 +++++++++++++++++++++--------- - 1 file changed, 41 insertions(+), 16 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 8e6536f..e0e0eaa 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -809,6 +809,19 @@ static void event_source_time_prioq_reshuffle(sd_event_source *s) { - d->needs_rearm = true; - } - -+static void event_source_time_prioq_remove( -+ sd_event_source *s, -+ struct clock_data *d) { -+ -+ assert(s); -+ assert(d); -+ -+ prioq_remove(d->earliest, s, &s->time.earliest_index); -+ prioq_remove(d->latest, s, &s->time.latest_index); -+ s->time.earliest_index = s->time.latest_index = PRIOQ_IDX_NULL; -+ d->needs_rearm = true; -+} -+ - static void source_disconnect(sd_event_source *s) { - sd_event *event; - -@@ -833,13 +846,8 @@ static void source_disconnect(sd_event_source *s) { - case SOURCE_TIME_REALTIME_ALARM: - case SOURCE_TIME_BOOTTIME_ALARM: { - struct clock_data *d; -- -- d = event_get_clock_data(s->event, s->type); -- assert(d); -- -- prioq_remove(d->earliest, s, &s->time.earliest_index); -- prioq_remove(d->latest, s, &s->time.latest_index); -- d->needs_rearm = true; -+ assert_se(d = event_get_clock_data(s->event, s->type)); -+ event_source_time_prioq_remove(s, d); - break; - } - -@@ -1087,6 +1095,30 @@ static int setup_clock_data(sd_event *e, struct clock_data *d, clockid_t clock) - return 0; - } - -+static int event_source_time_prioq_put( -+ sd_event_source *s, -+ struct clock_data *d) { -+ -+ int r; -+ -+ assert(s); -+ assert(d); -+ -+ r = prioq_put(d->earliest, s, &s->time.earliest_index); -+ if (r < 0) -+ return r; -+ -+ r = prioq_put(d->latest, s, &s->time.latest_index); -+ if (r < 0) { -+ assert_se(prioq_remove(d->earliest, s, &s->time.earliest_index) > 0); -+ s->time.earliest_index = PRIOQ_IDX_NULL; -+ return r; -+ } -+ -+ d->needs_rearm = true; -+ return 0; -+} -+ - _public_ int sd_event_add_time( - sd_event *e, - sd_event_source **ret, -@@ -1113,8 +1145,7 @@ _public_ int sd_event_add_time( - type = clock_to_event_source_type(clock); - assert_return(type >= 0, -ENOTSUP); - -- d = event_get_clock_data(e, type); -- assert(d); -+ assert_se(d = event_get_clock_data(e, type)); - - r = setup_clock_data(e, d, clock); - if (r < 0) -@@ -1131,13 +1162,7 @@ _public_ int sd_event_add_time( - s->userdata = userdata; - s->enabled = SD_EVENT_ONESHOT; - -- d->needs_rearm = true; -- -- r = prioq_put(d->earliest, s, &s->time.earliest_index); -- if (r < 0) -- goto fail; -- -- r = prioq_put(d->latest, s, &s->time.latest_index); -+ r = event_source_time_prioq_put(s, d); - if (r < 0) - goto fail; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/911-sd-event-rename-PASSIVE-PREPARED-to-INITIAL-ARMED.patch b/base/systemd/centos/patches/911-sd-event-rename-PASSIVE-PREPARED-to-INITIAL-ARMED.patch deleted file mode 100644 index 7ae6e8326..000000000 --- a/base/systemd/centos/patches/911-sd-event-rename-PASSIVE-PREPARED-to-INITIAL-ARMED.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 6dc0338be9020eebcbfafe078a46bc7be8e4a2ff Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Sat, 14 Mar 2015 11:47:35 +0100 -Subject: [PATCH 11/20] sd-event: rename PASSIVE/PREPARED to INITIAL/ARMED - -[commit 2b0c9ef7352dae53ee746c32033999c1346633b3 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 22 +++++++++++----------- - src/systemd/sd-event.h | 4 ++-- - 2 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index e0e0eaa..299312a 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -2423,7 +2423,7 @@ static int dispatch_exit(sd_event *e) { - - r = source_dispatch(p); - -- e->state = SD_EVENT_PASSIVE; -+ e->state = SD_EVENT_INITIAL; - sd_event_unref(e); - - return r; -@@ -2492,7 +2492,7 @@ _public_ int sd_event_prepare(sd_event *e) { - assert_return(e, -EINVAL); - assert_return(!event_pid_changed(e), -ECHILD); - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); -- assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); -+ assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); - - if (e->exit_requested) - goto pending; -@@ -2526,15 +2526,15 @@ _public_ int sd_event_prepare(sd_event *e) { - if (event_next_pending(e) || e->need_process_child) - goto pending; - -- e->state = SD_EVENT_PREPARED; -+ e->state = SD_EVENT_ARMED; - - return 0; - - pending: -- e->state = SD_EVENT_PREPARED; -+ e->state = SD_EVENT_ARMED; - r = sd_event_wait(e, 0); - if (r == 0) -- e->state = SD_EVENT_PREPARED; -+ e->state = SD_EVENT_ARMED; - - return r; - } -@@ -2547,7 +2547,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { - assert_return(e, -EINVAL); - assert_return(!event_pid_changed(e), -ECHILD); - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); -- assert_return(e->state == SD_EVENT_PREPARED, -EBUSY); -+ assert_return(e->state == SD_EVENT_ARMED, -EBUSY); - - if (e->exit_requested) { - e->state = SD_EVENT_PENDING; -@@ -2643,7 +2643,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { - r = 0; - - finish: -- e->state = SD_EVENT_PASSIVE; -+ e->state = SD_EVENT_INITIAL; - - return r; - } -@@ -2666,14 +2666,14 @@ _public_ int sd_event_dispatch(sd_event *e) { - - e->state = SD_EVENT_RUNNING; - r = source_dispatch(p); -- e->state = SD_EVENT_PASSIVE; -+ e->state = SD_EVENT_INITIAL; - - sd_event_unref(e); - - return r; - } - -- e->state = SD_EVENT_PASSIVE; -+ e->state = SD_EVENT_INITIAL; - - return 1; - } -@@ -2684,7 +2684,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) { - assert_return(e, -EINVAL); - assert_return(!event_pid_changed(e), -ECHILD); - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); -- assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); -+ assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); - - r = sd_event_prepare(e); - if (r > 0) -@@ -2704,7 +2704,7 @@ _public_ int sd_event_loop(sd_event *e) { - - assert_return(e, -EINVAL); - assert_return(!event_pid_changed(e), -ECHILD); -- assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); -+ assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); - - sd_event_ref(e); - -diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h -index 4957f3a..ffde7c8 100644 ---- a/src/systemd/sd-event.h -+++ b/src/systemd/sd-event.h -@@ -51,8 +51,8 @@ enum { - }; - - enum { -- SD_EVENT_PASSIVE, -- SD_EVENT_PREPARED, -+ SD_EVENT_INITIAL, -+ SD_EVENT_ARMED, - SD_EVENT_PENDING, - SD_EVENT_RUNNING, - SD_EVENT_EXITING, --- -2.17.1 - diff --git a/base/systemd/centos/patches/912-sd-event-refuse-running-default-event-loops-in-any-o.patch b/base/systemd/centos/patches/912-sd-event-refuse-running-default-event-loops-in-any-o.patch deleted file mode 100644 index a8d2074d6..000000000 --- a/base/systemd/centos/patches/912-sd-event-refuse-running-default-event-loops-in-any-o.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 01c94571660c44c415ba8bcba62176f45bf84be5 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 30 Oct 2019 20:26:50 +0100 -Subject: [PATCH 12/20] sd-event: refuse running default event loops in any - other thread than the one they are default for - -(cherry picked from commit e544601536ac13a288d7476f4400c7b0f22b7ea1) - -Related: #1819868 - -[commit 4c5fdbde7e745126f31542a70b45cc4faec094d2 from -https://github.com/systemd-rhel/rhel-8/ - -LZ: Dropped the part that won't affect code to simplify the merging.] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 299312a..a2f7868 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -2494,6 +2494,11 @@ _public_ int sd_event_prepare(sd_event *e) { - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); - -+ /* Let's check that if we are a default event loop we are executed in the correct thread. We only do -+ * this check here once, since gettid() is typically not cached, and thus want to minimize -+ * syscalls */ -+ assert_return(!e->default_event_ptr || e->tid == gettid(), -EREMOTEIO); -+ - if (e->exit_requested) - goto pending; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/913-sd-event-remove-earliest_index-latest_index-into-com.patch b/base/systemd/centos/patches/913-sd-event-remove-earliest_index-latest_index-into-com.patch deleted file mode 100644 index ef0ba6034..000000000 --- a/base/systemd/centos/patches/913-sd-event-remove-earliest_index-latest_index-into-com.patch +++ /dev/null @@ -1,106 +0,0 @@ -From f72ca8a711fc406dc52f18c7dbc3bfc5397b26ea Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Nov 2020 17:49:27 +0100 -Subject: [PATCH 13/20] sd-event: remove earliest_index/latest_index into - common part of event source objects - -So far we used these fields to organize the earliest/latest timer event -priority queue. In a follow-up commit we want to introduce ratelimiting -to event sources, at which point we want any kind of event source to be -able to trigger time wakeups, and hence they all need to be included in -the earliest/latest prioqs. Thus, in preparation let's make this -generic. - -No change in behaviour, just some shifting around of struct members from -the type-specific to the generic part. - -(cherry picked from commit f41315fceb5208c496145cda2d6c865a5458ce44) - -Related: #1819868 - -[commit 97f599bf57fdaee688ae5750e9b2b2587e2b597a from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index a2f7868..82cb9ad 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -94,6 +94,9 @@ struct sd_event_source { - - LIST_FIELDS(sd_event_source, sources); - -+ unsigned earliest_index; -+ unsigned latest_index; -+ - union { - struct { - sd_event_io_handler_t callback; -@@ -105,8 +108,6 @@ struct sd_event_source { - struct { - sd_event_time_handler_t callback; - usec_t next, accuracy; -- unsigned earliest_index; -- unsigned latest_index; - } time; - struct { - sd_event_signal_handler_t callback; -@@ -804,8 +805,8 @@ static void event_source_time_prioq_reshuffle(sd_event_source *s) { - /* Called whenever the event source's timer ordering properties changed, i.e. time, accuracy, - * pending, enable state. Makes sure the two prioq's are ordered properly again. */ - assert_se(d = event_get_clock_data(s->event, s->type)); -- prioq_reshuffle(d->earliest, s, &s->time.earliest_index); -- prioq_reshuffle(d->latest, s, &s->time.latest_index); -+ prioq_reshuffle(d->earliest, s, &s->earliest_index); -+ prioq_reshuffle(d->latest, s, &s->latest_index); - d->needs_rearm = true; - } - -@@ -816,9 +817,9 @@ static void event_source_time_prioq_remove( - assert(s); - assert(d); - -- prioq_remove(d->earliest, s, &s->time.earliest_index); -- prioq_remove(d->latest, s, &s->time.latest_index); -- s->time.earliest_index = s->time.latest_index = PRIOQ_IDX_NULL; -+ prioq_remove(d->earliest, s, &s->earliest_index); -+ prioq_remove(d->latest, s, &s->latest_index); -+ s->earliest_index = s->latest_index = PRIOQ_IDX_NULL; - d->needs_rearm = true; - } - -@@ -1104,14 +1105,14 @@ static int event_source_time_prioq_put( - assert(s); - assert(d); - -- r = prioq_put(d->earliest, s, &s->time.earliest_index); -+ r = prioq_put(d->earliest, s, &s->earliest_index); - if (r < 0) - return r; - -- r = prioq_put(d->latest, s, &s->time.latest_index); -+ r = prioq_put(d->latest, s, &s->latest_index); - if (r < 0) { -- assert_se(prioq_remove(d->earliest, s, &s->time.earliest_index) > 0); -- s->time.earliest_index = PRIOQ_IDX_NULL; -+ assert_se(prioq_remove(d->earliest, s, &s->earliest_index) > 0); -+ s->earliest_index = PRIOQ_IDX_NULL; - return r; - } - -@@ -1158,7 +1159,7 @@ _public_ int sd_event_add_time( - s->time.next = usec; - s->time.accuracy = accuracy == 0 ? DEFAULT_ACCURACY_USEC : accuracy; - s->time.callback = callback; -- s->time.earliest_index = s->time.latest_index = PRIOQ_IDX_NULL; -+ s->earliest_index = s->latest_index = PRIOQ_IDX_NULL; - s->userdata = userdata; - s->enabled = SD_EVENT_ONESHOT; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/914-sd-event-update-state-at-the-end-in-event_source_ena.patch b/base/systemd/centos/patches/914-sd-event-update-state-at-the-end-in-event_source_ena.patch deleted file mode 100644 index 20ca0f5d5..000000000 --- a/base/systemd/centos/patches/914-sd-event-update-state-at-the-end-in-event_source_ena.patch +++ /dev/null @@ -1,125 +0,0 @@ -From ad89da1e00919c510596dac78741c98052b1e2f7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 10 Nov 2020 10:38:37 +0100 -Subject: [PATCH 14/20] sd-event: update state at the end in - event_source_enable - -Coverity in CID#1435966 was complaining that s->enabled is not "restored" in -all cases. But the code was actually correct, since it should only be -"restored" in the error paths. But let's still make this prettier by not setting -the state before all operations that may fail are done. - -We need to set .enabled for the prioq reshuffling operations, so move those down. - -No functional change intended. - -(cherry picked from commit d2eafe61ca07f8300dc741a0491a914213fa2b6b) - -Related: #1819868 - -[commit deb9e6ad3a1d7cfbc3b53d1e74cda6ae398a90fd from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 51 +++++++++++++++++------------- - 1 file changed, 29 insertions(+), 22 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 82cb9ad..3ff15a2 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1691,11 +1691,11 @@ static int event_source_disable(sd_event_source *s) { - return 0; - } - --static int event_source_enable(sd_event_source *s, int m) { -+static int event_source_enable(sd_event_source *s, int enable) { - int r; - - assert(s); -- assert(IN_SET(m, SD_EVENT_ON, SD_EVENT_ONESHOT)); -+ assert(IN_SET(enable, SD_EVENT_ON, SD_EVENT_ONESHOT)); - assert(s->enabled == SD_EVENT_OFF); - - /* Unset the pending flag when this event source is enabled */ -@@ -1705,31 +1705,16 @@ static int event_source_enable(sd_event_source *s, int m) { - return r; - } - -- s->enabled = m; -- - switch (s->type) { -- - case SOURCE_IO: -- r = source_io_register(s, m, s->io.events); -- if (r < 0) { -- s->enabled = SD_EVENT_OFF; -+ r = source_io_register(s, enable, s->io.events); -+ if (r < 0) - return r; -- } -- -- break; -- -- case SOURCE_TIME_REALTIME: -- case SOURCE_TIME_BOOTTIME: -- case SOURCE_TIME_MONOTONIC: -- case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: -- event_source_time_prioq_reshuffle(s); - break; - - case SOURCE_SIGNAL: - r = event_make_signal_data(s->event, s->signal.sig, NULL); - if (r < 0) { -- s->enabled = SD_EVENT_OFF; - event_gc_signal_data(s->event, &s->priority, s->signal.sig); - return r; - } -@@ -1750,10 +1735,12 @@ static int event_source_enable(sd_event_source *s, int m) { - - break; - -+ case SOURCE_TIME_REALTIME: -+ case SOURCE_TIME_BOOTTIME: -+ case SOURCE_TIME_MONOTONIC: -+ case SOURCE_TIME_REALTIME_ALARM: -+ case SOURCE_TIME_BOOTTIME_ALARM: - case SOURCE_EXIT: -- prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -- break; -- - case SOURCE_DEFER: - case SOURCE_POST: - break; -@@ -1762,6 +1749,26 @@ static int event_source_enable(sd_event_source *s, int m) { - assert_not_reached("Wut? I shouldn't exist."); - } - -+ s->enabled = enable; -+ -+ /* Non-failing operations below */ -+ switch (s->type) { -+ case SOURCE_TIME_REALTIME: -+ case SOURCE_TIME_BOOTTIME: -+ case SOURCE_TIME_MONOTONIC: -+ case SOURCE_TIME_REALTIME_ALARM: -+ case SOURCE_TIME_BOOTTIME_ALARM: -+ event_source_time_prioq_reshuffle(s); -+ break; -+ -+ case SOURCE_EXIT: -+ prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -+ break; -+ -+ default: -+ break; -+ } -+ - return 0; - } - --- -2.17.1 - diff --git a/base/systemd/centos/patches/915-sd-event-increase-n_enabled_child_sources-just-once.patch b/base/systemd/centos/patches/915-sd-event-increase-n_enabled_child_sources-just-once.patch deleted file mode 100644 index c0eb0d9eb..000000000 --- a/base/systemd/centos/patches/915-sd-event-increase-n_enabled_child_sources-just-once.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 04e2ffb437b301963804e6d199be1196d1b4307b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 10 Nov 2020 12:57:34 +0100 -Subject: [PATCH 15/20] sd-event: increase n_enabled_child_sources just once - -Neither source_child_pidfd_register() nor event_make_signal_data() look at -n_enabled_child_sources. - -(cherry picked from commit ac9f2640cb9c107b43f47bba7e068d3b92b5337b) - -Related: #1819868 - -[commit 188465c472996b426a1f22a9fc46d031b722c3b4 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 3ff15a2..e34fd0b 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1722,8 +1722,6 @@ static int event_source_enable(sd_event_source *s, int enable) { - break; - - case SOURCE_CHILD: -- s->event->n_enabled_child_sources++; -- - r = event_make_signal_data(s->event, SIGCHLD, NULL); - if (r < 0) { - s->enabled = SD_EVENT_OFF; -@@ -1732,6 +1730,7 @@ static int event_source_enable(sd_event_source *s, int enable) { - return r; - } - -+ s->event->n_enabled_child_sources++; - - break; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/916-sd-event-don-t-provide-priority-stability.patch b/base/systemd/centos/patches/916-sd-event-don-t-provide-priority-stability.patch deleted file mode 100644 index 93f25687a..000000000 --- a/base/systemd/centos/patches/916-sd-event-don-t-provide-priority-stability.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 2d07173304abd3f1d3fae5e0f01bf5874b1f04db Mon Sep 17 00:00:00 2001 -From: David Herrmann -Date: Tue, 29 Sep 2015 20:56:17 +0200 -Subject: [PATCH 16/20] sd-event: don't provide priority stability - -Currently, we guarantee that if two event-sources with the same priority -fire at the same time, they're always dispatched in the same order. While -this might sound nice in theory, there's is little benefit in providing -stability on that level. We have no control over the order the events are -reported, hence, we cannot guarantee that we get notified about both at -the same time. - -By dropping the stability guarantee, we loose roughly 10% Heap swaps in -the prioq on a desktop cold-boot. Krzysztof Kotlenga even reported up to -20% on his tests. This sounds worth optimizing, so drop the stability -guarantee. - -[commit 6fe869c251790a0e3cef5b243169dda363723f49 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 30 ------------------------------ - 1 file changed, 30 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index e34fd0b..6304991 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -243,12 +243,6 @@ static int pending_prioq_compare(const void *a, const void *b) { - if (x->pending_iteration > y->pending_iteration) - return 1; - -- /* Stability for the rest */ -- if (x < y) -- return -1; -- if (x > y) -- return 1; -- - return 0; - } - -@@ -278,12 +272,6 @@ static int prepare_prioq_compare(const void *a, const void *b) { - if (x->priority > y->priority) - return 1; - -- /* Stability for the rest */ -- if (x < y) -- return -1; -- if (x > y) -- return 1; -- - return 0; - } - -@@ -311,12 +299,6 @@ static int earliest_time_prioq_compare(const void *a, const void *b) { - if (x->time.next > y->time.next) - return 1; - -- /* Stability for the rest */ -- if (x < y) -- return -1; -- if (x > y) -- return 1; -- - return 0; - } - -@@ -344,12 +326,6 @@ static int latest_time_prioq_compare(const void *a, const void *b) { - if (x->time.next + x->time.accuracy > y->time.next + y->time.accuracy) - return 1; - -- /* Stability for the rest */ -- if (x < y) -- return -1; -- if (x > y) -- return 1; -- - return 0; - } - -@@ -371,12 +347,6 @@ static int exit_prioq_compare(const void *a, const void *b) { - if (x->priority > y->priority) - return 1; - -- /* Stability for the rest */ -- if (x < y) -- return -1; -- if (x > y) -- return 1; -- - return 0; - } - --- -2.17.1 - diff --git a/base/systemd/centos/patches/917-sd-event-when-determining-the-last-allowed-time-a-ti.patch b/base/systemd/centos/patches/917-sd-event-when-determining-the-last-allowed-time-a-ti.patch deleted file mode 100644 index eb0534c09..000000000 --- a/base/systemd/centos/patches/917-sd-event-when-determining-the-last-allowed-time-a-ti.patch +++ /dev/null @@ -1,53 +0,0 @@ -From cf0a396c411c78d0d477d2226f89884df207aec2 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 1 Feb 2016 00:19:14 +0100 -Subject: [PATCH 17/20] sd-event: when determining the last allowed time a time - event may elapse, deal with overflows - -[commit 1bce0ffa66f329bd50d8bfaa943a755caa65b269 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 6304991..63f77ac 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -302,6 +302,10 @@ static int earliest_time_prioq_compare(const void *a, const void *b) { - return 0; - } - -+static usec_t time_event_source_latest(const sd_event_source *s) { -+ return usec_add(s->time.next, s->time.accuracy); -+} -+ - static int latest_time_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; - -@@ -321,9 +325,9 @@ static int latest_time_prioq_compare(const void *a, const void *b) { - return 1; - - /* Order by time */ -- if (x->time.next + x->time.accuracy < y->time.next + y->time.accuracy) -+ if (time_event_source_latest(x) < time_event_source_latest(y)) - return -1; -- if (x->time.next + x->time.accuracy > y->time.next + y->time.accuracy) -+ if (time_event_source_latest(x) > time_event_source_latest(y)) - return 1; - - return 0; -@@ -2014,7 +2018,7 @@ static int event_arm_timer( - b = prioq_peek(d->latest); - assert_se(b && b->enabled != SD_EVENT_OFF); - -- t = sleep_between(e, a->time.next, b->time.next + b->time.accuracy); -+ t = sleep_between(e, a->time.next, time_event_source_latest(b)); - if (d->next == t) - return 0; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/918-sd-event-permit-a-USEC_INFINITY-timeout-as-an-altern.patch b/base/systemd/centos/patches/918-sd-event-permit-a-USEC_INFINITY-timeout-as-an-altern.patch deleted file mode 100644 index 6472d2f1e..000000000 --- a/base/systemd/centos/patches/918-sd-event-permit-a-USEC_INFINITY-timeout-as-an-altern.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c0521bcf58da1857a2077cd3b3abc330bab33598 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 1 Feb 2016 00:20:18 +0100 -Subject: [PATCH 18/20] sd-event: permit a USEC_INFINITY timeout as an - alternative to a disabling an event source - -This should simplify handling of time events in clients and is in-line with the USEC_INFINITY macro we already have. -This way setting a timeout to 0 indicates "elapse immediately", and a timeout of USEC_INFINITY "elapse never". - -[commit 393003e1debf7c7f75beaacbd532b92c3e3dc729 from -https://github.com/systemd-rhel/rhel-8/ - -LZ: Dropped the part that won't affect code to simplify the merging.] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 63f77ac..69dd02b 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1109,7 +1109,6 @@ _public_ int sd_event_add_time( - int r; - - assert_return(e, -EINVAL); -- assert_return(usec != (uint64_t) -1, -EINVAL); - assert_return(accuracy != (uint64_t) -1, -EINVAL); - assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(!event_pid_changed(e), -ECHILD); -@@ -1791,7 +1790,6 @@ _public_ int sd_event_source_get_time(sd_event_source *s, uint64_t *usec) { - _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) { - - assert_return(s, -EINVAL); -- assert_return(usec != (uint64_t) -1, -EINVAL); - assert_return(EVENT_SOURCE_IS_TIME(s->type), -EDOM); - assert_return(s->event->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(!event_pid_changed(s->event), -ECHILD); -@@ -1909,6 +1907,8 @@ static usec_t sleep_between(sd_event *e, usec_t a, usec_t b) { - - if (a <= 0) - return 0; -+ if (a >= USEC_INFINITY) -+ return USEC_INFINITY; - - if (b <= a + 1) - return a; -@@ -1998,7 +1998,7 @@ static int event_arm_timer( - d->needs_rearm = false; - - a = prioq_peek(d->earliest); -- if (!a || a->enabled == SD_EVENT_OFF) { -+ if (!a || a->enabled == SD_EVENT_OFF || a->time.next == USEC_INFINITY) { - - if (d->fd < 0) - return 0; --- -2.17.1 - diff --git a/base/systemd/centos/patches/919-sd-event-add-ability-to-ratelimit-event-sources.patch b/base/systemd/centos/patches/919-sd-event-add-ability-to-ratelimit-event-sources.patch deleted file mode 100644 index 647303479..000000000 --- a/base/systemd/centos/patches/919-sd-event-add-ability-to-ratelimit-event-sources.patch +++ /dev/null @@ -1,841 +0,0 @@ -From 69266c451910d2b57313b2fe7561e07cd5400d27 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Nov 2020 18:02:40 +0100 -Subject: [PATCH 19/20] sd-event: add ability to ratelimit event sources - -Let's a concept of "rate limiting" to event sources: if specific event -sources fire too often in some time interval temporarily take them -offline, and take them back online once the interval passed. - -This is a simple scheme of avoiding starvation of event sources if some -event source fires too often. - -This introduces the new conceptual states of "offline" and "online" for -event sources: an event source is "online" only when enabled *and* not -ratelimited, and offline in all other cases. An event source that is -online hence has its fds registered in the epoll, its signals in the -signalfd and so on. - -(cherry picked from commit b6d5481b3d9f7c9b1198ab54b54326ec73e855bf) - -Related: #1819868 - -[commit 395eb7753a9772f505102fbbe3ba3261b57abbe9 from -https://github.com/systemd-rhel/rhel-8/ - -LZ: Moved the changes in libsystemd.sym to libsystemd.sym.m4 from the -file changing history; patch ratelimit.h in its old path; dropped -SOURCE_INOTIFY related parts in sd-event.c because it hasn't been -added in this systemd version.] - -Signed-off-by: Li Zhou ---- - src/libsystemd/libsystemd.sym.m4 | 7 + - src/libsystemd/sd-event/sd-event.c | 427 +++++++++++++++++++++++------ - src/shared/ratelimit.h | 8 + - src/systemd/sd-event.h | 3 + - 4 files changed, 365 insertions(+), 80 deletions(-) - -diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4 -index b1c2b43..ceb5d7f 100644 ---- a/src/libsystemd/libsystemd.sym.m4 -+++ b/src/libsystemd/libsystemd.sym.m4 -@@ -169,6 +169,13 @@ global: - sd_journal_has_persistent_files; - } LIBSYSTEMD_219; - -+LIBSYSTEMD_248 { -+global: -+ sd_event_source_set_ratelimit; -+ sd_event_source_get_ratelimit; -+ sd_event_source_is_ratelimited; -+} LIBSYSTEMD_229; -+ - m4_ifdef(`ENABLE_KDBUS', - LIBSYSTEMD_FUTURE { - global: -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 69dd02b..a3ade40 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -32,6 +32,7 @@ - #include "util.h" - #include "time-util.h" - #include "missing.h" -+#include "ratelimit.h" - #include "set.h" - #include "list.h" - -@@ -67,7 +68,24 @@ typedef enum WakeupType { - _WAKEUP_TYPE_INVALID = -1, - } WakeupType; - --#define EVENT_SOURCE_IS_TIME(t) IN_SET((t), SOURCE_TIME_REALTIME, SOURCE_TIME_BOOTTIME, SOURCE_TIME_MONOTONIC, SOURCE_TIME_REALTIME_ALARM, SOURCE_TIME_BOOTTIME_ALARM) -+#define EVENT_SOURCE_IS_TIME(t) \ -+ IN_SET((t), \ -+ SOURCE_TIME_REALTIME, \ -+ SOURCE_TIME_BOOTTIME, \ -+ SOURCE_TIME_MONOTONIC, \ -+ SOURCE_TIME_REALTIME_ALARM, \ -+ SOURCE_TIME_BOOTTIME_ALARM) -+ -+#define EVENT_SOURCE_CAN_RATE_LIMIT(t) \ -+ IN_SET((t), \ -+ SOURCE_IO, \ -+ SOURCE_TIME_REALTIME, \ -+ SOURCE_TIME_BOOTTIME, \ -+ SOURCE_TIME_MONOTONIC, \ -+ SOURCE_TIME_REALTIME_ALARM, \ -+ SOURCE_TIME_BOOTTIME_ALARM, \ -+ SOURCE_SIGNAL, \ -+ SOURCE_DEFER) - - struct sd_event_source { - WakeupType wakeup; -@@ -85,6 +103,7 @@ struct sd_event_source { - bool pending:1; - bool dispatching:1; - bool floating:1; -+ bool ratelimited:1; - - int64_t priority; - unsigned pending_index; -@@ -94,6 +113,10 @@ struct sd_event_source { - - LIST_FIELDS(sd_event_source, sources); - -+ RateLimit rate_limit; -+ -+ /* These are primarily fields relevant for time event sources, but since any event source can -+ * effectively become one when rate-limited, this is part of the common fields. */ - unsigned earliest_index; - unsigned latest_index; - -@@ -188,7 +211,7 @@ struct sd_event { - Hashmap *signal_data; /* indexed by priority */ - - Hashmap *child_sources; -- unsigned n_enabled_child_sources; -+ unsigned n_online_child_sources; - - Set *post_sources; - -@@ -219,8 +242,19 @@ struct sd_event { - - static void source_disconnect(sd_event_source *s); - -+static bool event_source_is_online(sd_event_source *s) { -+ assert(s); -+ return s->enabled != SD_EVENT_OFF && !s->ratelimited; -+} -+ -+static bool event_source_is_offline(sd_event_source *s) { -+ assert(s); -+ return s->enabled == SD_EVENT_OFF || s->ratelimited; -+} -+ - static int pending_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; -+ int r; - - assert(x->pending); - assert(y->pending); -@@ -231,23 +265,23 @@ static int pending_prioq_compare(const void *a, const void *b) { - if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) - return 1; - -+ /* Non rate-limited ones first. */ -+ r = CMP(!!x->ratelimited, !!y->ratelimited); -+ if (r != 0) -+ return r; -+ - /* Lower priority values first */ -- if (x->priority < y->priority) -- return -1; -- if (x->priority > y->priority) -- return 1; -+ r = CMP(x->priority, y->priority); -+ if (r != 0) -+ return r; - - /* Older entries first */ -- if (x->pending_iteration < y->pending_iteration) -- return -1; -- if (x->pending_iteration > y->pending_iteration) -- return 1; -- -- return 0; -+ return CMP(x->pending_iteration, y->pending_iteration); - } - - static int prepare_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; -+ int r; - - assert(x->prepare); - assert(y->prepare); -@@ -258,29 +292,46 @@ static int prepare_prioq_compare(const void *a, const void *b) { - if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) - return 1; - -+ /* Non rate-limited ones first. */ -+ r = CMP(!!x->ratelimited, !!y->ratelimited); -+ if (r != 0) -+ return r; -+ - /* Move most recently prepared ones last, so that we can stop - * preparing as soon as we hit one that has already been - * prepared in the current iteration */ -- if (x->prepare_iteration < y->prepare_iteration) -- return -1; -- if (x->prepare_iteration > y->prepare_iteration) -- return 1; -+ r = CMP(x->prepare_iteration, y->prepare_iteration); -+ if (r != 0) -+ return r; - - /* Lower priority values first */ -- if (x->priority < y->priority) -- return -1; -- if (x->priority > y->priority) -- return 1; -+ return CMP(x->priority, y->priority); -+} - -- return 0; -+static usec_t time_event_source_next(const sd_event_source *s) { -+ assert(s); -+ -+ /* We have two kinds of event sources that have elapsation times associated with them: the actual -+ * time based ones and the ones for which a ratelimit can be in effect (where we want to be notified -+ * once the ratelimit time window ends). Let's return the next elapsing time depending on what we are -+ * looking at here. */ -+ -+ if (s->ratelimited) { /* If rate-limited the next elapsation is when the ratelimit time window ends */ -+ assert(s->rate_limit.begin != 0); -+ assert(s->rate_limit.interval != 0); -+ return usec_add(s->rate_limit.begin, s->rate_limit.interval); -+ } -+ -+ /* Otherwise this must be a time event source, if not ratelimited */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ return s->time.next; -+ -+ return USEC_INFINITY; - } - - static int earliest_time_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; - -- assert(EVENT_SOURCE_IS_TIME(x->type)); -- assert(x->type == y->type); -- - /* Enabled ones first */ - if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) - return -1; -@@ -294,24 +345,30 @@ static int earliest_time_prioq_compare(const void *a, const void *b) { - return 1; - - /* Order by time */ -- if (x->time.next < y->time.next) -- return -1; -- if (x->time.next > y->time.next) -- return 1; -- -- return 0; -+ return CMP(time_event_source_next(x), time_event_source_next(y)); - } - - static usec_t time_event_source_latest(const sd_event_source *s) { -- return usec_add(s->time.next, s->time.accuracy); -+ assert(s); -+ -+ if (s->ratelimited) { /* For ratelimited stuff the earliest and the latest time shall actually be the -+ * same, as we should avoid adding additional inaccuracy on an inaccuracy time -+ * window */ -+ assert(s->rate_limit.begin != 0); -+ assert(s->rate_limit.interval != 0); -+ return usec_add(s->rate_limit.begin, s->rate_limit.interval); -+ } -+ -+ /* Must be a time event source, if not ratelimited */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ return usec_add(s->time.next, s->time.accuracy); -+ -+ return USEC_INFINITY; - } - - static int latest_time_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; - -- assert(EVENT_SOURCE_IS_TIME(x->type)); -- assert(x->type == y->type); -- - /* Enabled ones first */ - if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) - return -1; -@@ -722,12 +779,12 @@ static void event_gc_signal_data(sd_event *e, const int64_t *priority, int sig) - * the signalfd for it. */ - - if (sig == SIGCHLD && -- e->n_enabled_child_sources > 0) -+ e->n_online_child_sources > 0) - return; - - if (e->signal_sources && - e->signal_sources[sig] && -- e->signal_sources[sig]->enabled != SD_EVENT_OFF) -+ event_source_is_online(e->signal_sources[sig])) - return; - - /* -@@ -774,11 +831,17 @@ static void event_source_time_prioq_reshuffle(sd_event_source *s) { - struct clock_data *d; - - assert(s); -- assert(EVENT_SOURCE_IS_TIME(s->type)); - - /* Called whenever the event source's timer ordering properties changed, i.e. time, accuracy, - * pending, enable state. Makes sure the two prioq's are ordered properly again. */ -- assert_se(d = event_get_clock_data(s->event, s->type)); -+ -+ if (s->ratelimited) -+ d = &s->event->monotonic; -+ else { -+ assert(EVENT_SOURCE_IS_TIME(s->type)); -+ assert_se(d = event_get_clock_data(s->event, s->type)); -+ } -+ - prioq_reshuffle(d->earliest, s, &s->earliest_index); - prioq_reshuffle(d->latest, s, &s->latest_index); - d->needs_rearm = true; -@@ -819,12 +882,18 @@ static void source_disconnect(sd_event_source *s) { - case SOURCE_TIME_BOOTTIME: - case SOURCE_TIME_MONOTONIC: - case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: { -- struct clock_data *d; -- assert_se(d = event_get_clock_data(s->event, s->type)); -- event_source_time_prioq_remove(s, d); -+ case SOURCE_TIME_BOOTTIME_ALARM: -+ /* Only remove this event source from the time event source here if it is not ratelimited. If -+ * it is ratelimited, we'll remove it below, separately. Why? Because the clock used might -+ * differ: ratelimiting always uses CLOCK_MONOTONIC, but timer events might use any clock */ -+ -+ if (!s->ratelimited) { -+ struct clock_data *d; -+ assert_se(d = event_get_clock_data(s->event, s->type)); -+ event_source_time_prioq_remove(s, d); -+ } -+ - break; -- } - - case SOURCE_SIGNAL: - if (s->signal.sig > 0) { -@@ -839,9 +908,9 @@ static void source_disconnect(sd_event_source *s) { - - case SOURCE_CHILD: - if (s->child.pid > 0) { -- if (s->enabled != SD_EVENT_OFF) { -- assert(s->event->n_enabled_child_sources > 0); -- s->event->n_enabled_child_sources--; -+ if (event_source_is_online(s)) { -+ assert(s->event->n_online_child_sources > 0); -+ s->event->n_online_child_sources--; - } - - (void) hashmap_remove(s->event->child_sources, INT_TO_PTR(s->child.pid)); -@@ -872,6 +941,9 @@ static void source_disconnect(sd_event_source *s) { - if (s->prepare) - prioq_remove(s->event->prepare, s, &s->prepare_index); - -+ if (s->ratelimited) -+ event_source_time_prioq_remove(s, &s->event->monotonic); -+ - event = s->event; - - s->type = _SOURCE_EVENT_SOURCE_TYPE_INVALID; -@@ -1259,11 +1331,11 @@ _public_ int sd_event_add_child( - return r; - } - -- e->n_enabled_child_sources ++; -+ e->n_online_child_sources++; - - r = event_make_signal_data(e, SIGCHLD, NULL); - if (r < 0) { -- e->n_enabled_child_sources--; -+ e->n_online_child_sources--; - source_free(s); - return r; - } -@@ -1476,7 +1548,7 @@ _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) { - if (s->io.fd == fd) - return 0; - -- if (s->enabled == SD_EVENT_OFF) { -+ if (event_source_is_offline(s)) { - s->io.fd = fd; - s->io.registered = false; - } else { -@@ -1524,7 +1596,7 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events) - if (s->io.events == events && !(events & EPOLLET)) - return 0; - -- if (s->enabled != SD_EVENT_OFF) { -+ if (event_source_is_online(s)) { - r = source_io_register(s, s->enabled, events); - if (r < 0) - return r; -@@ -1572,7 +1644,7 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority) - if (s->priority == priority) - return 0; - -- if (s->type == SOURCE_SIGNAL && s->enabled != SD_EVENT_OFF) { -+ if (s->type == SOURCE_SIGNAL && event_source_is_online(s)) { - struct signal_data *old, *d; - - /* Move us from the signalfd belonging to the old -@@ -1609,20 +1681,29 @@ _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) { - return 0; - } - --static int event_source_disable(sd_event_source *s) { -+static int event_source_offline( -+ sd_event_source *s, -+ int enabled, -+ bool ratelimited) { -+ -+ bool was_offline; - int r; - - assert(s); -- assert(s->enabled != SD_EVENT_OFF); -+ assert(enabled == SD_EVENT_OFF || ratelimited); - - /* Unset the pending flag when this event source is disabled */ -- if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ if (s->enabled != SD_EVENT_OFF && -+ enabled == SD_EVENT_OFF && -+ !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { - r = source_set_pending(s, false); - if (r < 0) - return r; - } - -- s->enabled = SD_EVENT_OFF; -+ was_offline = event_source_is_offline(s); -+ s->enabled = enabled; -+ s->ratelimited = ratelimited; - - switch (s->type) { - -@@ -1643,8 +1724,10 @@ static int event_source_disable(sd_event_source *s) { - break; - - case SOURCE_CHILD: -- assert(s->event->n_enabled_child_sources > 0); -- s->event->n_enabled_child_sources--; -+ if (!was_offline) { -+ assert(s->event->n_online_child_sources > 0); -+ s->event->n_online_child_sources--; -+ } - - event_gc_signal_data(s->event, &s->priority, SIGCHLD); - break; -@@ -1661,26 +1744,42 @@ static int event_source_disable(sd_event_source *s) { - assert_not_reached("Wut? I shouldn't exist."); - } - -- return 0; -+ return 1; - } - --static int event_source_enable(sd_event_source *s, int enable) { -+static int event_source_online( -+ sd_event_source *s, -+ int enabled, -+ bool ratelimited) { -+ -+ bool was_online; - int r; - - assert(s); -- assert(IN_SET(enable, SD_EVENT_ON, SD_EVENT_ONESHOT)); -- assert(s->enabled == SD_EVENT_OFF); -+ assert(enabled != SD_EVENT_OFF || !ratelimited); - - /* Unset the pending flag when this event source is enabled */ -- if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { -+ if (s->enabled == SD_EVENT_OFF && -+ enabled != SD_EVENT_OFF && -+ !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) { - r = source_set_pending(s, false); - if (r < 0) - return r; - } - -+ /* Are we really ready for onlining? */ -+ if (enabled == SD_EVENT_OFF || ratelimited) { -+ /* Nope, we are not ready for onlining, then just update the precise state and exit */ -+ s->enabled = enabled; -+ s->ratelimited = ratelimited; -+ return 0; -+ } -+ -+ was_online = event_source_is_online(s); -+ - switch (s->type) { - case SOURCE_IO: -- r = source_io_register(s, enable, s->io.events); -+ r = source_io_register(s, enabled, s->io.events); - if (r < 0) - return r; - break; -@@ -1698,13 +1797,13 @@ static int event_source_enable(sd_event_source *s, int enable) { - r = event_make_signal_data(s->event, SIGCHLD, NULL); - if (r < 0) { - s->enabled = SD_EVENT_OFF; -- s->event->n_enabled_child_sources--; -+ s->event->n_online_child_sources--; - event_gc_signal_data(s->event, &s->priority, SIGCHLD); - return r; - } - -- s->event->n_enabled_child_sources++; -- -+ if (!was_online) -+ s->event->n_online_child_sources++; - break; - - case SOURCE_TIME_REALTIME: -@@ -1721,7 +1820,8 @@ static int event_source_enable(sd_event_source *s, int enable) { - assert_not_reached("Wut? I shouldn't exist."); - } - -- s->enabled = enable; -+ s->enabled = enabled; -+ s->ratelimited = ratelimited; - - /* Non-failing operations below */ - switch (s->type) { -@@ -1741,7 +1841,7 @@ static int event_source_enable(sd_event_source *s, int enable) { - break; - } - -- return 0; -+ return 1; - } - - _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { -@@ -1759,7 +1859,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - return 0; - - if (m == SD_EVENT_OFF) -- r = event_source_disable(s); -+ r = event_source_offline(s, m, s->ratelimited); - else { - if (s->enabled != SD_EVENT_OFF) { - /* Switching from "on" to "oneshot" or back? If that's the case, we can take a shortcut, the -@@ -1768,7 +1868,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { - return 0; - } - -- r = event_source_enable(s, m); -+ r = event_source_online(s, m, s->ratelimited); - } - if (r < 0) - return r; -@@ -1900,6 +2000,96 @@ _public_ void *sd_event_source_set_userdata(sd_event_source *s, void *userdata) - return ret; - } - -+static int event_source_enter_ratelimited(sd_event_source *s) { -+ int r; -+ -+ assert(s); -+ -+ /* When an event source becomes ratelimited, we place it in the CLOCK_MONOTONIC priority queue, with -+ * the end of the rate limit time window, much as if it was a timer event source. */ -+ -+ if (s->ratelimited) -+ return 0; /* Already ratelimited, this is a NOP hence */ -+ -+ /* Make sure we can install a CLOCK_MONOTONIC event further down. */ -+ r = setup_clock_data(s->event, &s->event->monotonic, CLOCK_MONOTONIC); -+ if (r < 0) -+ return r; -+ -+ /* Timer event sources are already using the earliest/latest queues for the timer scheduling. Let's -+ * first remove them from the prioq appropriate for their own clock, so that we can use the prioq -+ * fields of the event source then for adding it to the CLOCK_MONOTONIC prioq instead. */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ event_source_time_prioq_remove(s, event_get_clock_data(s->event, s->type)); -+ -+ /* Now, let's add the event source to the monotonic clock instead */ -+ r = event_source_time_prioq_put(s, &s->event->monotonic); -+ if (r < 0) -+ goto fail; -+ -+ /* And let's take the event source officially offline */ -+ r = event_source_offline(s, s->enabled, /* ratelimited= */ true); -+ if (r < 0) { -+ event_source_time_prioq_remove(s, &s->event->monotonic); -+ goto fail; -+ } -+ -+ event_source_pp_prioq_reshuffle(s); -+ -+ log_debug("Event source %p (%s) entered rate limit state.", s, strna(s->description)); -+ return 0; -+ -+fail: -+ /* Reinstall time event sources in the priority queue as before. This shouldn't fail, since the queue -+ * space for it should already be allocated. */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ assert_se(event_source_time_prioq_put(s, event_get_clock_data(s->event, s->type)) >= 0); -+ -+ return r; -+} -+ -+static int event_source_leave_ratelimit(sd_event_source *s) { -+ int r; -+ -+ assert(s); -+ -+ if (!s->ratelimited) -+ return 0; -+ -+ /* Let's take the event source out of the monotonic prioq first. */ -+ event_source_time_prioq_remove(s, &s->event->monotonic); -+ -+ /* Let's then add the event source to its native clock prioq again — if this is a timer event source */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) { -+ r = event_source_time_prioq_put(s, event_get_clock_data(s->event, s->type)); -+ if (r < 0) -+ goto fail; -+ } -+ -+ /* Let's try to take it online again. */ -+ r = event_source_online(s, s->enabled, /* ratelimited= */ false); -+ if (r < 0) { -+ /* Do something roughly sensible when this failed: undo the two prioq ops above */ -+ if (EVENT_SOURCE_IS_TIME(s->type)) -+ event_source_time_prioq_remove(s, event_get_clock_data(s->event, s->type)); -+ -+ goto fail; -+ } -+ -+ event_source_pp_prioq_reshuffle(s); -+ ratelimit_reset(&s->rate_limit); -+ -+ log_debug("Event source %p (%s) left rate limit state.", s, strna(s->description)); -+ return 0; -+ -+fail: -+ /* Do something somewhat reasonable when we cannot move an event sources out of ratelimited mode: -+ * simply put it back in it, maybe we can then process it more successfully next iteration. */ -+ assert_se(event_source_time_prioq_put(s, &s->event->monotonic) >= 0); -+ -+ return r; -+} -+ - static usec_t sleep_between(sd_event *e, usec_t a, usec_t b) { - usec_t c; - assert(e); -@@ -1998,7 +2188,7 @@ static int event_arm_timer( - d->needs_rearm = false; - - a = prioq_peek(d->earliest); -- if (!a || a->enabled == SD_EVENT_OFF || a->time.next == USEC_INFINITY) { -+ if (!a || a->enabled == SD_EVENT_OFF || time_event_source_next(a) == USEC_INFINITY) { - - if (d->fd < 0) - return 0; -@@ -2018,7 +2208,7 @@ static int event_arm_timer( - b = prioq_peek(d->latest); - assert_se(b && b->enabled != SD_EVENT_OFF); - -- t = sleep_between(e, a->time.next, time_event_source_latest(b)); -+ t = sleep_between(e, time_event_source_next(a), time_event_source_latest(b)); - if (d->next == t) - return 0; - -@@ -2097,10 +2287,22 @@ static int process_timer( - - for (;;) { - s = prioq_peek(d->earliest); -- if (!s || -- s->time.next > n || -- s->enabled == SD_EVENT_OFF || -- s->pending) -+ if (!s || time_event_source_next(s) > n) -+ break; -+ -+ if (s->ratelimited) { -+ /* This is an event sources whose ratelimit window has ended. Let's turn it on -+ * again. */ -+ assert(s->ratelimited); -+ -+ r = event_source_leave_ratelimit(s); -+ if (r < 0) -+ return r; -+ -+ continue; -+ } -+ -+ if (s->enabled == SD_EVENT_OFF || s->pending) - break; - - r = source_set_pending(s, true); -@@ -2146,7 +2348,7 @@ static int process_child(sd_event *e) { - if (s->pending) - continue; - -- if (s->enabled == SD_EVENT_OFF) -+ if (event_source_is_offline(s)) - continue; - - zero(s->child.siginfo); -@@ -2242,11 +2444,26 @@ static int process_signal(sd_event *e, struct signal_data *d, uint32_t events) { - } - - static int source_dispatch(sd_event_source *s) { -+ _cleanup_(sd_event_unrefp) sd_event *saved_event = NULL; - int r = 0; - - assert(s); - assert(s->pending || s->type == SOURCE_EXIT); - -+ /* Similar, store a reference to the event loop object, so that we can still access it after the -+ * callback might have invalidated/disconnected the event source. */ -+ saved_event = sd_event_ref(s->event); -+ -+ /* Check if we hit the ratelimit for this event source, if so, let's disable it. */ -+ assert(!s->ratelimited); -+ if (!ratelimit_below(&s->rate_limit)) { -+ r = event_source_enter_ratelimited(s); -+ if (r < 0) -+ return r; -+ -+ return 1; -+ } -+ - if (s->type != SOURCE_DEFER && s->type != SOURCE_EXIT) { - r = source_set_pending(s, false); - if (r < 0) -@@ -2356,7 +2573,7 @@ static int event_prepare(sd_event *e) { - sd_event_source *s; - - s = prioq_peek(e->prepare); -- if (!s || s->prepare_iteration == e->iteration || s->enabled == SD_EVENT_OFF) -+ if (!s || s->prepare_iteration == e->iteration || event_source_is_offline(s)) - break; - - s->prepare_iteration = e->iteration; -@@ -2393,7 +2610,7 @@ static int dispatch_exit(sd_event *e) { - assert(e); - - p = prioq_peek(e->exit); -- if (!p || p->enabled == SD_EVENT_OFF) { -+ if (!p || event_source_is_offline(p)) { - e->state = SD_EVENT_FINISHED; - return 0; - } -@@ -2419,7 +2636,7 @@ static sd_event_source* event_next_pending(sd_event *e) { - if (!p) - return NULL; - -- if (p->enabled == SD_EVENT_OFF) -+ if (event_source_is_offline(p)) - return NULL; - - return p; -@@ -2879,3 +3096,53 @@ _public_ int sd_event_get_iteration(sd_event *e, uint64_t *ret) { - *ret = e->iteration; - return 0; - } -+ -+_public_ int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval, unsigned burst) { -+ int r; -+ -+ assert_return(s, -EINVAL); -+ -+ /* Turning on ratelimiting on event source types that don't support it, is a loggable offense. Doing -+ * so is a programming error. */ -+ assert_return(EVENT_SOURCE_CAN_RATE_LIMIT(s->type), -EDOM); -+ -+ /* When ratelimiting is configured we'll always reset the rate limit state first and start fresh, -+ * non-ratelimited. */ -+ r = event_source_leave_ratelimit(s); -+ if (r < 0) -+ return r; -+ -+ RATELIMIT_INIT(s->rate_limit, interval, burst); -+ return 0; -+} -+ -+_public_ int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval, unsigned *ret_burst) { -+ assert_return(s, -EINVAL); -+ -+ /* Querying whether an event source has ratelimiting configured is not a loggable offsense, hence -+ * don't use assert_return(). Unlike turning on ratelimiting it's not really a programming error */ -+ if (!EVENT_SOURCE_CAN_RATE_LIMIT(s->type)) -+ return -EDOM; -+ -+ if (!ratelimit_configured(&s->rate_limit)) -+ return -ENOEXEC; -+ -+ if (ret_interval) -+ *ret_interval = s->rate_limit.interval; -+ if (ret_burst) -+ *ret_burst = s->rate_limit.burst; -+ -+ return 0; -+} -+ -+_public_ int sd_event_source_is_ratelimited(sd_event_source *s) { -+ assert_return(s, -EINVAL); -+ -+ if (!EVENT_SOURCE_CAN_RATE_LIMIT(s->type)) -+ return false; -+ -+ if (!ratelimit_configured(&s->rate_limit)) -+ return false; -+ -+ return s->ratelimited; -+} -diff --git a/src/shared/ratelimit.h b/src/shared/ratelimit.h -index 58efca7..434089e 100644 ---- a/src/shared/ratelimit.h -+++ b/src/shared/ratelimit.h -@@ -55,3 +55,11 @@ typedef struct RateLimit { - } while (false) - - bool ratelimit_test(RateLimit *r); -+ -+static inline void ratelimit_reset(RateLimit *rl) { -+ rl->num = rl->begin = 0; -+} -+ -+static inline bool ratelimit_configured(RateLimit *rl) { -+ return rl->interval > 0 && rl->burst > 0; -+} -diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h -index ffde7c8..f297c6a 100644 ---- a/src/systemd/sd-event.h -+++ b/src/systemd/sd-event.h -@@ -130,6 +130,9 @@ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec); - int sd_event_source_get_time_clock(sd_event_source *s, clockid_t *clock); - int sd_event_source_get_signal(sd_event_source *s); - int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid); -+int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval_usec, unsigned burst); -+int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval_usec, unsigned *ret_burst); -+int sd_event_source_is_ratelimited(sd_event_source *s); - - _SD_END_DECLARATIONS; - --- -2.17.1 - diff --git a/base/systemd/centos/patches/920-core-prevent-excessive-proc-self-mountinfo-parsing.patch b/base/systemd/centos/patches/920-core-prevent-excessive-proc-self-mountinfo-parsing.patch deleted file mode 100644 index 3ad4114ef..000000000 --- a/base/systemd/centos/patches/920-core-prevent-excessive-proc-self-mountinfo-parsing.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dc3e079395816ce251c4794992f1816a61c1215d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= -Date: Thu, 9 Jul 2020 18:16:44 +0200 -Subject: [PATCH 20/20] core: prevent excessive /proc/self/mountinfo parsing - -(cherry picked from commit d586f642fd90e3bb378f7b6d3e3a64a753e51756) - -Resolves: #1819868 - -[commit 51737206afaa10d902c86ec9b5ec97cf425039c2 from -https://github.com/systemd-rhel/rhel-8/] - -Signed-off-by: Li Zhou ---- - src/core/mount.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/core/mount.c b/src/core/mount.c -index c7aed23..48427b7 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -1692,6 +1692,12 @@ static int mount_enumerate(Manager *m) { - r = sd_event_source_set_priority(m->mount_utab_event_source, -10); - if (r < 0) - goto fail; -+ -+ r = sd_event_source_set_ratelimit(m->mount_event_source, 1 * USEC_PER_SEC, 5); -+ if (r < 0) { -+ log_error_errno(r, "Failed to enable rate limit for mount events: %m"); -+ goto fail; -+ } - } - - r = mount_load_proc_self_mountinfo(m, false); --- -2.17.1 - diff --git a/base/systemd/centos/patches/921-systemd-Fix-compiling-errors-when-merging-1819868.patch b/base/systemd/centos/patches/921-systemd-Fix-compiling-errors-when-merging-1819868.patch deleted file mode 100644 index 8498b6b1a..000000000 --- a/base/systemd/centos/patches/921-systemd-Fix-compiling-errors-when-merging-1819868.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 15ac2f7ffd502cdc6f4ba47d0dd70fc39c48d8d7 Mon Sep 17 00:00:00 2001 -From: Li Zhou -Date: Wed, 31 Mar 2021 16:08:18 +0800 -Subject: [PATCH 21/21] systemd: Fix compiling errors when merging #1819868 - -A series of patches are merged in for the issue: -https://bugzilla.redhat.com/show_bug.cgi?id=1819868 -This commit is for fixing the compiling errors caused by context -conflict. - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 9dc1a27..282b38f 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -37,9 +37,32 @@ - #include "list.h" - - #include "sd-event.h" -+#include "event-util.h" - - #define DEFAULT_ACCURACY_USEC (250 * USEC_PER_MSEC) - -+#define CMP(a, b) __CMP(UNIQ, (a), UNIQ, (b)) -+#define __CMP(aq, a, bq, b) \ -+ ({ \ -+ const typeof(a) UNIQ_T(A, aq) = (a); \ -+ const typeof(b) UNIQ_T(B, bq) = (b); \ -+ UNIQ_T(A, aq) < UNIQ_T(B, bq) ? -1 : \ -+ UNIQ_T(A, aq) > UNIQ_T(B, bq) ? 1 : 0; \ -+ }) -+ -+static inline usec_t usec_add(usec_t a, usec_t b) { -+ usec_t c; -+ -+ /* Adds two time values, and makes sure USEC_INFINITY as input results as USEC_INFINITY in output, and doesn't -+ * overflow. */ -+ -+ c = a + b; -+ if (c < a || c < b) /* overflow check */ -+ return USEC_INFINITY; -+ -+ return c; -+} -+ - typedef enum EventSourceType { - SOURCE_IO, - SOURCE_TIME_REALTIME, -@@ -2456,7 +2479,7 @@ static int source_dispatch(sd_event_source *s) { - - /* Check if we hit the ratelimit for this event source, if so, let's disable it. */ - assert(!s->ratelimited); -- if (!ratelimit_below(&s->rate_limit)) { -+ if (!ratelimit_test(&s->rate_limit)) { - r = event_source_enter_ratelimited(s); - if (r < 0) - return r; --- -2.17.1 - diff --git a/base/systemd/centos/patches/922-sd-event-change-ordering-of-pending-ratelimited-even.patch b/base/systemd/centos/patches/922-sd-event-change-ordering-of-pending-ratelimited-even.patch deleted file mode 100644 index 3c2b4e99c..000000000 --- a/base/systemd/centos/patches/922-sd-event-change-ordering-of-pending-ratelimited-even.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 762ba1d9cd3571f294965cb86525999e81fdec5d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 8 Jun 2021 00:07:51 -0700 -Subject: [PATCH 1/6] sd-event: change ordering of pending/ratelimited events - -Instead of ordering non-pending before pending we should order -"non-pending OR ratelimited" before "pending AND not-ratelimited". -This fixes a bug where ratelimited events were ordered at the end of the -priority queue and could be stuck there for an indeterminate amount of -time. - -(cherry picked from commit 81107b8419c39f726fd2805517a5b9faab204e59) - -Related: #1984406 - -[commit 93de7820843c175f4c9661dbfcb312e8ee09fbd3 from -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0)] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 48 +++++++++++++----------------- - 1 file changed, 20 insertions(+), 28 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 282b38f..fcf333e 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -352,25 +352,6 @@ static usec_t time_event_source_next(const sd_event_source *s) { - return USEC_INFINITY; - } - --static int earliest_time_prioq_compare(const void *a, const void *b) { -- const sd_event_source *x = a, *y = b; -- -- /* Enabled ones first */ -- if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) -- return -1; -- if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) -- return 1; -- -- /* Move the pending ones to the end */ -- if (!x->pending && y->pending) -- return -1; -- if (x->pending && !y->pending) -- return 1; -- -- /* Order by time */ -- return CMP(time_event_source_next(x), time_event_source_next(y)); --} -- - static usec_t time_event_source_latest(const sd_event_source *s) { - assert(s); - -@@ -389,7 +370,15 @@ static usec_t time_event_source_latest(const sd_event_source *s) { - return USEC_INFINITY; - } - --static int latest_time_prioq_compare(const void *a, const void *b) { -+static bool event_source_timer_candidate(const sd_event_source *s) { -+ assert(s); -+ -+ /* Returns true for event sources that either are not pending yet (i.e. where it's worth to mark them pending) -+ * or which are currently ratelimited (i.e. where it's worth leaving the ratelimited state) */ -+ return !s->pending || s->ratelimited; -+} -+ -+static int time_prioq_compare(const void *a, const void *b, usec_t (*time_func)(const sd_event_source *s)) { - const sd_event_source *x = a, *y = b; - - /* Enabled ones first */ -@@ -398,19 +387,22 @@ static int latest_time_prioq_compare(const void *a, const void *b) { - if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) - return 1; - -- /* Move the pending ones to the end */ -- if (!x->pending && y->pending) -+ /* Order "non-pending OR ratelimited" before "pending AND not-ratelimited" */ -+ if (event_source_timer_candidate(x) && !event_source_timer_candidate(y)) - return -1; -- if (x->pending && !y->pending) -+ if (!event_source_timer_candidate(x) && event_source_timer_candidate(y)) - return 1; - - /* Order by time */ -- if (time_event_source_latest(x) < time_event_source_latest(y)) -- return -1; -- if (time_event_source_latest(x) > time_event_source_latest(y)) -- return 1; -+ return CMP(time_func(x), time_func(y)); -+} - -- return 0; -+static int earliest_time_prioq_compare(const void *a, const void *b) { -+ return time_prioq_compare(a, b, time_event_source_next); -+} -+ -+static int latest_time_prioq_compare(const void *a, const void *b) { -+ return time_prioq_compare(a, b, time_event_source_latest); - } - - static int exit_prioq_compare(const void *a, const void *b) { --- -2.17.1 - diff --git a/base/systemd/centos/patches/923-sd-event-drop-unnecessary-else.patch b/base/systemd/centos/patches/923-sd-event-drop-unnecessary-else.patch deleted file mode 100644 index d3b5f3c0b..000000000 --- a/base/systemd/centos/patches/923-sd-event-drop-unnecessary-else.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9824f4e131b5ffea0be23dd25b24b953314f1a79 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Tue, 15 Jun 2021 00:44:04 +0900 -Subject: [PATCH 2/6] sd-event: drop unnecessary "else" - -(cherry picked from commit 7e2bf71ca3638e36ee33215ceee386ba8013da6d) - -Related: #1984406 - -[commit 3e7e54c63236c65aa01bb332fd5135a13e51b992 from -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0)] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index fcf333e..9b6d2f0 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -2199,8 +2199,8 @@ static int event_arm_timer( - - if (!d->needs_rearm) - return 0; -- else -- d->needs_rearm = false; -+ -+ d->needs_rearm = false; - - a = prioq_peek(d->earliest); - if (!a || a->enabled == SD_EVENT_OFF || time_event_source_next(a) == USEC_INFINITY) { --- -2.17.1 - diff --git a/base/systemd/centos/patches/924-sd-event-use-CMP-macro.patch b/base/systemd/centos/patches/924-sd-event-use-CMP-macro.patch deleted file mode 100644 index 221bcc497..000000000 --- a/base/systemd/centos/patches/924-sd-event-use-CMP-macro.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 766177b0afd897e43504c1228fe46ea03833df29 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Tue, 15 Jun 2021 00:51:33 +0900 -Subject: [PATCH 3/6] sd-event: use CMP() macro - -(cherry picked from commit 06e131477d82b83c5d516e66d6e413affd7c774a) - -Related: #1984406 - -[commit eaab8d57d9db0d98d7e618ba634983c34cdb9c06 from -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0)] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 37 ++++++++++++++---------------- - 1 file changed, 17 insertions(+), 20 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 9b6d2f0..84a874d 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -283,10 +283,9 @@ static int pending_prioq_compare(const void *a, const void *b) { - assert(y->pending); - - /* Enabled ones first */ -- if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) -- return -1; -- if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) -- return 1; -+ r = CMP(x->enabled == SD_EVENT_OFF, y->enabled == SD_EVENT_OFF); -+ if (r != 0) -+ return r; - - /* Non rate-limited ones first. */ - r = CMP(!!x->ratelimited, !!y->ratelimited); -@@ -310,10 +309,9 @@ static int prepare_prioq_compare(const void *a, const void *b) { - assert(y->prepare); - - /* Enabled ones first */ -- if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) -- return -1; -- if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) -- return 1; -+ r = CMP(x->enabled == SD_EVENT_OFF, y->enabled == SD_EVENT_OFF); -+ if (r != 0) -+ return r; - - /* Non rate-limited ones first. */ - r = CMP(!!x->ratelimited, !!y->ratelimited); -@@ -380,18 +378,17 @@ static bool event_source_timer_candidate(const sd_event_source *s) { - - static int time_prioq_compare(const void *a, const void *b, usec_t (*time_func)(const sd_event_source *s)) { - const sd_event_source *x = a, *y = b; -+ int r; - - /* Enabled ones first */ -- if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) -- return -1; -- if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) -- return 1; -+ r = CMP(x->enabled == SD_EVENT_OFF, y->enabled == SD_EVENT_OFF); -+ if (r != 0) -+ return r; - - /* Order "non-pending OR ratelimited" before "pending AND not-ratelimited" */ -- if (event_source_timer_candidate(x) && !event_source_timer_candidate(y)) -- return -1; -- if (!event_source_timer_candidate(x) && event_source_timer_candidate(y)) -- return 1; -+ r = CMP(!event_source_timer_candidate(x), !event_source_timer_candidate(y)); -+ if (r != 0) -+ return r; - - /* Order by time */ - return CMP(time_func(x), time_func(y)); -@@ -407,15 +404,15 @@ static int latest_time_prioq_compare(const void *a, const void *b) { - - static int exit_prioq_compare(const void *a, const void *b) { - const sd_event_source *x = a, *y = b; -+ int r; - - assert(x->type == SOURCE_EXIT); - assert(y->type == SOURCE_EXIT); - - /* Enabled ones first */ -- if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF) -- return -1; -- if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF) -- return 1; -+ r = CMP(x->enabled == SD_EVENT_OFF, y->enabled == SD_EVENT_OFF); -+ if (r != 0) -+ return r; - - /* Lower priority values first */ - if (x->priority < y->priority) --- -2.17.1 - diff --git a/base/systemd/centos/patches/925-sd-event-use-usec_add.patch b/base/systemd/centos/patches/925-sd-event-use-usec_add.patch deleted file mode 100644 index 2de30b5ac..000000000 --- a/base/systemd/centos/patches/925-sd-event-use-usec_add.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e2088e9fd7dd09c542d8c456b62dbd2d21ee9e51 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Tue, 15 Jun 2021 01:01:48 +0900 -Subject: [PATCH 4/6] sd-event: use usec_add() - -(cherry picked from commit a595fb5ca9c69c589e758e9ebe3b70ac90450ba3) - -Related: #1984406 - -[commit b8732d647162b50ce9b34de2ad7ae11a53f6e7ba from -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0)] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 84a874d..1cf1c41 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -2663,8 +2663,8 @@ static int arm_watchdog(sd_event *e) { - assert(e->watchdog_fd >= 0); - - t = sleep_between(e, -- e->watchdog_last + (e->watchdog_period / 2), -- e->watchdog_last + (e->watchdog_period * 3 / 4)); -+ usec_add(e->watchdog_last, (e->watchdog_period / 2)), -+ usec_add(e->watchdog_last, (e->watchdog_period * 3 / 4))); - - timespec_store(&its.it_value, t); - --- -2.17.1 - diff --git a/base/systemd/centos/patches/926-sd-event-make-event_source_time_prioq_reshuffle-acce.patch b/base/systemd/centos/patches/926-sd-event-make-event_source_time_prioq_reshuffle-acce.patch deleted file mode 100644 index 87a769ae0..000000000 --- a/base/systemd/centos/patches/926-sd-event-make-event_source_time_prioq_reshuffle-acce.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9a3a48fde35fd02981b44ff6b2e184f33377d36c Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Tue, 15 Jun 2021 02:03:02 +0900 -Subject: [PATCH 5/6] sd-event: make event_source_time_prioq_reshuffle() accept - all event source type - -But it does nothing for an event source which is neither a timer nor -ratelimited. - -(cherry picked from commit 5c08c7ab23dbf02aaf4e4bbae8e08a195da230a4) - -Related: #1984406 - -[commit 9f044118dbc6a0f04b3820ffaa9d4c7807ae48a7 -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0)] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 1cf1c41..6215bac 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -845,14 +845,15 @@ static void event_source_time_prioq_reshuffle(sd_event_source *s) { - assert(s); - - /* Called whenever the event source's timer ordering properties changed, i.e. time, accuracy, -- * pending, enable state. Makes sure the two prioq's are ordered properly again. */ -+ * pending, enable state, and ratelimiting state. Makes sure the two prioq's are ordered -+ * properly again. */ - - if (s->ratelimited) - d = &s->event->monotonic; -- else { -- assert(EVENT_SOURCE_IS_TIME(s->type)); -+ else if (EVENT_SOURCE_IS_TIME(s->type)) - assert_se(d = event_get_clock_data(s->event, s->type)); -- } -+ else -+ return; /* no-op for an event source which is neither a timer nor ratelimited. */ - - prioq_reshuffle(d->earliest, s, &s->earliest_index); - prioq_reshuffle(d->latest, s, &s->latest_index); --- -2.17.1 - diff --git a/base/systemd/centos/patches/927-sd-event-always-reshuffle-time-prioq-on-changing-onl.patch b/base/systemd/centos/patches/927-sd-event-always-reshuffle-time-prioq-on-changing-onl.patch deleted file mode 100644 index 7e00fb7a0..000000000 --- a/base/systemd/centos/patches/927-sd-event-always-reshuffle-time-prioq-on-changing-onl.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 71552a073ed08beb227b9b007fb9818f08923baa Mon Sep 17 00:00:00 2001 -From: Li Zhou -Date: Tue, 26 Oct 2021 11:46:48 +0800 -Subject: [PATCH 6/6] sd-event: always reshuffle time prioq on changing - online/offline state - -Before 81107b8419c39f726fd2805517a5b9faab204e59, the compare functions -for the latest or earliest prioq did not handle ratelimited flag. -So, it was ok to not reshuffle the time prioq when changing the flag. - -But now, those two compare functions also compare the source is -ratelimited or not. So, it is necessary to reshuffle the time prioq -after changing the ratelimited flag. - -Hopefully fixes #19903. - -(cherry picked from commit 2115b9b6629eeba7bc9f42f757f38205febb1cb7) - -Related: #1984406 - -[commit f5611a22d4a65ef440352792085774ce898adb0f from -https://github.com/systemd-rhel/rhel-8/ (branch rhel-8.4.0) - -LZ: Adapt the patch for context changes and no real change on the -patch.] - -Signed-off-by: Li Zhou ---- - src/libsystemd/sd-event/sd-event.c | 33 ++++++++++-------------------- - 1 file changed, 11 insertions(+), 22 deletions(-) - -diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 6215bac..c17b368 100644 ---- a/src/libsystemd/sd-event/sd-event.c -+++ b/src/libsystemd/sd-event/sd-event.c -@@ -1724,14 +1724,6 @@ static int event_source_offline( - source_io_unregister(s); - break; - -- case SOURCE_TIME_REALTIME: -- case SOURCE_TIME_BOOTTIME: -- case SOURCE_TIME_MONOTONIC: -- case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: -- event_source_time_prioq_reshuffle(s); -- break; -- - case SOURCE_SIGNAL: - event_gc_signal_data(s->event, &s->priority, s->signal.sig); - break; -@@ -1749,6 +1741,11 @@ static int event_source_offline( - prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); - break; - -+ case SOURCE_TIME_REALTIME: -+ case SOURCE_TIME_BOOTTIME: -+ case SOURCE_TIME_MONOTONIC: -+ case SOURCE_TIME_REALTIME_ALARM: -+ case SOURCE_TIME_BOOTTIME_ALARM: - case SOURCE_DEFER: - case SOURCE_POST: - break; -@@ -1757,6 +1754,9 @@ static int event_source_offline( - assert_not_reached("Wut? I shouldn't exist."); - } - -+ /* Always reshuffle time prioq, as the ratelimited flag may be changed. */ -+ event_source_time_prioq_reshuffle(s); -+ - return 1; - } - -@@ -1837,22 +1837,11 @@ static int event_source_online( - s->ratelimited = ratelimited; - - /* Non-failing operations below */ -- switch (s->type) { -- case SOURCE_TIME_REALTIME: -- case SOURCE_TIME_BOOTTIME: -- case SOURCE_TIME_MONOTONIC: -- case SOURCE_TIME_REALTIME_ALARM: -- case SOURCE_TIME_BOOTTIME_ALARM: -- event_source_time_prioq_reshuffle(s); -- break; -- -- case SOURCE_EXIT: -+ if (s->type == SOURCE_EXIT) - prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index); -- break; - -- default: -- break; -- } -+ /* Always reshuffle time prioq, as the ratelimited flag may be changed. */ -+ event_source_time_prioq_reshuffle(s); - - return 1; - } --- -2.17.1 - diff --git a/base/systemd/centos/srpm_path b/base/systemd/centos/srpm_path deleted file mode 100644 index a69a06ae5..000000000 --- a/base/systemd/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/systemd-219-78.el7_9.3.src.rpm diff --git a/base/tzdata/centos/build_srpm.data b/base/tzdata/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/base/tzdata/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/tzdata/centos/meta_patches/Install-leap-seconds.list-for-ptp-support.patch b/base/tzdata/centos/meta_patches/Install-leap-seconds.list-for-ptp-support.patch deleted file mode 100644 index 08dacbf85..000000000 --- a/base/tzdata/centos/meta_patches/Install-leap-seconds.list-for-ptp-support.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e5c32e5a5f80ce787dd169a7406d7e5436cb7d85 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Jim Somerville -Date: Mon, 6 Dec 2021 17:42:09 -0500 -Subject: [PATCH] Install leap-seconds.list for ptp support - -Signed-off-by: Jim Somerville ---- - SPECS/tzdata.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/tzdata.spec b/SPECS/tzdata.spec -index 8bfcc60..3e780ac 100644 ---- a/SPECS/tzdata.spec -+++ b/SPECS/tzdata.spec -@@ -133,6 +133,9 @@ cp -prd javazi $RPM_BUILD_ROOT%{_datadir}/javazi - mkdir -p $RPM_BUILD_ROOT%{_datadir}/javazi-1.8 - install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/ - -+# ptp requires the leap-seconds.list file -+install -p -m 644 leap-seconds.list $RPM_BUILD_ROOT%{_datadir}/zoneinfo -+ - %clean - rm -rf $RPM_BUILD_ROOT - --- -2.29.2 - diff --git a/base/tzdata/centos/meta_patches/PATCH_ORDER b/base/tzdata/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 5abeee47a..000000000 --- a/base/tzdata/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -Update-package-versioning-for-TIS-format.patch -Install-leap-seconds.list-for-ptp-support.patch diff --git a/base/tzdata/centos/meta_patches/Update-package-versioning-for-TIS-format.patch b/base/tzdata/centos/meta_patches/Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 5d2d93133..000000000 --- a/base/tzdata/centos/meta_patches/Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2fd8ca86ef141505384a49ea2a7bdf9c9c44bbb9 Mon Sep 17 00:00:00 2001 -Message-Id: <2fd8ca86ef141505384a49ea2a7bdf9c9c44bbb9.1657567631.git.Jim.Somerville@windriver.com> -From: Jim Somerville -Date: Mon, 6 Dec 2021 16:42:24 -0500 -Subject: [PATCH] Update package versioning for TIS format - -Signed-off-by: Jim Somerville ---- - SPECS/tzdata.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/tzdata.spec b/SPECS/tzdata.spec -index 41bcba5..36604e0 100644 ---- a/SPECS/tzdata.spec -+++ b/SPECS/tzdata.spec -@@ -3,7 +3,7 @@ Name: tzdata - Version: 2022a - %define tzdata_version 2022a - %define tzcode_version 2022a --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - License: Public Domain - Group: System Environment/Base - URL: https://www.iana.org/time-zones --- -2.29.2 - diff --git a/base/tzdata/centos/srpm_path b/base/tzdata/centos/srpm_path deleted file mode 100644 index da8743a04..000000000 --- a/base/tzdata/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/tzdata-2022a-1.el7.src.rpm diff --git a/base/watchdog/centos/build_srpm.data b/base/watchdog/centos/build_srpm.data deleted file mode 100644 index c3c7e2378..000000000 --- a/base/watchdog/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/base/watchdog/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/base/watchdog/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index e4b7ad2a6..000000000 --- a/base/watchdog/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 061c8b4c1db3fcb4a9e60eb826d1ac474067aae3 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 27 Sep 2016 10:55:15 -0400 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/watchdog.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/watchdog.spec b/SPECS/watchdog.spec -index 75ce3dd..88c4245 100644 ---- a/SPECS/watchdog.spec -+++ b/SPECS/watchdog.spec -@@ -2,7 +2,7 @@ - Summary: Software and/or Hardware watchdog daemon - Name: watchdog - Version: 5.13 --Release: 12%{?dist} -+Release: 12.el7%{?_tis_dist}.%{tis_patch_ver} - License: GPLv2+ - - URL: http://sourceforge.net/projects/watchdog/ --- -1.8.3.1 - diff --git a/base/watchdog/centos/meta_patches/PATCH_ORDER b/base/watchdog/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index f51d71338..000000000 --- a/base/watchdog/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -spec-TiS-changes.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/base/watchdog/centos/meta_patches/spec-TiS-changes.patch b/base/watchdog/centos/meta_patches/spec-TiS-changes.patch deleted file mode 100644 index fc6f3ac43..000000000 --- a/base/watchdog/centos/meta_patches/spec-TiS-changes.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 06d8868ea3f8eefa2627732ca606a66e847a79ec Mon Sep 17 00:00:00 2001 -From: Nam Ninh -Date: Wed, 1 Jun 2016 11:38:56 -0400 -Subject: [PATCH] watchdog: include TIS changes - -Add fix-ping-failure patch from OVP6. - -Signed-off-by: Nam Ninh ---- - SPECS/watchdog.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/watchdog.spec b/SPECS/watchdog.spec -index 7eeacc9..75ce3dd 100644 ---- a/SPECS/watchdog.spec -+++ b/SPECS/watchdog.spec -@@ -19,6 +19,7 @@ Patch1: 0001-watchdog-Clearer-help-output.patch - Patch2: 0002-wd_identify-wd_keepalive-Document-c-config-file-in-h.patch - Patch3: 0003-watchdog-5.13-rhsel.patch - Patch4: 0004-watchdog-5.13-rhseldoc.patch -+Patch5: fix-ping-failure.patch - - BuildRequires: systemd-units - -@@ -50,6 +51,7 @@ expiration) initiated by the BMC. - %patch2 -p1 -b .keepalive - %patch3 -p1 -b .rhsel - %patch4 -p1 -b .rhseldoc -+%patch5 -p1 -b .ping-failure - - cp %{SOURCE2} . - cp %{SOURCE3} . --- -1.8.3.1 - diff --git a/base/watchdog/centos/srpm_path b/base/watchdog/centos/srpm_path deleted file mode 100644 index 58c57a835..000000000 --- a/base/watchdog/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/watchdog-5.13-12.el7.src.rpm diff --git a/bmc/Redfishtool/centos/build_srpm.data b/bmc/Redfishtool/centos/build_srpm.data deleted file mode 100644 index 884e8ee1e..000000000 --- a/bmc/Redfishtool/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -COPY_LIST=" \ - $STX_BASE/downloads/Redfishtool-1.1.0.tar.gz \ - $PKG_BASE/files/* \ -" -TIS_PATCH_VER=PKG_GITREVCOUNT - diff --git a/bmc/Redfishtool/centos/redfishtool.spec b/bmc/Redfishtool/centos/redfishtool.spec deleted file mode 100644 index baf27c59f..000000000 --- a/bmc/Redfishtool/centos/redfishtool.spec +++ /dev/null @@ -1,61 +0,0 @@ -# -# SPDX-License-Identifier: BSD-3-Clause -# -# Copyright (c) 2016, Contributing Member(s) of Distributed Management -# Task Force, Inc.. All rights reserved. - -Summary: Redfish Tool Package -Name: Redfishtool -Version: 1.1.0 -Release: %{?_tis_dist}.%{tis_patch_ver} -#For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md -License: BSD-3-Clause. -Group: base -Packager: StarlingX -URL: https://github.com/DMTF/Redfishtool - -Source0: %{name}-%{version}.tar.gz - -BuildArch: noarch - -Patch01: 0001-Adapt-redfishtool-to-python2.patch - -BuildRequires: python-setuptools - -Requires: python-requests - -%description -Redfish Tool Package - -%define pythonroot /usr/lib64/python2.7/site-packages -%define debug_package %{nil} - -%prep -%setup -%patch01 -p1 - -# Remove bundled egg-info -rm -rf *.egg-info - -%build -%{__python} setup.py build - -%install -%{__python} setup.py install --root=%{buildroot} \ - --install-lib=%{pythonroot} \ - --prefix=/usr \ - --install-data=/usr/share \ - --single-version-externally-managed - -%post - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%doc LICENSE.md -%{pythonroot}/redfishtool/* -%{pythonroot}/redfishtool-%{version}*.egg-info - -%{_bindir}/redfishtool diff --git a/centos_build_layer.cfg b/centos_build_layer.cfg deleted file mode 100644 index 0e0933171..000000000 --- a/centos_build_layer.cfg +++ /dev/null @@ -1 +0,0 @@ -distro diff --git a/centos_extra_downloads.lst b/centos_extra_downloads.lst deleted file mode 100644 index e69de29bb..000000000 diff --git a/centos_guest_image.inc b/centos_guest_image.inc deleted file mode 100644 index 6ac1efcb4..000000000 --- a/centos_guest_image.inc +++ /dev/null @@ -1,20 +0,0 @@ -# List of packages to be included/installed in guest image -# If these have dependencies, they will be pulled in automatically -# - -# -# TPM2 libs to enable vTPM on Guest -# - -# tss2 -tss2 - -# tpm2-tools -tpm2-tools - -# -# ima support -# - -# rpm -rpm-plugin-systemd-inhibit diff --git a/centos_guest_image_rt.inc b/centos_guest_image_rt.inc deleted file mode 100644 index f1743de6c..000000000 --- a/centos_guest_image_rt.inc +++ /dev/null @@ -1,20 +0,0 @@ -# List of packages to be included/installed in RT guest image -# If these have dependencies, they will be pulled in automatically -# - -# -# TPM2 libs to enable vTPM on Guest -# - -# tss2 -tss2 - -# tpm2-tools -tpm2-tools - -# -# ima support -# - -# rpm -rpm-plugin-systemd-inhibit diff --git a/centos_iso_image.inc b/centos_iso_image.inc deleted file mode 100644 index b08d3bbab..000000000 --- a/centos_iso_image.inc +++ /dev/null @@ -1,192 +0,0 @@ -# List of packages to be included/installed in ISO -# If these have dependencies, they will be pulled in automatically -# - - - -# lldpd -lldpd - -# tss2 -tss2 - - -# libtpms -libtpms - -# python-3parclient -python-3parclient - -# python-lefthandclient -python-lefthandclient - -# docker-distribution -docker-distribution - -# helm -helm - -# armada -armada - -# rpm -rpm-plugin-systemd-inhibit - -# dpkg -dpkg - -# ldapscripts -ldapscripts - -# drbd -drbd -drbd-utils -drbd-udev -drbd-pacemaker -drbd-heartbeat -drbd-bash-completion - - -# initscripts -initscripts - -# setup -setup - -# nss-pam-ldapd -nss-pam-ldapd - - -# nfs-utils series package - -# dhcp -dhcp -dhclient - -# openssh -openssh -openssh-clients -openssh-server - -# facter -facter - -# vim -vim-enhanced - -# python -python - -# libvirt-python -python2-libvirt - -# lighttpd -lighttpd -lighttpd-fastcgi -lighttpd-mod_geoip -lighttpd-mod_mysql_vhost - -# linuxptp -linuxptp - -# logrotate -logrotate - -# novnc -novnc - -# sudo -sudo - -# config files - -# openldap -openldap -openldap-servers -openldap-clients - -# openvswitch -openvswitch - -# libevent -libevent - -# tpm2-tools -tpm2-tools - -# audit - -# puppet -puppet - -# systemd -systemd - -# tboot -tboot - -# memcached -memcached - -# kubernetes -kubernetes-unversioned -containerd -k8s-pod-recovery -k8s-cni-cache-cleanup -containernetworking-plugins -bond-cni - -# resource-agents -resource-agents - -# isolcpus device plugin for K8s -isolcpus-device-plugin - -# kubectl-cert-manager -kubectl-cert-manager - -# haproxy -haproxy - - -# iptables - -# python-psycopg2 -python-psycopg2 - -# dnsmasq -dnsmasq -dnsmasq-utils - -# parted -parted - -# python-keyring -python-keyring - -# grub2 -grub2-tools -grub2-efi-x64-modules - -# python2-ruamel-yaml -python2-ruamel-yaml - - -# redfish tool -Redfishtool - -# kvm-timer-advance (AIO and worker nodes only) -kvm-timer-advance - -# aws packages for interacting with amazon aws registry -# botocore is an unspecified requirement of boto3 -python2-botocore -python-boto3 - -# Pf bbdev configuration tool for ACC100 (Mt. Bryce) -pf-bb-config - -# kexec-tools -kexec-tools - -iproute-tc diff --git a/centos_pkg_dirs b/centos_pkg_dirs deleted file mode 100644 index d8f2bd7fe..000000000 --- a/centos_pkg_dirs +++ /dev/null @@ -1,100 +0,0 @@ -base/initscripts -base/setup -base/dhcp -base/linuxptp -base/openssh -config/facter -python/python-setuptools -virt/libvirt-python -base/lighttpd -python/python-voluptuous -networking/lldpd -logging/logrotate -security/shim-unsigned -security/shim-signed -base/sudo -virt/cloud-init -base/watchdog -ldap/openldap -networking/openvswitch -base/libevent -security/tss2 -security/tpm2-tools -security/libtpms -security/spectre-meltdown-checker -config/puppet-4.8.2 -config/puppet-modules/puppet-boolean-1.0.2 -config/puppet-modules/puppet-create_resources -config/puppet-modules/puppet-dnsmasq -config/puppet-modules/puppet-drbd-0.3.1 -config/puppet-modules/puppet-filemapper -config/puppet-modules/puppet-firewall-1.8.2 -config/puppet-modules/puppet-haproxy-1.5.0 -config/puppet-modules/puppet-ldap -config/puppet-modules/puppet-lvm -config/puppet-modules/puppet-network -config/puppet-modules/puppet-nslcd -config/puppet-modules/puppet-postgresql-4.8.0 -config/puppet-modules/puppet-puppi -config/puppet-modules/puppet-rabbitmq-5.5.0 -config/puppet-modules/puppet-staging -config/puppet-modules/puppet-stdlib-4.12.0 -config/puppet-modules/openstack/puppet-ceph-2.2.0 -config/puppet-modules/openstack/puppet-horizon-9.5.0 -config/puppet-modules/openstack/puppet-keystone-11.3.0 -config/puppet-modules/openstack/puppet-openstacklib-11.3.0 -config/puppet-modules/openstack/puppet-oslo-11.3.0 -base/systemd -storage-drivers/python-3parclient -storage-drivers/python-lefthandclient -storage-drivers/trident-installer -security/tboot -docker/python-docker -kubernetes/containerd -kubernetes/cni/plugins -kubernetes/cni/bond-cni -kubernetes/kubernetes-unversioned -kubernetes/docker-distribution -kubernetes/etcd -kubernetes/helm -kubernetes/chartmuseum -kubernetes/armada-helm-toolkit -kubernetes/armada -kubernetes/k8s-pod-recovery -kubernetes/k8s-cni-cache-cleanup -kubernetes/plugins/isolcpus-device-plugin -kubernetes/plugins/kubectl-cert-manager -python/python-kubernetes -grub/grubby -base/dpkg -base/cluster-resource-agents -base/libfdt -base/haproxy -base/ntp -ldap/ldapscripts -networking/net-tools -filesystem/drbd/drbd-tools -database/mariadb -database/python-psycopg2 -base/dnsmasq -filesystem/parted -security/python-keyring -grub/grub2 -ceph/ceph -bmc/Redfishtool -virt/kvm-timer-advance -requests-toolbelt -python/python-mechanize -python/python-html5lib -python/python-webencodings -python/python-daemon -base/inih -base/pf-bb-config -gpu/gpu-operator -tools/kexec-tools -tools/libbpf -networking/iproute -networking/iptables -networking/keepalived -networking/libnftnl -base/tzdata diff --git a/centos_pkg_dirs_installer b/centos_pkg_dirs_installer deleted file mode 100644 index 03b52a7a4..000000000 --- a/centos_pkg_dirs_installer +++ /dev/null @@ -1 +0,0 @@ -base/anaconda diff --git a/centos_pkg_dirs_rt b/centos_pkg_dirs_rt deleted file mode 100644 index 948e231bb..000000000 --- a/centos_pkg_dirs_rt +++ /dev/null @@ -1 +0,0 @@ -base/rt-setup diff --git a/centos_srpms_3rdparties.lst b/centos_srpms_3rdparties.lst deleted file mode 100644 index 4b196d3cb..000000000 --- a/centos_srpms_3rdparties.lst +++ /dev/null @@ -1,7 +0,0 @@ -iproute-5.12.0-4.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/iproute-5.12.0-4.el8.src.rpm -iptables-1.8.4-21.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/iptables-1.8.4-21.el8.src.rpm -keepalived-2.1.5-6.el8.src.rpm#http://vault.centos.org/8-stream/AppStream/Source/SPackages/keepalived-2.1.5-6.el8.src.rpm -libnftnl-1.1.5-4.el8.src.rpm#https://vault.centos.org/8-stream/BaseOS/Source/SPackages/libnftnl-1.1.5-4.el8.src.rpm -libvirt-python-4.7.0-1.fc28.src.rpm#https://libvirt.org/sources/python/libvirt-python-4.7.0-1.fc28.src.rpm -linuxptp-3.1.1-1.el8.src.rpm#http://vault.centos.org/8-stream/AppStream/Source/SPackages/linuxptp-3.1.1-1.el8.src.rpm -python-daemon-2.2.3-7.el8.src.rpm#http://vault.centos.org/8.0.1905/virt/Source/ovirt-44/python-daemon-2.2.3-7.el8.src.rpm diff --git a/centos_srpms_centos.lst b/centos_srpms_centos.lst deleted file mode 100644 index 77fd98837..000000000 --- a/centos_srpms_centos.lst +++ /dev/null @@ -1,44 +0,0 @@ -anaconda-21.48.22.147-1.el7.centos.src.rpm -cloud-init-0.7.9-24.el7.centos.1.src.rpm -dhcp-4.2.5-82.el7.centos.src.rpm -dnsmasq-2.76-7.el7.src.rpm -facter-2.4.4-4.el7.src.rpm -grub2-2.02-0.86.el7.centos.src.rpm -grubby-8.28-25.el7.src.rpm -haproxy-1.5.18-8.el7.src.rpm -initscripts-9.49.46-1.el7.src.rpm -libevent-2.0.21-4.el7.src.rpm -lighttpd-1.4.54-1.el7.src.rpm -linuxptp-2.0-2.el7.src.rpm -logrotate-3.8.6-17.el7.src.rpm -net-tools-2.0-0.24.20131004git.el7.src.rpm -ntp-4.2.6p5-29.el7.centos.2.src.rpm -openldap-2.4.44-20.el7.src.rpm -openssh-7.4p1-21.el7.src.rpm -parted-3.1-29.el7.src.rpm -puppet-4.8.2-1.el7.src.rpm -puppet-ceph-2.4.1-1.el7.src.rpm -puppet-firewall-1.8.2-2.2f892e9git.el7.src.rpm -puppet-haproxy-1.5.0-4.6ffcb07git.el7.src.rpm -puppet-horizon-11.5.0-1.el7.src.rpm -puppet-keystone-11.3.0-1.el7.src.rpm -puppet-openstacklib-11.5.0-1.el7.src.rpm -puppet-oslo-11.3.0-1.el7.src.rpm -puppet-rabbitmq-5.6.0-4.5ac45degit.el7.src.rpm -puppet-staging-1.0.4-1.b466d93git.el7.src.rpm -puppet-stdlib-4.18.0-2.el7.src.rpm -python-docker-3.3.0-1.el7.src.rpm -python-keyring-5.7.1-1.el7.src.rpm -python-kubernetes-8.0.0-8.el7.src.rpm -python-psycopg2-2.5.1-3.el7.src.rpm -python-voluptuous-0.8.9-1.el7.src.rpm -resource-agents-4.1.1-12.el7_6.7.src.rpm -setup-2.8.71-10.el7.src.rpm -shim-15-1.el7.centos.src.rpm -shim-signed-15-1.el7.centos.src.rpm -sudo-1.8.23-10.el7_9.1.src.rpm -systemd-219-78.el7_9.3.src.rpm -tboot-1.9.6-3.el7.src.rpm -tpm2-tools-3.0.4-2.el7.src.rpm -tzdata-2022a-1.el7.src.rpm -watchdog-5.13-12.el7.src.rpm diff --git a/centos_stable_docker_images.inc b/centos_stable_docker_images.inc deleted file mode 100644 index bde82b2c3..000000000 --- a/centos_stable_docker_images.inc +++ /dev/null @@ -1,3 +0,0 @@ -database/mariadb -kubernetes/n3000 -networking/openvswitch diff --git a/centos_stable_wheels.inc b/centos_stable_wheels.inc deleted file mode 100644 index bcaed2c23..000000000 --- a/centos_stable_wheels.inc +++ /dev/null @@ -1 +0,0 @@ -libvirt-python-wheels diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst deleted file mode 100644 index 782bc125a..000000000 --- a/centos_tarball-dl.lst +++ /dev/null @@ -1,91 +0,0 @@ -armada-7ef4b8643b5ec5216a8f6726841e156c0aa54a1a.tar.gz#armada#https://github.com/airshipit/armada/tarball/7ef4b8643b5ec5216a8f6726841e156c0aa54a1a#http## -blkin-f24ceec055ea236a093988237a9821d145f5f7c8.tar.gz#blkin#https://api.github.com/repos/ceph/blkin/tarball/f24ceec055ea236a093988237a9821d145f5f7c8#https## -boost_1_67_0.tar.bz2#boost_1_67_0#https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2#https## -boost_1_72_0.tar.bz2#boost_1_72_0#https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2#https## -c-ares-fd6124c74da0801f23f9d324559d8b66fb83f533.tar.gz#c-ares#https://api.github.com/repos/ceph/c-ares/tarball/fd6124c74da0801f23f9d324559d8b66fb83f533#https## -ceph-erasure-code-corpus-2d7d78b9cc52e8a9529d8cc2d2954c7d375d5dd7.tar.gz#ceph-erasure-code-corpus#https://api.github.com/repos/ceph/ceph-erasure-code-corpus/tarball/2d7d78b9cc52e8a9529d8cc2d2954c7d375d5dd7#https## -ceph-object-corpus-e32bf8ca3dc6151ebe7f205ba187815bc18e1cef.tar.gz#ceph-object-corpus#https://api.github.com/repos/ceph/ceph-object-corpus/tarball/e32bf8ca3dc6151ebe7f205ba187815bc18e1cef#https## -chartmuseum-0.12.0.tar.gz#chartmuseum#https://github.com/helm/chartmuseum/archive/v0.12.0.tar.gz#https## -!chartmuseum-v0.12.0-amd64#chartmuseum-bin#https://s3.amazonaws.com/chartmuseum/release/v0.12.0/bin/linux/amd64/chartmuseum#https## -civetweb-bb99e93da00c3fe8c6b6a98520fb17cf64710ce7.tar.gz#civetweb#https://api.github.com/repos/ceph/civetweb/tarball/bb99e93da00c3fe8c6b6a98520fb17cf64710ce7#https## -containerd-v1.4.11.tar.gz#containerd#https://github.com/containerd/containerd/archive/v1.4.11.tar.gz#https## -crictl-v1.21.0-linux-amd64.tar.gz#crictl#https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.21.0/crictl-v1.21.0-linux-amd64.tar.gz#https## -dmclock-4496dbc6515db96e08660ac38883329c5009f3e9.tar.gz#dmclock#https://api.github.com/repos/ceph/dmclock/tarball/4496dbc6515db96e08660ac38883329c5009f3e9#https## -docker-distribution-v2.7.1.tar.gz#docker-distribution-2.7.1#https://github.com/docker/distribution/archive/v2.7.1.tar.gz#http## -# docker-libtrust-fa567046d9b14f6aa788882a950d69651d230b21.tar.gz#docker-libtrust#https://github.com/docker/libtrust/archive/fa567046d9b14f6aa788882a950d69651d230b21.tar.gz#http## -dpdk-18.11.tar.xz#dpdk-18.11#http://fast.dpdk.org/rel/dpdk-18.11.tar.xz#http## -dpdk-96fae0e24c9088d9690c38098b25646f861a664b.tar.gz#dpdk-96fae0e24c9088d9690c38098b25646f861a664b#https://api.github.com/repos/spdk/dpdk/tarball/96fae0e24c9088d9690c38098b25646f861a664b#https## -dpdk-a1774652fbbb1fe7c0ff392d5e66de60a0154df6.tar.gz#dpdk-a1774652fbbb1fe7c0ff392d5e66de60a0154df6#https://api.github.com/repos/ceph/dpdk/tarball/a1774652fbbb1fe7c0ff392d5e66de60a0154df6#https## -dpkg_1.18.24.tar.xz#dpkg-1.18.24#http://http.debian.net/debian/pool/main/d/dpkg/dpkg_1.18.24.tar.xz#http## -drbd-utils-9.15.1.tar.gz#drbd-utils-9.15.1#https://pkg.linbit.com//downloads/drbd/utils/drbd-utils-9.15.1.tar.gz#https## -dtc-1.4.4.tar.gz#dtc-1.4.4#https://www.kernel.org/pub/software/utils/dtc/dtc-1.4.4.tar.gz#http## -eppic_050615.tar.gz#eppic#https://src.fedoraproject.org/repo/extras/kexec-tools/eppic_050615.tar.gz/sha512/de23c3cd59ded23f2f0092c194b2169e78fcd385a8df7daf34b36f3bb2d5ddac2cdd3657bbe640beec447725988e928962baf62cf9deff8849da734390280a4f/eppic_050615.tar.gz#https## -etcd-v3.3.15.tar.gz#etcd-v3.3.15#https://github.com/etcd-io/etcd/archive/v3.3.15.tar.gz#http## -fmt-80021e25971e44bb6a6d187c0dac8a1823436d80.tar.gz#fmt#https://api.github.com/repos/ceph/fmt/tarball/80021e25971e44bb6a6d187c0dac8a1823436d80#https## -gf-complete-7e61b44404f0ed410c83cfd3947a52e88ae044e1.tar.gz#gf-complete#https://api.github.com/repos/ceph/gf-complete/tarball/7e61b44404f0ed410c83cfd3947a52e88ae044e1#https## -# gnocchi-4.2.5.tar.gz#gnocchi-4.2.5#https://pypi.io/packages/source/g/gnocchi/gnocchi-4.2.5.tar.gz#http## -# gnocchiclient-7.0.1.tar.gz#gnocchiclient-7.0.1#https://pypi.io/packages/source/g/gnocchiclient/gnocchiclient-7.0.1.tar.gz#http## -gnulib-ffc927e.tar.gz#gnulib-ffc927e#http://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-ffc927eef29016a5219cd969daad8928af6a1f4d.tar.gz#http## -googletest-0a439623f75c029912728d80cb7f1b8b48739ca4.tar.gz#googletest#https://api.github.com/repos/google/googletest/tarball/0a439623f75c029912728d80cb7f1b8b48739ca4#https## -googletest-fdb850479284e2aae047b87df6beae84236d0135.tar.gz#googletest#https://api.github.com/repos/ceph/googletest/tarball/fdb850479284e2aae047b87df6beae84236d0135#https## -# gophercloud-gophercloud-aa00757ee3ab58e53520b6cb910ca0543116400a.tar.gz#gophercloud-gophercloud#github.com/gophercloud/gophercloud/archive/aa00757ee3ab58e53520b6cb910ca0543116400a.tar.gz#http## -# gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#gorilla-context#https://github.com/gorilla/context/archive/08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#http## -# gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http## -helm-v3.2.1-linux-amd64.tar.gz#linux-amd64#https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz#http## -!helm-2to3-0.10.0.tar.gz#helm-2to3-0.10.0#https://github.com/helm/helm-2to3/releases/download/v0.10.0/helm-2to3_0.10.0_linux_amd64.tar.gz#https## -!helm-mapkubeapis_0.3.0.tar.gz#helm-mapkubeapis_0.3.0#https://github.com/helm/helm-mapkubeapis/releases/download/v0.3.0/helm-mapkubeapis_0.3.0_linux_amd64.tar.gz#https## -intel-ipsec-mb-134c90c912ea9376460e9d949bb1319a83a9d839.tar.gz#intel-ipsec-mb#https://api.github.com/repos/spdk/intel-ipsec-mb/tarball/134c90c912ea9376460e9d949bb1319a83a9d839#https## -isa-l-7e1a337433a340bc0974ed0f04301bdaca374af6.tar.gz#isa-l#https://api.github.com/repos/ceph/isa-l/tarball/7e1a337433a340bc0974ed0f04301bdaca374af6#https## -isa-l_crypto-603529a4e06ac8a1662c13d6b31f122e21830352.tar.gz#isa-l_crypto#https://api.github.com/repos/01org/isa-l_crypto/tarball/603529a4e06ac8a1662c13d6b31f122e21830352#https## -jerasure-96c76b89d661c163f65a014b8042c9354ccf7f31.tar.gz#jerasure#https://api.github.com/repos/ceph/jerasure/tarball/96c76b89d661c163f65a014b8042c9354ccf7f31#https## -kexec-tools-2.0.21.tar.xz#kexec-tools-2.0.21#https://www.kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.21.tar.xz#https## -!kdump-anaconda-addon-003-29-g4c517c5.tar.gz#kexec-tools#https://vault.centos.org/7.6.1810/os/Source/SPackages/kexec-tools-2.0.15-21.el7.src.rpm#https## -keycodemapdb-16e5b07.tar.gz#keycodemapdb#https://github.com/CendioOssman/keycodemapdb/tarball/16e5b0787687d8904dad2c026107409eb9bfcb95#http## -kubectl-cert_manager-linux-amd64.tar.gz#LICENSES#https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/kubectl-cert_manager-linux-amd64.tar.gz#https## -kubernetes-contrib-v1.18.1.tar.gz#kubernetes-contrib-1.18.1#https://github.com/kubernetes-retired/contrib/tarball/89f6948e24578fed2a90a87871b2263729f90ac3#http## -kvm-unit-tests.git-4ea7633.tar.bz2#kvm-unit-tests#https://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git/snapshot/kvm-unit-tests-20171020.tar.gz#http## -ldapscripts-2.0.8.tgz#ldapscripts-2.0.8#https://sourceforge.net/projects/ldapscripts/files/ldapscripts/ldapscripts-2.0.8/ldapscripts-2.0.8.tgz/download#http## -libbpf-0.5.0.tar.gz#libbpf-0.5.0#https://github.com/libbpf/libbpf/archive/v0.5.0.tar.gz#https## -libtpms-0.6.0-4f0d59d.tar.gz#libtpms-0.6.0#https://github.com/stefanberger/libtpms/tarball/c421ca0f4d00c0caceeda8d62c1efb2b7e47db04#http## -lldpd-0.9.0.tar.gz#lldpd-0.9.0#https://media.luffy.cx/files/lldpd/lldpd-0.9.0.tar.gz#http## -lua-1fce39c6397056db645718b8f5821571d97869a4.tar.gz#lua#https://api.github.com/repos/ceph/lua/tarball/1fce39c6397056db645718b8f5821571d97869a4#https## -makedumpfile-1.6.9.tar.gz#makedumpfile-1.6.9#https://github.com/makedumpfile/makedumpfile/releases/download/1.6.9/makedumpfile-1.6.9.tar.gz#https## -!mariadb-10.1.28.tar.gz#mariadb-10.1.28#https://github.com/MariaDB/server/archive/mariadb-10.1.28.tar.gz#http_script##post-dl-script/mariadb.sh -openstack-helm-infra-c9d6676bf9a5aceb311dc31dadd07cba6a3d6392.tar.gz#openstack-helm-infra#https://github.com/openstack/openstack-helm-infra/archive/c9d6676bf9a5aceb311dc31dadd07cba6a3d6392.tar.gz#http## -openvswitch-2.11.0.tar.gz#openvswitch-2.11.0#https://github.com/openvswitch/ovs/archive/v2.11.0.tar.gz#http## -puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http## -puppet-dnsmasq-cff07e90890662972c97684a2baee964f68ff3ed.tar.gz#packstack/puppet/modules/dnsmasq/#https://github.com/procore/puppet-dnsmasq/tarball/cff07e90890662972c97684a2baee964f68ff3ed#http## -puppet-filemapper-9b53310278e76827bbe12a36cc6470d77071abb2.tar.gz#packstack/puppet/modules/filemapper#https://github.com/voxpupuli/puppet-filemapper/tarball/9b53310278e76827bbe12a36cc6470d77071abb2#http## -puppetlabs-create_resources-4639819a7f3a4fa9310d2ba583c63e467df7e2c3.tar.gz#packstack/puppet/modules/create_resources#https://github.com/puppetlabs/puppetlabs-create_resources/tarball/4639819a7f3a4fa9310d2ba583c63e467df7e2c3#http## -puppetlabs-drbd-496b3ba9cd74a2d12636f9e90a718739a5451169.tar.gz#puppetlabs-drbd#https://github.com/voxpupuli/puppet-drbd/tarball/496b3ba9cd74a2d12636f9e90a718739a5451169#http## -puppetlabs-lvm-d0283da637ae24550fb4ba109a48ef8d5d8c8b84.tar.gz#packstack/puppet/modules/lvm#https://github.com/puppetlabs/puppetlabs-lvm/tarball/d0283da637ae24550fb4ba109a48ef8d5d8c8b84#http## -puppetlabs-postgresql-d022a56b28b2174456fc0f6adc51a4b54493afad.tar.gz#puppetlabs-postgresql#https://github.com/puppetlabs/puppetlabs-postgresql/tarball/d022a56b28b2174456fc0f6adc51a4b54493afad#http## -puppet-ldap-480f13af6d17d1d3fcf0dc7b4bd04b49fa4099e1.tar.gz#puppet-ldap-master#https://github.com/torian/puppet-ldap/tarball/480f13af6d17d1d3fcf0dc7b4bd04b49fa4099e1#http## -puppet-network-7deacd5fdc22c0543455878a8d1872f2f5417c1d.tar.gz#packstack/puppet/modules/network#https://github.com/voxpupuli/puppet-network/tarball/7deacd5fdc22c0543455878a8d1872f2f5417c1d#http## -puppet-nslcd-b8c19b1ada89865f2e50758e054583798ad8011a.tar.gz#packstack/puppet/modules/nslcd#https://github.com/jlyheden/puppet-nslcd/tarball/b8c19b1ada89865f2e50758e054583798ad8011a#http## -puppi-c1c47f4edfd761d1bbde32a75da0c3fa7cc93a81.tar.gz#puppi-master#https://github.com/example42/puppi/tarball/c1c47f4edfd761d1bbde32a75da0c3fa7cc93a81#http## -# python-cephclient-v0.1.0.5.tar.gz#python-cephclient-0.1.0.5#https://github.com/dmsimard/python-cephclient/archive/v0.1.0.5.tar.gz#http## -mechanize-0.4.5.tar.gz#mechanize-0.4.5#https://github.com/python-mechanize/mechanize/archive/v0.4.5.tar.gz#http## -html5lib-python-1.0.1.tar.gz#html5lib-1.0.1#https://github.com/html5lib/html5lib-python/archive/1.0.1.tar.gz#http## -python-webencodings-0.5.1.tar.gz#webencodings-0.5.1#https://github.com/gsnedders/python-webencodings/archive/v0.5.1.tar.gz#http## -python-setuptools-v38.5.1.tar.gz#setuptools-38.5.1#https://github.com/pypa/setuptools/archive/v38.5.1.tar.gz#http## -rapidjson-f54b0e47a08782a6131cc3d60f94d038fa6e0a51.tar.gz#rapidjson#https://api.github.com/repos/ceph/rapidjson/tarball/f54b0e47a08782a6131cc3d60f94d038fa6e0a51#https## -Redfishtool-1.1.0.tar.gz#Redfishtool-1.1.0#https://github.com/DMTF/Redfishtool/archive/1.1.0.tar.gz#http## -requests-toolbelt-0.9.1.tar.gz#requests-toolbelt-0.9.1#https://github.com/requests/toolbelt/archive/0.9.1.tar.gz#http## -rocksdb-4c736f177851cbf9fb7a6790282306ffac5065f8.tar.gz#rocksdb#https://api.github.com/repos/ceph/rocksdb/tarball/4c736f177851cbf9fb7a6790282306ffac5065f8#https## -runc-1.0.2.tar.gz#runc#https://github.com/opencontainers/runc/archive/refs/tags/v1.0.2.tar.gz#https## -!rt-setup-2.1-2.el8.src.rpm#rt-setup#https://git.centos.org/rpms/rt-setup#http_script#201aeb6d3d06c556cee369b9833539ecb67ce943#post-dl-script/rt-setup.sh -# Sirupsen-logrus-55eb11d21d2a31a3cc93838241d04800f52e823d.tar.gz#Sirupsen-logrus#github.com/Sirupsen/logrus/archive/55eb11d21d2a31a3cc93838241d04800f52e823d.tar.gz#http## -seastar-0cf6aa6b28d69210b271489c0778f226cde0f459.tar.gz#seastar#https://api.github.com/repos/ceph/seastar/tarball/0cf6aa6b28d69210b271489c0778f226cde0f459#https## -spawn-5f4742f647a5a33b9467f648a3968b3cd0a681ee.tar.gz#spawn#https://api.github.com/repos/ceph/spawn/tarball/5f4742f647a5a33b9467f648a3968b3cd0a681ee#https## -spdk-fd292c568f72187e172b98074d7ccab362dae348.tar.gz#spdk#https://api.github.com/repos/ceph/spdk/tarball/fd292c568f72187e172b98074d7ccab362dae348#https## -spectre-meltdown-checker-0.37+-5cc77741.tar.gz#spectre-meltdown-checker#https://github.com/speed47/spectre-meltdown-checker/tarball/5cc77741af1d2f52140aa9f89339f56b6c4b6783#http## -trident-installer-22.07.0.tar.gz#trident-installer-22.07.0#https://github.com/NetApp/trident/releases/download/v22.07.0/trident-installer-22.07.0.tar.gz#https## -!tss2-930.tar.gz#tss2-930#https://git.code.sf.net/p/ibmtpm20tss/tss#git#v930# -xxHash-1f40c6511fa8dd9d2e337ca8c9bc18b3e87663c9.tar.gz#xxHash#https://api.github.com/repos/ceph/xxHash/tarball/1f40c6511fa8dd9d2e337ca8c9bc18b3e87663c9#https## -zstd-b706286adbba780006a47ef92df0ad7a785666b6.tar.gz#zstd#https://api.github.com/repos/facebook/zstd/tarball/b706286adbba780006a47ef92df0ad7a785666b6#https## -inih-b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69.tar.gz#inih-44#https://github.com/benhoyt/inih/tarball/b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69#https## -pf-bb-config-d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585.tar.gz#pf-bb-config-21.6#https://github.com/intel/pf-bb-config/tarball/d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585#https## -gpu-operator-1.8.1.tar.gz#gpu-operator-1.8.1#https://github.com/NVIDIA/gpu-operator/archive/v1.8.1.tar.gz##https## -containernetworking-plugins-v1.0.1.tar.gz#containernetworking-plugins-v1.0.1#https://github.com/containernetworking/plugins/archive/refs/tags/v1.0.1.tar.gz#https## -bond-cni-bff6422d7089d988dc1548e6abe0543601f6e1c7.tar.gz#bond-cni-bff6422d7089d988dc1548e6abe0543601f6e1c7#https://api.github.com/repos/k8snetworkplumbingwg/bond-cni/tarball/bff6422d7089d988dc1548e6abe0543601f6e1c7#https## diff --git a/ceph/ceph/centos/build_srpm b/ceph/ceph/centos/build_srpm deleted file mode 100755 index f2b810d34..000000000 --- a/ceph/ceph/centos/build_srpm +++ /dev/null @@ -1,303 +0,0 @@ -#!/bin/bash -# Copyright (c) 2019 Intel Corporation. -# -# SPDX-License-Identifier: Apache-2.0 - -# set -x - -source "$SRC_BASE/build-tools/spec-utils" -source "$SRC_BASE/build-tools/srpm-utils" - -CUR_DIR=`pwd` -BUILD_DIR="$RPMBUILD_BASE" - - -echo "ceph customization build_srpm : check environment variable DATA " -if [ "x$DATA" == "x" ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): Environment variable 'DATA' not defined." - exit 1 -fi -echo "ceph customization build_srpm : check environment variable DATA = $DATA" - -echo "ceph customization build_srpm : check build_srpm.data by executing srpm_source_build_data $DATA " -srpm_source_build_data $DATA -if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): Failed to source build data from $DATA" - exit 1 -fi - -echo "ceph customization build_srpm : get ceph version from ceph.spec." -if [ "x$VERSION" == "x" ]; then - for SPEC in `find $SPECS_BASE -name '*.spec' | sort -V`; do - SPEC_PATH="$SPEC" - - VERSION_DERIVED=`spec_evaluate '%{version}' "$SPEC_PATH" 2>> /dev/null` - if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): '%{version}' not found in '$PKG_BASE/$SPEC_PATH'" - VERSION_DERIVED="" - fi - - if [ "x$VERSION_DERIVED" != "x" ]; then - if [ "x$VERSION" == "x" ]; then - VERSION=$VERSION_DERIVED - else - if [ "x$SRC_DIR" != "x" ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): multiple spec files found, can't set VERSION automatically" - exit 1 - fi - fi - fi - done - - if [ "x$VERSION" != "x" ]; then - echo "ceph customization build_srpm : Derived VERSION=$VERSION" - else - echo "ERROR: ceph customization build_srpm (${LINENO}): Failed to derive a good VERSION from SPEC file, and none provided." - exit 1 - fi -fi -echo "ceph customization build_srpm : get ceph version from ceph.spec : VERSION = $VERSION" - -echo "ceph customization build_srpm : get ceph tar_name from ceph.spec." -if [ "x$TAR_NAME" == "x" ]; then - for SPEC in `find $SPECS_BASE -name '*.spec' | sort -V`; do - SPEC_PATH="$SPEC" - - SERVICE=`spec_find_global service "$SPEC_PATH" 2>> /dev/null` - if [ $? -eq 0 ]; then - if [ "x$TAR_NAME" == "x" ]; then - TAR_NAME=$SERVICE - else - if [ "x$SRC_DIR" != "x" ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): multiple spec files found, can't set TAR_NAME automatically" - exit 1 - fi - fi - else - NAME=`spec_find_tag Name "$SPEC_PATH" 2>> /dev/null` - if [ $? -eq 0 ]; then - if [ "x$TAR_NAME" == "x" ]; then - TAR_NAME=$NAME - else - if [ "x$SRC_DIR" != "x" ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): multiple spec files found, can't set TAR_NAME automatically" - exit 1 - fi - fi - else - echo "WARNING: ceph customization build_srpm (${LINENO}): 'Name' not found in '$SPEC_PATH'" - NAME="" - fi - fi - done - - if [ "x$TAR_NAME" != "x" ]; then - echo "ceph customization build_srpm : Derived TAR_NAME=$TAR_NAME" - else - echo "ERROR: ceph customization build_srpm (${LINENO}): Failed to derive a good TAR_NAME from SPEC file, and none provided." - exit 1 - fi -fi -echo "ceph customization build_srpm : get ceph tar name from ceph.spec : TAR_NAME=$TAR_NAME" - -if [ "x$TAR" == "x" ]; then - TAR="$TAR_NAME-$VERSION.tar.gz" -fi - -SOURCE_PATH="$BUILD_DIR/SOURCES" -TAR_PATH="$SOURCE_PATH/$TAR" -STAGING="" - -echo "ceph customization build_srpm : check copy_list_to_tar and exclude_list_from_tar." -if [ "x$COPY_LIST_TO_TAR" != "x" ] || [ "x$EXCLUDE_LIST_FROM_TAR" != "x" ]; then - STAGING="$BUILD_DIR/staging" - mkdir -p $STAGING - echo "ceph customization build_srpm : check copy_list_to_tar and exclude_list_from_tar....yes, so create new folder : $BUILD_DIR/staging" -else - echo "ceph customization build_srpm : check copy_list_to_tar and exclude_list_from_tar....ignore it." -fi - -mkdir -p "$BUILD_DIR/SRPMS" -if [ ! -d "$BUILD_DIR/SRPMS" ]; then - echo "ERROR: ceph customization build_srpm : failed to found $BUILD_DIR/SRPMS" - exit 1 -fi - -mkdir -p "$SOURCE_PATH" -if [ ! -d "$SOURCE_PATH" ]; then - echo "ERROR: ceph customization build_srpm : failed to found $SOURCE_PATH" - exit 1 -fi - -if [ "x$SRC_DIR" == "x" -a "x$COPY_LIST" == "x" -a "$ALLOW_EMPTY_RPM" != "true" ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): '$PWD/$DATA' failed to provide at least one of 'SRC_DIR' or 'COPY_LIST'" - exit 1 -fi - - -echo "ceph customization build_srpm : check ceph git tree directory : $SRC_DIR" -if [ "x$SRC_DIR" != "x" ]; then - if [ ! -d "$SRC_DIR" ]; then - echo "ERROR: ceph customization build_srpm : check ceph git tree directory not found: '$SRC_DIR'" - exit 1 - fi -fi - -pushd $SRC_DIR -echo "ceph customization build_srpm : create src/.git_version file" -(git rev-parse HEAD ; echo "v${VERSION}") 2> /dev/null > src/.git_version -popd - -echo "ceph customization build_srpm : check COPY_LIST " -if [ "x$COPY_LIST" != "x" ]; then - echo "ceph customization build_srpm : check COPY_LIST.....yes" - echo "COPY_LIST: $COPY_LIST" - for p in $COPY_LIST; do - # echo "COPY_LIST: $p" - \cp -L -u -r -v $p $SOURCE_PATH - if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): COPY_LIST: file not found: '$p'" - exit 1 - fi - done -else - echo "ceph customization build_srpm : check COPY_LIST.....igonre it" -fi - -echo "ceph customization build_srpm : check staging folder " -if [ "x$STAGING" != "x" ]; then - \cp -L -u -r -v $SRC_DIR $STAGING - echo "COPY_LIST_TO_TAR: $COPY_LIST_TO_TAR" - for p in $COPY_LIST_TO_TAR; do - # echo "COPY_LIST_TO_TAR: $p" - \cp -L -u -r -v $p $STAGING/$SRC_DIR - if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): COPY_LIST_TO_TAR: file not found: '$p'" - exit 1 - fi - done - echo "EXCLUDE_LIST_FROM_TAR: $EXCLUDE_LIST_FROM_TAR" - for p in $EXCLUDE_LIST_FROM_TAR; do - # echo "EXCLUDE_LIST_FROM_TAR: $p" - echo "rm -rf $STAGING/$SRC_DIR/$p" - \rm -rf $STAGING/$SRC_DIR/$p - if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): EXCLUDE_LIST_FROM_TAR: could not remove file: '$p'" - exit 1 - fi - done -else - echo "ceph customization build_srpm : check staging folder...don't exist" -fi - -TRANSFORM=`echo "$SRC_DIR" | sed 's/^\./\\./' | sed 's:^/::'` - -if [ "x$STAGING" != "x" ]; then - pushd $STAGING -fi - -echo "ceph customization build_srpm : check whether need ceph tar file" -TAR_NEEDED=0 -if [ "x$SRC_DIR" != "x" ]; then - if [ -e $TAR_PATH ]; then - n=`find . -cnewer $TAR_PATH -and ! -path './.git*' \ - -and ! -path './build/*' \ - -and ! -path './.pc/*' \ - -and ! -path './patches/*' \ - -and ! -path "./$DISTRO/*" \ - -and ! -path './pbr-*.egg/*' \ - | wc -l` - if [ $n -gt 0 ]; then - echo "ceph customization build_srpm : check whether need ceph tar file...needed" - TAR_NEEDED=1 - fi - else - echo "ceph customization build_srpm : check whether need ceph tar file...needed" - TAR_NEEDED=1 - fi -fi - -if [ $TAR_NEEDED -gt 0 ]; then - echo "ceph customization build_srpm : create ceph tar file: $TAR_PATH" - tar czf $TAR_PATH $SRC_DIR --transform "s,^$TRANSFORM,$TAR_NAME-$VERSION," - if [ $? -ne 0 ]; then - if [ "x$STAGING" != "x" ]; then - popd - fi - echo "ERROR: ceph customization build_srpm (${LINENO}): failed to create tar file, cmd: tar czf $TAR_PATH $SRC_DIR --transform \"s,^$TRANSFORM,$TAR_NAME-$VERSION,\"" - exit 1 - fi - echo "ceph customization build_srpm : create tar file: $TAR_PATH...created" -else - echo "ceph customization build_srpm : ceph tar file not needed." -fi - -if [ "x$STAGING" != "x" ]; then - popd -fi - -echo "ceph customization build_srpm : check $BUILD_DIR/SPECS folder." -if [ ! -d $BUILD_DIR/SPECS ]; then - echo "ceph customization build_srpm : '$BUILD_DIR/SPECS' does not exist" - exit 1 -fi - -SPEC_PATH="$BUILD_DIR/SPECS/ceph.spec" -echo "ceph customization build_srpm : check $SPEC_PATH" -if [[ ! -f "$SPEC_PATH" ]]; then - echo "ERROR: ceph customization build_srpm : No spec files found in spec directory '$BUILD_DIR/SPECS'" - exit 1 -fi - -RELEASE=`spec_find_tag Release "$SPEC_PATH" 2>> /dev/null` -if [ $? -ne 0 ]; then - echo "ERROR: ceph customiztion build_srpm (${LINENO}): 'Release' not found in '$SPEC_PATH'" -fi - -NAME=`spec_find_tag Name "$SPEC_PATH" 2>> /dev/null` -if [ $? -ne 0 ]; then - echo "ERROR: ceph customization build_srpm (${LINENO}): 'Name' not found in '$SPEC_PATH'" -fi - -SRPM="$NAME-$VERSION-$RELEASE.src.rpm" -SRPM_PATH="$BUILD_DIR/SRPMS/$SRPM" - -spec_validate_tis_release $SPEC_PATH -if [ $? -ne 0 ]; then - echo "ceph customization build_srpm : Validation of $SPEC_PATH failed" - exit 1 -fi - -BUILD_NEEDED=0 -if [ -e $SRPM_PATH ]; then - n=`find . -cnewer $SRPM_PATH | wc -l` - if [ $n -gt 0 ]; then - BUILD_NEEDED=1 - fi -else - BUILD_NEEDED=1 -fi - -RC=0 -if [ $BUILD_NEEDED -gt 0 ]; then - echo "ceph customization build_srpm : ceph spec file : $SPEC_PATH" - echo "ceph customization build_srpm : SRPM build directory : $BUILD_DIR" - echo "ceph customization build_srpm : TIS_PATCH_VER : $TIS_PATCH_VER" - - sed -i -e "1 i%define _tis_build_type $BUILD_TYPE" $SPEC_PATH - sed -i -e "1 i%define tis_patch_ver $TIS_PATCH_VER" $SPEC_PATH - - ls -la $SOURCE_PATH - - echo "ceph customization build_srpm : start to build ceph SRPM " - rpmbuild -bs $SPEC_PATH --define="%_topdir $BUILD_DIR" --undefine=dist --define="_tis_dist .tis" - RC=$? -else - echo "SRPM build not needed" -fi - -# .git_version file is generated for ceph build. -# Remove this file after srpm is generated, to avoid srpm rebuild is triggered next time. -\rm -f ${SRC_DIR}/src/.git_version - -exit $RC diff --git a/ceph/ceph/centos/build_srpm.data b/ceph/ceph/centos/build_srpm.data deleted file mode 100644 index af5e1d0e7..000000000 --- a/ceph/ceph/centos/build_srpm.data +++ /dev/null @@ -1,30 +0,0 @@ -SRC_DIR="$STX_BASE/git/ceph" -DOWNLOADS_DIR="$STX_BASE/downloads" -COPY_LIST="files/* $DISTRO/patches/*" - -# Add to COPY_LIST any tarballs listed in spec -CEPH_SPEC_PATH="$PKG_BASE/$DISTRO/ceph.spec" - -BOOST_TAR=$(sed -n 's/^Source.*:\s*\(boost_.*\.tar\.bz2\)/\1/p' "$CEPH_SPEC_PATH") -echo "ceph COPY_LIST, adding ${DOWNLOADS_DIR}/$BOOST_TAR" -COPY_LIST+=" ${DOWNLOADS_DIR}/$BOOST_TAR" -for submodule in $(grep 'Source[0-9]*:.*[.]tar[.]gz' "$CEPH_SPEC_PATH" | \ - grep -v Source0: | \ - sed 's/^Source.*:\s*\(.*\.tar\.gz\)/\1/'); do - echo "ceph COPY_LIST, adding ${DOWNLOADS_DIR}/$(basename ${submodule})" - COPY_LIST+=" ${DOWNLOADS_DIR}/$(basename ${submodule})" -done - -# Before we exit, remove the .git_version file that is created by the build, -# and might be left behind by a prior aborted build. -if [ -f ${SRC_DIR}/src/.git_version ]; then - \rm ${SRC_DIR}/src/.git_version -fi - -# Set the source rev to 14.2.22 tag -TIS_BASE_SRCREV=ca74598065096e6fcbd8433c8779a2be0c889351 -# Subtract 43 to account for PKG_GITREVCOUNT changes prior to 14.2.22 (i.e. -# reset PKG_GITREVCOUNT to 0) -TIS_PATCH_VER=GITREVCOUNT+PKG_GITREVCOUNT-43 -BUILD_IS_BIG=40 -BUILD_IS_SLOW=26 diff --git a/ceph/ceph/centos/ceph.spec b/ceph/ceph/centos/ceph.spec deleted file mode 100644 index 0d46136c5..000000000 --- a/ceph/ceph/centos/ceph.spec +++ /dev/null @@ -1,2770 +0,0 @@ -# vim: set noexpandtab ts=8 sw=8 : -# -# spec file for package ceph -# -# Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file -# at the top-level directory of this distribution and at -# https://github.com/ceph/ceph/blob/master/COPYING -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. -# -# This file is under the GNU Lesser General Public License, version 2.1 -# -# Please submit bugfixes or comments via http://tracker.ceph.com/ -# - -###################################### -# BEGIN StarlingX specific changes # -###################################### -# StarlingX config overrides -# NOTE: -# - bcond_without tells RPM to define with_ unless -# --without- is explicitly present in the command line. -# A regular build does not use these arguments so bcond_without is -# effectively enabling -# - the same reversed logic applies to bcond_with. Its corresponding -# with_ is undefined unless --with- is explicitly -# present in the command line. -# -%define stx_rpmbuild_defaults \ - %{expand: \ - %%bcond_without client \ - %%bcond_without server \ - %%bcond_without gitversion \ - %%bcond_with subman \ - %%bcond_with coverage \ - %%bcond_with pgrefdebugging \ - %%bcond_with cephfs_java \ - %%bcond_with xio \ - %%bcond_with valgrind \ - %%bcond_with lttng \ - %%bcond_with valgrind \ - %%bcond_with selinux \ - %%bcond_with profiler \ - %%bcond_with man_pages \ - %%bcond_without rados \ - %%bcond_without rbd \ - %%bcond_without cython \ - %%bcond_without cephfs \ - %%bcond_without radosgw \ - %%bcond_with selinux \ - %%bcond_without radosstriper \ - %%bcond_without mon \ - %%bcond_without osd \ - %%bcond_without mds \ - %%bcond_with cryptopp \ - %%bcond_without nss \ - %%bcond_with profiler \ - %%bcond_with debug \ - %%bcond_without fuse \ - %%bcond_with jemalloc \ - %%bcond_without tcmalloc \ - %%bcond_with spdk \ - %%bcond_without libatomic_ops \ - %%bcond_with ocf \ - %%bcond_with kinetic \ - %%bcond_with librocksdb \ - %%bcond_without libaio \ - %%bcond_without libxfs \ - %%bcond_with libzfs \ - %%bcond_with lttng \ - %%bcond_with babeltrace \ - %%bcond_without eventfd \ - %%bcond_without openldap } - -%define stx_assert_without() \ - %{expand:%%{?with_%1: \ - %%{error:"%1" is enabled} \ - %%global stx_abort_build 1}} - -%define stx_assert_with() \ - %{expand:%%{!?with_%1: \ - %%{error:"%1" is disabled} \ - %%global stx_abort_build 1}} - -%define stx_assert_package_yes() \ - %{expand:%%stx_assert_with %1} - -%define stx_assert_package_no() \ - %{expand:%%stx_assert_without %1} - -%define stx_assert_package() \ - %{expand:%%stx_assert_package_%2 %1} - -%define stx_assert_feature_yes() \ - %{expand:%%stx_assert_with %1} - -%define stx_assert_feature_no() \ - %{expand:%%stx_assert_without %1} - -%define stx_assert_feature() \ - %{expand:%%stx_assert_feature_%2 %1} - -# StarlingX "configure" safeguards -# -%define stx_check_config \ - %undefine stx_abort_build \ - \ - %stx_assert_feature client yes \ - %stx_assert_feature server yes \ - %stx_assert_feature subman no \ - %stx_assert_feature gitversion yes \ - %stx_assert_feature coverage no \ - %stx_assert_feature pgrefdebugging no \ - %stx_assert_feature cephfs_java no \ - %stx_assert_feature xio no \ - %stx_assert_feature valgrind no \ - \ - %stx_assert_package man_pages no \ - %stx_assert_package rados yes \ - %stx_assert_package rbd yes \ - %stx_assert_package cython yes \ - %stx_assert_package cephfs yes \ - %stx_assert_package radosgw yes \ - %stx_assert_package selinux no \ - %stx_assert_package radosstriper yes \ - %stx_assert_package mon yes \ - %stx_assert_package osd yes \ - %stx_assert_package mds yes \ - %stx_assert_package cryptopp no \ - %stx_assert_package nss yes \ - %stx_assert_package profiler no \ - %stx_assert_package debug no \ - %stx_assert_package fuse yes \ - %stx_assert_package jemalloc no \ - %stx_assert_package tcmalloc yes \ - %stx_assert_package spdk no \ - %stx_assert_package libatomic_ops yes \ - %stx_assert_package ocf no \ - %stx_assert_package kinetic no \ - %stx_assert_package librocksdb no \ - %stx_assert_package libaio yes \ - %stx_assert_package libxfs yes \ - %stx_assert_package libzfs no \ - %stx_assert_package lttng no \ - %stx_assert_package babeltrace no \ - %stx_assert_package eventfd yes \ - %stx_assert_package openldap yes \ - \ - %{?stx_abort_build:exit 1} - -# StarlingX configure utils -# -%define configure_feature() %{expand:%%{?with_%{1}:--enable-%{lua: print(rpm.expand("%{1}"):gsub("_","-"):match("^%s*(.*%S)"))}}%%{!?with_%{1}:--disable-%{lua: print(rpm.expand("%{1}"):gsub("_","-"):match("^%s*(.*%S)"))}}} -%define configure_package() %{expand:%%{?with_%{1}:--with-%{lua: print(rpm.expand("%{1}"):gsub("_","-"):match("^%s*(.*%S)"))}}%%{!?with_%{1}:--without-%{lua: print(rpm.expand("%{1}"):gsub("_","-"):match("^%s*(.*%S)"))}}} -# special case for tcmalloc: it's actually called tc -# -%define configure_package_tc %{expand:%%{?with_tcmalloc:--with-tc}%%{!?with_tcmalloc:--without-tc}} - -###################################### -# END StarlingX specific changes # -###################################### - -%define _unpackaged_files_terminate_build 0 -%stx_rpmbuild_defaults -%bcond_without stx - - -################################################# - -# StarlingX: Ceph takes long time to generate debuginfo package which is not used -# so disable it here. -%define debug_package %{nil} - -%global __os_install_post \ - %{_rpmconfigdir}/brp-strip-shared %{__strip} \ -%{nil} - -%define optflags -O2 - -################################################################################# -# conditional build section -# -# please read http://rpm.org/user_doc/conditional_builds.html for explanation of -# bcond syntax! -################################################################################# -%bcond_without python3 -%bcond_with make_check -%bcond_with ceph_test_package -%ifarch s390 s390x -%bcond_with tcmalloc -%else -%bcond_without tcmalloc -%endif -%if 0%{?fedora} || 0%{?rhel} -%if %{without stx} -%bcond_without selinux -%endif -%if %{without stx} -%if 0%{?rhel} >= 8 -%bcond_with cephfs_java -%else -%bcond_without cephfs_java -%endif - -%bcond_without lttng -%endif -%bcond_without amqp_endpoint -%bcond_without libradosstriper -%bcond_with ocf -%bcond_without kafka_endpoint -%global _remote_tarball_prefix https://download.ceph.com/tarballs/ -%endif -%if 0%{?suse_version} -%bcond_with selinux -%bcond_with cephfs_java -%bcond_with amqp_endpoint -%bcond_with kafka_endpoint -#Compat macro for new _fillupdir macro introduced in Nov 2017 -%if ! %{defined _fillupdir} -%global _fillupdir /var/adm/fillup-templates -%endif -%if 0%{?is_opensuse} -%bcond_without libradosstriper -%bcond_without ocf -%else -%bcond_with libradosstriper -%bcond_with ocf -%endif -%ifarch x86_64 aarch64 ppc64le -%bcond_without lttng -%else -%bcond_with lttng -%endif -%endif -%bcond_with seastar -%bcond_without python2 -%bcond_with cephfs_shell -%if 0%{without python2} -%global _defined_if_python2_absent 1 -%endif -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 -%global weak_deps 1 -%endif -%if %{with selinux} -# get selinux policy version -%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} -%endif - -%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} -%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} -%{!?python3_pkgversion: %global python3_pkgversion 3} -%{!?python3_version_nodots: %global python3_version_nodots 3} -%{!?python3_version: %global python3_version 3} -# define _python_buildid macro which will expand to the empty string when -# building with python2 -%global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}} - -# unify libexec for all targets -%global _libexecdir %{_libdir} - -# disable dwz which compresses the debuginfo -%global _find_debuginfo_dwz_opts %{nil} - -################################################################################# -# main package definition -################################################################################# -Name: ceph -Version: 14.2.22 -Release: 0.el7%{?_tis_dist}.%{tis_patch_ver} -%if 0%{?fedora} || 0%{?rhel} -Epoch: 2 -%endif - -# define _epoch_prefix macro which will expand to the empty string if epoch is -# undefined -%global _epoch_prefix %{?epoch:%{epoch}:} - -Summary: User space components of the Ceph file system -License: LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT -%if 0%{?suse_version} -Group: System/Filesystems -%endif -URL: http://ceph.com/ -Source0: %{?_remote_tarball_prefix}ceph-14.2.22.tar.gz - - -Source1: boost_1_72_0.tar.bz2 -Source2: ceph-object-corpus/ceph-object-corpus-e32bf8ca3dc6151ebe7f205ba187815bc18e1cef.tar.gz -Source3: src/civetweb/civetweb-bb99e93da00c3fe8c6b6a98520fb17cf64710ce7.tar.gz -Source4: src/erasure-code/jerasure/jerasure/jerasure-96c76b89d661c163f65a014b8042c9354ccf7f31.tar.gz -Source5: src/erasure-code/jerasure/gf-complete/gf-complete-7e61b44404f0ed410c83cfd3947a52e88ae044e1.tar.gz -Source6: src/rocksdb/rocksdb-4c736f177851cbf9fb7a6790282306ffac5065f8.tar.gz -Source7: ceph-erasure-code-corpus/ceph-erasure-code-corpus-2d7d78b9cc52e8a9529d8cc2d2954c7d375d5dd7.tar.gz -Source8: src/spdk/spdk-fd292c568f72187e172b98074d7ccab362dae348.tar.gz -Source9: src/xxHash/xxHash-1f40c6511fa8dd9d2e337ca8c9bc18b3e87663c9.tar.gz -Source10: src/isa-l/isa-l-7e1a337433a340bc0974ed0f04301bdaca374af6.tar.gz -Source11: src/lua/lua-1fce39c6397056db645718b8f5821571d97869a4.tar.gz -Source12: src/blkin/blkin-f24ceec055ea236a093988237a9821d145f5f7c8.tar.gz -Source13: src/rapidjson/rapidjson-f54b0e47a08782a6131cc3d60f94d038fa6e0a51.tar.gz -Source14: src/googletest/googletest-fdb850479284e2aae047b87df6beae84236d0135.tar.gz -Source15: src/crypto/isa-l/isa-l_crypto/isa-l_crypto-603529a4e06ac8a1662c13d6b31f122e21830352.tar.gz -Source16: src/zstd/zstd-b706286adbba780006a47ef92df0ad7a785666b6.tar.gz -Source17: src/spdk/dpdk/dpdk-96fae0e24c9088d9690c38098b25646f861a664b.tar.gz -Source18: src/rapidjson/thirdparty/gtest/googletest-0a439623f75c029912728d80cb7f1b8b48739ca4.tar.gz - -Source19: ceph.sh -Source20: mgr-restful-plugin.py -Source21: ceph.conf.pmon -Source22: ceph-init-wrapper.sh -Source23: ceph.conf -Source24: ceph-manage-journal.py -Source25: ceph.service -Source26: mgr-restful-plugin.service -Source27: ceph-preshutdown.sh -Source28: starlingx-docker-override.conf - -Source29: src/c-ares/c-ares-fd6124c74da0801f23f9d324559d8b66fb83f533.tar.gz -Source30: src/dmclock/dmclock-4496dbc6515db96e08660ac38883329c5009f3e9.tar.gz -Source31: src/seastar/seastar-0cf6aa6b28d69210b271489c0778f226cde0f459.tar.gz -Source32: src/spawn/spawn-5f4742f647a5a33b9467f648a3968b3cd0a681ee.tar.gz -Source33: src/spdk/intel-ipsec-mb/intel-ipsec-mb-134c90c912ea9376460e9d949bb1319a83a9d839.tar.gz -Source34: src/seastar/dpdk/dpdk-a1774652fbbb1fe7c0ff392d5e66de60a0154df6.tar.gz -Source35: src/seastar/fmt/fmt-80021e25971e44bb6a6d187c0dac8a1823436d80.tar.gz - -%if 0%{?suse_version} -# _insert_obs_source_lines_here -ExclusiveArch: x86_64 aarch64 ppc64le s390x -%endif -################################################################################# -# dependencies that apply across all distro families -################################################################################# -Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release} -Requires(post): binutils -%if 0%{with cephfs_java} -BuildRequires: java-devel -BuildRequires: sharutils -%endif -%if 0%{with selinux} -BuildRequires: checkpolicy -BuildRequires: selinux-policy-devel -%endif -BuildRequires: gperf -%if 0%{?rhel} == 7 -BuildRequires: cmake3 > 3.5 -%else -BuildRequires: cmake > 3.5 -%endif -BuildRequires: cryptsetup -BuildRequires: fuse-devel -%if 0%{?rhel} == 7 -# devtoolset offers newer make and valgrind-devel, but the old ones are good -# enough. -BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1 -%else -BuildRequires: gcc-c++ -%endif -BuildRequires: gdbm -%if 0%{with tcmalloc} -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: gperftools-devel >= 2.6.1 -%endif -%if 0%{?suse_version} -BuildRequires: gperftools-devel >= 2.4 -%endif -%endif -BuildRequires: leveldb-devel > 1.2 -BuildRequires: libaio-devel -BuildRequires: libblkid-devel >= 2.17 -BuildRequires: libcurl-devel -BuildRequires: libcap-ng-devel -BuildRequires: libudev-devel -BuildRequires: libnl3-devel -BuildRequires: liboath-devel -BuildRequires: libtool -BuildRequires: libxml2-devel -BuildRequires: make -BuildRequires: ncurses-devel -BuildRequires: parted -BuildRequires: patch -BuildRequires: perl -BuildRequires: pkgconfig -BuildRequires: procps -BuildRequires: python%{_python_buildid} -BuildRequires: python%{_python_buildid}-devel -BuildRequires: snappy-devel -BuildRequires: sudo -BuildRequires: udev -BuildRequires: util-linux -BuildRequires: valgrind-devel -BuildRequires: which -BuildRequires: xfsprogs -BuildRequires: xfsprogs-devel -BuildRequires: xmlstarlet -BuildRequires: yasm -%if 0%{with amqp_endpoint} -BuildRequires: librabbitmq-devel -%endif -%if 0%{with kafka_endpoint} -BuildRequires: librdkafka-devel -%endif -%if 0%{with make_check} -BuildRequires: jq -BuildRequires: libuuid-devel -BuildRequires: python%{_python_buildid}-bcrypt -BuildRequires: python%{_python_buildid}-nose -BuildRequires: python%{_python_buildid}-pecan -BuildRequires: python%{_python_buildid}-requests -BuildRequires: python%{_python_buildid}-six -BuildRequires: python%{_python_buildid}-virtualenv -BuildRequires: socat -%endif -%if 0%{with seastar} -BuildRequires: c-ares-devel -BuildRequires: gnutls-devel -BuildRequires: hwloc-devel -BuildRequires: libpciaccess-devel -BuildRequires: lksctp-tools-devel -BuildRequires: protobuf-devel -BuildRequires: ragel -BuildRequires: systemtap-sdt-devel -BuildRequires: yaml-cpp-devel -%endif -################################################################################# -# distro-conditional dependencies -################################################################################# -%if 0%{?suse_version} -BuildRequires: pkgconfig(systemd) -BuildRequires: systemd-rpm-macros -%{?systemd_requires} -PreReq: %fillup_prereq -BuildRequires: fdupes -BuildRequires: net-tools -BuildRequires: libbz2-devel -BuildRequires: mozilla-nss-devel -BuildRequires: keyutils-devel -BuildRequires: libopenssl-devel -BuildRequires: lsb-release -BuildRequires: openldap2-devel -#BuildRequires: krb5 -#BuildRequires: krb5-devel -BuildRequires: cunit-devel -BuildRequires: python%{_python_buildid}-setuptools -BuildRequires: python%{_python_buildid}-Cython -BuildRequires: python%{_python_buildid}-PrettyTable -BuildRequires: python%{_python_buildid}-Sphinx -BuildRequires: rdma-core-devel -BuildRequires: liblz4-devel >= 1.7 -# for prometheus-alerts -BuildRequires: golang-github-prometheus-prometheus -%endif -%if 0%{?fedora} || 0%{?rhel} -Requires: systemd -BuildRequires: boost-random -BuildRequires: nss-devel -BuildRequires: keyutils-libs-devel -BuildRequires: libibverbs-devel -BuildRequires: librdmacm-devel -BuildRequires: openldap-devel -#BuildRequires: krb5-devel -BuildRequires: openssl-devel -BuildRequires: CUnit-devel -BuildRequires: redhat-lsb-core -%if 0%{with python2} -BuildRequires: python2-Cython -%endif -%if %{with python3} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%if 0%{?rhel} == 7 -BuildRequires: python%{python3_version_nodots}-Cython -%else -BuildRequires: python%{python3_pkgversion}-Cython -%endif -%endif -BuildRequires: python%{_python_buildid}-prettytable -BuildRequires: python%{_python_buildid}-sphinx -BuildRequires: lz4-devel >= 1.7 -%endif -# distro-conditional make check dependencies -%if 0%{with make_check} -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: python%{_python_buildid}-coverage -BuildRequires: python%{_python_buildid}-pecan -BuildRequires: python%{_python_buildid}-tox -BuildRequires: xmlsec1 -BuildRequires: golang-github-prometheus -BuildRequires: libtool-ltdl-devel -BuildRequires: python%{_python_buildid}-cherrypy -BuildRequires: python%{_python_buildid}-jwt -BuildRequires: python%{_python_buildid}-routes -BuildRequires: python%{_python_buildid}-scipy -BuildRequires: python%{_python_buildid}-werkzeug -BuildRequires: xmlsec1 -BuildRequires: xmlsec1-devel -BuildRequires: xmlsec1-nss -BuildRequires: xmlsec1-openssl -BuildRequires: xmlsec1-openssl-devel -%endif -%if 0%{?suse_version} -BuildRequires: golang-github-prometheus-prometheus -BuildRequires: libxmlsec1-1 -BuildRequires: libxmlsec1-nss1 -BuildRequires: libxmlsec1-openssl1 -BuildRequires: xmlsec1-devel -BuildRequires: xmlsec1-openssl-devel -BuildRequires: python%{_python_buildid}-CherryPy -BuildRequires: python%{_python_buildid}-PyJWT -BuildRequires: python%{_python_buildid}-Routes -BuildRequires: python%{_python_buildid}-Werkzeug -BuildRequires: python%{_python_buildid}-coverage -BuildRequires: python%{_python_buildid}-numpy-devel -BuildRequires: python%{_python_buildid}-pecan -BuildRequires: python%{_python_buildid}-pyOpenSSL -BuildRequires: python%{_python_buildid}-tox -BuildRequires: rpm-build -%endif -%endif -# lttng and babeltrace for rbd-replay-prep -%if %{with lttng} -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: lttng-ust-devel -BuildRequires: libbabeltrace-devel -%endif -%if 0%{?suse_version} -BuildRequires: lttng-ust-devel -BuildRequires: babeltrace-devel -%endif -%endif -%if 0%{?suse_version} -BuildRequires: libexpat-devel -%endif -%if 0%{?rhel} || 0%{?fedora} -BuildRequires: expat-devel -%endif -#hardened-cc1 -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: redhat-rpm-config -%endif -%if 0%{with seastar} -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: cryptopp-devel -BuildRequires: numactl-devel -BuildRequires: protobuf-compiler -%endif -%if 0%{?suse_version} -BuildRequires: libcryptopp-devel -BuildRequires: libnuma-devel -%endif -%endif -%if 0%{?rhel} >= 8 -BuildRequires: /usr/bin/pathfix.py -%endif - -%description -Ceph is a massively scalable, open-source, distributed storage system that runs -on commodity hardware and delivers object, block and file system storage. - - -################################################################################# -# subpackages -################################################################################# -%package base -Summary: Ceph Base Package -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Provides: ceph-test:/usr/bin/ceph-kvstore-tool -Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} -%if 0%{with selinux} -Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} -%endif -Requires: cryptsetup -Requires: e2fsprogs -Requires: findutils -Requires: grep -Requires: logrotate -Requires: parted -Requires: psmisc -Requires: python%{_python_buildid}-setuptools -Requires: util-linux -Requires: xfsprogs -Requires: which -%if 0%{?fedora} || 0%{?rhel} -Requires: gdisk -# The following is necessary due to tracker 36508 and can be removed once the -# associated upstream bugs are resolved. -%if 0%{with tcmalloc} -Requires: gperftools-libs >= 2.6.1 -%endif -%endif -%if 0%{?weak_deps} -Recommends: chrony -%endif -%description base -Base is the package that includes all the files shared amongst ceph servers - -%package -n ceph-common -Summary: Ceph Common -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} -Requires: python%{_python_buildid}-prettytable -%endif -%if 0%{?suse_version} -Requires: python%{_python_buildid}-PrettyTable -%endif -%if 0%{with libradosstriper} -Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} -%endif -%{?systemd_requires} -%if 0%{?suse_version} -Requires(pre): pwdutils -%endif -%description -n ceph-common -Common utilities to mount and interact with a ceph storage cluster. -Comprised of files that are common to Ceph clients and servers. - -%package mds -Summary: Ceph Metadata Server Daemon -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -%description mds -ceph-mds is the metadata server daemon for the Ceph distributed file system. -One or more instances of ceph-mds collectively manage the file system -namespace, coordinating access to the shared OSD cluster. - -%package mon -Summary: Ceph Monitor Daemon -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Provides: ceph-test:/usr/bin/ceph-monstore-tool -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -%description mon -ceph-mon is the cluster monitor daemon for the Ceph distributed file -system. One or more instances of ceph-mon form a Paxos part-time -parliament cluster that provides extremely reliable and durable storage -of cluster membership, configuration, and state. - -%package mgr -Summary: Ceph Manager Daemon -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-bcrypt -Requires: python%{_python_buildid}-pecan -Requires: python%{_python_buildid}-requests -Requires: python%{_python_buildid}-six -%if 0%{?fedora} || 0%{?rhel} -Requires: python%{_python_buildid}-cherrypy -Requires: python%{_python_buildid}-werkzeug -%endif -%if 0%{?suse_version} -Requires: python%{_python_buildid}-CherryPy -Requires: python%{_python_buildid}-Werkzeug -%endif -%if 0%{?weak_deps} -Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release} -Recommends: python%{_python_buildid}-influxdb -%endif -%if 0%{?rhel} == 7 -Requires: pyOpenSSL -Requires: python-enum34 -%else -Requires: python%{_python_buildid}-pyOpenSSL -%endif -%description mgr -ceph-mgr enables python modules that provide services (such as the REST -module derived from Calamari) and expose CLI hooks. ceph-mgr gathers -the cluster maps, the daemon metadata, and performance counters, and -exposes all these to the python modules. - -%package mgr-dashboard -Summary: Ceph Dashboard -BuildArch: noarch -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} -Requires: python%{_python_buildid}-cherrypy -Requires: python%{_python_buildid}-jwt -Requires: python%{_python_buildid}-routes -Requires: python%{_python_buildid}-werkzeug -%if 0%{?weak_deps} -Recommends: python%{_python_buildid}-saml -%endif -%endif -%if 0%{?suse_version} -Requires: python%{_python_buildid}-CherryPy -Requires: python%{_python_buildid}-PyJWT -Requires: python%{_python_buildid}-Routes -Requires: python%{_python_buildid}-Werkzeug -Recommends: python%{_python_buildid}-python3-saml -%endif -%if 0%{?rhel} == 7 -Requires: pyOpenSSL -%else -Requires: python%{_python_buildid}-pyOpenSSL -%endif -%description mgr-dashboard -ceph-mgr-dashboard is a manager plugin, providing a web-based application -to monitor and manage many aspects of a Ceph cluster and related components. -See the Dashboard documentation at http://docs.ceph.com/ for details and a -detailed feature overview. - -%package mgr-diskprediction-local -Summary: ceph-mgr diskprediction_local plugin -BuildArch: noarch -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version} -Requires: python%{_python_buildid}-numpy -%if 0%{without python2} -Requires: python3-scipy -%else -Requires: python2-scipy -%endif -%endif -%if 0%{?rhel} == 7 -Requires: numpy -Requires: scipy -%endif -%description mgr-diskprediction-local -ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict -disk failures using local algorithms and machine-learning databases. - -%package mgr-diskprediction-cloud -Summary: ceph-mgr diskprediction_cloud plugin -BuildArch: noarch -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -%description mgr-diskprediction-cloud -ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict -disk failures using services in the Google cloud. - -%package mgr-rook -BuildArch: noarch -Summary: ceph-mgr rook plugin -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-kubernetes -%description mgr-rook -ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using -a Rook backend. - -%package mgr-k8sevents -BuildArch: noarch -Summary: Ceph Manager plugin to orchestrate ceph-events to kubernetes' events API -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-kubernetes -%description mgr-k8sevents -ceph-mgr-k8sevents is a ceph-mgr plugin that sends every ceph-events -to kubernetes' events API - -%package mgr-ssh -Summary: ceph-mgr ssh module -BuildArch: noarch -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} -Requires: python%{_python_buildid}-remoto -%description mgr-ssh -ceph-mgr-ssh is a ceph-mgr module for orchestration functions using -direct SSH connections for management operations. - -%package fuse -Summary: Ceph fuse-based client -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: fuse -%if %{with python3} -Requires: python%{python3_pkgversion} -%endif -%description fuse -FUSE based client for Ceph distributed network file system - -%package -n rbd-fuse -Summary: Ceph fuse-based client -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -%description -n rbd-fuse -FUSE based client to map Ceph rbd images to files - -%package -n rbd-mirror -Summary: Ceph daemon for mirroring RBD images -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -%description -n rbd-mirror -Daemon for mirroring RBD images between Ceph clusters, streaming -changes asynchronously. - -%package -n rbd-nbd -Summary: Ceph RBD client base on NBD -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -%description -n rbd-nbd -NBD based client to map Ceph rbd images to local device - -%package radosgw -Summary: Rados REST gateway -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -%if 0%{with selinux} -Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} -%if 0%{?rhel} || 0%{?fedora} -Requires: mailcap -%endif -%if 0%{?weak_deps} -Recommends: gawk -%endif -%description radosgw -RADOS is a distributed object store used by the Ceph distributed -storage system. This package provides a REST gateway to the -object store that aims to implement a superset of Amazon's S3 -service as well as the OpenStack Object Storage ("Swift") API. - -%if %{with ocf} -%package resource-agents -Summary: OCF-compliant resource agents for Ceph daemons -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: resource-agents -%description resource-agents -Resource agents for monitoring and managing Ceph daemons -under Open Cluster Framework (OCF) compliant resource -managers such as Pacemaker. -%endif - -%package osd -Summary: Ceph Object Storage Daemon -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Provides: ceph-test:/usr/bin/ceph-osdomap-tool -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -Requires: lvm2 -Requires: sudo -Requires: libstoragemgmt -%if 0%{?weak_deps} -Recommends: nvme-cli -Recommends: smartmontools -%endif -%description osd -ceph-osd is the object storage daemon for the Ceph distributed file -system. It is responsible for storing objects on a local file system -and providing access to them over the network. - -%package -n librados2 -Summary: RADOS distributed object store client library -%if 0%{?suse_version} -Group: System/Libraries -%endif -%if 0%{?rhel} || 0%{?fedora} -Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n librados2 -RADOS is a reliable, autonomic distributed object storage cluster -developed as part of the Ceph distributed storage system. This is a -shared library allowing applications to access the distributed object -store using a simple file-like interface. - -%package -n librados-devel -Summary: RADOS headers -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} -Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release} -%description -n librados-devel -This package contains C libraries and headers needed to develop programs -that use RADOS object store. - -%package -n libradospp-devel -Summary: RADOS headers -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} -%description -n libradospp-devel -This package contains C++ libraries and headers needed to develop programs -that use RADOS object store. - -%package -n librgw2 -Summary: RADOS gateway client library -%if 0%{?suse_version} -Group: System/Libraries -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -%description -n librgw2 -This package provides a library implementation of the RADOS gateway -(distributed object store with S3 and Swift personalities). - -%package -n librgw-devel -Summary: RADOS gateway client library -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} -Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release} -%description -n librgw-devel -This package contains libraries and headers needed to develop programs -that use RADOS gateway client library. - -%if 0%{with python2} -%package -n python-rgw -Summary: Python 2 libraries for the RADOS gateway -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} -Requires: python-rados = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python-rgw} -Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} -%description -n python-rgw -This package contains Python 2 libraries for interacting with Cephs RADOS -gateway. -%endif - -%if %{with python3} -%package -n python%{python3_pkgversion}-rgw -Summary: Python 3 libraries for the RADOS gateway -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python%{python3_pkgversion}-rgw} -%if 0%{without python2} -Provides: python-rgw = %{_epoch_prefix}%{version}-%{release} -Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n python%{python3_pkgversion}-rgw -This package contains Python 3 libraries for interacting with Cephs RADOS -gateway. -%endif - -%if 0%{with python2} -%package -n python-rados -Summary: Python 2 libraries for the RADOS object store -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python-rados} -Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} -%description -n python-rados -This package contains Python 2 libraries for interacting with Cephs RADOS -object store. -%endif - -%if %{with python3} -%package -n python%{python3_pkgversion}-rados -Summary: Python 3 libraries for the RADOS object store -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: python%{python3_pkgversion} -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python%{python3_pkgversion}-rados} -%if 0%{without python2} -Provides: python-rados = %{_epoch_prefix}%{version}-%{release} -Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n python%{python3_pkgversion}-rados -This package contains Python 3 libraries for interacting with Cephs RADOS -object store. -%endif - -%if 0%{with libradosstriper} -%package -n libradosstriper1 -Summary: RADOS striping interface -%if 0%{?suse_version} -Group: System/Libraries -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -%description -n libradosstriper1 -Striping interface built on top of the rados library, allowing -to stripe bigger objects onto several standard rados objects using -an interface very similar to the rados one. - -%package -n libradosstriper-devel -Summary: RADOS striping interface headers -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} -Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} -Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} -Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release} -%description -n libradosstriper-devel -This package contains libraries and headers needed to develop programs -that use RADOS striping interface. -%endif - -%package -n librbd1 -Summary: RADOS block device client library -%if 0%{?suse_version} -Group: System/Libraries -%endif -Requires: librados2 = %{_epoch_prefix}%{version}-%{release} -%if 0%{?suse_version} -Requires(post): coreutils -%endif -%if 0%{?rhel} || 0%{?fedora} -Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n librbd1 -RBD is a block device striped across multiple distributed objects in -RADOS, a reliable, autonomic distributed object storage cluster -developed as part of the Ceph distributed storage system. This is a -shared library allowing applications to manage these block devices. - -%package -n librbd-devel -Summary: RADOS block device headers -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} -Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} -Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release} -%description -n librbd-devel -This package contains libraries and headers needed to develop programs -that use RADOS block device. - -%if 0%{with python2} -%package -n python-rbd -Summary: Python 2 libraries for the RADOS block device -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: python-rados = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python-rbd} -Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} -%description -n python-rbd -This package contains Python 2 libraries for interacting with Cephs RADOS -block device. -%endif - -%if %{with python3} -%package -n python%{python3_pkgversion}-rbd -Summary: Python 3 libraries for the RADOS block device -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python%{python3_pkgversion}-rbd} -Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release} -%if 0%{without python2} -Provides: python-rbd = %{_epoch_prefix}%{version}-%{release} -Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n python%{python3_pkgversion}-rbd -This package contains Python 3 libraries for interacting with Cephs RADOS -block device. -%endif - -%package -n libcephfs2 -Summary: Ceph distributed file system client library -%if 0%{?suse_version} -Group: System/Libraries -%endif -Obsoletes: libcephfs1 < %{_epoch_prefix}%{version}-%{release} -%if 0%{?rhel} || 0%{?fedora} -Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-libcephfs -%endif -%description -n libcephfs2 -Ceph is a distributed network file system designed to provide excellent -performance, reliability, and scalability. This is a shared library -allowing applications to access a Ceph distributed file system via a -POSIX-like interface. - -%package -n libcephfs-devel -Summary: Ceph distributed file system headers -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} -Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release} -%description -n libcephfs-devel -This package contains libraries and headers needed to develop programs -that use Cephs distributed file system. - -%if 0%{with python2} -%package -n python-cephfs -Summary: Python 2 libraries for Ceph distributed file system -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: python-rados = %{_epoch_prefix}%{version}-%{release} -Requires: python-ceph-argparse = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python-cephfs} -Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} -%description -n python-cephfs -This package contains Python 2 libraries for interacting with Cephs distributed -file system. -%endif - -%if %{with python3} -%package -n python%{python3_pkgversion}-cephfs -Summary: Python 3 libraries for Ceph distributed file system -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} -Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} -%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs} -%if 0%{without python2} -Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release} -Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release} -%endif -%description -n python%{python3_pkgversion}-cephfs -This package contains Python 3 libraries for interacting with Cephs distributed -file system. -%endif - -%if 0%{with python2} -%package -n python-ceph-argparse -Summary: Python 2 utility libraries for Ceph CLI -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -%description -n python-ceph-argparse -This package contains types and routines for Python 2 used by the Ceph CLI as -well as the RESTful interface. These have to do with querying the daemons for -command-description information, validating user command input against those -descriptions, and submitting the command to the appropriate daemon. -%endif - -%if %{with python3} -%package -n python%{python3_pkgversion}-ceph-argparse -Summary: Python 3 utility libraries for Ceph CLI -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse} -%description -n python%{python3_pkgversion}-ceph-argparse -This package contains types and routines for Python 3 used by the Ceph CLI as -well as the RESTful interface. These have to do with querying the daemons for -command-description information, validating user command input against those -descriptions, and submitting the command to the appropriate daemon. -%endif - -%if 0%{with cephfs_shell} -%package -n cephfs-shell -Summary: Interactive shell for Ceph file system -Requires: python%{python3_pkgversion}-cmd2 -Requires: python%{python3_pkgversion}-colorama -Requires: python%{python3_pkgversion}-cephfs -%description -n cephfs-shell -This package contains an interactive tool that allows accessing a Ceph -file system without mounting it by providing a nice pseudo-shell which -works like an FTP client. -%endif - -%if 0%{with ceph_test_package} -%package -n ceph-test -Summary: Ceph benchmarks and test tools -%if 0%{?suse_version} -Group: System/Benchmark -%endif -Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} -Requires: xmlstarlet -Requires: jq -Requires: socat -%description -n ceph-test -This package contains Ceph benchmarks and test tools. -%endif - -%if 0%{with cephfs_java} - -%package -n libcephfs_jni1 -Summary: Java Native Interface library for CephFS Java bindings -%if 0%{?suse_version} -Group: System/Libraries -%endif -Requires: java -Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} -%description -n libcephfs_jni1 -This package contains the Java Native Interface library for CephFS Java -bindings. - -%package -n libcephfs_jni-devel -Summary: Development files for CephFS Java Native Interface library -%if 0%{?suse_version} -Group: Development/Libraries/Java -%endif -Requires: java -Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} -Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} -Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release} -Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release} -%description -n libcephfs_jni-devel -This package contains the development files for CephFS Java Native Interface -library. - -%package -n cephfs-java -Summary: Java libraries for the Ceph File System -%if 0%{?suse_version} -Group: System/Libraries -%endif -Requires: java -Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} -Requires: junit -BuildRequires: junit -%description -n cephfs-java -This package contains the Java libraries for the Ceph File System. - -%endif - -%package -n rados-objclass-devel -Summary: RADOS object class development kit -%if 0%{?suse_version} -Group: Development/Libraries/C and C++ -%endif -Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} -%description -n rados-objclass-devel -This package contains libraries and headers needed to develop RADOS object -class plugins. - -%if 0%{with selinux} - -%package selinux -Summary: SELinux support for Ceph MON, OSD and MDS -%if 0%{?suse_version} -Group: System/Filesystems -%endif -Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} -Requires: policycoreutils, libselinux-utils -Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release} -Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk -Requires(postun): policycoreutils -%description selinux -This package contains SELinux support for Ceph MON, OSD and MDS. The package -also performs file-system relabelling which can take a long time on heavily -populated file-systems. - -%endif - -%if 0%{with python2} -%package -n python-ceph-compat -Summary: Compatibility package for Cephs python libraries -%if 0%{?suse_version} -Group: Development/Libraries/Python -%endif -Obsoletes: python-ceph -Requires: python-rados = %{_epoch_prefix}%{version}-%{release} -Requires: python-rbd = %{_epoch_prefix}%{version}-%{release} -Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release} -Requires: python-rgw = %{_epoch_prefix}%{version}-%{release} -Provides: python-ceph -%description -n python-ceph-compat -This is a compatibility package to accommodate python-ceph split into -python-rados, python-rbd, python-rgw and python-cephfs. Packages still -depending on python-ceph should be fixed to depend on python-rados, -python-rbd, python-rgw or python-cephfs instead. -%endif - -%package grafana-dashboards -Summary: The set of Grafana dashboards for monitoring purposes -BuildArch: noarch -%if 0%{?suse_version} -Group: System/Filesystems -%endif -%description grafana-dashboards -This package provides a set of Grafana dashboards for monitoring of -Ceph clusters. The dashboards require a Prometheus server setup -collecting data from Ceph Manager "prometheus" module and Prometheus -project "node_exporter" module. The dashboards are designed to be -integrated with the Ceph Manager Dashboard web UI. - -%if 0%{?suse_version} -%package prometheus-alerts -Summary: Prometheus alerts for a Ceph deplyoment -BuildArch: noarch -Group: System/Monitoring -%description prometheus-alerts -This package provides Ceph’s default alerts for Prometheus. -%endif - -################################################################################# -# common -################################################################################# -%prep -%autosetup -p1 -n ceph-14.2.22 -mkdir -p src/boost -BOOST_VERSION=$(basename "%{SOURCE1}" | sed 's/boost_\(.*\)\.tar\.bz2/\1/') -tar xjf "%{SOURCE1}" -C src/boost \ - --exclude="$BOOST_VERSION/libs/*/doc" \ - --exclude="$BOOST_VERSION/libs/*/example" \ - --exclude="$BOOST_VERSION/libs/*/examples" \ - --exclude="$BOOST_VERSION/libs/*/meta" \ - --exclude="$BOOST_VERSION/libs/*/test" \ - --exclude="$BOOST_VERSION/tools/boostbook" \ - --exclude="$BOOST_VERSION/tools/quickbook" \ - --exclude="$BOOST_VERSION/tools/auto_index" \ - --exclude='doc' \ - --exclude='more' \ - --exclude='status' \ - --strip-components 1 -unpack_submodule() { - mkdir -p "$2" && tar xzf "$1" -C "$2" --strip-components 1 -} -unpack_submodule "%{SOURCE2}" "%(dirname %{SOURCEURL2})" -unpack_submodule "%{SOURCE3}" "%(dirname %{SOURCEURL3})" -unpack_submodule "%{SOURCE4}" "%(dirname %{SOURCEURL4})" -unpack_submodule "%{SOURCE5}" "%(dirname %{SOURCEURL5})" -unpack_submodule "%{SOURCE6}" "%(dirname %{SOURCEURL6})" -unpack_submodule "%{SOURCE7}" "%(dirname %{SOURCEURL7})" -unpack_submodule "%{SOURCE8}" "%(dirname %{SOURCEURL8})" -unpack_submodule "%{SOURCE9}" "%(dirname %{SOURCEURL9})" -unpack_submodule "%{SOURCE10}" "%(dirname %{SOURCEURL10})" -unpack_submodule "%{SOURCE11}" "%(dirname %{SOURCEURL11})" -unpack_submodule "%{SOURCE12}" "%(dirname %{SOURCEURL12})" -unpack_submodule "%{SOURCE13}" "%(dirname %{SOURCEURL13})" -unpack_submodule "%{SOURCE14}" "%(dirname %{SOURCEURL14})" -unpack_submodule "%{SOURCE15}" "%(dirname %{SOURCEURL15})" -unpack_submodule "%{SOURCE16}" "%(dirname %{SOURCEURL16})" -unpack_submodule "%{SOURCE17}" "%(dirname %{SOURCEURL17})" -unpack_submodule "%{SOURCE18}" "%(dirname %{SOURCEURL18})" -unpack_submodule "%{SOURCE29}" "%(dirname %{SOURCEURL29})" -unpack_submodule "%{SOURCE30}" "%(dirname %{SOURCEURL30})" -unpack_submodule "%{SOURCE31}" "%(dirname %{SOURCEURL31})" -unpack_submodule "%{SOURCE32}" "%(dirname %{SOURCEURL32})" -unpack_submodule "%{SOURCE33}" "%(dirname %{SOURCEURL33})" -unpack_submodule "%{SOURCE34}" "%(dirname %{SOURCEURL34})" -unpack_submodule "%{SOURCE35}" "%(dirname %{SOURCEURL35})" - -sed -e "s/@VERSION@/%{version}/g" \ - -e "s/@RPM_RELEASE@/%{release}/g" \ - -e "s/@TARBALL_BASENAME@/ceph-%{version}/g" \ - -i alpine/APKBUILD.in -mv alpine/APKBUILD.in alpine/APKBUILD - -%build -# LTO can be enabled as soon as the following GCC bug is fixed: -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 -%define _lto_cflags %{nil} - -%if 0%{?rhel} == 7 -. /opt/rh/devtoolset-8/enable -%endif - -%if 0%{with cephfs_java} -# Find jni.h -for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do - [ -d $i ] && java_inc="$java_inc -I$i" -done -%endif - -%if 0%{?suse_version} -# the following setting fixed an OOM condition we once encountered in the OBS -RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768" -%endif - -%stx_check_config -export CPPFLAGS="$java_inc" -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS" -export LDFLAGS="$RPM_LD_FLAGS" - -# Parallel build settings ... -CEPH_MFLAGS_JOBS="%{?_smp_mflags}" -CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//') -%if 0%{?__isa_bits} == 32 -# 32-bit builds can use 3G memory max, which is not enough even for -j2 -CEPH_SMP_NCPUS="1" -%endif -# do not eat all memory -echo "Available memory:" -free -h -echo "System limits:" -ulimit -a -if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then - mem_per_process=2500 - max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p") - max_jobs="$(($max_mem / $mem_per_process))" - test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits" - test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits" -fi -export CEPH_SMP_NCPUS -export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS" - -env | sort - -mkdir build -cd build -%if 0%{?rhel} == 7 -CMAKE=cmake3 -%else -CMAKE=cmake -%endif -${CMAKE} .. \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ - -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \ - -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=%{_prefix}/lib/systemd/system \ - -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \ - -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ - -DCMAKE_INSTALL_INITCEPH=%{_initrddir} \ - -DCMAKE_INSTALL_MANDIR=%{_mandir} \ - -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \ - -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ - -DWITH_MANPAGE=ON \ - -DWITH_PYTHON3=ON \ - -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ -%if %{with python2} - -DWITH_PYTHON2=ON \ -%else - -DWITH_PYTHON2=OFF \ - -DMGR_PYTHON_VERSION=3 \ -%endif -%if 0%{without ceph_test_package} - -DWITH_TESTS=OFF \ -%endif -%if 0%{with cephfs_java} - -DWITH_CEPHFS_JAVA=ON \ -%endif -%if 0%{with selinux} - -DWITH_SELINUX=ON \ -%endif -%if %{with lttng} - -DWITH_LTTNG=ON \ - -DWITH_BABELTRACE=ON \ -%else - -DWITH_LTTNG=OFF \ - -DWITH_BABELTRACE=OFF \ -%endif - $CEPH_EXTRA_CMAKE_ARGS \ -%if 0%{with ocf} - -DWITH_OCF=ON \ -%endif -%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64 - -DWITH_BOOST_CONTEXT=ON \ -%else - -DWITH_BOOST_CONTEXT=OFF \ -%endif -%if 0%{with cephfs_shell} - -DWITH_CEPHFS_SHELL=ON \ -%endif -%if 0%{with libradosstriper} - -DWITH_LIBRADOSSTRIPER=ON \ -%else - -DWITH_LIBRADOSSTRIPER=OFF \ -%endif -%if 0%{with amqp_endpoint} - -DWITH_RADOSGW_AMQP_ENDPOINT=ON \ -%else - -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ -%endif -%if 0%{with kafka_endpoint} - -DWITH_RADOSGW_KAFKA_ENDPOINT=ON \ -%else - -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ -%endif - -DBOOST_J=$CEPH_SMP_NCPUS \ - -DWITH_GRAFANA=ON - -make "$CEPH_MFLAGS_JOBS" - - -%if 0%{with make_check} -%check -# run in-tree unittests -cd build -ctest "$CEPH_MFLAGS_JOBS" -%endif - - -%install -pushd build -make DESTDIR=%{buildroot} install -popd -install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap -%if 0%{?fedora} || 0%{?rhel} -install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph -%endif -%if 0%{?suse_version} -install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name} -%endif -%if %{without stx} -install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf -%endif -%if %{without stx} -install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset -%endif -mkdir -p %{buildroot}%{_sbindir} -install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph -chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf -install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING -install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf - -# firewall templates and /sbin/mount.ceph symlink -%if 0%{?suse_version} -mkdir -p %{buildroot}/sbin -ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph -%endif - -# udev rules -install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules -install -m 0640 -D udev/60-ceph-by-parttypeuuid.rules %{buildroot}%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules -%if %{without stx} -install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules -%endif - -# sudoers.d -install -m 0440 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl - -%if 0%{?rhel} >= 8 -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/* -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_sbindir}/* -%endif - -#set up placeholder directories -mkdir -p %{buildroot}%{_sysconfdir}/ceph -mkdir -p %{buildroot}%{_localstatedir}/run/ceph -mkdir -p %{buildroot}%{_localstatedir}/log/ceph -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd -mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror - -%if %{with stx} -install -d -m 750 %{buildroot}%{_sysconfdir}/services.d/controller -install -d -m 750 %{buildroot}%{_sysconfdir}/services.d/storage -install -d -m 750 %{buildroot}%{_sysconfdir}/services.d/worker -mkdir -p %{buildroot}%{_initrddir} -mkdir -p %{buildroot}%{_sysconfdir}/ceph -mkdir -p %{buildroot}%{_unitdir} - -install -m 750 %{SOURCE19} %{buildroot}%{_sysconfdir}/services.d/controller/ -install -m 750 %{SOURCE19} %{buildroot}%{_sysconfdir}/services.d/storage/ -install -m 750 %{SOURCE19} %{buildroot}%{_sysconfdir}/services.d/worker/ -install -m 750 %{SOURCE20} %{buildroot}%{_initrddir}/mgr-restful-plugin -install -m 750 %{SOURCE21} %{buildroot}%{_sysconfdir}/ceph/ -install -m 750 %{SOURCE22} %{buildroot}%{_initrddir}/ceph-init-wrapper -install -m 640 %{SOURCE23} %{buildroot}%{_sysconfdir}/ceph/ -install -m 700 %{SOURCE24} %{buildroot}%{_sbindir}/ceph-manage-journal -install -m 644 %{SOURCE25} %{buildroot}%{_unitdir}/ceph.service -install -m 644 %{SOURCE26} %{buildroot}%{_unitdir}/mgr-restful-plugin.service -install -m 700 %{SOURCE27} %{buildroot}%{_sbindir}/ceph-preshutdown.sh -install -D -m 644 %{SOURCE28} %{buildroot}%{_unitdir}/docker.service.d/starlingx-docker-override.conf - -install -m 750 src/init-radosgw %{buildroot}/%{_initrddir}/ceph-radosgw -sed -i '/### END INIT INFO/a SYSTEMCTL_SKIP_REDIRECT=1' %{buildroot}/%{_initrddir}/ceph-radosgw -install -m 750 src/init-rbdmap %{buildroot}/%{_initrddir}/rbdmap -install -d -m 750 %{buildroot}/var/log/radosgw -%endif - -%if 0%{?suse_version} -# create __pycache__ directories and their contents -%py3_compile %{buildroot}%{python3_sitelib} -# prometheus alerts -install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml -# hardlink duplicate files under /usr to save space -%fdupes %{buildroot}%{_prefix} -%endif - -%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} - -%clean -rm -rf %{buildroot} - -################################################################################# -# files and systemd scriptlets -################################################################################# -%files - -%files base -%{_bindir}/ceph-crash -%{_bindir}/crushtool -%{_bindir}/monmaptool -%{_bindir}/osdmaptool -%{_bindir}/ceph-kvstore-tool -%{_bindir}/ceph-run -%{_bindir}/ceph-detect-init -%if %{with stx} -%{_initrddir}/ceph -%{_initrddir}/mgr-restful-plugin -%{_initrddir}/ceph-init-wrapper -%{_sysconfdir}/ceph/ceph.conf.pmon -%config(noreplace) %{_sysconfdir}/ceph/ceph.conf -%{_sysconfdir}/services.d/* -%{_sbindir}/ceph-manage-journal -%{_sbindir}/ceph-preshutdown.sh -%{_unitdir}/docker.service.d/starlingx-docker-override.conf -%endif -%if %{without stx} -%{_libexecdir}/systemd/system-preset/50-ceph.preset -%endif -%{_sbindir}/ceph-create-keys -%{_sbindir}/ceph-disk -%dir %{_libexecdir}/ceph -%{_libexecdir}/ceph/ceph_common.sh -%dir %{_libdir}/rados-classes -%{_libdir}/rados-classes/* -%dir %{_libdir}/ceph -%dir %{_libdir}/ceph/erasure-code -%{_libdir}/ceph/erasure-code/libec_*.so* -%dir %{_libdir}/ceph/compressor -%{_libdir}/ceph/compressor/libceph_*.so* -%{_unitdir}/ceph-crash.service -%ifarch x86_64 -%dir %{_libdir}/ceph/crypto -%{_libdir}/ceph/crypto/libceph_*.so* -%endif -%if %{with lttng} -%{_libdir}/libos_tp.so* -%{_libdir}/libosd_tp.so* -%endif -%config(noreplace) %{_sysconfdir}/logrotate.d/ceph -%if 0%{?fedora} || 0%{?rhel} -%config(noreplace) %{_sysconfdir}/sysconfig/ceph -%endif -%if 0%{?suse_version} -%{_fillupdir}/sysconfig.* -%endif -%{_unitdir}/ceph.target -%if %{with stx} -%{_unitdir}/ceph.service -%{_unitdir}/mgr-restful-plugin.service -%endif -%if 0%{with python2} -%{python_sitelib}/ceph_detect_init* -%{python_sitelib}/ceph_disk* -%else -%if 0%{with python3} -%{python3_sitelib}/ceph_detect_init* -%{python3_sitelib}/ceph_disk* -%endif -%endif -%if 0%{with python2} -%dir %{python_sitelib}/ceph_volume -%{python_sitelib}/ceph_volume/* -%{python_sitelib}/ceph_volume-* -%else -%if 0%{with python3} -%dir %{python3_sitelib}/ceph_volume -%{python3_sitelib}/ceph_volume/* -%{python3_sitelib}/ceph_volume-* -%endif -%endif -%if %{with man_pages} -%{_mandir}/man8/ceph-deploy.8* -%{_mandir}/man8/ceph-create-keys.8* -%{_mandir}/man8/ceph-run.8* -%{_mandir}/man8/crushtool.8* -%{_mandir}/man8/osdmaptool.8* -%{_mandir}/man8/monmaptool.8* -%{_mandir}/man8/ceph-kvstore-tool.8* -%endif -#set up placeholder directories -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror - -%if %{without stx} -%post base -/sbin/ldconfig -%if 0%{?suse_version} -%fillup_only -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl preset ceph-disk@\*.service ceph.target ceph-crash.service >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-disk@\*.service ceph.target ceph-crash.service -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || : -fi - -%preun base -%if 0%{?suse_version} -%service_del_preun ceph-disk@\*.service ceph.target ceph-crash.service -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-disk@\*.service ceph.target ceph-crash.service -%endif - -%postun base -/sbin/ldconfig -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-disk@\*.service > /dev/null 2>&1 || : - fi -fi -%endif - -%files common -%dir %{_docdir}/ceph -%doc %{_docdir}/ceph/sample.ceph.conf -%license %{_docdir}/ceph/COPYING -%{_bindir}/ceph -%{_bindir}/ceph-authtool -%{_bindir}/ceph-conf -%{_bindir}/ceph-dencoder -%{_bindir}/ceph-rbdnamer -%{_bindir}/ceph-syn -%{_bindir}/cephfs-data-scan -%{_bindir}/cephfs-journal-tool -%{_bindir}/cephfs-table-tool -%{_bindir}/rados -%{_bindir}/radosgw-admin -%{_bindir}/rbd -%{_bindir}/rbd-replay -%{_bindir}/rbd-replay-many -%{_bindir}/rbdmap -%if %{with cephfs} -%{_sbindir}/mount.ceph -%endif -%if 0%{?suse_version} -/sbin/mount.ceph -%endif -%if %{with lttng} -%{_bindir}/rbd-replay-prep -%endif -%{_bindir}/ceph-post-file -%if %{without stx} -%{_tmpfilesdir}/ceph-common.conf -%endif -%if %{with man_pages} -%{_mandir}/man8/ceph-authtool.8* -%{_mandir}/man8/ceph-conf.8* -%{_mandir}/man8/ceph-dencoder.8* -%{_mandir}/man8/ceph-diff-sorted.8* -%{_mandir}/man8/ceph-rbdnamer.8* -%{_mandir}/man8/ceph-syn.8* -%{_mandir}/man8/ceph-post-file.8* -%{_mandir}/man8/ceph.8* -%{_mandir}/man8/mount.ceph.8* -%{_mandir}/man8/rados.8* -%{_mandir}/man8/radosgw-admin.8* -%{_mandir}/man8/rbd.8* -%{_mandir}/man8/rbdmap.8* -%{_mandir}/man8/rbd-replay.8* -%{_mandir}/man8/rbd-replay-many.8* -%{_mandir}/man8/rbd-replay-prep.8* -%{_mandir}/man8/rgw-orphan-list.8* -%endif -%dir %{_datadir}/ceph/ -%{_datadir}/ceph/known_hosts_drop.ceph.com -%{_datadir}/ceph/id_rsa_drop.ceph.com -%{_datadir}/ceph/id_rsa_drop.ceph.com.pub -%dir %{_sysconfdir}/ceph/ -%config %{_sysconfdir}/bash_completion.d/ceph -%config %{_sysconfdir}/bash_completion.d/rados -%config %{_sysconfdir}/bash_completion.d/rbd -%config %{_sysconfdir}/bash_completion.d/radosgw-admin -%attr(640,root,root) %config(noreplace) %{_sysconfdir}/ceph/rbdmap -%if %{with stx} -%{_initrddir}/rbdmap -%else -%{_unitdir}/rbdmap.service -%endif -%dir %{_udevrulesdir} -%{_udevrulesdir}/50-rbd.rules -%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/ - -%pre common -%if %{without stx} -CEPH_GROUP_ID=167 -CEPH_USER_ID=167 -%if 0%{?rhel} || 0%{?fedora} -/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || : -/usr/sbin/useradd ceph -u $CEPH_USER_ID -o -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2>/dev/null || : -%endif -%if 0%{?suse_version} -if ! getent group ceph >/dev/null ; then - CEPH_GROUP_ID_OPTION="" - getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID" - groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || : -fi -if ! getent passwd ceph >/dev/null ; then - CEPH_USER_ID_OPTION="" - getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID" - useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || : -fi -usermod -c "Ceph storage service" \ - -d %{_localstatedir}/lib/ceph \ - -g ceph \ - -s /sbin/nologin \ - ceph -%endif -exit 0 -%endif - -%post common -%if %{without stx} -%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf -%endif - -%postun common -# Package removal cleanup -if [ "$1" -eq "0" ] ; then - rm -rf %{_localstatedir}/log/ceph - rm -rf %{_sysconfdir}/ceph -fi - -%files mds -%{_bindir}/ceph-mds -%if %{with man_pages} -%{_mandir}/man8/ceph-mds.8* -%endif -%{_unitdir}/ceph-mds@.service -%{_unitdir}/ceph-mds.target -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds - -%post mds -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-mds@\*.service ceph-mds.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || : -fi - -%preun mds -%if 0%{?suse_version} -%service_del_preun ceph-mds@\*.service ceph-mds.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-mds@\*.service ceph-mds.target -%endif - -%postun mds -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-mds@\*.service ceph-mds.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-mds@\*.service ceph-mds.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || : - fi -fi - -%files mgr -%{_bindir}/ceph-mgr -%dir %{_datadir}/ceph/mgr -%{_datadir}/ceph/mgr/alerts -%{_datadir}/ceph/mgr/ansible -%{_datadir}/ceph/mgr/balancer -%{_datadir}/ceph/mgr/crash -%{_datadir}/ceph/mgr/deepsea -%{_datadir}/ceph/mgr/devicehealth -%{_datadir}/ceph/mgr/insights -%{_datadir}/ceph/mgr/iostat -%{_datadir}/ceph/mgr/localpool -%{_datadir}/ceph/mgr/mgr_module.* -%{_datadir}/ceph/mgr/mgr_util.* -%{_datadir}/ceph/mgr/orchestrator_cli -%{_datadir}/ceph/mgr/orchestrator.* -%{_datadir}/ceph/mgr/osd_perf_query -%{_datadir}/ceph/mgr/pg_autoscaler -%{_datadir}/ceph/mgr/progress -%{_datadir}/ceph/mgr/prometheus -%{_datadir}/ceph/mgr/rbd_support -%{_datadir}/ceph/mgr/restful -%{_datadir}/ceph/mgr/selftest -%{_datadir}/ceph/mgr/status -%{_datadir}/ceph/mgr/telegraf -%{_datadir}/ceph/mgr/telemetry -%{_datadir}/ceph/mgr/test_orchestrator -%{_datadir}/ceph/mgr/volumes -%{_datadir}/ceph/mgr/zabbix -%{_unitdir}/ceph-mgr@.service -%{_unitdir}/ceph-mgr.target -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr - -%post mgr -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-mgr@\*.service ceph-mgr.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || : -fi - -%preun mgr -%if 0%{?suse_version} -%service_del_preun ceph-mgr@\*.service ceph-mgr.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-mgr@\*.service ceph-mgr.target -%endif - -%postun mgr -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-mgr@\*.service ceph-mgr.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-mgr@\*.service ceph-mgr.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || : - fi -fi - -%files mgr-dashboard -%{_datadir}/ceph/mgr/dashboard - -%post mgr-dashboard -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-dashboard -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mgr-diskprediction-local -%{_datadir}/ceph/mgr/diskprediction_local - -%post mgr-diskprediction-local -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-diskprediction-local -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mgr-diskprediction-cloud -%{_datadir}/ceph/mgr/diskprediction_cloud - -%post mgr-diskprediction-cloud -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-diskprediction-cloud -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mgr-rook -%{_datadir}/ceph/mgr/rook - -%post mgr-rook -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-rook -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mgr-k8sevents -%{_datadir}/ceph/mgr/k8sevents - -%post mgr-k8sevents -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-k8sevents -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mgr-ssh -%{_datadir}/ceph/mgr/ssh - -%post mgr-ssh -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%postun mgr-ssh -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : -fi - -%files mon -%{_bindir}/ceph-mon -%{_bindir}/ceph-monstore-tool -%if %{with man_pages} -%{_mandir}/man8/ceph-mon.8* -%endif -%if %{without stx} -%{_unitdir}/ceph-mon@.service -%{_unitdir}/ceph-mon.target -%else -%exclude %{_unitdir}/ceph-mon@.service -%exclude %{_unitdir}/ceph-mon.target -%endif -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon - -%if %{without stx} -%post mon -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-mon@\*.service ceph-mon.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || : -fi - -%preun mon -%if 0%{?suse_version} -%service_del_preun ceph-mon@\*.service ceph-mon.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-mon@\*.service ceph-mon.target -%endif - -%postun mon -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-mon@\*.service ceph-mon.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-mon@\*.service ceph-mon.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || : - fi -fi -%endif - -%if %{with fuse} -%files fuse -%{_bindir}/ceph-fuse -%if %{with man_pages} -%{_mandir}/man8/ceph-fuse.8* -%endif -%{_sbindir}/mount.fuse.ceph -%{_unitdir}/ceph-fuse@.service -%{_unitdir}/ceph-fuse.target - -%files -n rbd-fuse -%{_bindir}/rbd-fuse -%if %{with man_pages} -%{_mandir}/man8/rbd-fuse.8* -%endif -%endif - -%files -n rbd-mirror -%{_bindir}/rbd-mirror -%if %{with man_pages} -%{_mandir}/man8/rbd-mirror.8* -%endif -%if %{without stx} -%{_unitdir}/ceph-rbd-mirror@.service -%{_unitdir}/ceph-rbd-mirror.target -%endif - - -%if %{without stx} -%post -n rbd-mirror -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || : -fi - -%preun -n rbd-mirror -%if 0%{?suse_version} -%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif - -%postun -n rbd-mirror -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || : - fi -fi -%endif - -%files -n rbd-nbd -%{_bindir}/rbd-nbd -%if %{with man_pages} -%{_mandir}/man8/rbd-nbd.8* -%endif - -%files radosgw -%{_bindir}/ceph-diff-sorted -%{_bindir}/radosgw -%{_bindir}/radosgw-token -%{_bindir}/radosgw-es -%{_bindir}/radosgw-object-expirer -%{_bindir}/rgw-gap-list -%{_bindir}/rgw-gap-list-comparator -%{_bindir}/rgw-orphan-list -%if %{with man_pages} -%{_mandir}/man8/radosgw.8* -%endif -%dir %{_localstatedir}/lib/ceph/radosgw -%if %{with stx} -%{_initrddir}/ceph-radosgw -%dir /var/log/radosgw -%else -%{_unitdir}/ceph-radosgw@.service -%{_unitdir}/ceph-radosgw.target -%endif - -%if %{without stx} -%post radosgw -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-radosgw@\*.service ceph-radosgw.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || : -fi - -%preun radosgw -%if 0%{?suse_version} -%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target -%endif - -%postun radosgw -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || : - fi -fi -%endif - -%files osd -%{_bindir}/ceph-clsinfo -%{_bindir}/ceph-bluestore-tool -%{_bindir}/ceph-objectstore-tool -%{_bindir}/ceph-osdomap-tool -%{_bindir}/ceph-osd -%if %{with stx} -%{_sbindir}/ceph-manage-journal -%endif -%{_libexecdir}/ceph/ceph-osd-prestart.sh -%{_sbindir}/ceph-volume -%{_sbindir}/ceph-volume-systemd -%dir %{_udevrulesdir} -%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules -%if %{without stx} -%{_udevrulesdir}/95-ceph-osd.rules -%endif -%if %{with man_pages} -%{_mandir}/man8/ceph-clsinfo.8* -%{_mandir}/man8/ceph-osd.8* -%{_mandir}/man8/ceph-bluestore-tool.8* -%{_mandir}/man8/ceph-volume.8* -%{_mandir}/man8/ceph-volume-systemd.8* -%endif -%if 0%{?rhel} && ! 0%{?centos} -%attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman -%endif -%if %{without stx} -%{_unitdir}/ceph-osd@.service -%{_unitdir}/ceph-osd.target -%{_unitdir}/ceph-volume@.service -%endif -%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd -%config(noreplace) %{_sysctldir}/90-ceph-osd.conf -%{_sysconfdir}/sudoers.d/ceph-osd-smartctl - -%if %{without stx} -%post osd -%if 0%{?suse_version} -if [ $1 -eq 1 ] ; then - /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || : -fi -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif -if [ $1 -eq 1 ] ; then -/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || : -fi -%if 0%{?sysctl_apply} - %sysctl_apply 90-ceph-osd.conf -%else - /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || : -%endif - -%preun osd -%if 0%{?suse_version} -%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif - -%postun osd -%if 0%{?suse_version} -DISABLE_RESTART_ON_UPDATE="yes" -%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif -if [ $1 -ge 1 ] ; then - # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to - # "yes". In any case: if units are not running, do not touch them. - SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph - if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then - source $SYSCONF_CEPH - fi - if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then - /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || : - fi -fi -%endif - -%if %{with ocf} - -%files resource-agents -%dir %{_prefix}/lib/ocf -%dir %{_prefix}/lib/ocf/resource.d -%dir %{_prefix}/lib/ocf/resource.d/ceph -%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd - -%endif - -%files -n librados2 -%{_libdir}/librados.so.* -%dir %{_libdir}/ceph -%{_libdir}/ceph/libceph-common.so.* -%if %{with lttng} -%{_libdir}/librados_tp.so.* -%endif -%dir %{_sysconfdir}/ceph - -%post -n librados2 -p /sbin/ldconfig - -%postun -n librados2 -p /sbin/ldconfig - -%files -n librados-devel -%dir %{_includedir}/rados -%{_includedir}/rados/librados.h -%{_includedir}/rados/rados_types.h -%{_libdir}/librados.so -%if %{with lttng} -%{_libdir}/librados_tp.so -%endif -%{_bindir}/librados-config -%if %{with man_pages} -%{_mandir}/man8/librados-config.8* -%endif - -%files -n libradospp-devel -%dir %{_includedir}/rados -%{_includedir}/rados/buffer.h -%{_includedir}/rados/buffer_fwd.h -%{_includedir}/rados/crc32c.h -%{_includedir}/rados/inline_memory.h -%{_includedir}/rados/librados.hpp -%{_includedir}/rados/librados_fwd.hpp -%{_includedir}/rados/page.h -%{_includedir}/rados/rados_types.hpp - -%if 0%{with python2} -%files -n python-rados -%{python_sitearch}/rados.so -%{python_sitearch}/rados-*.egg-info -%endif - -%if 0%{with python3} -%files -n python%{python3_pkgversion}-rados -%{python3_sitearch}/rados.cpython*.so -%{python3_sitearch}/rados-*.egg-info -%endif - -%if 0%{with libradosstriper} -%files -n libradosstriper1 -%{_libdir}/libradosstriper.so.* - -%post -n libradosstriper1 -p /sbin/ldconfig - -%postun -n libradosstriper1 -p /sbin/ldconfig - -%files -n libradosstriper-devel -%dir %{_includedir}/radosstriper -%{_includedir}/radosstriper/libradosstriper.h -%{_includedir}/radosstriper/libradosstriper.hpp -%{_libdir}/libradosstriper.so -%endif - -%files -n librbd1 -%{_libdir}/librbd.so.* -%if %{with lttng} -%{_libdir}/librbd_tp.so.* -%endif - -%post -n librbd1 -p /sbin/ldconfig - -%postun -n librbd1 -p /sbin/ldconfig - -%files -n librbd-devel -%dir %{_includedir}/rbd -%{_includedir}/rbd/librbd.h -%{_includedir}/rbd/librbd.hpp -%{_includedir}/rbd/features.h -%{_libdir}/librbd.so -%if %{with lttng} -%{_libdir}/librbd_tp.so -%endif - -%files -n librgw2 -%{_libdir}/librgw.so.* -%{_libdir}/librgw_admin_user.so.* -%if %{with lttng} -%{_libdir}/librgw_op_tp.so.* -%{_libdir}/librgw_rados_tp.so.* -%endif - -%post -n librgw2 -p /sbin/ldconfig - -%postun -n librgw2 -p /sbin/ldconfig - -%files -n librgw-devel -%dir %{_includedir}/rados -%{_includedir}/rados/librgw.h -%{_includedir}/rados/librgw_admin_user.h -%{_includedir}/rados/rgw_file.h -%{_libdir}/librgw.so -%{_libdir}/librgw_admin_user.so -%if %{with lttng} -%{_libdir}/librgw_op_tp.so -%{_libdir}/librgw_rados_tp.so -%endif - -%if 0%{with python2} -%files -n python-rgw -%{python_sitearch}/rgw.so -%{python_sitearch}/rgw-*.egg-info -%endif - -%if 0%{with python3} -%files -n python%{python3_pkgversion}-rgw -%{python3_sitearch}/rgw.cpython*.so -%{python3_sitearch}/rgw-*.egg-info -%endif - -%if 0%{with python2} -%files -n python-rbd -%{python_sitearch}/rbd.so -%{python_sitearch}/rbd-*.egg-info -%endif - -%if 0%{with python3} -%files -n python%{python3_pkgversion}-rbd -%{python3_sitearch}/rbd.cpython*.so -%{python3_sitearch}/rbd-*.egg-info -%endif - -%if %{with cephfs} -%files -n libcephfs2 -%{_libdir}/libcephfs.so.* -%dir %{_sysconfdir}/ceph - -%post -n libcephfs2 -p /sbin/ldconfig - -%postun -n libcephfs2 -p /sbin/ldconfig -%endif - -%if %{with cephfs} -%files -n libcephfs-devel -%dir %{_includedir}/cephfs -%{_includedir}/cephfs/libcephfs.h -%{_includedir}/cephfs/ceph_ll_client.h -%{_libdir}/libcephfs.so -%endif - -%if %{with cephfs} -%if 0%{with python2} -%files -n python-cephfs -%{python_sitearch}/cephfs.so -%{python_sitearch}/cephfs-*.egg-info -%{python_sitelib}/ceph_volume_client.py* -%endif -%endif - -%if 0%{with python3} -%files -n python%{python3_pkgversion}-cephfs -%{python3_sitearch}/cephfs.cpython*.so -%{python3_sitearch}/cephfs-*.egg-info -%{python3_sitelib}/ceph_volume_client.py -%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* -%endif - -%if 0%{with python2} -%files -n python-ceph-argparse -%{python_sitelib}/ceph_argparse.py* -%{python_sitelib}/ceph_daemon.py* -%endif - -%if 0%{with python3} -%files -n python%{python3_pkgversion}-ceph-argparse -%{python3_sitelib}/ceph_argparse.py -%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* -%{python3_sitelib}/ceph_daemon.py -%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* -%endif - -%if 0%{with cephfs_shell} -%files -n cephfs-shell -%{python3_sitelib}/cephfs_shell-*.egg-info -%{_bindir}/cephfs-shell -%endif - -%if 0%{with ceph_test_package} -%if %{with debug} -%files -n ceph-test -%{_bindir}/ceph-client-debug -%{_bindir}/ceph_bench_log -%{_bindir}/ceph_kvstorebench -%{_bindir}/ceph_multi_stress_watch -%{_bindir}/ceph_erasure_code -%{_bindir}/ceph_erasure_code_benchmark -%{_bindir}/ceph_omapbench -%{_bindir}/ceph_objectstore_bench -%{_bindir}/ceph_perf_objectstore -%{_bindir}/ceph_perf_local -%{_bindir}/ceph_perf_msgr_client -%{_bindir}/ceph_perf_msgr_server -%{_bindir}/ceph_psim -%{_bindir}/ceph_radosacl -%{_bindir}/ceph_rgw_jsonparser -%{_bindir}/ceph_rgw_multiparser -%{_bindir}/ceph_scratchtool -%{_bindir}/ceph_scratchtoolpp -%{_bindir}/ceph_test_* -%{_bindir}/ceph-coverage -%{_bindir}/ceph-debugpack -%{_bindir}/cephdeduptool -%if %{with man_pages} -%{_mandir}/man8/ceph-debugpack.8* -%endif -%dir %{_libdir}/ceph -%{_libdir}/ceph/ceph-monstore-update-crush.sh -%else -# instead of fixing installed but unpackaged files issue we're -# packaging them even if debug build is not enabled -%files -n ceph-test -%defattr(-,root,root,-) -%{_bindir}/ceph-coverage -%{_bindir}/ceph-debugpack -%{_bindir}/cephdeduptool -%{_libdir}/ceph/ceph-monstore-update-crush.sh -%endif -%endif - -%if 0%{with cephfs_java} -%files -n libcephfs_jni1 -%{_libdir}/libcephfs_jni.so.* - -%post -n libcephfs_jni1 -p /sbin/ldconfig - -%postun -n libcephfs_jni1 -p /sbin/ldconfig - -%files -n libcephfs_jni-devel -%{_libdir}/libcephfs_jni.so - -%files -n cephfs-java -%{_javadir}/libcephfs.jar -%{_javadir}/libcephfs-test.jar -%endif - -%files -n rados-objclass-devel -%dir %{_includedir}/rados -%{_includedir}/rados/objclass.h - -%if 0%{with selinux} -%files selinux -%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp -%{_datadir}/selinux/devel/include/contrib/ceph.if -%if %{with man_pages} -%{_mandir}/man8/ceph_selinux.8* -%endif - -%if %{without stx} -%post selinux -# backup file_contexts before update -. /etc/selinux/config -FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts -cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre - -# Install the policy -/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp - -# Load the policy if SELinux is enabled -if ! /usr/sbin/selinuxenabled; then - # Do not relabel if selinux is not enabled - exit 0 -fi - -if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then - # Do not relabel if file contexts did not change - exit 0 -fi - -# Check whether the daemons are running -/usr/bin/systemctl status ceph.target > /dev/null 2>&1 -STATUS=$? - -# Stop the daemons if they were running -if test $STATUS -eq 0; then - /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 -fi - -# Relabel the files fix for first package install -# Use ceph-disk fix for first package install and fixfiles otherwise -if [ "$1" = "1" ]; then - /usr/sbin/ceph-disk fix --selinux -else - /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null -fi - -rm -f ${FILE_CONTEXT}.pre -# The fixfiles command won't fix label for /var/run/ceph -/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 - -# Start the daemons iff they were running before -if test $STATUS -eq 0; then - /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : -fi -exit 0 - -%postun selinux -if [ $1 -eq 0 ]; then - # backup file_contexts before update - . /etc/selinux/config - FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts - cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre - - # Remove the module - /usr/sbin/semodule -n -r ceph > /dev/null 2>&1 - - # Reload the policy if SELinux is enabled - if ! /usr/sbin/selinuxenabled ; then - # Do not relabel if SELinux is not enabled - exit 0 - fi - - # Check whether the daemons are running - /usr/bin/systemctl status ceph.target > /dev/null 2>&1 - STATUS=$? - - # Stop the daemons if they were running - if test $STATUS -eq 0; then - /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 - fi - - /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null - rm -f ${FILE_CONTEXT}.pre - # The fixfiles command won't fix label for /var/run/ceph - /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 - - # Start the daemons if they were running before - if test $STATUS -eq 0; then - /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : - fi -fi -exit 0 -%endif - -%endif # with selinux - -%if 0%{with python2} -%files -n python-ceph-compat -# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to -# actually build this meta package. -%endif - -%files grafana-dashboards -%if 0%{?suse_version} -%attr(0755,root,root) %dir %{_sysconfdir}/grafana -%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards -%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard -%else -%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard -%endif -%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/* -%doc monitoring/grafana/dashboards/README -%doc monitoring/grafana/README.md - -%if 0%{?suse_version} -%files prometheus-alerts -%dir /etc/prometheus/SUSE/ -%dir /etc/prometheus/SUSE/default_rules/ -%config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml -%endif - - -%changelog diff --git a/ceph/ceph/centos/patches/0001-Add-hooks-for-orderly-shutdown-on-controller.patch b/ceph/ceph/centos/patches/0001-Add-hooks-for-orderly-shutdown-on-controller.patch deleted file mode 100644 index 15bb7c3e5..000000000 --- a/ceph/ceph/centos/patches/0001-Add-hooks-for-orderly-shutdown-on-controller.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 03340eaf0004e3cc8e3f8991ea96a46757d92830 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Sat, 26 Jan 2019 13:34:55 -0500 -Subject: [PATCH] Add hooks for orderly shutdown on controller - -Hook the ceph init script to add systemd overrides to define -an orderly shutdown for StarlingX controllers. - -Signed-off-by: Don Penney ---- - src/init-ceph.in | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/src/init-ceph.in b/src/init-ceph.in -index 1fdb4b3..515d818 100644 ---- a/src/init-ceph.in -+++ b/src/init-ceph.in -@@ -861,6 +861,38 @@ for name in $what; do - fi - fi - -+ . /etc/platform/platform.conf -+ if [ "${nodetype}" = "controller" ]; then -+ # StarlingX: Hook the transient services launched by systemd-run -+ # to allow for proper cleanup and orderly shutdown -+ -+ # Set nullglob so wildcards will return empty string if no match -+ shopt -s nullglob -+ -+ OSD_SERVICES=$(for svc in /run/systemd/system/ceph-osd*.service; do basename $svc; done | xargs echo) -+ for d in /run/systemd/system/ceph-osd*.d; do -+ cat < $d/starlingx-overrides.conf -+[Unit] -+Before=docker.service -+After=sm-shutdown.service -+ -+EOF -+ done -+ -+ for d in /run/systemd/system/ceph-mon*.d; do -+ cat < $d/starlingx-overrides.conf -+[Unit] -+Before=docker.service -+After=sm-shutdown.service ${OSD_SERVICES} -+ -+EOF -+ done -+ -+ shopt -u nullglob -+ -+ systemctl daemon-reload -+ fi -+ - [ -n "$post_start" ] && do_cmd "$post_start" - [ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile - ;; --- -1.8.3.1 - diff --git a/config/facter/centos/build_srpm.data b/config/facter/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/facter/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/facter/centos/meta_patches/0001-spec-include-TiS-paches.patch b/config/facter/centos/meta_patches/0001-spec-include-TiS-paches.patch deleted file mode 100644 index f12a78339..000000000 --- a/config/facter/centos/meta_patches/0001-spec-include-TiS-paches.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0960bacb6c19c7af74cb77d27ae925a7af5d3410 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 09:58:00 -0400 -Subject: [PATCH 1/2] WRS: spec-include-TiS-paches.patch - ---- - SPECS/facter.spec | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/SPECS/facter.spec b/SPECS/facter.spec -index 97ee783..7996d45 100644 ---- a/SPECS/facter.spec -+++ b/SPECS/facter.spec -@@ -31,6 +31,13 @@ Source0: https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar. - Source1: https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -+# WRS patches -+Patch0001: 0001-ps.patch -+Patch0002: 0002-personality.patch -+Patch0003: 0003-centos_remove-net-commands-that-can-timeout.patch -+Patch0004: 0004-centos_fix-ipv6-regex.patch -+Patch0005: 0005-Hardcode-ipaddress-fact-to-localhost.patch -+ - # Upstream claims to only support 1.8.7 and higher - BuildRequires: ruby >= 1.8.7 - BuildRequires: ruby-devel -@@ -71,6 +78,12 @@ key off the values returned by facts. - - %prep - %setup -q -+# WRS apply patches -+%patch0001 -p1 -+%patch0002 -p1 -+%patch0003 -p2 -+%patch0004 -p2 -+%patch0005 -p1 - - %build - # Nothing to build --- -1.8.3.1 - diff --git a/config/facter/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch b/config/facter/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 37ba76298..000000000 --- a/config/facter/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fa978faa31b6b3806664f7729d9d190dfdaba862 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 09:58:00 -0400 -Subject: [PATCH 2/2] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/facter.spec ---- - SPECS/facter.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/facter.spec b/SPECS/facter.spec -index 7996d45..aa4a0db 100644 ---- a/SPECS/facter.spec -+++ b/SPECS/facter.spec -@@ -20,7 +20,7 @@ - - Name: facter - Version: 2.4.4 --Release: 4%{?dist} -+Release: 4.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Command and ruby library for gathering system information - Epoch: 1 - --- -1.8.3.1 - diff --git a/config/facter/centos/meta_patches/PATCH_ORDER b/config/facter/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index aef6d299e..000000000 --- a/config/facter/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-spec-include-TiS-paches.patch -0002-Update-package-versioning-for-TIS-format.patch diff --git a/config/facter/centos/patches/0001-ps.patch b/config/facter/centos/patches/0001-ps.patch deleted file mode 100644 index 699327f76..000000000 --- a/config/facter/centos/patches/0001-ps.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/lib/facter/ps.rb b/lib/facter/ps.rb -index 9163519..02117ac 100644 ---- a/lib/facter/ps.rb -+++ b/lib/facter/ps.rb -@@ -12,7 +12,7 @@ - # - - Facter.add(:ps) do -- setcode do 'ps -ef' end -+ setcode do 'ps -efww' end - end - - Facter.add(:ps) do -diff --git a/spec/unit/ps_spec.rb b/spec/unit/ps_spec.rb -index 2e25a4b..20c61af 100755 ---- a/spec/unit/ps_spec.rb -+++ b/spec/unit/ps_spec.rb -@@ -27,9 +27,9 @@ describe "ps facts" do - 'RedHat', - 'Debian', - ].each do |os| -- it "should return gnu/linux style ps -ef on operatingsystem #{os}" do -+ it "should return gnu/linux style ps -efww on operatingsystem #{os}" do - Facter.fact(:operatingsystem).stubs(:value).returns os -- Facter.fact(:ps).value.should == 'ps -ef' -+ Facter.fact(:ps).value.should == 'ps -efww' - end - end - diff --git a/config/facter/centos/patches/0002-personality.patch b/config/facter/centos/patches/0002-personality.patch deleted file mode 100644 index a1b6b5c8d..000000000 --- a/config/facter/centos/patches/0002-personality.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- - lib/facter/personality.rb | 21 ++++++++++++++++++ - lib/facter/subfunction.rb | 61 ++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 82 insertions(+) - ---- /dev/null -+++ b/lib/facter/personality.rb -@@ -0,0 +1,21 @@ -+# -+# personality.rb -+# -+# This fact gives the personality of this node. -+# -+require 'facter/util/file_read' -+ -+Facter.add('personality') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ if match = release.match(/^nodetype\=(.*)/) -+ match[1] -+ end -+ end -+ end -+end -+ -+# vim: set ts=2 sw=2 et : -+# encoding: utf-8 ---- /dev/null -+++ b/lib/facter/subfunction.rb -@@ -0,0 +1,61 @@ -+# -+# subfunction.rb -+# -+# This fact gives the subfunction of this node. -+# -+require 'facter/util/file_read' -+ -+Facter.add('subfunction') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ if match = release.match(/^subfunction\=(.*)/) -+ match[1] -+ end -+ end -+ end -+end -+ -+Facter.add('is_worker_subfunction') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ match = release.match(/^subfunction\=.*worker/) ? true : false -+ end -+ end -+end -+ -+Facter.add('is_controller_subfunction') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ match = release.match(/^subfunction\=.*controller/) ? true : false -+ end -+ end -+end -+ -+Facter.add('is_storage_subfunction') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ match = release.match(/^subfunction\=.*storage/) ? true : false -+ end -+ end -+end -+ -+Facter.add('is_lowlatency_subfunction') do -+ confine :kernel => :linux -+ -+ setcode do -+ if release = Facter::Util::FileRead.read('/etc/platform/platform.conf') -+ match = release.match(/^subfunction\=.*lowlatency/) ? true : false -+ end -+ end -+end -+ -+# vim: set ts=2 sw=2 et : -+# encoding: utf-8 diff --git a/config/facter/centos/patches/0003-centos_remove-net-commands-that-can-timeout.patch b/config/facter/centos/patches/0003-centos_remove-net-commands-that-can-timeout.patch deleted file mode 100644 index a17672ff1..000000000 --- a/config/facter/centos/patches/0003-centos_remove-net-commands-that-can-timeout.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- - facter-2.4.4/lib/facter/domain.rb | 24 +++++++++++++----------- - facter-2.4.4/lib/facter/uniqueid.rb | 9 +++++---- - 2 files changed, 18 insertions(+), 15 deletions(-) - ---- a/facter-2.4.4/lib/facter/domain.rb -+++ b/facter-2.4.4/lib/facter/domain.rb -@@ -33,22 +33,24 @@ Facter.add(:domain) do - full_hostname = 'hostname -f 2> /dev/null' - can_do_hostname_f = Regexp.union /Linux/i, /FreeBSD/i, /Darwin/i - -- hostname_command = if Facter.value(:kernel) =~ can_do_hostname_f -- full_hostname -- elsif Facter.value(:kernel) == "windows" -- windows_hostname -- else -- basic_hostname -- end -+ # Because hostname -f doesn't work for IPv6, don't use that flag -+ # hostname_command = if Facter.value(:kernel) =~ can_do_hostname_f -+ # full_hostname -+ # elsif Facter.value(:kernel) == "windows" -+ # windows_hostname -+ # else -+ # basic_hostname -+ # end -+ hostname_command = basic_hostname - - if name = Facter::Core::Execution.exec(hostname_command) \ - and name =~ /.*?\.(.+$)/ - - return_value = $1 -- elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \ -- and domain =~ /.+/ -- -- return_value = domain -+ # elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \ -+ # and domain =~ /.+/ -+ # -+ # return_value = domain - elsif FileTest.exists?("/etc/resolv.conf") - domain = nil - search = nil ---- a/facter-2.4.4/lib/facter/uniqueid.rb -+++ b/facter-2.4.4/lib/facter/uniqueid.rb -@@ -1,4 +1,5 @@ --Facter.add(:uniqueid) do -- setcode 'hostid' -- confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD} --end -+# hostid does not work with IPv6, and is not needed for Titanium cloud, so remove -+# Facter.add(:uniqueid) do -+# setcode 'hostid' -+# confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD} -+# end diff --git a/config/facter/centos/patches/0004-centos_fix-ipv6-regex.patch b/config/facter/centos/patches/0004-centos_fix-ipv6-regex.patch deleted file mode 100644 index 47012090e..000000000 --- a/config/facter/centos/patches/0004-centos_fix-ipv6-regex.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - facter-2.4.4/lib/facter/util/ip.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/facter-2.4.4/lib/facter/util/ip.rb -+++ b/facter-2.4.4/lib/facter/util/ip.rb -@@ -6,7 +6,7 @@ module Facter::Util::IP - REGEX_MAP = { - :linux => { - :ipaddress => /inet (?:addr:)?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/, -- :ipaddress6 => /inet6 (?:addr: )?((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/, -+ :ipaddress6 => /inet6 (?:addr: )?((?!(fe80|\:\:1))(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/, - :macaddress => /(?:ether|HWaddr)\s+((\w{1,2}:){5,}\w{1,2})/, - :netmask => /(?:Mask:|netmask )([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/, - :mtu => /MTU:?\s*(\d+)/i diff --git a/config/facter/centos/patches/0005-Hardcode-ipaddress-fact-to-localhost.patch b/config/facter/centos/patches/0005-Hardcode-ipaddress-fact-to-localhost.patch deleted file mode 100644 index 3af562c09..000000000 --- a/config/facter/centos/patches/0005-Hardcode-ipaddress-fact-to-localhost.patch +++ /dev/null @@ -1,188 +0,0 @@ -From af1818469ed789bad373e6c0f8d29669acc39669 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 26 Oct 2017 10:44:20 -0400 -Subject: [PATCH] Hardcode ipaddress fact to localhost - ---- - lib/facter/ipaddress.rb | 163 +----------------------------------------------- - 1 file changed, 2 insertions(+), 161 deletions(-) - -diff --git a/lib/facter/ipaddress.rb b/lib/facter/ipaddress.rb -index 6179a4d..4c54791 100644 ---- a/lib/facter/ipaddress.rb -+++ b/lib/facter/ipaddress.rb -@@ -1,169 +1,10 @@ - # Fact: ipaddress - # --# Purpose: Return the main IP address for a host. -+# To avoid potential timeouts with this fact, just return 127.0.0.1 always - # --# Resolution: --# On the Unixes does an ifconfig, and returns the first non 127.0.0.0/8 --# subnetted IP it finds. --# On Windows, it attempts to use the socket library and resolve the machine's --# hostname via DNS. --# --# On LDAP based hosts it tries to use either the win32/resolv library to --# resolve the hostname to an IP address, or on Unix, it uses the resolv --# library. --# --# As a fall back for undefined systems, it tries to run the "host" command to --# resolve the machine's hostname using the system DNS. --# --# Caveats: --# DNS resolution relies on working DNS infrastructure and resolvers on the --# host system. --# The ifconfig parsing purely takes the first IP address it finds without any --# checking this is a useful IP address. --# -- --require 'facter/util/ip' -- --Facter.add(:ipaddress) do -- confine :kernel => :linux -- setcode do -- ip = nil -- output = Facter::Util::IP.exec_ifconfig(["2>/dev/null"]) -- if output -- regexp = /inet (?:addr:)?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ -- output.split("\n").each do |line| -- match = regexp.match(line) -- if match and not /^127\./.match(match[1]) -- ip = match[1] -- break -- end -- end -- end -- ip -- end --end -- --Facter.add(:ipaddress) do -- confine :kernel => %w{FreeBSD OpenBSD Darwin DragonFly} -- setcode do -- ip = nil -- output = Facter::Util::IP.exec_ifconfig -- -- output.split(/^\S/).each do |str| -- if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ -- tmp = $1 -- unless tmp =~ /^127\./ -- ip = tmp -- break -- end -- end -- end -- -- ip -- end --end - - Facter.add(:ipaddress) do -- confine :kernel => %w{NetBSD SunOS} -- setcode do -- ip = nil -- output = Facter::Util::IP.exec_ifconfig(["-a"]) -- -- output.split(/^\S/).each do |str| -- if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ -- tmp = $1 -- unless tmp =~ /^127\./ or tmp == "0.0.0.0" -- ip = tmp -- break -- end -- end -- end -- -- ip -- end --end -- --Facter.add(:ipaddress) do -- confine :kernel => %w{AIX} -- setcode do -- ip = nil -- -- default_interface = Facter::Util::IP.exec_netstat(["-rn | grep default | awk '{ print $6 }'"]) -- output = Facter::Util::IP.exec_ifconfig([default_interface]) -- -- output.split(/^\S/).each do |str| -- if str =~ /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ -- ip = $1 -- end -- end -- -- ip -- end --end -- --Facter.add(:ipaddress) do -- confine :kernel => %w{windows} -- setcode do -- require 'facter/util/ip/windows' -- ipaddr = nil -- -- adapters = Facter::Util::IP::Windows.get_preferred_ipv4_adapters -- adapters.find do |nic| -- nic.IPAddress.any? do |addr| -- ipaddr = addr if Facter::Util::IP::Windows.valid_ipv4_address?(addr) -- ipaddr -- end -- end -- -- ipaddr -- end --end -- --Facter.add(:ipaddress, :timeout => 2) do -- setcode do -- if Facter.value(:kernel) == 'windows' -- require 'win32/resolv' -- else -- require 'resolv' -- end -- -- begin -- if hostname = Facter.value(:hostname) -- if Facter.value(:kernel) == 'windows' -- ip = Win32::Resolv.get_resolv_info.last[0] -- else -- ip = Resolv.getaddress(hostname) -- end -- unless ip == "127.0.0.1" -- ip -- end -- else -- nil -- end -- rescue Resolv::ResolvError -- nil -- rescue NoMethodError # i think this is a bug in resolv.rb? -- nil -- end -- end --end -- --Facter.add(:ipaddress, :timeout => 2) do - setcode do -- if hostname = Facter.value(:hostname) -- # we need Hostname to exist for this to work -- host = nil -- if host = Facter::Core::Execution.execute("host #{hostname}") -- list = host.chomp.split(/\s/) -- if defined? list[-1] and -- list[-1] =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ -- list[-1] -- end -- else -- nil -- end -- else -- nil -- end -+ "127.0.0.1" - end - end --- -1.8.3.1 - diff --git a/config/facter/centos/srpm_path b/config/facter/centos/srpm_path deleted file mode 100644 index 91675a53d..000000000 --- a/config/facter/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/facter-2.4.4-4.el7.src.rpm diff --git a/config/puppet-4.8.2/centos/build_srpm.data b/config/puppet-4.8.2/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-4.8.2/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-4.8.2/centos/meta_patches/0000-Update-package-versioning-for-TIS-format.patch b/config/puppet-4.8.2/centos/meta_patches/0000-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 6e157d9c1..000000000 --- a/config/puppet-4.8.2/centos/meta_patches/0000-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2cc29381484f15cb9e60d94491ebb260402edea1 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 2 Oct 2017 08:29:19 -0500 -Subject: [PATCH 1/1] Update package versioning for TIS format - ---- - SPECS/puppet.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet.spec b/SPECS/puppet.spec -index 777abe2..023f74f 100644 ---- a/SPECS/puppet.spec -+++ b/SPECS/puppet.spec -@@ -19,7 +19,7 @@ - - Name: puppet - Version: 4.8.2 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A network tool for managing many disparate systems - License: ASL 2.0 - URL: http://puppetlabs.com --- -1.8.3.1 - diff --git a/config/puppet-4.8.2/centos/meta_patches/0001-Add-WRS-Patches.patch b/config/puppet-4.8.2/centos/meta_patches/0001-Add-WRS-Patches.patch deleted file mode 100644 index d8a26e558..000000000 --- a/config/puppet-4.8.2/centos/meta_patches/0001-Add-WRS-Patches.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 56181573a8d619e4685bd0023214724416eac91e Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 2 Oct 2017 09:24:33 -0500 -Subject: [PATCH 1/1] Add WRS Patches - ---- - SPECS/puppet.spec | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/SPECS/puppet.spec b/SPECS/puppet.spec -index 023f74f..284accf 100644 ---- a/SPECS/puppet.spec -+++ b/SPECS/puppet.spec -@@ -32,6 +32,15 @@ Source4: start-puppet-wrapper - # Puppetlabs messed up with default paths - Patch01: 0001-Fix-puppet-paths.patch - Patch02: 0002-Revert-maint-Remove-puppetmaster.service.patch -+ -+# WRS Patches -+Patch1001: 1001-Add-timestamps-to-logs.patch -+Patch1002: 1002-Set-hasstatus-to-false-by-default.patch -+Patch1003: 1003-Update-getpid-function.patch -+Patch1004: 1004-Block-enabling-of-services.patch -+Patch1005: 1005-Set-strict_variables-and-basemodulepath-in-puppet.co.patch -+ -+ - Group: System Environment/Base - - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -@@ -119,6 +128,14 @@ The server can also function as a certificate authority and file server. - %setup -q - %patch01 -p1 -b .paths - %patch02 -p1 -b .server -+ -+%patch1001 -p1 -+%patch1002 -p1 -+%patch1003 -p1 -+%patch1004 -p1 -+%patch1005 -p1 -+ -+ - # Unbundle - #rm -r lib/puppet/vendor/*{pathspec,rgen}* - --- -1.8.3.1 - diff --git a/config/puppet-4.8.2/centos/meta_patches/PATCH_ORDER b/config/puppet-4.8.2/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index e520faa1b..000000000 --- a/config/puppet-4.8.2/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0000-Update-package-versioning-for-TIS-format.patch -0001-Add-WRS-Patches.patch diff --git a/config/puppet-4.8.2/centos/patches/1001-Add-timestamps-to-logs.patch b/config/puppet-4.8.2/centos/patches/1001-Add-timestamps-to-logs.patch deleted file mode 100644 index 51a20e348..000000000 --- a/config/puppet-4.8.2/centos/patches/1001-Add-timestamps-to-logs.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7418bcd86697c9403418ea90ddfe2ad3092d9854 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 30 Dec 2016 11:01:22 -0500 -Subject: Add timestamps to logs - ---- - lib/puppet/util/log/destinations.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/puppet/util/log/destinations.rb b/lib/puppet/util/log/destinations.rb -index 14d5008..36f5367 100644 ---- a/lib/puppet/util/log/destinations.rb -+++ b/lib/puppet/util/log/destinations.rb -@@ -167,7 +167,7 @@ Puppet::Util::Log.newdesttype :console do - str = msg.source == "Puppet" ? str : "#{msg.source}: #{str}" - - level = levels[msg.level] -- level[:stream].puts colorize(level[:color], "#{level[:name]}: #{str}") -+ level[:stream].puts colorize(level[:color], "#{level[:name]}: #{msg.time} #{str}") - end - end - --- -2.7.4 - diff --git a/config/puppet-4.8.2/centos/patches/1002-Set-hasstatus-to-false-by-default.patch b/config/puppet-4.8.2/centos/patches/1002-Set-hasstatus-to-false-by-default.patch deleted file mode 100644 index 79d527d66..000000000 --- a/config/puppet-4.8.2/centos/patches/1002-Set-hasstatus-to-false-by-default.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3e0ed33dcd0871fbccefd5b561f41fb46c35e32a Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 30 Dec 2016 10:59:44 -0500 -Subject: Set hasstatus to false by default - -Many of the WR init scripts do not have proper status functions, -so set "hasstatus" to false by default. ---- - lib/puppet/provider/service/init.rb | 9 ++++++++- - lib/puppet/type/service.rb | 3 ++- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb -index 2806ee0..17f727a 100644 ---- a/lib/puppet/provider/service/init.rb -+++ b/lib/puppet/provider/service/init.rb -@@ -98,7 +98,14 @@ Puppet::Type.type(:service).provide :init, :parent => :base do - next if exclude.include? name - next if not FileTest.executable?(fullpath) - next if not is_init?(fullpath) -- instances << new(:name => name, :path => path, :hasstatus => true) -+ -+ # Try to determine whether the init script has "status" support via grep -+ grepcmd = "grep -q '\\/dev/null && echo true || echo false" -+ if Puppet::Util::Execution.execute(grepcmd) =~ /true/ -+ instances << new(:name => name, :path => path, :hasstatus => true) -+ else -+ instances << new(:name => name, :path => path, :hasstatus => false) -+ end - end - end - instances -diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb -index 1f8d266..61498b5 100644 ---- a/lib/puppet/type/service.rb -+++ b/lib/puppet/type/service.rb -@@ -154,7 +154,8 @@ module Puppet - - newvalues(:true, :false) - -- defaultto :true -+ # WRS: Change hasstatus default to false -+ defaultto :false - end - newparam(:name) do - desc <<-EOT --- -2.7.4 - diff --git a/config/puppet-4.8.2/centos/patches/1003-Update-getpid-function.patch b/config/puppet-4.8.2/centos/patches/1003-Update-getpid-function.patch deleted file mode 100644 index 48f816674..000000000 --- a/config/puppet-4.8.2/centos/patches/1003-Update-getpid-function.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8ec18087109c7612553ec33d6c87aec1c7a622d1 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 4 Oct 2017 13:04:27 -0500 -Subject: [PATCH] Update getpid function - -Enhance the getpid function to avoid matching with the "puppet apply" command ---- - lib/puppet/provider/service/base.rb | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/lib/puppet/provider/service/base.rb b/lib/puppet/provider/service/base.rb -index d72d408..b8ac2eb 100644 ---- a/lib/puppet/provider/service/base.rb -+++ b/lib/puppet/provider/service/base.rb -@@ -31,11 +31,12 @@ Puppet::Type.type(:service).provide :base, :parent => :service do - def getpid - @resource.fail "Either stop/status commands or a pattern must be specified" unless @resource[:pattern] - regex = Regexp.new(@resource[:pattern]) -+ regex_pa = Regexp.new('puppet apply') - ps = getps - self.debug "Executing '#{ps}'" - IO.popen(ps) { |table| - table.each_line { |line| -- if regex.match(line) -+ if regex.match(line) and not regex_pa.match(line) - self.debug "Process matched: #{line}" - ary = line.sub(/^\s+/, '').split(/\s+/) - return ary[1] --- -1.8.3.1 - diff --git a/config/puppet-4.8.2/centos/patches/1004-Block-enabling-of-services.patch b/config/puppet-4.8.2/centos/patches/1004-Block-enabling-of-services.patch deleted file mode 100644 index 6748eb6be..000000000 --- a/config/puppet-4.8.2/centos/patches/1004-Block-enabling-of-services.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9b6966aa6b2b3c3a6876db1e2788d93f90899fa8 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 4 Oct 2017 14:31:23 -0500 -Subject: [PATCH] Block enabling of services - ---- - lib/puppet/provider/service/redhat.rb | 7 ++++--- - lib/puppet/provider/service/systemd.rb | 4 +++- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb -index 4f3f9b8..fe3723f 100644 ---- a/lib/puppet/provider/service/redhat.rb -+++ b/lib/puppet/provider/service/redhat.rb -@@ -7,6 +7,7 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init - " - - commands :chkconfig => "/sbin/chkconfig", :service => "/sbin/service" -+ commands :noop => "/bin/true" - - defaultfor :osfamily => :redhat - defaultfor :osfamily => :suse, :operatingsystemmajrelease => ["10", "11"] -@@ -42,10 +43,10 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init - # Don't support them specifying runlevels; always use the runlevels - # in the init scripts. - def enable -- chkconfig("--add", @resource[:name]) -- chkconfig(@resource[:name], :on) -+ # Do not enable services -+ noop(@resource[:name]) - rescue Puppet::ExecutionFailure => detail -- raise Puppet::Error, "Could not enable #{self.name}: #{detail}", detail.backtrace -+ raise Puppet::Error, "Could not enable #{self.name}", detail.backtrace - end - - def initscript -diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb -index a673550..a4deed4 100644 ---- a/lib/puppet/provider/service/systemd.rb -+++ b/lib/puppet/provider/service/systemd.rb -@@ -8,6 +8,7 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do - providing the proper suffix." - - commands :systemctl => "systemctl" -+ commands :noop => "/bin/true" - - if Facter.value(:osfamily).downcase == 'debian' - # With multiple init systems on Debian, it is possible to have -@@ -118,7 +119,8 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do - - def enable - self.unmask -- systemctl_change_enable(:enable) -+ #systemctl_change_enable(:enable) -+ [command(:noop), @resource[:name]] - end - - def mask --- -1.8.3.1 - diff --git a/config/puppet-4.8.2/centos/patches/1005-Set-strict_variables-and-basemodulepath-in-puppet.co.patch b/config/puppet-4.8.2/centos/patches/1005-Set-strict_variables-and-basemodulepath-in-puppet.co.patch deleted file mode 100644 index 496035b48..000000000 --- a/config/puppet-4.8.2/centos/patches/1005-Set-strict_variables-and-basemodulepath-in-puppet.co.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bb145c103c03eabf7adf79d486c7143ebed3ad78 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 10 Oct 2017 09:41:17 -0500 -Subject: [PATCH] WRS: Patch1005: - 1005-Set-strict_variables-and-basemodulepath-in-puppet.co.patch - -Also sets ordering = title-hash so that puppet 4 will run the same as puppet 3 ---- - conf/puppet.conf | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/conf/puppet.conf b/conf/puppet.conf -index bf48823..15674d7 100644 ---- a/conf/puppet.conf -+++ b/conf/puppet.conf -@@ -4,3 +4,9 @@ - # - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html - # - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html - # - https://docs.puppetlabs.com/puppet/latest/reference/configuration.html -+[main] -+ # Prevent the use of undefined variables -+ strict_variables = true -+ ordering = title-hash -+ # Set the path to TIS puppet modules -+ basemodulepath = /usr/share/puppet/modules:/usr/share/openstack-puppet/modules --- -1.8.3.1 - diff --git a/config/puppet-4.8.2/centos/srpm_path b/config/puppet-4.8.2/centos/srpm_path deleted file mode 100644 index d401ae082..000000000 --- a/config/puppet-4.8.2/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-4.8.2-1.el7.src.rpm diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/build_srpm.data b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 88ced7def..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8f4ade8974fdb044f86ab72533b5ce847875089d Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 3 Jan 2017 13:37:20 -0500 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/puppet-ceph.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 8cfc8c1..3d7dccf 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -1,7 +1,7 @@ - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} - Name: puppet-ceph - Version: 2.4.1 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Community Developed Ceph Module - License: ASL 2.0 - --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0002-Add-TIS-patches.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0002-Add-TIS-patches.patch deleted file mode 100644 index ffb952a84..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0002-Add-TIS-patches.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ff91fc6138685fcaff0222686e83ba7d083e5630 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 7 Feb 2017 14:08:21 -0500 -Subject: [PATCH] Add TIS patches - ---- - SPECS/puppet-ceph.spec | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 3d7dccf..5b0deea 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -8,6 +8,8 @@ License: ASL 2.0 - URL: https://launchpad.net/puppet-ceph - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz -+Patch0001: 0001-Roll-up-TIS-patches.patch -+Patch0002: 0002-Newton-rebase-fixes.patch - - BuildArch: noarch - -@@ -23,6 +25,8 @@ Community Developed Ceph Module - - %prep - %setup -q -n openstack-ceph-%{upstream_version} -+%patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0003-Ceph-Jewel-rebase.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0003-Ceph-Jewel-rebase.patch deleted file mode 100644 index 30383aba4..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0003-Ceph-Jewel-rebase.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0fadbf6ad0702c390632e687656c91a48a417c99 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Thu, 23 Mar 2017 08:07:56 +0000 -Subject: [PATCH] ceph jewel rebase - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 5b0deea..23e0562 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -10,6 +10,7 @@ URL: https://launchpad.net/puppet-ceph - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Newton-rebase-fixes.patch -+Patch0003: 0003-Ceph-Jewel-rebase.patch - - BuildArch: noarch - -@@ -27,6 +28,7 @@ Community Developed Ceph Module - %setup -q -n openstack-ceph-%{upstream_version} - %patch0001 -p1 - %patch0002 -p1 -+%patch0003 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0004-Add-OSD-support-for-persistent-naming.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0004-Add-OSD-support-for-persistent-naming.patch deleted file mode 100644 index 9161146a9..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0004-Add-OSD-support-for-persistent-naming.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e98b25d0168caa56d72e62e98f3c6701df704db5 Mon Sep 17 00:00:00 2001 -From: Robert Church -Date: Fri, 14 Apr 2017 02:04:43 +0000 -Subject: [PATCH] Add OSD support for persistent naming - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 23e0562..ef82b81 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -11,6 +11,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Newton-rebase-fixes.patch - Patch0003: 0003-Ceph-Jewel-rebase.patch -+Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch - - BuildArch: noarch - -@@ -29,6 +30,7 @@ Community Developed Ceph Module - %patch0001 -p1 - %patch0002 -p1 - %patch0003 -p1 -+%patch0004 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0005-meta-patch-for-patch5.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0005-meta-patch-for-patch5.patch deleted file mode 100644 index aeb203693..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0005-meta-patch-for-patch5.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a6572b58090f2c9bf492d8745ce7cbd0fb8ede33 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 3 Jan 2018 10:42:13 -0600 -Subject: [PATCH] meta patch for patch5 - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index ef82b81..ad75ea5 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -12,6 +12,7 @@ Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Newton-rebase-fixes.patch - Patch0003: 0003-Ceph-Jewel-rebase.patch - Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch -+Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch - - BuildArch: noarch - -@@ -31,6 +32,7 @@ Community Developed Ceph Module - %patch0002 -p1 - %patch0003 -p1 - %patch0004 -p1 -+%patch0005 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0006-add-ceph-disk-prepare-invalid-data-disk-value-patch.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0006-add-ceph-disk-prepare-invalid-data-disk-value-patch.patch deleted file mode 100644 index 96e6b576e..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0006-add-ceph-disk-prepare-invalid-data-disk-value-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a7400d67bc6c89ea0aa9a408f7f35689924c8a99 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Wed, 31 Oct 2018 19:29:45 +0000 -Subject: [PATCH] add ceph-disk-prepare-invalid-data-disk-value patch - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 78e4a1b..f4dc098 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -13,6 +13,7 @@ Patch0002: 0002-Newton-rebase-fixes.patch - Patch0003: 0003-Ceph-Jewel-rebase.patch - Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch - Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch -+Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch - - BuildArch: noarch - -@@ -33,6 +34,7 @@ Community Developed Ceph Module - %patch0003 -p1 - %patch0004 -p1 - %patch0005 -p1 -+%patch0006 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch deleted file mode 100644 index 697284f2f..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b590f06d6f6ce2bd71d4d0389b6d51a78e225c19 Mon Sep 17 00:00:00 2001 -From: Ovidiu Poncea -Date: Thu, 20 Dec 2018 08:07:15 -0500 -Subject: [PATCH] Add-StarlingX-specific-restart-command-for-Ceph-moni patch - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 0b728a1..e5cc64c 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -14,6 +14,7 @@ Patch0003: 0003-Ceph-Jewel-rebase.patch - Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch - Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch - Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch -+Patch0007: 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch - - BuildArch: noarch - -@@ -35,6 +36,7 @@ Community Developed Ceph Module - %patch0004 -p1 - %patch0005 -p1 - %patch0006 -p1 -+%patch0007 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0008-ceph-mimic-prepare-activate-osd.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0008-ceph-mimic-prepare-activate-osd.patch deleted file mode 100644 index 210160c4c..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0008-ceph-mimic-prepare-activate-osd.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bc377fe17be8f077ac8fb59da9ba7551dcf0bc98 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Fri, 29 Mar 2019 08:00:12 +0000 -Subject: [PATCH] ceph-mimic-prepare-activate-osd.patch - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index e5cc64c..891ccfd 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -15,6 +15,7 @@ Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch - Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch - Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch - Patch0007: 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch -+Patch0008: 0008-ceph-mimic-prepare-activate-osd.patch - - BuildArch: noarch - -@@ -37,6 +38,7 @@ Community Developed Ceph Module - %patch0005 -p1 - %patch0006 -p1 - %patch0007 -p1 -+%patch0008 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch deleted file mode 100644 index 89e1e6f35..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 88ffd373172ecabdda7235cce1efa3b7014a839f Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Thu, 25 Apr 2019 15:42:38 +0000 -Subject: [PATCH] fix ceph osd disk partition for nvme disks - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 95c1f0e..6b6cac2 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -16,6 +16,7 @@ Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch - Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch - Patch0007: 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch - Patch0008: 0008-ceph-mimic-prepare-activate-osd.patch -+Patch0009: 0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch - - BuildArch: noarch - -@@ -39,6 +40,7 @@ Community Developed Ceph Module - %patch0006 -p1 - %patch0007 -p1 - %patch0008 -p1 -+%patch0009 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0010-wipe-unprepared-disks.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0010-wipe-unprepared-disks.patch deleted file mode 100644 index 81125250c..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0010-wipe-unprepared-disks.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1a7e85dafe9cc85daff394af6d30055f5e416d13 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Fri, 26 Apr 2019 00:24:03 +0000 -Subject: [PATCH] wipe unprepared disks - ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 6b6cac2..102fccd 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -17,6 +17,7 @@ Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch - Patch0007: 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch - Patch0008: 0008-ceph-mimic-prepare-activate-osd.patch - Patch0009: 0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch -+Patch0010: 0010-wipe-unprepared-disks.patch - - BuildArch: noarch - -@@ -41,6 +42,7 @@ Community Developed Ceph Module - %patch0007 -p1 - %patch0008 -p1 - %patch0009 -p1 -+%patch0010 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0011-osd-add-support-for-mpath.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0011-osd-add-support-for-mpath.patch deleted file mode 100644 index 69d2d5fd4..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/0011-osd-add-support-for-mpath.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c7d728032c05f1459e3d610f5c7762d0dab76c58 Mon Sep 17 00:00:00 2001 -From: Joao Pedro Alexandroni - -Date: Mon, 23 May 2022 16:50:58 -0300 -Subject: [PATCH] osd add support for mpath - -Signed-off-by: Joao Pedro Alexandroni ---- - SPECS/puppet-ceph.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec -index 3b9adcf..6c2be4b 100644 ---- a/SPECS/puppet-ceph.spec -+++ b/SPECS/puppet-ceph.spec -@@ -18,6 +18,7 @@ Patch0007: 0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch - Patch0008: 0008-ceph-mimic-prepare-activate-osd.patch - Patch0009: 0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch - Patch0010: 0010-wipe-unprepared-disks.patch -+Patch0011: 0011-osd-add-support-for-mpath.patch - - BuildArch: noarch - -@@ -43,6 +44,7 @@ Community Developed Ceph Module - %patch0008 -p1 - %patch0009 -p1 - %patch0010 -p1 -+%patch0011 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.17.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 9a119a113..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,11 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-patches.patch -0003-Ceph-Jewel-rebase.patch -0004-Add-OSD-support-for-persistent-naming.patch -0005-meta-patch-for-patch5.patch -0006-add-ceph-disk-prepare-invalid-data-disk-value-patch.patch -0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch -0008-ceph-mimic-prepare-activate-osd.patch -0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch -0010-wipe-unprepared-disks.patch -0011-osd-add-support-for-mpath.patch diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0001-Roll-up-TIS-patches.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0001-Roll-up-TIS-patches.patch deleted file mode 100644 index 263cc3c5b..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0001-Roll-up-TIS-patches.patch +++ /dev/null @@ -1,148 +0,0 @@ -From ff98c42f0e6ce22969e986933d0a60d73a281a1d Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 10 Jan 2017 13:31:17 -0500 -Subject: [PATCH 1/5] Roll up TIS patches - ---- - manifests/mon.pp | 14 +++++++++++--- - manifests/osd.pp | 38 +++++++++++++++++++------------------- - manifests/rgw.pp | 7 +++++++ - 3 files changed, 37 insertions(+), 22 deletions(-) - -diff --git a/manifests/mon.pp b/manifests/mon.pp -index bc0298c..fa99df5 100644 ---- a/manifests/mon.pp -+++ b/manifests/mon.pp -@@ -65,6 +65,8 @@ define ceph::mon ( - $authentication_type = 'cephx', - $key = undef, - $keyring = undef, -+ $fsid = undef, -+ $service_ensure = 'running', - $exec_timeout = $::ceph::params::exec_timeout, - ) { - -@@ -154,6 +156,10 @@ test -e \$mon_data/done - } - } - -+ if $fsid { -+ $fsid_option = "--fsid ${fsid}" -+ } -+ - Ceph_config<||> - # prevent automatic creation of the client.admin key by ceph-create-keys - -> exec { "ceph-mon-${cluster_name}.client.admin.keyring-${id}": -@@ -176,7 +182,8 @@ if [ ! -d \$mon_data ] ; then - --setuser ceph --setgroup ceph \ - --mkfs \ - --id ${id} \ -- --keyring ${keyring_path} ; then -+ --keyring ${keyring_path} \ -+ ${fsid_option} ; then - touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring - chown -h ceph:ceph \$mon_data/done \$mon_data/${init} \$mon_data/keyring - else -@@ -186,7 +193,8 @@ if [ ! -d \$mon_data ] ; then - if ceph-mon ${cluster_option} \ - --mkfs \ - --id ${id} \ -- --keyring ${keyring_path} ; then -+ --keyring ${keyring_path} \ -+ ${fsid_option} ; then - touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring - else - rm -fr \$mon_data -@@ -203,7 +211,7 @@ test -d \$mon_data - timeout => $exec_timeout, - } - -> service { $mon_service: -- ensure => running, -+ ensure => $service_ensure, - } - - # if the service is running before we setup the configs, notify service -diff --git a/manifests/osd.pp b/manifests/osd.pp -index d24b95e..9b8cd99 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -52,6 +52,8 @@ define ceph::osd ( - $ensure = present, - $journal = "''", - $cluster = undef, -+ $cluster_uuid = undef, -+ $uuid = undef, - $exec_timeout = $::ceph::params::exec_timeout, - $selinux_file_context = 'ceph_var_lib_t', - $fsid = $::ceph::profile::params::fsid, -@@ -68,6 +70,14 @@ define ceph::osd ( - } - $cluster_option = "--cluster ${cluster_name}" - -+ if $cluster_uuid { -+ $cluster_uuid_option = "--cluster-uuid ${cluster_uuid}" -+ } -+ -+ if $uuid { -+ $uuid_option = "--osd-uuid ${uuid}" -+ } -+ - if $ensure == present { - - $ceph_check_udev = "ceph-osd-check-udev-${name}" -@@ -120,25 +130,15 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f - Exec[$ceph_check_udev] -> Exec[$ceph_prepare] - # ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475 - exec { $ceph_prepare: -- command => "/bin/true # comment to satisfy puppet syntax requirements --set -ex --disk=$(readlink -f ${data}) --if ! test -b \$disk ; then -- echo \$disk | egrep -e '^/dev' -q -v -- mkdir -p \$disk -- if getent passwd ceph >/dev/null 2>&1; then -- chown -h ceph:ceph \$disk -- fi --fi --ceph-disk prepare ${cluster_option} ${fsid_option} $(readlink -f ${data}) $(readlink -f ${journal}) --udevadm settle --", -- unless => "/bin/true # comment to satisfy puppet syntax requirements --set -ex --disk=$(readlink -f ${data}) --ceph-disk list | egrep \" *(\${disk}1?|\${disk}p1?) .*ceph data, (prepared|active)\" || --{ test -f \$disk/fsid && test -f \$disk/ceph_fsid && test -f \$disk/magic ;} --", -+ -+ command => "/usr/sbin/ceph-disk prepare ${cluster_option} ${cluster_uuid_option} ${uuid_option} --fs-type xfs --zap-disk ${data} ${journal}", -+ # We don't want to erase the disk if: -+ # 1. There is already ceph data on the disk for our cluster AND -+ # 2. The uuid for the OSD we are configuring matches the uuid for the -+ # OSD on the disk. We don't want to attempt to re-use an OSD that -+ # had previously been deleted. -+ unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *${data}.*ceph data' | grep 'osd uuid ${uuid}'", -+ - logoutput => true, - timeout => $exec_timeout, - tag => 'prepare', -diff --git a/manifests/rgw.pp b/manifests/rgw.pp -index 2612785..ebc83ce 100644 ---- a/manifests/rgw.pp -+++ b/manifests/rgw.pp -@@ -185,6 +185,13 @@ define ceph::rgw ( - provider => $::ceph::params::service_provider, - } - # Everything else that is supported by puppet-ceph should run systemd. -+ } elsif $::service_provider == 'systemd' { -+ Service { -+ name => "radosgw-${name}", -+ start => "systemctl start ceph-radosgw", -+ stop => "systemctl stop ceph-radosgw", -+ status => "systemctl status ceph-radosgw", -+ } - } else { - Service { - name => "ceph-radosgw@${name}", --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0002-Newton-rebase-fixes.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0002-Newton-rebase-fixes.patch deleted file mode 100644 index bf626ea5b..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0002-Newton-rebase-fixes.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 570520c5197dd36c3e4a7956d5916426fb75856a Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 7 Feb 2017 15:49:02 -0500 -Subject: [PATCH] Newton rebase fixes - ---- - manifests/mon.pp | 9 ++++++--- - manifests/osd.pp | 2 +- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/manifests/mon.pp b/manifests/mon.pp -index fa99df5..b3458d6 100644 ---- a/manifests/mon.pp -+++ b/manifests/mon.pp -@@ -99,10 +99,13 @@ define ceph::mon ( - } - # Everything else that is supported by puppet-ceph should run systemd. - } else { -- $init = 'systemd' -+ $init = 'sysvinit' - Service { -- name => "ceph-mon@${id}", -- enable => $mon_enable, -+ name => "ceph-mon-${id}", -+ provider => $::ceph::params::service_provider, -+ start => "service ceph start mon.${id}", -+ stop => "service ceph stop mon.${id}", -+ status => "service ceph status mon.${id}", - } - } - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index 9b8cd99..2187361 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -56,7 +56,7 @@ define ceph::osd ( - $uuid = undef, - $exec_timeout = $::ceph::params::exec_timeout, - $selinux_file_context = 'ceph_var_lib_t', -- $fsid = $::ceph::profile::params::fsid, -+ $fsid = undef, - ) { - - include ::ceph::params --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0003-Ceph-Jewel-rebase.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0003-Ceph-Jewel-rebase.patch deleted file mode 100644 index d1385ae7a..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0003-Ceph-Jewel-rebase.patch +++ /dev/null @@ -1,110 +0,0 @@ -From c9a5520620d313c08e7f751f3469ec5f4c220486 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Thu, 23 Mar 2017 08:04:31 +0000 -Subject: [PATCH] ceph jewel rebase - ---- - manifests/mon.pp | 1 + - manifests/rgw.pp | 33 +++++++++++++++++++++++++-------- - manifests/rgw/keystone.pp | 6 +++--- - 3 files changed, 29 insertions(+), 11 deletions(-) - -diff --git a/manifests/mon.pp b/manifests/mon.pp -index b3458d6..17cb925 100644 ---- a/manifests/mon.pp -+++ b/manifests/mon.pp -@@ -106,6 +106,7 @@ define ceph::mon ( - start => "service ceph start mon.${id}", - stop => "service ceph stop mon.${id}", - status => "service ceph status mon.${id}", -+ enable => $mon_enable, - } - } - -diff --git a/manifests/rgw.pp b/manifests/rgw.pp -index ebc83ce..56fb4a8 100644 ---- a/manifests/rgw.pp -+++ b/manifests/rgw.pp -@@ -193,23 +193,40 @@ define ceph::rgw ( - status => "systemctl status ceph-radosgw", - } - } else { -+ if $rgw_enable { -+ file { "${rgw_data}/sysvinit": -+ ensure => present, -+ before => Service["radosgw-${name}"], -+ } -+ } -+ - Service { -- name => "ceph-radosgw@${name}", -- enable => $rgw_enable, -+ name => "radosgw-${name}", -+ start => 'service radosgw start', -+ stop => 'service radosgw stop', -+ status => 'service radosgw status', -+ provider => $::ceph::params::service_provider, - } - } - -- service { $rgw_service: -+ #for RHEL/CentOS7, systemctl needs to reload to pickup the ceph-radosgw init file -+ if (($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') >= 0)) -+ { -+ exec { 'systemctl-reload-from-rgw': #needed for the new init file -+ command => '/usr/bin/systemctl daemon-reload', -+ } -+ } -+ service { "radosgw-${name}": - ensure => $rgw_ensure, -- tag => ['ceph-radosgw'] -+ tag => ['radosgw'] - } - -- Ceph_config<||> ~> Service<| tag == 'ceph-radosgw' |> -+ Ceph_config<||> -> Service["radosgw-${name}"] - Package<| tag == 'ceph' |> -> File['/var/lib/ceph/radosgw'] - Package<| tag == 'ceph' |> -> File[$log_file] - File['/var/lib/ceph/radosgw'] - -> File[$rgw_data] -- -> Service<| tag == 'ceph-radosgw' |> -- File[$log_file] -> Service<| tag == 'ceph-radosgw' |> -- Ceph::Pool<||> -> Service<| tag == 'ceph-radosgw' |> -+ -> Service["radosgw-${name}"] -+ File[$log_file] -> Service["radosgw-${name}"] -+ Ceph::Pool<||> -> Service["radosgw-${name}"] - } -diff --git a/manifests/rgw/keystone.pp b/manifests/rgw/keystone.pp -index 8351177..c371fd0 100644 ---- a/manifests/rgw/keystone.pp -+++ b/manifests/rgw/keystone.pp -@@ -148,7 +148,7 @@ define ceph::rgw::keystone ( - exec { "${name}-nssdb-ca": - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --wget --no-check-certificate ${rgw_keystone_url}/v2.0/certificates/ca -O - | -+wget --no-check-certificate ${rgw_keystone_url}/${rgw_keystone_version}/certificates/ca -O - | - openssl x509 -pubkey | certutil -A -d ${nss_db_path} -n ca -t \"TCu,Cu,Tuw\" - ", - unless => "/bin/true # comment to satisfy puppet syntax requirements -@@ -161,7 +161,7 @@ certutil -d ${nss_db_path} -L | grep ^ca - exec { "${name}-nssdb-signing": - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --wget --no-check-certificate ${rgw_keystone_url}/v2.0/certificates/signing -O - | -+wget --no-check-certificate ${rgw_keystone_url}/${rgw_keystone_version}/certificates/signing -O - | - openssl x509 -pubkey | certutil -A -d ${nss_db_path} -n signing_cert -t \"P,P,P\" - ", - unless => "/bin/true # comment to satisfy puppet syntax requirements -@@ -176,7 +176,7 @@ certutil -d ${nss_db_path} -L | grep ^signing_cert - -> File[$nss_db_path] - -> Exec["${name}-nssdb-ca"] - -> Exec["${name}-nssdb-signing"] -- ~> Service<| tag == 'ceph-radosgw' |> -+ ~> Service<| tag == 'radosgw' |> - } else { - ceph_config { - "client.${name}/nss_db_path": ensure => absent; --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0004-US92424-Add-OSD-support-for-persistent-naming.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0004-US92424-Add-OSD-support-for-persistent-naming.patch deleted file mode 100644 index 19479228d..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0004-US92424-Add-OSD-support-for-persistent-naming.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7a4c325194885dc43fc87f7094873e0067801652 Mon Sep 17 00:00:00 2001 -From: Robert Church -Date: Thu, 13 Apr 2017 20:31:21 -0500 -Subject: [PATCH] US92424: Add OSD support for persistent naming - -This allows the manifest to provide udev generated /dev/disk/by-* links -to configure the OSDs without requiring any additional changes. The -'readlink -f' will produce the currently enumerated device node -associated with udev link. ---- - manifests/osd.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index 2187361..d9cf5b1 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -61,7 +61,7 @@ define ceph::osd ( - - include ::ceph::params - -- $data = $name -+ $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}") - - if $cluster { - $cluster_name = $cluster --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0005-Remove-puppetlabs-apt-as-ceph-requirement.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0005-Remove-puppetlabs-apt-as-ceph-requirement.patch deleted file mode 100644 index 2d202eee4..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0005-Remove-puppetlabs-apt-as-ceph-requirement.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8ab55c717d5088d8c75b465f5b9196036e0968ce Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 3 Jan 2018 10:39:37 -0600 -Subject: [PATCH] Remove puppetlabs-apt as ceph requirement - -We will never install apt or puppet-apt, so this requirement cannot be fulfilled ---- - metadata.json | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/metadata.json b/metadata.json -index 14d2f37..27b78e3 100644 ---- a/metadata.json -+++ b/metadata.json -@@ -8,7 +8,6 @@ - "project_page": "https://launchpad.net/puppet-ceph", - "issues_url": "https://bugs.launchpad.net/puppet-ceph", - "dependencies": [ -- {"name":"puppetlabs/apt","version_requirement":">=2.0.0 <3.0.0"}, - {"name":"puppetlabs/apache","version_requirement":">=1.4.1 <2.0.0"}, - {"name":"puppetlabs/concat","version_requirement":">=1.2.1 <3.0.0"}, - {"name":"puppetlabs/inifile","version_requirement":">=1.0.0 <2.0.0"}, --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0006-ceph-disk-prepare-invalid-data-disk-value.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0006-ceph-disk-prepare-invalid-data-disk-value.patch deleted file mode 100644 index 401172e7b..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0006-ceph-disk-prepare-invalid-data-disk-value.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 5d8f3dd5d18d611151b4658c5c876e8a3ad8fe51 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Wed, 31 Oct 2018 16:28:45 +0000 -Subject: [PATCH] ceph-disk prepare invalid data disk value - -ceph-disk prepare data OSD parameter contains a new line causing -puppet manifest to fail: - -1. $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}") - - is expanded together with a new line in: - - exec { $ceph_prepare: - command => "/usr/sbin/ceph-disk prepare ${cluster_option} - ${cluster_uuid_option} ${uuid_option} - --fs-type xfs --zap-disk ${data} ${journal}" - - just before ${journal} is expanded. Puppet reports: - - sh: line 1: : command not found - - when trying to run '' (default journal value). - -2. 'readlink' should be called when running ceph-disk prepare - command, not when the puppet resource is defined. Let - exec's shell call readlink instead of using puppet's - generate() . See also: - - https://github.com/openstack/puppet-ceph/commit/ff2b2e689846dd3d980c7c706c591e8cfb8f33a9 - -Added --verbose and --log-stdout options to log commands executed -by 'ceph-disk prepare' and identify where it fails. ---- - manifests/osd.pp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index d9cf5b1..889d28a 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -61,7 +61,7 @@ define ceph::osd ( - - include ::ceph::params - -- $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}") -+ $data = $name - - if $cluster { - $cluster_name = $cluster -@@ -131,13 +131,13 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f - # ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475 - exec { $ceph_prepare: - -- command => "/usr/sbin/ceph-disk prepare ${cluster_option} ${cluster_uuid_option} ${uuid_option} --fs-type xfs --zap-disk ${data} ${journal}", -+ command => "/usr/sbin/ceph-disk --verbose --log-stdout prepare ${cluster_option} ${cluster_uuid_option} ${uuid_option} --fs-type xfs --zap-disk $(readlink -f ${data}) $(readlink -f ${journal})", - # We don't want to erase the disk if: - # 1. There is already ceph data on the disk for our cluster AND - # 2. The uuid for the OSD we are configuring matches the uuid for the - # OSD on the disk. We don't want to attempt to re-use an OSD that - # had previously been deleted. -- unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *${data}.*ceph data' | grep 'osd uuid ${uuid}'", -+ unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep 'osd uuid ${uuid}'", - - logoutput => true, - timeout => $exec_timeout, --- -2.16.5 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch deleted file mode 100644 index 1c3926fda..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0007-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a364f37cacab78cdaad5ebd23ab24cf400a3fa40 Mon Sep 17 00:00:00 2001 -From: Ovidiu Poncea -Date: Thu, 20 Dec 2018 07:18:55 -0500 -Subject: [PATCH] Add StarlingX specific restart command for Ceph monitors - -Since we don't use systemd to manage Ceph and we have pmon monitoring we -have to make sure that: -1. Restarting is properly handled as "systemctl restart" will return error - and manifest will fail; -2. Pmon does not check ceph-mon status during restart. Otherwise we risk - getting into a race condition between the puppet restart and pmon - detecting that ceph is down and trying a restart. - -Both are resolved when using /etc/init.d/ceph-init-wrapper restart - -Signed-off-by: Ovidiu Poncea ---- - manifests/mon.pp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/manifests/mon.pp b/manifests/mon.pp -index 17cb925..62d5059 100644 ---- a/manifests/mon.pp -+++ b/manifests/mon.pp -@@ -106,6 +106,7 @@ define ceph::mon ( - start => "service ceph start mon.${id}", - stop => "service ceph stop mon.${id}", - status => "service ceph status mon.${id}", -+ restart => "/etc/init.d/ceph-init-wrapper restart mon.${id}", - enable => $mon_enable, - } - } --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0008-ceph-mimic-prepare-activate-osd.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0008-ceph-mimic-prepare-activate-osd.patch deleted file mode 100644 index 6ca302f9f..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0008-ceph-mimic-prepare-activate-osd.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 4c2e2a196cb5a6890e35098c8499688fc1c26f5c Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Thu, 4 Apr 2019 16:52:12 +0000 -Subject: [PATCH] ceph-mimic-prepare-activate-osd - -Prepare and activate disk using filestore -and given OSD id. ---- - manifests/osd.pp | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index 889d28a..c51a445 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -54,6 +54,7 @@ define ceph::osd ( - $cluster = undef, - $cluster_uuid = undef, - $uuid = undef, -+ $osdid = undef, - $exec_timeout = $::ceph::params::exec_timeout, - $selinux_file_context = 'ceph_var_lib_t', - $fsid = undef, -@@ -78,6 +79,10 @@ define ceph::osd ( - $uuid_option = "--osd-uuid ${uuid}" - } - -+ if $osdid { -+ $osdid_option = "--osd-id ${osdid}" -+ } -+ - if $ensure == present { - - $ceph_check_udev = "ceph-osd-check-udev-${name}" -@@ -131,7 +136,16 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f - # ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475 - exec { $ceph_prepare: - -- command => "/usr/sbin/ceph-disk --verbose --log-stdout prepare ${cluster_option} ${cluster_uuid_option} ${uuid_option} --fs-type xfs --zap-disk $(readlink -f ${data}) $(readlink -f ${journal})", -+ command => "/bin/true # comment to satisfy puppet syntax requirements -+set -ex -+ceph-disk --verbose --log-stdout prepare --filestore ${cluster_uuid_option} ${uuid_option} ${osdid_option} --fs-type xfs --zap-disk $(readlink -f ${data}) $(readlink -f ${journal}) -+mkdir -p /var/lib/ceph/osd/ceph-${osdid} -+ceph auth del osd.${osdid} || true -+mount $(readlink -f ${data})1 /var/lib/ceph/osd/ceph-${osdid} -+ceph-osd --id ${osdid} --mkfs --mkkey --mkjournal -+ceph auth add osd.${osdid} osd 'allow *' mon 'allow rwx' -i /var/lib/ceph/osd/ceph-${osdid}/keyring -+umount /var/lib/ceph/osd/ceph-${osdid} -+", - # We don't want to erase the disk if: - # 1. There is already ceph data on the disk for our cluster AND - # 2. The uuid for the OSD we are configuring matches the uuid for the -@@ -171,7 +185,7 @@ if ! test -b \$disk ; then - fi - # activate happens via udev when using the entire device - if ! test -b \$disk || ! test -b \${disk}1 || ! test -b \${disk}p1 ; then -- ceph-disk activate \$disk || true -+ ceph-disk activate \${disk}1 || true - fi - if test -f ${udev_rules_file}.disabled && ( test -b \${disk}1 || test -b \${disk}p1 ); then - ceph-disk activate \${disk}1 || true --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch deleted file mode 100644 index 6dfed20f0..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0009-fix-ceph-osd-disk-partition-for-nvme-disks.patch +++ /dev/null @@ -1,89 +0,0 @@ -From b0dd34d2d580c817f9ef6eb62927ba63bebe73c3 Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Thu, 25 Apr 2019 15:37:53 +0000 -Subject: [PATCH] fix ceph osd disk partition for nvme disks - ---- - manifests/osd.pp | 38 +++++++++++++++++++++++++++++++------- - 1 file changed, 31 insertions(+), 7 deletions(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index c51a445..5bd30c5 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -138,10 +138,17 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f - - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --ceph-disk --verbose --log-stdout prepare --filestore ${cluster_uuid_option} ${uuid_option} ${osdid_option} --fs-type xfs --zap-disk $(readlink -f ${data}) $(readlink -f ${journal}) -+disk=$(readlink -f ${data}) -+ceph-disk --verbose --log-stdout prepare --filestore ${cluster_uuid_option} ${uuid_option} ${osdid_option} --fs-type xfs --zap-disk \${disk} $(readlink -f ${journal}) - mkdir -p /var/lib/ceph/osd/ceph-${osdid} - ceph auth del osd.${osdid} || true --mount $(readlink -f ${data})1 /var/lib/ceph/osd/ceph-${osdid} -+part=\${disk} -+if [[ \$part == *nvme* ]]; then -+ part=\${part}p1 -+else -+ part=\${part}1 -+fi -+mount $(readlink -f \${part}) /var/lib/ceph/osd/ceph-${osdid} - ceph-osd --id ${osdid} --mkfs --mkkey --mkjournal - ceph auth add osd.${osdid} osd 'allow *' mon 'allow rwx' -i /var/lib/ceph/osd/ceph-${osdid}/keyring - umount /var/lib/ceph/osd/ceph-${osdid} -@@ -183,12 +190,17 @@ if ! test -b \$disk ; then - chown -h ceph:ceph \$disk - fi - fi --# activate happens via udev when using the entire device -+part=\${disk} -+if [[ \${part} == *nvme* ]]; then -+ part=\${part}p1 -+else -+ part=\${part}1 -+fi - if ! test -b \$disk || ! test -b \${disk}1 || ! test -b \${disk}p1 ; then -- ceph-disk activate \${disk}1 || true -+ ceph-disk activate \${part} || true - fi - if test -f ${udev_rules_file}.disabled && ( test -b \${disk}1 || test -b \${disk}p1 ); then -- ceph-disk activate \${disk}1 || true -+ ceph-disk activate \${part} || true - fi - ", - unless => "/bin/true # comment to satisfy puppet syntax requirements -@@ -206,8 +218,14 @@ ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep \" $(readlink -f ${data})\$\" - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex - disk=$(readlink -f ${data}) -+part=\${disk} -+if [[ \${part} == *nvme* ]]; then -+ part=\${part}p1 -+else -+ part=\${part}1 -+fi - if [ -z \"\$id\" ] ; then -- id=$(ceph-disk list | sed -nEe \"s:^ *\${disk}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") - fi - if [ -z \"\$id\" ] ; then - id=$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe \"s:.*/${cluster_name}-([0-9]+) *-> *\${disk}\$:\\1:p\" || true) -@@ -227,8 +245,14 @@ fi - unless => "/bin/true # comment to satisfy puppet syntax requirements - set -ex - disk=$(readlink -f ${data}) -+part=${disk} -+if [[ \$part == *nvme* ]]; then -+ part=\${part}p1 -+else -+ part=\${part}1 -+fi - if [ -z \"\$id\" ] ; then -- id=$(ceph-disk list | sed -nEe \"s:^ *\${disk}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") - fi - if [ -z \"\$id\" ] ; then - id=$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe \"s:.*/${cluster_name}-([0-9]+) *-> *\${disk}\$:\\1:p\" || true) --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0010-wipe-unprepared-disks.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0010-wipe-unprepared-disks.patch deleted file mode 100644 index fcebed887..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0010-wipe-unprepared-disks.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 828af5dec53192207637d15397887e058d6ea0fb Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Fri, 26 Apr 2019 00:22:12 +0000 -Subject: [PATCH] wipe unprepared disks - ---- - manifests/osd.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index 5bd30c5..ab65924 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -158,7 +158,7 @@ umount /var/lib/ceph/osd/ceph-${osdid} - # 2. The uuid for the OSD we are configuring matches the uuid for the - # OSD on the disk. We don't want to attempt to re-use an OSD that - # had previously been deleted. -- unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep 'osd uuid ${uuid}'", -+ unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep -v unprepared | grep 'osd uuid ${uuid}'", - - logoutput => true, - timeout => $exec_timeout, --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0011-osd-add-support-for-mpath.patch b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0011-osd-add-support-for-mpath.patch deleted file mode 100644 index 931d5f54d..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/patches/0011-osd-add-support-for-mpath.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 1259ec9c739e1e6032df5cc5ebb104ba1709bf5b Mon Sep 17 00:00:00 2001 -From: Joao Pedro Alexandroni - -Date: Wed, 25 May 2022 14:40:46 -0300 -Subject: [PATCH] osd add support for mpath - -The device node in /dev/ and device path in /dev/disk/by-path -can not be used directly for mpath devices, use /dev/mapper/mpathN -and /dev/disk/by-id/dm-uuid-mpath- instead and change the -scripts in osd.pp accordingly. - -Signed-off-by: Joao Pedro Alexandroni ---- - manifests/osd.pp | 55 ++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 46 insertions(+), 9 deletions(-) - -diff --git a/manifests/osd.pp b/manifests/osd.pp -index ab65924..098b69e 100644 ---- a/manifests/osd.pp -+++ b/manifests/osd.pp -@@ -138,8 +138,14 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f - - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --disk=$(readlink -f ${data}) --ceph-disk --verbose --log-stdout prepare --filestore ${cluster_uuid_option} ${uuid_option} ${osdid_option} --fs-type xfs --zap-disk \${disk} $(readlink -f ${journal}) -+if [[ ${data} == *mpath* ]]; then -+ disk=$(find -L /dev/mapper/ -samefile ${data}) -+ journal_part=${journal} -+else -+ disk=$(readlink -f ${data}) -+ test -z ${journal} || journal_part=$(readlink -f ${journal}) -+fi -+ceph-disk --verbose --log-stdout prepare --filestore ${cluster_uuid_option} ${uuid_option} ${osdid_option} --fs-type xfs --zap-disk \${disk} \${journal_part} - mkdir -p /var/lib/ceph/osd/ceph-${osdid} - ceph auth del osd.${osdid} || true - part=\${disk} -@@ -148,7 +154,11 @@ if [[ \$part == *nvme* ]]; then - else - part=\${part}1 - fi --mount $(readlink -f \${part}) /var/lib/ceph/osd/ceph-${osdid} -+if [[ ${data} == *mpath* ]]; then -+ mount \${part} /var/lib/ceph/osd/ceph-${osdid} -+else -+ mount $(readlink -f \${part}) /var/lib/ceph/osd/ceph-${osdid} -+fi - ceph-osd --id ${osdid} --mkfs --mkkey --mkjournal - ceph auth add osd.${osdid} osd 'allow *' mon 'allow rwx' -i /var/lib/ceph/osd/ceph-${osdid}/keyring - umount /var/lib/ceph/osd/ceph-${osdid} -@@ -158,7 +168,14 @@ umount /var/lib/ceph/osd/ceph-${osdid} - # 2. The uuid for the OSD we are configuring matches the uuid for the - # OSD on the disk. We don't want to attempt to re-use an OSD that - # had previously been deleted. -- unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep -v unprepared | grep 'osd uuid ${uuid}'", -+ unless => "/bin/true # comment to satisfy puppet syntax requirements -+set -ex -+if [[ ${data} == *mpath* ]]; then -+ ceph-disk list --format json ${data}| grep '\"type\": \"data\"'| grep '\"uuid\": \"${uuid}\"' -+else -+ ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep -v unprepared | grep 'osd uuid ${uuid}' -+fi -+", - - logoutput => true, - timeout => $exec_timeout, -@@ -182,7 +199,11 @@ restorecon -R $(readlink -f ${data}) - exec { $ceph_activate: - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --disk=$(readlink -f ${data}) -+if [[ ${data} == *mpath* ]]; then -+ disk=$(find -L /dev/mapper/ -samefile ${data}) -+else -+ disk=$(readlink -f ${data}) -+fi - if ! test -b \$disk ; then - echo \$disk | egrep -e '^/dev' -q -v - mkdir -p \$disk -@@ -217,7 +238,11 @@ ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep \" $(readlink -f ${data})\$\" - exec { "remove-osd-${name}": - command => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --disk=$(readlink -f ${data}) -+if [[ ${data} == *mpath* ]]; then -+ disk=$(find -L /dev/mapper/ -samefile ${data}) -+else -+ disk=$(readlink -f ${data}) -+fi - part=\${disk} - if [[ \${part} == *nvme* ]]; then - part=\${part}p1 -@@ -225,7 +250,11 @@ else - part=\${part}1 - fi - if [ -z \"\$id\" ] ; then -- id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ if [[ ${data} == *mpath* ]]; then -+ id=$(ceph-disk list --format json ${data} | sed -n 's/.*\"whoami\": \"\\([0-9]\\+\\)\".*/\\1/p') -+ else -+ id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ fi - fi - if [ -z \"\$id\" ] ; then - id=$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe \"s:.*/${cluster_name}-([0-9]+) *-> *\${disk}\$:\\1:p\" || true) -@@ -244,7 +273,11 @@ fi - ", - unless => "/bin/true # comment to satisfy puppet syntax requirements - set -ex --disk=$(readlink -f ${data}) -+if [[ ${data} == *mpath* ]]; then -+ disk=$(find -L /dev/mapper/ -samefile ${data}) -+else -+ disk=$(readlink -f ${data}) -+fi - part=${disk} - if [[ \$part == *nvme* ]]; then - part=\${part}p1 -@@ -252,7 +285,11 @@ else - part=\${part}1 - fi - if [ -z \"\$id\" ] ; then -- id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ if [[ ${data} == *mpath* ]]; then -+ id=$(ceph-disk list --format json ${data} | sed -n 's/.*\"whoami\": \"\\([0-9]\\+\\)\".*/\\1/p') -+ else -+ id=$(ceph-disk list | sed -nEe \"s:^ *\${part}? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p\") -+ fi - fi - if [ -z \"\$id\" ] ; then - id=$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe \"s:.*/${cluster_name}-([0-9]+) *-> *\${disk}\$:\\1:p\" || true) --- -2.36.1 - diff --git a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/srpm_path b/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/srpm_path deleted file mode 100644 index a629f4da6..000000000 --- a/config/puppet-modules/openstack/puppet-ceph-2.2.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-ceph-2.4.1-1.el7.src.rpm diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/build_srpm.data b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch deleted file mode 100644 index c0b2feea8..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c194c17c2022a34ce1c1eddd930eb943aaa2e1ce Mon Sep 17 00:00:00 2001 -From: Jack Ding -Date: Fri, 11 May 2018 21:39:23 -0400 -Subject: [PATCH] Update package versioning for Titanium format - ---- - SPECS/puppet-horizon.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-horizon.spec b/SPECS/puppet-horizon.spec -index 955f56c..511cf25 100644 ---- a/SPECS/puppet-horizon.spec -+++ b/SPECS/puppet-horizon.spec -@@ -1,7 +1,7 @@ - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} - Name: puppet-horizon - Version: 11.5.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Puppet module for OpenStack Horizon - License: ASL 2.0 - --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0002-update-memcached-dependency.patch b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0002-update-memcached-dependency.patch deleted file mode 100644 index 6f7d790e9..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/0002-update-memcached-dependency.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a59312d5e966405d0053acae383f315d8ffa9dd2 Mon Sep 17 00:00:00 2001 -From: Jack Ding -Date: Fri, 11 May 2018 21:45:14 -0400 -Subject: [PATCH 2/3] update memcached dependency - ---- - SPECS/puppet-horizon.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/puppet-horizon.spec b/SPECS/puppet-horizon.spec -index 511cf25..ada0538 100644 ---- a/SPECS/puppet-horizon.spec -+++ b/SPECS/puppet-horizon.spec -@@ -9,6 +9,9 @@ URL: https://launchpad.net/puppet-horizon - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - -+# WRS Patches -+Patch0001: 0001-update-memcached-dependency.patch -+ - BuildArch: noarch - - Requires: puppet-apache -@@ -21,6 +24,9 @@ Puppet module for OpenStack Horizon - - %prep - %setup -q -n openstack-horizon-%{upstream_version} -+# WRS Patches -+%patch0001 -p1 -+ - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index e507a3795..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-Titanium-format.patch -0002-update-memcached-dependency.patch diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/patches/0001-update-memcached-dependency.patch b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/patches/0001-update-memcached-dependency.patch deleted file mode 100644 index ec4f7e5b1..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/patches/0001-update-memcached-dependency.patch +++ /dev/null @@ -1,24 +0,0 @@ -From ece3e238c13425113f7882448a0e0fe40d07637c Mon Sep 17 00:00:00 2001 -From: Jack Ding -Date: Fri, 11 May 2018 21:45:24 -0400 -Subject: [PATCH 3/3] update memcached dependency - ---- - metadata.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/metadata.json b/metadata.json -index 222be17..a9d8a91 100644 ---- a/metadata.json -+++ b/metadata.json -@@ -47,6 +47,6 @@ - "dependencies": [ - {"name":"puppetlabs/apache","version_requirement":">=1.2.0 <2.0.0"}, - {"name":"puppetlabs/stdlib","version_requirement":">=4.0.0 <5.0.0"}, -- {"name":"saz/memcached","version_requirement":">=2.0.2 <3.0.0"} -+ {"name":"saz/memcached","version_requirement":">=2.0.2 <=3.0.2"} - ] - } --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/srpm_path b/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/srpm_path deleted file mode 100644 index 568d8969d..000000000 --- a/config/puppet-modules/openstack/puppet-horizon-9.5.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-horizon-11.5.0-1.el7.src.rpm diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/build_srpm.data b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch deleted file mode 100644 index 4e31a36fb..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-Titanium-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From dc2d2b15db75503e8b5f1bc639372902ad99333c Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 25 Oct 2017 16:12:09 -0400 -Subject: [PATCH] Update package versioning for Titanium format - ---- - SPECS/puppet-keystone.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 9dc1e0f..956664d 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -1,7 +1,7 @@ - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} - Name: puppet-keystone - Version: 11.3.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Puppet module for OpenStack Keystone - License: ASL 2.0 - --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0002-squash-titanium-patches.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0002-squash-titanium-patches.patch deleted file mode 100644 index 6b95d366e..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0002-squash-titanium-patches.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0fcc5269a8ee26e7aee8301c13f740dff9c2acee Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Wed, 25 Oct 2017 17:48:23 -0400 -Subject: [PATCH] squash titanium patches - ---- - SPECS/puppet-keystone.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 956664d..f0a18e8 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -9,6 +9,9 @@ URL: https://launchpad.net/puppet-keystone - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - -+# WRS Patches -+Patch0001: 0001-pike-rebase-squash-titanium-patches.patch -+ - BuildArch: noarch - - Requires: puppet-apache -@@ -24,6 +27,9 @@ Puppet module for OpenStack Keystone - %prep - %setup -q -n openstack-keystone-%{upstream_version} - -+# WRS Patches -+%patch0001 -p1 -+ - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + - find . \( -name "*.pl" -o -name "*.sh" \) -exec chmod +x {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0003-remove-the-keystone-admin-app.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0003-remove-the-keystone-admin-app.patch deleted file mode 100644 index 9f31f9747..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0003-remove-the-keystone-admin-app.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 145827dcc2c13fa18fbba2455773187dcee9b42e Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Mon, 22 Jan 2018 11:43:27 -0500 -Subject: [PATCH] remove the keystone admin app - ---- - SPECS/puppet-keystone.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index f0a18e8..42352df 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -11,6 +11,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio - - # WRS Patches - Patch0001: 0001-pike-rebase-squash-titanium-patches.patch -+Patch0002: 0002-remove-the-Keystone-admin-app.patch - - BuildArch: noarch - -@@ -29,6 +30,7 @@ Puppet module for OpenStack Keystone - - # WRS Patches - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0004-remove-eventlet_and_bindhost-from-keystoneconf.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0004-remove-eventlet_and_bindhost-from-keystoneconf.patch deleted file mode 100644 index df10bab11..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0004-remove-eventlet_and_bindhost-from-keystoneconf.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit a1122168b836f9c786c4a6c58c96dde548921a06 -Author: Shoaib Nasir -Date: Thu Feb 15 15:15:33 2018 -0500 - - WRS: 0004-remove-eventlet_and_bindhost-from-keystoneconf.patch - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 42352df..36cf461 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -12,6 +12,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio - # WRS Patches - Patch0001: 0001-pike-rebase-squash-titanium-patches.patch - Patch0002: 0002-remove-the-Keystone-admin-app.patch -+Patch0003: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch - - BuildArch: noarch - -@@ -31,6 +32,7 @@ Puppet module for OpenStack Keystone - # WRS Patches - %patch0001 -p1 - %patch0002 -p1 -+%patch0003 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0005-escape-special-characters-in-bootstrap.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0005-escape-special-characters-in-bootstrap.patch deleted file mode 100644 index a2cc29b5b..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0005-escape-special-characters-in-bootstrap.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f3282651cd75697bbf7be3a07c1093c03964b5e1 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Mon, 2 Apr 2018 16:20:52 -0400 -Subject: [PATCH] meta patch for - 0004-escape-special-characters-in-bootstrap.patch - ---- - SPECS/puppet-keystone.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 36cf461..301002a 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -13,6 +13,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio - Patch0001: 0001-pike-rebase-squash-titanium-patches.patch - Patch0002: 0002-remove-the-Keystone-admin-app.patch - Patch0003: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch -+Patch0004: 0004-escape-special-characters-in-bootstrap.patch - - BuildArch: noarch - -@@ -33,6 +34,7 @@ Puppet module for OpenStack Keystone - %patch0001 -p1 - %patch0002 -p1 - %patch0003 -p1 -+%patch0004 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0006-Add-support-for-fernet-receipts.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0006-Add-support-for-fernet-receipts.patch deleted file mode 100644 index 0bea966bb..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0006-Add-support-for-fernet-receipts.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1950a583743a3e5e8a1b3c83a55c2b8a307b7f14 Mon Sep 17 00:00:00 2001 -From: Tyler Smith -Date: Wed, 10 Apr 2019 15:41:03 -0400 -Subject: [PATCH 1/1] Add support for fernet receipts - ---- - SPECS/puppet-keystone.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 301002a..5b5e255 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -14,6 +14,7 @@ Patch0001: 0001-pike-rebase-squash-titanium-patches.patch - Patch0002: 0002-remove-the-Keystone-admin-app.patch - Patch0003: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch - Patch0004: 0004-escape-special-characters-in-bootstrap.patch -+Patch0005: 0005-Add-support-for-fernet-receipts.patch - - BuildArch: noarch - -@@ -35,6 +36,7 @@ Puppet module for OpenStack Keystone - %patch0002 -p1 - %patch0003 -p1 - %patch0004 -p1 -+%patch0005 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0007-update-Barbican-admin-secret-s-user-project-IDs.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0007-update-Barbican-admin-secret-s-user-project-IDs.patch deleted file mode 100644 index b596409f3..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0007-update-Barbican-admin-secret-s-user-project-IDs.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a53d9bfc15e1d24a604fcc461f9a6e1483ed262d Mon Sep 17 00:00:00 2001 -From: Andy Ning -Date: Mon, 4 Nov 2019 20:51:22 -0500 -Subject: [PATCH 1/1] update Barbican admin secret's user/project IDs - -Signed-off-by: Andy Ning ---- - SPECS/puppet-keystone.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index 5b5e255..ae233f0 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -15,6 +15,7 @@ Patch0002: 0002-remove-the-Keystone-admin-app.patch - Patch0003: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch - Patch0004: 0004-escape-special-characters-in-bootstrap.patch - Patch0005: 0005-Add-support-for-fernet-receipts.patch -+Patch0006: 0006-update-Barbican-admin-secret-s-user-project-IDs-duri.patch - - BuildArch: noarch - -@@ -37,6 +38,7 @@ Puppet module for OpenStack Keystone - %patch0003 -p1 - %patch0004 -p1 - %patch0005 -p1 -+%patch0006 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0008-update-for-openstackclient-Train-upgrade.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0008-update-for-openstackclient-Train-upgrade.patch deleted file mode 100644 index e0828d31e..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/0008-update-for-openstackclient-Train-upgrade.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 37836a4a1ce5548f39a23f5686f6f7c12bef3504 Mon Sep 17 00:00:00 2001 -From: chenyan -Date: Thu, 26 Mar 2020 14:17:54 +0800 -Subject: [PATCH] update for openstackclient Train upgrade - -Signed-off-by: chenyan ---- - SPECS/puppet-keystone.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-keystone.spec b/SPECS/puppet-keystone.spec -index ae233f0..2e6ede3 100644 ---- a/SPECS/puppet-keystone.spec -+++ b/SPECS/puppet-keystone.spec -@@ -16,6 +16,7 @@ Patch0003: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch - Patch0004: 0004-escape-special-characters-in-bootstrap.patch - Patch0005: 0005-Add-support-for-fernet-receipts.patch - Patch0006: 0006-update-Barbican-admin-secret-s-user-project-IDs-duri.patch -+Patch0007: 0007-update-for-openstackclient-Train-upgrade.patch - - BuildArch: noarch - -@@ -39,6 +40,7 @@ Puppet module for OpenStack Keystone - %patch0004 -p1 - %patch0005 -p1 - %patch0006 -p1 -+%patch0007 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.17.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index d88b6efed..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,8 +0,0 @@ -0001-Update-package-versioning-for-Titanium-format.patch -0002-squash-titanium-patches.patch -0003-remove-the-keystone-admin-app.patch -0004-remove-eventlet_and_bindhost-from-keystoneconf.patch -0005-escape-special-characters-in-bootstrap.patch -0006-Add-support-for-fernet-receipts.patch -0007-update-Barbican-admin-secret-s-user-project-IDs.patch -0008-update-for-openstackclient-Train-upgrade.patch diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0001-pike-rebase-squash-titanium-patches.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0001-pike-rebase-squash-titanium-patches.patch deleted file mode 100644 index 69858acc8..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0001-pike-rebase-squash-titanium-patches.patch +++ /dev/null @@ -1,440 +0,0 @@ -From 2c51d6f4ccf4a473089c08857262e769f7a8fc3a Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 7 Mar 2019 13:43:40 -0600 -Subject: [PATCH 1/4] WRS: Patch1: - 0001-pike-rebase-squash-titanium-patches.patch - ---- - lib/puppet/provider/keystone.rb | 79 ++++++++++++++++++++++- - manifests/db/sync.pp | 3 + - manifests/init.pp | 76 +++++++++++++++++----- - manifests/ldap.pp | 7 ++ - manifests/logging.pp | 2 +- - manifests/resource/service_identity.pp | 7 ++ - manifests/security_compliance.pp | 45 +++++++++++++ - spec/classes/keystone_security_compliance_spec.rb | 19 ++++++ - 8 files changed, 220 insertions(+), 18 deletions(-) - create mode 100644 manifests/security_compliance.pp - create mode 100644 spec/classes/keystone_security_compliance_spec.rb - -diff --git a/lib/puppet/provider/keystone.rb b/lib/puppet/provider/keystone.rb -index 3841418..0857ac1 100644 ---- a/lib/puppet/provider/keystone.rb -+++ b/lib/puppet/provider/keystone.rb -@@ -3,6 +3,7 @@ require 'puppet/provider/openstack' - require 'puppet/provider/openstack/auth' - require 'puppet/provider/openstack/credentials' - require File.join(File.dirname(__FILE__), '..','..', 'puppet/provider/keystone/util') -+require 'hiera_puppet' - - class Puppet::Provider::Keystone < Puppet::Provider::Openstack - -@@ -230,12 +231,88 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack - end - end - -+ ### WRS Modifications (Start) ### -+ -+ def self.hiera_lookup(key) -+ HieraPuppet.lookup(key, :undef, self, nil, :priority) -+ end -+ -+ def self.initial_config_primary? -+ return true if ENV['INITIAL_CONFIG_PRIMARY'] == "true" -+ end -+ -+ -+ def self.upgrading? -+ return true if hiera_lookup('platform::params::controller_upgrade') == true -+ end -+ - def self.request(service, action, properties=nil, options={}) - super - rescue Puppet::Error::OpenstackAuthInputError, Puppet::Error::OpenstackUnauthorizedError => error -- request_by_service_token(service, action, error, properties, options=options) -+ if initial_config_primary? -+ # admin user account might not have been created -+ request_by_service_token(service, action, error, properties) -+ else -+ if upgrading? -+ # when running the Keystone manifest during an upgrade -+ # (on controller-1), we need to use an AUTH token and -+ # a bypass URL since using the default AUTL URL will -+ # send the Request to the service catalog URL (internalURL), -+ # running on the non-upgraded controller-0 which cannot -+ # service this request -+ request_by_upgrading_token(service, action, error, properties) -+ else -+ request_by_admin_credential(service, action, error, properties) -+ end -+ end - end - -+ def self.request_by_admin_credential(service, action, error, properties=nil) -+ properties ||= [] -+ @credentials.username = hiera_lookup('platform::client::params::admin_username') -+ @credentials.password = hiera_lookup('keystone::admin_password') -+ @credentials.project_name = 'admin' -+ @credentials.auth_url = service_url -+ @credentials.identity_api_version = @credentials.version -+ if @credentials.version == '3' -+ @credentials.user_domain_name = hiera_lookup('platform::client::params::admin_user_domain') -+ @credentials.project_domain_name = hiera_lookup('platform::client::params::admin_project_domain') -+ end -+ raise error unless @credentials.set? -+ Puppet::Provider::Openstack.request(service, action, properties, @credentials) -+ end -+ -+ def self.get_upgrade_token -+ upgrade_token_file = hiera_lookup('openstack::keystone::upgrade::upgrade_token_file') -+ # the upgrade token file may get refreshed by the same Puppet event -+ # that triggered this call, and therefore may not be available -+ # immediately. Try for timeout before quitting with error -+ timeout = 10 # 10 seconds -+ 1.upto(timeout) do |iter| -+ if File.exists?(upgrade_token_file) -+ upgrade_token = File.read(upgrade_token_file).strip -+ notice("Found #{upgrade_token_file} token file and upgrade token #{upgrade_token}.") -+ return upgrade_token -+ else -+ Puppet.debug("#{upgrade_token_file} not found. Retrying for #{iter} more seconds.") -+ sleep(1) -+ end -+ end -+ raise(Puppet::ExecutionFailure, "Can't retrieve #{upgrade_token_file} in #{timeout}s retry attempts.") -+ end -+ -+ -+ def self.request_by_upgrading_token(service, action, error, properties=nil, options={}) -+ properties ||= [] -+ @credentials.token = get_upgrade_token -+ @credentials.url = hiera_lookup('openstack::keystone::upgrade::url') -+ raise error unless @credentials.service_token_set? -+ Puppet::Provider::Openstack.request(service, action, properties, @credentials, options) -+ end -+ -+ ### WRS Additions (End) ### -+ -+ - def self.request_by_service_token(service, action, error, properties=nil, options={}) - properties ||= [] - @credentials.token = admin_token -diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp -index cee869b..cea217c 100644 ---- a/manifests/db/sync.pp -+++ b/manifests/db/sync.pp -@@ -36,5 +36,8 @@ class keystone::db::sync( - ], - notify => Anchor['keystone::dbsync::end'], - tag => 'keystone-exec', -+ # Only do the db sync if both controllers are running the same software -+ # version. Avoids impacting mate controller during an upgrade. -+ onlyif => "test $::controller_sw_versions_match = true", - } - } -diff --git a/manifests/init.pp b/manifests/init.pp -index 2adc685..4d79d30 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -28,6 +28,15 @@ - # The admin_token has been deprecated by the Keystone service and this - # will be deprecated in a future changeset. Required. - # -+# [*upgrade_token_cmd*] -+# (optional) WRS - if we are in an upgrade scenario, an upgrade token -+# will be required to bypass authentication. -+# Defaults to undef -+# -+# [*upgrade_token_file*] -+# (optional) WRS - the file where the upgrade token will be stowed -+# Defaults to undef -+# - # [*admin_password*] - # Keystone password for the admin user. This is not the admin_token. - # This is the password that the admin user signs into keystone with. -@@ -663,6 +672,8 @@ - # - class keystone( - $admin_token, -+ $upgrade_token_cmd = undef, -+ $upgrade_token_file = undef, - $admin_password = undef, - $package_ensure = 'present', - $client_package_ensure = 'present', -@@ -857,10 +868,13 @@ admin_token will be removed in a later release") - - keystone_config { - 'DEFAULT/admin_token': value => $admin_token, secret => true; -+ # WRS: the following options are deprecated for removal -+ # however public_bind_host and admin_bind_host are still required as long as -+ # keystone is running under eventlet - 'DEFAULT/public_bind_host': value => $public_bind_host; - 'DEFAULT/admin_bind_host': value => $admin_bind_host; -- 'DEFAULT/public_port': value => $public_port; -- 'DEFAULT/admin_port': value => $admin_port; -+ #'DEFAULT/public_port': value => $public_port; -+ #'DEFAULT/admin_port': value => $admin_port; - 'DEFAULT/member_role_id': value => $member_role_id; - 'DEFAULT/member_role_name': value => $member_role_name; - 'paste_deploy/config_file': value => $paste_config; -@@ -897,18 +911,21 @@ admin_token will be removed in a later release") - # ssl config - if ($enable_ssl) { - keystone_config { -- 'ssl/enable': value => true; -+ # WRS ssl/enable is deprecated for removal -+ #'ssl/enable': value => true; - 'ssl/certfile': value => $ssl_certfile; - 'ssl/keyfile': value => $ssl_keyfile; - 'ssl/ca_certs': value => $ssl_ca_certs; - 'ssl/ca_key': value => $ssl_ca_key; - 'ssl/cert_subject': value => $ssl_cert_subject; - } -- } else { -- keystone_config { -- 'ssl/enable': value => false; -- } - } -+ # WRS ssl/enable is deprecated for removal -+ # else { -+ # keystone_config { -+ # 'ssl/enable': value => false; -+ # } -+ #} - - if !is_service_default($memcache_servers) or !is_service_default($cache_memcache_servers) { - Service<| title == 'memcached' |> -> Anchor['keystone::service::begin'] -@@ -1016,14 +1033,15 @@ Fernet or UUID tokens are recommended.") - Fernet or UUID tokens are recommended.") - } - -- keystone_config { -- 'signing/certfile': value => $signing_certfile; -- 'signing/keyfile': value => $signing_keyfile; -- 'signing/ca_certs': value => $signing_ca_certs; -- 'signing/ca_key': value => $signing_ca_key; -- 'signing/cert_subject': value => $signing_cert_subject; -- 'signing/key_size': value => $signing_key_size; -- } -+ # WRS: the following signing options are deprecated for removal -+ #keystone_config { -+ # 'signing/certfile': value => $signing_certfile; -+ # 'signing/keyfile': value => $signing_keyfile; -+ # 'signing/ca_certs': value => $signing_ca_certs; -+ # 'signing/ca_key': value => $signing_ca_key; -+ # 'signing/cert_subject': value => $signing_cert_subject; -+ # 'signing/key_size': value => $signing_key_size; -+ #} - - # Only do pki_setup if we were asked to do so. This is needed - # regardless of the token provider since token revocation lists -@@ -1089,6 +1107,9 @@ Fernet or UUID tokens are recommended.") - heartbeat_rate => $rabbit_heartbeat_rate, - } - -+ # WRS: The following options are deprecated for removal -+ # however they are still required as long as keystone -+ # is running under eventlet - keystone_config { - 'eventlet_server/admin_workers': value => $admin_workers; - 'eventlet_server/public_workers': value => $public_workers; -@@ -1135,7 +1156,8 @@ Fernet or UUID tokens are recommended.") - validate => false, - } - } -- warning("Keystone under Eventlet has been deprecated during the Kilo cycle. \ -+ # Drop this to info. -+ info("Keystone under Eventlet has been deprecated during the Kilo cycle. \ - Support for deploying under eventlet will be dropped as of the M-release of OpenStack.") - } elsif $service_name == 'httpd' { - include ::apache::params -@@ -1280,6 +1302,27 @@ running as a standalone service, or httpd for being run by a httpd server") - } - } - -+ # WRS: Now that the keystone service has started, -+ # check if we are in an Upgrade scenario, and generate -+ # an upgrade token which will be used to bypass Keystone -+ # authentication (specifically the service catalog) for -+ # all operations during upgrades. -+ # This operation is similar to the keystone bootstrap -+ # operation (above) which would generate an admin -+ # token, and therefore also requires the database to -+ # be up and running and configured and is only run once, -+ # so we don't need to notify the service -+ if $upgrade_token_cmd and $upgrade_token_file { -+ exec { 'upgrade token issue': -+ command => "${upgrade_token_cmd} > ${upgrade_token_file}", -+ path => '/usr/bin', -+ creates => $upgrade_token_file, -+ subscribe => Service[$service_name], -+ notify => Anchor['keystone::service::end'], -+ tag => 'keystone-exec', -+ } -+ } -+ - if $using_domain_config { - validate_absolute_path($domain_config_directory) - # Better than ensure resource. We don't want to conflict with any -@@ -1311,4 +1354,5 @@ running as a standalone service, or httpd for being run by a httpd server") - {'value' => $domain_config_directory} - ) - } -+ - } -diff --git a/manifests/ldap.pp b/manifests/ldap.pp -index 11620bf..728ca40 100644 ---- a/manifests/ldap.pp -+++ b/manifests/ldap.pp -@@ -4,6 +4,11 @@ - # - # === parameters: - # -+# [*debug_level*] -+# LDAP debugging level for LDAP calls; a value of zero("0") disables -+# debugging. (integer value) -+# Defaults to 'undef' -+# - # [*url*] - # URL for connecting to the LDAP server. (string value) - # Defaults to 'undef' -@@ -384,6 +389,7 @@ - # Copyright 2012 Puppetlabs Inc, unless otherwise noted. - # - class keystone::ldap( -+ $debug_level = undef, - $url = undef, - $user = undef, - $password = undef, -@@ -494,6 +500,7 @@ class keystone::ldap( - } - - keystone_config { -+ 'ldap/debug_level': value => $debug_level; - 'ldap/url': value => $url; - 'ldap/user': value => $user; - 'ldap/password': value => $password, secret => true; -diff --git a/manifests/logging.pp b/manifests/logging.pp -index e737c4f..3d8df63 100644 ---- a/manifests/logging.pp -+++ b/manifests/logging.pp -@@ -110,7 +110,7 @@ class keystone::logging( - $log_file = $::os_service_default, - $debug = $::os_service_default, - $logging_context_format_string = $::os_service_default, -- $logging_default_format_string = $::os_service_default, -+ $logging_default_format_string = 'keystone:log %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', - $logging_debug_format_suffix = $::os_service_default, - $logging_exception_prefix = $::os_service_default, - $logging_user_identity_format = $::os_service_default, -diff --git a/manifests/resource/service_identity.pp b/manifests/resource/service_identity.pp -index 09e7d94..243c9ec 100644 ---- a/manifests/resource/service_identity.pp -+++ b/manifests/resource/service_identity.pp -@@ -187,6 +187,8 @@ define keystone::resource::service_identity( - if $service_type { - ensure_resource('keystone_service', "${service_name_real}::${service_type}", { - 'ensure' => $ensure, -+ 'name' => $service_name_real, -+ 'type' => $service_type, - 'description' => $service_description, - }) - } else { -@@ -199,6 +201,9 @@ define keystone::resource::service_identity( - if $public_url and $admin_url and $internal_url { - ensure_resource('keystone_endpoint', "${region}/${service_name_real}::${service_type}", { - 'ensure' => $ensure, -+ 'name' => $service_name_real, -+ 'type' => $service_type, -+ 'region' => $region, - 'public_url' => $public_url, - 'admin_url' => $admin_url, - 'internal_url' => $internal_url, -@@ -210,6 +215,8 @@ define keystone::resource::service_identity( - if $public_url and $admin_url and $internal_url { - ensure_resource('keystone_endpoint', "${region}/${service_name_real}", { - 'ensure' => $ensure, -+ 'name' => $service_name_real, -+ 'region' => $region, - 'public_url' => $public_url, - 'admin_url' => $admin_url, - 'internal_url' => $internal_url, -diff --git a/manifests/security_compliance.pp b/manifests/security_compliance.pp -new file mode 100644 -index 0000000..64830ec ---- /dev/null -+++ b/manifests/security_compliance.pp -@@ -0,0 +1,45 @@ -+# == class: keystone::security_compliance -+# -+# Implements security compliance configuration for keystone. -+# -+# === parameters: -+# -+# [*unique_last_password_count*] -+# This controls the number of previous user password iterations -+# to keep in history, in order to enforce that newly created passwords -+# are unique. Setting the value to 1 (the default) disables this feature. -+# (integer value) -+# Defaults to 'undef' -+# -+# [*password_regex*] -+# The regular expression used to validate password strength -+# requirements. By default, the regular expression will match -+# any password. (string value) -+# Defaults to 'undef' -+# -+# [*password_regex_description*] -+# If a password fails to match the regular expression (*password_regex*), -+# the contents of this configuration will be returned to users to explain -+# why their requested password was insufficient. (string value) -+# Defaults to 'undef' -+# -+# === DEPRECATED group/name -+# -+# == Copyright -+# -+# Copyright 2017 Wind River Systems, unless otherwise noted. -+# -+class keystone::security_compliance( -+ $unique_last_password_count = undef, -+ $password_regex = undef, -+ $password_regex_description = undef, -+) { -+ -+ include ::keystone::deps -+ -+ keystone_config { -+ 'security_compliance/unique_last_password_count': value => $unique_last_password_count; -+ 'security_compliance/password_regex': value => $password_regex; -+ 'security_compliance/password_regex_description': value => $password_regex_description; -+ } -+} -diff --git a/spec/classes/keystone_security_compliance_spec.rb b/spec/classes/keystone_security_compliance_spec.rb -new file mode 100644 -index 0000000..d0d4724 ---- /dev/null -+++ b/spec/classes/keystone_security_compliance_spec.rb -@@ -0,0 +1,19 @@ -+require 'spec_helper' -+ -+describe 'keystone::security_compliance' do -+ describe 'with basic params' do -+ let :params do -+ { -+ :unique_last_password_count => 2, -+ :password_regex => '^(?=.*\d)(?=.*[a-zA-Z]).{7,}$', -+ :password_regex_description => 'password must be at least 7 characters long and contain 1 digit', -+ } -+ end -+ it 'should have basic params' do -+ # basic params -+ is_expected.to contain_keystone_config('security_compliance/unique_last_password_count').with_value('2') -+ is_expected.to contain_keystone_config('security_compliance/password_regex').with_value('^(?=.*\d)(?=.*[a-zA-Z]).{7,}$') -+ is_expected.to contain_keystone_config('security_compliance/password_regex_description').with_value('password must be at least 7 characters long and contain 1 digit') -+ end -+ end -+end --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0002-remove-the-Keystone-admin-app.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0002-remove-the-Keystone-admin-app.patch deleted file mode 100644 index 7499a8c80..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0002-remove-the-Keystone-admin-app.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0fb9013aa056db642457e93a20499fd9b46ba436 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Mon, 22 Jan 2018 11:18:08 -0500 -Subject: [PATCH] CGTS-8701: Remove the Keystone-admin app - -Following the Pike rebase, no services are using Identity V2 and -therefore we can shut off the Keystone admin port / app, as in Identity -V3 the public endpoint and admin endpoints both offer identical services ---- - lib/puppet/provider/keystone.rb | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/lib/puppet/provider/keystone.rb b/lib/puppet/provider/keystone.rb -index 8eb171d..3c310dc 100644 ---- a/lib/puppet/provider/keystone.rb -+++ b/lib/puppet/provider/keystone.rb -@@ -171,12 +171,16 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack - end - - def self.get_admin_endpoint -+ # NOTE (knasim-wrs): As of the Pike rebase, the public port(5000) -+ # provides the same functionality as the admin port(35357). We -+ # shall therefore not deploy the keystone-admin app and return -+ # the public port - endpoint = nil - if keystone_file - if url = get_section('DEFAULT', 'admin_endpoint') - endpoint = url.chomp('/') - else -- admin_port = get_section('DEFAULT', 'admin_port') || '35357' -+ admin_port = get_section('DEFAULT', 'public_port') || '5000' - host = clean_host(get_section('DEFAULT', 'admin_bind_host')) - protocol = ssl? ? 'https' : 'http' - endpoint = "#{protocol}://#{host}:#{admin_port}" --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0003-remove-eventlet_bindhost-from-Keystoneconf.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0003-remove-eventlet_bindhost-from-Keystoneconf.patch deleted file mode 100644 index 905118cdc..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0003-remove-eventlet_bindhost-from-Keystoneconf.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit bb91ab26622a5ec695c6564af5a9e5e54fdc903c -Author: Shoaib Nasir -Date: Thu Feb 15 15:04:55 2018 -0500 - - WRS: Patch3: 0003-remove-eventlet_bindhost-from-Keystoneconf.patch - -diff --git a/manifests/init.pp b/manifests/init.pp -index 4d79d30..d64638c 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -871,8 +871,9 @@ admin_token will be removed in a later release") - # WRS: the following options are deprecated for removal - # however public_bind_host and admin_bind_host are still required as long as - # keystone is running under eventlet -- 'DEFAULT/public_bind_host': value => $public_bind_host; -- 'DEFAULT/admin_bind_host': value => $admin_bind_host; -+ # WRS: bind_host options removed from keystone.conf [DEFAULT] -+ #'DEFAULT/public_bind_host': value => $public_bind_host; -+ #'DEFAULT/admin_bind_host': value => $admin_bind_host; - #'DEFAULT/public_port': value => $public_port; - #'DEFAULT/admin_port': value => $admin_port; - 'DEFAULT/member_role_id': value => $member_role_id; -@@ -1110,10 +1111,12 @@ Fernet or UUID tokens are recommended.") - # WRS: The following options are deprecated for removal - # however they are still required as long as keystone - # is running under eventlet -- keystone_config { -- 'eventlet_server/admin_workers': value => $admin_workers; -- 'eventlet_server/public_workers': value => $public_workers; -- } -+ # WRS(snasir): Removing these options from keystone.conf -+ # since they are now populated in keystone-api.conf -+ #keystone_config { -+ # 'eventlet_server/admin_workers': value => $admin_workers; -+ # 'eventlet_server/public_workers': value => $public_workers; -+ #} - - if $manage_service { - if $enabled { diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0004-escape-special-characters-in-bootstrap.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0004-escape-special-characters-in-bootstrap.patch deleted file mode 100644 index edb52431f..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0004-escape-special-characters-in-bootstrap.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 70d22113cc8d58b6546cb4917c27f9aae51787c5 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Mon, 2 Apr 2018 16:13:31 -0400 -Subject: [PATCH] CGTS-9320: config_controller fails when admin pw containing $ - -Escape special characters when executing the keystone-manage bootstrap -command since the keystone CLI argparse will parse "Madawa$ka1" as -"Madawa" which will cause the Keystone ADMIN acct to be created with an -incorrect password. Puppet will detect this and attempt to course -correct by sending an UPDATE User request to Keystone, which does set -the right password but causes other failures in config_controller ---- - manifests/init.pp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/manifests/init.pp b/manifests/init.pp -index d64638c..89af303 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -1292,10 +1292,15 @@ running as a standalone service, or httpd for being run by a httpd server") - } - - if $enable_bootstrap { -+ #(NOTE: knasim-wrs): escape special characters in the password otherwise the -+ # keyword-manage bootstrap CLI may parse the password incorrectly, causing -+ # the admin account to be created with an incorrect password -+ $admin_password_escaped = shell_escape($admin_password_real) -+ - # this requires the database to be up and running and configured - # and is only run once, so we don't need to notify the service - exec { 'keystone-manage bootstrap': -- command => "keystone-manage bootstrap --bootstrap-password ${admin_password_real}", -+ command => "keystone-manage bootstrap --bootstrap-password ${admin_password_escaped}", - user => $keystone_user, - path => '/usr/bin', - refreshonly => true, --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0005-Add-support-for-fernet-receipts.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0005-Add-support-for-fernet-receipts.patch deleted file mode 100644 index 5ba045d6c..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0005-Add-support-for-fernet-receipts.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 65de0c6615e2e94a4fd234fc1826e3eb403bb575 Mon Sep 17 00:00:00 2001 -From: Tyler Smith -Date: Wed, 10 Apr 2019 15:37:25 -0400 -Subject: [PATCH 1/1] Add support for fernet receipts - ---- - manifests/init.pp | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/manifests/init.pp b/manifests/init.pp -index 89af303..a6d5cc3 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -1247,18 +1247,21 @@ running as a standalone service, or httpd for being run by a httpd server") - - if $fernet_key_repository { - keystone_config { -- 'fernet_tokens/key_repository': value => $fernet_key_repository; -+ 'fernet_tokens/key_repository': value => $fernet_key_repository; -+ 'fernet_receipts/key_repository': value => $fernet_key_repository; - } - } else { - keystone_config { -- 'fernet_tokens/key_repository': ensure => absent; -+ 'fernet_tokens/key_repository': ensure => absent; -+ 'fernet_receipts/key_repository': ensure => absent; - } - } - - keystone_config { -- 'token/revoke_by_id': value => $revoke_by_id; -- 'fernet_tokens/max_active_keys': value => $fernet_max_active_keys; -- 'credential/key_repository': value => $credential_key_repository; -+ 'token/revoke_by_id': value => $revoke_by_id; -+ 'fernet_tokens/max_active_keys': value => $fernet_max_active_keys; -+ 'fernet_receipts/max_active_keys': value => $fernet_max_active_keys; -+ 'credential/key_repository': value => $credential_key_repository; - } - - # Update this code when https://bugs.launchpad.net/keystone/+bug/1472285 is addressed. --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0006-update-Barbican-admin-secret-s-user-project-IDs-duri.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0006-update-Barbican-admin-secret-s-user-project-IDs-duri.patch deleted file mode 100644 index 0132b487f..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0006-update-Barbican-admin-secret-s-user-project-IDs-duri.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 60f023e20c7e1f98d1f71fb04e829a3ff0477f65 Mon Sep 17 00:00:00 2001 -From: Andy Ning -Date: Mon, 4 Nov 2019 20:20:28 -0500 -Subject: [PATCH 1/1] update Barbican admin secret's user/project IDs during - bootstrap - -In a DC system when subcloud is managed, keystone user/project IDs are -synced with Central Cloud, including admin user and project. But the -admin's secrets in Barbian still use the original user/project IDs, -causing docker registry access failure when platform-integ-apps is -reapplied. - -This updated keystone admin user/project IDs to be the same as Central -Cloud right after keystone is bootstrapped during subcloud deployment. -This way any referece to admin user/project IDs after bootstrap will be -using the IDs same as Central Cloud, including the ones in Barbican. -This will solve the problem of registry access failure issue. - -Closes-Bug: 1851247 -Signed-off-by: Andy Ning ---- - manifests/init.pp | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/manifests/init.pp b/manifests/init.pp -index 7bb0094..421259c 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -791,6 +791,8 @@ class keystone( - $rabbit_port = $::os_service_default, - $rabbit_userid = $::os_service_default, - $rabbit_virtual_host = $::os_service_default, -+ $dc_admin_user_id = undef, -+ $dc_admin_project_id = undef, - ) inherits keystone::params { - - include ::keystone::deps -@@ -1311,6 +1313,22 @@ running as a standalone service, or httpd for being run by a httpd server") - subscribe => Anchor['keystone::dbsync::end'], - tag => 'keystone-exec', - } -+ -+ if $dc_admin_user_id and $dc_admin_project_id { -+ exec { 'update keystone admin assignment actor_id': -+ command => "sudo -u postgres psql -d keystone -c \"update public.assignment set actor_id='$dc_admin_user_id' from public.local_user where public.assignment.actor_id=public.local_user.user_id and public.local_user.name='admin'\"", -+ require => Exec['keystone-manage bootstrap'], -+ } -+ -> exec { 'update keystone admin assignment target_id': -+ command => "sudo -u postgres psql -d keystone -c \"update public.assignment set target_id='$dc_admin_project_id' from public.project where public.assignment.target_id=public.project.id and public.project.name='admin'\"", -+ } -+ -> exec { 'update keystone admin user id': -+ command => "sudo -u postgres psql -d keystone -c \"update public.user set id='$dc_admin_user_id' from public.local_user where public.user.id=public.local_user.user_id and public.local_user.name='admin'\"", -+ } -+ -> exec { 'update keystone admin project id': -+ command => "sudo -u postgres psql -d keystone -c \"update public.project set id='$dc_admin_project_id' where name='admin'\"", -+ } -+ } - } - - # WRS: Now that the keystone service has started, --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0007-update-for-openstackclient-Train-upgrade.patch b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0007-update-for-openstackclient-Train-upgrade.patch deleted file mode 100644 index 8236a10ff..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/patches/0007-update-for-openstackclient-Train-upgrade.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 77f06068cdad5a6a20635731a9d2df7e0cdca175 Mon Sep 17 00:00:00 2001 -From: chenyan -Date: Fri, 27 Mar 2020 10:41:38 +0800 -Subject: [PATCH] update for openstackclient Train upgrade - -Signed-off-by: chenyan ---- - lib/puppet/provider/keystone.rb | 10 +++++++--- - lib/puppet/provider/keystone_role/openstack.rb | 4 ++-- - lib/puppet/provider/keystone_user_role/openstack.rb | 4 ++-- - 3 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/lib/puppet/provider/keystone.rb b/lib/puppet/provider/keystone.rb -index 2c0b749..630692e 100644 ---- a/lib/puppet/provider/keystone.rb -+++ b/lib/puppet/provider/keystone.rb -@@ -213,7 +213,10 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack - - def self.get_service_url - service_url = nil -- if ENV['OS_URL'] -+ if ENV['OS_ENDPOINT'] -+ service_url = ENV['OS_ENDPOINT'].dup -+ # Compatibility with pre-4.0.0 openstackclient -+ elsif ENV['OS_URL'] - service_url = ENV['OS_URL'].dup - elsif admin_endpoint - service_url = admin_endpoint -@@ -319,8 +322,9 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack - - def self.request_by_service_token(service, action, error, properties=nil, options={}) - properties ||= [] -- @credentials.token = admin_token -- @credentials.url = service_url -+ @credentials.token = admin_token -+ @credentials.endpoint = service_url -+ @credentials.url = service_url - raise error unless @credentials.service_token_set? - Puppet::Provider::Openstack.request(service, action, properties, @credentials, options) - end -diff --git a/lib/puppet/provider/keystone_role/openstack.rb b/lib/puppet/provider/keystone_role/openstack.rb -index 60e3496..b8f3fa0 100644 ---- a/lib/puppet/provider/keystone_role/openstack.rb -+++ b/lib/puppet/provider/keystone_role/openstack.rb -@@ -51,7 +51,7 @@ Puppet::Type.type(:keystone_role).provide( - list = request('role', 'list') - reallist = list.collect do |role| - new( -- :name => role[:name], -+ :name => role[:name].downcase, - :ensure => :present, - :id => role[:id] - ) -@@ -63,7 +63,7 @@ Puppet::Type.type(:keystone_role).provide( - def self.prefetch(resources) - roles = instances - resources.keys.each do |name| -- if provider = roles.find{ |role| role.name == name } -+ if provider = roles.find{ |role| role.name == name.downcase } - resources[name].provider = provider - end - end -diff --git a/lib/puppet/provider/keystone_user_role/openstack.rb b/lib/puppet/provider/keystone_user_role/openstack.rb -index eee0768..b51c84e 100644 ---- a/lib/puppet/provider/keystone_user_role/openstack.rb -+++ b/lib/puppet/provider/keystone_user_role/openstack.rb -@@ -45,14 +45,14 @@ Puppet::Type.type(:keystone_user_role).provide( - end - - def exists? -- roles_db = self.class.request('role', 'list', properties) -+ roles_db = self.class.request('role assignment', 'list', ['--names'] + properties) - @property_hash[:name] = resource[:name] - if roles_db.empty? - @property_hash[:ensure] = :absent - else - @property_hash[:ensure] = :present - @property_hash[:roles] = roles_db.collect do |role| -- role[:name] -+ role[:role] - end - end - return @property_hash[:ensure] == :present --- -2.17.1 - diff --git a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/srpm_path b/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/srpm_path deleted file mode 100644 index 875b491b1..000000000 --- a/config/puppet-modules/openstack/puppet-keystone-11.3.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-keystone-11.3.0-1.el7.src.rpm diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/build_srpm.data b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index e9f6fc500..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2a3ff36dc325a09ae8601575a0699bdcedcf463b Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 16 Oct 2017 12:06:28 -0500 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/puppet-openstacklib.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-openstacklib.spec b/SPECS/puppet-openstacklib.spec -index 7f3bbd8..8bf2c1b 100644 ---- a/SPECS/puppet-openstacklib.spec -+++ b/SPECS/puppet-openstacklib.spec -@@ -1,7 +1,7 @@ - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} - Name: puppet-openstacklib - Version: 11.5.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Puppet OpenStack Libraries - License: ASL 2.0 - --- -2.7.4 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0002-Add-TIS-patch.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0002-Add-TIS-patch.patch deleted file mode 100644 index d8ae8a044..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0002-Add-TIS-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0eea2c3205d9d38e6118e8c97bebae0a87674054 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 11 Jan 2017 12:30:10 -0500 -Subject: [PATCH] Add TIS patch - ---- - SPECS/puppet-openstacklib.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-openstacklib.spec b/SPECS/puppet-openstacklib.spec -index 0ed0c1d..38faf85 100644 ---- a/SPECS/puppet-openstacklib.spec -+++ b/SPECS/puppet-openstacklib.spec -@@ -8,6 +8,7 @@ License: ASL 2.0 - URL: https://launchpad.net/puppet-openstacklib - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz -+Patch0001: 0001-Roll-up-TIS-patches.patch - - BuildArch: noarch - -@@ -24,6 +25,7 @@ Puppet OpenStack Libraries - - %prep - %setup -q -n openstack-openstacklib-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-Add-os-region-name-option-for-system-controller.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-Add-os-region-name-option-for-system-controller.patch deleted file mode 100644 index 9117762a9..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-Add-os-region-name-option-for-system-controller.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d41dc6c9dcf6e0fbf5ef82f0aaf4e951699aa13c Mon Sep 17 00:00:00 2001 -From: Tao Liu -Date: Wed, 21 Feb 2018 13:42:58 -0600 -Subject: [PATCH 1/1] Add os region name option for system controller - ---- - SPECS/puppet-openstacklib.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-openstacklib.spec b/SPECS/puppet-openstacklib.spec -index 9622492..1a42722 100644 ---- a/SPECS/puppet-openstacklib.spec -+++ b/SPECS/puppet-openstacklib.spec -@@ -9,6 +9,7 @@ URL: https://launchpad.net/puppet-openstacklib - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch -+Patch0002: 0002-Add-os-region-name-option-for-system-controller.patch - - BuildArch: noarch - -@@ -26,6 +27,7 @@ Puppet OpenStack Libraries - %prep - %setup -q -n openstack-openstacklib-%{upstream_version} - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-update-for-openstackclient-Train.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-update-for-openstackclient-Train.patch deleted file mode 100644 index 0d2df81e7..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0003-update-for-openstackclient-Train.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d977fad6b6844de7a22ab62e7456f27c95a56a64 Mon Sep 17 00:00:00 2001 -From: chenyan -Date: Thu, 26 Mar 2020 16:17:19 +0800 -Subject: [PATCH] update for openstackclient Train - -Signed-off-by: chenyan ---- - SPECS/puppet-openstacklib.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-openstacklib.spec b/SPECS/puppet-openstacklib.spec -index ce3957f..9f42722 100644 ---- a/SPECS/puppet-openstacklib.spec -+++ b/SPECS/puppet-openstacklib.spec -@@ -9,6 +9,7 @@ URL: https://launchpad.net/puppet-openstacklib - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch -+Patch0002: 0002-update-for-openstackclient-Train.patch - - BuildArch: noarch - -@@ -26,6 +27,7 @@ Puppet OpenStack Libraries - %prep - %setup -q -n openstack-openstacklib-%{upstream_version} - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.17.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0004-distributed-keystone-in-system-controller.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0004-distributed-keystone-in-system-controller.patch deleted file mode 100644 index 4e52b6572..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/0004-distributed-keystone-in-system-controller.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fc863dbafa9014e6ea48b94cc9dcfa4e939245d8 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Fri, 11 May 2018 11:02:49 -0400 -Subject: [PATCH] Add region name for distributed keystone in system controller - ---- - SPECS/puppet-openstacklib.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-openstacklib.spec b/SPECS/puppet-openstacklib.spec -index 1a42722..399712f 100644 ---- a/SPECS/puppet-openstacklib.spec -+++ b/SPECS/puppet-openstacklib.spec -@@ -10,6 +10,7 @@ URL: https://launchpad.net/puppet-openstacklib - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Add-os-region-name-option-for-system-controller.patch -+Patch0003: 0003-distributed-keystone-for-system-controller.patch - - BuildArch: noarch - -@@ -28,6 +29,7 @@ Puppet OpenStack Libraries - %setup -q -n openstack-openstacklib-%{upstream_version} - %patch0001 -p1 - %patch0002 -p1 -+%patch0003 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 5e5b78ce3..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-patch.patch -0003-update-for-openstackclient-Train.patch diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0001-Roll-up-TIS-patches.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0001-Roll-up-TIS-patches.patch deleted file mode 100644 index 9f0328c40..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0001-Roll-up-TIS-patches.patch +++ /dev/null @@ -1,85 +0,0 @@ -From be4aad7589bc63f90b98b7d5692701a8368f8b04 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 11 Mar 2019 07:55:54 -0500 -Subject: [PATCH 1/3] Roll up TIS patches - ---- - lib/puppet/provider/openstack.rb | 1 + - lib/puppet/provider/openstack/auth.rb | 16 ++++++++++++++-- - lib/puppet/provider/openstack/credentials.rb | 2 -- - 3 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/lib/puppet/provider/openstack.rb b/lib/puppet/provider/openstack.rb -index 0240ce4..8b8e564 100644 ---- a/lib/puppet/provider/openstack.rb -+++ b/lib/puppet/provider/openstack.rb -@@ -45,6 +45,7 @@ class Puppet::Provider::Openstack < Puppet::Provider - begin - action = args[1] - Timeout.timeout(command_timeout(action)) do -+ args.unshift('--os-interface', 'internal') - openstack_command *args - end - rescue Timeout::Error -diff --git a/lib/puppet/provider/openstack/auth.rb b/lib/puppet/provider/openstack/auth.rb -index 743071d..4026aec 100644 ---- a/lib/puppet/provider/openstack/auth.rb -+++ b/lib/puppet/provider/openstack/auth.rb -@@ -1,9 +1,19 @@ - #require 'puppet/provider/openstack/credentials' - require File.join(File.dirname(__FILE__), '..','..','..', 'puppet/provider/openstack/credentials') -+require 'hiera_puppet' - - module Puppet::Provider::Openstack::Auth - -- RCFILENAME = "#{ENV['HOME']}/openrc" -+ RCFILENAME = "/etc/platform/openrc" -+ -+ def lookup_hiera(key) -+ HieraPuppet.lookup(key, :undef, self, nil, :priority) -+ end -+ -+ def get_admin_password -+ value=lookup_hiera('keystone::admin_password') -+ return value -+ end - - def get_os_vars_from_env - env = {} -@@ -17,7 +27,7 @@ module Puppet::Provider::Openstack::Auth - unless rcfile.nil? - File.open(rcfile).readlines.delete_if{|l| l=~ /^#|^$/ }.each do |line| - # we only care about the OS_ vars from the file LP#1699950 -- if line =~ /OS_/ -+ if line =~ /OS_/ and line.include?('=') - key, value = line.split('=') - key = key.split(' ').last - value = value.chomp.gsub(/'/, '') -@@ -38,6 +48,8 @@ module Puppet::Provider::Openstack::Auth - unless @credentials.set? - @credentials.unset - set_credentials(@credentials, get_os_vars_from_rcfile(rc_filename)) -+ # retrieves the password from hiera data since keyring is not yet available -+ @credentials.password = get_admin_password - end - unless @credentials.set? - raise(Puppet::Error::OpenstackAuthInputError, 'Insufficient credentials to authenticate') -diff --git a/lib/puppet/provider/openstack/credentials.rb b/lib/puppet/provider/openstack/credentials.rb -index 2765b2b..9c831e3 100644 ---- a/lib/puppet/provider/openstack/credentials.rb -+++ b/lib/puppet/provider/openstack/credentials.rb -@@ -70,11 +70,9 @@ class Puppet::Provider::Openstack::CredentialsV3 < Puppet::Provider::Openstack:: - :domain_id, - :domain_name, - :key, -- :project_domain_id, - :project_domain_name, - :project_id, - :trust_id, -- :user_domain_id, - :user_domain_name, - :user_id - ] --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0002-update-for-openstackclient-Train.patch b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0002-update-for-openstackclient-Train.patch deleted file mode 100644 index d40f65c48..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/patches/0002-update-for-openstackclient-Train.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f3769af45374b58ec9698a73676cbe088c112ac1 Mon Sep 17 00:00:00 2001 -From: chenyan -Date: Fri, 27 Mar 2020 10:48:23 +0800 -Subject: [PATCH] update for openstackclient Train - -Signed-off-by: chenyan ---- - lib/puppet/provider/openstack/credentials.rb | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/puppet/provider/openstack/credentials.rb b/lib/puppet/provider/openstack/credentials.rb -index 9c831e3..f43da5b 100644 ---- a/lib/puppet/provider/openstack/credentials.rb -+++ b/lib/puppet/provider/openstack/credentials.rb -@@ -5,7 +5,7 @@ class Puppet::Provider::Openstack::Credentials - - KEYS = [ - :auth_url, :password, :project_name, :username, -- :token, :url, -+ :token, :endpoint, :url, - :identity_api_version, - :region_name, - :interface -@@ -28,7 +28,7 @@ class Puppet::Provider::Openstack::Credentials - end - - def service_token_set? -- return true if @token && @url -+ return true if (@token && @endpoint) || (@token && @url) - end - - def to_env --- -2.17.1 - diff --git a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/srpm_path b/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/srpm_path deleted file mode 100644 index f5c0ad0fd..000000000 --- a/config/puppet-modules/openstack/puppet-openstacklib-11.3.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-openstacklib-11.5.0-1.el7.src.rpm diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/build_srpm.data b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 7a88f3d5c..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3f11515f1f5c95bba34be6148d21b4a31d413a05 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 11:44:56 -0400 -Subject: [PATCH 1/2] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/puppet-oslo.spec ---- - SPECS/puppet-oslo.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-oslo.spec b/SPECS/puppet-oslo.spec -index 2c7bdad..2b89be7 100644 ---- a/SPECS/puppet-oslo.spec -+++ b/SPECS/puppet-oslo.spec -@@ -1,7 +1,7 @@ - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} - Name: puppet-oslo - Version: 11.3.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Puppet module for managing Oslo.* library - License: ASL 2.0 - --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0002-Add-WRS-patch.patch b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0002-Add-WRS-patch.patch deleted file mode 100644 index adfdd8bde..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0002-Add-WRS-patch.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c1099550e41a13e84ed2822a0826bae2e9bcb9d9 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 11:44:56 -0400 -Subject: [PATCH 2/2] WRS: 0002-Add-WRS-patch.patch - ---- - SPECS/puppet-oslo.spec | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/SPECS/puppet-oslo.spec b/SPECS/puppet-oslo.spec -index 2b89be7..d2d6331 100644 ---- a/SPECS/puppet-oslo.spec -+++ b/SPECS/puppet-oslo.spec -@@ -9,6 +9,8 @@ URL: https://launchpad.net/puppet-oslo - - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - -+Patch0001: 0001-Remove-log_dir-from-conf-files.patch -+ - BuildArch: noarch - - Requires: puppet-inifile -@@ -22,6 +24,8 @@ Puppet module for managing Oslo.* library - %prep - %setup -q -n openstack-oslo-%{upstream_version} - -+%patch0001 -p1 -+ - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + - find . \( -name "*.pl" -o -name "*.sh" \) -exec chmod +x {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0003-psycopg2-drivername-for-postgres.patch b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0003-psycopg2-drivername-for-postgres.patch deleted file mode 100644 index 930f4670c..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/0003-psycopg2-drivername-for-postgres.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4291fe6a18127e1169f4364b1f2e934ab06dc86b Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 14 Dec 2017 11:10:05 -0600 -Subject: [PATCH] psycopg2 drivername for postgres - ---- - SPECS/puppet-oslo.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-oslo.spec b/SPECS/puppet-oslo.spec -index 65bd995..9802ecc 100644 ---- a/SPECS/puppet-oslo.spec -+++ b/SPECS/puppet-oslo.spec -@@ -10,6 +10,7 @@ URL: https://launchpad.net/puppet-oslo - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - - Patch0001: 0001-Remove-log_dir-from-conf-files.patch -+Patch0002: 0002-add-psycopg2-drivername-to-postgresql-settings.patch - - BuildArch: noarch - -@@ -25,6 +26,7 @@ Puppet module for managing Oslo.* library - %setup -q -n openstack-oslo-%{upstream_version} - - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 4030bb1ca..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-WRS-patch.patch -0003-psycopg2-drivername-for-postgres.patch diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0001-Remove-log_dir-from-conf-files.patch b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0001-Remove-log_dir-from-conf-files.patch deleted file mode 100644 index 3443b2e12..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0001-Remove-log_dir-from-conf-files.patch +++ /dev/null @@ -1,36 +0,0 @@ -From b8dee2da527c3d3010e2b5b4e49f87f430afa826 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Fri, 3 Nov 2017 17:48:38 -0500 -Subject: [PATCH] Remove log_dir from conf files - ---- - manifests/log.pp | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/manifests/log.pp b/manifests/log.pp -index 8778d46..771a674 100644 ---- a/manifests/log.pp -+++ b/manifests/log.pp -@@ -27,9 +27,7 @@ - # Defaults to $::os_service_default - # - # [*log_dir*] --# (Optional) Directory where logs should be stored. --# If set to $::os_service_default, it will not log to any directory. --# Defaults to $::os_service_default -+# WRS: Remove log_dir to ensure services log via syslog - # - # [*watch_log_file*] - # (Optional) Uses logging handler designed to watch file system (boolean value). -@@ -136,7 +134,7 @@ define oslo::log( - 'DEFAULT/log_config_append' => { value => $log_config_append }, - 'DEFAULT/log_date_format' => { value => $log_date_format }, - 'DEFAULT/log_file' => { value => $log_file }, -- 'DEFAULT/log_dir' => { value => $log_dir }, -+ 'DEFAULT/log_dir' => { ensure => absent }, - 'DEFAULT/watch_log_file' => { value => $watch_log_file }, - 'DEFAULT/use_syslog' => { value => $use_syslog }, - 'DEFAULT/syslog_log_facility' => { value => $syslog_log_facility }, --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0002-add-psycopg2-drivername-to-postgresql-settings.patch b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0002-add-psycopg2-drivername-to-postgresql-settings.patch deleted file mode 100644 index 7340a067b..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0002-add-psycopg2-drivername-to-postgresql-settings.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1823423c329675a72ea5b3497c31f8c407dcdf27 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 14 Dec 2017 11:08:30 -0600 -Subject: [PATCH] add psycopg2 drivername to postgresql settings - ---- - manifests/db.pp | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/manifests/db.pp b/manifests/db.pp -index 172c8ae..4b918bc 100644 ---- a/manifests/db.pp -+++ b/manifests/db.pp -@@ -132,10 +132,13 @@ define oslo::db( - - if !is_service_default($connection) { - -- validate_re($connection, -- '^(sqlite|mysql(\+pymysql)?|postgresql|mongodb):\/\/(\S+:\S+@\S+\/\S+)?') -+ if $connection !~ '^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?' { -+ err{'invalid database connection parameter: $connection':} -+ } -+ # add psycopg2 drivername to postgresql if using driverless postgres setting -+ $real_connection = regsubst($connection,'^postgresql:','postgresql+psycopg2:') - -- case $connection { -+ case $real_connection { - /^mysql(\+pymysql)?:\/\//: { - require '::mysql::bindings' - require '::mysql::bindings::python' -@@ -145,7 +148,7 @@ define oslo::db( - $backend_package = false - } - } -- /^postgresql:\/\//: { -+ /^postgresql(\+psycopg2)?:\/\//: { - $backend_package = false - require '::postgresql::lib::python' - } -@@ -178,7 +181,7 @@ to connect to the database.") - $database_options = { - 'database/sqlite_synchronous' => { value => $sqlite_synchronous }, - 'database/backend' => { value => $backend }, -- 'database/connection' => { value => $connection, secret => true }, -+ 'database/connection' => { value => $real_connection, secret => true }, - 'database/slave_connection' => { value => $slave_connection, secret => true }, - 'database/mysql_sql_mode' => { value => $mysql_sql_mode }, - 'database/idle_timeout' => { value => $idle_timeout }, --- -1.8.3.1 - diff --git a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/srpm_path b/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/srpm_path deleted file mode 100644 index 825811329..000000000 --- a/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-oslo-11.3.0-1.el7.src.rpm diff --git a/config/puppet-modules/puppet-boolean-1.0.2/centos/build_srpm.data b/config/puppet-modules/puppet-boolean-1.0.2/centos/build_srpm.data deleted file mode 100644 index b9ab6e932..000000000 --- a/config/puppet-modules/puppet-boolean-1.0.2/centos/build_srpm.data +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX=puppet -MODULE=boolean -VERSION=1.0.2 - -GIT_SHA=22b726dd78b0a60a224cc7054aebbf28e9306f62 - -# Generic Copy routine -# Un-patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -#Patched -#COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-boolean-1.0.2/centos/puppet-boolean.spec b/config/puppet-modules/puppet-boolean-1.0.2/centos/puppet-boolean.spec deleted file mode 100644 index 666211252..000000000 --- a/config/puppet-modules/puppet-boolean-1.0.2/centos/puppet-boolean.spec +++ /dev/null @@ -1,39 +0,0 @@ -%global git_sha 22b726dd78b0a60a224cc7054aebbf28e9306f62 -%global module_dir boolean - -Name: puppet-boolean -Version: 1.0.2 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet Boolean module -License: Apache - -URL: https://github.com/adrienthebo/puppet-boolean - -Source0: %{name}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module to provide boolean parameters - -%prep -%setup -n %{name} - -find . -type f -name ".*" -exec rm {} + -find . -size 0 -exec rm {} + -find . \( -name "*.pl" -o -name "*.sh" \) -exec chmod +x {} + -find . \( -name "*.pp" -o -name "*.py" \) -exec chmod -x {} + -find . \( -name "*.rb" -o -name "*.erb" \) -exec chmod -x {} + -find . \( -name spec -o -name ext \) | xargs rm -rf - -%install -rm -rf %{buildroot} -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -rp * %{buildroot}/%{_datadir}/puppet/modules/%{module_dir}/ - -%files -%license %{_datadir}/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-create_resources/centos/build_srpm.data b/config/puppet-modules/puppet-create_resources/centos/build_srpm.data deleted file mode 100644 index 5340b0496..000000000 --- a/config/puppet-modules/puppet-create_resources/centos/build_srpm.data +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX=puppetlabs -MODULE=create_resources -VERSION=0.0.1 - -GIT_SHA=4639819a7f3a4fa9310d2ba583c63e467df7e2c3 - -# Generic Copy routine -# Un-patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -#Patched -#COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-create_resources/centos/puppet-create_resources.spec b/config/puppet-modules/puppet-create_resources/centos/puppet-create_resources.spec deleted file mode 100644 index 9ad58ff3d..000000000 --- a/config/puppet-modules/puppet-create_resources/centos/puppet-create_resources.spec +++ /dev/null @@ -1,32 +0,0 @@ -%global git_sha 4639819a7f3a4fa9310d2ba583c63e467df7e2c3 -%global prefix puppetlabs -%global module_dir create_resources - -Name: puppet-%{module_dir} -Version: 0.0.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet %{module_dir} module -License: Apache - -URL: https://github.com/puppetlabs/puppetlabs-create_resources - -Source0: %{prefix}-%{module_dir}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module to dynamically add resources to the catalog - -%prep -%autosetup -c %{module_dir} - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-dnsmasq/centos/build_srpm.data b/config/puppet-modules/puppet-dnsmasq/centos/build_srpm.data deleted file mode 100644 index 1fb03bba5..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/build_srpm.data +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX=puppet -MODULE=dnsmasq -VERSION=1.1.0 - -GIT_SHA=cff07e90890662972c97684a2baee964f68ff3ed - -#Patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-dnsmasq/centos/files/0001-puppet-dnsmasq-Kilo-quilt-patches.patch b/config/puppet-modules/puppet-dnsmasq/centos/files/0001-puppet-dnsmasq-Kilo-quilt-patches.patch deleted file mode 100644 index ff631ec66..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/files/0001-puppet-dnsmasq-Kilo-quilt-patches.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 7430149d3a7f1ab9f93ec863e55cdf6d96cd4f06 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 7 Jun 2016 10:22:23 -0400 -Subject: [PATCH] puppet-dnsmasq Kilo quilt patches - ---- - packstack/puppet/modules/dnsmasq/manifests/init.pp | 8 ++++++++ - packstack/puppet/modules/dnsmasq/manifests/params.pp | 7 +++++-- - packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb | 9 ++++++--- - 3 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/packstack/puppet/modules/dnsmasq/manifests/init.pp b/packstack/puppet/modules/dnsmasq/manifests/init.pp -index 176bec7..c61fd94 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/init.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/init.pp -@@ -258,6 +258,13 @@ - # If you don't want dnsmasq to read /etc/hosts, set this to true. - # Default: false - # -+# [*dhcp_hostsfile*] -+# Read DHCP host information from the specified file. The file contains -+# information about one host per line. The format of a line is the same -+# as text to the right of '=' in --dhcp-host. The advantage of storing -+# DHCP host information in this file is that it can be changed without -+# re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP. -+# - # [*addn_hosts*] - # If you want dnsmasq to read another file/s, as well as /etc/hosts, use this. - # It can be an array of files to read. See next option to manage these files with -@@ -457,6 +464,7 @@ class dnsmasq ( - $no_poll = params_lookup( 'no_poll' ), - $bind_interfaces = params_lookup( 'bind_interfaces' ), - $no_hosts = params_lookup( 'no_hosts' ), -+ $dhcp_hostsfile = params_lookup( 'dhcp_hostsfile' ), - $addn_hosts = params_lookup( 'addn_hosts' ), - $addn_hosts_dir = params_lookup( 'addn_hosts_dir' ), - $expand_hosts = params_lookup( 'expand_hosts' ), -diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp -index 5b8f02d..6dd5b96 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/params.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp -@@ -38,6 +38,7 @@ class dnsmasq::params { - - $process_user = $::operatingsystem ? { - /(?i:Debian|Ubuntu|Mint)/ => 'dnsmasq', -+ /(?i:wrlinux)/ => 'root', - default => 'nobody', - } - -@@ -62,7 +63,7 @@ class dnsmasq::params { - } - - $config_file_init = $::operatingsystem ? { -- /(?i:Debian|Ubuntu|Mint)/ => '/etc/default/dnsmasq', -+ /(?i:Debian|Ubuntu|Mint|wrlinux)/ => '/etc/default/dnsmasq', - default => '/etc/sysconfig/dnsmasq', - } - -@@ -90,6 +91,7 @@ class dnsmasq::params { - $no_poll = false - $bind_interfaces = false - $no_hosts = false -+ $dhcp_hostsfile = '' - $addn_hosts = '' - $addn_hosts_dir = '' - $expand_hosts = false -@@ -115,6 +117,7 @@ class dnsmasq::params { - } - $mx_target = '' - $localmx = false -+ $selfmx = false - $server = '' - $local = '' - $address = '' -@@ -151,7 +154,7 @@ class dnsmasq::params { - $version = 'present' - $absent = false - $disable = false -- $disableboot = false -+ $disableboot = true - - ### General module variables that can have a site or per module default - $monitor = false -diff --git a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -index 7bc4a03..ea5aa01 100644 ---- a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -+++ b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -@@ -3,12 +3,12 @@ - <% if scope.lookupvar('dnsmasq::port') != '' -%> - port=<%= scope.lookupvar('dnsmasq::port') %> - <% end -%> --<% if scope.lookupvar('dnsmasq::bool_domain_need') -%> --domain-needed --<% end -%> - <% if scope.lookupvar('dnsmasq::bool_bogus_priv') -%> - bogus-priv - <% end -%> -+<% if scope.lookupvar('dnsmasq::bool_domain_needed') -%> -+domain-needed -+<% end -%> - <% if scope.lookupvar('dnsmasq::bool_filterwin2k') -%> - filterwin2k - <% end -%> -@@ -33,6 +33,9 @@ bind-interfaces - <% if scope.lookupvar('dnsmasq::bool_no_hosts') -%> - no-hosts - <% end -%> -+<% if scope.lookupvar('dnsmasq::dhcp_hostsfile') != '' -%> -+dhcp-hostsfile=<%= scope.lookupvar('dnsmasq::dhcp_hostsfile') %> -+<% end -%> - <% if scope.lookupvar('dnsmasq::bool_expand_hosts') -%> - expand-hosts - <% end -%> --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-dnsmasq/centos/files/0002-Fixing-mismatched-permission-on-dnsmasq-conf.patch b/config/puppet-modules/puppet-dnsmasq/centos/files/0002-Fixing-mismatched-permission-on-dnsmasq-conf.patch deleted file mode 100644 index 40d422ea1..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/files/0002-Fixing-mismatched-permission-on-dnsmasq-conf.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b8308a495f853d066c5c0e5d2257a070b033f626 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Tue, 5 Jul 2016 16:46:28 -0400 -Subject: [PATCH] CGTS-4280: Fixing mismatched permission on dnsmasq.conf which - was set to 0640 when created from config_controller (controller-0) but was at - 0644 on controller-1 through application of this manifest. - ---- - packstack/puppet/modules/dnsmasq/manifests/params.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp -index 6dd5b96..6129b57 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/params.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp -@@ -51,7 +51,7 @@ class dnsmasq::params { - } - - $config_file_mode = $::operatingsystem ? { -- default => '0644', -+ default => '0640', - } - - $config_file_owner = $::operatingsystem ? { --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-dnsmasq/centos/files/0003-Support-management-of-tftp_max-option.patch b/config/puppet-modules/puppet-dnsmasq/centos/files/0003-Support-management-of-tftp_max-option.patch deleted file mode 100644 index 08341e813..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/files/0003-Support-management-of-tftp_max-option.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 017e2ed0c664fb8689f6a9c4352db740c2c39725 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 15 Sep 2016 16:49:48 -0400 -Subject: [PATCH] Support management of tftp_max option - ---- - packstack/puppet/modules/dnsmasq/manifests/init.pp | 4 ++++ - packstack/puppet/modules/dnsmasq/manifests/params.pp | 1 + - packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb | 3 +++ - 3 files changed, 8 insertions(+) - -diff --git a/packstack/puppet/modules/dnsmasq/manifests/init.pp b/packstack/puppet/modules/dnsmasq/manifests/init.pp -index c61fd94..b66ac17 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/init.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/init.pp -@@ -328,6 +328,9 @@ - # Enable dnsmasq's built-in TFTP server - # Default: false - # -+# [*tftp_max*] -+# Max tftp connections -+# - # [*tftp_secure*] - # Make the TFTP server more secure: with this set, only files owned by - # the user dnsmasq is running as will be send over the net. -@@ -476,6 +479,7 @@ class dnsmasq ( - $pxe_prompt_timeout = params_lookup( 'pxe_prompt_timeout' ), - $pxe_service = params_lookup( 'pxe_service' ), - $enable_tftp = params_lookup( 'enable_tftp' ), -+ $tftp_max = params_lookup( 'tftp_max' ), - $tftp_secure = params_lookup( 'tftp_secure' ), - $tftp_root = params_lookup( 'tftp_root' ), - $dhcp_lease_max = params_lookup( 'dhcp_lease_max' ), -diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp -index 6129b57..845e91e 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/params.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp -@@ -103,6 +103,7 @@ class dnsmasq::params { - $pxe_prompt_timeout = '60' - $pxe_service = '' - $enable_tftp = false -+ $tftp_max = '' - $tftp_secure = false - $tftp_root = '' - $dhcp_lease_max = '' -diff --git a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -index ea5aa01..6a6cbdf 100644 ---- a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -+++ b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -@@ -60,6 +60,9 @@ pxe-service=<%= scope.lookupvar('dnsmasq::pxe_service') %> - <% if scope.lookupvar('dnsmasq::bool_enable_tftp') -%> - enable-tftp - <% end -%> -+<% if scope.lookupvar('dnsmasq::tftp_max') != '' -%> -+tftp-max=<%= scope.lookupvar('dnsmasq::tftp_max') %> -+<% end -%> - <% if scope.lookupvar('dnsmasq::bool_tftp_secure') -%> - tftp-secure - <% end -%> --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-dnsmasq/centos/files/0004-Enable-clear-DNS-cache-on-reload.patch b/config/puppet-modules/puppet-dnsmasq/centos/files/0004-Enable-clear-DNS-cache-on-reload.patch deleted file mode 100644 index 65b677108..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/files/0004-Enable-clear-DNS-cache-on-reload.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 35fa3c673307db2ebed20c952817608fadd26fa6 Mon Sep 17 00:00:00 2001 -From: Tao Liu -Date: Thu, 22 Jun 2017 16:33:29 -0400 -Subject: [PATCH 1/1] Enable clear the DNS cache on reload - ---- - packstack/puppet/modules/dnsmasq/manifests/init.pp | 7 +++++++ - packstack/puppet/modules/dnsmasq/manifests/params.pp | 1 + - packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb | 3 +++ - 3 files changed, 11 insertions(+) - -diff --git a/packstack/puppet/modules/dnsmasq/manifests/init.pp b/packstack/puppet/modules/dnsmasq/manifests/init.pp -index b66ac17..93276bb 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/init.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/init.pp -@@ -211,6 +211,11 @@ - # bringing up the link unnecessarily. - # Default: true - # -+# [*clear_on_reload*] -+# Whenever /etc/resolv.conf is re-read or the upstream servers are set via -+# DBus, clear the DNS cache. -+# Default: true -+# - # [*filterwin2k*] - # Uncomment this to filter useless windows-originated DNS requests - # which can trigger dial-on-demand links needlessly. -@@ -460,6 +465,7 @@ class dnsmasq ( - $protocol = params_lookup( 'protocol' ), - $domain_needed = params_lookup( 'domain_needed' ), - $bogus_priv = params_lookup( 'bogus_priv' ), -+ $clear_on_reload = params_lookup( 'clear_on_reload' ), - $filterwin2k = params_lookup( 'filterwin2k' ), - $resolv_file = params_lookup( 'resolv_file' ), - $strict_order = params_lookup( 'strict_order' ), -@@ -531,6 +537,7 @@ class dnsmasq ( - - $bool_domain_needed=any2bool($domain_needed) - $bool_bogus_priv=any2bool($bogus_priv) -+ $bool_clear_on_reload=any2bool($clear_on_reload) - $bool_filterwin2k=any2bool($filterwin2k) - $bool_strict_order=any2bool($strict_order) - $bool_no_resolv=any2bool($no_resolv) -diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp -index 845e91e..4d8e70a 100644 ---- a/packstack/puppet/modules/dnsmasq/manifests/params.pp -+++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp -@@ -84,6 +84,7 @@ class dnsmasq::params { - - $domain_needed = true - $bogus_priv = true -+ $clear_on_reload = true - $filterwin2k = false - $resolv_file = '' - $strict_order = false -diff --git a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -index bb8d941..109b768 100644 ---- a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -+++ b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb -@@ -9,6 +9,9 @@ bogus-priv - <% if scope.lookupvar('dnsmasq::bool_domain_needed') -%> - domain-needed - <% end -%> -+<% if scope.lookupvar('dnsmasq::bool_clear_on_reload') -%> -+clear-on-reload -+<% end -%> - <% if scope.lookupvar('dnsmasq::bool_filterwin2k') -%> - filterwin2k - <% end -%> --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-dnsmasq/centos/puppet-dnsmasq.spec b/config/puppet-modules/puppet-dnsmasq/centos/puppet-dnsmasq.spec deleted file mode 100644 index fc1b2e414..000000000 --- a/config/puppet-modules/puppet-dnsmasq/centos/puppet-dnsmasq.spec +++ /dev/null @@ -1,43 +0,0 @@ -%global git_sha cff07e90890662972c97684a2baee964f68ff3ed -%global module_dir dnsmasq - -Name: puppet-dnsmasq -Version: 1.1.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet dnsmasq module -License: Apache - -URL: github.com/netmanagers/puppet-dnsmasq - -Source0: %{name}-%{git_sha}.tar.gz - -Patch0: 0001-puppet-dnsmasq-Kilo-quilt-patches.patch -Patch1: 0002-Fixing-mismatched-permission-on-dnsmasq-conf.patch -Patch2: 0003-Support-management-of-tftp_max-option.patch -Patch3: 0004-Enable-clear-DNS-cache-on-reload.patch - -BuildArch: noarch - -BuildRequires: python2-devel - -Requires: puppet-concat -Requires: puppet-puppi - -%description -A Puppet module for dnsmasq - -%prep -%setup -c %{module_dir} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -#%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/build_srpm.data b/config/puppet-modules/puppet-drbd-0.3.1/centos/build_srpm.data deleted file mode 100644 index c970cd8e1..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/build_srpm.data +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX=puppetlabs -MODULE=drbd -VERSION=0.3.1 - -GIT_SHA=496b3ba9cd74a2d12636f9e90a718739a5451169 - -#DRBD has quilt patches (stored as git patches) -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0001-TIS-Patches.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0001-TIS-Patches.patch deleted file mode 100644 index a27d0f353..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0001-TIS-Patches.patch +++ /dev/null @@ -1,377 +0,0 @@ -From 95c0ec5cb26efbe2c5dbf45df21518d8d1776be0 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 4 Jan 2017 12:15:53 -0500 -Subject: [PATCH] TIS Patches - -This patch rolls up the previous TIS patches, which includes: -1. CGTS-4787 Set DRBD service ensure parameter - -2. Updates to fix DRBD resync-rate and engineered parameters: - -There are several DRBD performance related parameters that must be set to -get reasonable resync performance, otherwise default resync throughput -is limited to 40MB/s. Note that user community has noted this limit -when they use default settings, or up-rev DRBD from 8.3, etc. Eg. they -realize they hit this limit despite having 10G link or better and faster -disks. - -The following parameters were added to puppet-drbd module for resource -file generation, in addition to: c-plan-ahead, c-fill-target, c-min-rate, -c-max-rate, currently engineered for dynamic resync-rates. - -disk section: -- 'resync-rate' (aka 'rate') was missed in the CentOS port from Kilo -- 'al-extents' set to 3389, set to a prime number. Increasing this improves - random write throughput. Could set a bit higher, but would need a study. - -net section: -- 'max-buffers' engineered to scale with supported MBps, setting too low - (eg., default setting) is a bottleneck on 10G link. Set this to - maximum settable value of 20000. Note this parm may be settable to - larger values in more current DRBD rev. If we need to support faster - disks, likely need to increase this proportionately. -- 'max-epoch-size' also set to 20000. DRBD tuning recommendation page - sets this the same as max-buffers. -- 'unplug-watermark' set to 16 based on DRBD tuning recommendations page -- 'sndbuf-size' set to 0 to auto-tune; historically default was too small -- 'rcvbuf-size' set to 0 to auto-tune ---- - manifests/init.pp | 11 ++-- - manifests/resource.pp | 93 +++++++++++++++++++++++++--- - manifests/resource/up.pp | 2 +- - manifests/service.pp | 2 +- - templates/header.res.erb | 53 ++++++++++++++-- - templates/primary-resource.res.erb | 2 +- - templates/primary-stacked-resource.res.erb | 2 +- - templates/resource.res.erb | 2 +- - templates/secondary-resource.res.erb | 2 +- - templates/secondary-stacked-resource.res.erb | 2 +- - 10 files changed, 148 insertions(+), 23 deletions(-) - -diff --git a/manifests/init.pp b/manifests/init.pp -index 09f7d48..76ce9c9 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -6,7 +6,8 @@ - # - class drbd( - $service_enable = true, -- $package_name = 'drbd8-utils', -+ $service_ensure = 'running', -+ $package_name = 'drbd-utils', - ) { - include ::drbd::service - -@@ -22,7 +23,7 @@ class drbd( - } - - File { -- mode => '0644', -+ mode => '0640', - owner => 'root', - group => 'root', - require => Package['drbd'], -@@ -45,8 +46,10 @@ class drbd( - # only allow files managed by puppet in this directory. - file { '/etc/drbd.d': - ensure => directory, -- mode => '0644', -- purge => true, -+ mode => '0640', -+ # Set purge to false so that it does not clear the dir -+ # when the 2nd drbd resource is added. -+ purge => false, - recurse => true, - force => true, - require => Package['drbd'], -diff --git a/manifests/resource.pp b/manifests/resource.pp -index af2ff77..10edc1a 100644 ---- a/manifests/resource.pp -+++ b/manifests/resource.pp -@@ -22,6 +22,10 @@ - # [ha_primary] If the resource is being applied on the primary host. - # [initial_setup] If this run is associated with the initial setup. Allows a user - # to only perform dangerous setup on the initial run. -+# [link_util] replication link network utilization percent -+# [link_speed] replication link network speed mbps -+# [num_parallel] number of parallel drbd filesystems to sync -+# [rtt_ms] round-trip-time milliseconds (i.e., ping between replication nodes) - define drbd::resource ( - $host1 = undef, - $host2 = undef, -@@ -39,7 +43,10 @@ define drbd::resource ( - $group = 'root', - $protocol = 'C', - $verify_alg = 'crc32c', -- $rate = false, -+ $link_util = false, -+ $link_speed = false, -+ $num_parallel = false, -+ $rtt_ms = false, - $net_parameters = false, - $manage = true, - $ha_primary = false, -@@ -47,6 +54,7 @@ define drbd::resource ( - $fs_type = 'ext4', - $mkfs_opts = '', - $disk = undef, -+ $handlers = false, - ) { - include ::drbd - -@@ -67,6 +75,75 @@ define drbd::resource ( - group => $group, - } - -+ if $link_util and $link_speed and $num_parallel and $rtt_ms { -+ # Engineer drbd variable sync rate parameters based on the following: -+ # https://blogs.linbit.com/p/128/drbd-sync-rate-controller/ -+ # https://blogs.linbit.com/p/443/drbd-sync-rate-controller-2/ -+ # Methodology adapted to account for replication link speed and parallelism. -+ -+ # Since there is no aggregate bandwidth control, prorate the drbd -+ # replication bandwidth based on parallelism. -+ # Based on experimentation, it seems generally better to set num_parallel -+ # to 1 and let DRBD auto-regulate its throughput. The end result is that -+ # multiple competing filesystems (i.e., on same disk device) already have -+ # their sync throughput reduced. -+ $mbps = $link_speed / $num_parallel -+ -+ # bandwidth delay product -+ $bdp_k = $mbps * $rtt_ms -+ -+ # engineer initial sync rate as percent of link bandwidth -+ $rate_M = floor($link_util * $mbps / 8 / 100) -+ $rate = "${rate_M}M" -+ -+ # engineer c_plan_ahead to default value (tenths) -+ # Documentation indicates this value OK even for 200 ms RTT. -+ $c_plan_ahead = 20 -+ -+ # engineer c_fill_target as 1*BDP (tune within 1x to 3x BDP; -+ # choose minimum value that saturates bandwidth) -+ $fill_target_k = floor(1 * $bdp_k) -+ $c_fill_target = "${fill_target_k}k" -+ -+ # engineer c_min_rate -- experimentally determined so DRBD is not -+ # throttled to a crawl even when there is minimal application IO. -+ # DRBD default is way too small. -+ $min_rate_M = 15 + floor($link_util * $mbps / 8 / 100 / 25) -+ $c_min_rate = "${min_rate_M}M" -+ -+ # engineer c_max_rate as percent of link bandwidth -+ $max_rate_M = floor($link_util * $mbps / 8 / 100) -+ $c_max_rate = "${max_rate_M}M" -+ -+ # various tuning settings to enable larger link bandwidth (eg, 10G) -+ # max_buffers should scale with MBps; set to maximum settable -+ $max_buffers = 20000 -+ $max_epoch_size = 20000 -+ $unplug_watermark = 16 -+ # sndbuf_size and rcvbuf_size should scale with mbps; set 0 to auto-tune -+ $sndbuf_size = 0 -+ $rcvbuf_size = 0 -+ # increase al_extents to improve random write throughput; set to prime number -+ $al_extents = 3389 -+ } else { -+ # disable variable sync rate -+ $c_plan_ahead = 0 -+ $c_fill_target = false -+ $c_min_rate = false -+ $c_max_rate = false -+ -+ # engineer fixed sync rate at 40 percent of 1G -+ $rate_M = floor(40 * 1000 / 8 / 100) -+ $rate = "${rate_M}M" -+ -+ $max_buffers = false -+ $max_epoch_size = false -+ $unplug_watermark = false -+ $sndbuf_size = false -+ $rcvbuf_size = false -+ $al_extents = false -+ } -+ - concat { "/etc/drbd.d/${name}.res": - mode => '0600', - require => [ -@@ -94,13 +171,13 @@ define drbd::resource ( - } - # Export our fragment for the clustered node - if $ha_primary and $cluster { -- @@concat::fragment { "${name} ${cluster} primary resource": -+ concat::fragment { "${name} ${cluster} primary resource": - target => "/etc/drbd.d/${name}.res", - content => template('drbd/resource.res.erb'), - order => '10', - } - } elsif $cluster { -- @@concat::fragment { "${name} ${cluster} secondary resource": -+ concat::fragment { "${name} ${cluster} secondary resource": - target => "/etc/drbd.d/${name}.res", - content => template('drbd/resource.res.erb'), - order => '20', -@@ -137,11 +214,11 @@ define drbd::resource ( - order => '99', - } - -- if $cluster { -- # Import cluster nodes -- Concat::Fragment <<| title == "${name} ${cluster} primary resource" |>> -- Concat::Fragment <<| title == "${name} ${cluster} secondary resource" |>> -- } -+# if $cluster { -+# # Import cluster nodes -+# Concat::Fragment <<| title == "${name} ${cluster} primary resource" |>> -+# Concat::Fragment <<| title == "${name} ${cluster} secondary resource" |>> -+# } - - # Due to a bug in puppet, defined() conditionals must be in a defined - # resource to be evaluated *after* the collector instead of before. -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index 7668792..b626f55 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -70,7 +70,7 @@ define drbd::resource::up ( - # ensure that the device is mounted - mount { $mountpoint: - ensure => mounted, -- atboot => false, -+ atboot => yes, - device => $device, - fstype => 'auto', - options => 'defaults,noauto', -diff --git a/manifests/service.pp b/manifests/service.pp -index de56b34..f9b217a 100644 ---- a/manifests/service.pp -+++ b/manifests/service.pp -@@ -1,6 +1,6 @@ - class drbd::service { - @service { 'drbd': -- ensure => running, -+ ensure => $drbd::service_ensure, - enable => $drbd::service_enable, - require => Package['drbd'], - restart => 'service drbd reload', -diff --git a/templates/header.res.erb b/templates/header.res.erb -index 2d785c4..a3256a3 100644 ---- a/templates/header.res.erb -+++ b/templates/header.res.erb -@@ -5,7 +5,32 @@ resource <%= @name %> { - disk <%= @disk %>; - meta-disk internal; - -+ disk { -+<% if @rate -%> -+ resync-rate <%= @rate %>; -+<% end -%> -+<% if @c_plan_ahead -%> -+ c-plan-ahead <%= @c_plan_ahead %>; -+<% end -%> -+<% if @c_fill_target -%> -+ c-fill-target <%= @c_fill_target %>; -+<% end -%> -+<% if @c_min_rate -%> -+ c-min-rate <%= @c_min_rate %>; -+<% end -%> -+<% if @c_max_rate -%> -+ c-max-rate <%= @c_max_rate %>; -+<% end -%> -+<% if @al_extents -%> -+ al-extents <%= @al_extents %>; -+<% end -%> -+ } -+ - net { -+ after-sb-0pri discard-zero-changes; -+ after-sb-1pri discard-secondary; -+ after-sb-2pri disconnect; -+ - cram-hmac-alg sha1; - <% if @secret -%> - shared-secret "<%= @secret %>"; -@@ -16,12 +41,32 @@ resource <%= @name %> { - <%= k %> <%= v %>; - <% end -%> - <% end -%> -- } - -- syncer { -+<% if @max_buffers -%> -+ max-buffers <%= @max_buffers %>; -+<% end -%> -+<% if @max_epoch_size -%> -+ max-epoch-size <%= @max_epoch_size %>; -+<% end -%> -+<% if @unplug_watermark -%> -+ unplug-watermark <%= @unplug_watermark %>; -+<% end -%> -+<% if @sndbuf_size -%> -+ sndbuf-size <%= @sndbuf_size %>; -+<% end -%> -+<% if @rcvbuf_size -%> -+ rcvbuf-size <%= @rcvbuf_size %>; -+<% end -%> -+<% if @verify_alg -%> - verify-alg <%= @verify_alg %>; --<% if @rate -%> -- rate <%= @rate %>; - <% end -%> - } - -+<% if @handlers -%> -+ handlers { -+<% @handlers.sort_by {|k, v| k}.each do |k, v| -%> -+ <%= k %> "<%= v %>"; -+<% end -%> -+ } -+<% end -%> -+ -diff --git a/templates/primary-resource.res.erb b/templates/primary-resource.res.erb -index f8af77e..6032fd2 100644 ---- a/templates/primary-resource.res.erb -+++ b/templates/primary-resource.res.erb -@@ -1,3 +1,3 @@ - on <%= @host1 %> { -- address <%= @ip1 %>:<%= @port %>; -+ address <%= IPAddr.new(@ip1).ipv6?() ? "ipv6 ["+@ip1+"]:"+@port : "ipv4 "+@ip1+":"+@port %>; - } -diff --git a/templates/primary-stacked-resource.res.erb b/templates/primary-stacked-resource.res.erb -index 7eb4dad..a22d8b3 100644 ---- a/templates/primary-stacked-resource.res.erb -+++ b/templates/primary-stacked-resource.res.erb -@@ -1,3 +1,3 @@ - stacked-on-top-of <%= @res1 %> { -- address <%= @ip1 %>:<%= @port %>; -+ address <%= IPAddr.new(ip1).ipv6?() ? "ipv6 ["+ip1+"]:"+port : "ipv4 "+ip1+":"+port %>; - } -diff --git a/templates/resource.res.erb b/templates/resource.res.erb -index 047877e..9dd4c4d 100644 ---- a/templates/resource.res.erb -+++ b/templates/resource.res.erb -@@ -1,3 +1,3 @@ - on <%= @hostname %> { -- address <%= @ipaddress %>:<%= @port %>; -+ address <%= IPAddr.new(ipaddress).ipv6?() ? "ipv6 ["+ipaddress+"]:"+@port : "ipv4 "+ipaddress+":"+port %>; - } -diff --git a/templates/secondary-resource.res.erb b/templates/secondary-resource.res.erb -index 678640a..cf2fd96 100644 ---- a/templates/secondary-resource.res.erb -+++ b/templates/secondary-resource.res.erb -@@ -1,3 +1,3 @@ - on <%= @host2 %> { -- address <%= @ip2 %>:<%= @port %>; -+ address <%= IPAddr.new(@ip2).ipv6?() ? "ipv6 ["+@ip2+"]:"+@port : "ipv4 "+@ip2+":"+@port %>; - } -diff --git a/templates/secondary-stacked-resource.res.erb b/templates/secondary-stacked-resource.res.erb -index 409a705..87d28f5 100644 ---- a/templates/secondary-stacked-resource.res.erb -+++ b/templates/secondary-stacked-resource.res.erb -@@ -1,3 +1,3 @@ - stacked-on-top-of <%= @res2 %> { -- address <%= @ip2 %>:<%= @port %>; -+ address <%= IPAddr.new(ip2).ipv6?() ? "ipv6 ["+ip2+"]:"+port : "ipv4 "+ip2+":"+port %>; - } --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0002-Disable-timeout-for-mkfs-command.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0002-Disable-timeout-for-mkfs-command.patch deleted file mode 100644 index e578dbed3..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0002-Disable-timeout-for-mkfs-command.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0c36ecaef39328e85f41ebe8164dc7da5949542a Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 11 Apr 2017 11:14:25 -0400 -Subject: [PATCH] Disable timeout for mkfs command - ---- - manifests/resource/up.pp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index b626f55..f9de8ab 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -54,6 +54,7 @@ define drbd::resource::up ( - } - exec { "drbd_format_volume_${name}": - command => "mkfs.${fs_type} ${mkfs_opts} ${device}", -+ timeout => 0, - refreshonly => true, - require => Exec["drbd_make_primary_${name}"], - before => $before, --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0003-drbd-parallel-to-serial-synchronization.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0003-drbd-parallel-to-serial-synchronization.patch deleted file mode 100644 index 49ad45a96..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0003-drbd-parallel-to-serial-synchronization.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a1186e3f68a338c575acdcf5cf41728a1b9ba2c1 Mon Sep 17 00:00:00 2001 -From: Angie Wang -Date: Mon, 29 May 2017 10:20:13 -0400 -Subject: [PATCH 1/1] drbd-parallel-to-serial-synchronization - ---- - manifests/resource.pp | 1 + - templates/header.res.erb | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/manifests/resource.pp b/manifests/resource.pp -index 10edc1a..d19ad8b 100644 ---- a/manifests/resource.pp -+++ b/manifests/resource.pp -@@ -47,6 +47,7 @@ define drbd::resource ( - $link_speed = false, - $num_parallel = false, - $rtt_ms = false, -+ $resync_after = undef, - $net_parameters = false, - $manage = true, - $ha_primary = false, -diff --git a/templates/header.res.erb b/templates/header.res.erb -index a3256a3..be53761 100644 ---- a/templates/header.res.erb -+++ b/templates/header.res.erb -@@ -9,6 +9,9 @@ resource <%= @name %> { - <% if @rate -%> - resync-rate <%= @rate %>; - <% end -%> -+<% if @resync_after -%> -+ resync-after <%= @resync_after %>; -+<% end -%> - <% if @c_plan_ahead -%> - c-plan-ahead <%= @c_plan_ahead %>; - <% end -%> --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0004-US-96914-reuse-existing-drbd-cinder-resource.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0004-US-96914-reuse-existing-drbd-cinder-resource.patch deleted file mode 100644 index 017387d21..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0004-US-96914-reuse-existing-drbd-cinder-resource.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 132fc324c633ee95ca9ac8d00fb27fe5c4df6a3a Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Tue, 30 May 2017 21:52:52 +0000 -Subject: [PATCH] US-96914 reuse existing drbd-cinder resource - -Trying to initialize and enable DRBD resource fails in "drbdadm -create-md" when the disk already contains meta data. In this case -"drbdadm adjust" should be called. ---- - manifests/resource/up.pp | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index f9de8ab..160c8c2 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -14,7 +14,7 @@ define drbd::resource::up ( - exec { "initialize DRBD metadata for ${name}": - command => "yes yes | drbdadm create-md ${name}", - onlyif => "test -e ${disk}", -- unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(Sync|Connected|WFConnection|StandAlone|Verify)')", -+ unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", - before => Service['drbd'], - require => [ - Exec['modprobe drbd'], -@@ -26,6 +26,7 @@ define drbd::resource::up ( - exec { "enable DRBD resource ${name}": - command => "drbdadm up ${name}", - onlyif => "drbdadm dstate ${name} | egrep -q '^(Diskless/|Unconfigured|Consistent)'", -+ unless => "drbdadm show-gi ${name} | grep 'meta-data: need apply-al'", - before => Service['drbd'], - require => [ - Exec["initialize DRBD metadata for ${name}"], -@@ -34,6 +35,16 @@ define drbd::resource::up ( - notify => Service['drbd'], - } - -+ exec { "reuse existing DRBD resoure ${name}": -+ command => "drbdadm adjust ${name}", -+ onlyif => "test -e ${disk} && (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", -+ before => Service['drbd'], -+ require => [ -+ Exec['modprobe drbd'], -+ Concat["/etc/drbd.d/${name}.res"], -+ ], -+ notify => Service['drbd'], -+ } - - # these resources should only be applied if we are configuring the - # primary node in our HA setup --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0005-Add-PausedSync-states-to-acceptable-cstate.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0005-Add-PausedSync-states-to-acceptable-cstate.patch deleted file mode 100644 index 453d46a10..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0005-Add-PausedSync-states-to-acceptable-cstate.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b575f4c50e8726c5f9b3227b37a4517c0bbde85c Mon Sep 17 00:00:00 2001 -From: Robert Church -Date: Fri, 2 Jun 2017 02:15:19 +0000 -Subject: [PATCH] Add PausedSync states to acceptable cstate to avoid metdata - creation - ---- - manifests/resource/up.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index 160c8c2..3e2fdac 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -14,7 +14,7 @@ define drbd::resource::up ( - exec { "initialize DRBD metadata for ${name}": - command => "yes yes | drbdadm create-md ${name}", - onlyif => "test -e ${disk}", -- unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", -+ unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(PausedSync|Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", - before => Service['drbd'], - require => [ - Exec['modprobe drbd'], --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch deleted file mode 100644 index 5c6aec170..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0e264e7ac2b311aa9b42b183660a07b7e4e36b11 Mon Sep 17 00:00:00 2001 -From: Jim Gauld -Date: Fri, 9 Jun 2017 14:58:23 -0400 -Subject: [PATCH 1/1] CGTS-7164: Add resource options cpu-mask to affine drbd - kernel threads - -This adds "options { cpu-mask ; }" section to DRBD resource -configuration if 'cpumask' hexstring is defined. This governs kernel -threads: drbd_w_, drbd_r_, drbd_a_. - -Related notes: -- if cpumask is not specified, the kernel threads drbd_w_, drbd_r_, - drbd_a_, and drbd_as_ are affined to individual cores, each - on a different core. - -- the remainder of the kernel threads are governed by kernel boot - argument kthread_cpus=. i.e., drbd-reissue, drbd_submit, - jbd2/drbd-8, drbd_as_. - -- the drbd_a_ and drbd_as_ show up when DRBD is duplex. - -- the drbd_a_ threads have SCHED_RR scheduling policy. ---- - manifests/resource.pp | 3 +++ - templates/header.res.erb | 6 ++++++ - 2 files changed, 9 insertions(+) - -diff --git a/manifests/resource.pp b/manifests/resource.pp -index d19ad8b..17e6142 100644 ---- a/manifests/resource.pp -+++ b/manifests/resource.pp -@@ -26,6 +26,8 @@ - # [link_speed] replication link network speed mbps - # [num_parallel] number of parallel drbd filesystems to sync - # [rtt_ms] round-trip-time milliseconds (i.e., ping between replication nodes) -+# [cpumask] cpu-affinity-mask for DRBD kernel threads (hexidecimal notation). -+# 0 means spread over all CPUs of the machine. - define drbd::resource ( - $host1 = undef, - $host2 = undef, -@@ -48,6 +50,7 @@ define drbd::resource ( - $num_parallel = false, - $rtt_ms = false, - $resync_after = undef, -+ $cpumask = false, - $net_parameters = false, - $manage = true, - $ha_primary = false, -diff --git a/templates/header.res.erb b/templates/header.res.erb -index be53761..df52544 100644 ---- a/templates/header.res.erb -+++ b/templates/header.res.erb -@@ -29,6 +29,12 @@ resource <%= @name %> { - <% end -%> - } - -+<% if @cpumask -%> -+ options { -+ cpu-mask <%= @cpumask %>; -+ } -+<% end -%> -+ - net { - after-sb-0pri discard-zero-changes; - after-sb-1pri discard-secondary; --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0007-Add-disk-by-path-test.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0007-Add-disk-by-path-test.patch deleted file mode 100644 index 1eb12f5fd..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0007-Add-disk-by-path-test.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 30ae8c86d9471980a0058823d6593e7548e19506 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 15 Jun 2017 17:34:30 -0400 -Subject: [PATCH] Add disk by-path test - ---- - manifests/resource/up.pp | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index 3e2fdac..ea379a8 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -8,6 +8,17 @@ define drbd::resource::up ( - $mountpoint, - $automount, - ) { -+ -+ # Ensure disk by-path link exists -+ exec { "test disk by-path for ${name}": -+ command => "udevadm settle", -+ unless => "test -e ${disk}", -+ before => Service['drbd'], -+ require => [ -+ Exec['modprobe drbd'] -+ ], -+ } -+ - # create metadata on device, except if resource seems already initalized. - # drbd is very tenacious about asking for aproval if there is data on the - # volume already. -@@ -18,6 +29,7 @@ define drbd::resource::up ( - before => Service['drbd'], - require => [ - Exec['modprobe drbd'], -+ Exec["test disk by-path for ${name}"], - Concat["/etc/drbd.d/${name}.res"], - ], - notify => Service['drbd'], -@@ -35,7 +47,7 @@ define drbd::resource::up ( - notify => Service['drbd'], - } - -- exec { "reuse existing DRBD resoure ${name}": -+ exec { "reuse existing DRBD resource ${name}": - command => "drbdadm adjust ${name}", - onlyif => "test -e ${disk} && (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", - before => Service['drbd'], --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0008-CGTS-7953-support-for-new-drbd-resources.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0008-CGTS-7953-support-for-new-drbd-resources.patch deleted file mode 100644 index 83067296a..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0008-CGTS-7953-support-for-new-drbd-resources.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a29598365183c10e4650088675a6e3181b340187 Mon Sep 17 00:00:00 2001 -From: Kristine Bujold -Date: Wed, 17 Jan 2018 18:18:15 -0500 -Subject: [PATCH 1/1] foo bar - ---- - manifests/init.pp | 2 ++ - templates/global_common.conf.erb | 5 +++++ - 2 files changed, 7 insertions(+) - -diff --git a/manifests/init.pp b/manifests/init.pp -index 76ce9c9..5e6bdc0 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -8,6 +8,8 @@ class drbd( - $service_enable = true, - $service_ensure = 'running', - $package_name = 'drbd-utils', -+ $wfc_timeout = 0, -+ $degr_wfc_timeout = 0, - ) { - include ::drbd::service - -diff --git a/templates/global_common.conf.erb b/templates/global_common.conf.erb -index 921a637..0253ef3 100644 ---- a/templates/global_common.conf.erb -+++ b/templates/global_common.conf.erb -@@ -3,4 +3,9 @@ global { - } - common { - protocol C; -+ -+ startup { -+ wfc-timeout <%= @wfc_timeout %>; -+ degr-wfc-timeout <%= @degr_wfc_timeout %>; -+ } - } --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0009-drbd-slow-before-swact.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0009-drbd-slow-before-swact.patch deleted file mode 100644 index f037d29fc..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0009-drbd-slow-before-swact.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2628193e8aef471caab27ada848fa8d7de6d93ec Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Wed, 13 Jun 2018 14:16:53 +0000 -Subject: [PATCH] drbd slow before swact - ---- - manifests/resource/up.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index c3557e1..11cf7ee 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -23,7 +23,7 @@ define drbd::resource::up ( - # drbd is very tenacious about asking for aproval if there is data on the - # volume already. - exec { "initialize DRBD metadata for ${name}": -- command => "yes yes | drbdadm create-md ${name}", -+ command => "yes yes | drbdadm create-md ${name} -W--peer-max-bio-size=128k", - onlyif => "test -e ${disk}", - unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(PausedSync|Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", - before => Service['drbd'], --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch deleted file mode 100644 index 3f1ff0939..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 65b4c4ca7da29d4d91f3d61c4dd1f59fb06aeada Mon Sep 17 00:00:00 2001 -From: Jim Gauld -Date: Wed, 28 Oct 2020 17:09:20 -0400 -Subject: [PATCH] Format DRBD resource cpu-mask to support 64 or larger cpus - -This changes the input format of DRBD resource config option -cpu-mask so it is correctly parsed in the kernel. The underlying -bitmap_parse routine expects large hex values delimited every 8 -characters with a comma. - -e.g., On large cpu systems, we would see the following kern.log : -2020-10-13T20:55:34.079 controller-0 kernel: warning [ 269.423462] drbd -drbd-dockerdistribution: Overflow in bitmap_parse(300000003), truncating -to 64 bits - -This resulted in drbd_w_* tasks affined to individual cores instead of -platform cores. - -Signed-off-by: Jim Gauld ---- - templates/header.res.erb | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/templates/header.res.erb b/templates/header.res.erb -index df52544..6ac837b 100644 ---- a/templates/header.res.erb -+++ b/templates/header.res.erb -@@ -31,7 +31,11 @@ resource <%= @name %> { - - <% if @cpumask -%> - options { -- cpu-mask <%= @cpumask %>; -+<%# To support 64 cpu systems or larger, need to format cpu-mask string -+with surrounding double quotes. Also must delimit the hex string in -+8 character groups starting from the right. This prevents DRBD kernel -+module bitmap_parse() routine from truncating input at 64 bits. -%> -+ cpu-mask "<%= @cpumask.reverse.scan(/.{1,8}/).join(',').reverse %>"; - } - <% end -%> - --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch deleted file mode 100644 index 14e8d91d8..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8106a9787d86901d4ed927838503ebe08bf2adcb Mon Sep 17 00:00:00 2001 -From: Felipe Sanches Zanoni -Date: Mon, 14 Feb 2022 12:01:30 -0500 -Subject: [PATCH] Fix DRBD cephmon resize - ---- - manifests/resource/up.pp | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp -index 11cf7ee..8d2f901 100644 ---- a/manifests/resource/up.pp -+++ b/manifests/resource/up.pp -@@ -19,18 +19,29 @@ define drbd::resource::up ( - ], - } - -+ # Ensure DRBD metadata is clear -+ exec { "apply-al DRBD metadata for ${name}": -+ command => "drbdadm apply-al ${name}", -+ onlyif => "drbdadm dump-md ${name} 2>&1 | egrep 'please apply-al'", -+ before => Service['drbd'], -+ require => [ -+ Exec['modprobe drbd'] -+ ], -+ } -+ - # create metadata on device, except if resource seems already initalized. - # drbd is very tenacious about asking for aproval if there is data on the - # volume already. - exec { "initialize DRBD metadata for ${name}": - command => "yes yes | drbdadm create-md ${name} -W--peer-max-bio-size=128k", -- onlyif => "test -e ${disk}", -+ onlyif => "test -e ${disk} && ! drbdadm dstate ${name}", - unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(PausedSync|Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", - before => Service['drbd'], - require => [ - Exec['modprobe drbd'], - Exec["test disk by-path for ${name}"], - Concat["/etc/drbd.d/${name}.res"], -+ Exec["apply-al DRBD metadata for ${name}"] - ], - notify => Service['drbd'], - } --- -2.29.2 - diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec b/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec deleted file mode 100644 index 78e9a4459..000000000 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec +++ /dev/null @@ -1,69 +0,0 @@ -%global git_sha 496b3ba9cd74a2d12636f9e90a718739a5451169 -%global prefix puppetlabs -%global module_dir drbd - -Name: puppet-%{module_dir} -Version: 0.3.1 -Release: rc0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet %{module_dir} module -License: Apache - -URL: https://github.com/puppetlabs/puppetlabs-drbd - -Source0: %{prefix}-%{module_dir}-%{git_sha}.tar.gz - -Patch0001: 0001-TIS-Patches.patch -Patch0002: 0002-Disable-timeout-for-mkfs-command.patch -Patch0003: 0003-drbd-parallel-to-serial-synchronization.patch -Patch0004: 0004-US-96914-reuse-existing-drbd-cinder-resource.patch -Patch0005: 0005-Add-PausedSync-states-to-acceptable-cstate.patch -Patch0006: 0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch -Patch0007: 0007-Add-disk-by-path-test.patch -Patch0008: 0008-CGTS-7953-support-for-new-drbd-resources.patch -Patch0009: 0009-drbd-slow-before-swact.patch -Patch0010: 0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch -Patch0011: 0011-Fix-DRBD-cephmon-resize.patch - -BuildArch: noarch - -BuildRequires: python2-devel - -# According to .fixtures.yml the following puppet modules are required -Requires: puppet-concat -Requires: puppet-stdlib - - -%description -A Puppet module for configuring drbd - -%prep -%setup -n puppetlabs-drbd - -find . -type f -name ".*" -exec rm {} + -find . -size 0 -exec rm {} + -find . \( -name "*.pl" -o -name "*.sh" \) -exec chmod +x {} + -find . \( -name "*.pp" -o -name "*.py" \) -exec chmod -x {} + -find . \( -name "*.rb" -o -name "*.erb" \) -exec chmod -x {} + -find . \( -name spec -o -name ext \) | xargs rm -rf - -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 -%patch0004 -p1 -%patch0005 -p1 -%patch0006 -p1 -%patch0007 -p1 -%patch0008 -p1 -%patch0009 -p1 -%patch0010 -p1 -%patch0011 -p1 - -%install -rm -rf %{buildroot} -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -rp * %{buildroot}/%{_datadir}/puppet/modules/%{module_dir}/ - -%files -%license %{_datadir}/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-filemapper/centos/build_srpm.data b/config/puppet-modules/puppet-filemapper/centos/build_srpm.data deleted file mode 100644 index fd48b94b1..000000000 --- a/config/puppet-modules/puppet-filemapper/centos/build_srpm.data +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX=puppet -MODULE=filemapper -VERSION=1.1.3 - -GIT_SHA=9b53310278e76827bbe12a36cc6470d77071abb2 - -# Generic Copy routine -# Un-patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -#Patched -#COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-filemapper/centos/puppet-filemapper.spec b/config/puppet-modules/puppet-filemapper/centos/puppet-filemapper.spec deleted file mode 100644 index 7becd5084..000000000 --- a/config/puppet-modules/puppet-filemapper/centos/puppet-filemapper.spec +++ /dev/null @@ -1,31 +0,0 @@ -%global git_sha 9b53310278e76827bbe12a36cc6470d77071abb2 -%global module_dir filemapper - -Name: puppet-filemapper -Version: 1.1.3 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet FileMapper module -License: Apache - -URL: https://github.com/voxpupuli/puppet-filemapper - -Source0: %{name}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -Puppet module to map files to resources and back - -%prep -%autosetup -c %{module_dir} - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/build_srpm.data b/config/puppet-modules/puppet-firewall-1.8.2/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 02cf8ded2..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cdaacdb829690f7ddfd73d9184b0ebbd24cf363c Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Fri, 29 Apr 2022 14:10:47 -0400 -Subject: [PATCH] Update package versioning for TIS format - -Signed-off-by: Steven Webster ---- - SPECS/puppet-firewall.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-firewall.spec b/SPECS/puppet-firewall.spec -index 6d42163..f5925f1 100644 ---- a/SPECS/puppet-firewall.spec -+++ b/SPECS/puppet-firewall.spec -@@ -8,7 +8,7 @@ - - Name: puppet-firewall - Version: 1.8.2 --Release: 2%{?alphatag}%{?dist} -+Release: 2.2f892e9git.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Manages Firewalls such as iptables - License: ASL 2.0 - --- -2.29.2 - diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0002-Add-support-for-random-fully-flag.patch b/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0002-Add-support-for-random-fully-flag.patch deleted file mode 100644 index 7ab89faf7..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/0002-Add-support-for-random-fully-flag.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5df5c090b1a87421f567cc2f79046ec4852f9597 Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Fri, 29 Apr 2022 14:57:50 -0400 -Subject: [PATCH] Add support for random fully flag - -Signed-off-by: Steven Webster ---- - SPECS/puppet-firewall.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-firewall.spec b/SPECS/puppet-firewall.spec -index f5925f1..87d0410 100644 ---- a/SPECS/puppet-firewall.spec -+++ b/SPECS/puppet-firewall.spec -@@ -15,6 +15,7 @@ License: ASL 2.0 - URL: http://github.com/puppetlabs/puppetlabs-firewall - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz -+Patch0001: 0001-Add-support-for-random-fully-flag.patch - - BuildArch: noarch - -@@ -25,6 +26,7 @@ Manages Firewalls such as iptables - - %prep - %setup -q -n %{upstream_name}-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.29.2 - diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index eee61027b..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-support-for-random-fully-flag.patch diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/patches/0001-Add-support-for-random-fully-flag.patch b/config/puppet-modules/puppet-firewall-1.8.2/centos/patches/0001-Add-support-for-random-fully-flag.patch deleted file mode 100644 index 732d74719..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/patches/0001-Add-support-for-random-fully-flag.patch +++ /dev/null @@ -1,225 +0,0 @@ -From e4db4b965cd00d295d2dac0802fef78d1d115c17 Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Mon, 2 May 2022 13:07:49 -0400 -Subject: [PATCH] Add support for random fully flag - -Enable puppet-firewall parsing of --random-fully rules - -A problem may occur if puppet attempts to inject a firewall rule -while the underlying iptables/ip6tables has existing rules which -use the --random-fully flag in the NAT table. - -The issue occurs because puppet-firewall first makes a call to -iptables-save/ip6tables-save to parse the existing rules -(to determine if the rule already exists). If it finds a rule -with --random-fully, it will immediately bail out. - -The current version(s) of puppet-firewall in StarlingX are old -enough that they don't have parsing logic for the --random-fully -flag that was initially supported in iptables version 1.6.2+. - -Now that StarlingX uses iptables 1.8.4, we must account for the -possibility that various components (ie. kubernetes) will make -use of --random-fully rules. - -This feature has been implemented upstream in the following commits: - -https://github.com/puppetlabs/puppetlabs-firewall/commits/ - -9a4bc6a81cf0cd4a56ba458fadac830a2c4df529 -0ea2b74c0b4a451a37bae8c2ff105b72481ab485 - -This commit ports back the above commits - -Signed-off-by: Steven Webster ---- - lib/puppet/provider/firewall/ip6tables.rb | 9 +++++- - lib/puppet/provider/firewall/iptables.rb | 12 +++++++- - lib/puppet/type/firewall.rb | 10 +++++++ - spec/acceptance/firewall_spec.rb | 32 ++++++++++++++++++++++ - spec/fixtures/ip6tables/conversion_hash.rb | 7 +++++ - 5 files changed, 68 insertions(+), 2 deletions(-) - -diff --git a/lib/puppet/provider/firewall/ip6tables.rb b/lib/puppet/provider/firewall/ip6tables.rb -index c8b3f64..cdb981a 100644 ---- a/lib/puppet/provider/firewall/ip6tables.rb -+++ b/lib/puppet/provider/firewall/ip6tables.rb -@@ -49,6 +49,11 @@ Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source = - mark_flag = '--set-xmark' - end - -+ kernelversion = Facter.value('kernelversion') -+ if (kernelversion && Puppet::Util::Package.versioncmp(kernelversion, '3.13') >= 0) && -+ (ip6tables_version && Puppet::Util::Package.versioncmp(ip6tables_version, '1.6.2') >= 0) -+ has_feature :random_fully -+ end - - def initialize(*args) - ip6tables_version = Facter.value('ip6tables_version') -@@ -109,6 +114,7 @@ Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source = - :proto => "-p", - :queue_num => "--queue-num", - :queue_bypass => "--queue-bypass", -+ :random_fully => "--random-fully", - :rdest => "--rdest", - :reap => "--reap", - :recent => "-m recent", -@@ -168,6 +174,7 @@ Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source = - :islastfrag, - :isfirstfrag, - :log_uid, -+ :random_fully, - :rsource, - :rdest, - :reap, -@@ -244,7 +251,7 @@ Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source = - :ctstate, :icmp, :hop_limit, :limit, :burst, :length, :recent, :rseconds, :reap, - :rhitcount, :rttl, :rname, :mask, :rsource, :rdest, :ipset, :string, :string_algo, - :string_from, :string_to, :jump, :clamp_mss_to_pmtu, :gateway, :todest, -- :tosource, :toports, :checksum_fill, :log_level, :log_prefix, :log_uid, :reject, :set_mss, :set_dscp, :set_dscp_class, :mss, :queue_num, :queue_bypass, -+ :tosource, :toports, :checksum_fill, :log_level, :log_prefix, :log_uid, :random_fully, :reject, :set_mss, :set_dscp, :set_dscp_class, :mss, :queue_num, :queue_bypass, - :set_mark, :match_mark, :connlimit_above, :connlimit_mask, :connmark, :time_start, :time_stop, :month_days, :week_days, :date_start, :date_stop, :time_contiguous, :kernel_timezone, - :src_cc, :dst_cc, :name] - -diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb -index b05ba43..767bdc0 100644 ---- a/lib/puppet/provider/firewall/iptables.rb -+++ b/lib/puppet/provider/firewall/iptables.rb -@@ -58,6 +58,12 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir - mark_flag = '--set-xmark' - end - -+ kernelversion = Facter.value('kernelversion') -+ if (kernelversion && Puppet::Util::Package.versioncmp(kernelversion, '3.13') >= 0) && -+ (iptables_version && Puppet::Util::Package.versioncmp(iptables_version, '1.6.2') >= 0) -+ has_feature :random_fully -+ end -+ - @protocol = "IPv4" - - @resource_map = { -@@ -102,6 +108,7 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir - :proto => "-p", - :queue_num => "--queue-num", - :queue_bypass => "--queue-bypass", -+ :random_fully => "--random-fully", - :random => "--random", - :rdest => "--rdest", - :reap => "--reap", -@@ -167,6 +174,7 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir - :clamp_mss_to_pmtu, - :isfragment, - :log_uid, -+ :random_fully, - :random, - :rdest, - :reap, -@@ -288,7 +296,7 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir - :string_from, :string_to, :jump, :goto, :clusterip_new, :clusterip_hashmode, - :clusterip_clustermac, :clusterip_total_nodes, :clusterip_local_node, :clusterip_hash_init, :queue_num, :queue_bypass, - :nflog_group, :nflog_prefix, :nflog_range, :nflog_threshold, :clamp_mss_to_pmtu, :gateway, -- :set_mss, :set_dscp, :set_dscp_class, :todest, :tosource, :toports, :to, :checksum_fill, :random, :log_prefix, -+ :set_mss, :set_dscp, :set_dscp_class, :todest, :tosource, :toports, :to, :checksum_fill, :random_fully, :random, :log_prefix, - :log_level, :log_uid, :reject, :set_mark, :match_mark, :mss, :connlimit_above, :connlimit_mask, :connmark, :time_start, :time_stop, - :month_days, :week_days, :date_start, :date_stop, :time_contiguous, :kernel_timezone, - :src_cc, :dst_cc, :name] -@@ -418,6 +426,8 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir - # only replace those -f that are not followed by an l to - # distinguish between -f and the '-f' inside of --tcp-flags. - values = values.sub(/\s-f(?!l)(?=.*--comment)/, ' -f true') -+ elsif bool == :random -+ values = values.sub(/#{resource_map[bool]}(\s|$)(?!"!")/, "#{resource_map[bool]} true") - else - # append `true` to booleans that are not already negated (followed by "!") - values = values.sub(/#{resource_map[bool]}(?! "!")/, "#{resource_map[bool]} true") -diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb -index 6deab2b..1637688 100644 ---- a/lib/puppet/type/firewall.rb -+++ b/lib/puppet/type/firewall.rb -@@ -67,6 +67,7 @@ Puppet::Type.newtype(:firewall) do - feature :string_matching, "String matching features" - feature :queue_num, "Which NFQUEUE to send packets to" - feature :queue_bypass, "If nothing is listening on queue_num, allow packets to bypass the queue" -+ feature :random_fully, "The ability to use --random-fully flag" - - # provider specific features - feature :iptables, "The provider provides iptables features." -@@ -569,6 +570,15 @@ Puppet::Type.newtype(:firewall) do - EOS - end - -+ newproperty(:random_fully, :required_features => :random_fully) do -+ desc <<-EOS -+ When using a jump value of "MASQUERADE", "DNAT", "REDIRECT", or "SNAT" -+ this boolean will enable randomized port mapping. -+ EOS -+ -+ newvalues(:true, :false) -+ end -+ - newproperty(:random, :required_features => :dnat) do - desc <<-EOS - When using a jump value of "MASQUERADE", "DNAT", "REDIRECT", or "SNAT" -diff --git a/spec/acceptance/firewall_spec.rb b/spec/acceptance/firewall_spec.rb -index 8eee85b..617ebe5 100644 ---- a/spec/acceptance/firewall_spec.rb -+++ b/spec/acceptance/firewall_spec.rb -@@ -2416,5 +2416,37 @@ describe 'firewall basics', docker: true do - end - end - -+ describe 'random-fully' do -+ supports_random_fully = if os[:family] == 'redhat' && os[:release].start_with?('8') -+ true -+ elsif os[:family] == 'debian' && os[:release].start_with?('10') -+ true -+ else -+ false -+ end -+ -+ before(:all) do -+ pp = <<-EOS -+ firewall { '901 - set random-fully': -+ table => 'nat', -+ chain => 'POSTROUTING', -+ jump => 'MASQUERADE', -+ random_fully => true, -+ } -+ EOS -+ apply_manifest(pp, :catch_failures => true) -+ end -+ -+ it 'adds random-fully rule', if: supports_random_fully do -+ shell('iptables-save') do |r| -+ expect(r.stdout).to match(%r{-A POSTROUTING -p tcp -m comment --comment "901 - set random-fully" -j MASQUERADE --random-fully}) -+ end -+ end -+ it 'adds rule without random-fully', unless: supports_random_fully do -+ shell('iptables-save') do |r| -+ expect(r.stdout).to match(%r{-A POSTROUTING -p tcp -m comment --comment "901 - set random-fully" -j MASQUERADE}) -+ end -+ end -+ end - - end -diff --git a/spec/fixtures/ip6tables/conversion_hash.rb b/spec/fixtures/ip6tables/conversion_hash.rb -index 8174875..ad94ac4 100644 ---- a/spec/fixtures/ip6tables/conversion_hash.rb -+++ b/spec/fixtures/ip6tables/conversion_hash.rb -@@ -33,6 +33,13 @@ ARGS_TO_HASH6 = { - :sport => ['547'], - :dport => ['546'], - }, -+ 'random-fully' => { -+ line: '-A KUBE-POSTROUTING -m comment --comment "kubernetes service traffic requiring SNAT" -j MASQUERADE --random-fully', -+ table: 'filter', -+ provider: 'ip6tables', -+ params: { -+ random_fully: 'true', -+ }, - } - } - --- -2.29.2 - diff --git a/config/puppet-modules/puppet-firewall-1.8.2/centos/srpm_path b/config/puppet-modules/puppet-firewall-1.8.2/centos/srpm_path deleted file mode 100644 index 929190fce..000000000 --- a/config/puppet-modules/puppet-firewall-1.8.2/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-firewall-1.8.2-2.2f892e9git.el7.src.rpm diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/build_srpm.data b/config/puppet-modules/puppet-haproxy-1.5.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index a3ce7e230..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 60166c6f060244ec2d1416d8a05d22fd6353424f Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 11:10:38 -0400 -Subject: [PATCH 1/2] WRS: 0001-Update-package-versioning-for-TIS-format.patch - ---- - SPECS/puppet-haproxy.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-haproxy.spec b/SPECS/puppet-haproxy.spec -index 7d4b215..afb20d5 100644 ---- a/SPECS/puppet-haproxy.spec -+++ b/SPECS/puppet-haproxy.spec -@@ -8,7 +8,7 @@ - - Name: puppet-haproxy - Version: 1.5.0 --Release: 4%{?alphatag}%{?dist} -+Release: 4.6ffcb07git.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Configures HAProxy servers and manages the configuration of backend member servers. - License: ASL 2.0 - --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0002-Add-TIS-patch.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0002-Add-TIS-patch.patch deleted file mode 100644 index 736d7c05f..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0002-Add-TIS-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 38e3d487daef2cfc9b820091cdb1290a8ffe0d2f Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 20 Mar 2017 11:10:38 -0400 -Subject: [PATCH 2/2] WRS: 0002-Add-TIS-patch.patch - ---- - SPECS/puppet-haproxy.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-haproxy.spec b/SPECS/puppet-haproxy.spec -index afb20d5..f58bd74 100644 ---- a/SPECS/puppet-haproxy.spec -+++ b/SPECS/puppet-haproxy.spec -@@ -15,6 +15,7 @@ License: ASL 2.0 - URL: https://github.com/puppetlabs/puppetlabs-haproxy - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz -+Patch0001: 0001-Roll-up-TIS-patches.patch - - BuildArch: noarch - -@@ -27,6 +28,7 @@ Configures HAProxy servers and manages the configuration of backend member serve - - %prep - %setup -q -n %{upstream_name}-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0003-disable-config-validation-prechecks.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0003-disable-config-validation-prechecks.patch deleted file mode 100644 index 581a5b987..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0003-disable-config-validation-prechecks.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8a01ac3f649282ade4c136a2c1cb1b8bbbab28de Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Fri, 26 May 2017 17:18:23 -0400 -Subject: [PATCH] 0003-disable-config-validation-prechecks - ---- - SPECS/puppet-haproxy.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-haproxy.spec b/SPECS/puppet-haproxy.spec -index f58bd74..106ae3e 100644 ---- a/SPECS/puppet-haproxy.spec -+++ b/SPECS/puppet-haproxy.spec -@@ -16,6 +16,7 @@ URL: https://github.com/puppetlabs/puppetlabs-haproxy - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch -+Patch0002: 0002-disable-config-validation-prechecks.patch - - BuildArch: noarch - -@@ -29,6 +30,7 @@ Configures HAProxy servers and manages the configuration of backend member serve - %prep - %setup -q -n %{upstream_name}-%{upstream_version} - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0004-Add-global_options-patch.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0004-Add-global_options-patch.patch deleted file mode 100644 index d8da9fb18..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0004-Add-global_options-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 62ba2a5aa0e9e254f65976a26f9b1b5751cddb47 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Sun, 24 Sep 2017 00:15:51 -0400 -Subject: [PATCH] Add global_options patch - ---- - SPECS/puppet-haproxy.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-haproxy.spec b/SPECS/puppet-haproxy.spec -index 106ae3e..fb11c75 100644 ---- a/SPECS/puppet-haproxy.spec -+++ b/SPECS/puppet-haproxy.spec -@@ -17,6 +17,7 @@ URL: https://github.com/puppetlabs/puppetlabs-haproxy - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-disable-config-validation-prechecks.patch -+Patch0003: 0003-Fix-global_options-log-default-value.patch - - BuildArch: noarch - -@@ -31,6 +32,7 @@ Configures HAProxy servers and manages the configuration of backend member serve - %setup -q -n %{upstream_name}-%{upstream_version} - %patch0001 -p1 - %patch0002 -p1 -+%patch0003 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0005-Stop-invalid-warning-message.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0005-Stop-invalid-warning-message.patch deleted file mode 100644 index 912015d3b..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/0005-Stop-invalid-warning-message.patch +++ /dev/null @@ -1,33 +0,0 @@ -From da48355594342a9f9cb9afd2936aeef0651f008e Mon Sep 17 00:00:00 2001 -From: zhipengl -Date: Fri, 7 Sep 2018 19:02:21 +0800 -Subject: [PATCH] 0005-Stop-invalid-warning-message - -Signed-off-by: zhipengl ---- - SPECS/puppet-haproxy.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-haproxy.spec b/SPECS/puppet-haproxy.spec -index fb11c75..1b671aa 100644 ---- a/SPECS/puppet-haproxy.spec -+++ b/SPECS/puppet-haproxy.spec -@@ -18,6 +18,7 @@ Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit} - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-disable-config-validation-prechecks.patch - Patch0003: 0003-Fix-global_options-log-default-value.patch -+Patch0004: 0004-Stop-invalid-warning-message - - BuildArch: noarch - -@@ -33,6 +34,7 @@ Configures HAProxy servers and manages the configuration of backend member serve - %patch0001 -p1 - %patch0002 -p1 - %patch0003 -p1 -+%patch0004 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 84b9ea0d9..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,6 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-patch.patch -0003-disable-config-validation-prechecks.patch -0004-Add-global_options-patch.patch -0005-Stop-invalid-warning-message.patch - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0001-Roll-up-TIS-patches.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0001-Roll-up-TIS-patches.patch deleted file mode 100644 index 15b3575d6..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0001-Roll-up-TIS-patches.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4485b6cbf5a8bf1d3830b0406685aba3ece4e413 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 11 Jan 2017 13:05:12 -0500 -Subject: [PATCH] Roll up TIS patches - ---- - manifests/config.pp | 4 ++-- - manifests/init.pp | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/manifests/config.pp b/manifests/config.pp -index 51c2741..4007bb8 100644 ---- a/manifests/config.pp -+++ b/manifests/config.pp -@@ -75,8 +75,8 @@ define haproxy::config ( - if $_global_options['chroot'] { - file { $_global_options['chroot']: - ensure => directory, -- owner => $_global_options['user'], -- group => $_global_options['group'], -+ owner => 'root', -+ group => 'root', - } - } - } -diff --git a/manifests/init.pp b/manifests/init.pp -index f1109d0..54a1640 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -110,8 +110,8 @@ - class haproxy ( - $package_ensure = 'present', - $package_name = $haproxy::params::package_name, -- $service_ensure = 'running', -- $service_manage = true, -+ $service_ensure = false, -+ $service_manage = false, - $service_options = $haproxy::params::service_options, - $sysconfig_options = $haproxy::params::sysconfig_options, - $global_options = $haproxy::params::global_options, --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0002-disable-config-validation-prechecks.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0002-disable-config-validation-prechecks.patch deleted file mode 100644 index 43c306749..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0002-disable-config-validation-prechecks.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 50ef964cc4f918982d2889610c5f6e7506741518 Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Fri, 26 May 2017 17:04:32 -0400 -Subject: [PATCH] disable configuration validation during haproxy manifest - apply since some files/options referenced in the configuration (such as for - TPM) may still be in flight while the haproxy manifest applies. This - validation option is a bit of an overkill anyways since it doesn't cause - Packstack to fail the manifest application, and is a soft error log but with - the added disadvantage of not applying any haproxy configuration (even the - sane bits) on a validation failure - ---- - manifests/config.pp | 8 -------- - manifests/init.pp | 7 ------- - manifests/instance.pp | 7 ------- - manifests/params.pp | 1 - - 4 files changed, 23 deletions(-) - -diff --git a/manifests/config.pp b/manifests/config.pp -index 4007bb8..b8d4ef4 100644 ---- a/manifests/config.pp -+++ b/manifests/config.pp -@@ -8,7 +8,6 @@ define haproxy::config ( - $config_dir = undef, # A default is required for Puppet 2.7 compatibility. When 2.7 is no longer supported, this parameter default should be removed. - $custom_fragment = undef, # A default is required for Puppet 2.7 compatibility. When 2.7 is no longer supported, this parameter default should be removed. - $merge_options = $haproxy::merge_options, -- $config_validate_cmd = $haproxy::config_validate_cmd - ) { - - if $caller_module_name != $module_name { -@@ -50,13 +49,6 @@ define haproxy::config ( - mode => '0640', - } - -- # validate_cmd introduced in Puppet 3.5 -- if ((!defined('$::puppetversion') or (versioncmp($::puppetversion, '3.5') >= 0)) and (!defined('$::serverversion') or versioncmp($::serverversion, '3.5') >= 0)) { -- Concat[$_config_file] { -- validate_cmd => $config_validate_cmd, -- } -- } -- - # Simple Header - concat::fragment { "${instance_name}-00-header": - target => $_config_file, -diff --git a/manifests/init.pp b/manifests/init.pp -index 54a1640..d84755e 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -72,11 +72,6 @@ - # Optional. Path to the haproxy config file. - # Default depends on platform. - # --# [*config_validate_cmd*] --# Optional. Command used by concat validate_cmd to validate new --# config file concat is a valid haproxy config. --# Default /usr/sbin/haproxy -f % -c --# - # === Examples - # - # class { 'haproxy': -@@ -122,7 +117,6 @@ class haproxy ( - $config_dir = $haproxy::params::config_dir, - $config_file = $haproxy::params::config_file, - $manage_config_dir = $haproxy::params::manage_config_dir, -- $config_validate_cmd = $haproxy::params::config_validate_cmd, - - # Deprecated - $manage_service = undef, -@@ -183,7 +177,6 @@ class haproxy ( - merge_options => $merge_options, - service_options => $service_options, - sysconfig_options => $sysconfig_options, -- config_validate_cmd => $config_validate_cmd, - } - - } -diff --git a/manifests/instance.pp b/manifests/instance.pp -index 3dffdae..7f37751 100644 ---- a/manifests/instance.pp -+++ b/manifests/instance.pp -@@ -63,11 +63,6 @@ - # The parent directory will be created automatically. - # Defaults to undef. - # --# [*config_validate_cmd*] --# Command used by concat validate_cmd to validate new --# config file concat is a valid haproxy config. --# Default /usr/sbin/haproxy -f % -c --# - # === Examples - # - # A single instance of haproxy with all defaults -@@ -153,7 +148,6 @@ define haproxy::instance ( - $merge_options = $haproxy::params::merge_options, - $service_options = $haproxy::params::service_options, - $sysconfig_options = $haproxy::params::sysconfig_options, -- $config_validate_cmd = $haproxy::params::config_validate_cmd, - ) { - - if $service_ensure != true and $service_ensure != false { -@@ -208,7 +202,6 @@ define haproxy::instance ( - custom_fragment => $custom_fragment, - merge_options => $merge_options, - package_ensure => $package_ensure, -- config_validate_cmd => $config_validate_cmd, - } - haproxy::install { $title: - package_name => $package_name, -diff --git a/manifests/params.pp b/manifests/params.pp -index d7b9fa9..21e6bb0 100644 ---- a/manifests/params.pp -+++ b/manifests/params.pp -@@ -10,7 +10,6 @@ class haproxy::params { - - $service_options = "ENABLED=1\n" # Only used by Debian. - $sysconfig_options = 'OPTIONS=""' #Only used by Redhat/CentOS etc -- $config_validate_cmd = '/usr/sbin/haproxy -f % -c' - - case $::osfamily { - 'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse' : { --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0003-Fix-global_options-log-default-value.patch b/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0003-Fix-global_options-log-default-value.patch deleted file mode 100644 index 79d1e82ab..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0003-Fix-global_options-log-default-value.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 16163f14c8f9b1b81b6e394c31c72030938435c7 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 4 Sep 2018 20:01:53 +0800 -Subject: [PATCH] Fix global_options log default value - -Signed-off-by: zhipengl ---- - manifests/params.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/params.pp b/manifests/params.pp -index 21e6bb0..b29e427 100644 ---- a/manifests/params.pp -+++ b/manifests/params.pp -@@ -15,7 +15,7 @@ class haproxy::params { - 'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse' : { - $package_name = 'haproxy' - $global_options = { -- 'log' => "${::ipaddress} local0", -+ 'log' => 'global', - 'chroot' => '/var/lib/haproxy', - 'pidfile' => '/var/run/haproxy.pid', - 'maxconn' => '4000', --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0004-Stop-invalid-warning-message b/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0004-Stop-invalid-warning-message deleted file mode 100644 index 44c9b5220..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/patches/0004-Stop-invalid-warning-message +++ /dev/null @@ -1,31 +0,0 @@ -From 7e1cff1503d9980e6fa346ec0e9cb93dc69774bf Mon Sep 17 00:00:00 2001 -From: zhipengl -Date: Fri, 7 Sep 2018 19:24:01 +0800 -Subject: [PATCH] Stop-invalid-warning-message.patch - -It can fix config_controller failure at step 6. - -The upstream fix is at below link -https://github.com/puppetlabs/puppetlabs-haproxy/commit/20db4474c5938c21ac441f0092254c78b5978cc4 - -Signed-off-by: zhipengl ---- - manifests/frontend.pp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/manifests/frontend.pp b/manifests/frontend.pp -index 1623115..709a08c 100644 ---- a/manifests/frontend.pp -+++ b/manifests/frontend.pp -@@ -102,7 +102,7 @@ define haproxy::frontend ( - $defaults_use_backend = true, - $config_file = undef, - # Deprecated -- $bind_options = undef, -+ $bind_options = '', - ) { - if $ports and $bind { - fail('The use of $ports and $bind is mutually exclusive, please choose either one') --- -2.7.4 - diff --git a/config/puppet-modules/puppet-haproxy-1.5.0/centos/srpm_path b/config/puppet-modules/puppet-haproxy-1.5.0/centos/srpm_path deleted file mode 100644 index d270e8e79..000000000 --- a/config/puppet-modules/puppet-haproxy-1.5.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-haproxy-1.5.0-4.6ffcb07git.el7.src.rpm diff --git a/config/puppet-modules/puppet-ldap/centos/build_srpm.data b/config/puppet-modules/puppet-ldap/centos/build_srpm.data deleted file mode 100644 index 7ec09ccd8..000000000 --- a/config/puppet-modules/puppet-ldap/centos/build_srpm.data +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX=puppet -MODULE=ldap -VERSION=0.2.4 - -GIT_SHA=480f13af6d17d1d3fcf0dc7b4bd04b49fa4099e1 - -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-ldap/centos/puppet-ldap.spec b/config/puppet-modules/puppet-ldap/centos/puppet-ldap.spec deleted file mode 100644 index 0c6e39e91..000000000 --- a/config/puppet-modules/puppet-ldap/centos/puppet-ldap.spec +++ /dev/null @@ -1,30 +0,0 @@ -%global git_sha 480f13af6d17d1d3fcf0dc7b4bd04b49fa4099e1 -%global module_dir ldap - -Name: puppet-ldap -Version: 0.2.4 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet LDAP module -License: GPLv2 - -URL: https://github.com/torian/puppet-ldap - -Source0: %{name}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module to manage client and server configuration for OpenLdap - -%prep -%setup -n puppet-ldap-master - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R ../puppet-ldap-master/* %{buildroot}/%{_datadir}/puppet/modules/%{module_dir}/. - -%files -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-lvm/centos/build_srpm.data b/config/puppet-modules/puppet-lvm/centos/build_srpm.data deleted file mode 100644 index 98aa602b0..000000000 --- a/config/puppet-modules/puppet-lvm/centos/build_srpm.data +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX=puppetlabs -MODULE=lvm -VERSION=0.5.0 - -GIT_SHA=d0283da637ae24550fb4ba109a48ef8d5d8c8b84 - -#Patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-lvm/centos/files/0001-puppet-lvm-kilo-quilt-changes.patch b/config/puppet-modules/puppet-lvm/centos/files/0001-puppet-lvm-kilo-quilt-changes.patch deleted file mode 100644 index eaaa9a169..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0001-puppet-lvm-kilo-quilt-changes.patch +++ /dev/null @@ -1,694 +0,0 @@ -From b80e106ace391d88de683c3da5e03878ce1ffa1d Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 7 Jun 2016 10:36:17 -0400 -Subject: [PATCH] puppet-lvm kilo quilt changes - ---- - .../lvm/lib/puppet/provider/logical_volume/lvm.rb | 194 ++++++++++++++------- - .../lvm/lib/puppet/provider/physical_volume/lvm.rb | 2 +- - .../lvm/lib/puppet/provider/volume_group/lvm.rb | 60 ++++++- - .../modules/lvm/lib/puppet/type/logical_volume.rb | 32 +++- - .../puppet/modules/lvm/manifests/logical_volume.pp | 6 + - packstack/puppet/modules/lvm/manifests/volume.pp | 11 +- - .../puppet/provider/logical_volume/lvm_spec.rb | 55 +++--- - 7 files changed, 267 insertions(+), 93 deletions(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -index e813193..2f41695 100755 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -@@ -3,24 +3,56 @@ Puppet::Type.type(:logical_volume).provide :lvm do - - commands :lvcreate => 'lvcreate', - :lvremove => 'lvremove', -+ :lvresize => 'lvresize', - :lvextend => 'lvextend', - :lvs => 'lvs', -- :resize2fs => 'resize2fs', -+ :vgs => 'vgs', - :umount => 'umount', - :blkid => 'blkid', - :dmsetup => 'dmsetup', -+ :dd => 'dd', - :lvconvert => 'lvconvert', -- :lvdisplay => 'lvdisplay' -- -- optional_commands :xfs_growfs => 'xfs_growfs', -- :resize4fs => 'resize4fs' -+ :lvdisplay => 'lvdisplay', -+ :fsadm => 'fsadm', -+ :dd => 'dd' -+ -+ def round_to_extent(size) -+ lvm_size_units = { -+ "K" => 1**0, "M" => 1024**1, "G" => 1024**2, "T" => 1024**3, "P" => 1024**4, "E" => 1025**5, -+ } -+ -+ if @resource[:size] =~ /^([0-9]+(\.[0-9]+)?)([KMGTPE])/i -+ size_value = $1.to_f -+ size_unit = $3.upcase -+ size_kibi = (size_value * lvm_size_units[size_unit]).to_i -+ if vgs('--noheading', '-o', 'vg_extent_size', '--units', 'k', "#{@resource[:volume_group]}") =~ /\s+(\d+)\.\d+k/i -+ vg_extent_size_kibi = $1.to_i -+ end -+ new_size_kibi = ((size_kibi + vg_extent_size_kibi - 1) / vg_extent_size_kibi) * vg_extent_size_kibi -+ "#{new_size_kibi}k" -+ else -+ size -+ end -+ end - - def create - args = ['-n', @resource[:name]] - if @resource[:size] -- args.push('--size', @resource[:size]) -+ size = @resource[:size] -+ if size == 'max' -+ size = vgs('--noheading', '-o', 'vg_size', '--units', 'k', "#{@resource[:volume_group]}").strip -+ elsif @resource[:round_to_extent] then -+ size = round_to_extent(size) -+ end -+ args.push('--size', size) - elsif @resource[:initial_size] -- args.push('--size', @resource[:initial_size]) -+ args.push( -+ '--size', -+ if @resource[:round_to_extent] then -+ round_to_extent(@resource[:initial_size]) -+ else -+ @resource[:initial_size] -+ end) - end - if @resource[:extents] - args.push('--extents', @resource[:extents]) -@@ -63,6 +95,7 @@ Puppet::Type.type(:logical_volume).provide :lvm do - - args << @resource[:volume_group] - lvcreate(*args) -+ lvzero - end - - def destroy -@@ -75,9 +108,16 @@ Puppet::Type.type(:logical_volume).provide :lvm do - lvs(@resource[:volume_group]) =~ lvs_pattern - end - -+ def exec_cmd(*cmd) -+ output = Puppet::Util::Execution.execute(cmd, :failonfail => false, :combine => true) -+ {:out => output, :exit => $CHILD_STATUS.exitstatus} -+ end -+ - def size - if @resource[:size] =~ /^\d+\.?\d{0,2}([KMGTPE])/i - unit = $1.downcase -+ else -+ unit = 'k' - end - - raw = lvs('--noheading', '--unit', unit, path) -@@ -92,64 +132,87 @@ Puppet::Type.type(:logical_volume).provide :lvm do - end - - def size=(new_size) -- lvm_size_units = { "K" => 1, "M" => 1024, "G" => 1048576, "T" => 1073741824, "P" => 1099511627776, "E" => 1125899906842624 } -- lvm_size_units_match = lvm_size_units.keys().join('|') -+ lvm_size_units = { -+ "K" => 1**0, "M" => 1024**1, "G" => 1024**2, "T" => 1024**3, "P" => 1024**4, "E" => 1025**5, -+ } - -- resizeable = false -- current_size = size() -+ current_size = size() - -- if current_size =~ /(\d+\.{0,1}\d{0,2})(#{lvm_size_units_match})/i -- current_size_bytes = $1.to_i -- current_size_unit = $2.upcase -- end -+ if current_size =~ /^([0-9]+(\.[0-9]+)?)([KMGTPE])/i -+ current_size_value = $1.to_f -+ current_size_unit = $3.upcase -+ current_size = (current_size_value * lvm_size_units[current_size_unit]).to_i -+ end - -- if new_size =~ /(\d+)(#{lvm_size_units_match})/i -- new_size_bytes = $1.to_i -- new_size_unit = $2.upcase -- end -+ info( "Current: value=#{current_size_value}, unit=#{current_size_unit}, kibi=#{current_size}" ) - -- ## Get the extend size -- if lvs('--noheading', '-o', 'vg_extent_size', '--units', 'k', path) =~ /\s+(\d+)\.\d+k/i -- vg_extent_size = $1.to_i -- end -+ if new_size == 'max' -+ new_size = vgs('--noheading', '-o', 'vg_size', '--units', 'k', "#{@resource[:volume_group]}").strip -+ end - -- ## Verify that it's a extension: Reduce is potentially dangerous and should be done manually -- if lvm_size_units[current_size_unit] < lvm_size_units[new_size_unit] -- resizeable = true -- elsif lvm_size_units[current_size_unit] > lvm_size_units[new_size_unit] -- if (current_size_bytes * lvm_size_units[current_size_unit]) < (new_size_bytes * lvm_size_units[new_size_unit]) -- resizeable = true -- end -- elsif lvm_size_units[current_size_unit] == lvm_size_units[new_size_unit] -- if new_size_bytes > current_size_bytes -- resizeable = true -- end -- end -+ if new_size =~ /^([0-9]+(\.[0-9]+)?)([KMGTPE])/i -+ new_size_value = $1.to_f -+ new_size_unit = $3.upcase -+ new_size = (new_size_value * lvm_size_units[new_size_unit]).to_i -+ end - -- if not resizeable -- if @resource[:size_is_minsize] == :true or @resource[:size_is_minsize] == true or @resource[:size_is_minsize] == 'true' -- info( "Logical volume already has minimum size of #{new_size} (currently #{current_size})" ) -- else -- fail( "Decreasing the size requires manual intervention (#{new_size} < #{current_size})" ) -- end -- else -- ## Check if new size fits the extend blocks -- if new_size_bytes * lvm_size_units[new_size_unit] % vg_extent_size != 0 -- fail( "Cannot extend to size #{new_size} because VG extent size is #{vg_extent_size} KB" ) -- end -+ info( "New: value=#{new_size_value}, unit=#{new_size_unit}, kibi=#{new_size}" ) - -- lvextend( '-L', new_size, path) || fail( "Cannot extend to size #{new_size} because lvextend failed." ) -+ ## Get the extend size -+ if lvs('--noheading', '-o', 'vg_extent_size', '--units', 'k', path) =~ /\s+(\d+)\.\d+k/i -+ vg_extent_size = $1.to_i -+ end - -- blkid_type = blkid(path) -- if command(:resize4fs) and blkid_type =~ /\bTYPE=\"(ext4)\"/ -- resize4fs( path) || fail( "Cannot resize file system to size #{new_size} because resize2fs failed." ) -- elsif blkid_type =~ /\bTYPE=\"(ext[34])\"/ -- resize2fs( path) || fail( "Cannot resize file system to size #{new_size} because resize2fs failed." ) -- elsif blkid_type =~ /\bTYPE=\"(xfs)\"/ -- xfs_growfs( path) || fail( "Cannot resize filesystem to size #{new_size} because xfs_growfs failed." ) -+ if new_size < current_size -+ if @resource[:size_is_minsize] == :true or @resource[:size_is_minsize] == true or @resource[:size_is_minsize] == 'true' -+ info( "Logical volume already has minimum size of #{new_size} (currently #{current_size})" ) -+ else -+ if not @resource[:allow_reduce] -+ fail( "Decreasing the size requires manual intervention (#{new_size} < #{current_size})" ) -+ end -+ if new_size % vg_extent_size != 0 -+ if @resource[:round_to_extent] -+ new_size = ((new_size + vg_extent_size - 1) / vg_extent_size) * vg_extent_size -+ if new_size >= current_size -+ info( "Logical volume already has a size of #{current_size}" ) -+ return -+ end -+ else -+ fail( "Cannot reduce to size #{new_size} because VG extent size is #{vg_extent_size} KB" ) - end -- -+ end -+ exec_cmd('umount', path) -+ exec_cmd('fsadm', '-y', 'check', path ) -+ r = exec_cmd('fsadm', '-y', 'resize', path, "#{new_size}k") -+ if r[:exit] != 0 and @resource[:nuke_fs_on_resize_failure] -+ exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") -+ blkid('-g') -+ end -+ lvresize( '-f', '-L', "#{new_size}k", path) || fail( "Cannot reduce to size #{new_size} because lvresize failed." ) -+ end -+ elsif new_size > current_size -+ if new_size % vg_extent_size != 0 -+ if @resource[:round_to_extent] -+ new_size = ((new_size + vg_extent_size - 1) / vg_extent_size) * vg_extent_size -+ if new_size <= current_size -+ info( "Logical volume already has a size of #{current_size}" ) -+ return -+ end -+ else -+ fail( "Cannot extend to size #{new_size} because VG extent size is #{vg_extent_size} KB" ) -+ end -+ end -+ lvextend( '-L', "#{new_size}k", path) || fail( "Cannot extend to size #{new_size} because lvextend failed." ) -+ exec_cmd('umount', path) -+ exec_cmd('fsadm', '-y', 'check', path ) -+ r = exec_cmd('fsadm', '-y', 'resize', path, "#{new_size}k") -+ if r[:exit] != 0 and @resource[:nuke_fs_on_resize_failure] -+ exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") -+ blkid('-g') - end -+ else -+ info( "Logical volume already has a size of #{current_size}" ) -+ end - end - - -@@ -161,7 +224,7 @@ Puppet::Type.type(:logical_volume).provide :lvm do - # Minus one because it says "2" when there is only one spare. And so on. - n = ($1.to_i)-1 - #puts " current mirrors: #{n}" -- return n.to_s -+ return n.to_s - end - return 0.to_s - end -@@ -176,7 +239,7 @@ Puppet::Type.type(:logical_volume).provide :lvm do - end - - # Region size cannot be changed on an existing mirror (not even when changing to zero mirrors). -- -+ - if @resource[:alloc] - args.push( '--alloc', @resource[:alloc] ) - end -@@ -222,9 +285,6 @@ Puppet::Type.type(:logical_volume).provide :lvm do - end - end - -- -- -- - private - - def lvs_pattern -@@ -240,4 +300,18 @@ Puppet::Type.type(:logical_volume).provide :lvm do - "/dev/#{@resource[:volume_group]}" - end - -+ def lvzero -+ if lvs('--noheading', '-o', 'lv_size', '--units', 'm', path) =~ /\s+(\d+)\.\d+m/i -+ lv_size = $1.to_i -+ lv_size = lv_size - 2 -+ begin -+ dd('if=/dev/zero', 'of=' + path, 'bs=1M', "seek=#{lv_size}") -+ rescue -+ end -+ begin -+ dd('if=/dev/zero', 'of=' + path, 'bs=1M', 'count=100') -+ rescue -+ end -+ end -+ end - end -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -index eaefc92..6ac6e0a 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -@@ -4,7 +4,7 @@ Puppet::Type.type(:physical_volume).provide(:lvm) do - commands :pvcreate => 'pvcreate', :pvremove => 'pvremove', :pvs => 'pvs', :vgs => 'vgs' - - def create -- pvcreate(@resource[:name]) -+ pvcreate('-y', @resource[:name]) - end - - def destroy -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -index c8de071..3d54dba 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -@@ -1,12 +1,18 @@ -+require 'csv' -+ - Puppet::Type.type(:volume_group).provide :lvm do - desc "Manages LVM volume groups" - - commands :vgcreate => 'vgcreate', - :vgremove => 'vgremove', -+ :pvremove => 'pvremove', - :vgs => 'vgs', - :vgextend => 'vgextend', - :vgreduce => 'vgreduce', -- :pvs => 'pvs' -+ :vgscan => 'vgscan', -+ :pvs => 'pvs', -+ :lvremove => 'lvremove', -+ :umount => 'umount' - - def create - vgcreate(@resource[:name], *@resource.should(:physical_volumes)) -@@ -22,17 +28,55 @@ Puppet::Type.type(:volume_group).provide :lvm do - false - end - -+ def exec_cmd(*cmd) -+ output = Puppet::Util::Execution.execute(cmd, :failonfail => false, :combine => true) -+ {:out => output, :exit => $CHILD_STATUS.exitstatus} -+ end -+ - def physical_volumes=(new_volumes = []) -- # Only take action if createonly is false just to be safe -- # this is really only here to enforce the createonly setting -- # if something goes wrong in physical_volumes -- if @resource[:createonly].to_s == "false" -- existing_volumes = physical_volumes -- extraneous = existing_volumes - new_volumes -- extraneous.each { |volume| reduce_with(volume) } -+ # Only take action if createonly is false just to be safe -+ # this is really only here to enforce the createonly setting -+ # if something goes wrong in physical_volumes -+ if @resource[:createonly].to_s == "false" -+ vgreduce('--removemissing', '--force', @resource[:name]) -+ existing_volumes = physical_volumes -+ extraneous = existing_volumes - new_volumes -+ pv_to_lv={} -+ pv_to_dev={} -+ csv = CSV.new(pvs('-o', 'pv_name,vg_name,lv_name', '--separator', ','), -+ :headers => true, :header_converters => :symbol) -+ csv.to_a.map {|row| row.to_hash}.each do |m| -+ unless m[:lv].nil? -+ pv_to_lv[m[:_pv].strip] = "#{m[:vg]}/#{m[:lv]}" -+ pv_to_dev[m[:_pv].strip] = "#{m[:vg].gsub('-','--')}-#{m[:lv].gsub('-','--')}" -+ end -+ end -+ -+ if extraneous == existing_volumes -+ extraneous.each do |volume| -+ if pv_to_lv.has_key?(volume) -+ exec_cmd('/bin/umount', "/dev/mapper/#{pv_to_dev[volume]}") -+ lvremove('-f', pv_to_lv[volume]) -+ end -+ end -+ vgremove(@resource[:name], '--force') -+ extraneous.each do |volume| -+ pvremove(volume) -+ end -+ vgcreate(@resource[:name], *new_volumes) -+ else -+ extraneous.each do |volume| -+ if pv_to_lv.has_key?(volume) -+ exec_cmd('/bin/umount', "/dev/mapper/#{pv_to_dev[volume]}") -+ lvremove('-f', pv_to_lv[volume]) -+ end -+ reduce_with(volume) -+ pvremove(volume) -+ end - missing = new_volumes - existing_volumes - missing.each { |volume| extend_with(volume) } - end -+ end - end - - def physical_volumes -diff --git a/packstack/puppet/modules/lvm/lib/puppet/type/logical_volume.rb b/packstack/puppet/modules/lvm/lib/puppet/type/logical_volume.rb -index f907e08..3081650 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/type/logical_volume.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/type/logical_volume.rb -@@ -31,7 +31,7 @@ Puppet::Type.newtype(:logical_volume) do - newproperty(:size) do - desc "The size of the logical volume. Set to undef to use all available space" - validate do |value| -- unless value =~ /^[0-9]+(\.[0-9]+)?[KMGTPE]/i -+ unless value =~ /(^[0-9]+(\.[0-9]+)?[KMGTPE]|max)/i - raise ArgumentError , "#{value} is not a valid logical volume size" - end - end -@@ -50,6 +50,36 @@ Puppet::Type.newtype(:logical_volume) do - desc "Configures the logical volume type. AIX only" - end - -+ newparam(:allow_reduce) do -+ desc "Allow reducing logical volume size." -+ validate do |value| -+ unless [:true, true, "true", :false, false, "false"].include?(value) -+ raise ArgumentError , "allow_reduce must either be true or false" -+ end -+ end -+ defaultto :false -+ end -+ -+ newparam(:round_to_extent) do -+ desc "Allow rounding of logical volume size to extent size." -+ validate do |value| -+ unless [:true, true, "true", :false, false, "false"].include?(value) -+ raise ArgumentError , "round_to_extent must either be true or false" -+ end -+ end -+ defaultto :false -+ end -+ -+ newparam(:nuke_fs_on_resize_failure) do -+ desc "Remove filesystem on logical volume resize failure." -+ defaultto :false -+ validate do |value| -+ unless [:true, true, "true", :false, false, "false"].include?(value) -+ raise ArgumentError , "nuke_fs_on_resize_failure must either be true or false" -+ end -+ end -+ end -+ - newparam(:range) do - desc "Sets the inter-physical volume allocation policy. AIX only" - validate do |value| -diff --git a/packstack/puppet/modules/lvm/manifests/logical_volume.pp b/packstack/puppet/modules/lvm/manifests/logical_volume.pp -index e6e5e78..4888b5d 100644 ---- a/packstack/puppet/modules/lvm/manifests/logical_volume.pp -+++ b/packstack/puppet/modules/lvm/manifests/logical_volume.pp -@@ -3,7 +3,9 @@ - define lvm::logical_volume ( - $volume_group, - $size = undef, -+ $size_is_minsize = false, - $initial_size = undef, -+ $round_to_extent = false, - $ensure = present, - $options = 'defaults', - $pass = '2', -@@ -12,6 +14,7 @@ define lvm::logical_volume ( - $mkfs_options = undef, - $mountpath = "/${name}", - $mountpath_require = false, -+ $remounts = true, - $createfs = true, - $extents = undef, - $stripes = undef, -@@ -21,6 +24,7 @@ define lvm::logical_volume ( - ) { - - validate_bool($mountpath_require) -+ validate_bool($size_is_minsize) - - if ($name == undef) { - fail("lvm::logical_volume \$name can't be undefined") -@@ -51,6 +55,7 @@ define lvm::logical_volume ( - ensure => $ensure, - volume_group => $volume_group, - size => $size, -+ size_is_minsize => $size_is_minsize, - initial_size => $initial_size, - stripes => $stripes, - stripesize => $stripesize, -@@ -81,6 +86,7 @@ define lvm::logical_volume ( - pass => $pass, - dump => $dump, - atboot => true, -+ remounts => $remounts, - } - } - } -diff --git a/packstack/puppet/modules/lvm/manifests/volume.pp b/packstack/puppet/modules/lvm/manifests/volume.pp -index a8bc3c8..bdfc937 100644 ---- a/packstack/puppet/modules/lvm/manifests/volume.pp -+++ b/packstack/puppet/modules/lvm/manifests/volume.pp -@@ -59,7 +59,10 @@ define lvm::volume ( - $fstype = undef, - $size = undef, - $extents = undef, -- $initial_size = undef -+ $initial_size = undef, -+ $allow_reduce = false, -+ $round_to_extent = false, -+ $nuke_fs_on_resize_failure = false - ) { - - if ($name == undef) { -@@ -88,6 +91,9 @@ define lvm::volume ( - volume_group => $vg, - size => $size, - initial_size => $initial_size, -+ allow_reduce => $allow_reduce, -+ round_to_extent => $round_to_extent, -+ nuke_fs_on_resize_failure => $nuke_fs_on_resize_failure, - before => Volume_group[$vg] - } - } -@@ -124,6 +130,9 @@ define lvm::volume ( - volume_group => $vg, - size => $size, - extents => $extents, -+ allow_reduce => $allow_reduce, -+ round_to_extent => $round_to_extent, -+ nuke_fs_on_resize_failure => $nuke_fs_on_resize_failure, - require => Volume_group[$vg] - } - -diff --git a/packstack/puppet/modules/lvm/spec/unit/puppet/provider/logical_volume/lvm_spec.rb b/packstack/puppet/modules/lvm/spec/unit/puppet/provider/logical_volume/lvm_spec.rb -index 56c32a5..a465a7f 100644 ---- a/packstack/puppet/modules/lvm/spec/unit/puppet/provider/logical_volume/lvm_spec.rb -+++ b/packstack/puppet/modules/lvm/spec/unit/puppet/provider/logical_volume/lvm_spec.rb -@@ -12,23 +12,24 @@ describe provider_class do - describe 'when creating' do - context 'with size' do - it "should execute 'lvcreate' with a '--size' option" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:size).returns('1g').at_least_once - @resource.expects(:[]).with(:extents).returns(nil).at_least_once - @resource.expects(:[]).with(:stripes).returns(nil).at_least_once - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - end - end - context 'with initial_size' do - it "should execute 'lvcreate' with a '--size' option" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:initial_size).returns('1g').at_least_once - @resource.expects(:[]).with(:size).returns(nil).at_least_once - @resource.expects(:[]).with(:extents).returns(nil).at_least_once -@@ -36,15 +37,16 @@ describe provider_class do - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - end - end - context 'without size and without extents' do - it "should execute 'lvcreate' without a '--size' option or a '--extents' option" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:size).returns(nil).at_least_once - @resource.expects(:[]).with(:initial_size).returns(nil).at_least_once - @resource.expects(:[]).with(:extents).returns(nil).at_least_once -@@ -52,45 +54,47 @@ describe provider_class do - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--extents', '100%FREE', 'myvg') - @provider.create - end - end - context 'with extents' do - it "should execute 'lvcreate' with a '--extents' option" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:size).returns('1g').at_least_once - @resource.expects(:[]).with(:extents).returns('80%vg').at_least_once - @resource.expects(:[]).with(:stripes).returns(nil).at_least_once - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', '--extents', '80%vg', 'myvg') - @provider.create - end - end - context 'without extents' do - it "should execute 'lvcreate' without a '--extents' option" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:size).returns('1g').at_least_once - @resource.expects(:[]).with(:extents).returns(nil).at_least_once - @resource.expects(:[]).with(:stripes).returns(nil).at_least_once - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - end - end - context 'with initial_size and mirroring' do - it "should execute 'lvcreate' with '--size' and '--mirrors' and '--mirrorlog' options" do -- @resource.expects(:[]).with(:name).returns('mylv') -- @resource.expects(:[]).with(:volume_group).returns('myvg') -+ @resource.expects(:[]).with(:name).returns('mylv').at_least_once -+ @resource.expects(:[]).with(:volume_group).returns('myvg').at_least_once - @resource.expects(:[]).with(:initial_size).returns('1g').at_least_once - @resource.expects(:[]).with(:size).returns(nil).at_least_once - @resource.expects(:[]).with(:extents).returns(nil).at_least_once -@@ -102,6 +106,7 @@ describe provider_class do - @resource.expects(:[]).with(:region_size).returns(nil).at_least_once - @resource.expects(:[]).with(:no_sync).returns(nil).at_least_once - @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', '--mirrors', '1', '--mirrorlog', 'core', 'myvg') - @provider.create - end -@@ -120,13 +125,15 @@ describe provider_class do - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once -+ @resource.expects(:[]).with(:nuke_fs_on_resize_failure).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - @provider.expects(:lvs).with('--noheading', '--unit', 'g', '/dev/myvg/mylv').returns(' 1.00g').at_least_once - @provider.expects(:lvs).with('--noheading', '-o', 'vg_extent_size', '--units', 'k', '/dev/myvg/mylv').returns(' 1000.00k') - @provider.expects(:lvextend).with('-L', '2000000k', '/dev/myvg/mylv').returns(true) -- @provider.expects(:blkid).with('/dev/myvg/mylv') -+ #@provider.expects(:blkid).with('/dev/myvg/mylv') - @provider.size = '2000000k' - end - end -@@ -140,7 +147,8 @@ describe provider_class do - @resource.expects(:[]).with(:stripesize).returns(nil).at_least_once - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - @provider.expects(:lvs).with('--noheading', '--unit', 'g', '/dev/myvg/mylv').returns(' 1.00g').at_least_once -@@ -161,7 +169,9 @@ describe provider_class do - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:size_is_minsize).returns(:false).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once -+ @resource.expects(:[]).with(:allow_reduce).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - @provider.expects(:lvs).with('--noheading', '--unit', 'g', '/dev/myvg/mylv').returns(' 1.00g').at_least_once -@@ -182,7 +192,8 @@ describe provider_class do - @resource.expects(:[]).with(:readahead).returns(nil).at_least_once - @resource.expects(:[]).with(:size_is_minsize).returns(:true).at_least_once - @resource.expects(:[]).with(:mirror).returns(nil).at_least_once -- @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:alloc).returns(nil).at_least_once -+ @resource.expects(:[]).with(:round_to_extent).returns(false).at_least_once - @provider.expects(:lvcreate).with('-n', 'mylv', '--size', '1g', 'myvg') - @provider.create - @provider.expects(:lvs).with('--noheading', '--unit', 'g', '/dev/myvg/mylv').returns(' 1.00g').at_least_once --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/0002-UEFI-pvcreate-fix.patch b/config/puppet-modules/puppet-lvm/centos/files/0002-UEFI-pvcreate-fix.patch deleted file mode 100644 index 3ac7b91d8..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0002-UEFI-pvcreate-fix.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ac6a60e4d65e33017f8db0eca499f8dd898acb3c Mon Sep 17 00:00:00 2001 -From: Kristine Bujold -Date: Fri, 15 Jul 2016 16:55:16 -0400 -Subject: [PATCH] US80802 - PXE Installation changes for UEFI support. Fixing - pvcreate issue. - ---- - .../lvm/lib/puppet/provider/physical_volume/lvm.rb | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -index 6ac6e0a..18183ae 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/physical_volume/lvm.rb -@@ -1,12 +1,27 @@ - Puppet::Type.type(:physical_volume).provide(:lvm) do - desc "Manages LVM physical volumes" - -- commands :pvcreate => 'pvcreate', :pvremove => 'pvremove', :pvs => 'pvs', :vgs => 'vgs' -+ -+ commands :pvcreate => 'pvcreate', -+ :pvremove => 'pvremove', -+ :pvs => 'pvs', -+ :vgs => 'vgs', -+ :dd => 'dd' - - def create -+ # Delete the first few bytes at the start and end of the partition. This is required with -+ # GPT partitions, they save partition info at the start and the end of the block. -+ exec_cmd('dd', 'if=/dev/zero', "of=#{@resource[:name]}", "bs=512", "count=34") -+ exec_cmd('dd', 'if=/dev/zero', "of=#{@resource[:name]}", "bs=512", "count=34", "seek=$((`blockdev --getsz #{@resource[:name]}` - 34))") -+ - pvcreate('-y', @resource[:name]) - end - -+ def exec_cmd(*cmd) -+ output = Puppet::Util::Execution.execute(cmd, :failonfail => false, :combine => true) -+ {:out => output, :exit => $CHILD_STATUS.exitstatus} -+ end -+ - def destroy - pvremove(@resource[:name]) - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/0003-US94222-Persistent-Dev-Naming.patch b/config/puppet-modules/puppet-lvm/centos/files/0003-US94222-Persistent-Dev-Naming.patch deleted file mode 100644 index a1ddc0d8f..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0003-US94222-Persistent-Dev-Naming.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b05de190832bba08ce410c267c4b2f8a74916f7a Mon Sep 17 00:00:00 2001 -From: Robert Church -Date: Wed, 1 Mar 2017 09:12:34 +0000 -Subject: [PATCH] US94222: Persistent Dev Naming - ---- - packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -index 3d54dba..04dea64 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -@@ -81,7 +81,7 @@ Puppet::Type.type(:volume_group).provide :lvm do - - def physical_volumes - if @resource[:createonly].to_s == "false" || ! vgs(@resource[:name]) -- lines = pvs('-o', 'pv_name,vg_name', '--separator', ',') -+ lines = `pvs -o pv_name,vg_name --separator ',' | awk -F ',' 'NR>1{cmd="find -L /dev/disk/by-path/ -samefile" $1; cmd | getline $1;print $1 "," $2; next};{print}'` - lines.split(/\n/).grep(/,#{@resource[:name]}$/).map { |s| - s.split(/,/)[0].strip - } --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/0004-extendind-nuke_fs_on_resize_failure-functionality.patch b/config/puppet-modules/puppet-lvm/centos/files/0004-extendind-nuke_fs_on_resize_failure-functionality.patch deleted file mode 100644 index a0115a786..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0004-extendind-nuke_fs_on_resize_failure-functionality.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f2676c5ac0e17a18726815b72ef449c804e07135 Mon Sep 17 00:00:00 2001 -From: Stefan Dinescu -Date: Wed, 6 Dec 2017 12:50:14 +0000 -Subject: [PATCH 1/1] extendind nuke_fs_on_resize_failure functionality - ---- - .../modules/lvm/lib/puppet/provider/logical_volume/lvm.rb | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -index 2f41695..2abfea3 100755 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -@@ -188,7 +188,16 @@ Puppet::Type.type(:logical_volume).provide :lvm do - exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") - blkid('-g') - end -- lvresize( '-f', '-L', "#{new_size}k", path) || fail( "Cannot reduce to size #{new_size} because lvresize failed." ) -+ r = exec_cmd('lvresize', '-r', '-f', '-L', "#{new_size}k", path) -+ if r[:exit] != 0 -+ if @resource[:nuke_fs_on_resize_failure] -+ exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") -+ blkid('-g') -+ lvresize( '-f', '-L', "#{new_size}k", path) || fail( "Cannot reduce to size #{new_size} because lvresize failed." ) -+ else -+ fail( "Cannot reduce to size #{new_size} because lvresize failed." ) -+ end -+ end - end - elsif new_size > current_size - if new_size % vg_extent_size != 0 --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/0005-Wipe-10MB-after-we-lvextend-the-partitions.patch b/config/puppet-modules/puppet-lvm/centos/files/0005-Wipe-10MB-after-we-lvextend-the-partitions.patch deleted file mode 100644 index 517eca883..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0005-Wipe-10MB-after-we-lvextend-the-partitions.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c14a96cb55a3bcd20f772c25f2294eb3a1d376b9 Mon Sep 17 00:00:00 2001 -From: Mihnea Saracin -Date: Fri, 21 May 2021 13:34:41 -0400 -Subject: [PATCH 5/5] Wipe 10MB after we lvextend the partitions - ---- - .../puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -index f9b1c66..a604e96 100755 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -@@ -214,6 +214,7 @@ Puppet::Type.type(:logical_volume).provide :lvm do - end - end - lvextend( '-L', "#{new_size}k", path) || fail( "Cannot extend to size #{new_size} because lvextend failed." ) -+ exec_cmd("seek_end=$(($(blockdev --getsz #{path})/2048 - 10)); dd if=/dev/zero of=#{path} bs=1M seek=${seek_end} count=10") - exec_cmd('umount', path) - exec_cmd('fsadm', '-y', 'check', path ) - r = exec_cmd('fsadm', '-y', 'resize', path, "#{new_size}k") --- -2.29.2 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/0006-add-support-for-mpath-devices.patch b/config/puppet-modules/puppet-lvm/centos/files/0006-add-support-for-mpath-devices.patch deleted file mode 100644 index d42c89411..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/0006-add-support-for-mpath-devices.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e603e6bc5a72c2dc0760471df08bcf6079abb789 Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Mon, 14 Mar 2022 04:28:55 +0000 -Subject: [PATCH] add support for mpath devices - -The device path in /dev/disk/by-path can not be used directly -for mpath devices, /dev/disk/by-id/dm-uuid-mpath- will -be used instead. - -Signed-off-by: Jackie Huang ---- - .../modules/lvm/lib/puppet/provider/volume_group/lvm.rb | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -index fd467e1..7170fa6 100644 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/volume_group/lvm.rb -@@ -81,7 +81,12 @@ Puppet::Type.type(:volume_group).provide :lvm do - - def physical_volumes - if @resource[:createonly].to_s == "false" || ! vgs(@resource[:name]) -- lines = `pvs -o pv_name,vg_name --separator ',' | awk -F ',' 'NR>1{cmd="find -L /dev/disk/by-path/ -samefile" $1; cmd | getline $1;print $1 "," $2; next};{print}'` -+ pv_name = `pvs -o pv_name | tail -1` -+ if pv_name.include? "mpath" -+ lines = `pvs -o pv_name,vg_name --separator ',' | awk -F ',' 'NR>1{cmd="find -L /dev/disk/by-id/dm-uuid* -samefile" $1; cmd | getline $1;print $1 "," $2; next};{print}'` -+ else -+ lines = `pvs -o pv_name,vg_name --separator ',' | awk -F ',' 'NR>1{cmd="find -L /dev/disk/by-path/ -samefile" $1; cmd | getline $1;print $1 "," $2; next};{print}'` -+ end - lines.split(/\n/).grep(/,#{@resource[:name]}$/).map { |s| - s.split(/,/)[0].strip - } --- -2.29.2 - diff --git a/config/puppet-modules/puppet-lvm/centos/files/Fix-the-logical-statement-for-nuke_fs_on_resize.patch b/config/puppet-modules/puppet-lvm/centos/files/Fix-the-logical-statement-for-nuke_fs_on_resize.patch deleted file mode 100644 index e1796ba3c..000000000 --- a/config/puppet-modules/puppet-lvm/centos/files/Fix-the-logical-statement-for-nuke_fs_on_resize.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 21d2c4e714611ad08e5aa999e555e1e7591f2717 Mon Sep 17 00:00:00 2001 -From: Kristine Bujold -Date: Thu, 19 Jul 2018 09:02:27 -0400 -Subject: [PATCH 1/1] Patch4: - Fix-the-logical-statement-for-nuke_fs_on_resize_2.patch - ---- - .../puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -index 2abfea3..f9b1c66 100755 ---- a/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -+++ b/packstack/puppet/modules/lvm/lib/puppet/provider/logical_volume/lvm.rb -@@ -184,13 +184,15 @@ Puppet::Type.type(:logical_volume).provide :lvm do - exec_cmd('umount', path) - exec_cmd('fsadm', '-y', 'check', path ) - r = exec_cmd('fsadm', '-y', 'resize', path, "#{new_size}k") -- if r[:exit] != 0 and @resource[:nuke_fs_on_resize_failure] -+ if r[:exit] != 0 and [:true, "true", true ].include? @resource[:nuke_fs_on_resize_failure] -+ info( "Failed 'fsadm resize' erase the disk #{r}" ) - exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") - blkid('-g') - end - r = exec_cmd('lvresize', '-r', '-f', '-L', "#{new_size}k", path) - if r[:exit] != 0 -- if @resource[:nuke_fs_on_resize_failure] -+ if [:true, "true", true ].include? @resource[:nuke_fs_on_resize_failure] -+ info( "Failed 'fsadm resize' erase the disk #{r}" ) - exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") - blkid('-g') - lvresize( '-f', '-L', "#{new_size}k", path) || fail( "Cannot reduce to size #{new_size} because lvresize failed." ) -@@ -215,7 +217,8 @@ Puppet::Type.type(:logical_volume).provide :lvm do - exec_cmd('umount', path) - exec_cmd('fsadm', '-y', 'check', path ) - r = exec_cmd('fsadm', '-y', 'resize', path, "#{new_size}k") -- if r[:exit] != 0 and @resource[:nuke_fs_on_resize_failure] -+ if r[:exit] != 0 and [:true, "true", true ].include? @resource[:nuke_fs_on_resize_failure] -+ info( "Failed 'fsadm resize' erase the disk #{r}" ) - exec_cmd('dd', 'if=/dev/zero', "of=#{path}", "bs=512", "count=16", "conv=notrunc") - blkid('-g') - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-lvm/centos/puppet-lvm.spec b/config/puppet-modules/puppet-lvm/centos/puppet-lvm.spec deleted file mode 100644 index c9fef78f5..000000000 --- a/config/puppet-modules/puppet-lvm/centos/puppet-lvm.spec +++ /dev/null @@ -1,51 +0,0 @@ -%global git_sha d0283da637ae24550fb4ba109a48ef8d5d8c8b84 -%global prefix puppetlabs -%global module_dir lvm - -Name: puppet-%{module_dir} -Version: 0.5.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet %{module_dir} module -License: Apache - -URL: https://github.com/puppetlabs/puppetlabs-lvm - -Source0: %{prefix}-%{module_dir}-%{git_sha}.tar.gz - -Patch0: 0001-puppet-lvm-kilo-quilt-changes.patch -Patch1: 0002-UEFI-pvcreate-fix.patch -Patch2: 0003-US94222-Persistent-Dev-Naming.patch -Patch3: 0004-extendind-nuke_fs_on_resize_failure-functionality.patch -Patch4: Fix-the-logical-statement-for-nuke_fs_on_resize.patch -Patch5: 0005-Wipe-10MB-after-we-lvextend-the-partitions.patch -Patch6: 0006-add-support-for-mpath-devices.patch - -BuildArch: noarch - -BuildRequires: python2-devel - -# According to .fixtures.yml the following puppet modules are also required -Requires: puppet-stdlib - - -%description -A Puppet module for Logical Resource Management (LVM) - -%prep -%setup -c %{module_dir} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-network/centos/build_srpm.data b/config/puppet-modules/puppet-network/centos/build_srpm.data deleted file mode 100644 index ac9824330..000000000 --- a/config/puppet-modules/puppet-network/centos/build_srpm.data +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX=puppet -MODULE=network -VERSION=1.0.2 - -GIT_SHA=7deacd5fdc22c0543455878a8d1872f2f5417c1d - -# Generic Copy routine -# Un-patched -#COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -#Patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-network/centos/files/Don-t-write-absent-to-redhat-route-files-and-test-fo.patch b/config/puppet-modules/puppet-network/centos/files/Don-t-write-absent-to-redhat-route-files-and-test-fo.patch deleted file mode 100644 index efc544618..000000000 --- a/config/puppet-modules/puppet-network/centos/files/Don-t-write-absent-to-redhat-route-files-and-test-fo.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 49e103bbeb4d6efe1ca75f581d41ee6a8ed7caf5 Mon Sep 17 00:00:00 2001 -From: Romanos Skiadas -Date: Wed, 2 Nov 2016 14:51:47 -0400 -Subject: [PATCH] Don't write absent to redhat route files and test for this - -Signed-off-by: Allain Legacy ---- - .../network/lib/puppet/provider/network_route/redhat.rb | 9 +++++++-- - .../spec/unit/provider/network_route/redhat_spec.rb | 17 ++++++++++++++++- - 2 files changed, 23 insertions(+), 3 deletions(-) - -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -index f45eab5..9841c8e 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -@@ -84,10 +84,15 @@ Puppet::Type.type(:network_route).provide(:redhat) do - raise Puppet::Error, "#{provider.name} does not have a #{prop}." if provider.send(prop).nil? - end - if provider.network == "default" -- contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface} #{provider.options}\n" -+ contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface}\n" - else -- contents << "#{provider.network}/#{provider.netmask} via #{provider.gateway} dev #{provider.interface} #{provider.options}\n" -+ contents << "#{provider.network}/#{provider.netmask} via #{provider.gateway} dev #{provider.interface}\n" - end -+ contents << if provider.options == :absent -+ "\n" -+ else -+ " #{provider.options}\n" -+ end - end - contents.join - end -diff --git a/packstack/puppet/modules/network/spec/unit/provider/network_route/redhat_spec.rb b/packstack/puppet/modules/network/spec/unit/provider/network_route/redhat_spec.rb -index dfc9d6b..1ad2128 100644 ---- a/packstack/puppet/modules/network/spec/unit/provider/network_route/redhat_spec.rb -+++ b/packstack/puppet/modules/network/spec/unit/provider/network_route/redhat_spec.rb -@@ -91,7 +91,18 @@ describe Puppet::Type.type(:network_route).provider(:redhat) do - ) - end - -- let(:content) { described_class.format_file('', [route1_provider, route2_provider, defaultroute_provider]) } -+ let(:nooptions_provider) do -+ stub('nooptions_provider', -+ name: 'default', -+ network: 'default', -+ netmask: '', -+ gateway: '10.0.0.1', -+ interface: 'eth2', -+ options: :absent -+ ) -+ end -+ -+ let(:content) { described_class.format_file('', [route1_provider, route2_provider, defaultroute_provider, nooptions_provider]) } - - describe "writing the route line" do - describe "For standard (non-default) routes" do -@@ -122,6 +133,10 @@ describe Puppet::Type.type(:network_route).provider(:redhat) do - it "should have the correct fields appended" do - content.scan(/^default .*$/).first.should be_include("default via 10.0.0.1 dev eth1") - end -+ -+ it 'should not contain the word absent when no options are defined' do -+ expect(content).to_not match(/absent/) -+ end - end - end - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/files/fix-absent-options.patch b/config/puppet-modules/puppet-network/centos/files/fix-absent-options.patch deleted file mode 100644 index 23c738f02..000000000 --- a/config/puppet-modules/puppet-network/centos/files/fix-absent-options.patch +++ /dev/null @@ -1,113 +0,0 @@ -From f22d4c9d24939afb8f29323adffe3eb570f14804 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=3D=3FUTF-8=3Fq=3FIgor=3D20Gali=3DC4=3D87=3F=3D?= - -Date: Wed, 2 Nov 2016 14:54:28 -0400 -Subject: [PATCH] fix "absent" options - -analogous to redhat, we check if options are absent, before appending -them to the file. This fixes #160 - -Signed-off-by: Allain Legacy ---- - .../lib/puppet/provider/network_route/redhat.rb | 10 ++--- - .../lib/puppet/provider/network_route/routes.rb | 3 +- - .../unit/provider/network_route/routes_spec.rb | 48 ++++++++++++++++++++++ - 3 files changed, 53 insertions(+), 8 deletions(-) - -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -index 9841c8e..7123d44 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -@@ -84,15 +84,11 @@ Puppet::Type.type(:network_route).provide(:redhat) do - raise Puppet::Error, "#{provider.name} does not have a #{prop}." if provider.send(prop).nil? - end - if provider.network == "default" -- contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface}\n" -+ contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface}" - else -- contents << "#{provider.network}/#{provider.netmask} via #{provider.gateway} dev #{provider.interface}\n" -+ contents << "#{provider.network}/#{provider.netmask} via #{provider.gateway} dev #{provider.interface}" - end -- contents << if provider.options == :absent -- "\n" -- else -- " #{provider.options}\n" -- end -+ contents << (provider.options == :absent ? "\n" : " #{provider.options}\n") - end - contents.join - end -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/routes.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/routes.rb -index 2dd579f..ca7066d 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_route/routes.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/routes.rb -@@ -93,7 +93,8 @@ Puppet::Type.type(:network_route).provide(:routes) do - raise Puppet::Error, "#{provider.name} is missing the required parameter 'gateway'." if provider.gateway.nil? - raise Puppet::Error, "#{provider.name} is missing the required parameter 'interface'." if provider.interface.nil? - -- contents << "#{provider.network} #{provider.netmask} #{provider.gateway} #{provider.interface} #{provider.options}\n" -+ contents << "#{provider.network} #{provider.netmask} #{provider.gateway} #{provider.interface}" -+ contents << (provider.options == :absent ? "\n" : " #{provider.options}\n") - end - - contents.join -diff --git a/packstack/puppet/modules/network/spec/unit/provider/network_route/routes_spec.rb b/packstack/puppet/modules/network/spec/unit/provider/network_route/routes_spec.rb -index 2e55eba..9376739 100644 ---- a/packstack/puppet/modules/network/spec/unit/provider/network_route/routes_spec.rb -+++ b/packstack/puppet/modules/network/spec/unit/provider/network_route/routes_spec.rb -@@ -93,4 +93,52 @@ describe Puppet::Type.type(:network_route).provider(:routes) do - end - end - end -+ describe 'when formatting simple files' do -+ let(:route1_provider) do -+ stub('route1_provider', -+ name: '172.17.67.0', -+ network: '172.17.67.0', -+ netmask: '255.255.255.0', -+ gateway: '172.18.6.2', -+ interface: 'vlan200', -+ options: :absent, -+ ) -+ end -+ -+ let(:route2_provider) do -+ stub('lo_provider', -+ name: '172.28.45.0', -+ network: '172.28.45.0', -+ netmask: '255.255.255.0', -+ gateway: '172.18.6.2', -+ interface: 'eth0', -+ options: :absent, -+ ) -+ end -+ -+ let(:content) { described_class.format_file('', [route1_provider, route2_provider]) } -+ -+ describe 'writing the route line' do -+ it 'should write only fields' do -+ expect(content.scan(/^172.17.67.0 .*$/).length).to eq(1) -+ expect(content.scan(/^172.17.67.0 .*$/).first.split(/\s/, 5).length).to eq(4) -+ end -+ -+ it 'should have the correct fields appended' do -+ expect(content.scan(/^172.17.67.0 .*$/).first).to include('172.17.67.0 255.255.255.0 172.18.6.2 vlan200') -+ end -+ -+ it 'should fail if the netmask property is not defined' do -+ route2_provider.unstub(:netmask) -+ route2_provider.stubs(:netmask).returns nil -+ expect { content }.to raise_exception -+ end -+ -+ it 'should fail if the gateway property is not defined' do -+ route2_provider.unstub(:gateway) -+ route2_provider.stubs(:gateway).returns nil -+ expect { content }.to raise_exception -+ end -+ end -+ end - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/files/ipv6-static-route-support.patch b/config/puppet-modules/puppet-network/centos/files/ipv6-static-route-support.patch deleted file mode 100644 index 10456b1f7..000000000 --- a/config/puppet-modules/puppet-network/centos/files/ipv6-static-route-support.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 49820add1d1e5f63343615ead9b551b8679f466d Mon Sep 17 00:00:00 2001 -From: Kevin Smith -Date: Mon, 16 Oct 2017 15:06:37 -0500 -Subject: [PATCH 1/1] ipv6 static route support - ---- - .../lib/puppet/provider/network_route/redhat.rb | 3 ++- - .../network/lib/puppet/type/network_route.rb | 26 ++++++++++++++-------- - .../network/spec/unit/type/network_route_spec.rb | 5 +++++ - 3 files changed, 24 insertions(+), 10 deletions(-) - -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -index 5073519..c289f5f 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -@@ -93,7 +93,8 @@ Puppet::Type.type(:network_route).provide(:redhat) do - if provider.network == "default" - contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface}" - else -- contents << "#{provider.network}/#{provider.netmask} via #{provider.gateway} dev #{provider.interface}" -+ # provider.name will have cidr notation -+ contents << "#{provider.name} via #{provider.gateway} dev #{provider.interface}" - end - contents << (provider.options == :absent ? "\n" : " #{provider.options}\n") - end -diff --git a/packstack/puppet/modules/network/lib/puppet/type/network_route.rb b/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -index 7ab67dd..fd52c58 100644 ---- a/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -+++ b/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -@@ -5,8 +5,6 @@ Puppet::Type.newtype(:network_route) do - - ensurable - -- IPV4_ADDRESS_REGEX = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/ -- - newparam(:name) do - isnamevar - desc "The name of the network route" -@@ -18,7 +16,7 @@ Puppet::Type.newtype(:network_route) do - validate do |value| - begin - t = IPAddr.new(value) unless value == "default" -- rescue ArgumentError -+ rescue - fail("Invalid value for network: #{value}") - end - end -@@ -29,17 +27,27 @@ Puppet::Type.newtype(:network_route) do - desc "The subnet mask to apply to the route" - - validate do |value| -- unless (value.length <= 2 or value =~ IPV4_ADDRESS_REGEX) -+ unless value.length <= 3 || (IPAddr.new(value) rescue false) - fail("Invalid value for argument netmask: #{value}") - end - end - - munge do |value| -- case value -- when IPV4_ADDRESS_REGEX -- value -- when /^\d+$/ -- IPAddr.new('255.255.255.255').mask(value.strip.to_i).to_s -+ # '255.255.255.255'.to_i will return 255, so we try to convert it back: -+ if value.to_i.to_s == value -+ if value.to_i <= 32 -+ IPAddr.new('255.255.255.255').mask(value.strip.to_i).to_s -+ else -+ IPAddr.new('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff').mask(value.strip.to_i).to_s -+ end -+ else -+ if (IPAddr.new(value).ipv6? rescue false) -+ IPAddr.new('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff').mask(value).to_s -+ elsif (IPAddr.new(value).ipv4? rescue false) -+ IPAddr.new('255.255.255.255').mask(value).to_s -+ else -+ raise("Invalid value for argument netmask: #{value}") -+ end - end - end - end -diff --git a/packstack/puppet/modules/network/spec/unit/type/network_route_spec.rb b/packstack/puppet/modules/network/spec/unit/type/network_route_spec.rb -index 24e9da3..6e6f3e4 100644 ---- a/packstack/puppet/modules/network/spec/unit/type/network_route_spec.rb -+++ b/packstack/puppet/modules/network/spec/unit/type/network_route_spec.rb -@@ -55,6 +55,11 @@ describe Puppet::Type.type(:network_route) do - r[:netmask].should == '255.255.255.0' - end - -+ it 'should convert IPv6 netmasks of the CIDR form' do -+ r = Puppet::Type.type(:network_route).new(name: 'lxd bridge', network: 'fd58:281b:6eef:eb3d::', netmask: '64', gateway: 'fd58:281b:6eef:eb3d::1', interface: 'lxdbr0') -+ expect(r[:netmask]).to eq('ffff:ffff:ffff:ffff::') -+ end -+ - it "should convert netmasks of the expanded netmask form" do - r = described_class.new(:name => '192.168.1.0/24', :network => '192.168.1.0', :netmask => '255.255.128.0', :gateway => '23.23.23.42', :interface => 'eth0') - r[:netmask].should == '255.255.128.0' --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/files/permit-inservice-update-of-static-routes.patch b/config/puppet-modules/puppet-network/centos/files/permit-inservice-update-of-static-routes.patch deleted file mode 100644 index 66e76230b..000000000 --- a/config/puppet-modules/puppet-network/centos/files/permit-inservice-update-of-static-routes.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 46ec08e58419bb73bf49b44cf32fa3d304236615 Mon Sep 17 00:00:00 2001 -From: Kevin Smith -Date: Thu, 5 Oct 2017 13:33:12 -0500 -Subject: [PATCH 1/1] permit inservice update of static routes - ---- - .../network/lib/puppet/provider/network_route/redhat.rb | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -index 7123d44..5073519 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/redhat.rb -@@ -18,12 +18,18 @@ Puppet::Type.type(:network_route).provide(:redhat) do - - has_feature :provider_options - -+ # WRS: Generate temporary copies. It will get compared to files under -+ # /etc/sysconfig/network-scripts afterward. Only config that have changed -+ # will get replaced. Don't let puppet directly manage them, else it will -+ # trigger un-wanted networking actions (like up/down). -+ RSCRIPT_DIRECTORY = "/var/run/network-scripts.puppet" -+ - def select_file -- "/etc/sysconfig/network-scripts/route-#{@resource[:interface]}" -+ "#{RSCRIPT_DIRECTORY}/route-#{@resource[:interface]}" - end - - def self.target_files -- Dir["/etc/sysconfig/network-scripts/route-*"] -+ Dir["#{RSCRIPT_DIRECTORY}/route-*"] - end - - def self.parse_file(filename, contents) -@@ -76,6 +82,7 @@ Puppet::Type.type(:network_route).provide(:redhat) do - - # Generate an array of sections - def self.format_file(filename, providers) -+ Dir.mkdir(RSCRIPT_DIRECTORY) unless File.exists?(RSCRIPT_DIRECTORY) - contents = [] - contents << header - # Build routes -@@ -103,4 +110,9 @@ Puppet::Type.type(:network_route).provide(:redhat) do - HEADER - str - end -+ -+ def self.post_flush_hook(filename) -+ File.chmod(0644, filename) -+ end -+ - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/files/puppet-network-Kilo-quilt-changes.patch b/config/puppet-modules/puppet-network/centos/files/puppet-network-Kilo-quilt-changes.patch deleted file mode 100644 index 841198fb6..000000000 --- a/config/puppet-modules/puppet-network/centos/files/puppet-network-Kilo-quilt-changes.patch +++ /dev/null @@ -1,658 +0,0 @@ -From 8e14e2e258a8f2f7189ed37c6337c41fbff0362a Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 6 Jun 2016 17:13:09 -0400 -Subject: [PATCH] puppet-network Kilo quilt changes - ---- - .../lib/puppet/provider/network_config/redhat.rb | 39 ++- - .../lib/puppet/provider/network_config/wrlinux.rb | 296 +++++++++++++++++++++ - .../lib/puppet/provider/network_route/wrlinux.rb | 109 ++++++++ - .../network/lib/puppet/type/network_config.rb | 4 + - packstack/puppet/modules/network/manifests/bond.pp | 22 ++ - .../puppet/modules/network/manifests/bond/setup.pp | 2 + - .../modules/network/manifests/bond/wrlinux.pp | 56 ++++ - 7 files changed, 521 insertions(+), 7 deletions(-) - create mode 100644 packstack/puppet/modules/network/lib/puppet/provider/network_config/wrlinux.rb - create mode 100644 packstack/puppet/modules/network/lib/puppet/provider/network_route/wrlinux.rb - create mode 100644 packstack/puppet/modules/network/manifests/bond/wrlinux.pp - -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb -index 4b6de7e..758f387 100644 ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb -@@ -19,7 +19,12 @@ Puppet::Type.type(:network_config).provide(:redhat) do - has_feature :provider_options - - # @return [String] The path to network-script directory on redhat systems -- SCRIPT_DIRECTORY = "/etc/sysconfig/network-scripts" -+ # SCRIPT_DIRECTORY = "/etc/sysconfig/network-scripts" -+ # WRS: Generate temporary copies. It will get compared to files under -+ # /etc/sysconfig/network-scripts afterward. Only config that have changed -+ # will get replaced. Don't let puppet directly manage them, else it will -+ # trigger un-wanted networking actions (like up/down). -+ SCRIPT_DIRECTORY = "/var/run/network-scripts.puppet" - - # The valid vlan ID range is 0-4095; 4096 is out of range - VLAN_RANGE_REGEX = %r[\d{1,3}|40[0-9][0-5]] -@@ -35,6 +40,7 @@ Puppet::Type.type(:network_config).provide(:redhat) do - :name => 'DEVICE', - :hotplug => 'HOTPLUG', - :mtu => 'MTU', -+ :gateway => 'GATEWAY', - } - - # Map provider instances to files based on their name -@@ -60,8 +66,14 @@ Puppet::Type.type(:network_config).provide(:redhat) do - # RedhatProvider.target_files - # # => ['/etc/sysconfig/network-scripts/ifcfg-eth0', '/etc/sysconfig/network-scripts/ifcfg-eth1'] - def self.target_files(script_dir = SCRIPT_DIRECTORY) -- entries = Dir.entries(script_dir).select {|entry| entry.match SCRIPT_REGEX} -- entries.map {|entry| File.join(SCRIPT_DIRECTORY, entry)} -+ entries = [] -+ if Dir.exists?(SCRIPT_DIRECTORY) -+ Dir.foreach(SCRIPT_DIRECTORY) do |item| -+ next if not item.match SCRIPT_REGEX -+ entries << item -+ end -+ end -+ entries - end - - # Convert a redhat network script into a hash -@@ -184,6 +196,8 @@ Puppet::Type.type(:network_config).provide(:redhat) do - end - - def self.format_file(filename, providers) -+ Dir.mkdir(SCRIPT_DIRECTORY) unless File.exists?(SCRIPT_DIRECTORY) -+ - if providers.length == 0 - return "" - elsif providers.length > 1 -@@ -193,11 +207,11 @@ Puppet::Type.type(:network_config).provide(:redhat) do - provider = providers[0] - props = {} - -- # Map everything to a flat hash -- props = (provider.options || {}) -+ props = provider.options if provider.options && provider.options != :absent - -+ # Map everything to a flat hash - NAME_MAPPINGS.keys.each do |type_name| -- if (val = provider.send(type_name)) -+ if (val = provider.send(type_name)) && val != :absent - props[type_name] = val - end - end -@@ -214,11 +228,11 @@ Puppet::Type.type(:network_config).provide(:redhat) do - str << %{#{key}=#{val}\n} - end - -+ content.prepend(header) - content - end - - def self.unmunge(props) -- - pairs = {} - - [:onboot, :hotplug].each do |bool_property| -@@ -245,6 +259,17 @@ Puppet::Type.type(:network_config).provide(:redhat) do - pairs - end - -+ def self.header -+ str = <<-HEADER -+# HEADER: This file is is being managed by puppet. Changes to -+# HEADER: interfaces that are not being managed by puppet will persist; -+# HEADER: however changes to interfaces that are being managed by puppet will -+# HEADER: be overwritten. In addition, file order is NOT guaranteed. -+# HEADER: Last generated at: #{Time.now} -+HEADER -+ str -+ end -+ - def self.post_flush_hook(filename) - File.chmod(0644, filename) - end -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_config/wrlinux.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_config/wrlinux.rb -new file mode 100644 -index 0000000..44c645a ---- /dev/null -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_config/wrlinux.rb -@@ -0,0 +1,296 @@ -+require 'puppetx/filemapper' -+ -+Puppet::Type.type(:network_config).provide(:wrlinux) do -+ # Wind River Linux network_config interfaces provider. -+ # -+ # This provider uses the filemapper mixin to map the interfaces file to a -+ # collection of network_config providers, and back. -+ # -+ include PuppetX::FileMapper -+ -+ desc "Wind River interfaces style provider" -+ -+ confine :osfamily => :wrlinux -+ defaultfor :osfamily => :wrlinux -+ -+ has_feature :provider_options -+ has_feature :hotpluggable -+ -+ def select_file -+ '/var/run/interfaces.puppet' -+ end -+ -+ def self.target_files -+ ['/var/run/interfaces.puppet'] -+ end -+ -+ class MalformedInterfacesError < Puppet::Error -+ def initialize(msg = nil) -+ msg = 'Malformed wrlinux interfaces file; cannot instantiate network_config resources' if msg.nil? -+ super -+ end -+ end -+ -+ def self.raise_malformed -+ @failed = true -+ raise MalformedInterfacesError -+ end -+ -+ class Instance -+ -+ attr_reader :name -+ -+ # Booleans -+ attr_accessor :onboot, :hotplug -+ -+ -+ # These fields are going to get rearranged to resolve issue 16 -+ # https://github.com/adrienthebo/puppet-network/issues/16 -+ attr_accessor :ipaddress, :netmask, :family, :method, :mtu -+ -+ # Options hash -+ attr_reader :options -+ -+ def initialize(name) -+ @name = name -+ -+ @options = Hash.new {|hash, key| hash[key] = []} -+ end -+ -+ def to_hash -+ h = { -+ :name => @name, -+ :onboot => @onboot, -+ :hotplug => @hotplug, -+ :ipaddress => @ipaddress, -+ :netmask => @netmask, -+ :family => @family, -+ :method => @method, -+ :mtu => @mtu, -+ :options => squeeze_options -+ } -+ -+ h.inject({}) do |hash, (key, val)| -+ hash[key] = val unless val.nil? -+ hash -+ end -+ end -+ -+ def squeeze_options -+ @options.inject({}) do |hash, (key, value)| -+ if value.size <= 1 -+ hash[key] = value.pop -+ else -+ hash[key] = value -+ end -+ -+ hash -+ end -+ end -+ -+ class << self -+ -+ def reset! -+ @interfaces = {} -+ end -+ -+ # @return [Array] All class instances -+ def all_instances -+ @interfaces ||= {} -+ @interfaces -+ end -+ -+ def [](name) -+ if all_instances[name] -+ obj = all_instances[name] -+ else -+ obj = self.new(name) -+ all_instances[name] = obj -+ end -+ -+ obj -+ end -+ end -+ end -+ -+ def self.parse_file(filename, contents) -+ # Debian has a very irregular format for the interfaces file. The -+ # parse_file method is somewhat derived from the ifup executable -+ # supplied in the debian ifupdown package. The source can be found at -+ # http://packages.debian.org/squeeze/ifupdown -+ -+ -+ # The debian interfaces implementation requires global state while parsing -+ # the file; namely, the stanza being parsed as well as the interface being -+ # parsed. -+ status = :none -+ current_interface = nil -+ -+ lines = contents.split("\n") -+ # TODO Join lines that end with a backslash -+ -+ # Iterate over all lines and determine what attributes they create -+ lines.each do |line| -+ -+ # Strip off any trailing comments -+ line.sub!(/#.*$/, '') -+ -+ case line -+ when /^\s*#|^\s*$/ -+ # Ignore comments and blank lines -+ next -+ -+ when /^auto|^allow-auto/ -+ # Parse out any auto sections -+ interfaces = line.split(' ') -+ interfaces.delete_at(0) -+ -+ interfaces.each do |name| -+ Instance[name].onboot = true -+ end -+ -+ # Reset the current parse state -+ current_interface = nil -+ -+ when /^allow-hotplug/ -+ # parse out allow-hotplug lines -+ -+ interfaces = line.split(' ') -+ interfaces.delete_at(0) -+ -+ interfaces.each do |name| -+ Instance[name].hotplug = true -+ end -+ -+ # Don't reset Reset the current parse state -+ when /^iface/ -+ -+ # Format of the iface line: -+ # -+ # iface -+ # zero or more options for -+ -+ if match = line.match(/^iface\s+(\S+)\s+(\S+)\s+(\S+)/) -+ name = match[1] -+ family = match[2] -+ method = match[3] -+ -+ # If an iface block for this interface has been seen, the file is -+ # malformed. -+ raise_malformed if Instance[name] and Instance[name].family -+ -+ status = :iface -+ current_interface = name -+ -+ # This is done automatically -+ #Instance[name].name = name -+ Instance[name].family = family -+ Instance[name].method = method -+ -+ else -+ # If we match on a string with a leading iface, but it isn't in the -+ # expected format, malformed blar blar -+ raise_malformed -+ end -+ -+ when /^mapping/ -+ -+ # XXX dox -+ raise Puppet::DevError, "Debian interfaces mapping parsing not implemented." -+ status = :mapping -+ -+ else -+ # We're currently examining a line that is within a mapping or iface -+ # stanza, so we need to validate the line and add the options it -+ # specifies to the known state of the interface. -+ -+ case status -+ when :iface -+ if match = line.match(/(\S+)\s+(\S.*)/) -+ # If we're parsing an iface stanza, then we should receive a set of -+ # lines that contain two or more space delimited strings. Append -+ # them as options to the iface in an array. -+ -+ key = match[1] -+ val = match[2] -+ -+ name = current_interface -+ -+ case key -+ when 'address'; Instance[name].ipaddress = val -+ when 'netmask'; Instance[name].netmask = val -+ when 'mtu'; Instance[name].mtu = val -+ else Instance[name].options[key] << val -+ end -+ else -+ raise_malformed -+ end -+ when :mapping -+ raise Puppet::DevError, "Debian interfaces mapping parsing not implemented." -+ when :none -+ raise_malformed -+ end -+ end -+ end -+ -+ Instance.all_instances.map {|name, instance| instance.to_hash } -+ end -+ -+ # Generate an array of sections -+ def self.format_file(filename, providers) -+ contents = [] -+ contents << header -+ -+ # Add onboot interfaces -+ if (auto_interfaces = providers.select {|provider| provider.onboot == true }) -+ stanza = [] -+ stanza << "auto " + auto_interfaces.map(&:name).sort.join(" ") -+ contents << stanza.join("\n") -+ end -+ -+ # Build iface stanzas -+ providers.sort_by(&:name).each do |provider| -+ # TODO add validation method -+ raise Puppet::Error, "#{provider.name} does not have a method." if provider.method.nil? -+ raise Puppet::Error, "#{provider.name} does not have a family." if provider.family.nil? -+ -+ stanza = [] -+ stanza << %{iface #{provider.name} #{provider.family} #{provider.method}} -+ -+ [ -+ [:ipaddress, 'address'], -+ [:netmask, 'netmask'], -+ [:mtu, 'mtu'], -+ ].each do |(property, section)| -+ stanza << " #{section} #{provider.send property}" if provider.send(property) and provider.send(property) != :absent -+ end -+ -+ if provider.options and provider.options != :absent -+ provider.options.each_pair do |key, val| -+ if val.is_a? String -+ stanza << " #{key} #{val}" -+ elsif val.is_a? Array -+ val.each { |entry| stanza << " #{key} #{entry}" } -+ else -+ raise Puppet::Error, "#{self} options key #{key} expects a String or Array, got #{val.class}" -+ end -+ end -+ end -+ -+ contents << stanza.join("\n") -+ end -+ -+ contents.map {|line| line + "\n\n"}.join -+ end -+ -+ def self.header -+ str = <<-HEADER -+# HEADER: This file is is being managed by puppet. Changes to -+# HEADER: interfaces that are not being managed by puppet will persist; -+# HEADER: however changes to interfaces that are being managed by puppet will -+# HEADER: be overwritten. In addition, file order is NOT guaranteed. -+# HEADER: Last generated at: #{Time.now} -+HEADER -+ str -+ end -+end -diff --git a/packstack/puppet/modules/network/lib/puppet/provider/network_route/wrlinux.rb b/packstack/puppet/modules/network/lib/puppet/provider/network_route/wrlinux.rb -new file mode 100644 -index 0000000..d3fa7b5 ---- /dev/null -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_route/wrlinux.rb -@@ -0,0 +1,109 @@ -+require 'ipaddr' -+require 'puppetx/filemapper' -+ -+Puppet::Type.type(:network_route).provide(:wrlinux) do -+ # Wind River Linux network_route routes provider. -+ # -+ # This provider uses the filemapper mixin to map the routes file to a -+ # collection of network_route providers, and back. -+ # -+ include PuppetX::FileMapper -+ -+ desc "Wind River routes style provider" -+ -+ confine :osfamily => :wrlinux -+ -+ # $ dpkg -S /etc/network/if-up.d/20static-routes -+ # ifupdown-extra: /etc/network/if-up.d/20static-routes -+ confine :exists => '/etc/network/if-up.d/20static-routes' -+ -+ defaultfor :osfamily => :wrlinux -+ -+ has_feature :provider_options -+ -+ def select_file -+ '/etc/network/routes' -+ end -+ -+ def self.target_files -+ ['/etc/network/routes'] -+ end -+ -+ class MalformedRoutesError < Puppet::Error -+ def initialize(msg = nil) -+ msg = 'Malformed wrlinux routes file; cannot instantiate network_route resources' if msg.nil? -+ super -+ end -+ end -+ -+ def self.raise_malformed -+ @failed = true -+ raise MalformedRoutesError -+ end -+ -+ def self.parse_file(filename, contents) -+ # Build out an empty hash for new routes for storing their configs. -+ route_hash = Hash.new do |hash, key| -+ hash[key] = {} -+ hash[key][:name] = key -+ hash[key] -+ end -+ -+ lines = contents.split("\n") -+ lines.each do |line| -+ # Strip off any trailing comments -+ line.sub!(/#.*$/, '') -+ -+ if line =~ /^\s*#|^\s*$/ -+ # Ignore comments and blank lines -+ next -+ end -+ -+ route = line.split(' ', 5) -+ -+ if route.length < 4 -+ raise_malformed -+ end -+ -+ # use the CIDR version of the target as :name -+ cidr_target = "#{route[0]}/#{IPAddr.new(route[1]).to_i.to_s(2).count('1')}" -+ -+ route_hash[cidr_target][:network] = route[0] -+ route_hash[cidr_target][:netmask] = route[1] -+ route_hash[cidr_target][:gateway] = route[2] -+ route_hash[cidr_target][:interface] = route[3] -+ route_hash[cidr_target][:options] = route[4] if route[4] -+ end -+ -+ route_hash.values -+ end -+ -+ # Generate an array of sections -+ def self.format_file(filename, providers) -+ contents = [] -+ contents << header -+ -+ # Build routes -+ providers.sort_by(&:name).each do |provider| -+ raise Puppet::Error, "#{provider.name} is missing the required parameter 'network'." if provider.network.nil? -+ raise Puppet::Error, "#{provider.name} is missing the required parameter 'netmask'." if provider.netmask.nil? -+ raise Puppet::Error, "#{provider.name} is missing the required parameter 'gateway'." if provider.gateway.nil? -+ raise Puppet::Error, "#{provider.name} is missing the required parameter 'interface'." if provider.interface.nil? -+ -+ contents << "#{provider.network} #{provider.netmask} #{provider.gateway} #{provider.interface} #{provider.options}\n" -+ end -+ -+ contents.join -+ end -+ -+ def self.header -+ str = <<-HEADER -+# HEADER: This file is is being managed by puppet. Changes to -+# HEADER: routes that are not being managed by puppet will persist; -+# HEADER: however changes to routes that are being managed by puppet will -+# HEADER: be overwritten. In addition, file order is NOT guaranteed. -+# HEADER: Last generated at: #{Time.now} -+HEADER -+ str -+ end -+end -diff --git a/packstack/puppet/modules/network/lib/puppet/type/network_config.rb b/packstack/puppet/modules/network/lib/puppet/type/network_config.rb -index a50a0df..1297ad7 100644 ---- a/packstack/puppet/modules/network/lib/puppet/type/network_config.rb -+++ b/packstack/puppet/modules/network/lib/puppet/type/network_config.rb -@@ -95,6 +95,10 @@ Puppet::Type.newtype(:network_config) do - defaultto :raw - end - -+ newproperty(:gateway) do -+ desc 'The IP address of the network router or gateway device (if any)' -+ end -+ - # `:options` provides an arbitrary passthrough for provider properties, so - # that provider specific behavior doesn't clutter up the main type but still - # allows for more powerful actions to be taken. -diff --git a/packstack/puppet/modules/network/manifests/bond.pp b/packstack/puppet/modules/network/manifests/bond.pp -index d6d98ce..26ca104 100644 ---- a/packstack/puppet/modules/network/manifests/bond.pp -+++ b/packstack/puppet/modules/network/manifests/bond.pp -@@ -188,6 +188,28 @@ define network::bond( - require => Kmod::Alias[$name], - } - } -+ WRLinux: { -+ network::bond::wrlinux { $name: -+ slaves => $slaves, -+ ensure => $ensure, -+ ipaddress => $ipaddress, -+ netmask => $netmask, -+ method => $method, -+ family => $family, -+ onboot => $onboot, -+ -+ mode => $mode, -+ miimon => $miimon, -+ downdelay => $downdelay, -+ updelay => $updelay, -+ lacp_rate => $lacp_rate, -+ primary => $primary, -+ primary_reselect => $primary_reselect, -+ xmit_hash_policy => $xmit_hash_policy, -+ -+ require => Kmod::Alias[$name], -+ } -+ } - RedHat: { - network::bond::redhat { $name: - ensure => $ensure, -diff --git a/packstack/puppet/modules/network/manifests/bond/setup.pp b/packstack/puppet/modules/network/manifests/bond/setup.pp -index abe1252..0a30767 100644 ---- a/packstack/puppet/modules/network/manifests/bond/setup.pp -+++ b/packstack/puppet/modules/network/manifests/bond/setup.pp -@@ -10,5 +10,7 @@ class network::bond::setup { - ensure => present, - } - } -+ WRLinux: { -+ } - } - } -diff --git a/packstack/puppet/modules/network/manifests/bond/wrlinux.pp b/packstack/puppet/modules/network/manifests/bond/wrlinux.pp -new file mode 100644 -index 0000000..e240341 ---- /dev/null -+++ b/packstack/puppet/modules/network/manifests/bond/wrlinux.pp -@@ -0,0 +1,56 @@ -+# = Define: network::bond::wrlinux -+# -+# Instantiate bonded interfaces on Debian based systems. -+# -+# == See also -+# -+# * Debian Network Bonding http://wiki.wrlinux.org/Bonding -+define network::bond::wrlinux( -+ $slaves, -+ $ensure = present, -+ $ipaddress = undef, -+ $netmask = undef, -+ $method = undef, -+ $family = undef, -+ $onboot = undef, -+ -+ $mode = undef, -+ $miimon = undef, -+ $downdelay = undef, -+ $updelay = undef, -+ $lacp_rate = undef, -+ $primary = undef, -+ $primary_reselect = undef, -+ $xmit_hash_policy = undef, -+) { -+ -+ $raw = { -+ 'bond-slaves' => join($slaves, ' '), -+ 'bond-mode' => $mode, -+ 'bond-miimon' => $miimon, -+ 'bond-downdelay' => $downdelay, -+ 'bond-updelay' => $updelay, -+ 'bond-lacp-rate' => $lacp_rate, -+ 'bond-primary' => $primary, -+ 'bond-primary-reselect' => $primary_reselect, -+ 'bond-xmit-hash-policy' => $xmit_hash_policy, -+ } -+ -+ $opts = compact_hash($raw) -+ -+ network_config { $name: -+ ensure => $ensure, -+ ipaddress => $ipaddress, -+ netmask => $netmask, -+ family => $family, -+ method => $method, -+ onboot => $onboot, -+ options => $opts, -+ } -+ -+ network_config { $slaves: -+ ensure => absent, -+ reconfigure => true, -+ before => Network_config[$name], -+ } -+} --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/files/puppet-network-support-ipv6.patch b/config/puppet-modules/puppet-network/centos/files/puppet-network-support-ipv6.patch deleted file mode 100644 index b6d2f3c91..000000000 --- a/config/puppet-modules/puppet-network/centos/files/puppet-network-support-ipv6.patch +++ /dev/null @@ -1,46 +0,0 @@ -Index: packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb ---- a/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb -+++ b/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb -@@ -224,6 +224,11 @@ - - pairs = self.unmunge props - -+ ip_version = provider.send(:family) -+ if (ip_version.to_s == "inet6") -+ pairs = self.ipv6_fixup pairs -+ end -+ - content = pairs.inject('') do |str, (key, val)| - str << %{#{key}=#{val}\n} - end -@@ -259,6 +264,30 @@ - pairs - end - -+ def self.ipv6_fixup(pairs) -+ pairs['IPV6INIT'] = 'yes' -+ -+ if (pairs.include? 'NETMASK' and pairs.include? 'IPADDR') -+ pairs['IPV6ADDR'] = pairs['IPADDR'].to_s + "/" + pairs['NETMASK'].to_s -+ pairs.delete('NETMASK') -+ pairs.delete('IPADDR') -+ elsif (pairs.include? 'IPADDR') -+ pairs['IPV6ADDR'] = pairs['IPADDR'].to_s -+ pairs.delete('IPADDR') -+ end -+ -+ if (pairs.include? 'GATEWAY') -+ pairs['IPV6_DEFAULTGW'] = pairs['GATEWAY'] -+ pairs.delete('GATEWAY') -+ end -+ -+ if (pairs['BOOTPROTO'].to_s == 'dhcp') -+ pairs['DHCPV6C'] = 'yes' -+ pairs['DHCLIENTARGS'] = '-1' -+ end -+ pairs -+ end -+ - def self.header - str = <<-HEADER - # HEADER: This file is is being managed by puppet. Changes to diff --git a/config/puppet-modules/puppet-network/centos/files/route-options-support.patch b/config/puppet-modules/puppet-network/centos/files/route-options-support.patch deleted file mode 100644 index 37bf13867..000000000 --- a/config/puppet-modules/puppet-network/centos/files/route-options-support.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c26a70ab9d5839f90148c578edc5d15133355194 Mon Sep 17 00:00:00 2001 -From: Kevin Smith -Date: Wed, 25 Oct 2017 07:37:52 -0500 -Subject: [PATCH 1/1] route options support - ---- - packstack/puppet/modules/network/lib/puppet/type/network_route.rb | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/packstack/puppet/modules/network/lib/puppet/type/network_route.rb b/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -index fd52c58..13ca06a 100644 ---- a/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -+++ b/packstack/puppet/modules/network/lib/puppet/type/network_route.rb -@@ -3,6 +3,11 @@ require 'ipaddr' - Puppet::Type.newtype(:network_route) do - @doc = "Manage non-volatile route configuration information" - -+ feature :provider_options, <<-EOD -+ The provider can accept an arbitrary options string. The semantics of -+ these options will depend on the provider. -+ EOD -+ - ensurable - - newparam(:name) do --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-network/centos/puppet-network.spec b/config/puppet-modules/puppet-network/centos/puppet-network.spec deleted file mode 100644 index 7b53bdb74..000000000 --- a/config/puppet-modules/puppet-network/centos/puppet-network.spec +++ /dev/null @@ -1,49 +0,0 @@ -%global git_sha 7deacd5fdc22c0543455878a8d1872f2f5417c1d -%global module_dir network - -Name: puppet-network -Version: 1.0.2 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet Network module -License: Apache - -URL: https://github.com/voxpupuli/puppet-network - -Source0: %{name}-%{git_sha}.tar.gz - -Patch0: puppet-network-Kilo-quilt-changes.patch -Patch1: puppet-network-support-ipv6.patch -Patch2: Don-t-write-absent-to-redhat-route-files-and-test-fo.patch -Patch3: fix-absent-options.patch -Patch4: permit-inservice-update-of-static-routes.patch -Patch5: ipv6-static-route-support.patch -Patch6: route-options-support.patch - - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module to manage non volatile network and route configuration - -%prep -%setup -c %{module_dir} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 - - - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-nslcd/centos/build_srpm.data b/config/puppet-modules/puppet-nslcd/centos/build_srpm.data deleted file mode 100644 index cdc544075..000000000 --- a/config/puppet-modules/puppet-nslcd/centos/build_srpm.data +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX=puppet -MODULE=nslcd -VERSION=0.0.1 - -GIT_SHA=b8c19b1ada89865f2e50758e054583798ad8011a - -# Generic Copy routine -# Un-patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz" - -#Patched -#COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-nslcd/centos/puppet-nslcd.spec b/config/puppet-modules/puppet-nslcd/centos/puppet-nslcd.spec deleted file mode 100644 index ffcafccc0..000000000 --- a/config/puppet-modules/puppet-nslcd/centos/puppet-nslcd.spec +++ /dev/null @@ -1,31 +0,0 @@ -%global git_sha b8c19b1ada89865f2e50758e054583798ad8011a -%global module_dir nslcd - -Name: puppet-nslcd -Version: 0.0.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet nslcd module -License: Apache - -URL: https://github.com/jlyheden/puppet-nslcd - -Source0: %{name}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module for nslcd - local LDAP name service daemon - -%prep -%autosetup -c %{module_dir} - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R packstack/puppet/modules/%{module_dir} %{buildroot}/%{_datadir}/puppet/modules - -%files -#%license packstack/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-postgresql-4.8.0/centos/build_srpm.data b/config/puppet-modules/puppet-postgresql-4.8.0/centos/build_srpm.data deleted file mode 100644 index 60d1412dc..000000000 --- a/config/puppet-modules/puppet-postgresql-4.8.0/centos/build_srpm.data +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX=puppetlabs -MODULE=postgresql -VERSION=4.8.0 - -GIT_SHA=d022a56b28b2174456fc0f6adc51a4b54493afad - -#Patched -COPY_LIST="$CGCS_BASE/downloads/puppet/$PREFIX-$MODULE-$GIT_SHA.tar.gz $FILES_BASE/*" - - - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0001-Roll-up-TIS-patches.patch b/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0001-Roll-up-TIS-patches.patch deleted file mode 100644 index ed917cd8d..000000000 --- a/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0001-Roll-up-TIS-patches.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 94cc61ad7f76d94791fee4f596d3c8c3124c0526 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 11 Jan 2017 14:25:20 -0500 -Subject: [PATCH] Roll up TIS patches - ---- - manifests/params.pp | 2 +- - manifests/server/config.pp | 8 ++++++-- - manifests/server/initdb.pp | 9 +++++++++ - 3 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/manifests/params.pp b/manifests/params.pp -index d40a1eb..45be360 100644 ---- a/manifests/params.pp -+++ b/manifests/params.pp -@@ -74,7 +74,7 @@ class postgresql::params inherits postgresql::globals { - } - $psql_path = pick($psql_path, "${bindir}/psql") - -- $service_status = $service_status -+ $service_status = "systemctl is-active postgresql" - $service_reload = "service ${service_name} reload" - $perl_package_name = pick($perl_package_name, 'perl-DBD-Pg') - $python_package_name = pick($python_package_name, 'python-psycopg2') -diff --git a/manifests/server/config.pp b/manifests/server/config.pp -index 205dd22..2ecad4b 100644 ---- a/manifests/server/config.pp -+++ b/manifests/server/config.pp -@@ -111,6 +111,12 @@ class postgresql::server::config { - postgresql::server::config_entry { 'data_directory': - value => $datadir, - } -+ postgresql::server::config_entry { 'hba_file': -+ value => $pg_hba_conf_path, -+ } -+ postgresql::server::config_entry { 'ident_file': -+ value => $pg_ident_conf_path, -+ } - if $timezone { - postgresql::server::config_entry { 'timezone': - value => $timezone, -@@ -154,7 +160,6 @@ class postgresql::server::config { - concat { $pg_ident_conf_path: - owner => $user, - group => $group, -- force => true, # do not crash if there is no pg_ident_rules - mode => '0640', - warn => true, - notify => Class['postgresql::server::reload'], -@@ -165,7 +170,6 @@ class postgresql::server::config { - concat { $recovery_conf_path: - owner => $user, - group => $group, -- force => true, # do not crash if there is no recovery conf file - mode => '0640', - warn => true, - notify => Class['postgresql::server::reload'], -diff --git a/manifests/server/initdb.pp b/manifests/server/initdb.pp -index 2252a19..5e263e3 100644 ---- a/manifests/server/initdb.pp -+++ b/manifests/server/initdb.pp -@@ -3,6 +3,7 @@ class postgresql::server::initdb { - $needs_initdb = $postgresql::server::needs_initdb - $initdb_path = $postgresql::server::initdb_path - $datadir = $postgresql::server::datadir -+ $confdir = $postgresql::server::confdir - $xlogdir = $postgresql::server::xlogdir - $logdir = $postgresql::server::logdir - $encoding = $postgresql::server::encoding -@@ -41,6 +42,14 @@ class postgresql::server::initdb { - seltype => $seltype, - } - -+ # Make sure the conf directory exists, and has the correct permissions. -+ file { $confdir: -+ ensure => directory, -+ owner => $user, -+ group => $group, -+ mode => '0700', -+ } -+ - if($xlogdir) { - # Make sure the xlog directory exists, and has the correct permissions. - file { $xlogdir: --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0002-remove-puppetlabs-apt-as-a-requirement.patch b/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0002-remove-puppetlabs-apt-as-a-requirement.patch deleted file mode 100644 index d19b49c6a..000000000 --- a/config/puppet-modules/puppet-postgresql-4.8.0/centos/files/0002-remove-puppetlabs-apt-as-a-requirement.patch +++ /dev/null @@ -1,24 +0,0 @@ -From dd019f3e222c799afff53cb00447c130839f7d39 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 3 Jan 2018 14:11:08 -0600 -Subject: [PATCH] remove puppetlabs-apt as a requirement - ---- - metadata.json | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/metadata.json b/metadata.json -index 2a59dc9..b1de7f0 100644 ---- a/metadata.json -+++ b/metadata.json -@@ -9,7 +9,6 @@ - "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", - "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":"4.x"}, -- {"name":"puppetlabs/apt","version_requirement":">=1.8.0 <3.0.0"}, - {"name":"puppetlabs/concat","version_requirement":">= 1.1.0 <3.0.0"} - ], - "data_provider": null, --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-postgresql-4.8.0/centos/puppet-postgresql.spec b/config/puppet-modules/puppet-postgresql-4.8.0/centos/puppet-postgresql.spec deleted file mode 100644 index 7f8c524f5..000000000 --- a/config/puppet-modules/puppet-postgresql-4.8.0/centos/puppet-postgresql.spec +++ /dev/null @@ -1,56 +0,0 @@ -%global git_sha d022a56b28b2174456fc0f6adc51a4b54493afad -%global prefix puppetlabs -%global module_dir postgresql - -Name: puppet-%{module_dir} -Version: 4.8.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet %{module_dir} module -License: Apache - -URL: https://github.com/puppetlabs/puppetlabs-postgresql - -Source0: %{prefix}-%{module_dir}-%{git_sha}.tar.gz - -Patch0001: 0001-Roll-up-TIS-patches.patch -Patch0002: 0002-remove-puppetlabs-apt-as-a-requirement.patch - -BuildArch: noarch - -BuildRequires: python2-devel - -# According to .fixtures.yml the following puppet modules are also needed -#Requires: puppet-apt -Requires: puppet-stdlib -Requires: puppet-firewall -Requires: puppet-concat - - -%description -A Puppet module for managing PostgreSQL databases - -%define local_bindir /usr/local/bin - -%prep -%setup -n %{prefix}-%{module_dir} -%patch0001 -p1 -%patch0002 -p1 - -find . -type f -name ".*" -exec rm {} + -find . -size 0 -exec rm {} + -find . \( -name "*.pl" -o -name "*.sh" \) -exec chmod +x {} + -find . \( -name "*.pp" -o -name "*.py" \) -exec chmod -x {} + -find . \( -name "*.rb" -o -name "*.erb" \) -exec chmod -x {} + -find . \( -name spec -o -name ext \) | xargs rm -rf - -%install -rm -rf %{buildroot} -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -rp * %{buildroot}/%{_datadir}/puppet/modules/%{module_dir}/ -install -d -m 0755 %{buildroot}%{local_bindir}/ -install -p -D -m 755 files/validate_postgresql_connection.sh %{buildroot}%{local_bindir}/ - -%files -%license %{_datadir}/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} -%{local_bindir}/validate_postgresql_connection.sh diff --git a/config/puppet-modules/puppet-puppi/centos/build_srpm.data b/config/puppet-modules/puppet-puppi/centos/build_srpm.data deleted file mode 100644 index 7d152abd8..000000000 --- a/config/puppet-modules/puppet-puppi/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -MODULE=puppi -VERSION=2.2.3 - -GIT_SHA=c1c47f4edfd761d1bbde32a75da0c3fa7cc93a81 - -COPY_LIST="$CGCS_BASE/downloads/puppet/$MODULE-$GIT_SHA.tar.gz" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-puppi/centos/puppet-puppi.spec b/config/puppet-modules/puppet-puppi/centos/puppet-puppi.spec deleted file mode 100644 index bcb340a10..000000000 --- a/config/puppet-modules/puppet-puppi/centos/puppet-puppi.spec +++ /dev/null @@ -1,31 +0,0 @@ -%global git_sha c1c47f4edfd761d1bbde32a75da0c3fa7cc93a81 -%global module_dir puppi - -Name: puppet-puppi -Version: 2.2.3 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Puppet Puppi module -License: Apache - -URL: https://github.com/example42/puppi - -Source0: %{module_dir}-%{git_sha}.tar.gz - -BuildArch: noarch - -BuildRequires: python2-devel - -%description -A Puppet module to provide puppet knowledge to CLI - -%prep -%setup -n puppi-master - -%install -install -d -m 0755 %{buildroot}/%{_datadir}/puppet/modules/%{module_dir} -cp -R ../puppi-master/* %{buildroot}/%{_datadir}/puppet/modules/%{module_dir}/. - -%files -%license %{_datadir}/puppet/modules/%{module_dir}/LICENSE -%{_datadir}/puppet/modules/%{module_dir} - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/build_srpm.data b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 49da59414..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a1d4efe436a005962d677a146a261ac175b6b55f Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 1 Nov 2017 14:35:36 -0500 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - ---- - SPECS/puppet-rabbitmq.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index 987ba3b..dc2c81b 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -14,7 +14,7 @@ - - Name: puppet-rabbitmq - Version: 5.6.0 --Release: 4%{?alphatag}%{?dist} -+Release: 4.5ac45degit.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Installs, configures, and manages RabbitMQ. - License: ASL 2.0 - --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0002-Add-TIS-patch.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0002-Add-TIS-patch.patch deleted file mode 100644 index 75f3a87a9..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0002-Add-TIS-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 287fb29ea7d1bb31af50701bd7ac0e12c1524197 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 1 Nov 2017 14:44:13 -0500 -Subject: [PATCH 2/2] Add-TIS-patch - ---- - SPECS/puppet-rabbitmq.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index dc2c81b..c96099b 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -21,6 +21,7 @@ License: ASL 2.0 - URL: https://github.com/puppetlabs/puppetlabs-rabbitmq - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz -+Patch0001: 0001-Roll-up-TIS-patches.patch - - BuildArch: noarch - -@@ -33,6 +34,7 @@ Installs, configures, and manages RabbitMQ. - - %prep - %setup -q -n %{tarsources}-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0003-meta-Changed-cipher-specification-to-openssl-format.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0003-meta-Changed-cipher-specification-to-openssl-format.patch deleted file mode 100644 index 885da3030..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0003-meta-Changed-cipher-specification-to-openssl-format.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 95d7ce5d66e9a583045ce2789813a49e738b20eb Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 1 Nov 2017 14:49:05 -0500 -Subject: [PATCH 3/3] Changed cipher specification to openssl format - -By default, the config file is set up to accept ciphers in erlang format. -Our existing services (haproxy, lighttpd) both uses openssl format. -This change makes the config file generated by packstack assume the ciphers -given is in openssl format. Specifying ciphers in the same format makes it -easier to maintain. ---- - SPECS/puppet-rabbitmq.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index c96099b..6541bc7 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -22,6 +22,7 @@ URL: https://github.com/puppetlabs/puppetlabs-rabbitmq - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch -+Patch0002: 0002-Changed-cipher-specification-to-openssl-format.patch - - BuildArch: noarch - -@@ -35,6 +36,7 @@ Installs, configures, and manages RabbitMQ. - %prep - %setup -q -n %{tarsources}-%{upstream_version} - %patch0001 -p1 -+%patch0002 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0004-Add-deprecation-patch-to-spec.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0004-Add-deprecation-patch-to-spec.patch deleted file mode 100644 index 7910474bf..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0004-Add-deprecation-patch-to-spec.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0e807a7738ff0455da4a54b5e4176bc13985f19f Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 19 Dec 2017 09:50:00 -0600 -Subject: [PATCH] Add deprecation patch to spec - ---- - SPECS/puppet-rabbitmq.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index 6541bc7..e2a29cb 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -23,6 +23,7 @@ URL: https://github.com/puppetlabs/puppetlabs-rabbitmq - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Changed-cipher-specification-to-openssl-format.patch -+Patch0003: 0003-Eliminate-Puppet-4-deprecation-warnings.patch - - BuildArch: noarch - -@@ -37,6 +38,8 @@ Installs, configures, and manages RabbitMQ. - %setup -q -n %{tarsources}-%{upstream_version} - %patch0001 -p1 - %patch0002 -p1 -+%patch0003 -p1 -+ - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0005-metapatch-for-revert.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0005-metapatch-for-revert.patch deleted file mode 100644 index c045588a2..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0005-metapatch-for-revert.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fbb9b6275c4c199643d51bf6d192ae7623dcef99 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 24 Jan 2018 16:04:04 -0600 -Subject: [PATCH 4/4] metapatch for revert patch - ---- - SPECS/puppet-rabbitmq.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index e2a29cb..17a12bc 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -24,6 +24,7 @@ Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit} - Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Changed-cipher-specification-to-openssl-format.patch - Patch0003: 0003-Eliminate-Puppet-4-deprecation-warnings.patch -+Patch0004: 0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch - - BuildArch: noarch - -@@ -39,6 +40,7 @@ Installs, configures, and manages RabbitMQ. - %patch0001 -p1 - %patch0002 -p1 - %patch0003 -p1 -+%patch0004 -p1 - - - find . -type f -name ".*" -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0006-metapatch-for-fact-removal.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0006-metapatch-for-fact-removal.patch deleted file mode 100644 index 43fd42e9e..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/0006-metapatch-for-fact-removal.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 35277432f8da1569fdb472b4459b687695807ece Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Fri, 2 Feb 2018 12:32:19 -0600 -Subject: [PATCH] metapatch for fact removal - ---- - SPECS/puppet-rabbitmq.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec -index 17a12bc..7f3a412 100644 ---- a/SPECS/puppet-rabbitmq.spec -+++ b/SPECS/puppet-rabbitmq.spec -@@ -25,6 +25,7 @@ Patch0001: 0001-Roll-up-TIS-patches.patch - Patch0002: 0002-Changed-cipher-specification-to-openssl-format.patch - Patch0003: 0003-Eliminate-Puppet-4-deprecation-warnings.patch - Patch0004: 0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch -+Patch0005: 0005-Remove-the-rabbitmq_nodename-fact.patch - - BuildArch: noarch - -@@ -41,6 +42,7 @@ Installs, configures, and manages RabbitMQ. - %patch0002 -p1 - %patch0003 -p1 - %patch0004 -p1 -+%patch0005 -p1 - - - find . -type f -name ".*" -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 4a294d514..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,6 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-patch.patch -0003-meta-Changed-cipher-specification-to-openssl-format.patch -0004-Add-deprecation-patch-to-spec.patch -0005-metapatch-for-revert.patch -0006-metapatch-for-fact-removal.patch diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0001-Roll-up-TIS-patches.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0001-Roll-up-TIS-patches.patch deleted file mode 100644 index a8fda4854..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0001-Roll-up-TIS-patches.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 6170b01db0dea2b58fc0f150704205f7aac82ab4 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 2 Nov 2017 09:22:58 -0500 -Subject: [PATCH 1/2] WRS: Patch1: 0001-Roll-up-TIS-patches.patch - ---- - lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb | 6 ++++++ - manifests/config.pp | 6 +++--- - manifests/init.pp | 5 +++-- - manifests/install.pp | 4 +++- - manifests/install/rabbitmqadmin.pp | 3 ++- - manifests/params.pp | 1 + - 6 files changed, 18 insertions(+), 7 deletions(-) - -diff --git a/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb b/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb -index 7e73295..438d9cc 100644 ---- a/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb -+++ b/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb -@@ -95,6 +95,12 @@ Puppet::Type.type(:rabbitmq_policy).provide(:rabbitmqctl, :parent => Puppet::Pro - resource[:definition] ||= definition - resource[:pattern] ||= pattern - resource[:priority] ||= priority -+ # WRS. Values passed in from packstack are in string format. These need -+ # to be converted back to integer for certain parameters (e.g. max-length, -+ # expires) -+ if (resource[:definition].keys & ["max-length", "expires"]).any? -+ resource[:definition].each {|k,v| resource[:definition][k] = v.to_i} -+ end - # rabbitmq>=3.2.0 - if Puppet::Util::Package.versioncmp(self.class.rabbitmq_version, '3.2.0') >= 0 - rabbitmqctl('set_policy', -diff --git a/manifests/config.pp b/manifests/config.pp -index 6e1f7f5..66a8b08 100644 ---- a/manifests/config.pp -+++ b/manifests/config.pp -@@ -116,7 +116,7 @@ class rabbitmq::config { - ensure => directory, - owner => '0', - group => '0', -- mode => '0644', -+ mode => '0640', - } - - file { '/etc/rabbitmq/ssl': -@@ -132,7 +132,7 @@ class rabbitmq::config { - content => template($config), - owner => '0', - group => '0', -- mode => '0644', -+ mode => '0640', - notify => Class['rabbitmq::service'], - } - -@@ -142,7 +142,7 @@ class rabbitmq::config { - content => template($env_config), - owner => '0', - group => '0', -- mode => '0644', -+ mode => '0640', - notify => Class['rabbitmq::service'], - } - -diff --git a/manifests/init.pp b/manifests/init.pp -index 363c70d..3451599 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -11,6 +11,7 @@ class rabbitmq( - Hash $config_shovel_statics = $rabbitmq::params::config_shovel_statics, - String $default_user = $rabbitmq::params::default_user, - String $default_pass = $rabbitmq::params::default_pass, -+ String $default_host = $rabbitmq::params::default_host, - Boolean $delete_guest_user = $rabbitmq::params::delete_guest_user, - String $env_config = $rabbitmq::params::env_config, - Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path, -@@ -186,7 +187,7 @@ class rabbitmq( - - rabbitmq_plugin { 'rabbitmq_management': - ensure => present, -- require => Class['rabbitmq::install'], -+ require => [ File['/etc/rabbitmq'], Class['rabbitmq::install'] ], - notify => Class['rabbitmq::service'], - provider => 'rabbitmqplugins', - } -@@ -206,7 +207,7 @@ class rabbitmq( - if ($ldap_auth) { - rabbitmq_plugin { 'rabbitmq_auth_backend_ldap': - ensure => present, -- require => Class['rabbitmq::install'], -+ require => [ File['/etc/rabbitmq'], Class['rabbitmq::install'] ], - notify => Class['rabbitmq::service'], - } - } -diff --git a/manifests/install.pp b/manifests/install.pp -index 20ca090..45072c4 100644 ---- a/manifests/install.pp -+++ b/manifests/install.pp -@@ -11,7 +11,9 @@ class rabbitmq::install { - package { 'rabbitmq-server': - ensure => $package_ensure, - name => $package_name, -- provider => $package_provider, -+ # DPENNEY: For some reason, package_provider is coming out as yum. -+ # Hardcode as rpm for now. -+ provider => 'rpm', - notify => Class['rabbitmq::service'], - require => $package_require, - } -diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp -index e0ab7c7..9a3a8dd 100644 ---- a/manifests/install/rabbitmqadmin.pp -+++ b/manifests/install/rabbitmqadmin.pp -@@ -11,6 +11,7 @@ class rabbitmq::install::rabbitmqadmin { - - $default_user = $rabbitmq::default_user - $default_pass = $rabbitmq::default_pass -+ $default_host = $rabbitmq::default_host - $node_ip_address = $rabbitmq::node_ip_address - - if $rabbitmq::node_ip_address == 'UNSET' { -@@ -27,7 +28,7 @@ class rabbitmq::install::rabbitmqadmin { - - staging::file { 'rabbitmqadmin': - target => "${rabbitmq::rabbitmq_home}/rabbitmqadmin", -- source => "${protocol}://${default_user}:${default_pass}@${sanitized_ip}:${management_port}/cli/rabbitmqadmin", -+ source => "${protocol}://${default_user}:${default_pass}@${default_host}:${management_port}/cli/rabbitmqadmin", - curl_option => "-k ${curl_prefix} --retry 30 --retry-delay 6", - timeout => '180', - wget_option => '--no-proxy', -diff --git a/manifests/params.pp b/manifests/params.pp -index ffface9..da0d2b4 100644 ---- a/manifests/params.pp -+++ b/manifests/params.pp -@@ -87,6 +87,7 @@ class rabbitmq::params { - $config_shovel_statics = {} - $default_user = 'guest' - $default_pass = 'guest' -+ $default_host = 'localhost' - $delete_guest_user = false - $env_config = 'rabbitmq/rabbitmq-env.conf.erb' - $env_config_path = '/etc/rabbitmq/rabbitmq-env.conf' --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0002-Changed-cipher-specification-to-openssl-format.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0002-Changed-cipher-specification-to-openssl-format.patch deleted file mode 100644 index a58966d86..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0002-Changed-cipher-specification-to-openssl-format.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c6a94f3bbc69d82c74cc597b6b7b1fe5813b0537 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 2 Nov 2017 09:22:58 -0500 -Subject: [PATCH 2/2] WRS: Patch2: - 0002-Changed-cipher-specification-to-openssl-format.patch - ---- - templates/rabbitmq.config.erb | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/templates/rabbitmq.config.erb b/templates/rabbitmq.config.erb -index cf2a388..b9612f3 100644 ---- a/templates/rabbitmq.config.erb -+++ b/templates/rabbitmq.config.erb -@@ -72,7 +72,7 @@ - <%- end -%> - <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%> - ,{ciphers,[ -- <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %> -+ <%= @ssl_ciphers.sort.map{|k| "\"#{k}\""}.join(",\n ") %> - ]} - <%- end -%> - ]}, -@@ -111,7 +111,7 @@ - <%- end -%> - <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%> - ,{ciphers,[ -- <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %> -+ <%= @ssl_ciphers.sort.map{|k| "\"#{k}\""}.join(",\n ") %> - ]} - <%- end -%> - ]} --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0003-Eliminate-Puppet-4-deprecation-warnings.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0003-Eliminate-Puppet-4-deprecation-warnings.patch deleted file mode 100644 index cea267f9f..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0003-Eliminate-Puppet-4-deprecation-warnings.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 1d09cd4cc048a8a1958f3bf7bc5ee8a9e4617455 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 19 Dec 2017 10:26:17 -0600 -Subject: [PATCH] WRS: Patch3: - 0003-Eliminate-Puppet-4-deprecation-warnings.patch - ---- - manifests/init.pp | 49 ++++++++++--------------------------------------- - manifests/params.pp | 16 ++++++++-------- - metadata.json | 1 - - 3 files changed, 18 insertions(+), 48 deletions(-) - -diff --git a/manifests/init.pp b/manifests/init.pp -index 3451599..7808464 100644 ---- a/manifests/init.pp -+++ b/manifests/init.pp -@@ -17,11 +17,11 @@ class rabbitmq( - Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path, - Optional[String] $erlang_cookie = $rabbitmq::params::erlang_cookie, - $interface = $rabbitmq::params::interface, -- $management_port = $rabbitmq::params::management_port, -+ Integer[1, 65535] $management_port = $rabbitmq::params::management_port, - $management_ssl = $rabbitmq::params::management_ssl, - Optional[String] $management_hostname = $rabbitmq::params::management_hostname, - String $node_ip_address = $rabbitmq::params::node_ip_address, -- $package_apt_pin = $rabbitmq::params::package_apt_pin, -+ Optional[Variant[Numeric, String]] $package_apt_pin = $rabbitmq::params::package_apt_pin, - String $package_ensure = $rabbitmq::params::package_ensure, - String $package_gpg_key = $rabbitmq::params::package_gpg_key, - String $package_name = $rabbitmq::params::package_name, -@@ -33,7 +33,7 @@ class rabbitmq( - $rabbitmq_user = $rabbitmq::params::rabbitmq_user, - $rabbitmq_group = $rabbitmq::params::rabbitmq_group, - $rabbitmq_home = $rabbitmq::params::rabbitmq_home, -- $port = $rabbitmq::params::port, -+ Integer $port = $rabbitmq::params::port, - Boolean $tcp_keepalive = $rabbitmq::params::tcp_keepalive, - Integer $tcp_backlog = $rabbitmq::params::tcp_backlog, - Optional[Integer] $tcp_sndbuf = $rabbitmq::params::tcp_sndbuf, -@@ -49,10 +49,10 @@ class rabbitmq( - String $ssl_key = $rabbitmq::params::ssl_key, - Optional[Integer] $ssl_depth = $rabbitmq::params::ssl_depth, - Optional[String] $ssl_cert_password = $rabbitmq::params::ssl_cert_password, -- $ssl_port = $rabbitmq::params::ssl_port, -+ Integer[1, 65535] $ssl_port = $rabbitmq::params::ssl_port, - $ssl_interface = $rabbitmq::params::ssl_interface, -- $ssl_management_port = $rabbitmq::params::ssl_management_port, -- $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, -+ Integer[1, 65535] $ssl_management_port = $rabbitmq::params::ssl_management_port, -+ Integer[1, 65535] $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, - $ssl_verify = $rabbitmq::params::ssl_verify, - $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert, - Optional[Array] $ssl_versions = $rabbitmq::params::ssl_versions, -@@ -63,15 +63,15 @@ class rabbitmq( - String $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern, - String $ldap_other_bind = $rabbitmq::params::ldap_other_bind, - Boolean $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl, -- $ldap_port = $rabbitmq::params::ldap_port, -+ Integer[1, 65535] $ldap_port = $rabbitmq::params::ldap_port, - Boolean $ldap_log = $rabbitmq::params::ldap_log, - Hash $ldap_config_variables = $rabbitmq::params::ldap_config_variables, -- $stomp_port = $rabbitmq::params::stomp_port, -+ Integer[1, 65535] $stomp_port = $rabbitmq::params::stomp_port, - Boolean $stomp_ssl_only = $rabbitmq::params::stomp_ssl_only, -- $version = $rabbitmq::params::version, -+ Optional[String] $version = $rabbitmq::params::version, - Boolean $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, - $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling, -- $file_limit = $rabbitmq::params::file_limit, -+ Variant[Integer[-1,], Enum['unlimited', 'infinity']] $file_limit = $rabbitmq::params::file_limit, - Hash $environment_variables = $rabbitmq::params::environment_variables, - Hash $config_variables = $rabbitmq::params::config_variables, - Hash $config_kernel_variables = $rabbitmq::params::config_kernel_variables, -@@ -85,35 +85,6 @@ class rabbitmq( - Stdlib::Absolutepath $inetrc_config_path = $rabbitmq::params::inetrc_config_path, - ) inherits rabbitmq::params { - -- # Validate install parameters. -- validate_re($package_apt_pin, '^(|\d+)$') -- validate_re($version, '^\d+\.\d+\.\d+(-\d+)*$') # Allow 3 digits and optional -n postfix. -- # Validate config parameters. -- if ! is_integer($management_port) { -- validate_re($management_port, '\d+') -- } -- if ! is_integer($port) { -- validate_re($port, ['\d+','UNSET']) -- } -- if ! is_integer($stomp_port) { -- validate_re($stomp_port, '\d+') -- } -- -- # using sprintf for conversion to string, because "${file_limit}" doesn't -- # pass lint, despite being nicer -- validate_re(sprintf('%s', $file_limit), -- '^(\d+|-1|unlimited|infinity)$', '$file_limit must be a positive integer, \'-1\', \'unlimited\', or \'infinity\'.') -- if ! is_integer($ssl_port) { -- validate_re($ssl_port, '\d+') -- } -- if ! is_integer($ssl_management_port) { -- validate_re($ssl_management_port, '\d+') -- } -- if ! is_integer($ssl_stomp_port) { -- validate_re($ssl_stomp_port, '\d+') -- } -- validate_re($ldap_port, '\d+') -- - if $ssl_only and ! $ssl { - fail('$ssl_only => true requires that $ssl => true') - } -diff --git a/manifests/params.pp b/manifests/params.pp -index da0d2b4..d5ef906 100644 ---- a/manifests/params.pp -+++ b/manifests/params.pp -@@ -68,7 +68,7 @@ class rabbitmq::params { - #install - $admin_enable = true - $management_hostname = undef -- $management_port = '15672' -+ $management_port = 15672 - $management_ssl = true - $package_apt_pin = '' - $package_gpg_key = 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' -@@ -94,7 +94,7 @@ class rabbitmq::params { - $erlang_cookie = undef - $interface = 'UNSET' - $node_ip_address = 'UNSET' -- $port = '5672' -+ $port = 5672 - $tcp_keepalive = false - $tcp_backlog = 128 - $tcp_sndbuf = undef -@@ -107,10 +107,10 @@ class rabbitmq::params { - $ssl_key = 'UNSET' - $ssl_depth = undef - $ssl_cert_password = undef -- $ssl_port = '5671' -+ $ssl_port = 5671 - $ssl_interface = 'UNSET' -- $ssl_management_port = '15671' -- $ssl_stomp_port = '6164' -+ $ssl_management_port = 15671 -+ $ssl_stomp_port = 6164 - $ssl_verify = 'verify_none' - $ssl_fail_if_no_peer_cert = false - $ssl_versions = undef -@@ -121,10 +121,10 @@ class rabbitmq::params { - $ldap_user_dn_pattern = 'cn=username,ou=People,dc=example,dc=com' - $ldap_other_bind = 'anon' - $ldap_use_ssl = false -- $ldap_port = '389' -+ $ldap_port = 389 - $ldap_log = false - $ldap_config_variables = {} -- $stomp_port = '6163' -+ $stomp_port = 6163 - $stomp_ssl_only = false - $wipe_db_on_cookie_change = false - $cluster_partition_handling = 'ignore' -@@ -134,7 +134,7 @@ class rabbitmq::params { - $config_management_variables = {} - $config_additional_variables = {} - $auth_backends = undef -- $file_limit = '16384' -+ $file_limit = 16384 - $collect_statistics_interval = undef - $ipv6 = false - $inetrc_config = 'rabbitmq/inetrc.erb' -diff --git a/metadata.json b/metadata.json -index 5803cf5..b3426f6 100644 ---- a/metadata.json -+++ b/metadata.json -@@ -48,7 +48,6 @@ - ], - "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 3.13.1 < 5.0.0"}, -- {"name":"puppetlabs/apt","version_requirement":">= 1.8.0 < 5.0.0"}, - {"name":"puppet/staging","version_requirement":">= 0.3.1 < 2.0.0"} - ] - } --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch deleted file mode 100644 index 4575722f6..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5c8fa2301ee9fa92267ff351e3fa3e59f2b2df79 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Wed, 24 Jan 2018 16:01:48 -0600 -Subject: [PATCH] Partially revert upstream commit - f7c3a4a637d59f3065d8129e9ebacba992dfc469 - -Upstream converted the code based on rabbitmqctl 3.6.10 changes -We are using 3.6.5 but hopefully this expression will match both - -Status of node rabbit@localhost ... -or -Status of node rabbit@localhost ---- - lib/facter/rabbitmq_nodename.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/facter/rabbitmq_nodename.rb b/lib/facter/rabbitmq_nodename.rb -index 301e3c1..d5c6352 100644 ---- a/lib/facter/rabbitmq_nodename.rb -+++ b/lib/facter/rabbitmq_nodename.rb -@@ -2,7 +2,7 @@ Facter.add(:rabbitmq_nodename) do - setcode do - if Facter::Core::Execution.which('rabbitmqctl') - rabbitmq_nodename = Facter::Core::Execution.execute('rabbitmqctl status 2>&1') -- %r{^Status of node '?([\w\.]+@[\w\.\-]+)'?}.match(rabbitmq_nodename)[1] -+ %r{^Status of node '?([\w\.]+@[\w\.\-]+)'?( \.+)?$}.match(rabbitmq_nodename)[1] - end - end - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0005-Remove-the-rabbitmq_nodename-fact.patch b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0005-Remove-the-rabbitmq_nodename-fact.patch deleted file mode 100644 index dbe7ce4de..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0005-Remove-the-rabbitmq_nodename-fact.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 02c56be5340b079797fdb9944e1e048f1c3a18b7 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Fri, 2 Feb 2018 12:30:22 -0600 -Subject: [PATCH] Remove the rabbitmq_nodename fact - -This fact will not work on a standby node. it requires a drbd folder in order -for rabbitmqctl status to work. ---- - lib/facter/rabbitmq_nodename.rb | 8 ------ - spec/unit/rabbitmq_nodename_spec.rb | 50 ------------------------------------- - 2 files changed, 58 deletions(-) - delete mode 100644 lib/facter/rabbitmq_nodename.rb - delete mode 100644 spec/unit/rabbitmq_nodename_spec.rb - -diff --git a/lib/facter/rabbitmq_nodename.rb b/lib/facter/rabbitmq_nodename.rb -deleted file mode 100644 -index 2ee7926..0000000 ---- a/lib/facter/rabbitmq_nodename.rb -+++ /dev/null -@@ -1,8 +0,0 @@ --Facter.add(:rabbitmq_nodename) do -- setcode do -- if Facter::Core::Execution.which('rabbitmqctl') -- rabbitmq_nodename = Facter::Core::Execution.execute('rabbitmqctl status 2>&1') -- %r{^Status of node '?([\w\.]+@[\w\.\-]+)'?( \.+)?$}.match(rabbitmq_nodename)[1] -- end -- end --end -diff --git a/spec/unit/rabbitmq_nodename_spec.rb b/spec/unit/rabbitmq_nodename_spec.rb -deleted file mode 100644 -index 621d7eb..0000000 ---- a/spec/unit/rabbitmq_nodename_spec.rb -+++ /dev/null -@@ -1,50 +0,0 @@ --require "spec_helper" -- --describe Facter::Util::Fact do -- before { -- Facter.clear -- } -- -- describe "rabbitmq_nodename" do -- context 'with value' do -- before :each do -- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true) -- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit1 ...') -- end -- it { -- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit1') -- } -- end -- -- context 'with dashes in hostname' do -- before :each do -- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true) -- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1 ...') -- end -- it { -- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1') -- } -- end -- -- context 'with quotes around node name' do -- before :each do -- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true) -- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node \'monty@rabbit-1\' ...') -- end -- it { -- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1') -- } -- end -- -- context 'without trailing points' do -- before :each do -- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true) -- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1') -- end -- it { -- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1') -- } -- end -- -- end --end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/srpm_path b/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/srpm_path deleted file mode 100644 index 4ff2a8cd5..000000000 --- a/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-rabbitmq-5.6.0-4.5ac45degit.el7.src.rpm diff --git a/config/puppet-modules/puppet-staging/centos/build_srpm.data b/config/puppet-modules/puppet-staging/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/puppet-staging/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-staging/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/puppet-staging/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 879b3f0af..000000000 --- a/config/puppet-modules/puppet-staging/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a211d6907fdef7106b32acf70e36b6795a155c5b Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 4 Jan 2018 12:53:29 -0600 -Subject: [PATCH 1/2] Update package versioning for TIS format - ---- - SPECS/puppet-staging.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-staging.spec b/SPECS/puppet-staging.spec -index 0848033..0dd5d59 100644 ---- a/SPECS/puppet-staging.spec -+++ b/SPECS/puppet-staging.spec -@@ -8,7 +8,7 @@ - - Name: puppet-staging - Version: 1.0.4 --Release: 1%{?alphatag}%{?dist} -+Release: 1.b466d93git.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Compressed file staging and deployment - License: Apache-2.0 - --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-staging/centos/meta_patches/0002-Apply-rename-patch.patch b/config/puppet-modules/puppet-staging/centos/meta_patches/0002-Apply-rename-patch.patch deleted file mode 100644 index f7b0120fd..000000000 --- a/config/puppet-modules/puppet-staging/centos/meta_patches/0002-Apply-rename-patch.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2f7d1d4fd969e529e8efcdcf8ea6c0040e3392e3 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 4 Jan 2018 12:54:34 -0600 -Subject: [PATCH 2/2] Apply rename patch - ---- - SPECS/puppet-staging.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/puppet-staging.spec b/SPECS/puppet-staging.spec -index 0dd5d59..b6c93ce 100644 ---- a/SPECS/puppet-staging.spec -+++ b/SPECS/puppet-staging.spec -@@ -15,6 +15,7 @@ License: Apache-2.0 - URL: https://github.com/nanliu/puppet-staging - - Source0: https://github.com/nanliu/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz -+Patch0001: 0001-Rename-nanliu-staging-to-puppet-staging.patch - - BuildArch: noarch - -@@ -25,6 +26,7 @@ Compressed file staging and deployment - - %prep - %setup -q -n %{name}-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-staging/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/puppet-staging/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index a9ac01563..000000000 --- a/config/puppet-modules/puppet-staging/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Apply-rename-patch.patch diff --git a/config/puppet-modules/puppet-staging/centos/patches/0001-Rename-nanliu-staging-to-puppet-staging.patch b/config/puppet-modules/puppet-staging/centos/patches/0001-Rename-nanliu-staging-to-puppet-staging.patch deleted file mode 100644 index 76f3231cf..000000000 --- a/config/puppet-modules/puppet-staging/centos/patches/0001-Rename-nanliu-staging-to-puppet-staging.patch +++ /dev/null @@ -1,28 +0,0 @@ -From dca28ab0ee1e31d8850ead8f055a53a7ae629cfa Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 4 Jan 2018 12:47:59 -0600 -Subject: [PATCH] Rename nanliu-staging to puppet-staging - -This is the version of puppet-staging shipped with Centos and renaming -this will fix the ModuleLoader warnings in the puppet logs -for puppet-mysql and puppet-postgresql ---- - metadata.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/metadata.json b/metadata.json -index a889487..d7b4a81 100644 ---- a/metadata.json -+++ b/metadata.json -@@ -95,7 +95,7 @@ - "version_requirement": ">=2.7.0" - } - ], -- "name": "nanliu-staging", -+ "name": "puppet-staging", - "version": "1.0.4", - "source": "git://github.com/nanliu/puppet-staging", - "author": "Nan Liu", --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-staging/centos/srpm_path b/config/puppet-modules/puppet-staging/centos/srpm_path deleted file mode 100644 index da2c9b598..000000000 --- a/config/puppet-modules/puppet-staging/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-staging-1.0.4-1.b466d93git.el7.src.rpm diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/build_srpm.data b/config/puppet-modules/puppet-stdlib-4.12.0/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 469513442..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From beb4d7f0c2a6d19e863194ea8ec999f815557035 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 3 Jan 2017 13:45:43 -0500 -Subject: [PATCH 1/2] Update package versioning for TIS format - ---- - SPECS/puppet-stdlib.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/puppet-stdlib.spec b/SPECS/puppet-stdlib.spec -index 77b06f9..4947330 100644 ---- a/SPECS/puppet-stdlib.spec -+++ b/SPECS/puppet-stdlib.spec -@@ -2,7 +2,7 @@ - %define upstream_name puppetlabs-stdlib - Name: puppet-stdlib - Version: 4.18.0 --Release: 2%{?dist} -+Release: 2.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Standard library of resources for Puppet modules. - License: ASL 2.0 - --- -2.7.4 - diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0002-Add-TIS-Patches.patch b/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0002-Add-TIS-Patches.patch deleted file mode 100644 index b9bf97411..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/0002-Add-TIS-Patches.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c7d61832d0ab7eb0d8b7656d0c1bc0eda036331b Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 1 May 2017 14:39:38 -0400 -Subject: [PATCH 2/2] Add TIS Patches - ---- - SPECS/puppet-stdlib.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/puppet-stdlib.spec b/SPECS/puppet-stdlib.spec -index 4947330..19e9599 100644 ---- a/SPECS/puppet-stdlib.spec -+++ b/SPECS/puppet-stdlib.spec -@@ -10,6 +10,8 @@ URL: https://github.com/puppetlabs/puppetlabs-stdlib - - Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{version}.tar.gz - -+Patch0001: 0001-Filter-password-in-logs.patch -+ - BuildArch: noarch - - Requires: puppet >= 2.7.0 -@@ -19,6 +21,7 @@ Standard library of resources for Puppet modules. - - %prep - %setup -q -n %{upstream_name}-%{upstream_version} -+%patch0001 -p1 - - find . -type f -name ".*" -exec rm {} + - find . -size 0 -exec rm {} + --- -2.7.4 - diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/PATCH_ORDER b/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 0403df317..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-TIS-Patches.patch diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/patches/0001-Filter-password-in-logs.patch b/config/puppet-modules/puppet-stdlib-4.12.0/centos/patches/0001-Filter-password-in-logs.patch deleted file mode 100644 index 73f7267bf..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/patches/0001-Filter-password-in-logs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d95ec2abaa68a1da308c3c8b01c700fcc544a788 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 1 May 2017 14:37:22 -0400 -Subject: [PATCH] Filter password in logs - ---- - lib/puppet/parser/functions/ensure_resource.rb | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb -index 1ba6a44..b9c3242 100644 ---- a/lib/puppet/parser/functions/ensure_resource.rb -+++ b/lib/puppet/parser/functions/ensure_resource.rb -@@ -30,15 +30,17 @@ ENDOFDOC - raise(ArgumentError, 'Must specify a type') unless type - raise(ArgumentError, 'Must specify a title') unless title - params ||= {} -+ filtered_params = Marshal.load(Marshal.dump(params)) # deep copy -+ filtered_params.delete("password") - - items = [title].flatten - - items.each do |item| - Puppet::Parser::Functions.function(:defined_with_params) - if function_defined_with_params(["#{type}[#{item}]", params]) -- Puppet.debug("Resource #{type}[#{item}] with params #{params} not created because it already exists") -+ Puppet.debug("Resource #{type}[#{item}] with params #{filtered_params} not created because it already exists") - else -- Puppet.debug("Create new resource #{type}[#{item}] with params #{params}") -+ Puppet.debug("Create new resource #{type}[#{item}] with params #{filtered_params}") - Puppet::Parser::Functions.function(:create_resources) - function_create_resources([type.capitalize, { item => params }]) - end --- -1.8.3.1 - diff --git a/config/puppet-modules/puppet-stdlib-4.12.0/centos/srpm_path b/config/puppet-modules/puppet-stdlib-4.12.0/centos/srpm_path deleted file mode 100644 index 9f1b613fd..000000000 --- a/config/puppet-modules/puppet-stdlib-4.12.0/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/puppet-stdlib-4.18.0-2.el7.src.rpm diff --git a/database/mariadb/centos/README b/database/mariadb/centos/README deleted file mode 100644 index 963b66be1..000000000 --- a/database/mariadb/centos/README +++ /dev/null @@ -1,6 +0,0 @@ -The upstream mariadb includes TokuDB source code with AGPL license. -As AGPL-3.0 is considered a prohibited license by WR, we've modified -the source tarball to delete the storage/tokudb directory and remove -the AGPL reference from the EXCEPTIONS-CLIENT Foss License file. The -spec file has also been modified to compile without tokudb support. - diff --git a/database/mariadb/centos/build_srpm.data b/database/mariadb/centos/build_srpm.data deleted file mode 100644 index dfb6e632e..000000000 --- a/database/mariadb/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/mariadb-10.1.28.tar.gz $PKG_BASE/centos/files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_BIG=7 -BUILD_IS_SLOW=19 diff --git a/database/mariadb/centos/docker/Dockerfile b/database/mariadb/centos/docker/Dockerfile deleted file mode 100644 index 29c213bee..000000000 --- a/database/mariadb/centos/docker/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM openstackhelm/mariadb:10.2.18 - -RUN rm /etc/apt/sources.list.d/mariadb.list && apt-get update && apt-get install -y galera-arbitrator-3 - -CMD ["/usr/bin/garbd"] - diff --git a/database/mariadb/centos/files/LICENSE.clustercheck b/database/mariadb/centos/files/LICENSE.clustercheck deleted file mode 100644 index 609015d07..000000000 --- a/database/mariadb/centos/files/LICENSE.clustercheck +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012-2014, Olaf van Zandwijk -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/database/mariadb/centos/files/README.mysql-cnf b/database/mariadb/centos/files/README.mysql-cnf deleted file mode 100644 index 3700c7f14..000000000 --- a/database/mariadb/centos/files/README.mysql-cnf +++ /dev/null @@ -1,13 +0,0 @@ -This directory contains prepared configuration files with .cnf extension, -which provide a configuration for some common MariaDB deployment scenarios. -These configuration files do not include the default configuration of datadir, -log-file and pid-file locations, as specified in the default my.cnf file, -provided in this distribution. - -Thus, it is recommended to use these configuration files as an addition to the -default my.cnf configuration file. - -Since default my.cnf contains `!includedir @INSTALL_SYSCONF2DIR@` directive, it is -recommended to copy required configuration under @INSTALL_SYSCONF2DIR@ directory, -so the default my.cnf specifications will be extended. - diff --git a/database/mariadb/centos/files/README.mysql-docs b/database/mariadb/centos/files/README.mysql-docs deleted file mode 100644 index dd894a7b9..000000000 --- a/database/mariadb/centos/files/README.mysql-docs +++ /dev/null @@ -1,4 +0,0 @@ -The official MySQL documentation is not freely redistributable, so we cannot -include it in RHEL or Fedora. You can find it on-line at - -http://dev.mysql.com/doc/ diff --git a/database/mariadb/centos/files/README.mysql-license b/database/mariadb/centos/files/README.mysql-license deleted file mode 100644 index ceabbcfe2..000000000 --- a/database/mariadb/centos/files/README.mysql-license +++ /dev/null @@ -1,9 +0,0 @@ -MySQL is distributed under GPL v2, but there are some licensing exceptions -that allow the client libraries to be linked with a non-GPL application, -so long as the application is under a license approved by Oracle. -For details see - -http://www.mysql.com/about/legal/licensing/foss-exception/ - -Some innobase code from Percona and Google is under BSD license. -Some code related to test-suite is under LGPLv2. diff --git a/database/mariadb/centos/files/clustercheck.sh b/database/mariadb/centos/files/clustercheck.sh deleted file mode 100644 index ce16a81dc..000000000 --- a/database/mariadb/centos/files/clustercheck.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -# -# Script to make a proxy (ie HAProxy) capable of monitoring Galera cluster nodes properly -# -# Author: Olaf van Zandwijk -# Author: Raghavendra Prabhu -# Author: Ryan O'Hara -# -# Documentation and download: https://github.com/olafz/percona-clustercheck -# -# Based on the original script from Unai Rodriguez -# - -if [ -f @INSTALL_SYSCONFDIR@/sysconfig/clustercheck ]; then - . @INSTALL_SYSCONFDIR@/sysconfig/clustercheck -fi - -MYSQL_USERNAME="${MYSQL_USERNAME-clustercheckuser}" -MYSQL_PASSWORD="${MYSQL_PASSWORD-clustercheckpassword!}" -MYSQL_HOST="${MYSQL_HOST:-127.0.0.1}" -MYSQL_PORT="${MYSQL_PORT:-3306}" -ERR_FILE="${ERR_FILE:-/dev/null}" -AVAILABLE_WHEN_DONOR=${AVAILABLE_WHEN_DONOR:-0} -AVAILABLE_WHEN_READONLY=${AVAILABLE_WHEN_READONLY:-1} -DEFAULTS_EXTRA_FILE=${DEFAULTS_EXTRA_FILE:-@INSTALL_SYSCONFDIR@/my.cnf} - -#Timeout exists for instances where mysqld may be hung -TIMEOUT=10 - -if [[ -r $DEFAULTS_EXTRA_FILE ]];then - MYSQL_CMDLINE="mysql --defaults-extra-file=$DEFAULTS_EXTRA_FILE -nNE \ - --connect-timeout=$TIMEOUT \ - --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} \ - --host=${MYSQL_HOST} --port=${MYSQL_PORT}" -else - MYSQL_CMDLINE="mysql -nNE --connect-timeout=$TIMEOUT \ - --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} \ - --host=${MYSQL_HOST} --port=${MYSQL_PORT}" -fi -# -# Perform the query to check the wsrep_local_state -# -WSREP_STATUS=$($MYSQL_CMDLINE -e "SHOW STATUS LIKE 'wsrep_local_state';" \ - 2>${ERR_FILE} | tail -1 2>>${ERR_FILE}) - -if [[ "${WSREP_STATUS}" == "4" ]] || [[ "${WSREP_STATUS}" == "2" && ${AVAILABLE_WHEN_DONOR} == 1 ]]; then - # Check only when set to 0 to avoid latency in response. - if [[ $AVAILABLE_WHEN_READONLY -eq 0 ]];then - READ_ONLY=$($MYSQL_CMDLINE -e "SHOW GLOBAL VARIABLES LIKE 'read_only';" \ - 2>${ERR_FILE} | tail -1 2>>${ERR_FILE}) - - if [[ "${READ_ONLY}" == "ON" ]];then - # Galera cluster node local state is 'Synced', but it is in - # read-only mode. The variable AVAILABLE_WHEN_READONLY is set to 0. - # => return HTTP 503 - # Shell return-code is 1 - echo -en "HTTP/1.1 503 Service Unavailable\r\n" - echo -en "Content-Type: text/plain\r\n" - echo -en "Connection: close\r\n" - echo -en "Content-Length: 35\r\n" - echo -en "\r\n" - echo -en "Galera cluster node is read-only.\r\n" - sleep 0.1 - exit 1 - fi - fi - # Galera cluster node local state is 'Synced' => return HTTP 200 - # Shell return-code is 0 - echo -en "HTTP/1.1 200 OK\r\n" - echo -en "Content-Type: text/plain\r\n" - echo -en "Connection: close\r\n" - echo -en "Content-Length: 32\r\n" - echo -en "\r\n" - echo -en "Galera cluster node is synced.\r\n" - sleep 0.1 - exit 0 -else - # Galera cluster node local state is not 'Synced' => return HTTP 503 - # Shell return-code is 1 - echo -en "HTTP/1.1 503 Service Unavailable\r\n" - echo -en "Content-Type: text/plain\r\n" - echo -en "Connection: close\r\n" - echo -en "Content-Length: 36\r\n" - echo -en "\r\n" - echo -en "Galera cluster node is not synced.\r\n" - sleep 0.1 - exit 1 -fi diff --git a/database/mariadb/centos/files/mariadb-admincrash.patch b/database/mariadb/centos/files/mariadb-admincrash.patch deleted file mode 100644 index cc2b10dd0..000000000 --- a/database/mariadb/centos/files/mariadb-admincrash.patch +++ /dev/null @@ -1,32 +0,0 @@ -mysqladmin crash on execution of below command: - - #> mysqladmin -u root -p - ... - Segmentation fault (core dumped) - -This is probably caused by memory corruption based on working with temp_argv[-1]. - -RHBZ: #1207041 -Upstream report: https://mariadb.atlassian.net/browse/MDEV-7883 - ---- - client/mysqladmin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc -index ffdc73f..cb0c558 100644 ---- a/client/mysqladmin.cc -+++ b/client/mysqladmin.cc -@@ -1361,7 +1361,8 @@ static char **mask_password(int argc, char ***argv) - } - argc--; - } -- temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE)); -+ if (argc >= 0) -+ temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE)); - return(temp_argv); - } - --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-basedir.patch b/database/mariadb/centos/files/mariadb-basedir.patch deleted file mode 100644 index d1f4c10c1..000000000 --- a/database/mariadb/centos/files/mariadb-basedir.patch +++ /dev/null @@ -1,24 +0,0 @@ -Don't guess basedir in mysql_config; we place it under _libdir because -of multilib conflicts, so use rather configured @prefix@ path directly. - ---- - scripts/mysql_config.sh | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh -index 52f6d56..df63365 100644 ---- a/scripts/mysql_config.sh -+++ b/scripts/mysql_config.sh -@@ -76,8 +76,7 @@ get_full_path () - - me=`get_full_path $0` - --# Script might have been renamed but assume mysql_config --basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'` -+basedir='@prefix@' - - ldata='@localstatedir@' - execdir='@libexecdir@' --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-errno.patch b/database/mariadb/centos/files/mariadb-errno.patch deleted file mode 100644 index 5ff34f000..000000000 --- a/database/mariadb/centos/files/mariadb-errno.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - include/my_sys.h | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -diff --git a/include/my_sys.h b/include/my_sys.h -index 110a2ee..a90ac5c 100644 ---- a/include/my_sys.h -+++ b/include/my_sys.h -@@ -212,13 +212,7 @@ - #define my_safe_afree(ptr, size) my_afree(ptr) - #endif /* HAVE_ALLOCA */ - --#ifndef errno /* did we already get it? */ --#ifdef HAVE_ERRNO_AS_DEFINE --#include /* errno is a define */ --#else --extern int errno; /* declare errno */ --#endif --#endif /* #ifndef errno */ -+#include /* errno is a define */ - extern char *home_dir; /* Home directory for user */ - extern MYSQL_PLUGIN_IMPORT char *mysql_data_home; - extern const char *my_progname; /* program-name (printed in errors) */ --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-example-config-files.patch b/database/mariadb/centos/files/mariadb-example-config-files.patch deleted file mode 100644 index f29d129a5..000000000 --- a/database/mariadb/centos/files/mariadb-example-config-files.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- - support-files/my-huge.cnf.sh | 1 + - support-files/my-innodb-heavy-4G.cnf.sh | 2 +- - support-files/my-large.cnf.sh | 1 + - support-files/my-medium.cnf.sh | 1 + - support-files/my-small.cnf.sh | 1 + - 5 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh -index 4e08348..d8bf29e 100644 ---- a/support-files/my-huge.cnf.sh -+++ b/support-files/my-huge.cnf.sh -@@ -25,6 +25,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MySQL server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh -index 2590ff5..85fd33a 100644 ---- a/support-files/my-innodb-heavy-4G.cnf.sh -+++ b/support-files/my-innodb-heavy-4G.cnf.sh -@@ -42,7 +42,7 @@ socket = @MYSQL_UNIX_ADDR@ - # The MariaDB server - # - [mysqld] -- -+log-error = @LOG_LOCATION@ - # generic configuration options - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ -diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh -index 6f8dab0..e8c5f74 100644 ---- a/support-files/my-large.cnf.sh -+++ b/support-files/my-large.cnf.sh -@@ -25,6 +25,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MariaDB server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh -index 19ab8df..fc8fc78 100644 ---- a/support-files/my-medium.cnf.sh -+++ b/support-files/my-medium.cnf.sh -@@ -26,6 +26,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MariaDB server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh -index 8c78072..6777431 100644 ---- a/support-files/my-small.cnf.sh -+++ b/support-files/my-small.cnf.sh -@@ -24,6 +24,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MySQL server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-file-contents.patch b/database/mariadb/centos/files/mariadb-file-contents.patch deleted file mode 100644 index 5f438fc2a..000000000 --- a/database/mariadb/centos/files/mariadb-file-contents.patch +++ /dev/null @@ -1,49 +0,0 @@ -Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which -breaks at least two packaging commandments, so we put them into $libdir -instead. That means we have to hack the file_contents regression test -to know about this. - -Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 - ---- - mysql-test/t/file_contents.test | 13 ++++++++++-- - 1 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test -index 4734a02..a892297 100644 ---- a/mysql-test/t/file_contents.test -+++ b/mysql-test/t/file_contents.test -@@ -11,7 +11,7 @@ - --perl - print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n"; - $dir_bin = $ENV{'MYSQL_BINDIR'}; --if ($dir_bin eq '/usr/') { -+if ($dir_bin =~ '.*/usr/$') { - # RPM package - $dir_docs = $dir_bin; - $dir_docs =~ s|/lib|/share/doc|; -@@ -22,7 +22,7 @@ if ($dir_bin eq '/usr/') { - # RedHat: version number in directory name - $dir_docs = glob "$dir_docs/MariaDB-server*"; - } --} elsif ($dir_bin eq '/usr') { -+} elsif ($dir_bin =~ '.*/usr$') { - # RPM build during development - $dir_docs = "$dir_bin/share/doc"; - if(-d "$dir_docs/packages") { -@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') { - # RedHat/Debian: version number in directory name - $dir_docs = glob "$dir_docs/mariadb-server-*"; - $dir_docs = glob "$dir_docs/MariaDB-server*" unless -d $dir_docs; -+ -+ # All the above is entirely wacko, because these files are not docs; -+ # they should be kept in libdir instead. mtr does not provide a nice -+ # way to find libdir though, so we have to kluge it like this: -+ if (-d "$dir_bin/lib64/mysql") { -+ $dir_docs = "$dir_bin/lib64/mysql"; -+ } else { -+ $dir_docs = "$dir_bin/lib/mysql"; -+ } - } - # Slackware - $dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs; diff --git a/database/mariadb/centos/files/mariadb-galera.cnf.patch b/database/mariadb/centos/files/mariadb-galera.cnf.patch deleted file mode 100644 index e03ee88a5..000000000 --- a/database/mariadb/centos/files/mariadb-galera.cnf.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - support-files/wsrep.cnf.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/support-files/wsrep.cnf.sh b/support-files/wsrep.cnf.sh -index a539085..51ce3dc 100644 ---- a/support-files/wsrep.cnf.sh -+++ b/support-files/wsrep.cnf.sh -@@ -30,6 +30,9 @@ bind-address=0.0.0.0 - ## WSREP options - ## - -+# Enable wsrep -+wsrep_on=1 -+ - # Full path to wsrep provider library or 'none' - wsrep_provider=none - --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-install-db-sharedir.patch b/database/mariadb/centos/files/mariadb-install-db-sharedir.patch deleted file mode 100644 index 44dbd6ec0..000000000 --- a/database/mariadb/centos/files/mariadb-install-db-sharedir.patch +++ /dev/null @@ -1,49 +0,0 @@ -Use configured value instead of hardcoded path - ---- - scripts/mysql_install_db.pl.in | 2 +- - scripts/mysql_install_db.sh | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in -index 9d2c1f6..0accdd1 100644 ---- a/scripts/mysql_install_db.pl.in -+++ b/scripts/mysql_install_db.pl.in -@@ -320,7 +320,7 @@ elsif ( $opt->{basedir} ) - find_in_basedir($opt,"file","mysqld-nt", - "bin"); # ,"sql" - $srcpkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql", -- "share","share/mysql"); # ,"scripts" -+ "share","@INSTALL_MYSQLSHAREDIR@"); # ,"scripts" - $buildpkgdir = $srcpkgdatadir; - $scriptdir = "$opt->{basedir}/scripts"; - } -diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh -index 364cc4f..eaa7a89 100644 ---- a/scripts/mysql_install_db.sh -+++ b/scripts/mysql_install_db.sh -@@ -311,17 +311,17 @@ then - cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin - exit 1 - fi -- langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english` -+ langdir=`find_in_basedir --dir errmsg.sys share/english @INSTALL_MYSQLSHAREDIR@/english` - if test -z "$langdir" - then -- cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english -+ cannot_find_file errmsg.sys $basedir/share/english $basedir/@INSTALL_MYSQLSHAREDIR@/english - exit 1 - fi -- srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` -+ srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share @INSTALL_MYSQLSHAREDIR@` - buildpkgdatadir=$srcpkgdatadir - if test -z "$srcpkgdatadir" - then -- cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql -+ cannot_find_file fill_help_tables.sql $basedir/share $basedir/@INSTALL_MYSQLSHAREDIR@ - exit 1 - fi - scriptdir="$basedir/scripts" --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-install-test.patch b/database/mariadb/centos/files/mariadb-install-test.patch deleted file mode 100644 index 2bbfc470a..000000000 --- a/database/mariadb/centos/files/mariadb-install-test.patch +++ /dev/null @@ -1,62 +0,0 @@ -Improve the documentation that will be installed in the mysql-test RPM. - ---- - mysql-test/README | 36 +++++++++++++++++++++++++----------- - 1 file changed, 25 insertions(+), 11 deletions(-) - -diff --git a/mysql-test/README b/mysql-test/README -index 0fba1cc..2e756e9 100644 ---- a/mysql-test/README -+++ b/mysql-test/README -@@ -1,15 +1,28 @@ --This directory contains a test suite for the MySQL daemon. To run --the currently existing test cases, simply execute ./mysql-test-run in --this directory. It will fire up the newly built mysqld and test it. -+This directory contains a test suite for the MariaDB daemon. To run -+the currently existing test cases, execute ./mysql-test-run in -+this directory. - --Note that you do not have to have to do "make install", and you could --actually have a co-existing MySQL installation. The tests will not --conflict with it. To run the test suite in a source directory, you --must do make first. -+For use in Red Hat distributions, you should run the script as user mysql, -+who is created with nologin shell however, so the best bet is something like -+ $ su - -+ # cd /usr/share/mysql-test -+ # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=rh-skipped-tests.list" - --All tests must pass. If one or more of them fail on your system, please --read the following manual section for instructions on how to report the --problem: -+This will use the installed mysql executables, but will run a private copy -+of the server process (using data files within /usr/share/mysql-test), -+so you need not start the mysqld service beforehand. -+ -+The "--skip-test-list=rh-skipped-tests.list" option excludes tests that are -+known to fail on one or more Red-Hat-supported platforms. You can omit it -+if you want to check whether such failures occur for you. Documentation -+about the reasons for omitting such tests can be found in the file -+rh-skipped-tests.list. -+ -+To clean up afterwards, remove the created "var" subdirectory, eg -+ # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var" -+ -+If one or more tests fail on your system, please read the following manual -+section for instructions on how to report the problem: - - https://mariadb.com/kb/en/reporting-bugs - -@@ -26,7 +39,8 @@ other relevant options. - - With no test cases named on the command line, mysql-test-run falls back - to the normal "non-extern" behavior. The reason for this is that some --tests cannot run with an external server. -+tests cannot run with an external server (because they need to control the -+options with which the server is started). - - You can create your own test cases. To create a test case, create a new - file in the t subdirectory using a text editor. The file should have a .test --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-logrotate.patch b/database/mariadb/centos/files/mariadb-logrotate.patch deleted file mode 100644 index e87240cb3..000000000 --- a/database/mariadb/centos/files/mariadb-logrotate.patch +++ /dev/null @@ -1,80 +0,0 @@ -Adjust the mysql-log-rotate script in several ways: - -* Use the correct log file pathname for Red Hat installations. -* Enable creation of the log file by logrotate (needed since - /var/log/ isn't writable by mysql user); and set the same 640 - permissions we normally use. -* Comment out the actual rotation commands, so that user must edit - the file to enable rotation. This is unfortunate, but the fact - that the script will probably fail without manual configuration - (to set a root password) means that we can't really have it turned - on by default. Fortunately, in most configurations the log file - is low-volume and so rotation is not critical functionality. - -See discussions at RH bugs 799735, 547007 - ---- - support-files/mysql-log-rotate.sh | 44 ++++++++++++++++++++------------------- - 1 files changed, 23 insertions(+), 21 deletions(-) - -diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh -index 5d1b30b..425c591 100644 ---- a/support-files/mysql-log-rotate.sh -+++ b/support-files/mysql-log-rotate.sh -@@ -1,9 +1,9 @@ - # This logname can be set in /etc/my.cnf --# by setting the variable "err-log" --# in the [safe_mysqld] section as follows: -+# by setting the variable "log-error" -+# in the [mysqld_safe] section as follows: - # --# [safe_mysqld] --# err-log=@localstatedir@/mysqld.log -+# [mysqld_safe] -+# log-error=@LOG_LOCATION@ - # - # If the root user has a password you have to create a - # /root/.my.cnf configuration file with the following -@@ -18,20 +18,22 @@ - # ATTENTION: This /root/.my.cnf should be readable ONLY - # for root ! - --@localstatedir@/mysqld.log { -- # create 600 mysql mysql -- notifempty -- daily -- rotate 3 -- missingok -- compress -- postrotate -- # just if mysqld is really running -- if test -x @bindir@/mysqladmin && \ -- @bindir@/mysqladmin ping &>/dev/null -- then -- @bindir@/mysqladmin --local flush-error-log \ -- flush-engine-log flush-general-log flush-slow-log -- fi -- endscript --} -+# Then, un-comment the following lines to enable rotation of mysql's log file: -+ -+#@LOG_LOCATION@ { -+# # create 600 mysql mysql -+# notifempty -+# daily -+# rotate 3 -+# missingok -+# compress -+# postrotate -+# # just if mysqld is really running -+# if test -x @bindir@/mysqladmin && \ -+# @bindir@/mysqladmin ping &>/dev/null -+# then -+# @bindir@/mysqladmin --local flush-error-log \ -+# flush-engine-log flush-general-log flush-slow-log -+# fi -+# endscript -+#} --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-notestdb.patch b/database/mariadb/centos/files/mariadb-notestdb.patch deleted file mode 100644 index b6ea1f5d4..000000000 --- a/database/mariadb/centos/files/mariadb-notestdb.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- - scripts/mysql_install_db.pl.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in -index 0accdd1..3ab2786 100644 ---- a/scripts/mysql_install_db.pl.in -+++ b/scripts/mysql_install_db.pl.in -@@ -399,10 +399,10 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ ) - } - - # ---------------------------------------------------------------------- --# Create database directories mysql & test -+# Create database directories mysql - # ---------------------------------------------------------------------- - --foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" ) -+foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql" ) - { - # FIXME not really the same as original "mkdir -p", but ok? - mkdir($dir, 0700) unless -d $dir; --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-ownsetup.patch b/database/mariadb/centos/files/mariadb-ownsetup.patch deleted file mode 100644 index b54c24ac5..000000000 --- a/database/mariadb/centos/files/mariadb-ownsetup.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- - support-files/CMakeLists.txt | 1 + - support-files/rpm/server.cnf | 9 +++++++++ - 2 files changed, 10 insertions(+) - -diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt -index 71e9b3f..5f3b2a6 100644 ---- a/support-files/CMakeLists.txt -+++ b/support-files/CMakeLists.txt -@@ -81,6 +81,7 @@ IF(UNIX) - ENDIF() - - CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) -+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) - - INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) -diff --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf -index 9682d2b..6f398d4 100644 ---- a/support-files/rpm/server.cnf -+++ b/support-files/rpm/server.cnf -@@ -9,7 +9,16 @@ - [server] - - # this is only for the mysqld standalone daemon -+# Settings user and group are ignored when systemd is used. -+# If you need to run mysqld under a different user or group, -+# customize your systemd unit file for mysqld/mariadb according to the -+# instructions in http://fedoraproject.org/wiki/Systemd - [mysqld] -+datadir=@MYSQL_DATADIR@ -+socket=@MYSQL_UNIX_ADDR@ -+log-error=@LOG_LOCATION@ -+pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid -+ - - # - # * Galera-related settings --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch b/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch deleted file mode 100644 index 96274c32e..000000000 --- a/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- - scripts/mysqld_safe.sh | 2 +- - support-files/mysql.server.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh -index 5564f92..fe77d97 100644 ---- a/scripts/mysqld_safe.sh -+++ b/scripts/mysqld_safe.sh -@@ -756,7 +756,7 @@ if [ ! -d $mysql_unix_port_dir ] - then - if ! `mkdir -p $mysql_unix_port_dir` - then -- log_error "Fatal error Can't create database directory '$mysql_unix_port'" -+ echo "Fatal error Can't create database directory '$mysql_unix_port'" - exit 1 - fi - chown $user $mysql_unix_port_dir -diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh -index ed0da3c..312f2b2 100644 ---- a/support-files/mysql.server.sh -+++ b/support-files/mysql.server.sh -@@ -296,7 +296,7 @@ case "$mode" in - then - # Give extra arguments to mysqld with the my.cnf file. This script - # may be overwritten at next upgrade. -- $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" & -+ $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" >dev/null & - wait_for_ready; return_value=$? - - # Make lock for RedHat / SuSE --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-scripts.patch b/database/mariadb/centos/files/mariadb-scripts.patch deleted file mode 100644 index fe51eb739..000000000 --- a/database/mariadb/centos/files/mariadb-scripts.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - scripts/CMakeLists.txt | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - -diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt -index 2f9c185..a6e4d49 100644 ---- a/scripts/CMakeLists.txt -+++ b/scripts/CMakeLists.txt -@@ -362,6 +362,35 @@ ELSE() - ) - ENDFOREACH() - -+ # files for systemd -+ SET(SYSTEMD_SCRIPTS -+ mysql.tmpfiles.d -+ mysql.service -+ mysql@.service -+ mysql-prepare-db-dir -+ mysql-wait-ready -+ mysql-wait-stop -+ mysql-check-socket -+ mysql-check-upgrade -+ mysql-scripts-common -+ mysql_config_multilib -+ clustercheck -+ mysql.init -+ my.cnf -+ ) -+ FOREACH(file ${SYSTEMD_SCRIPTS}) -+ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh) -+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh -+ ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) -+ ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in) -+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.in -+ ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) -+ ELSE() -+ MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file}.in in " -+ "${CMAKE_CURRENT_SOURCE_DIR}" ) -+ ENDIF() -+ ENDFOREACH() -+ - FOREACH(file ${WSREP_SOURCE}) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh - ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-server-galera.te b/database/mariadb/centos/files/mariadb-server-galera.te deleted file mode 100644 index bdce127cf..000000000 --- a/database/mariadb/centos/files/mariadb-server-galera.te +++ /dev/null @@ -1,23 +0,0 @@ - -module mariadb-server-galera 1.0; - -require { - type mysqld_t; - type rsync_exec_t; - type anon_inodefs_t; - type proc_net_t; - type kerberos_port_t; - class file { read execute execute_no_trans getattr open }; - class tcp_socket { name_bind name_connect }; - class process { setpgid siginh rlimitinh noatsecure }; -} - -# allow mysqld to run rsyncd -allow mysqld_t self:process setpgid; -allow mysqld_t rsync_exec_t:file { read execute execute_no_trans getattr open }; -allow mysqld_t anon_inodefs_t:file getattr; -allow mysqld_t proc_net_t:file { read open }; - -# allow rsyncd to listen on port 4444 -allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect }; - diff --git a/database/mariadb/centos/files/mariadb-ssl-cypher.patch b/database/mariadb/centos/files/mariadb-ssl-cypher.patch deleted file mode 100644 index 9ff9e0269..000000000 --- a/database/mariadb/centos/files/mariadb-ssl-cypher.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- - mysql-test/r/ssl_8k_key.result | 4 ++-- - mysql-test/t/ssl_8k_key.test | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/mysql-test/r/ssl_8k_key.result b/mysql-test/r/ssl_8k_key.result -index b33a1d2..ff9d0cc 100644 ---- a/mysql-test/r/ssl_8k_key.result -+++ b/mysql-test/r/ssl_8k_key.result -@@ -1,2 +1,2 @@ --Variable_name Value --Ssl_cipher DHE-RSA-AES256-SHA -+have_ssl -+1 -diff --git a/mysql-test/t/ssl_8k_key.test b/mysql-test/t/ssl_8k_key.test -index 27cffdc..4b81648 100644 ---- a/mysql-test/t/ssl_8k_key.test -+++ b/mysql-test/t/ssl_8k_key.test -@@ -5,7 +5,7 @@ - # - # Bug#29784 YaSSL assertion failure when reading 8k key. - # ----exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1 -+--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1 - - ## This test file is for testing encrypted communication only, not other - ## encryption routines that the SSL library happens to provide! --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-strmov.patch b/database/mariadb/centos/files/mariadb-strmov.patch deleted file mode 100644 index cdd2f8bcb..000000000 --- a/database/mariadb/centos/files/mariadb-strmov.patch +++ /dev/null @@ -1,40 +0,0 @@ -Remove overly optimistic definition of strmov() as stpcpy(). - -mysql uses this macro with overlapping source and destination strings, -which is verboten per spec, and fails on some Red Hat platforms. -Deleting the definition is sufficient to make it fall back to a -byte-at-a-time copy loop, which should consistently give the -expected behavior. - -Note: the particular case that prompted this patch is reported and fixed -at http://bugs.mysql.com/bug.php?id=48864. However, my faith in upstream's -ability to detect this type of error is low, and I also see little evidence -of any real performance gain from optimizing these calls. So I'm keeping -this patch. - ---- - include/m_string.h | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/include/m_string.h b/include/m_string.h -index 7437ea8..bb3ab57 100644 ---- a/include/m_string.h -+++ b/include/m_string.h -@@ -73,14 +73,6 @@ - extern void *(*my_str_realloc)(void *, size_t); - extern void (*my_str_free)(void *); - --#ifdef DBUG_OFF --#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER) --#define strmov(A,B) __builtin_stpcpy((A),(B)) --#elif defined(HAVE_STPCPY) --#define strmov(A,B) stpcpy((A),(B)) --#endif --#endif -- - /* Declared in int2str() */ - extern const char _dig_vec_upper[]; - extern const char _dig_vec_lower[]; --- -1.9.1 - diff --git a/database/mariadb/centos/files/my.cnf.in b/database/mariadb/centos/files/my.cnf.in deleted file mode 100644 index 247e12d8e..000000000 --- a/database/mariadb/centos/files/my.cnf.in +++ /dev/null @@ -1,18 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# This group is read by the server -# -[mysqld] -# Disabling symbolic-links is recommended to prevent assorted security risks -symbolic-links=0 - -# -# include all files from the config directory -# -!includedir @INSTALL_SYSCONF2DIR@ - diff --git a/database/mariadb/centos/files/mysql-check-socket.sh b/database/mariadb/centos/files/mysql-check-socket.sh deleted file mode 100644 index b15cd32fe..000000000 --- a/database/mariadb/centos/files/mysql-check-socket.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# We check if there is already a process using the socket file, -# since otherwise the systemd service file could report false -# positive result when starting and mysqld_safe could remove -# a socket file, which is actually being used by a different daemon. - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -if test -e "$socketfile" ; then - echo "Socket file $socketfile exists." >&2 - - # no write permissions - if ! test -w "$socketfile" ; then - echo "Not enough permission to write to the socket file $socketfile, which is suspicious." >&2 - echo "Please, remove $socketfile manually to start the service." >&2 - exit 1 - fi - - # not a socket file - if ! test -S "$socketfile" ; then - echo "The file $socketfile is not a socket file, which is suspicious." >&2 - echo "Please, remove $socketfile manually to start the service." >&2 - exit 1 - fi - - # some process uses the socket file - if fuser "$socketfile" &>/dev/null ; then - socketpid=$(fuser "$socketfile" 2>/dev/null) - echo "Is another MySQL daemon already running with the same unix socket?" >&2 - echo "Please, stop the process $socketpid or remove $socketfile manually to start the service." >&2 - exit 1 - fi - - # socket file is a garbage - echo "No process is using $socketfile, which means it is a garbage, so it will be removed automatically." >&2 -fi - -exit 0 diff --git a/database/mariadb/centos/files/mysql-check-upgrade.sh b/database/mariadb/centos/files/mysql-check-upgrade.sh deleted file mode 100644 index cd669bda8..000000000 --- a/database/mariadb/centos/files/mysql-check-upgrade.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -upgrade_info_file="$datadir/mysql_upgrade_info" -version=0 -# get version as integer from mysql_upgrade_info file -if [ -f "$upgrade_info_file" ] && [ -r "$upgrade_info_file" ] ; then - version_major=$(cat "$upgrade_info_file" | head -n 1 | sed -e 's/\([0-9]*\)\.\([0-9]*\)\..*$/\1/') - version_minor=$(cat "$upgrade_info_file" | head -n 1 | sed -e 's/\([0-9]*\)\.\([0-9]*\)\..*$/\2/') - if [[ $version_major =~ ^[0-9]+$ ]] && [[ $version_minor =~ ^[0-9]+$ ]] ; then - version=$((version_major*100+version_minor)) - fi -fi - -# compute current version as integer -thisversion=$((@MAJOR_VERSION@*100+@MINOR_VERSION@)) - -# provide warning in cases we should run mysql_upgrade -if [ $version -ne $thisversion ] ; then - - # give extra warning if some version seems to be skipped - if [ $version -gt 0 ] && [ $version -lt 505 ] ; then - echo "The datadir located at $datadir seems to be older than of a version 5.5. Please, mind that as a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series." >&2 - fi - - cat <&2 -The datadir located at $datadir needs to be upgraded using 'mysql_upgrade' tool. This can be done using the following steps: - - 1. Back-up your data before with 'mysql_upgrade' - 2. Start the database daemon using 'service @DAEMON_NAME@ start' - 3. Run 'mysql_upgrade' with a database user that has sufficient privileges - -Read more about 'mysql_upgrade' usage at: -https://mariadb.com/kb/en/mariadb/documentation/sql-commands/table-commands/mysql_upgrade/ -EOF -fi - -exit 0 diff --git a/database/mariadb/centos/files/mysql-embedded-check.c b/database/mariadb/centos/files/mysql-embedded-check.c deleted file mode 100644 index 8bf8ca53d..000000000 --- a/database/mariadb/centos/files/mysql-embedded-check.c +++ /dev/null @@ -1,26 +0,0 @@ -/* simple test program to see if we can link the embedded server library */ - -#include -#include -#include - -#include "mysql.h" - -MYSQL *mysql; - -static char *server_options[] = \ - { "mysql_test", "--defaults-file=my.cnf", NULL }; -int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; - -static char *server_groups[] = { "libmysqld_server", - "libmysqld_client", NULL }; - -int main(int argc, char **argv) -{ - mysql_library_init(num_elements, server_options, server_groups); - mysql = mysql_init(NULL); - mysql_close(mysql); - mysql_library_end(); - - return 0; -} diff --git a/database/mariadb/centos/files/mysql-prepare-db-dir.sh b/database/mariadb/centos/files/mysql-prepare-db-dir.sh deleted file mode 100644 index 52a42a067..000000000 --- a/database/mariadb/centos/files/mysql-prepare-db-dir.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh - -# This script creates the mysql data directory during first service start. -# In subsequent starts, it does nothing much. - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -# Returns content of the specified directory -# If listing files fails, fake-file is returned so which means -# we'll behave like there was some data initialized -# @param datadir -ls_check_datadir () -{ - ls -A "$1" 2>/dev/null - test $? -eq 0 || echo "fake-file" -} - -# Checks whether datadir should be initialized -# @param datadir -should_initialize () -{ - case `ls_check_datadir "$1"` in - ""|lost+found|*.err) true ;; - *) false ;; - esac -} - -# If two args given first is user, second is group -# otherwise the arg is the systemd service file -if [ "$#" -eq 2 ]; then - myuser="$1" - mygroup="$2" -else - # Absorb configuration settings from the specified systemd service file, - # or the default service if not specified - SERVICE_NAME="$1" - if [ x"$SERVICE_NAME" = x ]; then - SERVICE_NAME=@DAEMON_NAME@.service - fi - - myuser=`systemctl show -p User "${SERVICE_NAME}" | - sed 's/^User=//'` - if [ x"$myuser" = x ]; then - myuser=mysql - fi - - mygroup=`systemctl show -p Group "${SERVICE_NAME}" | - sed 's/^Group=//'` - if [ x"$mygroup" = x ]; then - mygroup=mysql - fi -fi - -# Set up the errlogfile with appropriate permissions -touch "$errlogfile" -ret=$? -# Provide some advice if the log file cannot be touched -if [ $ret -ne 0 ] ; then - errlogdir=$(dirname $errlogfile) - if ! [ -d "$errlogdir" ] ; then - echo "The directory $errlogdir does not exist." - elif [ -f "$errlogfile" ] ; then - echo "The log file $errlogfile cannot be touched, please, fix its permissions." - else - echo "The log file $errlogfile could not be created." - fi - echo "The daemon will be run under $myuser:$mygroup" - exit 1 -fi -chown "$myuser:$mygroup" "$errlogfile" -chmod 0640 "$errlogfile" -[ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" - -# Make the data directory if doesn't exist or empty -if should_initialize "$datadir" ; then - # First, make sure $datadir is there with correct permissions - # (note: if it's not, and we're not root, this'll fail ...) - if [ ! -e "$datadir" -a ! -h "$datadir" ]; then - mkdir -p "$datadir" || exit 1 - fi - chown "$myuser:$mygroup" "$datadir" - chmod 0755 "$datadir" - [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir" - - # Now create the database - echo "Initializing @NICE_PROJECT_NAME@ database" - # Avoiding deletion of files not created by mysql_install_db is - # guarded by time check and sleep should help work-arounded - # potential issues on systems with 1 second resolution timestamps - # https://bugzilla.redhat.com/show_bug.cgi?id=1335849#c19 - INITDB_TIMESTAMP=`LANG=C date -u` - sleep 1 - @bindir@/mysql_install_db --rpm --datadir="$datadir" --user="$myuser" - ret=$? - if [ $ret -ne 0 ] ; then - echo "Initialization of @NICE_PROJECT_NAME@ database failed." >&2 - echo "Perhaps @sysconfdir@/my.cnf is misconfigured or there is some problem with permissions of $datadir." >&2 - # Clean up any partially-created database files - if [ ! -e "$datadir/mysql/user.frm" ] && [ -d "$datadir" ] ; then - echo "Initialization of @NICE_PROJECT_NAME@ database was not finished successfully." >&2 - echo "Files created so far will be removed." >&2 - find "$datadir" -mindepth 1 -maxdepth 1 -newermt "$INITDB_TIMESTAMP" \ - -not -name "lost+found" -exec rm -rf {} + - if [ $? -ne 0 ] ; then - echo "Removing of created files was not successfull." >&2 - echo "Please, clean directory $datadir manually." >&2 - fi - else - echo "However, part of data has been initialized and those will not be removed." >&2 - echo "Please, clean directory $datadir manually." >&2 - fi - exit $ret - fi - # upgrade does not need to be run on a fresh datadir - echo "@VERSION@-MariaDB" >"$datadir/mysql_upgrade_info" - # In case we're running as root, make sure files are owned properly - chown -R "$myuser:$mygroup" "$datadir" -else - if [ -d "$datadir/mysql/" ] ; then - # mysql dir exists, it seems data are initialized properly - echo "Database @NICE_PROJECT_NAME@ is probably initialized in $datadir already, nothing is done." - echo "If this is not the case, make sure the $datadir is empty before running `basename $0`." - else - # if the directory is not empty but mysql/ directory is missing, then - # print error and let user to initialize manually or empty the directory - echo "Database @NICE_PROJECT_NAME@ is not initialized, but the directory $datadir is not empty, so initialization cannot be done." - echo "Make sure the $datadir is empty before running `basename $0`." - exit 1 - fi -fi - -exit 0 diff --git a/database/mariadb/centos/files/mysql-scripts-common.sh b/database/mariadb/centos/files/mysql-scripts-common.sh deleted file mode 100644 index f77a8040b..000000000 --- a/database/mariadb/centos/files/mysql-scripts-common.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# Some useful functions used in other MySQL helper scripts -# This scripts defines variables datadir, errlogfile, socketfile - -export LC_ALL=C - -# extract value of a MySQL option from config files -# Usage: get_mysql_option VARNAME DEFAULT SECTION [ SECTION, ... ] -# result is returned in $result -# We use my_print_defaults which prints all options from multiple files, -# with the more specific ones later; hence take the last match. -get_mysql_option(){ - if [ $# -ne 3 ] ; then - echo "get_mysql_option requires 3 arguments: section option default_value" - return - fi - sections="$1" - option_name="$2" - default_value="$3" - result=`@bindir@/my_print_defaults $sections | sed -n "s/^--${option_name}=//p" | tail -n 1` - if [ -z "$result" ]; then - # not found, use default - result="${default_value}" - fi -} - -# Defaults here had better match what mysqld_safe will default to -# The option values are generally defined on three important places -# on the default installation: -# 1) default values are hardcoded in the code of mysqld daemon or -# mysqld_safe script -# 2) configurable values are defined in @sysconfdir@/my.cnf -# 3) default values for helper scripts are specified bellow -# So, in case values are defined in my.cnf, we need to get that value. -# In case they are not defined in my.cnf, we need to get the same value -# in the daemon, as in the helper scripts. Thus, default values here -# must correspond with values defined in mysqld_safe script and source -# code itself. - -server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ client-server" - -get_mysql_option "$server_sections" datadir "@MYSQL_DATADIR@" -datadir="$result" - -# if there is log_error in the my.cnf, my_print_defaults still -# returns log-error -# log-error might be defined in mysqld_safe and mysqld sections, -# the former has bigger priority -get_mysql_option "$server_sections" log-error "$datadir/`uname -n`.err" -errlogfile="$result" - -get_mysql_option "$server_sections" socket "@MYSQL_UNIX_ADDR@" -socketfile="$result" - -get_mysql_option "$server_sections" pid-file "$datadir/`uname -n`.pid" -pidfile="$result" - diff --git a/database/mariadb/centos/files/mysql-wait-ready.sh b/database/mariadb/centos/files/mysql-wait-ready.sh deleted file mode 100644 index 6d95800aa..000000000 --- a/database/mariadb/centos/files/mysql-wait-ready.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -# This script waits for mysqld to be ready to accept connections -# (which can be many seconds or even minutes after launch, if there's -# a lot of crash-recovery work to do). -# Running this as ExecStartPost is useful so that services declared as -# "After mysqld" won't be started until the database is really ready. - -if [ $# -ne 1 ] ; then - echo "You need to pass daemon pid as an argument for this script." - exit 20 -fi - -# Service file passes us the daemon's PID (actually, mysqld_safe's PID) -daemon_pid="$1" - -# Wait for the server to come up or for the mysqld process to disappear -ret=0 -while /bin/true; do - # Check process still exists - if ! [ -d "/proc/${daemon_pid}" ] ; then - ret=1 - break - fi - RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` - mret=$? - if [ $mret -eq 0 ] ; then - break - fi - # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, - # anything else suggests a configuration error - if [ $mret -ne 1 -a $mret -ne 11 ]; then - echo "Cannot check for @NICE_PROJECT_NAME@ Daemon startup because of mysqladmin failure." >&2 - ret=$mret - break - fi - # "Access denied" also means the server is alive - echo "$RESPONSE" | grep -q "Access denied for user" && break - - sleep 1 -done - -exit $ret diff --git a/database/mariadb/centos/files/mysql-wait-stop.sh b/database/mariadb/centos/files/mysql-wait-stop.sh deleted file mode 100644 index 0af45fd51..000000000 --- a/database/mariadb/centos/files/mysql-wait-stop.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -# This script waits for mysqld to be properly stopped -# (which can be many seconds in some large load). -# Running this as ExecStopPost is useful so that starting which is done -# as part of restart doesn't see the former process still running. - -# Wait for the server to properly end the main server -ret=0 -TIMEOUT=60 -SECONDS=0 - -if ! [ -f "$pidfile" ]; then - exit 0 -fi - -MYSQLPID=`cat "$pidfile" 2>/dev/null` -if [ -z "$MYSQLPID" ] ; then - exit 2 -fi - -while /bin/true; do - # Check process still exists - if ! [ -d "/proc/${MYSQLPID}" ] ; then - break - fi - if [ $SECONDS -gt $TIMEOUT ] ; then - ret=3 - break - fi - sleep 1 -done - -exit $ret diff --git a/database/mariadb/centos/files/mysql.init.in b/database/mariadb/centos/files/mysql.init.in deleted file mode 100644 index 0a022af97..000000000 --- a/database/mariadb/centos/files/mysql.init.in +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# @DAEMON_NAME@ This shell script takes care of starting and stopping -# the MySQL subsystem (mysqld). -# -# chkconfig: - 64 36 -# description: MySQL database server. -# processname: mysqld -# config: @sysconfdir@/my.cnf -# pidfile: /var/run/@DAEMON_NAME@/@DAEMON_NAME@.pid -### BEGIN INIT INFO -# Provides: mysqld -# Required-Start: $local_fs $remote_fs $network $named $syslog $time -# Required-Stop: $local_fs $remote_fs $network $named $syslog $time -# Short-Description: start and stop MySQL server -# Description: MySQL database server -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - - -exec="@bindir@/mysqld_safe" -prog="@DAEMON_NAME@" - -# Set timeouts here so they can be overridden from @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ -STARTTIMEOUT=300 -STOPTIMEOUT=60 - -# User and group the daemon will run under -MYUSER=mysql -MYGROUP=mysql - -# Edit the following file in order to re-write some of the environment -# variables defined above, like $STARTTIMEOUT, $STOPTIMEOUT, $exec -[ -e @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ ] && . @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ - -lockfile=/var/lock/subsys/$prog - -# get options from my.cnf -source "@libexecdir@/mysql-scripts-common" - -start(){ - [ -x $exec ] || exit 5 - - # check permissions - if ! touch $(dirname $socketfile) &>/dev/null ; then - action $"Starting $prog: " /bin/false - return 4 - fi - - # check to see if it's already running - MYSQLDRUNNING=0 - if [ -f "$pidfile" ]; then - MYSQLPID=`cat "$pidfile" 2>/dev/null` - if [ -n "$MYSQLPID" ] && [ -d "/proc/$MYSQLPID" ] ; then - MYSQLDRUNNING=1 - fi - fi - RESPONSE=`@bindir@/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` - if [ $MYSQLDRUNNING = 1 ] && [ $? = 0 ]; then - # already running, do nothing - action $"Starting $prog: " /bin/true - ret=0 - elif [ $MYSQLDRUNNING = 1 ] && echo "$RESPONSE" | grep -q "Access denied for user" - then - # already running, do nothing - action $"Starting $prog: " /bin/true - ret=0 - else - @libexecdir@/mysql-prepare-db-dir $MYUSER $MYGROUP || return 4 - @libexecdir@/mysql-check-socket || return 1 - - # Pass all the options determined above, to ensure consistent behavior. - # In many cases mysqld_safe would arrive at the same conclusions anyway - # but we need to be sure. (An exception is that we don't force the - # log-error setting, since this script doesn't really depend on that, - # and some users might prefer to configure logging to syslog.) - # Note: set --basedir to prevent probes that might trigger SELinux - # alarms, per bug #547485 - $exec --datadir="$datadir" --socket="$socketfile" \ - --pid-file="$pidfile" \ - --basedir=@prefix@ --user=$MYUSER >/dev/null 2>&1 & - safe_pid=$! - - # Wait until the daemon is up - @libexecdir@/mysql-wait-ready "$safe_pid" - ret=$? - - if [ $ret -eq 0 ]; then - action $"Starting $prog: " /bin/true - chmod o+r $pidfile >/dev/null 2>&1 - touch $lockfile - else - action $"Starting $prog: " /bin/false - fi - fi - return $ret -} - -stop(){ - if [ ! -f "$pidfile" ]; then - # not running; per LSB standards this is "ok" - action $"Stopping $prog: " /bin/true - return 0 - fi - MYSQLPID=`cat "$pidfile" 2>/dev/null` - if [ -n "$MYSQLPID" ]; then - if ! [ -d "/proc/$MYSQLPID" ] ; then - # process doesn't run anymore - action $"Stopping $prog: " /bin/true - return 0 - fi - /bin/kill "$MYSQLPID" >/dev/null 2>&1 - ret=$? - if [ $ret -eq 0 ]; then - TIMEOUT="$STOPTIMEOUT" - while [ $TIMEOUT -gt 0 ]; do - /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break - sleep 1 - let TIMEOUT=${TIMEOUT}-1 - done - if [ $TIMEOUT -eq 0 ]; then - echo "Timeout error occurred trying to stop MySQL Daemon." - ret=1 - action $"Stopping $prog: " /bin/false - else - rm -f $lockfile - rm -f "$socketfile" - action $"Stopping $prog: " /bin/true - fi - else - # kill command failed, probably insufficient permissions - action $"Stopping $prog: " /bin/false - ret=4 - fi - else - # failed to read pidfile, probably insufficient permissions - action $"Stopping $prog: " /bin/false - ret=4 - fi - return $ret -} - -restart(){ - stop - start -} - -condrestart(){ - [ -e $lockfile ] && restart || : -} - - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status -p "$pidfile" $prog - ;; - restart) - restart - ;; - condrestart|try-restart) - condrestart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac - -exit $? diff --git a/database/mariadb/centos/files/mysql.service.in b/database/mariadb/centos/files/mysql.service.in deleted file mode 100644 index c385b4a70..000000000 --- a/database/mariadb/centos/files/mysql.service.in +++ /dev/null @@ -1,70 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", -# containing -# .include /usr/lib/systemd/system/@DAEMON_NAME@.service -# ...make your changes here... -# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", -# which doesn't need to include ".include" call and which will be parsed -# after the file @DAEMON_NAME@.service itself is parsed. -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F - -# For example, if you want to increase mysql's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, so create a file named -# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: -# [Service] -# LimitNOFILE=10000 - -# Note: /usr/lib/... is recommended in the .include line though /lib/... -# still works. -# Don't forget to reload systemd daemon after you change unit configuration: -# root> systemctl --system daemon-reload - -# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance. - -[Unit] -Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -After=syslog.target -After=network.target - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=@libexecdir@/mysql-check-socket -ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=@libexecdir@/mysqld --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=@libexecdir@/mysql-check-upgrade -ExecStopPost=@libexecdir@/mysql-wait-stop - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address mysqld option. -PrivateNetwork=false - -KillMode=process -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/database/mariadb/centos/files/mysql.tmpfiles.d.in b/database/mariadb/centos/files/mysql.tmpfiles.d.in deleted file mode 100644 index 9e6b6e8bf..000000000 --- a/database/mariadb/centos/files/mysql.tmpfiles.d.in +++ /dev/null @@ -1,3 +0,0 @@ -# Do not edit this file. -# To override this, put /etc/tmpfiles.d/mariadb.conf instead. -d @PID_FILE_DIR@ 0755 mysql mysql - diff --git a/database/mariadb/centos/files/mysql@.service.in b/database/mariadb/centos/files/mysql@.service.in deleted file mode 100644 index ab9a7cd1a..000000000 --- a/database/mariadb/centos/files/mysql@.service.in +++ /dev/null @@ -1,77 +0,0 @@ -# Multi instance version of mariadb. For if you run mutiple verions at once. -# Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mysqld.INSTANCENAME] as sections in my.cnf -# and start the service via: -# systemctl start @DAEMON_NAME@@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", -# containing -# .include /usr/lib/systemd/system/@DAEMON_NAME@.service -# ...make your changes here... -# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", -# which doesn't need to include ".include" call and which will be parsed -# after the file @DAEMON_NAME@.service itself is parsed. -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F - -# For example, if you want to increase mysql's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, so create a file named -# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: -# [Service] -# LimitNOFILE=10000 - -# Note: /usr/lib/... is recommended in the .include line though /lib/... -# still works. -# Don't forget to reload systemd daemon after you change unit configuration: -# root> systemctl --system daemon-reload - -# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance. - -[Unit] -Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -After=syslog.target -After=network.target - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=@libexecdir@/mysql-check-socket -ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=@libexecdir@/mysql-check-upgrade -ExecStopPost=@libexecdir@/mysql-wait-stop - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address mysqld option. -PrivateNetwork=false - -KillMode=process -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/database/mariadb/centos/files/mysql_config_multilib.sh b/database/mariadb/centos/files/mysql_config_multilib.sh deleted file mode 100644 index 06c2a2b45..000000000 --- a/database/mariadb/centos/files/mysql_config_multilib.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh -# -# Wrapper script for mysql_config to support multilib -# -# This command respects setarch - -bits=$(rpm --eval %__isa_bits) - -case $bits in - 32|64) status=known ;; - *) status=unknown ;; -esac - -if [ "$status" = "unknown" ] ; then - echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits" - exit 1 -fi - - -if [ -x @bindir@/mysql_config-$bits ] ; then - @bindir@/mysql_config-$bits "$@" -else - echo "$0: error: needed binary: @bindir@/mysql_config-$bits is missing" - exit 1 -fi - diff --git a/database/mariadb/centos/files/rh-skipped-tests-arm.list b/database/mariadb/centos/files/rh-skipped-tests-arm.list deleted file mode 100644 index d7e0b587c..000000000 --- a/database/mariadb/centos/files/rh-skipped-tests-arm.list +++ /dev/null @@ -1,8 +0,0 @@ -main.partition_exchange : #1399847 -main.analyze_stmt_orderby : #1399847 -main.explain_json_innodb : #1399847 -main.explain_json_format_partitions : #1399847 -main.analyze_format_json : #1399847 -main.explain_json : #1399847 -main.subselect_cache : #1399847 -main.type_year : #1399847 diff --git a/database/mariadb/centos/files/rh-skipped-tests-base.list b/database/mariadb/centos/files/rh-skipped-tests-base.list deleted file mode 100644 index 2992d7e57..000000000 --- a/database/mariadb/centos/files/rh-skipped-tests-base.list +++ /dev/null @@ -1,9 +0,0 @@ -main.userstat : #1399847 -main.multi_update : #1399847 -main.set_statement_notembedded_binlog : #1399847 -main.ssl_7937 : #1399847 -main.ssl_crl_clients : #1399847 -main.ssl_cert_verify : #1399847 -perfschema.nesting : #1399847 -perfschema.socket_summary_by_event_name_func : #1399847 -perfschema.socket_summary_by_instance_func : #1399847 diff --git a/database/mariadb/centos/files/rh-skipped-tests-ppc-s390.list b/database/mariadb/centos/files/rh-skipped-tests-ppc-s390.list deleted file mode 100644 index e69de29bb..000000000 diff --git a/database/mariadb/centos/mariadb.spec b/database/mariadb/centos/mariadb.spec deleted file mode 100644 index 5a1a82ac6..000000000 --- a/database/mariadb/centos/mariadb.spec +++ /dev/null @@ -1,2033 +0,0 @@ -# Prefix that is used for patches -%global pkg_name %{name} -%global pkgnamepatch mariadb - -# Regression tests may take a long time (many cores recommended), skip them by -# passing --nocheck to rpmbuild or by setting runselftest to 0 if defining -# --nocheck is not possible (e.g. in koji build) -%{!?runselftest:%global runselftest 0} - -# Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 - -# In f20+ use unversioned docdirs, otherwise the old versioned one -%global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} -%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}} - -# Use Full RELRO for all binaries (RHBZ#1092548) -%global _hardened_build 1 - -# By default, patch(1) creates backup files when chunks apply with offsets. -# Turn that off to ensure such files don't get included in RPMs (cf bz#884755). -%global _default_patch_flags --no-backup-if-mismatch - -# TokuDB engine is now part of MariaDB, but it is available only for x86_64; -# variable tokudb allows to build with TokuDB storage engine -# Temporarily disabled in F21+ for https://mariadb.atlassian.net/browse/MDEV-6446 -# WRS: TokuDB has AGPL license, so disable it -%ifarch 0 #x86_64 -%bcond_without tokudb -%else -%bcond_with tokudb -%endif - -# Mroonga engine is now part of MariaDB, but it only builds for x86_64; -# variable mroonga allows to build with Mroonga storage engine -%ifarch x86_64 i686 -%bcond_without mroonga -%else -%bcond_with mroonga -%endif - -# The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing -# hierarchies and more complex graph structures to be handled in a relational -# fashion; enabled by default -# Temporarily disabling oqgraph: https://mariadb.atlassian.net/browse/MDEV-9479 -%bcond_with oqgraph - -# For some use cases we do not need some parts of the package -%bcond_without clibrary -%bcond_without embedded -%bcond_without devel -%bcond_without client -%bcond_without common -%bcond_without errmsg -%bcond_without bench -%bcond_without test -%bcond_without connect -%bcond_without galera - -# When there is already another package that ships /etc/my.cnf, -# rather include it than ship the file again, since conflicts between -# those files may create issues -%bcond_without config - -# For deep debugging we need to build binaries with extra debug info -%bcond_with debug - -# Include files for SysV init or systemd -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -%bcond_without init_systemd -%bcond_with init_sysv -%global daemon_name %{name} -%global daemondir %{_unitdir} -%global daemon_no_prefix %{pkg_name} -%global mysqld_pid_dir mysqld -%else -%bcond_with init_systemd -%bcond_without init_sysv -%global daemon_name mysqld -%global daemondir %{_sysconfdir}/rc.d/init.d -%global daemon_no_prefix mysqld -%endif - -# MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use -# the bundled library, since the package cannot be build with older version -%global pcre_version 8.41 -%if 0%{?fedora} >= 21 -%bcond_without pcre -%else -%bcond_with pcre -%endif - -# We define some system's well known locations here so we can use them easily -# later when building to another location (like SCL) -%global logrotateddir %{_sysconfdir}/logrotate.d -%global logfiledir %{_localstatedir}/log/%{daemon_name} -%global logfile %{logfiledir}/%{daemon_name}.log - -# Directory for storing pid file -%global pidfiledir %{_localstatedir}/run/%{daemon_name} - -# Defining where database data live -%global dbdatadir %{_localstatedir}/lib/mysql - -# Home directory of mysql user should be same for all packages that create it -%global mysqluserhome /var/lib/mysql - -# The evr of mysql we want to obsolete -%global obsoleted_mysql_evr 5.6-0 -%global obsoleted_mysql_case_evr 5.5.30-5 - -# The evr of mariadb-galera we want to obsolete -%global obsoleted_mariadb_galera_evr 1:10.0.17-6 -%global obsoleted_mariadb_galera_common_evr 5.5.36-10 -%global obsoleted_mariadb_galera_server_evr 1:10.0.17-6 - -# Provide mysql names for compatibility -%bcond_without mysql_names -%bcond_without conflicts - -# Make long macros shorter -%global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.1 -%global bugfixver 28 - -Name: mariadb -Version: %{compatver}.%{bugfixver} -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} -Epoch: 3 - -Summary: A community developed branch of MySQL -Group: Applications/Databases -URL: http://mariadb.org -# Exceptions allow client libraries to be linked with most open source SW, -# not only GPL code. See README.mysql-license -License: GPLv2 with exceptions and LGPLv2 and BSD - -#Source0: http://mirrors.syringanetworks.net/mariadb/mariadb-%{version}/source/mariadb-%{version}.tar.gz -Source0: mariadb-%{version}.tar.gz -Source2: mysql_config_multilib.sh -Source3: my.cnf.in -Source5: README.mysql-cnf -Source6: README.mysql-docs -Source7: README.mysql-license -Source9: mysql-embedded-check.c -Source10: mysql.tmpfiles.d.in -Source11: mysql.service.in -Source12: mysql-prepare-db-dir.sh -Source13: mysql-wait-ready.sh -Source14: mysql-check-socket.sh -Source15: mysql-scripts-common.sh -Source16: mysql-check-upgrade.sh -Source17: mysql-wait-stop.sh -Source18: mysql@.service.in -Source19: mysql.init.in -Source50: rh-skipped-tests-base.list -Source51: rh-skipped-tests-arm.list -Source52: rh-skipped-tests-ppc-s390.list -# TODO: clustercheck contains some hard-coded paths, these should be expanded using template system -Source70: clustercheck.sh -Source71: LICENSE.clustercheck -Source72: mariadb-server-galera.te - -# Comments for these patches are in the patch files -# Patches common for more mysql-like packages -Patch1: %{pkgnamepatch}-strmov.patch -Patch2: %{pkgnamepatch}-install-test.patch -Patch4: %{pkgnamepatch}-logrotate.patch -Patch5: %{pkgnamepatch}-file-contents.patch -Patch7: %{pkgnamepatch}-scripts.patch -Patch8: %{pkgnamepatch}-install-db-sharedir.patch -Patch9: %{pkgnamepatch}-ownsetup.patch -Patch12: %{pkgnamepatch}-admincrash.patch -Patch13: %{pkgnamepatch}-ssl-cypher.patch -Patch14: %{pkgnamepatch}-example-config-files.patch - -# Patches specific for this mysql package -Patch30: %{pkgnamepatch}-errno.patch -# Patch31: %{pkgnamepatch}-string-overflow.patch -Patch32: %{pkgnamepatch}-basedir.patch -# Patch34: %{pkgnamepatch}-covscan-stroverflow.patch -Patch37: %{pkgnamepatch}-notestdb.patch -# Due to LP https://bugs.launchpad.net/tripleo/+bug/1638864 -# Reverts 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 until we fix the -# galera resource agent to cope with this change -# When RHBZ#1391470 gets fixed and released in centos we can remove this patch -Patch38: %{pkgnamepatch}-revert-stdouterr-closing.patch - -# Patches for galera -Patch40: %{pkgnamepatch}-galera.cnf.patch -# Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch - -BuildRequires: cmake -BuildRequires: bison -BuildRequires: gcc-c++ -BuildRequires: libaio-devel -BuildRequires: libedit-devel -BuildRequires: ncurses-devel -BuildRequires: perl -%if 0%{?fedora} >= 22 || 0%{?rhel} > 7 -BuildRequires: perl-generators -%endif -BuildRequires: systemtap-sdt-devel -BuildRequires: zlib-devel -BuildRequires: multilib-rpm-config - -# Mariabackup -BuildRequires: libarchive libarchive-devel -# auth_pam.so plugin will be build if pam-devel is installed -BuildRequires: pam-devel -# use either new enough version of pcre or provide bundles(pcre) -%{?with_pcre:BuildRequires: pcre-devel >= 8.35} -%{!?with_pcre:Provides: bundled(pcre) = %{pcre_version}} -# Tests requires time and ps and some perl modules -BuildRequires: procps -BuildRequires: time -BuildRequires: perl(Env) -BuildRequires: perl(Exporter) -BuildRequires: perl(Fcntl) -BuildRequires: perl(File::Temp) -BuildRequires: perl(Data::Dumper) -BuildRequires: perl(Getopt::Long) -BuildRequires: perl(IPC::Open3) -BuildRequires: perl(Memoize) -BuildRequires: perl(Socket) -BuildRequires: perl(Sys::Hostname) -BuildRequires: perl(Test::More) -BuildRequires: perl(Time::HiRes) -BuildRequires: perl(Symbol) - -# Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -Requires: compat-openssl10 -%else -# for running some openssl tests rhbz#1189180 -BuildRequires: openssl -BuildRequires: openssl-devel -%endif - -BuildRequires: krb5-devel - -BuildRequires: selinux-policy-devel -%{?with_init_systemd:BuildRequires: systemd systemd-devel} - -BuildRequires: krb5-devel - -Requires: bash -Requires: fileutils -Requires: grep -Requires: %{name}-common%{?_isa} = %{sameevr} - -# Explicit EVR requirement for -libs is needed for -# https://bugzilla.redhat.com/show_bug.cgi?id=1406320 -Requires: %{name}-libs%{?_isa} = %{sameevr} - -%if %{with mysql_names} -Provides: mysql = %{sameevr} -Provides: mysql%{?_isa} = %{sameevr} -Provides: mysql-compat-client = %{sameevr} -Provides: mysql-compat-client%{?_isa} = %{sameevr} -%endif - - - -# MySQL (with caps) is upstream's spelling of their own RPMs for mysql -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql} - -# obsoletion of mariadb-galera -Provides: mariadb-galera = %{sameevr} -Obsoletes: mariadb-galera < %{obsoleted_mariadb_galera_evr} - -# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) -%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ -%else -%filter_from_requires /perl(\(hostnames\|lib::mtr\|lib::v1\|mtr_\|My::\)/d -%filter_provides_in -P (%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\.so) -%filter_setup -%endif - -# Define license macro if not present -%{!?_licensedir:%global license %doc} - -%description -MariaDB is a community developed branch of MySQL. -MariaDB is a multi-user, multi-threaded SQL database server. -It is a client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. The base package -contains the standard MariaDB/MySQL client programs and generic MySQL files. - - -%if %{with clibrary} -%package libs -Summary: The shared libraries required for MariaDB/MySQL clients -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-libs = %{sameevr} -Provides: mysql-libs%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}} - -%description libs -The mariadb-libs package provides the essential shared libraries for any -MariaDB/MySQL client program or interface. You will need to install this -package to use any other MariaDB package or any clients that need to connect -to a MariaDB/MySQL server. MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with config} -%package config -Summary: The config files required by server and client -Group: Applications/Databases - -%description config -The package provides the config file my.cnf and my.cnf.d directory used by any -MariaDB or MySQL program. You will need to install this package to use any -other MariaDB or MySQL package if the config files are not provided in the -package itself. -%endif - - -%if %{with common} -%package common -Summary: The shared files required by server and client -Group: Applications/Databases -Requires: %{_sysconfdir}/my.cnf - -# obsoletion of mariadb-galera-common -Provides: mariadb-galera-common = %{sameevr} -Obsoletes: mariadb-galera-common < %{obsoleted_mariadb_galera_common_evr} - -%description common -The package provides the essential shared files for any MariaDB program. -You will need to install this package to use any other MariaDB package. -%endif - - -%if %{with errmsg} -%package errmsg -Summary: The error messages files required by server and embedded -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} - -%description errmsg -The package provides error messages files for the MariaDB daemon and the -embedded server. You will need to install this package to use any of those -MariaDB packages. -%endif - - -%if %{with galera} -%package server-galera -Summary: The configuration files and scripts for galera replication -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: galera >= 25.3.3 -Requires(post): libselinux-utils -Requires(post): policycoreutils-python - -# obsoletion of mariadb-galera-server -Provides: mariadb-galera-server = %{sameevr} -Obsoletes: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr} - -%description server-galera -MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. This package contains -the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. -%endif - - -%package server -Summary: The MariaDB server and related files -Group: Applications/Databases - -# note: no version here = %%{version}-%%{release} -%if %{with mysql_names} -Requires: mysql-compat-client%{?_isa} -Requires: mysql%{?_isa} -%else -Requires: %{name}%{?_isa} -%endif -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{_sysconfdir}/my.cnf -Requires: %{_sysconfdir}/my.cnf.d -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -Requires: sh-utils -Requires(pre): /usr/sbin/useradd -%if %{with init_systemd} -# We require this to be present for %%{_tmpfilesdir} -Requires: systemd -# Make sure it's there when scriptlets run, too -Requires(pre): systemd -Requires(posttrans): systemd -%{?systemd_requires: %systemd_requires} -%endif -# mysqlhotcopy needs DBI/DBD support -Requires: perl(DBI) -Requires: perl(DBD::mysql) -# wsrep requirements -Requires: lsof -Requires: net-tools -Requires: sh-utils -Requires: rsync -%if %{with mysql_names} -Provides: mysql-server = %{sameevr} -Provides: mysql-server%{?_isa} = %{sameevr} -Provides: mysql-compat-server = %{sameevr} -Provides: mysql-compat-server%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}} -%{?with_conflicts:Conflicts: community-mysql-server} -%{?with_conflicts:Conflicts: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}} - -%description server -MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. This package contains -the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. - - -%if %{with oqgraph} -%package oqgraph-engine -Summary: The Open Query GRAPH engine for MariaDB -Group: Applications/Databases -Requires: %{name}-server%{?_isa} = %{sameevr} -# boost and Judy required for oograph -BuildRequires: boost-devel -BuildRequires: Judy-devel - -%description oqgraph-engine -The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB -database server. OQGRAPH is a computation engine allowing hierarchies and more -complex graph structures to be handled in a relational fashion. In a nutshell, -tree structures and friend-of-a-friend style searches can now be done using -standard SQL syntax, and results joined onto other tables. -%endif - - -%if %{with connect} -%package connect-engine -Summary: The CONNECT storage engine for MariaDB -Group: Applications/Databases -Requires: %{name}-server%{?_isa} = %{sameevr} - -%description connect-engine -The CONNECT storage engine enables MariaDB to access external local or -remote data (MED). This is done by defining tables based on different data -types, in particular files in various formats, data extracted from other DBMS -or products (such as Excel), or data retrieved from the environment -(for example DIR, WMI, and MAC tables). -%endif - - -%if %{with devel} -%package devel -Summary: Files for development of MariaDB/MySQL applications -Group: Applications/Databases -%{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}} -# avoid issues with openssl1.0 / openssl1.1 / compat -Requires: pkgconfig(openssl) -%if %{with mysql_names} -Provides: mysql-devel = %{sameevr} -Provides: mysql-devel%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql-devel} - -%description devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the libraries and header files that are needed for -developing MariaDB/MySQL client applications. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with embedded} -%package embedded -Summary: MariaDB as an embeddable library -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-embedded = %{sameevr} -Provides: mysql-embedded%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded < %{obsoleted_mysql_evr}} - -%description embedded -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains a version of the MariaDB server that can be embedded -into a client application instead of running as a separate process. -MariaDB is a community developed branch of MySQL. - - -%package embedded-devel -Summary: Development files for MariaDB as an embeddable library -Group: Applications/Databases -Requires: %{name}-embedded%{?_isa} = %{sameevr} -Requires: %{name}-devel%{?_isa} = %{sameevr} -# embedded-devel should require libaio-devel (rhbz#1290517) -Requires: libaio-devel -%if %{with mysql_names} -Provides: mysql-embedded-devel = %{sameevr} -Provides: mysql-embedded-devel%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: community-mysql-embedded-devel} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr}} - -%description embedded-devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains files needed for developing and testing with -the embedded version of the MariaDB server. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with bench} -%package bench -Summary: MariaDB benchmark scripts and data -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-bench = %{sameevr} -Provides: mysql-bench%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: community-mysql-bench} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-bench < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-bench < %{obsoleted_mysql_evr}} - -%description bench -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains benchmark scripts and data for use when benchmarking -MariaDB. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with test} -%package test -Summary: The test suite distributed with MariaDB -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{sameevr} -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: perl(Env) -Requires: perl(Exporter) -Requires: perl(Fcntl) -Requires: perl(File::Temp) -Requires: perl(Data::Dumper) -Requires: perl(Getopt::Long) -Requires: perl(IPC::Open3) -Requires: perl(Socket) -Requires: perl(Sys::Hostname) -Requires: perl(Test::More) -Requires: perl(Time::HiRes) -%{?with_conflicts:Conflicts: community-mysql-test} -%if %{with mysql_names} -Provides: mysql-test = %{sameevr} -Provides: mysql-test%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}} - -%description test -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the regression test suite distributed with -the MariaDB sources. -MariaDB is a community developed branch of MySQL. -%endif - -%prep -%setup -q -n mariadb-%{version} - -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch30 -p1 -# %patch31 -p1 -%patch32 -p1 -# %patch34 -p1 -%patch37 -p1 -%patch38 -p1 -%patch40 -p1 -# %patch41 -p1 - -sed -i -e 's/2.8.7/2.6.4/g' cmake/cpack_rpm.cmake -# workaround to deploy mariadb@.service on EL7 -sed -i 's/IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)/IF(TRUE)/g' support-files/CMakeLists.txt - -# workaround for upstream bug #56342 -rm -f mysql-test/t/ssl_8k_key-master.opt - -# generate a list of tests that fail, but are not disabled by upstream -cat %{SOURCE50} | tee mysql-test/rh-skipped-tests.list - -# disable some tests failing on different architectures -%ifarch %{arm} aarch64 -cat %{SOURCE51} | tee -a mysql-test/rh-skipped-tests.list -%endif - -%ifarch ppc ppc64 ppc64p7 s390 s390x -cat %{SOURCE52} | tee -a mysql-test/rh-skipped-tests.list -%endif - -cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ - %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \ - %{SOURCE70} scripts - -%if %{with galera} -# prepare selinux policy -mkdir selinux -sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{name}-server-galera.te -cat selinux/%{name}-server-galera.te -%endif - -# Check if PCRE version is actual -%{!?with_pcre: -pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` -pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` - -if [ %{pcre_version} != "$pcre_maj.$pcre_min" ] -then - echo "\n PCRE version is outdated. \n\tIncluded version:%{pcre_version} \n\tUpstream version: $pcre_maj.$pcre_min\n" - exit 1 -fi -} - - - -%build - -# fail quickly and obviously if user tries to build as root -%if %runselftest - if [ x"$(id -u)" = "x0" ]; then - echo "mysql's regression tests fail if run as root." - echo "If you really need to build the RPM as root, use" - echo "--nocheck to skip the regression tests." - exit 1 - fi -%endif - -CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# force PIC mode so that we can build libmysqld.so -CFLAGS="$CFLAGS -fPIC" -# GCC 4.9 causes segfaults: https://mariadb.atlassian.net/browse/MDEV-6360 -CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" -# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization -# submitted as bz #529298 -%ifarch sparc sparcv9 sparc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` -%endif -# significant performance gains can be achieved by compiling with -O3 optimization -# rhbz#1051069 -%ifarch ppc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` -%endif -CXXFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS - -%if 0%{?_hardened_build} -# building with PIE -LDFLAGS="$LDFLAGS -pie -Wl,-z,relro,-z,now" -export LDFLAGS -%endif - -# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX -# so we can't use %%{_datadir} and so forth here. -%cmake . \ - -DBUILD_CONFIG=mysql_release \ - -DFEATURE_SET="community" \ - -DINSTALL_LAYOUT=RPM \ - -DDAEMON_NAME="%{daemon_name}" \ - -DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \ - -DLOG_LOCATION="%{logfile}" \ - -DPID_FILE_DIR="%{pidfiledir}" \ - -DNICE_PROJECT_NAME="MariaDB" \ - -DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \ - -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ - -DINSTALL_SYSCONFDIR="%{_sysconfdir}" \ - -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ - -DINSTALL_DOCDIR="share/doc/%{_pkgdocdirname}" \ - -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \ - -DINSTALL_INCLUDEDIR=include/mysql \ - -DINSTALL_INFODIR=share/info \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ - -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \ - -DINSTALL_MYSQLTESTDIR=share/mysql-test \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ - -DINSTALL_SBINDIR=libexec \ - -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share \ - -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ - -DMYSQL_DATADIR="%{dbdatadir}" \ - -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ - -DENABLED_LOCAL_INFILE=ON \ - -DENABLE_DTRACE=ON \ - -DWITH_EMBEDDED_SERVER=ON \ - -DWITH_SSL=system \ - -DWITH_ZLIB=system \ -%{?with_pcre: -DWITH_PCRE=system}\ - -DWITH_JEMALLOC=no \ -%{!?with_tokudb: -DWITHOUT_TOKUDB=ON}\ -%{!?with_mroonga: -DWITHOUT_MROONGA=ON}\ -%{!?with_oqgraph: -DWITHOUT_OQGRAPH=ON}\ - -DTMPDIR=/var/tmp \ -%{?with_debug: -DCMAKE_BUILD_TYPE=Debug}\ - %{?_hardened_build:-DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now"} - -make %{?_smp_mflags} VERBOSE=1 - -# debuginfo extraction scripts fail to find source files in their real -# location -- satisfy them by copying these files into location, which -# is expected by scripts -for e in innobase xtradb ; do - for f in pars0grm.y pars0lex.l ; do - cp -p "storage/$e/pars/$f" "storage/$e/$f" - done -done - -# build selinux policy -%if %{with galera} -pushd selinux -make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp -%endif - -%install -make DESTDIR=%{buildroot} install - -# cmake generates some completely wacko references to -lprobes_mysql when -# building with dtrace support. Haven't found where to shut that off, -# so resort to this blunt instrument. While at it, let's not reference -# libmysqlclient_r anymore either. -sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ - %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp -cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config -chmod 755 %{buildroot}%{_bindir}/mysql_config - -# multilib header support -for header in mysql/my_config.h mysql/private/config.h; do -%multilib_fix_c_header --file %{_includedir}/$header -done - -# multilib support for shell scripts -# we only apply this to known Red Hat multilib arches, per bug #181335 -if %multilib_capable; then -mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} -install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config -fi - -# Upstream install this into arch-independent directory, TODO: report -mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig - -# install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, -# but that's pretty wacko --- see also %%{name}-file-contents.patch) -install -p -m 644 Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/ -rm -r %{buildroot}%{_datadir}/doc/%{_pkgdocdirname}/MariaDB-server-%{version}/ - -mkdir -p %{buildroot}%{logfiledir} -chmod 0750 %{buildroot}%{logfiledir} -touch %{buildroot}%{logfile} - -# current setting in my.cnf is to use /var/run/mariadb for creating pid file, -# however since my.cnf is not updated by RPM if changed, we need to create mysqld -# as well because users can have odd settings in their /etc/my.cnf -mkdir -p %{buildroot}%{pidfiledir} -install -p -m 0755 -d %{buildroot}%{dbdatadir} - -%if %{with config} -install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf -%else -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf -%endif - -# use different config file name for each variant of server -mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf - -# install systemd unit files and scripts for handling server startup -%if %{with init_systemd} -install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service -install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service -install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf -%if 0%{?mysqld_pid_dir:1} -echo "d %{_localstatedir}/run/%{mysqld_pid_dir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif -%endif - -# install SysV init script -%if %{with init_sysv} -install -D -p -m 755 scripts/mysql.init %{buildroot}%{daemondir}/%{daemon_name} -%endif - -# helper scripts for service starting -install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir -install -p -m 755 scripts/mysql-wait-ready %{buildroot}%{_libexecdir}/mysql-wait-ready -install -p -m 755 scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop -install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket -install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade -install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common - -# install selinux policy -%if %{with galera} -install -p -m 644 -D selinux/%{name}-server-galera.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp -%endif -# install -p -m 644 -D selinux/%{name}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.pp -# install -p -m 644 -D selinux/%{name}.te %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.te - - -# Remove libmysqld.a -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a - -# libmysqlclient_r is no more. Upstream tries to replace it with symlinks -# but that really doesn't work (wrong soname in particular). We'll keep -# just the devel libmysqlclient_r.so link, so that rebuilding without any -# source change is enough to get rid of dependency on libmysqlclient_r. -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so* -ln -s libmysqlclient.so %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so - -# mysql-test includes one executable that doesn't belong under /usr/share, -# so move it and provide a symlink -mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} -ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process - -# should move this to /etc/ ? -rm -f %{buildroot}%{_bindir}/mysql_embedded -rm -f %{buildroot}%{_libdir}/mysql/*.a -rm -f %{buildroot}%{_datadir}/%{pkg_name}/binary-configure -rm -f %{buildroot}%{_datadir}/%{pkg_name}/magic -rm -f %{buildroot}%{_datadir}/%{pkg_name}/ndb-config-2-node.ini -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysql.server -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server -rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* -rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* -rm -f %{buildroot}%{_bindir}/mytop - -#WRS -rm -rf %{buildroot}/usr/DESTINATION/JdbcInterface.jar - -# put logrotate script where it needs to be -mkdir -p %{buildroot}%{logrotateddir} -mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} -chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} - -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf - -# copy additional docs into build tree so %%doc will find them -install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} -install -p -m 0644 %{SOURCE6} %{basename:%{SOURCE6}} -install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}} -install -p -m 0644 %{SOURCE16} %{basename:%{SOURCE16}} -install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}} - -# install galera config file -sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' support-files/wsrep.cnf -install -p -m 0644 support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf - -# install the clustercheck script -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig -touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck -install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck - -# install the list of skipped tests to be available for user runs -install -p -m 0644 mysql-test/rh-skipped-tests.list %{buildroot}%{_datadir}/mysql-test - -# remove unneeded RHEL-4 SELinux stuff -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/SELinux/ - -# remove SysV init script and a symlink to that -rm -f %{buildroot}%{_sysconfdir}/init.d/mysql -rm -f %{buildroot}%{_libexecdir}/rcmysql - -# remove duplicate logrotate script -rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql - -# remove solaris files -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/solaris/ - -# rename the wsrep README so it corresponds with the other README names -mv Docs/README-wsrep Docs/README.wsrep - -# remove *.jar file from mysql-test -rm -rf %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar - -%if %{without clibrary} -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient.so -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so -rm -rf %{buildroot}%{_libdir}/mysql/libmysqlclient*.so.* -rm -rf %{buildroot}%{_sysconfdir}/ld.so.conf.d -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf -%endif - -%if %{without embedded} -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.so* -rm -f %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} -rm -f %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* -%endif - -%if %{without devel} -rm -f %{buildroot}%{_bindir}/mysql_config* -rm -rf %{buildroot}%{_includedir}/mysql -rm -f %{buildroot}%{_datadir}/aclocal/mysql.m4 -rm -f %{buildroot}%{_libdir}/pkgconfig/mariadb.pc -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient*.so -rm -f %{buildroot}%{_mandir}/man1/mysql_config.1* -%endif - -%if %{without client} -rm -f %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults} -rm -f %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults}.1* -%endif - -%if %{without connect} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf -%endif - -%if %{without oqgraph} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf -%endif - -%if %{without config} -rm -f %{buildroot}%{_sysconfdir}/my.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%endif - -%if %{without common} -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/charsets -%endif - -%if %{without errmsg} -rm -f %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ -french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ -polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian} -%endif - -%if %{without bench} -rm -rf %{buildroot}%{_datadir}/sql-bench -%endif - -%if %{without test} -rm -f %{buildroot}%{_bindir}/{mysql_client_test,my_safe_process} -rm -rf %{buildroot}%{_datadir}/mysql-test -rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1* -%endif - -%if %{without tokudb} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf -%endif - -%check -%if %{with test} -%if %runselftest -make test VERBOSE=1 -# hack to let 32- and 64-bit tests run concurrently on same build machine -export MTR_PARALLEL=1 -# builds might happen at the same host, avoid collision -export MTR_BUILD_THREAD=%{__isa_bits} - -# The cmake build scripts don't provide any simple way to control the -# options for mysql-test-run, so ignore the make target and just call it -# manually. Nonstandard options chosen are: -# --force to continue tests after a failure -# no retries please -# test SSL with --ssl -# skip tests that are listed in rh-skipped-tests.list -# avoid redundant test runs with --binlog-format=mixed -# increase timeouts to prevent unwanted failures during mass rebuilds -( - set -e - cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl \ - --suite-timeout=720 --testcase-timeout=30 --skip-rpl \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 \ -%if %{ignore_testsuite_result} - || : -%else - --skip-test-list=rh-skipped-tests.list -%endif - # cmake build scripts will install the var cruft if left alone :-( - rm -rf var -) -%endif -%endif - -%pre server -/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : -/usr/sbin/useradd -M -N -g mysql -o -r -d %{mysqluserhome} -s /sbin/nologin \ - -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : - -%if %{with clibrary} -%post libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%post embedded -p /sbin/ldconfig -%endif - -%if %{with galera} -%post server-galera -semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : -semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp >/dev/null 2>&1 || : -%endif - -%post server -%if %{with init_systemd} -%systemd_post %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 1 ]; then - /sbin/chkconfig --add %{daemon_name} -fi -%endif - -%preun server -%if %{with init_systemd} -%systemd_preun %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 0 ]; then - /sbin/service %{daemon_name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{daemon_name} -fi -%endif - -%if %{with clibrary} -%postun libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%postun embedded -p /sbin/ldconfig -%endif - -%if %{with galera} -%postun server-galera -if [ $1 -eq 0 ]; then - semodule -r %{name}-server-galera 2>/dev/null || : -fi -%endif - -%postun server -%if %{with init_systemd} -%systemd_postun_with_restart %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 -ge 1 ]; then - /sbin/service %{daemon_name} condrestart >/dev/null 2>&1 || : -fi -%endif - -%if %{with client} -%files -%{_bindir}/msql2mysql -%{_bindir}/mysql -%{_bindir}/mysql_find_rows -%{_bindir}/mysql_plugin -%{_bindir}/mysql_waitpid -%{_bindir}/mysqlaccess -%{_bindir}/mysqladmin -%{_bindir}/mysqlbinlog -%{_bindir}/mysqlcheck -%{_bindir}/mysqldump -%{_bindir}/mysqlimport -%{_bindir}/mysqlshow -%{_bindir}/mysqlslap -%{_bindir}/my_print_defaults - -%{_mandir}/man1/msql2mysql.1* -%{_mandir}/man1/mysql.1* -%{_mandir}/man1/mysql_find_rows.1* -%{_mandir}/man1/mysql_plugin.1* -%{_mandir}/man1/mysql_waitpid.1* -%{_mandir}/man1/mysqlaccess.1* -%{_mandir}/man1/mysqladmin.1* -%{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlcheck.1* -%{_mandir}/man1/mysqldump.1* -%{_mandir}/man1/mysqlimport.1* -%{_mandir}/man1/mysqlshow.1* -%{_mandir}/man1/mysqlslap.1* -%{_mandir}/man1/my_print_defaults.1* -%endif - -%if %{with clibrary} -%files libs -%{_libdir}/mysql/libmysqlclient.so.* -%{_sysconfdir}/ld.so.conf.d/* -%config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf -%endif - -%if %{with config} -%files config -# although the default my.cnf contains only server settings, we put it in the -# common package because it can be used for client settings too. -%dir %{_sysconfdir}/my.cnf.d -%config(noreplace) %{_sysconfdir}/my.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset -%endif - -%if %{with common} -%files common -%license COPYING -%license storage/innobase/COPYING.Percona storage/innobase/COPYING.Google -%doc README README.mysql-license README.mysql-docs -%dir %{_libdir}/mysql -%dir %{_libdir}/mysql/plugin -%dir %{_datadir}/%{pkg_name} -%{_libdir}/mysql/plugin/dialog.so -%{_libdir}/mysql/plugin/mysql_clear_password.so -%{_datadir}/%{pkg_name}/charsets -%endif - -%if %{with errmsg} -%files errmsg -%{_datadir}/%{pkg_name}/errmsg-utf8.txt -%{_datadir}/%{pkg_name}/english -%lang(cs) %{_datadir}/%{pkg_name}/czech -%lang(da) %{_datadir}/%{pkg_name}/danish -%lang(nl) %{_datadir}/%{pkg_name}/dutch -%lang(et) %{_datadir}/%{pkg_name}/estonian -%lang(fr) %{_datadir}/%{pkg_name}/french -%lang(de) %{_datadir}/%{pkg_name}/german -%lang(el) %{_datadir}/%{pkg_name}/greek -%lang(hu) %{_datadir}/%{pkg_name}/hungarian -%lang(it) %{_datadir}/%{pkg_name}/italian -%lang(ja) %{_datadir}/%{pkg_name}/japanese -%lang(ko) %{_datadir}/%{pkg_name}/korean -%lang(no) %{_datadir}/%{pkg_name}/norwegian -%lang(no) %{_datadir}/%{pkg_name}/norwegian-ny -%lang(pl) %{_datadir}/%{pkg_name}/polish -%lang(pt) %{_datadir}/%{pkg_name}/portuguese -%lang(ro) %{_datadir}/%{pkg_name}/romanian -%lang(ru) %{_datadir}/%{pkg_name}/russian -%lang(sr) %{_datadir}/%{pkg_name}/serbian -%lang(sk) %{_datadir}/%{pkg_name}/slovak -%lang(es) %{_datadir}/%{pkg_name}/spanish -%lang(sv) %{_datadir}/%{pkg_name}/swedish -%lang(uk) %{_datadir}/%{pkg_name}/ukrainian -%endif - -%if %{with galera} -%files server-galera -%doc Docs/README.wsrep -%license LICENSE.clustercheck -%{_bindir}/clustercheck -%if %{with init_systemd} -%{_bindir}/galera_new_cluster -%{_bindir}/galera_recovery -%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf -%endif -%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf -%attr(0640,root,root) %ghost %config(noreplace) %{_sysconfdir}/sysconfig/clustercheck -%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp -%endif - -%files server -%doc README.mysql-cnf - -%{_bindir}/aria_chk -%{_bindir}/aria_dump_log -%{_bindir}/aria_ftdump -%{_bindir}/aria_pack -%{_bindir}/aria_read_log -%{_bindir}/mariabackup -%{_bindir}/mariadb-service-convert -%{_bindir}/mbstream -%{_bindir}/myisamchk -%{_bindir}/myisam_ftdump -%{_bindir}/myisamlog -%{_bindir}/myisampack -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions -%{_bindir}/mysql_install_db -%{_bindir}/mysql_secure_installation -%{_bindir}/mysql_setpermission -%{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysql_upgrade -%{_bindir}/mysql_zap -%{_bindir}/mysqlbug -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi -%{_bindir}/mysqld_safe -%{_bindir}/mysqlhotcopy -%{_bindir}/mysqltest -%{_bindir}/innochecksum -%{_bindir}/perror -%{_bindir}/replace -%{_bindir}/resolve_stack_dump -%{_bindir}/resolveip -%{_bindir}/wsrep_sst_common -%{_bindir}/wsrep_sst_mariabackup -%{_bindir}/wsrep_sst_mysqldump -%{_bindir}/wsrep_sst_rsync -%{_bindir}/wsrep_sst_xtrabackup -%{_bindir}/wsrep_sst_xtrabackup-v2 -%{?with_tokudb:%{_bindir}/tokuftdump} -%{?with_tokudb:%{_bindir}/tokuft_logprint} - -%config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf -%{?with_tokudb:%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf} - -%{_libexecdir}/mysqld - -%{_libdir}/mysql/INFO_SRC -%{_libdir}/mysql/INFO_BIN -%if %{without common} -%dir %{_datadir}/%{pkg_name} -%endif - -%{_libdir}/mysql/plugin/* -%{?with_oqgraph:%exclude %{_libdir}/mysql/plugin/ha_oqgraph.so} -%{?with_connect:%exclude %{_libdir}/mysql/plugin/ha_connect.so} -%exclude %{_libdir}/mysql/plugin/dialog.so -%exclude %{_libdir}/mysql/plugin/mysql_clear_password.so - -%{_mandir}/man1/aria_chk.1* -%{_mandir}/man1/aria_dump_log.1* -%{_mandir}/man1/aria_ftdump.1* -%{_mandir}/man1/aria_pack.1* -%{_mandir}/man1/aria_read_log.1* -%{_mandir}/man1/galera_new_cluster.1* -%{_mandir}/man1/galera_recovery.1* -%{_mandir}/man1/mariadb-service-convert.1* -%{_mandir}/man1/myisamchk.1* -%{_mandir}/man1/myisamlog.1* -%{_mandir}/man1/myisampack.1* -%{_mandir}/man1/mysql_convert_table_format.1* -%{_mandir}/man1/myisam_ftdump.1* -%{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_fix_extensions.1* -%{_mandir}/man1/mysql_install_db.1* -%{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_upgrade.1* -%{_mandir}/man1/mysql_zap.1* -%{_mandir}/man1/mysqlbug.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* -%{_mandir}/man1/mysqld_safe.1* -%{_mandir}/man1/mysqld_safe_helper.1* -%{_mandir}/man1/my_safe_process.1* -%{_mandir}/man1/innochecksum.1* -%{_mandir}/man1/perror.1* -%{_mandir}/man1/replace.1* -%{_mandir}/man1/resolve_stack_dump.1* -%{_mandir}/man1/resolveip.1* -%{_mandir}/man1/mysql_tzinfo_to_sql.1* -%{_mandir}/man8/mysqld.8* -%{_mandir}/man1/wsrep_sst_common.1* -%{_mandir}/man1/wsrep_sst_mysqldump.1* -%{_mandir}/man1/wsrep_sst_rsync.1* -%{_mandir}/man1/wsrep_sst_xtrabackup.1* -%{_mandir}/man1/wsrep_sst_xtrabackup-v2.1* - -%{_datadir}/%{pkg_name}/fill_help_tables.sql -%{_datadir}/%{pkg_name}/install_spider.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp_bootstrap.sql -%{_datadir}/%{pkg_name}/mysql_system_tables.sql -%{_datadir}/%{pkg_name}/mysql_system_tables_data.sql -%{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql -%{_datadir}/%{pkg_name}/mysql_to_mariadb.sql -%{_datadir}/%{pkg_name}/mysql_performance_tables.sql -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/install.sql} -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/uninstall.sql} -%{_datadir}/%{pkg_name}/my-*.cnf -%{_datadir}/%{pkg_name}/wsrep.cnf -%{_datadir}/%{pkg_name}/wsrep_notify -%dir %{_datadir}/%{pkg_name}/policy -%dir %{_datadir}/%{pkg_name}/policy/apparmor -%dir %{_datadir}/%{pkg_name}/policy/selinux -%{_datadir}/%{pkg_name}/policy/apparmor/README -%{_datadir}/%{pkg_name}/policy/apparmor/usr.sbin.mysqld* -%{_datadir}/%{pkg_name}/policy/selinux/README -%{_datadir}/%{pkg_name}/policy/selinux/mariadb-server.* -%{_datadir}/%{pkg_name}/policy/selinux/mariadb.* -%{_datadir}/%{pkg_name}/systemd/mariadb.service -# mariadb@ is installed only when we have cmake newer than 3.3 -%if 0%{?fedora} > 22 || 0%{?rhel} > 6 -%{_datadir}/%{pkg_name}/systemd/mariadb@.service -%endif - -%{daemondir}/%{daemon_name}* -%{_libexecdir}/mysql-prepare-db-dir -%{_libexecdir}/mysql-wait-ready -%{_libexecdir}/mysql-wait-stop -%{_libexecdir}/mysql-check-socket -%{_libexecdir}/mysql-check-upgrade -%{_libexecdir}/mysql-scripts-common - -%{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf} -%attr(0755,mysql,mysql) %dir %{pidfiledir} -%attr(0755,mysql,mysql) %dir %{dbdatadir} -%attr(0750,mysql,mysql) %dir %{logfiledir} -%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} -%config(noreplace) %{logrotateddir}/%{daemon_name} - -%if %{with oqgraph} -%files oqgraph-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/oqgraph.cnf -%{_libdir}/mysql/plugin/ha_oqgraph.so -%endif - -%if %{with connect} -%files connect-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/connect.cnf -%{_libdir}/mysql/plugin/ha_connect.so -%endif - -%{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysql_setpermission.1* -%{_mandir}/man1/mysqltest.1* - -# Other utilities -%{_bindir}/mysqld_safe_helper - -%if %{with devel} -%files devel -%{_bindir}/mysql_config* -%{_includedir}/mysql -%{_datadir}/aclocal/mysql.m4 -%{_libdir}/pkgconfig/mariadb.pc -%if %{with clibrary} -%{_libdir}/mysql/libmysqlclient.so -%{_libdir}/mysql/libmysqlclient_r.so -%endif -%{_mandir}/man1/mysql_config.1* -%endif - -%if %{with embedded} -%files embedded -%{_libdir}/mysql/libmysqld.so.* - -%files embedded-devel -%{_libdir}/mysql/libmysqld.so -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* -%endif - -%if %{with bench} -%files bench -%{_datadir}/sql-bench -%endif - -%if %{with test} -%files test -%{_bindir}/mysql_client_test -%{_bindir}/my_safe_process -%attr(-,mysql,mysql) %{_datadir}/mysql-test -%{_mandir}/man1/mysql_client_test.1* -%endif - -%changelog -* Tue Jan 10 2017 Michael Bayer - 3:10.1.20-1 -- Update to version 10.1.20 -- Add explicit EVR requirement in main package for -libs - Related: #1406320 -- Use correct macro when removing doc files - Resolves: #1400981 -- JdbcMariaDB.jar test removed -- PCRE version check added - Related: #1382988, #1396945, #1096787 -- added temporary support to build with OpenSSL 1.0 on Fedora >= 26 -- added krb5-devel pkg as Buldrquires to prevent gssapi failure - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-3 -- Actually apply the revert added as patch in the previous release - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-2 -- Back out upstream commit 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 as it - breaks the resource agent - -* Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 -- Update to 10.1.18 - -* Wed Aug 31 2016 Jakub Dorňák - 3:10.1.17-1 -- Update to 10.1.17 - -* Mon Aug 29 2016 Jakub Dorňák - 3:10.1.16-2 -- Fixed galera replication - Resolves: #1352946 - -* Tue Jul 19 2016 Jakub Dorňák - 3:10.1.16-1 -- Update to 10.1.16 - -* Fri Jul 15 2016 Honza Horak - 3:10.1.14-5 -- Fail build when test-suite fails -- Use license macro for inclusion of licenses - -* Thu Jul 14 2016 Honza Horak - 3:10.1.14-4 -- Revert Update to 10.1.15, this release is broken - https://lists.launchpad.net/maria-discuss/msg03691.html - -* Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 -- Check datadir more carefully to avoid unwanted data corruption - Related: #1335849 - -* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 -- Bump epoch - (related to the downgrade from the pre-release version) - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.15-1 -- Update to 10.1.15 - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 - Revert "Update to 10.2.0" - It is possible that MariaDB 10.2.0 won't be stable till f25 GA. - -* Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 -- BR multilib-rpm-config and use it for multilib workarounds -- install architecture dependant pc file to arch-dependant location - -* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 -- Fix mysql-prepare-db-dir - Resolves: #1335849 - -* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 -- Update to 10.2.0 - -* Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 -- Add selinux policy -- Update to 10.1.14 (includes various bug fixes) -- Add -h and --help options to galera_new_cluster - -* Thu Apr 7 2016 Jakub Dorňák - 1:10.1.13-3 -- wsrep_on in galera.cnf - -* Tue Apr 5 2016 Jakub Dorňák - 1:10.1.13-2 -- Moved /etc/sysconfig/clustercheck - and /usr/share/mariadb/systemd/use_galera_new_cluster.conf - to mariadb-server-galera - -* Tue Mar 29 2016 Jakub Dorňák - 1:10.1.13-1 -- Update to 10.1.13 - -* Wed Mar 23 2016 Jakub Dorňák - 1:10.1.12-4 -- Fixed conflict with mariadb-galera-server - -* Tue Mar 22 2016 Jakub Dorňák - 1:10.1.12-3 -- Add subpackage mariadb-server-galera - Resolves: 1310622 - -* Tue Mar 01 2016 Honza Horak - 1:10.1.12-2 -- Rebuild for BZ#1309199 (symbol versioning) - -* Mon Feb 29 2016 Jakub Dorňák - 1:10.1.12-1 -- Update to 10.1.12 - -* Tue Feb 16 2016 Honza Horak - 1:10.1.11-9 -- Remove dangling symlink to /etc/init.d/mysql - -* Sat Feb 13 2016 Honza Horak - 1:10.1.11-8 -- Use epoch for obsoleting mariadb-galera-server - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-7 -- Add Provides: bundled(pcre) in case we build with bundled pcre - Related: #1302296 -- embedded-devel should require libaio-devel - Resolves: #1290517 - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-6 -- Fix typo s/obsolate/obsolete/ - -* Thu Feb 11 2016 Honza Horak - 1:10.1.11-5 -- Add missing requirements for proper wsrep functionality -- Obsolate mariadb-galera & mariadb-galera-server (thanks Tomas Repik) - Resolves: #1279753 -- Re-enable using libedit, which should be now fixed - Related: #1201988 -- Remove mariadb-wait-ready call from systemd unit, we have now systemd notify support -- Make mariadb@.service similar to mariadb.service - -* Mon Feb 08 2016 Honza Horak - 1:10.1.11-4 -- Use systemd unit file more compatible with upstream - -* Sun Feb 07 2016 Honza Horak - 1:10.1.11-3 -- Temporarily disabling oqgraph for - https://mariadb.atlassian.net/browse/MDEV-9479 - -* Thu Feb 04 2016 Fedora Release Engineering - 1:10.1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Feb 3 2016 Jakub Dorňák - 1:10.1.11-1 -- Update to 10.1.11 - -* Tue Jan 19 2016 Jakub Dorňák - 1:10.1.10-1 -- Update to 10.1.10 - -* Mon Dec 07 2015 Dan Horák - 1:10.1.8-3 -- rebuilt for s390(x) - -* Tue Nov 03 2015 Honza Horak - 1:10.1.8-2 -- Expand variables in server.cnf - -* Thu Oct 22 2015 Jakub Dorňák - 1:10.1.8-1 -- Update to 10.1.8 - -* Thu Aug 27 2015 Jonathan Wakely - 1:10.0.21-2 -- Rebuilt for Boost 1.59 - -* Mon Aug 10 2015 Jakub Dorňák - 1:10.0.21-1 -- Update to 10.0.21 - -* Wed Jul 29 2015 Fedora Release Engineering - 1:10.0.20-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 1:10.0.20-2 -- rebuild for Boost 1.58 - -* Tue Jun 23 2015 Honza Horak - 1:10.0.20-1 -- Update to 10.0.20 - -* Wed Jun 17 2015 Fedora Release Engineering - 1:10.0.19-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Jun 03 2015 Dan Horák - 1:10.0.19-2 -- Update lists of failing tests (jdornak) - Related: #1149647 - -* Mon May 11 2015 Honza Horak - 1:10.0.19-1 -- Update to 10.0.19 - -* Thu May 07 2015 Honza Horak - 1:10.0.18-1 -- Update to 10.0.18 - -* Thu May 07 2015 Honza Horak - 1:10.0.17-4 -- Include client plugins into -common package since they are used by both -libs - and base packages. -- Do not use libedit - Related: #1201988 -- Let plugin dir to be owned by -common -- Use correct comment in the init script - Related: #1184604 -- Add openssl as BuildRequires to run some openssl tests during build - Related: #1189180 -- Fail in case any command in check fails - Related: #1124791 -- Fix mysqladmin crash if run with -u root -p - Resolves: #1207170 - -* Sat May 02 2015 Kalev Lember - 1:10.0.17-3 -- Rebuilt for GCC 5 C++11 ABI change - -* Fri Mar 06 2015 Honza Horak - 1:10.0.17-2 -- Wait for daemon ends - Resolves: #1072958 -- Do not include symlink to libmysqlclient if not shipping the library -- Do not use scl prefix more than once in paths - Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html - -* Wed Mar 04 2015 Honza Horak - 1:10.0.17-1 -- Rebase to version 10.0.17 -- Added variable for turn off skipping some tests - -* Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 -- Check permissions when starting service on RHEL-6 - Resolves: #1194699 -- Do not create test database by default - Related: #1194611 - -* Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 -- Enable tokudb - -* Tue Feb 10 2015 Honza Horak - 1:10.0.16-3 -- Fix openssl_1 test - -* Wed Feb 4 2015 Jakub Dorňák - 1:10.0.16-2 -- Include new certificate for tests -- Update lists of failing tests - Related: #1186110 - -* Tue Feb 3 2015 Jakub Dorňák - 1:10.0.16-9 -- Rebase to version 10.0.16 - Resolves: #1187895 - -* Tue Jan 27 2015 Petr Machata - 1:10.0.15-9 -- Rebuild for boost 1.57.0 - -* Mon Jan 26 2015 Honza Horak - 1:10.0.15-8 -- Fix typo in the config file - -* Sun Jan 25 2015 Honza Horak - 1:10.0.15-7 -- Do not create log file in post script - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-6 -- Move server settings to config file under my.cnf.d dir - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-5 -- Fix path for sysconfig file - Filter provides in el6 properly - Fix initscript file location - -* Tue Jan 06 2015 Honza Horak - 1:10.0.15-4 -- Disable failing tests connect.mrr, connect.updelx2 on ppc and s390 - -* Mon Dec 22 2014 Honza Horak - 1:10.0.15-3 -- Fix macros paths in my.cnf -- Create old location for pid file if it remained in my.cnf - -* Fri Dec 05 2014 Honza Horak - 1:10.0.15-2 -- Rework usage of macros and remove some compatibility artefacts - -* Thu Nov 27 2014 Jakub Dorňák - 1:10.0.15-1 -- Update to 10.0.15 - -* Thu Nov 20 2014 Jan Stanek - 1:10.0.14-8 -- Applied upstream fix for mysql_config --cflags output. - Resolves: #1160845 - -* Fri Oct 24 2014 Jan Stanek - 1:10.0.14-7 -- Fixed compat service file. - Resolves: #1155700 - -* Mon Oct 13 2014 Honza Horak - 1:10.0.14-6 -- Remove bundled cmd-line-utils - Related: #1079637 -- Move mysqlimport man page to proper package -- Disable main.key_cache test on s390 - Releated: #1149647 - -* Wed Oct 08 2014 Honza Horak - 1:10.0.14-5 -- Disable tests connect.part_file, connect.part_table - and connect.updelx - Related: #1149647 - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-4 -- Add bcond_without mysql_names - Use more correct path when deleting mysql logrotate script - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-3 -- Build with system libedit - Resolves: #1079637 - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-2 -- Add with_debug option - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-1 -- Update to 10.0.14 - -* Wed Sep 24 2014 Honza Horak - 1:10.0.13-8 -- Move connect engine to a separate package - Rename oqgraph engine to align with upstream packages -- Move some files to correspond with MariaDB upstream packages - client.cnf into -libs, mysql_plugin and msql2mysql into base, - tokuftdump and aria_* into -server, errmsg-utf8.txt into -errmsg -- Remove duplicate cnf files packaged using %%doc -- Check upgrade script added to warn about need for mysql_upgrade - -* Wed Sep 24 2014 Matej Muzila - 1:10.0.13-7 -- Client related libraries moved from mariadb-server to mariadb-libs - Related: #1138843 - -* Mon Sep 08 2014 Honza Horak - 1:10.0.13-6 -- Disable vcol_supported_sql_funcs_myisam test on all arches - Related: #1096787 -- Install systemd service file on RHEL-7+ - Server requires any mysql package, so it should be fine with older client - -* Thu Sep 04 2014 Honza Horak - 1:10.0.13-5 -- Fix paths in mysql_install_db script - Resolves: #1134328 -- Use %%cmake macro - -* Tue Aug 19 2014 Honza Horak - 1:10.0.13-4 -- Build config subpackage everytime -- Disable failing tests: innodb_simulate_comp_failures_small, key_cache - rhbz#1096787 - -* Sun Aug 17 2014 Fedora Release Engineering - 1:10.0.13-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Aug 14 2014 Honza Horak - 1:10.0.13-2 -- Include mysqld_unit only if required; enable tokudb in f20- - -* Wed Aug 13 2014 Honza Horak - 1:10.0.13-1 -- Rebase to version 10.0.13 - -* Tue Aug 12 2014 Honza Horak - 1:10.0.12-8 -- Introduce -config subpackage and ship base config files here - -* Tue Aug 5 2014 Honza Horak - 1:10.0.12-7 -- Adopt changes from mysql, thanks Bjorn Munch - -* Mon Jul 28 2014 Honza Horak - 1:10.0.12-6 -- Use explicit sysconfdir -- Absolut path for default value for pid file and error log - -* Tue Jul 22 2014 Honza Horak - 1:10.0.12-5 -- Hardcoded paths removed to work fine in chroot -- Spec rewrite to be more similar to oterh MySQL implementations -- Use variable for daemon unit name -- Include SysV init script if built on older system -- Add possibility to not ship some sub-packages - -* Mon Jul 21 2014 Honza Horak - 1:10.0.12-4 -- Reformating spec and removing unnecessary snippets - -* Tue Jul 15 2014 Honza Horak - 1:10.0.12-3 -- Enable OQGRAPH engine and package it as a sub-package -- Add support for TokuDB engine for x86_64 (currently still disabled) -- Re-enable tokudb_innodb_xa_crash again, seems to be fixed now -- Drop superfluous -libs and -embedded ldconfig deps (thanks Ville Skyttä) -- Separate -lib and -common sub-packages -- Require /etc/my.cnf instead of shipping it -- Include README.mysql-cnf -- Multilib support re-worked -- Introduce new option with_mysqld_unit -- Removed obsolete mysql-cluster, the package should already be removed -- Improve error message when log file is not writable -- Compile all binaries with full RELRO (RHBZ#1092548) -- Use modern symbol filtering with compatible backup -- Add more groupnames for server's my.cnf -- Error messages now provided by a separate package (thanks Alexander Barkov) -- Expand paths in helper scripts using cmake - -* Wed Jun 18 2014 Mikko Tiihonen - 1:10.0.12-2 -- Use -fno-delete-null-pointer-checks to avoid segfaults with gcc 4.9 - -* Tue Jun 17 2014 Jakub Dorňák - 1:10.0.12-1 -- Rebase to version 10.0.12 - -* Sat Jun 07 2014 Fedora Release Engineering - 1:10.0.11-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Jun 3 2014 Jakub Dorňák - 1:10.0.11-4 -- rebuild with tests failing on different arches disabled (#1096787) - -* Thu May 29 2014 Dan Horák - 1:10.0.11-2 -- rebuild with tests failing on big endian arches disabled (#1096787) - -* Wed May 14 2014 Jakub Dorňák - 1:10.0.11-1 -- Rebase to version 10.0.11 - -* Mon May 05 2014 Honza Horak - 1:10.0.10-3 -- Script for socket check enhanced - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-2 -- use system pcre library - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-1 -- Rebase to version 10.0.10 - -* Wed Mar 12 2014 Honza Horak - 1:5.5.36-2 -- Server crashes on SQL select containing more group by and left join statements using innodb tables - Resolves: #1065676 -- Fix paths in helper scripts -- Move language files into mariadb directory - -* Thu Mar 06 2014 Honza Horak - 1:5.5.36-1 -- Rebase to 5.5.36 - https://kb.askmonty.org/en/mariadb-5536-changelog/ - -* Tue Feb 25 2014 Honza Horak 1:5.5.35-5 -- Daemon helper scripts sanity changes and spec files clean-up - -* Tue Feb 11 2014 Honza Horak 1:5.5.35-4 -- Fix typo in mysqld.service - Resolves: #1063981 - -* Wed Feb 5 2014 Honza Horak 1:5.5.35-3 -- Do not touch the log file in post script, so it does not get wrong owner - Resolves: #1061045 - -* Thu Jan 30 2014 Honza Horak 1:5.5.35-1 -- Rebase to 5.5.35 - https://kb.askmonty.org/en/mariadb-5535-changelog/ - Also fixes: CVE-2014-0001, CVE-2014-0412, CVE-2014-0437, CVE-2013-5908, - CVE-2014-0420, CVE-2014-0393, CVE-2013-5891, CVE-2014-0386, CVE-2014-0401, - CVE-2014-0402 - Resolves: #1054043 - Resolves: #1059546 - -* Tue Jan 14 2014 Honza Horak - 1:5.5.34-9 -- Adopt compatible system versioning - Related: #1045013 -- Use compatibility mysqld.service instead of link - Related: #1014311 - -* Mon Jan 13 2014 Rex Dieter 1:5.5.34-8 -- move mysql_config alternatives scriptlets to -devel too - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-7 -- Build with -O3 on ppc64 - Related: #1051069 -- Move mysql_config to -devel sub-package and remove Require: mariadb - Related: #1050920 - -* Fri Jan 10 2014 Marcin Juszkiewicz 1:5.5.34-6 -- Disable main.gis-precise test also for AArch64 -- Disable perfschema.func_file_io and perfschema.func_mutex for AArch64 - (like it is done for 32-bit ARM) - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-5 -- Clean all non-needed doc files properly - -* Wed Jan 8 2014 Honza Horak 1:5.5.34-4 -- Read socketfile location in mariadb-prepare-db-dir script - -* Mon Jan 6 2014 Honza Horak 1:5.5.34-3 -- Don't test EDH-RSA-DES-CBC-SHA cipher, it seems to be removed from openssl - which now makes mariadb/mysql FTBFS because openssl_1 test fails - Related: #1044565 -- Use upstream's layout for symbols version in client library - Related: #1045013 -- Check if socket file is not being used by another process at a time - of starting the service - Related: #1045435 -- Use %%ghost directive for the log file - Related: 1043501 - -* Wed Nov 27 2013 Honza Horak 1:5.5.34-2 -- Fix mariadb-wait-ready script - -* Fri Nov 22 2013 Honza Horak 1:5.5.34-1 -- Rebase to 5.5.34 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-4 -- Fix spec file to be ready for backport by Oden Eriksson - Resolves: #1026404 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-3 -- Add pam-devel to build-requires in order to build - Related: #1019945 -- Check if correct process is running in mysql-wait-ready script - Related: #1026313 - -* Mon Oct 14 2013 Honza Horak 1:5.5.33a-2 -- Turn on test suite - -* Thu Oct 10 2013 Honza Horak 1:5.5.33a-1 -- Rebase to 5.5.33a - https://kb.askmonty.org/en/mariadb-5533-changelog/ - https://kb.askmonty.org/en/mariadb-5533a-changelog/ -- Enable outfile_loaddata test -- Disable tokudb_innodb_xa_crash test - -* Mon Sep 2 2013 Honza Horak - 1:5.5.32-12 -- Re-organize my.cnf to include only generic settings - Resolves: #1003115 -- Move pid file location to /var/run/mariadb -- Make mysqld a symlink to mariadb unit file rather than the opposite way - Related: #999589 - -* Thu Aug 29 2013 Honza Horak - 1:5.5.32-11 -- Move log file into /var/log/mariadb/mariadb.log -- Rename logrotate script to mariadb -- Resolves: #999589 - -* Wed Aug 14 2013 Rex Dieter 1:5.5.32-10 -- fix alternatives usage - -* Tue Aug 13 2013 Honza Horak - 1:5.5.32-9 -- Multilib issues solved by alternatives - Resolves: #986959 - -* Sat Aug 03 2013 Petr Pisar - 1:5.5.32-8 -- Perl 5.18 rebuild - -* Wed Jul 31 2013 Honza Horak - 1:5.5.32-7 -- Do not use login shell for mysql user - -* Tue Jul 30 2013 Honza Horak - 1:5.5.32-6 -- Remove unneeded systemd-sysv requires -- Provide mysql-compat-server symbol -- Create mariadb.service symlink -- Fix multilib header location for arm -- Enhance documentation in the unit file -- Use scriptstub instead of links to avoid multilib conflicts -- Add condition for doc placement in F20+ - -* Sun Jul 28 2013 Dennis Gilmore - 1:5.5.32-5 -- remove "Requires(pretrans): systemd" since its not possible -- when installing mariadb and systemd at the same time. as in a new install - -* Sat Jul 27 2013 Kevin Fenzi 1:5.5.32-4 -- Set rpm doc macro to install docs in unversioned dir - -* Fri Jul 26 2013 Dennis Gilmore 1:5.5.32-3 -- add Requires(pre) on systemd for the server package - -* Tue Jul 23 2013 Dennis Gilmore 1:5.5.32-2 -- replace systemd-units requires with systemd -- remove solaris files - -* Fri Jul 19 2013 Honza Horak 1:5.5.32-1 -- Rebase to 5.5.32 - https://kb.askmonty.org/en/mariadb-5532-changelog/ -- Clean-up un-necessary systemd snippets - -* Wed Jul 17 2013 Petr Pisar - 1:5.5.31-7 -- Perl 5.18 rebuild - -* Mon Jul 1 2013 Honza Horak 1:5.5.31-6 -- Test suite params enhanced to decrease server condition influence -- Fix misleading error message when uninstalling built-in plugins - Related: #966873 - -* Thu Jun 27 2013 Honza Horak 1:5.5.31-5 -- Apply fixes found by Coverity static analysis tool - -* Wed Jun 19 2013 Honza Horak 1:5.5.31-4 -- Do not use pretrans scriptlet, which doesn't work in anaconda - Resolves: #975348 - -* Fri Jun 14 2013 Honza Horak 1:5.5.31-3 -- Explicitly enable mysqld if it was enabled in the beginning - of the transaction. - -* Thu Jun 13 2013 Honza Horak 1:5.5.31-2 -- Apply man page fix from Jan Stanek - -* Fri May 24 2013 Honza Horak 1:5.5.31-1 -- Rebase to 5.5.31 - https://kb.askmonty.org/en/mariadb-5531-changelog/ -- Preserve time-stamps in case of installed files -- Use /var/tmp instead of /tmp, since the later is using tmpfs, - which can cause problems - Resolves: #962087 -- Fix test suite requirements - -* Sun May 5 2013 Honza Horak 1:5.5.30-2 -- Remove mytop utility, which is packaged separately -- Resolve multilib conflicts in mysql/private/config.h - -* Fri Mar 22 2013 Honza Horak 1:5.5.30-1 -- Rebase to 5.5.30 - https://kb.askmonty.org/en/mariadb-5530-changelog/ - -* Fri Mar 22 2013 Honza Horak 1:5.5.29-11 -- Obsolete MySQL since it is now renamed to community-mysql -- Remove real- virtual names - -* Thu Mar 21 2013 Honza Horak 1:5.5.29-10 -- Adding epoch to have higher priority than other mysql implementations - when comes to provider comparison - -* Wed Mar 13 2013 Honza Horak 5.5.29-9 -- Let mariadb-embedded-devel conflict with MySQL-embedded-devel -- Adjust mariadb-sortbuffer.patch to correspond with upstream patch - -* Mon Mar 4 2013 Honza Horak 5.5.29-8 -- Mask expected warnings about setrlimit in test suite - -* Thu Feb 28 2013 Honza Horak 5.5.29-7 -- Use configured prefix value instead of guessing basedir - in mysql_config -Resolves: #916189 -- Export dynamic columns and non-blocking API functions documented - by upstream - -* Wed Feb 27 2013 Honza Horak 5.5.29-6 -- Fix sort_buffer_length option type - -* Wed Feb 13 2013 Honza Horak 5.5.29-5 -- Suppress warnings in tests and skip tests also on ppc64p7 - -* Tue Feb 12 2013 Honza Horak 5.5.29-4 -- Suppress warning in tests on ppc -- Enable fixed index_merge_myisam test case - -* Thu Feb 07 2013 Honza Horak 5.5.29-3 -- Packages need to provide also %%_isa version of mysql package -- Provide own symbols with real- prefix to distinguish from mysql - unambiguously -- Fix format for buffer size in error messages (MDEV-4156) -- Disable some tests that fail on ppc and s390 -- Conflict only with real-mysql, otherwise mariadb conflicts with ourself - -* Tue Feb 05 2013 Honza Horak 5.5.29-2 -- Let mariadb-libs to own /etc/my.cnf.d - -* Thu Jan 31 2013 Honza Horak 5.5.29-1 -- Rebase to 5.5.29 - https://kb.askmonty.org/en/mariadb-5529-changelog/ -- Fix inaccurate default for socket location in mysqld-wait-ready - Resolves: #890535 - -* Thu Jan 31 2013 Honza Horak 5.5.28a-8 -- Enable obsoleting mysql - -* Wed Jan 30 2013 Honza Horak 5.5.28a-7 -- Adding necessary hacks for perl dependency checking, rpm is still - not wise enough -- Namespace sanity re-added for symbol default_charset_info - -* Mon Jan 28 2013 Honza Horak 5.5.28a-6 -- Removed %%{_isa} from provides/obsoletes, which doesn't allow - proper obsoleting -- Do not obsolete mysql at the time of testing - -* Thu Jan 10 2013 Honza Horak 5.5.28a-5 -- Added licenses LGPLv2 and BSD -- Removed wrong usage of %%{epoch} -- Test-suite is run in %%check -- Removed perl dependency checking adjustment, rpm seems to be smart enough -- Other minor spec file fixes - -* Tue Dec 18 2012 Honza Horak 5.5.28a-4 -- Packaging of MariaDB based on MySQL package - diff --git a/database/mariadb/centos/mariadb.spec.unmodified b/database/mariadb/centos/mariadb.spec.unmodified deleted file mode 100644 index 0ed5cc9bb..000000000 --- a/database/mariadb/centos/mariadb.spec.unmodified +++ /dev/null @@ -1,1998 +0,0 @@ -# Prefix that is used for patches -%global pkg_name %{name} -%global pkgnamepatch mariadb - -# Regression tests may take a long time (many cores recommended), skip them by -# passing --nocheck to rpmbuild or by setting runselftest to 0 if defining -# --nocheck is not possible (e.g. in koji build) -%{!?runselftest:%global runselftest 0} - -# Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 - -# In f20+ use unversioned docdirs, otherwise the old versioned one -%global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} -%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}} - -# Use Full RELRO for all binaries (RHBZ#1092548) -%global _hardened_build 1 - -# By default, patch(1) creates backup files when chunks apply with offsets. -# Turn that off to ensure such files don't get included in RPMs (cf bz#884755). -%global _default_patch_flags --no-backup-if-mismatch - -# TokuDB engine is now part of MariaDB, but it is available only for x86_64; -# variable tokudb allows to build with TokuDB storage engine -# Temporarily disabled in F21+ for https://mariadb.atlassian.net/browse/MDEV-6446 -%ifarch x86_64 -%bcond_without tokudb -%else -%bcond_with tokudb -%endif - -# Mroonga engine is now part of MariaDB, but it only builds for x86_64; -# variable mroonga allows to build with Mroonga storage engine -%ifarch x86_64 i686 -%bcond_without mroonga -%else -%bcond_with mroonga -%endif - -# The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing -# hierarchies and more complex graph structures to be handled in a relational -# fashion; enabled by default -# Temporarily disabling oqgraph: https://mariadb.atlassian.net/browse/MDEV-9479 -%bcond_with oqgraph - -# For some use cases we do not need some parts of the package -%bcond_without clibrary -%bcond_without embedded -%bcond_without devel -%bcond_without client -%bcond_without common -%bcond_without errmsg -%bcond_without bench -%bcond_without test -%bcond_without connect -%bcond_without galera - -# When there is already another package that ships /etc/my.cnf, -# rather include it than ship the file again, since conflicts between -# those files may create issues -%bcond_without config - -# For deep debugging we need to build binaries with extra debug info -%bcond_with debug - -# Include files for SysV init or systemd -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -%bcond_without init_systemd -%bcond_with init_sysv -%global daemon_name %{name} -%global daemondir %{_unitdir} -%global daemon_no_prefix %{pkg_name} -%global mysqld_pid_dir mysqld -%else -%bcond_with init_systemd -%bcond_without init_sysv -%global daemon_name mysqld -%global daemondir %{_sysconfdir}/rc.d/init.d -%global daemon_no_prefix mysqld -%endif - -# MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use -# the bundled library, since the package cannot be build with older version -%global pcre_version 8.39 -%if 0%{?fedora} >= 21 -%bcond_without pcre -%else -%bcond_with pcre -%endif - -# We define some system's well known locations here so we can use them easily -# later when building to another location (like SCL) -%global logrotateddir %{_sysconfdir}/logrotate.d -%global logfiledir %{_localstatedir}/log/%{daemon_name} -%global logfile %{logfiledir}/%{daemon_name}.log - -# Directory for storing pid file -%global pidfiledir %{_localstatedir}/run/%{daemon_name} - -# Defining where database data live -%global dbdatadir %{_localstatedir}/lib/mysql - -# Home directory of mysql user should be same for all packages that create it -%global mysqluserhome /var/lib/mysql - -# The evr of mysql we want to obsolete -%global obsoleted_mysql_evr 5.6-0 -%global obsoleted_mysql_case_evr 5.5.30-5 - -# The evr of mariadb-galera we want to obsolete -%global obsoleted_mariadb_galera_evr 1:10.0.17-6 -%global obsoleted_mariadb_galera_common_evr 5.5.36-10 -%global obsoleted_mariadb_galera_server_evr 1:10.0.17-6 - -# Provide mysql names for compatibility -%bcond_without mysql_names -%bcond_without conflicts - -# Make long macros shorter -%global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.1 -%global bugfixver 20 - -Name: mariadb -Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} -Epoch: 3 - -Summary: A community developed branch of MySQL -Group: Applications/Databases -URL: http://mariadb.org -# Exceptions allow client libraries to be linked with most open source SW, -# not only GPL code. See README.mysql-license -License: GPLv2 with exceptions and LGPLv2 and BSD - -Source0: http://mirrors.syringanetworks.net/mariadb/mariadb-%{version}/source/mariadb-%{version}.tar.gz -Source2: mysql_config_multilib.sh -Source3: my.cnf.in -Source5: README.mysql-cnf -Source6: README.mysql-docs -Source7: README.mysql-license -Source9: mysql-embedded-check.c -Source10: mysql.tmpfiles.d.in -Source11: mysql.service.in -Source12: mysql-prepare-db-dir.sh -Source13: mysql-wait-ready.sh -Source14: mysql-check-socket.sh -Source15: mysql-scripts-common.sh -Source16: mysql-check-upgrade.sh -Source17: mysql-wait-stop.sh -Source18: mysql@.service.in -Source19: mysql.init.in -Source50: rh-skipped-tests-base.list -Source51: rh-skipped-tests-arm.list -Source52: rh-skipped-tests-ppc-s390.list -# TODO: clustercheck contains some hard-coded paths, these should be expanded using template system -Source70: clustercheck.sh -Source71: LICENSE.clustercheck -Source72: mariadb-server-galera.te - -# Comments for these patches are in the patch files -# Patches common for more mysql-like packages -Patch1: %{pkgnamepatch}-strmov.patch -Patch2: %{pkgnamepatch}-install-test.patch -Patch4: %{pkgnamepatch}-logrotate.patch -Patch5: %{pkgnamepatch}-file-contents.patch -Patch7: %{pkgnamepatch}-scripts.patch -Patch8: %{pkgnamepatch}-install-db-sharedir.patch -Patch9: %{pkgnamepatch}-ownsetup.patch -Patch12: %{pkgnamepatch}-admincrash.patch -Patch13: %{pkgnamepatch}-ssl-cypher.patch -Patch14: %{pkgnamepatch}-example-config-files.patch - -# Patches specific for this mysql package -Patch30: %{pkgnamepatch}-errno.patch -Patch31: %{pkgnamepatch}-string-overflow.patch -Patch32: %{pkgnamepatch}-basedir.patch -Patch34: %{pkgnamepatch}-covscan-stroverflow.patch -Patch37: %{pkgnamepatch}-notestdb.patch -# Due to LP https://bugs.launchpad.net/tripleo/+bug/1638864 -# Reverts 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 until we fix the -# galera resource agent to cope with this change -# When RHBZ#1391470 gets fixed and released in centos we can remove this patch -Patch38: %{pkgnamepatch}-10.1.20-revert-stdouterr-closing.patch - -# Patches for galera -Patch40: %{pkgnamepatch}-galera.cnf.patch -Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch - -BuildRequires: cmake -BuildRequires: libaio-devel -BuildRequires: libedit-devel -BuildRequires: ncurses-devel -BuildRequires: perl -%if 0%{?fedora} >= 22 || 0%{?rhel} > 7 -BuildRequires: perl-generators -%endif -BuildRequires: systemtap-sdt-devel -BuildRequires: zlib-devel -BuildRequires: multilib-rpm-config -# auth_pam.so plugin will be build if pam-devel is installed -BuildRequires: pam-devel -# use either new enough version of pcre or provide bundles(pcre) -%{?with_pcre:BuildRequires: pcre-devel >= 8.35} -%{!?with_pcre:Provides: bundled(pcre) = %{pcre_version}} -# Tests requires time and ps and some perl modules -BuildRequires: procps -BuildRequires: time -BuildRequires: perl(Env) -BuildRequires: perl(Exporter) -BuildRequires: perl(Fcntl) -BuildRequires: perl(File::Temp) -BuildRequires: perl(Data::Dumper) -BuildRequires: perl(Getopt::Long) -BuildRequires: perl(IPC::Open3) -BuildRequires: perl(Memoize) -BuildRequires: perl(Socket) -BuildRequires: perl(Sys::Hostname) -BuildRequires: perl(Test::More) -BuildRequires: perl(Time::HiRes) -BuildRequires: perl(Symbol) - -# Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -Requires: compat-openssl10 -%else -# for running some openssl tests rhbz#1189180 -BuildRequires: openssl -BuildRequires: openssl-devel -%endif - -BuildRequires: krb5-devel - -BuildRequires: selinux-policy-devel -%{?with_init_systemd:BuildRequires: systemd systemd-devel} - -BuildRequires: krb5-devel - -Requires: bash -Requires: fileutils -Requires: grep -Requires: %{name}-common%{?_isa} = %{sameevr} - -# Explicit EVR requirement for -libs is needed for -# https://bugzilla.redhat.com/show_bug.cgi?id=1406320 -Requires: %{name}-libs%{?_isa} = %{sameevr} - -%if %{with mysql_names} -Provides: mysql = %{sameevr} -Provides: mysql%{?_isa} = %{sameevr} -Provides: mysql-compat-client = %{sameevr} -Provides: mysql-compat-client%{?_isa} = %{sameevr} -%endif - - - -# MySQL (with caps) is upstream's spelling of their own RPMs for mysql -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql} - -# obsoletion of mariadb-galera -Provides: mariadb-galera = %{sameevr} -Obsoletes: mariadb-galera < %{obsoleted_mariadb_galera_evr} - -# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 -%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) -%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ -%else -%filter_from_requires /perl(\(hostnames\|lib::mtr\|lib::v1\|mtr_\|My::\)/d -%filter_provides_in -P (%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\.so) -%filter_setup -%endif - -# Define license macro if not present -%{!?_licensedir:%global license %doc} - -%description -MariaDB is a community developed branch of MySQL. -MariaDB is a multi-user, multi-threaded SQL database server. -It is a client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. The base package -contains the standard MariaDB/MySQL client programs and generic MySQL files. - - -%if %{with clibrary} -%package libs -Summary: The shared libraries required for MariaDB/MySQL clients -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-libs = %{sameevr} -Provides: mysql-libs%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}} - -%description libs -The mariadb-libs package provides the essential shared libraries for any -MariaDB/MySQL client program or interface. You will need to install this -package to use any other MariaDB package or any clients that need to connect -to a MariaDB/MySQL server. MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with config} -%package config -Summary: The config files required by server and client -Group: Applications/Databases - -%description config -The package provides the config file my.cnf and my.cnf.d directory used by any -MariaDB or MySQL program. You will need to install this package to use any -other MariaDB or MySQL package if the config files are not provided in the -package itself. -%endif - - -%if %{with common} -%package common -Summary: The shared files required by server and client -Group: Applications/Databases -Requires: %{_sysconfdir}/my.cnf - -# obsoletion of mariadb-galera-common -Provides: mariadb-galera-common = %{sameevr} -Obsoletes: mariadb-galera-common < %{obsoleted_mariadb_galera_common_evr} - -%description common -The package provides the essential shared files for any MariaDB program. -You will need to install this package to use any other MariaDB package. -%endif - - -%if %{with errmsg} -%package errmsg -Summary: The error messages files required by server and embedded -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} - -%description errmsg -The package provides error messages files for the MariaDB daemon and the -embedded server. You will need to install this package to use any of those -MariaDB packages. -%endif - - -%if %{with galera} -%package server-galera -Summary: The configuration files and scripts for galera replication -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: galera >= 25.3.3 -Requires(post): libselinux-utils -Requires(post): policycoreutils-python - -# obsoletion of mariadb-galera-server -Provides: mariadb-galera-server = %{sameevr} -Obsoletes: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr} - -%description server-galera -MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. This package contains -the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. -%endif - - -%package server -Summary: The MariaDB server and related files -Group: Applications/Databases - -# note: no version here = %%{version}-%%{release} -%if %{with mysql_names} -Requires: mysql-compat-client%{?_isa} -Requires: mysql%{?_isa} -%else -Requires: %{name}%{?_isa} -%endif -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{_sysconfdir}/my.cnf -Requires: %{_sysconfdir}/my.cnf.d -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -Requires: sh-utils -Requires(pre): /usr/sbin/useradd -%if %{with init_systemd} -# We require this to be present for %%{_tmpfilesdir} -Requires: systemd -# Make sure it's there when scriptlets run, too -Requires(pre): systemd -Requires(posttrans): systemd -%{?systemd_requires: %systemd_requires} -%endif -# mysqlhotcopy needs DBI/DBD support -Requires: perl(DBI) -Requires: perl(DBD::mysql) -# wsrep requirements -Requires: lsof -Requires: net-tools -Requires: sh-utils -Requires: rsync -%if %{with mysql_names} -Provides: mysql-server = %{sameevr} -Provides: mysql-server%{?_isa} = %{sameevr} -Provides: mysql-compat-server = %{sameevr} -Provides: mysql-compat-server%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}} -%{?with_conflicts:Conflicts: community-mysql-server} -%{?with_conflicts:Conflicts: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}} - -%description server -MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) -and many different client programs and libraries. This package contains -the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. - - -%if %{with oqgraph} -%package oqgraph-engine -Summary: The Open Query GRAPH engine for MariaDB -Group: Applications/Databases -Requires: %{name}-server%{?_isa} = %{sameevr} -# boost and Judy required for oograph -BuildRequires: boost-devel -BuildRequires: Judy-devel - -%description oqgraph-engine -The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB -database server. OQGRAPH is a computation engine allowing hierarchies and more -complex graph structures to be handled in a relational fashion. In a nutshell, -tree structures and friend-of-a-friend style searches can now be done using -standard SQL syntax, and results joined onto other tables. -%endif - - -%if %{with connect} -%package connect-engine -Summary: The CONNECT storage engine for MariaDB -Group: Applications/Databases -Requires: %{name}-server%{?_isa} = %{sameevr} - -%description connect-engine -The CONNECT storage engine enables MariaDB to access external local or -remote data (MED). This is done by defining tables based on different data -types, in particular files in various formats, data extracted from other DBMS -or products (such as Excel), or data retrieved from the environment -(for example DIR, WMI, and MAC tables). -%endif - - -%if %{with devel} -%package devel -Summary: Files for development of MariaDB/MySQL applications -Group: Applications/Databases -%{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}} -# avoid issues with openssl1.0 / openssl1.1 / compat -Requires: pkgconfig(openssl) -%if %{with mysql_names} -Provides: mysql-devel = %{sameevr} -Provides: mysql-devel%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql-devel} - -%description devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the libraries and header files that are needed for -developing MariaDB/MySQL client applications. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with embedded} -%package embedded -Summary: MariaDB as an embeddable library -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-embedded = %{sameevr} -Provides: mysql-embedded%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded < %{obsoleted_mysql_evr}} - -%description embedded -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains a version of the MariaDB server that can be embedded -into a client application instead of running as a separate process. -MariaDB is a community developed branch of MySQL. - - -%package embedded-devel -Summary: Development files for MariaDB as an embeddable library -Group: Applications/Databases -Requires: %{name}-embedded%{?_isa} = %{sameevr} -Requires: %{name}-devel%{?_isa} = %{sameevr} -# embedded-devel should require libaio-devel (rhbz#1290517) -Requires: libaio-devel -%if %{with mysql_names} -Provides: mysql-embedded-devel = %{sameevr} -Provides: mysql-embedded-devel%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: community-mysql-embedded-devel} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr}} - -%description embedded-devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains files needed for developing and testing with -the embedded version of the MariaDB server. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with bench} -%package bench -Summary: MariaDB benchmark scripts and data -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-bench = %{sameevr} -Provides: mysql-bench%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: community-mysql-bench} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-bench < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-bench < %{obsoleted_mysql_evr}} - -%description bench -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains benchmark scripts and data for use when benchmarking -MariaDB. -MariaDB is a community developed branch of MySQL. -%endif - - -%if %{with test} -%package test -Summary: The test suite distributed with MariaDB -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{sameevr} -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: perl(Env) -Requires: perl(Exporter) -Requires: perl(Fcntl) -Requires: perl(File::Temp) -Requires: perl(Data::Dumper) -Requires: perl(Getopt::Long) -Requires: perl(IPC::Open3) -Requires: perl(Socket) -Requires: perl(Sys::Hostname) -Requires: perl(Test::More) -Requires: perl(Time::HiRes) -%{?with_conflicts:Conflicts: community-mysql-test} -%if %{with mysql_names} -Provides: mysql-test = %{sameevr} -Provides: mysql-test%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}} - -%description test -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the regression test suite distributed with -the MariaDB sources. -MariaDB is a community developed branch of MySQL. -%endif - -%prep -%setup -q -n mariadb-%{version} - -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch34 -p1 -%patch37 -p1 -%patch38 -p1 -%patch40 -p1 -%patch41 -p1 - -sed -i -e 's/2.8.7/2.6.4/g' cmake/cpack_rpm.cmake -# workaround to deploy mariadb@.service on EL7 -sed -i 's/IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)/IF(TRUE)/g' support-files/CMakeLists.txt - -# workaround for upstream bug #56342 -rm -f mysql-test/t/ssl_8k_key-master.opt - -# generate a list of tests that fail, but are not disabled by upstream -cat %{SOURCE50} | tee mysql-test/rh-skipped-tests.list - -# disable some tests failing on different architectures -%ifarch %{arm} aarch64 -cat %{SOURCE51} | tee -a mysql-test/rh-skipped-tests.list -%endif - -%ifarch ppc ppc64 ppc64p7 s390 s390x -cat %{SOURCE52} | tee -a mysql-test/rh-skipped-tests.list -%endif - -cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ - %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \ - %{SOURCE70} scripts - -%if %{with galera} -# prepare selinux policy -mkdir selinux -sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{name}-server-galera.te -cat selinux/%{name}-server-galera.te -%endif - -# Check if PCRE version is actual -%{!?with_pcre: -pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` -pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` - -if [ %{pcre_version} != "$pcre_maj.$pcre_min" ] -then - echo "\n PCRE version is outdated. \n\tIncluded version:%{pcre_version} \n\tUpstream version: $pcre_maj.$pcre_min\n" - exit 1 -fi -} - - - -%build - -# fail quickly and obviously if user tries to build as root -%if %runselftest - if [ x"$(id -u)" = "x0" ]; then - echo "mysql's regression tests fail if run as root." - echo "If you really need to build the RPM as root, use" - echo "--nocheck to skip the regression tests." - exit 1 - fi -%endif - -CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# force PIC mode so that we can build libmysqld.so -CFLAGS="$CFLAGS -fPIC" -# GCC 4.9 causes segfaults: https://mariadb.atlassian.net/browse/MDEV-6360 -CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" -# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization -# submitted as bz #529298 -%ifarch sparc sparcv9 sparc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` -%endif -# significant performance gains can be achieved by compiling with -O3 optimization -# rhbz#1051069 -%ifarch ppc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` -%endif -CXXFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS - -%if 0%{?_hardened_build} -# building with PIE -LDFLAGS="$LDFLAGS -pie -Wl,-z,relro,-z,now" -export LDFLAGS -%endif - -# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX -# so we can't use %%{_datadir} and so forth here. -%cmake . \ - -DBUILD_CONFIG=mysql_release \ - -DFEATURE_SET="community" \ - -DINSTALL_LAYOUT=RPM \ - -DDAEMON_NAME="%{daemon_name}" \ - -DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \ - -DLOG_LOCATION="%{logfile}" \ - -DPID_FILE_DIR="%{pidfiledir}" \ - -DNICE_PROJECT_NAME="MariaDB" \ - -DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \ - -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ - -DINSTALL_SYSCONFDIR="%{_sysconfdir}" \ - -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ - -DINSTALL_DOCDIR="share/doc/%{_pkgdocdirname}" \ - -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \ - -DINSTALL_INCLUDEDIR=include/mysql \ - -DINSTALL_INFODIR=share/info \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ - -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \ - -DINSTALL_MYSQLTESTDIR=share/mysql-test \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ - -DINSTALL_SBINDIR=libexec \ - -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share \ - -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ - -DMYSQL_DATADIR="%{dbdatadir}" \ - -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ - -DENABLED_LOCAL_INFILE=ON \ - -DENABLE_DTRACE=ON \ - -DWITH_EMBEDDED_SERVER=ON \ - -DWITH_SSL=system \ - -DWITH_ZLIB=system \ -%{?with_pcre: -DWITH_PCRE=system}\ - -DWITH_JEMALLOC=no \ -%{!?with_tokudb: -DWITHOUT_TOKUDB=ON}\ -%{!?with_mroonga: -DWITHOUT_MROONGA=ON}\ -%{!?with_oqgraph: -DWITHOUT_OQGRAPH=ON}\ - -DTMPDIR=/var/tmp \ -%{?with_debug: -DCMAKE_BUILD_TYPE=Debug}\ - %{?_hardened_build:-DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now"} - -make %{?_smp_mflags} VERBOSE=1 - -# debuginfo extraction scripts fail to find source files in their real -# location -- satisfy them by copying these files into location, which -# is expected by scripts -for e in innobase xtradb ; do - for f in pars0grm.y pars0lex.l ; do - cp -p "storage/$e/pars/$f" "storage/$e/$f" - done -done - -# build selinux policy -%if %{with galera} -pushd selinux -make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp -%endif - -%install -make DESTDIR=%{buildroot} install - -# cmake generates some completely wacko references to -lprobes_mysql when -# building with dtrace support. Haven't found where to shut that off, -# so resort to this blunt instrument. While at it, let's not reference -# libmysqlclient_r anymore either. -sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ - %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp -cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config -chmod 755 %{buildroot}%{_bindir}/mysql_config - -# multilib header support -for header in mysql/my_config.h mysql/private/config.h; do -%multilib_fix_c_header --file %{_includedir}/$header -done - -# multilib support for shell scripts -# we only apply this to known Red Hat multilib arches, per bug #181335 -if %multilib_capable; then -mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} -install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config -fi - -# Upstream install this into arch-independent directory, TODO: report -mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig - -# install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, -# but that's pretty wacko --- see also %%{name}-file-contents.patch) -install -p -m 644 Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/ -rm -r %{buildroot}%{_datadir}/doc/%{_pkgdocdirname}/MariaDB-server-%{version}/ - -mkdir -p %{buildroot}%{logfiledir} -chmod 0750 %{buildroot}%{logfiledir} -touch %{buildroot}%{logfile} - -# current setting in my.cnf is to use /var/run/mariadb for creating pid file, -# however since my.cnf is not updated by RPM if changed, we need to create mysqld -# as well because users can have odd settings in their /etc/my.cnf -mkdir -p %{buildroot}%{pidfiledir} -install -p -m 0755 -d %{buildroot}%{dbdatadir} - -%if %{with config} -install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf -%else -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf -%endif - -# use different config file name for each variant of server -mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf - -# install systemd unit files and scripts for handling server startup -%if %{with init_systemd} -install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service -install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service -install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf -%if 0%{?mysqld_pid_dir:1} -echo "d %{_localstatedir}/run/%{mysqld_pid_dir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif -%endif - -# install SysV init script -%if %{with init_sysv} -install -D -p -m 755 scripts/mysql.init %{buildroot}%{daemondir}/%{daemon_name} -%endif - -# helper scripts for service starting -install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir -install -p -m 755 scripts/mysql-wait-ready %{buildroot}%{_libexecdir}/mysql-wait-ready -install -p -m 755 scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop -install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket -install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade -install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common - -# install selinux policy -%if %{with galera} -install -p -m 644 -D selinux/%{name}-server-galera.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp -%endif - -# Remove libmysqld.a -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a - -# libmysqlclient_r is no more. Upstream tries to replace it with symlinks -# but that really doesn't work (wrong soname in particular). We'll keep -# just the devel libmysqlclient_r.so link, so that rebuilding without any -# source change is enough to get rid of dependency on libmysqlclient_r. -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so* -ln -s libmysqlclient.so %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so - -# mysql-test includes one executable that doesn't belong under /usr/share, -# so move it and provide a symlink -mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} -ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process - -# should move this to /etc/ ? -rm -f %{buildroot}%{_bindir}/mysql_embedded -rm -f %{buildroot}%{_libdir}/mysql/*.a -rm -f %{buildroot}%{_datadir}/%{pkg_name}/binary-configure -rm -f %{buildroot}%{_datadir}/%{pkg_name}/magic -rm -f %{buildroot}%{_datadir}/%{pkg_name}/ndb-config-2-node.ini -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysql.server -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server -rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* -rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* -rm -f %{buildroot}%{_bindir}/mytop - -# put logrotate script where it needs to be -mkdir -p %{buildroot}%{logrotateddir} -mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} -chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} - -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf - -# copy additional docs into build tree so %%doc will find them -install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} -install -p -m 0644 %{SOURCE6} %{basename:%{SOURCE6}} -install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}} -install -p -m 0644 %{SOURCE16} %{basename:%{SOURCE16}} -install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}} - -# install galera config file -sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' support-files/wsrep.cnf -install -p -m 0644 support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf - -# install the clustercheck script -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig -touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck -install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck - -# install the list of skipped tests to be available for user runs -install -p -m 0644 mysql-test/rh-skipped-tests.list %{buildroot}%{_datadir}/mysql-test - -# remove unneeded RHEL-4 SELinux stuff -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/SELinux/ - -# remove SysV init script and a symlink to that -rm -f %{buildroot}%{_sysconfdir}/init.d/mysql -rm -f %{buildroot}%{_libexecdir}/rcmysql - -# remove duplicate logrotate script -rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql - -# remove solaris files -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/solaris/ - -# rename the wsrep README so it corresponds with the other README names -mv Docs/README-wsrep Docs/README.wsrep - -# remove *.jar file from mysql-test -rm -rf %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar - -%if %{without clibrary} -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient.so -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so -rm -rf %{buildroot}%{_libdir}/mysql/libmysqlclient*.so.* -rm -rf %{buildroot}%{_sysconfdir}/ld.so.conf.d -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf -%endif - -%if %{without embedded} -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.so* -rm -f %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} -rm -f %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* -%endif - -%if %{without devel} -rm -f %{buildroot}%{_bindir}/mysql_config* -rm -rf %{buildroot}%{_includedir}/mysql -rm -f %{buildroot}%{_datadir}/aclocal/mysql.m4 -rm -f %{buildroot}%{_libdir}/pkgconfig/mariadb.pc -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient*.so -rm -f %{buildroot}%{_mandir}/man1/mysql_config.1* -%endif - -%if %{without client} -rm -f %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults} -rm -f %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults}.1* -%endif - -%if %{without connect} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf -%endif - -%if %{without oqgraph} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf -%endif - -%if %{without config} -rm -f %{buildroot}%{_sysconfdir}/my.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%endif - -%if %{without common} -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/charsets -%endif - -%if %{without errmsg} -rm -f %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ -french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ -polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian} -%endif - -%if %{without bench} -rm -rf %{buildroot}%{_datadir}/sql-bench -%endif - -%if %{without test} -rm -f %{buildroot}%{_bindir}/{mysql_client_test,my_safe_process} -rm -rf %{buildroot}%{_datadir}/mysql-test -rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1* -%endif - -%check -%if %{with test} -%if %runselftest -make test VERBOSE=1 -# hack to let 32- and 64-bit tests run concurrently on same build machine -export MTR_PARALLEL=1 -# builds might happen at the same host, avoid collision -export MTR_BUILD_THREAD=%{__isa_bits} - -# The cmake build scripts don't provide any simple way to control the -# options for mysql-test-run, so ignore the make target and just call it -# manually. Nonstandard options chosen are: -# --force to continue tests after a failure -# no retries please -# test SSL with --ssl -# skip tests that are listed in rh-skipped-tests.list -# avoid redundant test runs with --binlog-format=mixed -# increase timeouts to prevent unwanted failures during mass rebuilds -( - set -e - cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl \ - --suite-timeout=720 --testcase-timeout=30 --skip-rpl \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 \ -%if %{ignore_testsuite_result} - || : -%else - --skip-test-list=rh-skipped-tests.list -%endif - # cmake build scripts will install the var cruft if left alone :-( - rm -rf var -) -%endif -%endif - -%pre server -/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : -/usr/sbin/useradd -M -N -g mysql -o -r -d %{mysqluserhome} -s /sbin/nologin \ - -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : - -%if %{with clibrary} -%post libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%post embedded -p /sbin/ldconfig -%endif - -%if %{with galera} -%post server-galera -semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : -semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp >/dev/null 2>&1 || : -%endif - -%post server -%if %{with init_systemd} -%systemd_post %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 1 ]; then - /sbin/chkconfig --add %{daemon_name} -fi -%endif - -%preun server -%if %{with init_systemd} -%systemd_preun %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 0 ]; then - /sbin/service %{daemon_name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{daemon_name} -fi -%endif - -%if %{with clibrary} -%postun libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%postun embedded -p /sbin/ldconfig -%endif - -%if %{with galera} -%postun server-galera -if [ $1 -eq 0 ]; then - semodule -r %{name}-server-galera 2>/dev/null || : -fi -%endif - -%postun server -%if %{with init_systemd} -%systemd_postun_with_restart %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 -ge 1 ]; then - /sbin/service %{daemon_name} condrestart >/dev/null 2>&1 || : -fi -%endif - -%if %{with client} -%files -%{_bindir}/msql2mysql -%{_bindir}/mysql -%{_bindir}/mysql_find_rows -%{_bindir}/mysql_plugin -%{_bindir}/mysql_waitpid -%{_bindir}/mysqlaccess -%{_bindir}/mysqladmin -%{_bindir}/mysqlbinlog -%{_bindir}/mysqlcheck -%{_bindir}/mysqldump -%{_bindir}/mysqlimport -%{_bindir}/mysqlshow -%{_bindir}/mysqlslap -%{_bindir}/my_print_defaults - -%{_mandir}/man1/msql2mysql.1* -%{_mandir}/man1/mysql.1* -%{_mandir}/man1/mysql_find_rows.1* -%{_mandir}/man1/mysql_plugin.1* -%{_mandir}/man1/mysql_waitpid.1* -%{_mandir}/man1/mysqlaccess.1* -%{_mandir}/man1/mysqladmin.1* -%{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlcheck.1* -%{_mandir}/man1/mysqldump.1* -%{_mandir}/man1/mysqlimport.1* -%{_mandir}/man1/mysqlshow.1* -%{_mandir}/man1/mysqlslap.1* -%{_mandir}/man1/my_print_defaults.1* -%endif - -%if %{with clibrary} -%files libs -%{_libdir}/mysql/libmysqlclient.so.* -%{_sysconfdir}/ld.so.conf.d/* -%config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf -%endif - -%if %{with config} -%files config -# although the default my.cnf contains only server settings, we put it in the -# common package because it can be used for client settings too. -%dir %{_sysconfdir}/my.cnf.d -%config(noreplace) %{_sysconfdir}/my.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset -%endif - -%if %{with common} -%files common -%license COPYING COPYING.LESSER -%license storage/innobase/COPYING.Percona storage/innobase/COPYING.Google -%doc README README.mysql-license README.mysql-docs -%dir %{_libdir}/mysql -%dir %{_libdir}/mysql/plugin -%dir %{_datadir}/%{pkg_name} -%{_libdir}/mysql/plugin/dialog.so -%{_libdir}/mysql/plugin/mysql_clear_password.so -%{_datadir}/%{pkg_name}/charsets -%endif - -%if %{with errmsg} -%files errmsg -%{_datadir}/%{pkg_name}/errmsg-utf8.txt -%{_datadir}/%{pkg_name}/english -%lang(cs) %{_datadir}/%{pkg_name}/czech -%lang(da) %{_datadir}/%{pkg_name}/danish -%lang(nl) %{_datadir}/%{pkg_name}/dutch -%lang(et) %{_datadir}/%{pkg_name}/estonian -%lang(fr) %{_datadir}/%{pkg_name}/french -%lang(de) %{_datadir}/%{pkg_name}/german -%lang(el) %{_datadir}/%{pkg_name}/greek -%lang(hu) %{_datadir}/%{pkg_name}/hungarian -%lang(it) %{_datadir}/%{pkg_name}/italian -%lang(ja) %{_datadir}/%{pkg_name}/japanese -%lang(ko) %{_datadir}/%{pkg_name}/korean -%lang(no) %{_datadir}/%{pkg_name}/norwegian -%lang(no) %{_datadir}/%{pkg_name}/norwegian-ny -%lang(pl) %{_datadir}/%{pkg_name}/polish -%lang(pt) %{_datadir}/%{pkg_name}/portuguese -%lang(ro) %{_datadir}/%{pkg_name}/romanian -%lang(ru) %{_datadir}/%{pkg_name}/russian -%lang(sr) %{_datadir}/%{pkg_name}/serbian -%lang(sk) %{_datadir}/%{pkg_name}/slovak -%lang(es) %{_datadir}/%{pkg_name}/spanish -%lang(sv) %{_datadir}/%{pkg_name}/swedish -%lang(uk) %{_datadir}/%{pkg_name}/ukrainian -%endif - -%if %{with galera} -%files server-galera -%doc Docs/README.wsrep -%license LICENSE.clustercheck -%{_bindir}/clustercheck -%if %{with init_systemd} -%{_bindir}/galera_new_cluster -%{_bindir}/galera_recovery -%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf -%endif -%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf -%attr(0640,root,root) %ghost %config(noreplace) %{_sysconfdir}/sysconfig/clustercheck -%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp -%endif - -%files server -%doc README.mysql-cnf - -%{_bindir}/aria_chk -%{_bindir}/aria_dump_log -%{_bindir}/aria_ftdump -%{_bindir}/aria_pack -%{_bindir}/aria_read_log -%{_bindir}/mariadb-service-convert -%{_bindir}/myisamchk -%{_bindir}/myisam_ftdump -%{_bindir}/myisamlog -%{_bindir}/myisampack -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions -%{_bindir}/mysql_install_db -%{_bindir}/mysql_secure_installation -%{_bindir}/mysql_setpermission -%{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysql_upgrade -%{_bindir}/mysql_zap -%{_bindir}/mysqlbug -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi -%{_bindir}/mysqld_safe -%{_bindir}/mysqlhotcopy -%{_bindir}/mysqltest -%{_bindir}/innochecksum -%{_bindir}/perror -%{_bindir}/replace -%{_bindir}/resolve_stack_dump -%{_bindir}/resolveip -%{_bindir}/wsrep_sst_common -%{_bindir}/wsrep_sst_mysqldump -%{_bindir}/wsrep_sst_rsync -%{_bindir}/wsrep_sst_xtrabackup -%{_bindir}/wsrep_sst_xtrabackup-v2 -%{?with_tokudb:%{_bindir}/tokuftdump} -%{?with_tokudb:%{_bindir}/tokuft_logprint} - -%config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf -%{?with_tokudb:%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf} - -%{_libexecdir}/mysqld - -%{_libdir}/mysql/INFO_SRC -%{_libdir}/mysql/INFO_BIN -%if %{without common} -%dir %{_datadir}/%{pkg_name} -%endif - -%{_libdir}/mysql/plugin/* -%{?with_oqgraph:%exclude %{_libdir}/mysql/plugin/ha_oqgraph.so} -%{?with_connect:%exclude %{_libdir}/mysql/plugin/ha_connect.so} -%exclude %{_libdir}/mysql/plugin/dialog.so -%exclude %{_libdir}/mysql/plugin/mysql_clear_password.so - -%{_mandir}/man1/aria_chk.1* -%{_mandir}/man1/aria_dump_log.1* -%{_mandir}/man1/aria_ftdump.1* -%{_mandir}/man1/aria_pack.1* -%{_mandir}/man1/aria_read_log.1* -%{_mandir}/man1/myisamchk.1* -%{_mandir}/man1/myisamlog.1* -%{_mandir}/man1/myisampack.1* -%{_mandir}/man1/mysql_convert_table_format.1* -%{_mandir}/man1/myisam_ftdump.1* -%{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_fix_extensions.1* -%{_mandir}/man1/mysql_install_db.1* -%{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_upgrade.1* -%{_mandir}/man1/mysql_zap.1* -%{_mandir}/man1/mysqlbug.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* -%{_mandir}/man1/mysqld_safe.1* -%{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysql_setpermission.1* -%{_mandir}/man1/mysqltest.1* -%{_mandir}/man1/innochecksum.1* -%{_mandir}/man1/perror.1* -%{_mandir}/man1/replace.1* -%{_mandir}/man1/resolve_stack_dump.1* -%{_mandir}/man1/resolveip.1* -%{_mandir}/man1/mysql_tzinfo_to_sql.1* -%{_mandir}/man8/mysqld.8* - -%{_datadir}/%{pkg_name}/fill_help_tables.sql -%{_datadir}/%{pkg_name}/install_spider.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp_bootstrap.sql -%{_datadir}/%{pkg_name}/mysql_system_tables.sql -%{_datadir}/%{pkg_name}/mysql_system_tables_data.sql -%{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql -%{_datadir}/%{pkg_name}/mysql_to_mariadb.sql -%{_datadir}/%{pkg_name}/mysql_performance_tables.sql -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/install.sql} -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/uninstall.sql} -%{_datadir}/%{pkg_name}/my-*.cnf -%{_datadir}/%{pkg_name}/wsrep.cnf -%{_datadir}/%{pkg_name}/wsrep_notify -%dir %{_datadir}/%{pkg_name}/policy -%dir %{_datadir}/%{pkg_name}/policy/apparmor -%dir %{_datadir}/%{pkg_name}/policy/selinux -%{_datadir}/%{pkg_name}/policy/apparmor/README -%{_datadir}/%{pkg_name}/policy/apparmor/usr.sbin.mysqld* -%{_datadir}/%{pkg_name}/policy/selinux/README -%{_datadir}/%{pkg_name}/policy/selinux/mariadb-server.* -%{_datadir}/%{pkg_name}/systemd/mariadb.service -# mariadb@ is installed only when we have cmake newer than 3.3 -%if 0%{?fedora} > 22 || 0%{?rhel} > 6 -%{_datadir}/%{pkg_name}/systemd/mariadb@.service -%endif - -%{daemondir}/%{daemon_name}* -%{_libexecdir}/mysql-prepare-db-dir -%{_libexecdir}/mysql-wait-ready -%{_libexecdir}/mysql-wait-stop -%{_libexecdir}/mysql-check-socket -%{_libexecdir}/mysql-check-upgrade -%{_libexecdir}/mysql-scripts-common - -%{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf} -%attr(0755,mysql,mysql) %dir %{pidfiledir} -%attr(0755,mysql,mysql) %dir %{dbdatadir} -%attr(0750,mysql,mysql) %dir %{logfiledir} -%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} -%config(noreplace) %{logrotateddir}/%{daemon_name} - -%if %{with oqgraph} -%files oqgraph-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/oqgraph.cnf -%{_libdir}/mysql/plugin/ha_oqgraph.so -%endif - -%if %{with connect} -%files connect-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/connect.cnf -%{_libdir}/mysql/plugin/ha_connect.so -%endif - -%if %{with devel} -%files devel -%{_bindir}/mysql_config* -%{_includedir}/mysql -%{_datadir}/aclocal/mysql.m4 -%{_libdir}/pkgconfig/mariadb.pc -%if %{with clibrary} -%{_libdir}/mysql/libmysqlclient.so -%{_libdir}/mysql/libmysqlclient_r.so -%endif -%{_mandir}/man1/mysql_config.1* -%endif - -%if %{with embedded} -%files embedded -%{_libdir}/mysql/libmysqld.so.* - -%files embedded-devel -%{_libdir}/mysql/libmysqld.so -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* -%endif - -%if %{with bench} -%files bench -%{_datadir}/sql-bench -%endif - -%if %{with test} -%files test -%{_bindir}/mysql_client_test -%{_bindir}/my_safe_process -%attr(-,mysql,mysql) %{_datadir}/mysql-test -%{_mandir}/man1/mysql_client_test.1* -%endif - -%changelog -* Tue Jan 10 2017 Michael Bayer - 3:10.1.20-1 -- Update to version 10.1.20 -- Add explicit EVR requirement in main package for -libs - Related: #1406320 -- Use correct macro when removing doc files - Resolves: #1400981 -- JdbcMariaDB.jar test removed -- PCRE version check added - Related: #1382988, #1396945, #1096787 -- added temporary support to build with OpenSSL 1.0 on Fedora >= 26 -- added krb5-devel pkg as Buldrquires to prevent gssapi failure - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-3 -- Actually apply the revert added as patch in the previous release - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-2 -- Back out upstream commit 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 as it - breaks the resource agent - -* Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 -- Update to 10.1.18 - -* Wed Aug 31 2016 Jakub Dorňák - 3:10.1.17-1 -- Update to 10.1.17 - -* Mon Aug 29 2016 Jakub Dorňák - 3:10.1.16-2 -- Fixed galera replication - Resolves: #1352946 - -* Tue Jul 19 2016 Jakub Dorňák - 3:10.1.16-1 -- Update to 10.1.16 - -* Fri Jul 15 2016 Honza Horak - 3:10.1.14-5 -- Fail build when test-suite fails -- Use license macro for inclusion of licenses - -* Thu Jul 14 2016 Honza Horak - 3:10.1.14-4 -- Revert Update to 10.1.15, this release is broken - https://lists.launchpad.net/maria-discuss/msg03691.html - -* Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 -- Check datadir more carefully to avoid unwanted data corruption - Related: #1335849 - -* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 -- Bump epoch - (related to the downgrade from the pre-release version) - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.15-1 -- Update to 10.1.15 - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 - Revert "Update to 10.2.0" - It is possible that MariaDB 10.2.0 won't be stable till f25 GA. - -* Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 -- BR multilib-rpm-config and use it for multilib workarounds -- install architecture dependant pc file to arch-dependant location - -* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 -- Fix mysql-prepare-db-dir - Resolves: #1335849 - -* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 -- Update to 10.2.0 - -* Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 -- Add selinux policy -- Update to 10.1.14 (includes various bug fixes) -- Add -h and --help options to galera_new_cluster - -* Thu Apr 7 2016 Jakub Dorňák - 1:10.1.13-3 -- wsrep_on in galera.cnf - -* Tue Apr 5 2016 Jakub Dorňák - 1:10.1.13-2 -- Moved /etc/sysconfig/clustercheck - and /usr/share/mariadb/systemd/use_galera_new_cluster.conf - to mariadb-server-galera - -* Tue Mar 29 2016 Jakub Dorňák - 1:10.1.13-1 -- Update to 10.1.13 - -* Wed Mar 23 2016 Jakub Dorňák - 1:10.1.12-4 -- Fixed conflict with mariadb-galera-server - -* Tue Mar 22 2016 Jakub Dorňák - 1:10.1.12-3 -- Add subpackage mariadb-server-galera - Resolves: 1310622 - -* Tue Mar 01 2016 Honza Horak - 1:10.1.12-2 -- Rebuild for BZ#1309199 (symbol versioning) - -* Mon Feb 29 2016 Jakub Dorňák - 1:10.1.12-1 -- Update to 10.1.12 - -* Tue Feb 16 2016 Honza Horak - 1:10.1.11-9 -- Remove dangling symlink to /etc/init.d/mysql - -* Sat Feb 13 2016 Honza Horak - 1:10.1.11-8 -- Use epoch for obsoleting mariadb-galera-server - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-7 -- Add Provides: bundled(pcre) in case we build with bundled pcre - Related: #1302296 -- embedded-devel should require libaio-devel - Resolves: #1290517 - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-6 -- Fix typo s/obsolate/obsolete/ - -* Thu Feb 11 2016 Honza Horak - 1:10.1.11-5 -- Add missing requirements for proper wsrep functionality -- Obsolate mariadb-galera & mariadb-galera-server (thanks Tomas Repik) - Resolves: #1279753 -- Re-enable using libedit, which should be now fixed - Related: #1201988 -- Remove mariadb-wait-ready call from systemd unit, we have now systemd notify support -- Make mariadb@.service similar to mariadb.service - -* Mon Feb 08 2016 Honza Horak - 1:10.1.11-4 -- Use systemd unit file more compatible with upstream - -* Sun Feb 07 2016 Honza Horak - 1:10.1.11-3 -- Temporarily disabling oqgraph for - https://mariadb.atlassian.net/browse/MDEV-9479 - -* Thu Feb 04 2016 Fedora Release Engineering - 1:10.1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Feb 3 2016 Jakub Dorňák - 1:10.1.11-1 -- Update to 10.1.11 - -* Tue Jan 19 2016 Jakub Dorňák - 1:10.1.10-1 -- Update to 10.1.10 - -* Mon Dec 07 2015 Dan Horák - 1:10.1.8-3 -- rebuilt for s390(x) - -* Tue Nov 03 2015 Honza Horak - 1:10.1.8-2 -- Expand variables in server.cnf - -* Thu Oct 22 2015 Jakub Dorňák - 1:10.1.8-1 -- Update to 10.1.8 - -* Thu Aug 27 2015 Jonathan Wakely - 1:10.0.21-2 -- Rebuilt for Boost 1.59 - -* Mon Aug 10 2015 Jakub Dorňák - 1:10.0.21-1 -- Update to 10.0.21 - -* Wed Jul 29 2015 Fedora Release Engineering - 1:10.0.20-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 1:10.0.20-2 -- rebuild for Boost 1.58 - -* Tue Jun 23 2015 Honza Horak - 1:10.0.20-1 -- Update to 10.0.20 - -* Wed Jun 17 2015 Fedora Release Engineering - 1:10.0.19-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Jun 03 2015 Dan Horák - 1:10.0.19-2 -- Update lists of failing tests (jdornak) - Related: #1149647 - -* Mon May 11 2015 Honza Horak - 1:10.0.19-1 -- Update to 10.0.19 - -* Thu May 07 2015 Honza Horak - 1:10.0.18-1 -- Update to 10.0.18 - -* Thu May 07 2015 Honza Horak - 1:10.0.17-4 -- Include client plugins into -common package since they are used by both -libs - and base packages. -- Do not use libedit - Related: #1201988 -- Let plugin dir to be owned by -common -- Use correct comment in the init script - Related: #1184604 -- Add openssl as BuildRequires to run some openssl tests during build - Related: #1189180 -- Fail in case any command in check fails - Related: #1124791 -- Fix mysqladmin crash if run with -u root -p - Resolves: #1207170 - -* Sat May 02 2015 Kalev Lember - 1:10.0.17-3 -- Rebuilt for GCC 5 C++11 ABI change - -* Fri Mar 06 2015 Honza Horak - 1:10.0.17-2 -- Wait for daemon ends - Resolves: #1072958 -- Do not include symlink to libmysqlclient if not shipping the library -- Do not use scl prefix more than once in paths - Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html - -* Wed Mar 04 2015 Honza Horak - 1:10.0.17-1 -- Rebase to version 10.0.17 -- Added variable for turn off skipping some tests - -* Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 -- Check permissions when starting service on RHEL-6 - Resolves: #1194699 -- Do not create test database by default - Related: #1194611 - -* Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 -- Enable tokudb - -* Tue Feb 10 2015 Honza Horak - 1:10.0.16-3 -- Fix openssl_1 test - -* Wed Feb 4 2015 Jakub Dorňák - 1:10.0.16-2 -- Include new certificate for tests -- Update lists of failing tests - Related: #1186110 - -* Tue Feb 3 2015 Jakub Dorňák - 1:10.0.16-9 -- Rebase to version 10.0.16 - Resolves: #1187895 - -* Tue Jan 27 2015 Petr Machata - 1:10.0.15-9 -- Rebuild for boost 1.57.0 - -* Mon Jan 26 2015 Honza Horak - 1:10.0.15-8 -- Fix typo in the config file - -* Sun Jan 25 2015 Honza Horak - 1:10.0.15-7 -- Do not create log file in post script - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-6 -- Move server settings to config file under my.cnf.d dir - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-5 -- Fix path for sysconfig file - Filter provides in el6 properly - Fix initscript file location - -* Tue Jan 06 2015 Honza Horak - 1:10.0.15-4 -- Disable failing tests connect.mrr, connect.updelx2 on ppc and s390 - -* Mon Dec 22 2014 Honza Horak - 1:10.0.15-3 -- Fix macros paths in my.cnf -- Create old location for pid file if it remained in my.cnf - -* Fri Dec 05 2014 Honza Horak - 1:10.0.15-2 -- Rework usage of macros and remove some compatibility artefacts - -* Thu Nov 27 2014 Jakub Dorňák - 1:10.0.15-1 -- Update to 10.0.15 - -* Thu Nov 20 2014 Jan Stanek - 1:10.0.14-8 -- Applied upstream fix for mysql_config --cflags output. - Resolves: #1160845 - -* Fri Oct 24 2014 Jan Stanek - 1:10.0.14-7 -- Fixed compat service file. - Resolves: #1155700 - -* Mon Oct 13 2014 Honza Horak - 1:10.0.14-6 -- Remove bundled cmd-line-utils - Related: #1079637 -- Move mysqlimport man page to proper package -- Disable main.key_cache test on s390 - Releated: #1149647 - -* Wed Oct 08 2014 Honza Horak - 1:10.0.14-5 -- Disable tests connect.part_file, connect.part_table - and connect.updelx - Related: #1149647 - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-4 -- Add bcond_without mysql_names - Use more correct path when deleting mysql logrotate script - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-3 -- Build with system libedit - Resolves: #1079637 - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-2 -- Add with_debug option - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-1 -- Update to 10.0.14 - -* Wed Sep 24 2014 Honza Horak - 1:10.0.13-8 -- Move connect engine to a separate package - Rename oqgraph engine to align with upstream packages -- Move some files to correspond with MariaDB upstream packages - client.cnf into -libs, mysql_plugin and msql2mysql into base, - tokuftdump and aria_* into -server, errmsg-utf8.txt into -errmsg -- Remove duplicate cnf files packaged using %%doc -- Check upgrade script added to warn about need for mysql_upgrade - -* Wed Sep 24 2014 Matej Muzila - 1:10.0.13-7 -- Client related libraries moved from mariadb-server to mariadb-libs - Related: #1138843 - -* Mon Sep 08 2014 Honza Horak - 1:10.0.13-6 -- Disable vcol_supported_sql_funcs_myisam test on all arches - Related: #1096787 -- Install systemd service file on RHEL-7+ - Server requires any mysql package, so it should be fine with older client - -* Thu Sep 04 2014 Honza Horak - 1:10.0.13-5 -- Fix paths in mysql_install_db script - Resolves: #1134328 -- Use %%cmake macro - -* Tue Aug 19 2014 Honza Horak - 1:10.0.13-4 -- Build config subpackage everytime -- Disable failing tests: innodb_simulate_comp_failures_small, key_cache - rhbz#1096787 - -* Sun Aug 17 2014 Fedora Release Engineering - 1:10.0.13-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Aug 14 2014 Honza Horak - 1:10.0.13-2 -- Include mysqld_unit only if required; enable tokudb in f20- - -* Wed Aug 13 2014 Honza Horak - 1:10.0.13-1 -- Rebase to version 10.0.13 - -* Tue Aug 12 2014 Honza Horak - 1:10.0.12-8 -- Introduce -config subpackage and ship base config files here - -* Tue Aug 5 2014 Honza Horak - 1:10.0.12-7 -- Adopt changes from mysql, thanks Bjorn Munch - -* Mon Jul 28 2014 Honza Horak - 1:10.0.12-6 -- Use explicit sysconfdir -- Absolut path for default value for pid file and error log - -* Tue Jul 22 2014 Honza Horak - 1:10.0.12-5 -- Hardcoded paths removed to work fine in chroot -- Spec rewrite to be more similar to oterh MySQL implementations -- Use variable for daemon unit name -- Include SysV init script if built on older system -- Add possibility to not ship some sub-packages - -* Mon Jul 21 2014 Honza Horak - 1:10.0.12-4 -- Reformating spec and removing unnecessary snippets - -* Tue Jul 15 2014 Honza Horak - 1:10.0.12-3 -- Enable OQGRAPH engine and package it as a sub-package -- Add support for TokuDB engine for x86_64 (currently still disabled) -- Re-enable tokudb_innodb_xa_crash again, seems to be fixed now -- Drop superfluous -libs and -embedded ldconfig deps (thanks Ville Skyttä) -- Separate -lib and -common sub-packages -- Require /etc/my.cnf instead of shipping it -- Include README.mysql-cnf -- Multilib support re-worked -- Introduce new option with_mysqld_unit -- Removed obsolete mysql-cluster, the package should already be removed -- Improve error message when log file is not writable -- Compile all binaries with full RELRO (RHBZ#1092548) -- Use modern symbol filtering with compatible backup -- Add more groupnames for server's my.cnf -- Error messages now provided by a separate package (thanks Alexander Barkov) -- Expand paths in helper scripts using cmake - -* Wed Jun 18 2014 Mikko Tiihonen - 1:10.0.12-2 -- Use -fno-delete-null-pointer-checks to avoid segfaults with gcc 4.9 - -* Tue Jun 17 2014 Jakub Dorňák - 1:10.0.12-1 -- Rebase to version 10.0.12 - -* Sat Jun 07 2014 Fedora Release Engineering - 1:10.0.11-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Jun 3 2014 Jakub Dorňák - 1:10.0.11-4 -- rebuild with tests failing on different arches disabled (#1096787) - -* Thu May 29 2014 Dan Horák - 1:10.0.11-2 -- rebuild with tests failing on big endian arches disabled (#1096787) - -* Wed May 14 2014 Jakub Dorňák - 1:10.0.11-1 -- Rebase to version 10.0.11 - -* Mon May 05 2014 Honza Horak - 1:10.0.10-3 -- Script for socket check enhanced - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-2 -- use system pcre library - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-1 -- Rebase to version 10.0.10 - -* Wed Mar 12 2014 Honza Horak - 1:5.5.36-2 -- Server crashes on SQL select containing more group by and left join statements using innodb tables - Resolves: #1065676 -- Fix paths in helper scripts -- Move language files into mariadb directory - -* Thu Mar 06 2014 Honza Horak - 1:5.5.36-1 -- Rebase to 5.5.36 - https://kb.askmonty.org/en/mariadb-5536-changelog/ - -* Tue Feb 25 2014 Honza Horak 1:5.5.35-5 -- Daemon helper scripts sanity changes and spec files clean-up - -* Tue Feb 11 2014 Honza Horak 1:5.5.35-4 -- Fix typo in mysqld.service - Resolves: #1063981 - -* Wed Feb 5 2014 Honza Horak 1:5.5.35-3 -- Do not touch the log file in post script, so it does not get wrong owner - Resolves: #1061045 - -* Thu Jan 30 2014 Honza Horak 1:5.5.35-1 -- Rebase to 5.5.35 - https://kb.askmonty.org/en/mariadb-5535-changelog/ - Also fixes: CVE-2014-0001, CVE-2014-0412, CVE-2014-0437, CVE-2013-5908, - CVE-2014-0420, CVE-2014-0393, CVE-2013-5891, CVE-2014-0386, CVE-2014-0401, - CVE-2014-0402 - Resolves: #1054043 - Resolves: #1059546 - -* Tue Jan 14 2014 Honza Horak - 1:5.5.34-9 -- Adopt compatible system versioning - Related: #1045013 -- Use compatibility mysqld.service instead of link - Related: #1014311 - -* Mon Jan 13 2014 Rex Dieter 1:5.5.34-8 -- move mysql_config alternatives scriptlets to -devel too - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-7 -- Build with -O3 on ppc64 - Related: #1051069 -- Move mysql_config to -devel sub-package and remove Require: mariadb - Related: #1050920 - -* Fri Jan 10 2014 Marcin Juszkiewicz 1:5.5.34-6 -- Disable main.gis-precise test also for AArch64 -- Disable perfschema.func_file_io and perfschema.func_mutex for AArch64 - (like it is done for 32-bit ARM) - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-5 -- Clean all non-needed doc files properly - -* Wed Jan 8 2014 Honza Horak 1:5.5.34-4 -- Read socketfile location in mariadb-prepare-db-dir script - -* Mon Jan 6 2014 Honza Horak 1:5.5.34-3 -- Don't test EDH-RSA-DES-CBC-SHA cipher, it seems to be removed from openssl - which now makes mariadb/mysql FTBFS because openssl_1 test fails - Related: #1044565 -- Use upstream's layout for symbols version in client library - Related: #1045013 -- Check if socket file is not being used by another process at a time - of starting the service - Related: #1045435 -- Use %%ghost directive for the log file - Related: 1043501 - -* Wed Nov 27 2013 Honza Horak 1:5.5.34-2 -- Fix mariadb-wait-ready script - -* Fri Nov 22 2013 Honza Horak 1:5.5.34-1 -- Rebase to 5.5.34 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-4 -- Fix spec file to be ready for backport by Oden Eriksson - Resolves: #1026404 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-3 -- Add pam-devel to build-requires in order to build - Related: #1019945 -- Check if correct process is running in mysql-wait-ready script - Related: #1026313 - -* Mon Oct 14 2013 Honza Horak 1:5.5.33a-2 -- Turn on test suite - -* Thu Oct 10 2013 Honza Horak 1:5.5.33a-1 -- Rebase to 5.5.33a - https://kb.askmonty.org/en/mariadb-5533-changelog/ - https://kb.askmonty.org/en/mariadb-5533a-changelog/ -- Enable outfile_loaddata test -- Disable tokudb_innodb_xa_crash test - -* Mon Sep 2 2013 Honza Horak - 1:5.5.32-12 -- Re-organize my.cnf to include only generic settings - Resolves: #1003115 -- Move pid file location to /var/run/mariadb -- Make mysqld a symlink to mariadb unit file rather than the opposite way - Related: #999589 - -* Thu Aug 29 2013 Honza Horak - 1:5.5.32-11 -- Move log file into /var/log/mariadb/mariadb.log -- Rename logrotate script to mariadb -- Resolves: #999589 - -* Wed Aug 14 2013 Rex Dieter 1:5.5.32-10 -- fix alternatives usage - -* Tue Aug 13 2013 Honza Horak - 1:5.5.32-9 -- Multilib issues solved by alternatives - Resolves: #986959 - -* Sat Aug 03 2013 Petr Pisar - 1:5.5.32-8 -- Perl 5.18 rebuild - -* Wed Jul 31 2013 Honza Horak - 1:5.5.32-7 -- Do not use login shell for mysql user - -* Tue Jul 30 2013 Honza Horak - 1:5.5.32-6 -- Remove unneeded systemd-sysv requires -- Provide mysql-compat-server symbol -- Create mariadb.service symlink -- Fix multilib header location for arm -- Enhance documentation in the unit file -- Use scriptstub instead of links to avoid multilib conflicts -- Add condition for doc placement in F20+ - -* Sun Jul 28 2013 Dennis Gilmore - 1:5.5.32-5 -- remove "Requires(pretrans): systemd" since its not possible -- when installing mariadb and systemd at the same time. as in a new install - -* Sat Jul 27 2013 Kevin Fenzi 1:5.5.32-4 -- Set rpm doc macro to install docs in unversioned dir - -* Fri Jul 26 2013 Dennis Gilmore 1:5.5.32-3 -- add Requires(pre) on systemd for the server package - -* Tue Jul 23 2013 Dennis Gilmore 1:5.5.32-2 -- replace systemd-units requires with systemd -- remove solaris files - -* Fri Jul 19 2013 Honza Horak 1:5.5.32-1 -- Rebase to 5.5.32 - https://kb.askmonty.org/en/mariadb-5532-changelog/ -- Clean-up un-necessary systemd snippets - -* Wed Jul 17 2013 Petr Pisar - 1:5.5.31-7 -- Perl 5.18 rebuild - -* Mon Jul 1 2013 Honza Horak 1:5.5.31-6 -- Test suite params enhanced to decrease server condition influence -- Fix misleading error message when uninstalling built-in plugins - Related: #966873 - -* Thu Jun 27 2013 Honza Horak 1:5.5.31-5 -- Apply fixes found by Coverity static analysis tool - -* Wed Jun 19 2013 Honza Horak 1:5.5.31-4 -- Do not use pretrans scriptlet, which doesn't work in anaconda - Resolves: #975348 - -* Fri Jun 14 2013 Honza Horak 1:5.5.31-3 -- Explicitly enable mysqld if it was enabled in the beginning - of the transaction. - -* Thu Jun 13 2013 Honza Horak 1:5.5.31-2 -- Apply man page fix from Jan Stanek - -* Fri May 24 2013 Honza Horak 1:5.5.31-1 -- Rebase to 5.5.31 - https://kb.askmonty.org/en/mariadb-5531-changelog/ -- Preserve time-stamps in case of installed files -- Use /var/tmp instead of /tmp, since the later is using tmpfs, - which can cause problems - Resolves: #962087 -- Fix test suite requirements - -* Sun May 5 2013 Honza Horak 1:5.5.30-2 -- Remove mytop utility, which is packaged separately -- Resolve multilib conflicts in mysql/private/config.h - -* Fri Mar 22 2013 Honza Horak 1:5.5.30-1 -- Rebase to 5.5.30 - https://kb.askmonty.org/en/mariadb-5530-changelog/ - -* Fri Mar 22 2013 Honza Horak 1:5.5.29-11 -- Obsolete MySQL since it is now renamed to community-mysql -- Remove real- virtual names - -* Thu Mar 21 2013 Honza Horak 1:5.5.29-10 -- Adding epoch to have higher priority than other mysql implementations - when comes to provider comparison - -* Wed Mar 13 2013 Honza Horak 5.5.29-9 -- Let mariadb-embedded-devel conflict with MySQL-embedded-devel -- Adjust mariadb-sortbuffer.patch to correspond with upstream patch - -* Mon Mar 4 2013 Honza Horak 5.5.29-8 -- Mask expected warnings about setrlimit in test suite - -* Thu Feb 28 2013 Honza Horak 5.5.29-7 -- Use configured prefix value instead of guessing basedir - in mysql_config -Resolves: #916189 -- Export dynamic columns and non-blocking API functions documented - by upstream - -* Wed Feb 27 2013 Honza Horak 5.5.29-6 -- Fix sort_buffer_length option type - -* Wed Feb 13 2013 Honza Horak 5.5.29-5 -- Suppress warnings in tests and skip tests also on ppc64p7 - -* Tue Feb 12 2013 Honza Horak 5.5.29-4 -- Suppress warning in tests on ppc -- Enable fixed index_merge_myisam test case - -* Thu Feb 07 2013 Honza Horak 5.5.29-3 -- Packages need to provide also %%_isa version of mysql package -- Provide own symbols with real- prefix to distinguish from mysql - unambiguously -- Fix format for buffer size in error messages (MDEV-4156) -- Disable some tests that fail on ppc and s390 -- Conflict only with real-mysql, otherwise mariadb conflicts with ourself - -* Tue Feb 05 2013 Honza Horak 5.5.29-2 -- Let mariadb-libs to own /etc/my.cnf.d - -* Thu Jan 31 2013 Honza Horak 5.5.29-1 -- Rebase to 5.5.29 - https://kb.askmonty.org/en/mariadb-5529-changelog/ -- Fix inaccurate default for socket location in mysqld-wait-ready - Resolves: #890535 - -* Thu Jan 31 2013 Honza Horak 5.5.28a-8 -- Enable obsoleting mysql - -* Wed Jan 30 2013 Honza Horak 5.5.28a-7 -- Adding necessary hacks for perl dependency checking, rpm is still - not wise enough -- Namespace sanity re-added for symbol default_charset_info - -* Mon Jan 28 2013 Honza Horak 5.5.28a-6 -- Removed %%{_isa} from provides/obsoletes, which doesn't allow - proper obsoleting -- Do not obsolete mysql at the time of testing - -* Thu Jan 10 2013 Honza Horak 5.5.28a-5 -- Added licenses LGPLv2 and BSD -- Removed wrong usage of %%{epoch} -- Test-suite is run in %%check -- Removed perl dependency checking adjustment, rpm seems to be smart enough -- Other minor spec file fixes - -* Tue Dec 18 2012 Honza Horak 5.5.28a-4 -- Packaging of MariaDB based on MySQL package - diff --git a/database/mariadb/centos/stx-mariadb.stable_docker_image b/database/mariadb/centos/stx-mariadb.stable_docker_image deleted file mode 100644 index 5c5134b03..000000000 --- a/database/mariadb/centos/stx-mariadb.stable_docker_image +++ /dev/null @@ -1,3 +0,0 @@ -BUILDER=docker -LABEL=stx-mariadb - diff --git a/database/python-psycopg2/centos/build_srpm.data b/database/python-psycopg2/centos/build_srpm.data deleted file mode 100644 index a26dac650..000000000 --- a/database/python-psycopg2/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT - diff --git a/database/python-psycopg2/centos/meta_patches/PATCH_ORDER b/database/python-psycopg2/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 84f9de3a3..000000000 --- a/database/python-psycopg2/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -setup-spec-for-tis.patch -meta-patch0.patch diff --git a/database/python-psycopg2/centos/meta_patches/meta-patch0.patch b/database/python-psycopg2/centos/meta_patches/meta-patch0.patch deleted file mode 100644 index bec98c2ae..000000000 --- a/database/python-psycopg2/centos/meta_patches/meta-patch0.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f964faeb50150b64ed2481f721e544f4c3e2ca55 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 29 Nov 2016 15:06:32 -0500 -Subject: [PATCH 1/1] meta patch0 - ---- - SPECS/python-psycopg2.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec -index 2489fc5..c11a680 100644 ---- a/SPECS/python-psycopg2.spec -+++ b/SPECS/python-psycopg2.spec -@@ -36,6 +36,8 @@ Url: http://www.psycopg.org/psycopg/ - - Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-%{version}.tar.gz - -+Patch0: Manually-patch-170-173-187-and-187-fix.patch -+ - BuildRequires: postgresql-devel - BuildRequires: python-devel - BuildRequires: python-debug -@@ -103,6 +105,7 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA - - %prep - %setup -q -n psycopg2-%{version} -+%patch0 -p1 - - %build - for python in %{python_runtimes} ; do --- -1.8.3.1 - diff --git a/database/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch b/database/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch deleted file mode 100644 index dfbb34544..000000000 --- a/database/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 78314a11e44751d23da70c5b935c73579650a2bd Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 29 Nov 2016 14:29:21 -0500 -Subject: [PATCH 1/1] Setup spec for Titanium Cloud - ---- - SPECS/python-psycopg2.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec -index 8492914..2489fc5 100644 ---- a/SPECS/python-psycopg2.spec -+++ b/SPECS/python-psycopg2.spec -@@ -28,7 +28,7 @@ - Summary: A PostgreSQL database adapter for Python - Name: python-psycopg2 - Version: 2.5.1 --Release: 3%{?dist} -+Release: 3.el7%{?_tis_dist}.%{tis_patch_ver} - # The exceptions allow linking to OpenSSL and PostgreSQL's libpq - License: LGPLv3+ with exceptions - Group: Applications/Databases --- -1.8.3.1 - diff --git a/database/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch b/database/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch deleted file mode 100644 index e4a88c49d..000000000 --- a/database/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 04fe7ce2bed4b20ffa89d12551bd2865d21caec1 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Tue, 29 Nov 2016 14:52:47 -0500 -Subject: [PATCH 1/1] Manually patch 170,173,187 and 187 fix - ---- - psycopg/connection_int.c | 7 ++++++- - psycopg/error_type.c | 12 ++++++++++-- - psycopg/lobject_type.c | 15 +++++++++------ - 3 files changed, 25 insertions(+), 9 deletions(-) - -diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c -index 7851b0a..5069e64 100644 ---- a/psycopg/connection_int.c -+++ b/psycopg/connection_int.c -@@ -642,6 +642,7 @@ static int - _conn_poll_connecting(connectionObject *self) - { - int res = PSYCO_POLL_ERROR; -+ const char *msg; - - Dprintf("conn_poll: poll connecting"); - switch (PQconnectPoll(self->pgconn)) { -@@ -656,7 +657,11 @@ _conn_poll_connecting(connectionObject *self) - break; - case PGRES_POLLING_FAILED: - case PGRES_POLLING_ACTIVE: -- PyErr_SetString(OperationalError, "asynchronous connection failed"); -+ msg = PQerrorMessage(self->pgconn); -+ if (!(msg && *msg)) { -+ msg = "asynchronous connection failed"; -+ } -+ PyErr_SetString(OperationalError, msg); - res = PSYCO_POLL_ERROR; - break; - } -diff --git a/psycopg/error_type.c b/psycopg/error_type.c -index 106b87a..75761e8 100644 ---- a/psycopg/error_type.c -+++ b/psycopg/error_type.c -@@ -163,8 +163,16 @@ psyco_error_reduce(errorObject *self) - if (2 != PyTuple_GET_SIZE(tuple)) { goto exit; } - - if (!(dict = PyDict_New())) { goto error; } -- if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) { goto error; } -- if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) { goto error; } -+ if (self->pgerror) { -+ if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) { -+ goto error; -+ } -+ } -+ if (self->pgcode) { -+ if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) { -+ goto error; -+ } -+ } - - { - PyObject *newtuple; -diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c -index fee11c4..823a1b7 100644 ---- a/psycopg/lobject_type.c -+++ b/psycopg/lobject_type.c -@@ -355,9 +355,11 @@ lobject_dealloc(PyObject* obj) - { - lobjectObject *self = (lobjectObject *)obj; - -- if (lobject_close(self) < 0) -- PyErr_Print(); -- Py_XDECREF((PyObject*)self->conn); -+ if (self->conn) { /* if not, init failed */ -+ if (lobject_close(self) < 0) -+ PyErr_Print(); -+ Py_XDECREF((PyObject*)self->conn); -+ } - PyMem_Free(self->smode); - - Dprintf("lobject_dealloc: deleted lobject object at %p, refcnt = " -@@ -372,10 +374,11 @@ lobject_init(PyObject *obj, PyObject *args, PyObject *kwds) - int oid = (int)InvalidOid, new_oid = (int)InvalidOid; - const char *smode = ""; - const char *new_file = NULL; -- PyObject *conn; -+ PyObject *conn = NULL; - -- if (!PyArg_ParseTuple(args, "O|iziz", -- &conn, &oid, &smode, &new_oid, &new_file)) -+ if (!PyArg_ParseTuple(args, "O!|iziz", -+ &connectionType, &conn, -+ &oid, &smode, &new_oid, &new_file)) - return -1; - - return lobject_setup((lobjectObject *)obj, --- -1.8.3.1 - diff --git a/database/python-psycopg2/centos/srpm_path b/database/python-psycopg2/centos/srpm_path deleted file mode 100644 index 02f3299ab..000000000 --- a/database/python-psycopg2/centos/srpm_path +++ /dev/null @@ -1,2 +0,0 @@ -mirror:Source/python-psycopg2-2.5.1-3.el7.src.rpm - diff --git a/docker/python-docker/centos/build_srpm.data b/docker/python-docker/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/docker/python-docker/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/docker/python-docker/centos/meta_patches/0001-Add-package-versioning.patch b/docker/python-docker/centos/meta_patches/0001-Add-package-versioning.patch deleted file mode 100644 index b4274ac19..000000000 --- a/docker/python-docker/centos/meta_patches/0001-Add-package-versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9bc57c6963fcea63a7793633339e5692ec3e2252 Mon Sep 17 00:00:00 2001 -From: John Kung -Date: Wed, 7 Aug 2019 13:35:22 -0400 -Subject: [PATCH 1/1] Add package versioning patch - ---- - SPECS/python-docker.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/python-docker.spec b/SPECS/python-docker.spec -index 5ebf252..92420e3 100644 ---- a/SPECS/python-docker.spec -+++ b/SPECS/python-docker.spec -@@ -18,7 +18,7 @@ - - Name: python-%{srcname} - Version: 3.3.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A Python library for the Docker Engine API - License: ASL 2.0 - URL: https://pypi.python.org/pypi/%{srcname} --- -1.8.3.1 - diff --git a/docker/python-docker/centos/meta_patches/0002-Update-spec-include-stx-patches.patch b/docker/python-docker/centos/meta_patches/0002-Update-spec-include-stx-patches.patch deleted file mode 100644 index 48eeac2d5..000000000 --- a/docker/python-docker/centos/meta_patches/0002-Update-spec-include-stx-patches.patch +++ /dev/null @@ -1,36 +0,0 @@ -0c3f898cabd79b07cc6cc52245de712ee7b46bd Mon Sep 17 00:00:00 2001 -From: John Kung -Date: Wed, 7 Aug 2019 15:01:11 -0400 -Subject: [PATCH 1/1] Update-spec-include-stx-patches - ---- - SPECS/python-docker.spec | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/SPECS/python-docker.spec b/SPECS/python-docker.spec -index 92420e3..9a05819 100644 ---- a/SPECS/python-docker.spec -+++ b/SPECS/python-docker.spec -@@ -29,6 +29,8 @@ Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{sr - # work in RHEL. This patch converts those environment markers into simple if - # statements. - Patch1: remove-environment-markers.patch -+Patch2: 0001-Update-client-close-socket.patch -+Patch3: 0002-Add-auth_config-to-api.image.inspect_distribution.patch - - BuildArch: noarch - -@@ -138,7 +139,10 @@ run containers, manage containers, manage Swarms, etc. - %endif # with_python3 - - %prep --%autosetup -n %{srcname}-%{version} -p 1 -+%setup -q -n %{srcname}-%{version} -+%patch2 -p1 -+%patch3 -p1 -+ - rm -fr docker.egg-info - - %build --- -1.8.3.1 diff --git a/docker/python-docker/centos/meta_patches/PATCH_ORDER b/docker/python-docker/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 238975b92..000000000 --- a/docker/python-docker/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Add-package-versioning.patch -0002-Update-spec-include-stx-patches.patch diff --git a/docker/python-docker/centos/patches/0001-Update-client-close-socket.patch b/docker/python-docker/centos/patches/0001-Update-client-close-socket.patch deleted file mode 100644 index bbd67d8e7..000000000 --- a/docker/python-docker/centos/patches/0001-Update-client-close-socket.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cbe001760e9893015b1576cba05ebce0938038e4 Mon Sep 17 00:00:00 2001 -From: John Kung -Date: Wed, 7 Aug 2019 14:06:04 -0400 -Subject: [PATCH 1/1] Update client close socket - ---- - docker/api/client.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/docker/api/client.py b/docker/api/client.py -index 13c292a..7df5eb1 100644 ---- a/docker/api/client.py -+++ b/docker/api/client.py -@@ -370,7 +370,10 @@ class APIClient( - if stream: - return gen - else: -- return six.binary_type().join(gen) -+ try: -+ return six.binary_type().join(gen) -+ finally: -+ response.close() - - def _disable_socket_timeout(self, socket): - """ Depending on the combination of python version and whether we're --- -1.8.3.1 - diff --git a/docker/python-docker/centos/patches/0002-Add-auth_config-to-api.image.inspect_distribution.patch b/docker/python-docker/centos/patches/0002-Add-auth_config-to-api.image.inspect_distribution.patch deleted file mode 100644 index 12c4cf6e3..000000000 --- a/docker/python-docker/centos/patches/0002-Add-auth_config-to-api.image.inspect_distribution.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 55dc1d720418c552657160d1165e2be7e0a80069 Mon Sep 17 00:00:00 2001 -From: Thiago Brito -Date: Tue, 6 Jul 2021 15:41:06 -0300 -Subject: [PATCH 2/2] Add auth_config to api.image.inspect_distribution - -This is an excerpt from docker-py 4.4.4 needed to check if a given image -exists in an authenticated registry. - -Signed-off-by: Thiago Brito ---- - docker/api/image.py | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/docker/api/image.py b/docker/api/image.py -index 5f05d88..8fc9164 100644 ---- a/docker/api/image.py -+++ b/docker/api/image.py -@@ -247,23 +247,35 @@ class ImageApiMixin(object): - - @utils.minimum_version('1.30') - @utils.check_resource('image') -- def inspect_distribution(self, image): -+ def inspect_distribution(self, image, auth_config=None): - """ - Get image digest and platform information by contacting the registry. -- - Args: - image (str): The image name to inspect -- -+ auth_config (dict): Override the credentials that are found in the -+ config for this request. ``auth_config`` should contain the -+ ``username`` and ``password`` keys to be valid. - Returns: - (dict): A dict containing distribution data -- - Raises: - :py:class:`docker.errors.APIError` - If the server returns an error. - """ -+ registry, _ = auth.resolve_repository_name(image) -+ -+ headers = {} -+ if auth_config is None: -+ header = auth.get_config_header(self, registry) -+ if header: -+ headers['X-Registry-Auth'] = header -+ else: -+ log.debug('Sending supplied auth config') -+ headers['X-Registry-Auth'] = auth.encode_header(auth_config) -+ -+ url = self._url("/distribution/{0}/json", image) - - return self._result( -- self._get(self._url("/distribution/{0}/json", image)), True -+ self._get(url, headers=headers), True - ) - - def load_image(self, data, quiet=None): --- -2.17.1 - diff --git a/docker/python-docker/centos/srpm_path b/docker/python-docker/centos/srpm_path deleted file mode 100644 index e6e872ca1..000000000 --- a/docker/python-docker/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-docker-3.3.0-1.el7.src.rpm diff --git a/filesystem/drbd/drbd-tools/centos/build_srpm.data b/filesystem/drbd/drbd-tools/centos/build_srpm.data deleted file mode 100644 index c6f46a3e3..000000000 --- a/filesystem/drbd/drbd-tools/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -COPY_LIST="$FILES_BASE/* \ - $DISTRO/patches/* \ - $CGCS_BASE/downloads/drbd-utils-9.15.1.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/filesystem/drbd/drbd-tools/centos/drbd.spec b/filesystem/drbd/drbd-tools/centos/drbd.spec deleted file mode 100644 index 9eb601bee..000000000 --- a/filesystem/drbd/drbd-tools/centos/drbd.spec +++ /dev/null @@ -1,628 +0,0 @@ -# Define init script directory. %{_initddir} is available from Fedora -# 9 forward; CentOS knows 5 only %{_initrddir}. Neither are known to -# autoconf... -%{!?_initddir: %{expand: %%global _initddir %{_initrddir}}} - -# Compatibility macro wrappers for legacy RPM versions that do not -# support conditional builds -%{!?bcond_without: %{expand: %%global bcond_without() %%{expand:%%%%{!?_without_%%{1}:%%%%global with_%%{1} 1}}}} -%{!?bcond_with: %{expand: %%global bcond_with() %%{expand:%%%%{?_with_%%{1}:%%%%global with_%%{1} 1}}}} -%{!?with: %{expand: %%global with() %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}} -%{!?without: %{expand: %%global without() %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}} - -%if 0%{!?initscripttype:1} -# initscripttype not explicitly defined in some macro file or on commandline -# use presence of systemd_post macro to determine the initscripttype -%if %{?systemd_post:1}%{!?systemd_post:0} -%global initscripttype systemd -%else -%global initscripttype sysv -%endif -%endif - -# Conditionals -# Invoke "rpmbuild --without " or "rpmbuild --with " -# to disable or enable specific features -%bcond_without manual -%bcond_without udev -%bcond_without pacemaker -%bcond_with rgmanager -%bcond_without heartbeat -# conditionals may not contain "-" nor "_", hence "bashcompletion" -%bcond_without bashcompletion -%bcond_without sbinsymlinks -# --with xen is ignored on any non-x86 architecture -%bcond_without xen -%bcond_without 83support -%bcond_without 84support -%bcond_without drbdmon -%bcond_with prebuiltman -%ifnarch %{ix86} x86_64 -%global _without_xen --without-xen -%endif -# Set system type -%global initscripttype sysv -# remove unnesessary features -%global _without_xen --without-xen -%undefine with_xen -%undefine with_sbinsymlinks - -Name: drbd -Summary: DRBD driver for Linux -Version: 9.15.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Source: http://www.drbd.org/download/drbd/utils/drbd-utils-%{version}.tar.gz -Source1: drbd.service - -# StarlingX -Patch0001: 0001_915-drbd-script.patch -Patch0002: 0002_915-drbd_ocf.patch -Patch0003: 0003_915-avoid-kernel-userspace-version-check.patch -Patch0004: 0004_915-Increase-short-cmd-timeout-to-15-secs.patch -Patch0005: 0005_915-drbd-overview.patch - -License: GPLv2+ -ExclusiveOS: linux -Group: System Environment/Kernel -URL: http://www.drbd.org/ -BuildRoot: %(mktemp -ud %{_tmppath}/drbd-utils-%{version}-%{release}-XXXXXX) -BuildRequires: flex -Requires: drbd-utils = %{version} -%ifarch %{ix86} x86_64 -%if %{with xen} -Requires: drbd-xen = %{version} -%endif -%endif -%if %{with udev} -Requires: drbd-udev = %{version} -BuildRequires: udev -%endif -%if %{with pacemaker} -Requires: drbd-pacemaker = %{version} -%endif -%if %{with drbdmon} -BuildRequires: gcc-c++ -%endif -## %if %{with rgmanager} -## ## No. -## ## We don't want to annoy the majority of our userbase on pacemaker -## ## by pulling in the full rgmanager stack via drbd-rgmanager as well. -## Requires: drbd-rgmanager = %{version} -## %endif -## -## ## Neither do we want to force anyone to install heartbeat -## ## Usually they use corosync meanwhile. -## ## No need to pull in heartbeat via the drbd-heartbeat scripts -## ## meant for haresources mode -## %if %{with heartbeat} -## Requires: %{name}-heartbeat = %{version} -## %endif -%if %{with bashcompletion} -Requires: drbd-bash-completion = %{version} -%endif -BuildRequires: systemd-devel -BuildRequires: automake -BuildRequires: libxslt -BuildRequires: docbook-style-xsl - -%description -DRBD mirrors a block device over the network to another machine. -Think of it as networked raid 1. It is a building block for -setting up high availability (HA) clusters. - -This is a virtual package, installing the full DRBD userland suite. - -# Just a few docs go into the "drbd" package. Everything else is part -# of one of the drbd-* packages. -%files -%defattr(-,root,root,-) -%doc COPYING -%doc ChangeLog -%doc README.md - -%package utils -Summary: Management utilities for DRBD -Group: System Environment/Kernel -# Our kernel modules "require" specific drbd-utils versions, not ranges. -# Which was natural as long as userland and module shared the same repo -# and source tarball, and would be build together. -# -# Now we split the userland part, we "provide" a list of versions here, -# to be able to use this package with existing module packages. -# -%if %{with 84support} -# which 8.4 version equivalent this package provides -Provides: drbd-utils = 8.4.5 -Provides: drbd-utils = 8.4.4 -Provides: drbd-utils = 8.4.3 -Provides: drbd-utils = 8.4.2 -Provides: drbd-utils = 8.4.1 -Provides: drbd-utils = 8.4.0 -%endif -%if %{with 83support} -# which 8.3 version equivalent this package provides -Provides: drbd-utils = 8.3.16 -%endif -# We used to have one monolithic userland package. -# Since all other packages require drbd-utils, -# it should be sufficient to add the conflict here. -Conflicts: drbd < 8.3.6 -# These exist in centos extras: -Conflicts: drbd82 drbd83 -%if %{initscripttype} == "sysv" -Requires(post): chkconfig -Requires(preun): chkconfig -%endif - -%description utils -DRBD mirrors a block device over the network to another machine. -Think of it as networked raid 1. It is a building block for -setting up high availability (HA) clusters. - -This packages includes the DRBD administration tools. - -%files utils -%defattr(755,root,root,-) -%if %{with sbinsymlinks} -/sbin/drbdsetup -/sbin/drbdadm -/sbin/drbdmeta -%endif -%{_sbindir}/drbdsetup -%{_sbindir}/drbdadm -%{_sbindir}/drbdmeta -%if %{with 83support} -%dir /lib/drbd/ -/lib/drbd/drbdsetup-83 -/lib/drbd/drbdadm-83 -%endif -%if %{with 84support} -/lib/drbd/drbdsetup-84 -/lib/drbd/drbdadm-84 -%endif -%if %{with drbdmon} -%{_sbindir}/drbdmon -%endif -%{_sbindir}/drbd-overview -%if %{initscripttype} == "sysv" -%{_initddir}/drbd -%endif -%attr(644,root,root) %{_unitdir}/drbd.service -%attr(755,root,root) %{_sbindir}/drbd-overview -%dir %{_prefix}/lib/drbd -%{_prefix}/lib/drbd/outdate-peer.sh -%{_prefix}/lib/drbd/snapshot-resync-target-lvm.sh -%{_prefix}/lib/drbd/unsnapshot-resync-target-lvm.sh -%{_prefix}/lib/drbd/notify-out-of-sync.sh -%{_prefix}/lib/drbd/notify-split-brain.sh -%{_prefix}/lib/drbd/notify-emergency-reboot.sh -%{_prefix}/lib/drbd/notify-emergency-shutdown.sh -%{_prefix}/lib/drbd/notify-io-error.sh -%{_prefix}/lib/drbd/notify-pri-lost-after-sb.sh -%{_prefix}/lib/drbd/notify-pri-lost.sh -%{_prefix}/lib/drbd/notify-pri-on-incon-degr.sh -%{_prefix}/lib/drbd/notify.sh -%dir %{_var}/lib/drbd -%ghost %dir %{_var}/run/drbd - -%defattr(-,root,root,-) -%if %{initscripttype} == "systemd" -%{_unitdir}/drbd.service -%{_tmpfilesdir}/drbd.conf -/lib/drbd/drbd -%endif -%config(noreplace) %attr(640, root, root) %{_sysconfdir}/drbd.conf -%dir %attr(740, root, root) %{_sysconfdir}/drbd.d -%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf -%config(noreplace) %{_sysconfdir}/multipath/conf.d/drbd.conf -%if %{with manual} -%{_mandir}/man8/drbd-* -%{_mandir}/man8/drbdsetup-* -%{_mandir}/man8/drbdadm-* -%{_mandir}/man7/ocf_linbit_drbd.* -%{_mandir}/man7/ocf_linbit_drbd-attr.* -%{_mandir}/man5/drbd.conf-* -%{_mandir}/man8/drbdmeta-* -%if %{with drbdmon} -%{_mandir}/man8/drbdmon-* -%endif -%endif -%doc scripts/drbd.conf.example -%doc COPYING -%doc ChangeLog -%doc README.md - -%ifarch %{ix86} x86_64 -%if %{with xen} -%package xen -Summary: Xen block device management script for DRBD -Group: System Environment/Kernel -Requires: drbd-utils = %{version}-%{release} -@RPM_REQ_XEN@ -@RPM_SUBPACKAGE_NOARCH@ - -%description xen -This package contains a Xen block device helper script for DRBD, capable of -promoting and demoting DRBD resources as necessary. - -%files xen -%defattr(755,root,root,-) -%{_sysconfdir}/xen/scripts/block-drbd -%endif # with xen -%endif # arch %{ix86} x86_64 - -%if %{with udev} -%package udev -Summary: udev integration scripts for DRBD -Group: System Environment/Kernel -Requires: drbd-utils = %{version}-%{release}, udev -#@RPM_SUBPACKAGE_NOARCH@ - -%description udev -This package contains udev helper scripts for DRBD, managing symlinks to -DRBD devices in /dev/drbd/by-res and /dev/drbd/by-disk. - -%files udev -%defattr(-,root,root,-) -%config(noreplace) %{_udevrulesdir}/65-drbd.rules* -%endif # with udev - -%if %{with pacemaker} -%package pacemaker -Summary: Pacemaker resource agent for DRBD -Group: System Environment/Base -Requires: drbd-utils = %{version}-%{release} -#@RPM_REQ_PACEMAKER@ -License: GPLv2 -#@RPM_SUBPACKAGE_NOARCH@ - -%description pacemaker -This package contains the master/slave DRBD resource agent for the -Pacemaker High Availability cluster manager. - -%files pacemaker -%defattr(755,root,root,-) -%{_prefix}/lib/drbd/crm-fence-peer.sh -%{_prefix}/lib/drbd/crm-fence-peer.9.sh -%{_prefix}/lib/drbd/crm-unfence-peer.sh -%{_prefix}/lib/drbd/crm-unfence-peer.9.sh -%{_prefix}/lib/drbd/stonith_admin-fence-peer.sh -%{_prefix}/lib/ocf/resource.d/linbit/drbd -%{_prefix}/lib/ocf/resource.d/linbit/drbd-attr -%{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh -%endif # with pacemaker - -# Dependencies for drbd-rgmanager are particularly awful. On RHEL 5 -# and prior (and corresponding Fedora releases), %{_datadir}/cluster -# was owned by rgmanager version 2, so we have to depend on that. -# -# With Red Hat Cluster 3.0.1 (around Fedora 12), the DRBD resource -# agent was merged in, and it became part of the resource-agents 3 -# package (which of course is different from resource-agents on all -# other platforms -- go figure). So for resource-agents >= 3, we must -# generally conflict. -# -# Then for RHEL 6, Red Hat in all their glory decided to keep the -# packaging scheme, but kicked DRBD out of the resource-agents -# package. Thus, for RHEL 6 specifically, we must not conflict with -# resource-agents >=3, but instead require it. -# -# The saga continues: -# In RHEL 6.1 they have listed the drbd resource agent as valid agent, -# but do not include it in their resource-agents package. -> So we -# drop any dependency regarding rgmanager's version. -# -# All of this for exactly two (2) files. -%if %{with rgmanager} -%package rgmanager -Summary: Red Hat Cluster Suite agent for DRBD -Group: System Environment/Base -Requires: drbd-utils = %{version}-%{release} -#@RPM_SUBPACKAGE_NOARCH@ - -%description rgmanager -This package contains the DRBD resource agent for the Red Hat Cluster Suite -resource manager. - -As of Red Hat Cluster Suite 3.0.1, the DRBD resource agent is included -in the Cluster distribution. - -%files rgmanager -%defattr(755,root,root,-) -%{_datadir}/cluster/drbd.sh -%{_prefix}/lib/drbd/rhcs_fence - -%defattr(-,root,root,-) -%{_datadir}/cluster/drbd.metadata -%endif # with rgmanager - -%if %{with 84support}%{with 83support} -%if %{with heartbeat} -%package heartbeat -Summary: Heartbeat resource agent for DRBD -Group: System Environment/Base -Requires: %{name}-utils = %{version}-%{release} -#@RPM_REQ_HEARTBEAT@ -License: GPLv2 -#@RPM_SUBPACKAGE_NOARCH@ - -%description heartbeat -This package contains the DRBD resource agents for the Heartbeat cluster -resource manager (in v1 compatibility mode). - -%files heartbeat -%defattr(755,root,root,-) -%{_sysconfdir}/ha.d/resource.d/drbddisk -%{_sysconfdir}/ha.d/resource.d/drbdupper - -%defattr(-,root,root,-) -%if %{with manual} -%{_mandir}/man8/drbddisk-* -%endif -%endif # with heartbeat -%endif # 83 || 84 support - -%if %{with bashcompletion} -%package bash-completion -Summary: Programmable bash completion support for drbdadm -Group: System Environment/Base -Requires: drbd-utils = %{version}-%{release} -#@RPM_REQ_BASH_COMPLETION@ -#@RPM_SUBPACKAGE_NOARCH@ - -%description bash-completion -This package contains programmable bash completion support for the drbdadm -management utility. - -%files bash-completion -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/bash_completion.d/drbdadm* -%endif # with bashcompletion - -%if %{with manual} -%package man-ja -Summary: Japanese man pages for DRBD -Group: System Environment/Base -%if %{without prebuiltman} -BuildRequires: po4a -%endif -#@RPM_SUBPACKAGE_NOARCH@ - -%description man-ja -This package contains Japanese man pages for DRBD. - -%files man-ja -%defattr(-,root,root,-) -%{_mandir}/ja/man8/drbd-* -%{_mandir}/ja/man8/drbdsetup-* -%{_mandir}/ja/man8/drbdadm-* -%{_mandir}/ja/man5/drbd.conf-* -%{_mandir}/ja/man8/drbdmeta-* -%if %{with heartbeat} -%if %{with 84support} -%{_mandir}/ja/man8/drbddisk-* -%endif -%endif # with heartbeat -%if %{with drbdmon} -%{_mandir}/ja/man8/drbdmon-* -%endif - -%post man-ja -for f in drbd drbdadm drbdmeta drbdsetup; do - ln -sf $f-8.4.8.gz %{_mandir}/ja/man8/$f.8.gz -done -ln -sf drbd.conf-8.4.5.gz %{_mandir}/ja/man5/drbd.conf.5.gz -%if %{with drbdmon} -ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz -%endif - -%preun man-ja -for f in drbd drbdadm drbdmeta drbdsetup; do - rm -f %{_mandir}/ja/man8/$f.8.gz -done -rm -f %{_mandir}/ja/man5/drbd.conf.5.gz -rm -f %{_mandir}/ja/man8/drbdmon.8.gz -%endif # with manual - -%prep -%setup -q -n drbd-utils-%{version} -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 -%patch0004 -p1 -%patch0005 -p1 - -%build -# rebuild configure... -aclocal -autoheader -autoconf -%configure \ - %{?_without_udev} \ - %{?_without_xen} \ - %{?_without_pacemaker} \ - %{?_without_heartbeat} \ - %{?_with_rgmanager} \ - %{?_without_bashcompletion} \ - %{?_without_83support} \ - %{?_without_84support} \ - %{?_without_manual} \ - %{?_with_prebuiltman} \ - --with-initdir=%{_initddir} \ - %{?_tmpfilesdir:--with-tmpfilesdir=%{_tmpfilesdir}} \ - --with-initscripttype=%{initscripttype} \ - %{?_without_drbdmon} -make %{?_smp_mflags} - -%install -rm -rf %{buildroot} -make install DESTDIR=%{buildroot} CREATE_MAN_LINK=no - -install -m 755 -d %{buildroot}%{_unitdir} -install -m 644 -p -D %{SOURCE1} %{buildroot}%{_unitdir}/drbd.service - -%if %{with sbinsymlinks} -# Don't do this if you are already on a /sbin -=> /usr/sbin distro -# compat: we used to live in /sbin/ -# there may be many hardcoded /sbin/drbd* out there, -# including variants of our own scripts. -mkdir -p %{buildroot}/var/run/drbd -mkdir %{buildroot}/sbin/ -cd %{buildroot}/sbin/ -ln -sv ..%{_sbindir}/drbdadm . -ln -sv ..%{_sbindir}/drbdmeta . -ln -sv ..%{_sbindir}/drbdsetup . -%endif - -%clean -rm -rf %{buildroot} - -%post utils -%if %{initscripttype} == "systemd" -%systemd_post drbd.service -%endif -%if %{initscripttype} == "sysv" -chkconfig --add drbd -%endif -%if %{with manual} -for f in drbd drbdadm drbdmeta drbdsetup; do - ln -sf $f-8.4.8.gz %{_mandir}/man8/$f.8.gz -done -ln -sf drbd.conf-8.4.5.gz %{_mandir}/man5/drbd.conf.5.gz -%if %{with drbdmon} -ln -sf drbdmon-9.0.8.gz %{_mandir}/man8/drbdmon.8.gz -%endif -%endif -%if %{without udev} -for i in `seq 0 15` ; do - test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i; -done -%endif #without udev - -%preun utils -for f in drbd drbdadm drbdmeta drbdsetup; do - rm -f %{_mandir}/man8/$f.8.gz -done -rm -f %{_mandir}/man5/drbd.conf.5.gz -rm -f %{_mandir}/man8/drbdmon.8.gz -%if %{initscripttype} == "systemd" -%systemd_preun drbd.service -%endif -%if %{initscripttype} == "sysv" -if [ $1 -eq 0 ]; then - %{_initrddir}/drbd stop >/dev/null 2>&1 - /sbin/chkconfig --del drbd -fi -%endif - -%if %{initscripttype} == "systemd" -%postun utils -%systemd_postun -%endif - - -%changelog -* Wed Nov 04 2020 Roland Kammerer - 9.15.1-1 -- New upstream release - -* Mon Sep 28 2020 Roland Kammerer - 9.15.0-1 -- New upstream release - -* Wed Sep 09 2020 Roland Kammerer - 9.14.0-1 -- New upstream release - -* Fri May 08 2020 Roland Kammerer - 9.13.0-1 -- New upstream release - -* Tue Feb 18 2020 Roland Kammerer - 9.12.0-1 -- New upstream release - -* Wed Oct 16 2019 Roland Kammerer - 9.11.0-1 -- New upstream release - -* Thu Jun 13 2019 Roland Kammerer - 9.10.0-1 -- New upstream release - -* Mon May 27 2019 Roland Kammerer - 9.9.0-1 -- New upstream release - -* Wed Jan 16 2019 Roland Kammerer - 9.8.0-1 -- New upstream release - -* Tue Dec 04 2018 Roland Kammerer - 9.7.0-1 -- New upstream release - -* Mon Oct 29 2018 Roland Kammerer - 9.6.0-1 -- New upstream release - -* Tue Jun 26 2018 Roland Kammerer - 9.5.0-1 -- New upstream release. - -* Tue May 08 2018 Roland Kammerer - 9.4.0-1 -- New upstream release. - -* Tue Apr 17 2018 Roland Kammerer - 9.3.1-1 -- New upstream release. - -* Wed Mar 21 2018 Roland Kammerer - 9.3.0-1 -- New upstream release. - -* Fri Dec 22 2017 Roland Kammerer - 9.2.0-1 -- New upstream release. - -* Tue Aug 29 2017 Roland Kammerer - 9.1.0-1 -- New upstream release. - -* Fri Jun 02 2017 Lars Ellenberg - 9.0.0-1 -- New upstream release. - -* Fri Apr 28 2017 Lars Ellenberg - 8.9.11-2 -- fix for regression of drbd-8.4 pacemaker integration -- fix 8.4 compatibility of shipped global_common.conf - -* Fri Mar 31 2017 Philipp Reisner - 8.9.11-1 -- New upstream release. - -* Fri Dec 23 2016 Philipp Reisner - 8.9.10-1 -- New upstream release. - -* Thu Oct 20 2016 Philipp Reisner - 8.9.9-1 -- New upstream release. - -* Tue Sep 06 2016 Philipp Reisner - 8.9.8-1 -- New upstream release. - -* Thu Jul 14 2016 Philipp Reisner - 8.9.7-1 -- New upstream release. - -* Wed Feb 3 2016 Roland Kammerer - 8.9.6-1 -- New upstream release. - -* Wed Dec 16 2015 Philipp Reisner - 8.9.5-1 -- New upstream release. - -* Fri Sep 18 2015 Philipp Reisner - 8.9.4-1 -- New upstream release. - -* Wed Jul 29 2015 Lars Ellenberg - 8.9.3-2 -- fixes for regression of drbd-8.4 pacemaker integration - -* Tue Jun 16 2015 Philipp Reisner - 8.9.3-1 -- New upstream release. - -* Fri Apr 03 2015 Philipp Reisner - 8.9.2-1 -- New upstream release. - -* Fri Aug 08 2014 Lars Ellenberg - 8.9.1-3 -- some more patches had been only merged into the "9" tools, - but unfortunately not the 8.4 tool compat tools -- place udev rules into $udevdir/*rules.d* -- rebuild: fixed default in case pkg-config does not know about udevdir -- fixed udev generated "by-disk" symlinks for drbd 8.4 - -* Tue Aug 05 2014 Lars Ellenberg - 8.9.1-1 -- New upstream release. - -* Tue Jun 10 2014 Philipp Reisner - 8.9.0-1 -- New upstream release. - diff --git a/filesystem/drbd/drbd-tools/centos/files/drbd.service b/filesystem/drbd/drbd-tools/centos/files/drbd.service deleted file mode 100644 index 8f9290c7d..000000000 --- a/filesystem/drbd/drbd-tools/centos/files/drbd.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Control drbd resources. -After=network.target sshd.service - -[Service] -Type=forking -Restart=no -KillMode=process -RemainAfterExit=yes -ExecStart=/etc/rc.d/init.d/drbd start -ExecStop=/etc/rc.d/init.d/drbd stop -ExecReload=/etc/rc.d/init.d/drbd reload -TimeoutSec=5min - -[Install] -WantedBy=multi-user.target - diff --git a/filesystem/drbd/drbd-tools/centos/patches/0001_915-drbd-script.patch b/filesystem/drbd/drbd-tools/centos/patches/0001_915-drbd-script.patch deleted file mode 100644 index 0f03fa15d..000000000 --- a/filesystem/drbd/drbd-tools/centos/patches/0001_915-drbd-script.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/scripts/drbd b/scripts/drbd -index 5b610f9..6fea91c 100755 ---- a/scripts/drbd -+++ b/scripts/drbd -@@ -211,7 +211,9 @@ case "$1" in - - [ -d /var/lock/subsys ] && touch /var/lock/subsys/drbd # for RedHat - run_hook start_before-wait -- $DRBDADM wait-con-int # User interruptible version of wait-connect all -+ if [ ! -e /etc/platform/simplex ] ; then # Skip if simplex -+ $DRBDADM wait-con-int # User interruptible version of wait-connect all -+ fi - run_hook start - - # Become primary if configured -@@ -265,7 +267,7 @@ case "$1" in - for d in /dev/drbd* ; do - [ -L "$d" ] && continue - [ -b "$d" ] || continue -- M=$(umount "$d" 2>&1) -+ M=$(umount --all-targets "$d" 2>&1) - case $M in - *" not mounted") :;; - *) stop_failed=1; echo "$M" >&2 ;; diff --git a/filesystem/drbd/drbd-tools/centos/patches/0002_915-drbd_ocf.patch b/filesystem/drbd/drbd-tools/centos/patches/0002_915-drbd_ocf.patch deleted file mode 100644 index 07ca95065..000000000 --- a/filesystem/drbd/drbd-tools/centos/patches/0002_915-drbd_ocf.patch +++ /dev/null @@ -1,649 +0,0 @@ -diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf -index 7aafdcf..ff77c91 100755 ---- a/scripts/drbd.ocf -+++ b/scripts/drbd.ocf -@@ -5,6 +5,8 @@ - # - # Copyright (c) 2009 LINBIT HA-Solutions GmbH, - # Copyright (c) 2009 Florian Haas, Lars Ellenberg -+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. -+# - # Based on the Heartbeat drbd OCF Resource Agent by Lars Marowsky-Bree - # (though it turned out to be an almost complete rewrite) - # -@@ -112,15 +114,6 @@ OCF_RESKEY_require_drbd_module_version_lt_default=9.1.0 - - init_optional_params() - { -- remove_master_score_if_peer_primary=false -- remove_master_score_if_peer_primary_only_if_unexpected=false -- if ocf_is_true ${OCF_RESKEY_remove_master_score_if_peer_primary:=false}; then -- remove_master_score_if_peer_primary=true -- elif [[ ${OCF_RESKEY_remove_master_score_if_peer_primary} = "unexpected" ]]; then -- remove_master_score_if_peer_primary=true -- remove_master_score_if_peer_primary_only_if_unexpected=true -- fi -- - if ocf_is_true ${OCF_RESKEY_fail_promote_early_if_peer_primary:=false}; then - fail_promote_early_if_peer_primary=true - else -@@ -562,35 +555,6 @@ do_drbdadm() { - return $ret - } - --# cached value --unset current_master_score --get_current_master_score() --{ -- # only call crm_master once -- [[ ${current_master_score+set} ]] || -- current_master_score=$(crm_master -q -l reboot -G 2>/dev/null) -- # return value of this function: -- # true if master_score is present -- # false if master_score is not present -- [[ $current_master_score ]] --} -- --set_master_score() { -- # Use quiet mode (-Q) to quench logging. Actual score updates -- # will get logged by attrd anyway -- if [[ $1 -le 0 ]]; then -- remove_master_score -- else -- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 && -- current_master_score=$1 -- fi --} -- --remove_master_score() { -- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D -- current_master_score="" --} -- - source_drbd_shellfuncs() - { - local dir=. -@@ -668,18 +632,11 @@ maybe_outdate_self() - ocf_log notice "outdating $DRBD_RESOURCE: according to OCF_RESKEY_CRM_meta_notify_master_uname, '$host' is still master" - do_drbdadm outdate $DRBD_RESOURCE - -- # on some pacemaker versions, -INFINITY may cause resource instance stop/start. -- # But in this case that is ok, it may even clear the replication link -- # problem. -- set_master_score -INFINITY -- - return 0 - } - - unexpected_primary_rejects_promote() - { -- crm_resource_locate_master -- - : "single master config?" - [[ $OCF_RESKEY_CRM_meta_master_max = 1 ]] || return 1 - : "not primary myself?" # because, if I am, I can no longer reject this... -@@ -691,208 +648,6 @@ unexpected_primary_rejects_promote() - return 0 - } - --removed_master_score_because_peer_is_primary() --{ -- : "remove master score if peer primary?"; $remove_master_score_if_peer_primary || return 1 -- : "primary myself?"; $status_primary && return 1 -- : "some peer primary?"; $status_some_peer_primary || return 1 -- -- if : "SOME peer ALL up-to-date?"; $status_some_peer_all_up_to_date ; then -- # FIXME this should check if that same primary peer has all healthy -- # disks, not if "some" peer has all healthy disks. -- # But I think this option only makes sense in two node setups, -- # so "some" peer becomes "the" peer anyways. -- : "Okay, peer apparently has healthy disks" -- else -- : "peer is primary, but does not look healthy, use regular master score adjustment" -- return 1 -- fi -- -- if : "remove only if unexpected"; $remove_master_score_if_peer_primary_only_if_unexpected; then -- if unexpected_primary_rejects_promote; then -- ## Do not log "err", if this may be intentional (independent clusters), -- ## and this pacemaker was told to not even try to promote -- # case $OCF_RESKEY_CRM_meta_target_role in -- # [Mm]aster|[Ss]tarted|"") -- # -- ## But what if they control it via booth and tickets? -- ## Or other constraints? -- -- # do we even have a master score, currently? -- # logging this with every monitoring interval may be too noisy. -- if get_current_master_score ; then -- ocf_log info "I am connected to a Primary that Pacemaker does not know about! Removing master score." -- remove_master_score -- fi -- return 0 -- fi -- : "not unexpected, no special treatment" -- return 1 -- fi -- -- : "connected to (apparently healthy) Primary peer, do not allow promote" -- remove_master_score -- return 0 --} -- --drbd_update_master_score() { -- set -- $OCF_RESKEY_adjust_master_score -- local only_consistent=$1 only_remote=$2 local_ok=$3 as_good_as_it_gets=$4 -- -- # NOTE -- # there may be constraint scores from rules on role=Master, -- # that in some ways can add to the node attribute based master score we -- # specify below. If you think you want to add personal preferences, -- # in case the scores given by this RA do not suffice, this is the -- # value space you can work with: -- # -INFINITY: Do not promote. Really. Won't work anyways. -- # Too bad, at least with current (Oktober 2009) Pacemaker, -- # negative master scores cause instance stop; restart cycle :( -- # missing, zero: Do not promote. -- # I think my data is not good enough. -- # Though, of course, you may try, and it might even work. -- # 5: please, do not promote, unless this is your only option. -- # 10: promotion is probably a bad idea, our local data is no good, -- # you'd probably run into severe performance problems, and risk -- # application crashes or blocking IO in case you lose the -- # replication connection. -- # 1000: Ok to be promoted, we have good data locally (though we don't -- # know about the peer, so possibly it has even better data?). -- # You sould use the crm-fence-peer.sh handler or similar -- # mechanism to avoid data divergence. -- # 10000: Please promote me/keep me Primary. -- # I'm confident that my data is as good as it gets. -- # -- # TODO: separately configure the master score for diskless clients -- # For now: if it is "intentionally" diskless, and has access to -- # remote UpToDate, consider it slighly worse than "local_ok". -- # -- if : "have quorum?"; $status_have_quorum ; then -- : "quorate, evaluate status in more detail below" -- else -- : "NOT quorate, should not be master." -- remove_master_score -- return -- fi -- -- # I'd like to remove the master score, if we find ourselves be -- # connected to an "unexpected" primary: -- # # unexpected_primary_rejects_promote && remove_master_score -- # -- # BUT. -- # Given bad timing, DRBD may still think it is connected -- # but pacemaker already knows the peer is dead. -- # If now a "monitor" squeezes in between "peer known dead" -- # and the soon to be expected "promote", while DRBD still thinks it was -- # connected to a Primary (likely optimistically waiting for generously -- # configured internal timeouts), if we remove the master score from -- # this monitor action, we delay the failover for up to -- # time-for-DRBD-internals-to-declare-peer-dead -- # plus one extra monitor interval. -- # -- # So at least don't do that by default, check for -- # remove_master_score_if_peer_primary and -- # remove_master_score_if_peer_primary_only_if_unexpected -- # -- if removed_master_score_because_peer_is_primary ; then -- return -- fi -- -- if : "diskless client?"; $status_diskless_client ; then -- if : "primary and access to good data?" ; -- $status_primary && $status_some_peer_all_up_to_date; then -- -- set_master_score $(( as_good_as_it_gets -1 )) -- elif : "ALL peer-disks up-to-date?"; $status_pdsk_all_up_to_date; then -- set_master_score $(( as_good_as_it_gets -1 )) -- elif : "SOME peer-disks up-to-date?"; $status_some_peer_all_up_to_date ; then -- set_master_score $(( local_ok - 1 )) -- else : "Diskless client, without access to good data :(" -- remove_master_score -- fi -- -- elif : "all disks up-to-date?"; $status_disk_all_up_to_date ; then -- -- if : "primary?" ; $status_primary ; then -- -- # I am Primary, all local disks are UpToDate -- set_master_score $as_good_as_it_gets -- -- if : "all peer-disks up-to-date?"; $status_pdsk_all_up_to_date; then -- # I am Primary, all local disks are UpToDate, -- # AND all peer disks are UpToDate -- : == DEBUG == unfence_if_all_uptodate=$unfence_if_all_uptodate -- $unfence_if_all_uptodate && call_unfence -- -- # else: not so sure about the peer's disks -- fi -- else : "Not primary." -- if : "any peer-disk unknown?"; $status_pdsk_any_unknown ; then -- # all local disks are UpToDate, -- # but I'm not Primary, -- # and I'm not sure about some peer's disk state(s). -- # We may need to outdate ourselves? -- # But if we outdate in a MONITOR, and are disconnected -- # secondary because of a hard primary crash, before CRM noticed -- # that there is no more master, we'd make us utterly useless! -- # Trust that the primary will also notice the disconnect, -- # and will place an appropriate fencing constraint via -- # its fence-peer handler callback. -- set_master_score $local_ok -- else : "all peer disk states known." -- # We know something about our peer, which means that either the -- # replication link is established, or it was not even -- # consistent last time we talked to each other. -- # Also all our local disks are UpToDate, which means even if we are -- # currently synchronizing, we do so as SyncSource. -- set_master_score $as_good_as_it_gets -- fi -- fi -- -- elif : "some peer with all peer-disks up-to-date?" ; $status_some_peer_all_up_to_date ; then -- -- # At least one of our local disks is not up to date. -- # But at least one of our peers is ALL OK. -- # We can expect to have access to useful -- # data, but with possibly degraded performance, -- # (some) reads need to fetch from the peer. -- set_master_score $only_remote -- -- elif : "in transitional state?"; $status_disk_transitional_state ; then -- # some transitional state. -- # just don't do anything -- : "ignore" -- -- elif : "all disks consistent?" ; $status_disk_all_consistent ; then -- # All local disks seem to be Consistent. -- # They _may_ be up to date, or not. -- # We hope that fencing mechanisms have put constraints in -- # place, so we won't be promoted with stale data. -- # But in case this was a cluster crash, -- # at least allow _someone_ to be promoted. -- set_master_score $only_consistent -- -- else # not $status_disk_all_consistent and not $status_disk_transitional_state -- -- # ALWAYS put the cluster in MAINTENANCE MODE -- # if you add a volume to a live replication group, -- # because the new volume will typically come up as Inconsistent -- # the first time, which would cause a monitor to revoke the -- # master score! -- # -- # At least some of our local disks are not really useable. -- # Our peer is not all good either (or some previous case block -- # would have matched). We have no access to useful data. -- # DRBD would refuse to be promoted, anyways. -- # -- # set_master_score -INFINITY -- # Too bad, at least with current (Oktober 2009) Pacemaker, -- # negative master scores cause instance stop; restart cycle :( -- # Hope that this will suffice. -- remove_master_score -- fi --} -- - is_drbd_enabled() { - test -f /proc/drbd - } -@@ -939,6 +694,139 @@ drbd_status() { - return $rc - } - -+drbd_condition() { -+ local status -+ local rc -+ -+ status=$1 -+ rc=$status -+ -+ if [ $status -ne $OCF_SUCCESS -a $status -ne $OCF_RUNNING_MASTER ] -+ then -+ return $rc -+ fi -+ -+ drbd_set_status_variables -+ -+ ocf_log info "${OCF_RESKEY_drbd_resource} ${DRBD_ROLE_LOCAL}/${DRBD_DSTATE_LOCAL}/${DRBD_DSTATE_REMOTE} ${DRBD_CSTATE}" -+ -+ case "${DRBD_DSTATE_LOCAL}" in -+ UpToDate) -+ case "${DRBD_CSTATE}" in -+ StandAlone) -+ rc=$OCF_DATA_STANDALONE -+ ocf_log info "${OCF_RESKEY_drbd_resource} standalone, attempting to reconnect." -+ do_drbdadm connect ${OCF_RESKEY_drbd_resource} -+ ;; -+ StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \ -+ PausedSyncT) -+ rc=$OCF_DATA_SYNC -+ #drbd-overview | grep -A 1 drbd-cgcs | grep sync\'ed | cut -f2,3 -d' ' -+ ocf_log info "${OCF_RESKEY_drbd_resource} syncing" -+ ;; -+ *) -+ ;; -+ esac -+ ;; -+ Consistent) -+ case "${DRBD_CSTATE}" in -+ StandAlone) -+ rc=$OCF_DATA_STANDALONE -+ ocf_log info "${OCF_RESKEY_drbd_resource} standalone, attempting to reconnect" -+ do_drbdadm connect ${OCF_RESKEY_drbd_resource} -+ ;; -+ *) -+ rc=$OCF_DATA_CONSISTENT -+ ocf_log info "${OCF_RESKEY_drbd_resource} consistent" -+ ;; -+ esac -+ ;; -+ Outdated) -+ case "${DRBD_CSTATE}" in -+ StandAlone) -+ rc=$OCF_DATA_STANDALONE -+ if [ $status -eq $OCF_SUCCESS ] -+ then -+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated standalone, attempting to reconnect." -+ do_drbdadm -- --discard-my-data connect ${OCF_RESKEY_drbd_resource} -+ else -+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated" -+ fi -+ ;; -+ *) -+ rc=$OCF_DATA_OUTDATED -+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated" -+ esac -+ ;; -+ Inconsistent) -+ case "${DRBD_CSTATE}" in -+ StandAlone) -+ rc=$OCF_DATA_STANDALONE -+ if [ $status -eq $OCF_SUCCESS ] -+ then -+ ocf_log info "${OCF_RESKEY_drbd_resource} standby standalone, attempting to reconnect." -+ do_drbdadm connect ${OCF_RESKEY_drbd_resource} -+ else -+ ocf_log info "${OCF_RESKEY_drbd_resource} standalone" -+ fi -+ ;; -+ StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \ -+ PausedSyncT) -+ rc=$OCF_DATA_SYNC -+ ocf_log info "${OCF_RESKEY_drbd_resource} sync" -+ ;; -+ *) -+ rc=$OCF_DATA_INCONSISTENT -+ ocf_log info "${OCF_RESKEY_drbd_resource} inconsistent" -+ ;; -+ esac -+ ;; -+ *) -+ case "${DRBD_CSTATE}" in -+ StandAlone) -+ rc=$OCF_DATA_STANDALONE -+ ocf_log info "${OCF_RESKEY_drbd_resource} standalone" -+ ;; -+ StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \ -+ PausedSyncT) -+ rc=$OCF_DATA_SYNC -+ ocf_log info "${OCF_RESKEY_drbd_resource} sync" -+ ;; -+ *) -+ rc=$OCF_DATA_INCONSISTENT -+ ocf_log info "${OCF_RESKEY_drbd_resource} inconsistent" -+ ;; -+ esac -+ ;; -+ esac -+ -+ if [ $status -eq $OCF_RUNNING_MASTER ] -+ then -+ if [ $rc -eq $OCF_DATA_INCONSISTENT ] -+ then -+ rc=$OCF_RUNNING_MASTER_DATA_INCONSISTENT -+ -+ elif [ $rc -eq $OCF_DATA_OUTDATED ] -+ then -+ rc=$OCF_RUNNING_MASTER_DATA_OUTDATED -+ -+ elif [ $rc -eq $OCF_DATA_CONSISTENT ] -+ then -+ rc=$OCF_RUNNING_MASTER_DATA_CONSISTENT -+ -+ elif [ $rc -eq $OCF_DATA_SYNC ] -+ then -+ rc=$OCF_RUNNING_MASTER_DATA_SYNC -+ -+ elif [ $rc -eq $OCF_DATA_STANDALONE ] -+ then -+ rc=$OCF_RUNNING_MASTER_DATA_STANDALONE -+ fi -+ fi -+ -+ return $rc -+} -+ - # I'm sorry, but there is no $OCF_DEGRADED_MASTER or similar yet. - drbd_monitor() { - local status -@@ -954,7 +842,8 @@ drbd_monitor() { - # --- - : "do nothing" ; - else -- drbd_update_master_score -+ drbd_condition $status -+ status=$? - fi - - case $status in -@@ -976,17 +865,6 @@ drbd_monitor() { - return $status - } - --called_crm_resource_locate=false --crm_resource_locate_master() --{ -- $called_crm_resource_locate && return -- called_crm_resource_locate=true -- DRBD_PRIMARY_PEER_according_to_pcmk=$( -- crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate 2>/dev/null | -- sed -ne 's/^.*is running on: \([^ ]*\) Master.*$/\1/p' | -- grep -vix -m1 -e "$HOSTNAME") --} -- - figure_out_drbd_peer_uname() - { - # depending on whether or not the peer is currently -@@ -1002,7 +880,6 @@ figure_out_drbd_peer_uname() - $OCF_RESKEY_CRM_meta_notify_demote_uname | - grep -vix -m1 -e "$HOSTNAME" ) - DRBD_TO_PEER=${x:+ --peer $x} -- crm_resource_locate_master - } - - my_udevsettle() -@@ -1020,6 +897,7 @@ my_udevsettle() - trap - TERM - return 0 - } -+ - create_device_udev_settle() - { - local dev -@@ -1129,7 +1007,8 @@ drbd_start() - # this is probably dead code. - # Also, ignore the exit code of adjust, as we are - # "running" already, anyways, right? -- rc=$OCF_SUCCESS -+ drbd_condition $OCF_SUCCESS -+ rc=$? - $connect_only_after_promote && break - do_connect - drbd_set_status_variables -@@ -1166,9 +1045,6 @@ drbd_start() - $first_try || sleep 1 - first_try=false - done -- # in case someone does not configure monitor, -- # we must at least call it once after start. -- drbd_update_master_score - - return $rc - } -@@ -1187,14 +1063,13 @@ drbd_reload() { - # Adjust resource just in case reload was requested manually - # Changes to resource parameters do not require this - do_drbdadm adjust $DRBD_RESOURCE -- rc=$OCF_SUCCESS -+ drbd_condition $OCF_SUCCESS -+ rc=$? - ;; - $OCF_NOT_RUNNING) - : - ;; - esac -- # Update score as adjust_master_score may be changed -- drbd_update_master_score - - return $rc - } -@@ -1217,7 +1092,6 @@ drbd_promote() { - if ! $first_try && unexpected_primary_rejects_promote ; then - if $fail_promote_early_if_peer_primary ; then - drbd_ocf_exit_reason "Peer node already/still Primary" -- remove_master_score - break - else - ocf_log info "Peer node already/still Primary, promote will likely fail or need several attempts. Retrying anyways." -@@ -1239,7 +1113,8 @@ drbd_promote() { - break - ;; - $OCF_RUNNING_MASTER) -- rc=$OCF_SUCCESS -+ drbd_condition $OCF_SUCCESS -+ rc=$? - if $connect_only_after_promote; then - figure_out_drbd_peer_uname - do_drbdadm $DRBD_TO_PEER -v adjust $DRBD_RESOURCE -@@ -1274,7 +1149,8 @@ drbd_demote() { - status=$? - case "$status" in - $OCF_SUCCESS) -- rc=$OCF_SUCCESS -+ drbd_condition $OCF_SUCCESS -+ rc=$? - break - ;; - $OCF_NOT_RUNNING) -@@ -1316,7 +1192,21 @@ drbd_stop() { - ;; - $OCF_RUNNING_MASTER) - ocf_log warn "$DRBD_RESOURCE still Primary, demoting." -- do_drbdadm secondary $DRBD_RESOURCE -+ found=no -+ for dev in ${DRBD_DEVICES[@]} ""; do -+ cat /proc/mounts | grep -q "^${dev} " -+ if [ $? -eq 0 ]; then -+ ocf_log warn "${DRBD_RESOURCE} is still mounted via $dev" -+ found=yes -+ break -+ fi -+ done -+ if [ "${found}" = "yes" ]; then -+ ocf_log warn "Waiting to drop $DRBD_RESOURCE" -+ else -+ ocf_log warn "Dropping $DRBD_RESOURCE to Secondary" -+ do_drbdadm secondary $DRBD_RESOURCE -+ fi - esac - $first_try || sleep 1 - first_try=false -@@ -1326,14 +1216,9 @@ drbd_stop() { - # outdate myself in drbd on-disk meta data. - maybe_outdate_self - -- # do not let old master scores laying around. -- # they may confuse crm if this node was set to standby. -- remove_master_score -- - return $rc - } - -- - drbd_notify() { - local n_type=$OCF_RESKEY_CRM_meta_notify_type - local n_op=$OCF_RESKEY_CRM_meta_notify_operation -@@ -1370,7 +1255,6 @@ drbd_notify() { - # After something has been done is a good time to - # recheck our status: - drbd_set_status_variables -- drbd_update_master_score - - if : "any unknown peer device?"; $status_pdsk_any_unknown ; then - # Still not properly communicating. -@@ -1402,27 +1286,6 @@ ls_stat_is_block_maj_147() { - [[ $1 = b* ]] && [[ $5 == 147,* ]] - } - --check_crm_feature_set() --{ -- set -- ${OCF_RESKEY_crm_feature_set//[!0-9]/ } -- local a=${1:-0} b=${2:-0} c=${3:-0} -- -- (( a > 3 )) || -- (( a == 3 && b > 0 )) || -- (( a == 3 && b == 0 && c > 0 )) || -- ocf_log warn "You may be disappointed: This RA is intended for pacemaker 1.0 or better!" -- -- PCMK_OCF_DEGRADED=$OCF_SUCCESS -- PCMK_OCF_DEGRADED_MASTER=$OCF_RUNNING_MASTER -- -- ## pacemaker since crm_feature_set 3.0.10 knows about "degraded" states. -- ## But it does not work yet, because LRMD filters the exit codes... -- # if (( a > 3 )) || (( a == 3 && b > 0 )) || (( a == 3 && b == 0 && c >= 10 )); then -- # PCMK_OCF_DEGRADED=190 -- # PCMK_OCF_DEGRADED_MASTER=191 -- # fi --} -- - require_drbd_module_version() - { - local v k op version_code -@@ -1489,7 +1352,6 @@ _drbd_validate_all () { - DRBD_HAS_EVENTS2=true - DRBD_IS_v9=true - fi -- check_crm_feature_set - - if [[ $__OCF_ACTION != stop ]] ; then - meta_expect clone-node-max = 1 || return -@@ -1573,7 +1435,6 @@ _drbd_validate_all () { - # hm. probably misconfigured constraint somewhere. - # sorry. don't retry anywhere. - drbd_ocf_exit_reason "%s" "DRBD resource ${DRBD_RESOURCE} not found in configuration file ${OCF_RESKEY_drbdconf}." -- remove_master_score - : "$OCF_ERR_INSTALLED = OCF_ERR_INSTALLED" - return $OCF_ERR_INSTALLED - fi -@@ -1611,16 +1472,6 @@ _drbd_validate_all () { - fi - esac - -- local i j n=0 fallback=false -- for i in $OCF_RESKEY_adjust_master_score; do -- [[ $i = *[!0-9]* ]] && fallback=true && ocf_log err "BAD adjust_master_score value $i ; falling back to default" -- [[ $j && $i -lt $j ]] && fallback=true && ocf_log err "BAD adjust_master_score value $j > $i ; falling back to default" -- j=$i -- n=$(( n+1 )) -- done -- [[ $n != 4 ]] && fallback=true && ocf_log err "Not enough adjust_master_score values ($n != 4); falling back to default" -- $fallback && OCF_RESKEY_adjust_master_score=$OCF_RESKEY_adjust_master_score_default -- - # we use it in various places, - # just make sure it contains what we expect. - HOSTNAME=`uname -n` diff --git a/filesystem/drbd/drbd-tools/centos/patches/0003_915-avoid-kernel-userspace-version-check.patch b/filesystem/drbd/drbd-tools/centos/patches/0003_915-avoid-kernel-userspace-version-check.patch deleted file mode 100644 index da7bff7fc..000000000 --- a/filesystem/drbd/drbd-tools/centos/patches/0003_915-avoid-kernel-userspace-version-check.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/user/v84/drbdadm_usage_cnt.c b/user/v84/drbdadm_usage_cnt.c -index 53bc9bc..0bd2ff3 100644 ---- a/user/v84/drbdadm_usage_cnt.c -+++ b/user/v84/drbdadm_usage_cnt.c -@@ -244,37 +244,7 @@ static int vcs_ver_cmp(struct vcs_rel *rev1, struct vcs_rel *rev2) - - void warn_on_version_mismatch(void) - { -- char *msg; -- int cmp; -- -- /* get the kernel module version from /proc/drbd */ -- vcs_get_current(); -- -- /* get the userland version from PACKAGE_VERSION */ -- vcs_get_userland(); -- -- cmp = vcs_ver_cmp(&userland_version, ¤t_vcs_rel); -- /* no message if equal */ -- if (cmp == 0) -- return; -- if (cmp > 0xffff || cmp < -0xffff) /* major version differs! */ -- msg = "mixing different major numbers will not work!"; -- else if (cmp < 0) /* userland is older. always warn. */ -- msg = "you should upgrade your drbd tools!"; -- else if (cmp & 0xff00) /* userland is newer minor version */ -- msg = "please don't mix different DRBD series."; -- else /* userland is newer, but only differ in sublevel. */ -- msg = "preferably kernel and userland versions should match."; -- -- fprintf(stderr, "DRBD module version: %u.%u.%u\n" -- " userland version: %u.%u.%u\n%s\n", -- current_vcs_rel.version.major, -- current_vcs_rel.version.minor, -- current_vcs_rel.version.sublvl, -- userland_version.version.major, -- userland_version.version.minor, -- userland_version.version.sublvl, -- msg); -+ return; - } - - void add_lib_drbd_to_path(void) diff --git a/filesystem/drbd/drbd-tools/centos/patches/0004_915-Increase-short-cmd-timeout-to-15-secs.patch b/filesystem/drbd/drbd-tools/centos/patches/0004_915-Increase-short-cmd-timeout-to-15-secs.patch deleted file mode 100644 index 25dbc5c92..000000000 --- a/filesystem/drbd/drbd-tools/centos/patches/0004_915-Increase-short-cmd-timeout-to-15-secs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/scripts/global_common.conf b/scripts/global_common.conf -index a916b70..9797275 100644 ---- a/scripts/global_common.conf -+++ b/scripts/global_common.conf -@@ -13,6 +13,7 @@ global { - - # minor-count dialog-refresh disable-ip-verification - # cmd-timeout-short 5; cmd-timeout-medium 121; cmd-timeout-long 600; -+ cmd-timeout-short 15; - } - - common { diff --git a/filesystem/drbd/drbd-tools/centos/patches/0005_915-drbd-overview.patch b/filesystem/drbd/drbd-tools/centos/patches/0005_915-drbd-overview.patch deleted file mode 100644 index 50cbeaae9..000000000 --- a/filesystem/drbd/drbd-tools/centos/patches/0005_915-drbd-overview.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/scripts/Makefile.in b/scripts/Makefile.in -index fc2e597..911ae7b 100644 ---- a/scripts/Makefile.in -+++ b/scripts/Makefile.in -@@ -102,6 +102,7 @@ endif - $(LN_S) -f notify.sh notify-emergency-reboot.sh ;\ - $(LN_S) -f notify.sh notify-emergency-shutdown.sh ;\ - $(LN_S) -f notify.sh notify-out-of-sync.sh; ) -+ install -m 755 drbd-overview.pl $(DESTDIR)$(sbindir)/drbd-overview - ifeq ($(DISTRO),debian) - @ echo "Don't forget to run update-rc.d" - else -diff --git a/scripts/drbd-overview.pl b/scripts/drbd-overview.pl -index 3d2a397..22abdf4 100755 ---- a/scripts/drbd-overview.pl -+++ b/scripts/drbd-overview.pl -@@ -413,8 +413,6 @@ eval { - warn "unrecognized value for --color" unless $use_colors =~ /^[01]$/; - }; - --print STDERR "NOTE: drbd-overview will be deprecated soon.\nPlease consider using drbdtop.\n\n"; -- - open STDERR, "/dev/null" - if $stderr_to_dev_null; - diff --git a/filesystem/parted/centos/build_srpm.data b/filesystem/parted/centos/build_srpm.data deleted file mode 100644 index 9abfcc827..000000000 --- a/filesystem/parted/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="files/resizepart.sh" -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_SLOW=5 diff --git a/filesystem/parted/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/filesystem/parted/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 1694ab475..000000000 --- a/filesystem/parted/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 296b76674e19cfed71b77735f38c158b41a991b1 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Tue, 14 Aug 2018 02:57:08 +0800 -Subject: [PATCH] Update package versioning for TIS format - -Signed-off-by: zhipengl ---- - SPECS/parted.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/parted.spec b/SPECS/parted.spec -index 9316ebe..a79b888 100644 ---- a/SPECS/parted.spec -+++ b/SPECS/parted.spec -@@ -4,7 +4,7 @@ - Summary: The GNU disk partition manipulation program - Name: parted - Version: 3.1 --Release: 29%{?dist} -+Release: 29.el7%{?_tis_dist}.%{tis_patch_ver} - License: GPLv3+ - Group: Applications/System - URL: http://www.gnu.org/software/parted --- -2.7.4 - diff --git a/filesystem/parted/centos/meta_patches/0003-fix-dev-nodes-getting-removed-for-100-to-300-ms-on-p.patch b/filesystem/parted/centos/meta_patches/0003-fix-dev-nodes-getting-removed-for-100-to-300-ms-on-p.patch deleted file mode 100644 index 6632b8d7f..000000000 --- a/filesystem/parted/centos/meta_patches/0003-fix-dev-nodes-getting-removed-for-100-to-300-ms-on-p.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 46b23c8cc8fffa24557cddf8507b8717c43b9171 Mon Sep 17 00:00:00 2001 -From: Ovidiu Poncea -Date: Fri, 2 Mar 2018 17:22:52 +0200 -Subject: [PATCH 3/3] - fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch - ---- - SPECS/parted.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/parted.spec b/SPECS/parted.spec -index a79b888..f8c2969 100644 ---- a/SPECS/parted.spec -+++ b/SPECS/parted.spec -@@ -13,6 +13,7 @@ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz - Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig - Source2: pubkey.jim.meyering - Source3: resizepart.sh -+Source4: fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch - - Patch0: parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch - Patch1: parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch -@@ -67,6 +68,7 @@ Patch47: 0047-tests-excersise-resize-command.patch - Patch48: 0048-parted-add-resizepart-command.patch - # WRS - Patch49: syscalls.patch -+Patch50: fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch - - Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: e2fsprogs-devel --- -2.7.4 - diff --git a/filesystem/parted/centos/meta_patches/0004-enable-device-mapper.patch b/filesystem/parted/centos/meta_patches/0004-enable-device-mapper.patch deleted file mode 100644 index 9a5d5ccec..000000000 --- a/filesystem/parted/centos/meta_patches/0004-enable-device-mapper.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e71f9f283f741d259f1f6ff892bf90e64c1440d8 Mon Sep 17 00:00:00 2001 -From: Joao Pedro Alexandroni - -Date: Mon, 23 May 2022 08:47:24 -0300 -Subject: [PATCH] enable device mapper - -Signed-off-by: Joao Pedro Alexandroni ---- - SPECS/parted.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/parted.spec b/SPECS/parted.spec -index f8c2969..678fed6 100644 ---- a/SPECS/parted.spec -+++ b/SPECS/parted.spec -@@ -133,7 +133,7 @@ git commit -a -m "run iconv" - autoreconf - autoconf - CFLAGS="$RPM_OPT_FLAGS -Wno-unused-but-set-variable"; export CFLAGS --%configure --enable-selinux --disable-static --disable-device-mapper -+%configure --enable-selinux --disable-static --enable-device-mapper - # Don't use rpath! - %{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool - %{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool --- -2.17.1 - diff --git a/filesystem/parted/centos/meta_patches/PATCH_ORDER b/filesystem/parted/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index a369182ac..000000000 --- a/filesystem/parted/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,4 +0,0 @@ -syscalls.patch -0001-Update-package-versioning-for-TIS-format.patch -0003-fix-dev-nodes-getting-removed-for-100-to-300-ms-on-p.patch -0004-enable-device-mapper.patch diff --git a/filesystem/parted/centos/meta_patches/syscalls.patch b/filesystem/parted/centos/meta_patches/syscalls.patch deleted file mode 100644 index f5f93f8e3..000000000 --- a/filesystem/parted/centos/meta_patches/syscalls.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 58d86a82323f838bb6169423fb3dd958bb92c147 Mon Sep 17 00:00:00 2001 -From: Kristine Bujold -Date: Wed, 21 Dec 2016 15:28:53 -0500 -Subject: [PATCH 1/3] WRS: syscalls.patch - ---- - SPECS/parted.spec | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/SPECS/parted.spec b/SPECS/parted.spec -index 1f453cb..9316ebe 100644 ---- a/SPECS/parted.spec -+++ b/SPECS/parted.spec -@@ -12,6 +12,7 @@ URL: http://www.gnu.org/software/parted - Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz - Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig - Source2: pubkey.jim.meyering -+Source3: resizepart.sh - - Patch0: parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch - Patch1: parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch -@@ -64,6 +65,8 @@ Patch45: 0045-parted-Add-stub-resize-command-for-backward-compatib.patch - Patch46: 0046-libparted-Backport-partition-resize-code.patch - Patch47: 0047-tests-excersise-resize-command.patch - Patch48: 0048-parted-add-resizepart-command.patch -+# WRS -+Patch49: syscalls.patch - - Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: e2fsprogs-devel -@@ -128,7 +131,7 @@ git commit -a -m "run iconv" - autoreconf - autoconf - CFLAGS="$RPM_OPT_FLAGS -Wno-unused-but-set-variable"; export CFLAGS --%configure --enable-selinux --disable-static -+%configure --enable-selinux --disable-static --disable-device-mapper - # Don't use rpath! - %{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool - %{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -@@ -157,6 +160,9 @@ popd - - %find_lang %{name} - -+# WRS -+install -d %{buildroot}%{_sbindir} -+install -m 755 %{SOURCE3} %{buildroot}%{_sbindir}/resizepart.sh - - %check - export LD_LIBRARY_PATH=$(pwd)/libparted/.libs -@@ -192,6 +198,9 @@ fi - %{_libdir}/libparted-fs-resize.so* - %{_infodir}/parted.info.gz - -+# WRS -+%{_sbindir}/resizepart.sh -+ - %files devel - %defattr(-,root,root,-) - %{_includedir}/parted --- -2.7.4 - diff --git a/filesystem/parted/centos/patches/fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch b/filesystem/parted/centos/patches/fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch deleted file mode 100644 index dafaa85b5..000000000 --- a/filesystem/parted/centos/patches/fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch +++ /dev/null @@ -1,494 +0,0 @@ -From 2fc5cefc48c294b25dbd5dc1e533c7d12508289a Mon Sep 17 00:00:00 2001 -From: Phillip Susi -Date: Sun, 14 Oct 2012 23:59:58 -0400 -Subject: [PATCH] 'parted -s print' causes device nodes to be - deleted from /dev for ~100-300ms - -The main problem is that, immediately after 'parted print', device -nodes for block devices that exist are deleted for brief moments of time then -are readded by udev. This causes commands accessing these nodes to fail. -Although probability of this happening is small (after mount, partitions no -longer disappear), it can cause critical error as we now believe to have -happened in CGTS-8785 (ceph tried to configure an OSD at exactly the moment -parted was gathering info). - -To fix this the following commit where patched from upstream: -0. f0c0d53f998964e187f59de32ac92a2c0e2d5da9 libparted: refactor device-mapper partition sync code -1. 5910f1bc983fbab31f9ec86a7166feee4869c21a libparted: avoid disturbing partitions -2. 026736e9fed89ef00e6e6e84c7e422639ac2715c libparted: sync partitions > 16 -3. 9e07d797b18609613c53ceb2dabbb5e69d961186 libparted: remove old partitions *first* before adding new ones -4. dfdd8b0dd99b7fa990f40a3d3a225c5b3ef13c57 libparted: remove all old partitions, even if new label allows less -5. 7feb3b452c5ae57e75e16f8c00f46c9aa564a4cc libparted: don't create partition on loop label -6. 7e87ca3c531228d35e13e802d2622006138b104c libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER -7. 7cde99849ed321da2712248bc27c14a954d6b481 libparted: give correct partition device name on loop labels - -The most important is commit #1. Commit #0 is a prerequisite and the rest are bug fixes introduced by them. - -Details: - -libparted: refactor device-mapper partition sync code - -The device-mapper partition sync code was still using the remove all -partitions, then add new partitions method. Refactor to use the same -algorithm as regular disks: try to remove all, and ignore any that could -not be removed but have not changed. - -Conflicts: - NEWS - libparted/arch/linux.c - tests/Makefile.am - -libparted: avoid disturbing partitions - -The partition sync logic was first removing all -partitions, then trying to re-add them. This resulted in many -udev events triggering annoying behavior like auto mounting. -Refactor the code to avoid removing and re-adding unmodified -partitions. - -Conflicts: - NEWS - -libparted: sync partitions > 16 - -The linux partition sync code was hard coded to only flush -the first 16 partitions. - -Conflicts: - NEWS - libparted/arch/linux.c - -libparted: remove old partitions *first* before adding new ones - -"libparted: avoid disturbing partitions" put the remove of the old -partition in second pass. If you simultaneously removed partitions 1 -and 2, and created a new partition #1 that overlapped the previous second -partition, the sync would fail because it would try to create the new, -larger partition #1 before removing the old partition #2. - -Conflicts: - libparted/arch/linux.c - -libparted: remove all old partitions, even if new label allows less - -We were limiting partition sync operations to the lesser number allowed -by the device, or the label. This meant that when creating a new label -over an old label that had more partitions than the new one allows, the -higher partitions would not be removed. Use the greater of the two values -for the remove pass, and the lesser for the add. - -Conflicts: - NEWS - -libparted: don't create partition on loop label - -The loop label represents an unpartitioned disk, but creates -a dummy partition to represent the whole disk. This dummy partition -was actually being loaded into the kernel. Don't do that. - -Conflicts: - NEWS - -libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER - -Signed-off-by: Brian C. Lane - -libparted: give correct partition device name on loop labels - -ped_partition_get_path() was returning "/dev/foo1" instead of -"/dev/foo" on loop labels. This caused gparted to run tools like mkfs on -a device node that did not actually exist. - -Conflicts: - NEWS ---- - NEWS | 94 +++++++++++++++++++++++++++++++-- - libparted/arch/linux.c | 24 +++++---- - tests/Makefile.am | 2 + - tests/t1104-remove-and-add-partition.sh | 50 ++++++++++++++++++ - tests/t6010-dm-busy.sh | 92 ++++++++++++++++++++++++++++++++ - 5 files changed, 249 insertions(+), 13 deletions(-) - create mode 100644 tests/t1104-remove-and-add-partition.sh - create mode 100644 tests/t6010-dm-busy.sh - -diff --git a/NEWS b/NEWS -index 62d6381..c78ee9e 100644 ---- a/NEWS -+++ b/NEWS -@@ -7,10 +7,98 @@ GNU parted NEWS -*- outline -*- - - * Noteworthy changes in release 3.1-18 (2014-08-12) [RHEL7.1] - --** New features -+** New Features -+ -+ You can now choose to ignore errors about partitions that overlap, -+ or are longer than the disk. This allows you to use parted to -+ repair the problem. -+ -+** Bug Fixes -+ -+ libparted: ped_partition_get_path() was returning "/dev/foo1" instead -+ of "/dev/foo" for loop labels. -+ -+ partprobe: when called on a disk that has become a loop label, -+ remove any partitions left over from a previous label. -+ -+ libparted: The loop label represents an unpartitioned disk, but creates -+ a dummy partition to represent the whole disk. This dummy partition -+ was actually being loaded into the kernel. Don't do that. -+ -+ libparted: fix loop labels to not vanish if you don't create -+ a filesystem, and to not return an error syncing when you do. -+ -+ libparted: remove all old partitions, even if new label does not allow -+ as many. -+ -+ libparted: fat and ntfs boot sectors were misdetected as dos -+ partition tables instead of being treated as a loop label. -+ -+ libparted: previously if you chose to ignore the warning about -+ the gpt thinking the disk was smaller than it appears to be on -+ on disk, subsequent warnings on other disks would be suppressed. -+ Now parted will warn once per disk. -+ -+ Fix filesystem detection on non 512 byte sector sizes -+ -+ Fix linux partition sync code to flush partitions > 16 -+ -+ Do not reject a FAT boot sector as invalid because it has no -+ system ID string. -+ -+ libparted: /dev/md/ symlink can change after libparted dereferences it, -+ instead it should just use the symlink as given by the caller in the -+ same way we do with /dev/mapper/. -+ -+ libparted: On multipath systems new partitions would sometimes not -+ appear, reporting 'device-mapper: create ioctl failed: Device or -+ resource busy' until the system was rebooted. Added dm_udev_wait -+ calls to synchronize parted with udev. -+ -+ Fix help text for disk_{set,toggle} to show *disk* flags instead -+ of partition flags. -+ -+ Fix gpt to correctly handle non ASCII charcters in partition names -+ -+ If a drive was 100 times an even multiple of two, sizes specified as -+ a percentage would trigger the exact placement rule and refuse to round -+ to the nearest half percent. -+ -+ Avoid generating udev add/remove events for all unmodified partitions -+ when writing a new table. -+ -+ Fix cache coherency issue by flushing partition block devices. -+ This had been mistakenly disabled in parted 2.0, and resulted -+ in parted sometimes identifying the previous filesystem type -+ after running an mkfs to format a partition to a new type. -+ -+ libparted: fix gpt end of disk handling. Previously if the backup -+ copy of the gpt was not at the end of the disk and you chose to -+ ignore this error, parted would move it to the end of the disk -+ anyhow. It will now leave the backup in the same location if -+ you chose to ignore this error. -+ -+ libparted: handle logical partitions starting immediately after -+ the EBR. Creating a logical partition one sector after the EBR -+ used to cause parted to complain that it could not inform the -+ kernel of the changes, but after a reboot, everything was fine. -+ Parted will now correctly inform the kernel of the changes, but -+ only set the length of the extended partition to 1 sector instead -+ of two, which would cause it to overlap the logical partition. -+ -+ parted: fix EOF and ctrl-c handling. parted used to refuse to exit -+ in response to ctrl-c and would get stuck in an infinite loop -+ prompting for more input when it reached EOF on stdin. -+ -+ libparted: Don't fail to manipulate partitions on dmraid disks that -+ have other partitions in use. - -- Add support for prep flag to GPT to select PowerPC Reference Platform -- boot partition type. -+ libparted: mac: a MAC partition table could have a block_size larger -+ than the one the kernel told us about. Upon reading that partition -+ table, libparted would ask if it's ok to use the larger block size. -+ If you were to respond in the affirmative, libparted would read the -+ larger number of bytes into a buffer of the shorter length, -+ overrunning it. - - * Noteworthy changes in release 3.1-16 (2014-01-22) [RHEL7] - -diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 27f706b..de63118 100644 ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -48,6 +48,7 @@ - #include "../architecture.h" - #include "dirname.h" - #include "xstrtol.h" -+#include "xalloc.h" - - #if ENABLE_NLS - # include -@@ -286,7 +287,7 @@ struct blkdev_ioctl_param { - /* Maximum number of partitions supported by linux. */ - #define MAX_NUM_PARTS 64 - --static char* _device_get_part_path (PedDevice* dev, int num); -+static char* _device_get_part_path (PedDevice const *dev, int num); - static int _partition_is_mounted_by_path (const char* path); - static unsigned int _device_get_partition_range(PedDevice const* dev); - static int _device_open (PedDevice* dev, int flags); -@@ -1521,8 +1522,8 @@ linux_is_busy (PedDevice* dev) - return 0; - } - --/* we need to flush the master device, and with kernel < 2.6 all the partition -- * devices, because there is no coherency between the caches with old kernels. -+/* we need to flush the master device, and all the partition devices, -+ * * because there is no coherency between the caches. - * We should only flush unmounted partition devices, because: - * - there is never a need to flush them (we're not doing IO there) - * - flushing a device that is mounted causes unnecessary IO, and can -@@ -1542,9 +1543,6 @@ _flush_cache (PedDevice* dev) - ioctl (arch_specific->fd, BLKFLSBUF); - - /* With linux-2.6.0 and newer, we're done. */ -- if (_have_kern26()) -- return; -- - for (i = 1; i < lpn; i++) { - char* name; - int fd; -@@ -2318,7 +2316,7 @@ err: - #endif - - static char* --_device_get_part_path (PedDevice *dev, int num) -+_device_get_part_path (PedDevice const *dev, int num) - { - char *devpath; - size_t path_len; -@@ -2341,7 +2339,7 @@ _device_get_part_path (PedDevice *dev, int num) - char const *p = (dev->type == PED_DEVICE_DAC960 - || dev->type == PED_DEVICE_CPQARRAY - || dev->type == PED_DEVICE_ATARAID -- || isdigit (dev->path[path_len - 1]) -+ || isdigit (devpath[path_len - 1]) - ? "p" : ""); - result = zasprintf ("%s%s%d", devpath, p, num); - } -@@ -2355,6 +2353,10 @@ _device_get_part_path (PedDevice *dev, int num) - static char* - linux_partition_get_path (const PedPartition* part) - { -+ /* loop label means use the whole disk */ -+ if (strcmp (part->disk->type->name, "loop") == 0) -+ return xstrdup (part->disk->dev->path); -+ - return _device_get_part_path (part->disk->dev, part->num); - } - -@@ -2423,6 +2425,8 @@ linux_partition_is_busy (const PedPartition* part) - - PED_ASSERT (part != NULL); - -+ if (strcmp (part->disk->type->name, "loop") == 0) -+ return linux_is_busy (part->disk->dev); - if (_partition_is_mounted (part)) - return 1; - if (part->type == PED_PARTITION_EXTENDED) { -@@ -2602,7 +2606,7 @@ _sysfs_ull_entry_from_part(PedPartition const* part, const char *entry, - unsigned long long *val) - { - char path[128]; -- char *part_name = linux_partition_get_path(part); -+ char *part_name = _device_get_part_path (part->disk->dev, part->num); - if (!part_name) - return false; - -@@ -2637,7 +2641,7 @@ _kernel_get_partition_start_and_length(PedPartition const *part, - PED_ASSERT(start); - PED_ASSERT(length); - -- char *dev_name = linux_partition_get_path (part); -+ char *dev_name = _device_get_part_path (part->disk->dev, part->num); - if (!dev_name) - return false; - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 29fa280..ac8122b 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -34,6 +34,7 @@ TESTS = \ - t0501-duplicate.sh \ - t1100-busy-label.sh \ - t1101-busy-partition.sh \ -+ t1104-remove-and-add-partition.sh \ - t1700-probe-fs.sh \ - t2200-dos-label-recog.sh \ - t2201-pc98-label-recog.sh \ -@@ -59,6 +60,7 @@ TESTS = \ - t6002-dm-many-partitions.sh \ - t6003-dm-uuid.sh \ - t6004-dm-512b-sectors.sh \ -+ t6010-dm-busy.sh \ - t6100-mdraid-partitions.sh \ - t7000-scripting.sh \ - t8000-loop.sh \ -diff --git a/tests/t1104-remove-and-add-partition.sh b/tests/t1104-remove-and-add-partition.sh -new file mode 100644 -index 0000000..61cc392 ---- /dev/null -+++ b/tests/t1104-remove-and-add-partition.sh -@@ -0,0 +1,50 @@ -+#!/bin/sh -+# make sure that removing a higher numbered partition and adding a lower -+# one using that space at the same time works -+ -+# Copyright (C) 2014 Free Software Foundation, Inc. -+ -+# 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 . -+ -+. "${srcdir=.}/init.sh"; path_prepend_ ../parted -+path_prepend_ ../partprobe -+require_root_ -+ss=$sector_size_ -+ -+d1= f1= -+cleanup_fn_() -+{ -+ test -n "$d1" && losetup -d "$d1" -+ rm -f "$f1" -+} -+ -+f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ -+ || skip_ "is this partition mounted with 'nodev'?" -+ -+require_partitionable_loop_device_ $d1 -+ -+# create one big partition -+parted -s $d1 mklabel msdos mkpart primary ext2 1m 10m || fail=1 -+ -+# save this table -+dd if=$d1 of=saved count=1 || fail=1 -+ -+# create two small partitions -+parted -s $d1 mklabel msdos mkpart primary ext2 1m 5m mkpart primary ext2 5m 10m || fail=1 -+ -+# restore first table and make sure partprobe works -+dd if=saved of=$d1 || fail=1 -+partprobe $d1 || fail=1 -+ -+Exit $fail -diff --git a/tests/t6010-dm-busy.sh b/tests/t6010-dm-busy.sh -new file mode 100644 -index 0000000..9807b40 ---- /dev/null -+++ b/tests/t6010-dm-busy.sh -@@ -0,0 +1,92 @@ -+#!/bin/sh -+# ensure that parted can alter a partition on a dmraid disk -+# while another one is mounted -+ -+# Copyright (C) 2008-2012 Free Software Foundation, Inc. -+ -+# 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 . -+ -+. "${srcdir=.}/init.sh"; path_prepend_ ../parted -+ -+require_root_ -+ -+# We could make this work for arbitrary sector size, but I'm lazy. -+require_512_byte_sector_size_ -+ -+test "x$ENABLE_DEVICE_MAPPER" = xyes \ -+ || skip_ "no device-mapper support" -+ -+# Device maps names - should be random to not conflict with existing ones on -+# the system -+linear_=plinear-$$ -+ -+d1= -+f1= -+dev= -+cleanup_fn_() { -+ umount "${dev}p2" > /dev/null 2>&1 -+ dmsetup remove ${linear_}p1 -+ dmsetup remove ${linear_}p2 -+ dmsetup remove $linear_ -+ test -n "$d1" && losetup -d "$d1" -+ rm -f "$f1" -+} -+ -+f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ -+ || fail=1 -+ -+# setup: create a mapping -+n=204800 -+echo "0 $n linear $d1 0" | dmsetup create $linear_ || fail=1 -+dev="/dev/mapper/$linear_" -+ -+# Create msdos partition table -+parted -s $dev mklabel msdos > out 2>&1 || fail=1 -+compare /dev/null out || fail=1 -+ -+parted -s $dev -a none mkpart primary fat32 1s 1000s > out 2>&1 || fail=1 -+compare /dev/null out || fail=1 -+ -+parted -s $dev -a none mkpart primary fat32 1001s 200000s > out 2>&1 || fail=1 -+compare /dev/null out || fail=1 -+ -+# wait for new partition device to appear -+wait_for_dev_to_appear_ ${dev}p2 || fail_ ${dev}p2 did not appear -+ -+mkfs.vfat -F 32 ${dev}p2 || fail_ mkfs.vfat failed -+ -+mount_point=$(pwd)/mnt -+ -+mkdir $mount_point || fail=1 -+mount "${dev}p2" "$mount_point" || fail=1 -+ -+# Removal of unmounted partition must succeed. -+parted -s "$dev" rm 1 > /dev/null 2>&1 || fail=1 -+ -+# Removal of mounted partition must fail. -+parted -s "$dev" rm 2 > /dev/null 2>&1 && fail=1 -+ -+parted -m -s "$dev" u s print > out 2>&1 || fail=1 -+sed "s,^$dev,DEV," out > k; mv k out -+ -+# Create expected output file. -+cat <> exp || fail=1 -+BYT; -+DEV:${n}s:dm:512:512:msdos:Linux device-mapper (linear):; -+2:1001s:200000s:199000s:fat32::lba; -+EOF -+ -+compare exp out || fail=1 -+ -+Exit $fail --- -2.7.4 - diff --git a/filesystem/parted/centos/patches/syscalls.patch b/filesystem/parted/centos/patches/syscalls.patch deleted file mode 100644 index 497cd04fd..000000000 --- a/filesystem/parted/centos/patches/syscalls.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0da33d97a8c20125922b5967988a2849d801ca0c Mon Sep 17 00:00:00 2001 -From: Allain Legacy -Date: Fri, 28 Sep 2018 02:28:30 +0800 -Subject: - ---- - libparted/arch/linux.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 6e78faf..27f706b 100644 ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -1673,12 +1673,14 @@ _device_close (PedDevice* dev) - - #if SIZEOF_OFF_T < 8 - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - static _syscall5(int,_llseek, - unsigned int, fd, - unsigned long, offset_high, - unsigned long, offset_low, - loff_t*, result, - unsigned int, origin) -+#endif - - loff_t - llseek (unsigned int fd, loff_t offset, unsigned int whence) -@@ -1686,11 +1688,20 @@ llseek (unsigned int fd, loff_t offset, unsigned int whence) - loff_t result; - int retval; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - retval = _llseek(fd, - ((unsigned long long)offset) >> 32, - ((unsigned long long)offset) & 0xffffffff, - &result, - whence); -+#else -+ retval = syscall(__NR__llseek, fd, -+ ((unsigned long long)offset) >> 32, -+ ((unsigned long long)offset) & 0xffffffff, -+ &result, -+ whence); -+#endif -+ - return (retval==-1 ? (loff_t) retval : result); - } - --- -2.7.4 - diff --git a/filesystem/parted/centos/srpm_path b/filesystem/parted/centos/srpm_path deleted file mode 100644 index fd9f8421e..000000000 --- a/filesystem/parted/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/parted-3.1-29.el7.src.rpm diff --git a/gpu/gpu-operator/centos/build_srpm.data b/gpu/gpu-operator/centos/build_srpm.data deleted file mode 100644 index 745139758..000000000 --- a/gpu/gpu-operator/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -VERSION=1.8.1 -TAR_NAME=gpu-operator -TAR="$TAR_NAME-$VERSION.tar.gz" -COPY_LIST=" \ - $PKG_BASE/files/* \ - $STX_BASE/downloads/$TAR" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/gpu/gpu-operator/centos/gpu-operator.spec b/gpu/gpu-operator/centos/gpu-operator.spec deleted file mode 100644 index a27b734e7..000000000 --- a/gpu/gpu-operator/centos/gpu-operator.spec +++ /dev/null @@ -1,50 +0,0 @@ -# Build variables -%global helm_ver v3 -%global helm_folder /usr/lib/helm - -Summary: StarlingX nvidia gpu-operator helm chart -Name: gpu-operator -Version: 1.8.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: https://github.com/NVIDIA/gpu-operator/tree/gh-pages - -Source0: %{name}-%{version}.tar.gz - -BuildArch: noarch - -Patch01: deployments-setup-configmap-with-assets-for-volumemo.patch -Patch02: enablement-support-on-starlingx-cloud-platform.patch - -BuildRequires: helm - -%define debug_package %{nil} -%description -StarlingX port of NVIDIA gpu-operator - -%prep -%setup - -%patch01 -p1 -%patch02 -p1 - -%build -mkdir -p deployments/gpu-operator/assets/state-driver/ -mkdir -p deployments/gpu-operator/assets/state-operator-validation/ -cp assets/state-driver/0500_daemonset.yaml \ - deployments/gpu-operator/assets/state-driver/0500_daemonset.yaml -cp assets/state-operator-validation/0500_daemonset.yaml \ - deployments/gpu-operator/assets/state-operator-validation/0500_daemonset.yaml -helm lint deployments/gpu-operator -mkdir build_results -helm package --version %{helm_ver}-%{version}.%{tis_patch_ver} --app-version v%{version} -d build_results deployments/gpu-operator - -%install -install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder} -install -p -D -m 755 build_results/%{name}-%{helm_ver}-%{version}.%{tis_patch_ver}.tgz ${RPM_BUILD_ROOT}%{helm_folder} - -%files -%defattr(-,root,root,-) -%{helm_folder} diff --git a/grub/grub2/centos/build_srpm.data b/grub/grub2/centos/build_srpm.data deleted file mode 100644 index aef2fd31f..000000000 --- a/grub/grub2/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="" -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_SLOW=8 diff --git a/grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch b/grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch deleted file mode 100644 index f1cabc104..000000000 --- a/grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8b5576704440696a7c8f1b00735217bf1745b6a1 Mon Sep 17 00:00:00 2001 -Message-Id: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: slin14 -Date: Fri, 17 Aug 2018 22:48:46 +0800 -Subject: [PATCH 01/13] Update package versioning for STX - -Signed-off-by: Jim Somerville ---- - SPECS/grub2.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index b5e268c..c323a2a 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -16,7 +16,7 @@ - Name: grub2 - Epoch: 1 - Version: 2.02 --Release: 0.86%{?dist}%{?buildid} -+Release: 0.86.el7.centos%{?_tis_dist}.%{tis_patch_ver} - Summary: Bootloader with support for Linux, Multiboot and more - Group: System Environment/Base - License: GPLv3+ --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0002-fix-cflags.patch b/grub/grub2/centos/meta_patches/0002-fix-cflags.patch deleted file mode 100644 index 83cc70b37..000000000 --- a/grub/grub2/centos/meta_patches/0002-fix-cflags.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 579956c74511eeb40761df7908210492768f883d Mon Sep 17 00:00:00 2001 -Message-Id: <579956c74511eeb40761df7908210492768f883d.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: Jim Somerville -Date: Wed, 26 Jan 2022 17:24:50 -0500 -Subject: [PATCH 02/13] fix cflags - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 11 +---------- - 1 file changed, 1 insertion(+), 10 deletions(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index a78bda9..487ee27 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -15,16 +15,7 @@ - %global cc_equals %{nil} - %endif - --%global efi_cflags %(echo %{optflags} | \\\ -- sed \\\ -- -e 's/-O./-g3/g' \\\ -- -e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\ -- -e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g' \\\ -- -e 's/--param=ssp-buffer-size=4//g' \\\ -- -e 's/-mregparm=3/-mregparm=4/g' \\\ -- -e 's/-fexceptions//g' \\\ -- -e 's/-fasynchronous-unwind-tables//g' \\\ -- -e 's/^/ -fno-strict-aliasing /' ) %{nil} -+%global efi_cflags '' - %global legacy_cflags %(echo %{efi_cflags} | \\\ - sed \\\ - -e 's/-m64//g' \\\ --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch b/grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch deleted file mode 100644 index ba374619a..000000000 --- a/grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f51ca13eb123f7217426eb0b6d0c4a44b908725a Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: slin14 -Date: Fri, 17 Aug 2018 23:28:59 +0800 -Subject: [PATCH 03/13] remove debug pkgs - -Signed-off-by: slin14 -Signed-off-by: Jim Somerville ---- - SPECS/grub2.spec | 20 -------------------- - 1 file changed, 20 deletions(-) - -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index c323a2a..38515ac 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -182,7 +182,6 @@ rm -f grub-%{tarversion}/util/grub-setpassword.in.orig - %install - set -e - rm -fr $RPM_BUILD_ROOT -- - %do_common_install - %if 0%{with_efi_arch} - %do_efi_install %{grubefiarch} %{grubefiname} %{grubeficdname} -@@ -210,25 +209,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf - -b /usr/sbin/grub2-sparc64-setup - EOF - --# Don't run debuginfo on all the grub modules and whatnot; it just --# rejects them, complains, and slows down extraction. --%global finddebugroot "%{_builddir}/%{?buildsubdir}/debug" -- --%global dip RPM_BUILD_ROOT=%{finddebugroot} %{__debug_install_post} --%define __debug_install_post ( \ -- mkdir -p %{finddebugroot}/usr \ -- mv ${RPM_BUILD_ROOT}/usr/bin %{finddebugroot}/usr/bin \ -- mv ${RPM_BUILD_ROOT}/usr/sbin %{finddebugroot}/usr/sbin \ -- %{dip} \ -- install -m 0755 -d %{buildroot}/usr/lib/ %{buildroot}/usr/src/ \ -- cp -al %{finddebugroot}/usr/lib/debug/ \\\ -- %{buildroot}/usr/lib/debug/ \ -- cp -al %{finddebugroot}/usr/src/debug/ \\\ -- %{buildroot}/usr/src/debug/ ) \ -- mv %{finddebugroot}/usr/bin %{buildroot}/usr/bin \ -- mv %{finddebugroot}/usr/sbin %{buildroot}/usr/sbin \ -- %{nil} -- - %clean - rm -rf $RPM_BUILD_ROOT - --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch b/grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch deleted file mode 100644 index 97343c529..000000000 --- a/grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7bcc190f7bbb9503fcb911f595b1f6e7539a0d90 Mon Sep 17 00:00:00 2001 -Message-Id: <7bcc190f7bbb9503fcb911f595b1f6e7539a0d90.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Mon, 22 Jan 2018 16:05:57 -0500 -Subject: [PATCH 04/13] remove 32 bit build - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 487ee27..efe46cc 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -82,15 +82,6 @@ - %global legacy_package_arch pc - %global platform pc - --%global alt_efi_arch ia32 --%global alt_target_cpu_name i386 --%global alt_grub_target_name i386-efi --%global alt_platform efi --%global alt_package_arch efi-ia32 --%global alt_efi_cflags %(echo %{efi_cflags} | \\\ -- sed \\\ -- -e 's/-m64//g' \\\ -- ) %{nil} - %endif - - %ifarch aarch64 -@@ -385,6 +376,7 @@ cd grub-%{1}-%{tarversion} \ - install -m 700 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \ - install -m 700 -d $RPM_BUILD_ROOT/boot/grub2/ \ - make DESTDIR=$RPM_BUILD_ROOT install \ -+find $RPM_BUILD_ROOT -name "grub2-bios-setup*" | xargs rm -f \ - if [ -f $RPM_BUILD_ROOT%{_infodir}/grub.info ]; then \ - rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info \ - fi \ --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0005-ship-lst-files.patch b/grub/grub2/centos/meta_patches/0005-ship-lst-files.patch deleted file mode 100644 index 9dd41a953..000000000 --- a/grub/grub2/centos/meta_patches/0005-ship-lst-files.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f12ea9652df43eabd9c02489c6b733086382b72d Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Tue, 23 Jan 2018 09:24:16 -0500 -Subject: [PATCH 05/13] ship lst files - -Signed-off-by: Jim Somerville ---- - SPECS/grub2.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 38515ac..ffca6e9 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -299,6 +299,8 @@ fi - %ifarch x86_64 - %files common -f grub.lang - %dir %{_libdir}/grub/ -+%dir %{_libdir}/grub/%{grubefiarch}/ -+%{_libdir}/grub/%{grubefiarch}/*.lst - %dir %{_datarootdir}/grub/ - %dir %{_datarootdir}/grub/themes/ - %exclude %{_datarootdir}/grub/themes/* --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch b/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch deleted file mode 100644 index 7f576ae1c..000000000 --- a/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 958fb362c10e075a2bf944e7f4dfc7fd3ae2a935 Mon Sep 17 00:00:00 2001 -Message-Id: <958fb362c10e075a2bf944e7f4dfc7fd3ae2a935.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Tue, 23 Jan 2018 13:29:11 -0500 -Subject: [PATCH 06/13] debrand the grub_cfg menu - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.patches | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index 9d0ffd1..ab69be2 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -332,3 +332,4 @@ Patch0331: 0331-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch - Patch0332: 0332-linux-loader-avoid-overflow-on-initrd-size-calculati.patch - Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch - Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch -+Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch b/grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch deleted file mode 100644 index cc89ccf9a..000000000 --- a/grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a3c831a18efa931cafd680d8275232e874239f50 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Tue, 23 Jan 2018 14:46:01 -0500 -Subject: [PATCH 07/13] add unsigned package - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index efe46cc..539b5d5 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -217,6 +217,13 @@ Requires: %{name}-common = %{evr} \ - %{expand:%%description %{1}-cdboot} \ - %{desc} \ - This subpackage provides optional components of grub used with removeable media on %{1} systems.\ -+ \ -+%{expand:%%package %{1}-unsigned} \ -+Summary: Unsigned versions of GRUB EFI binaries \ -+ \ -+%{expand:%%description %{1}-unsigned} \ -+This package contains unsigned version of GRUB EFI binaries. \ -+ \ - %{nil} - - %global do_common_setup() \ -@@ -291,6 +298,8 @@ done \ - -p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \ - %{4}./grub-mkimage -O %{1} -o %{3}.orig \\\ - -p /EFI/BOOT -d grub-core ${GRUB_MODULES} \ -+cp %{2}.orig %{2}.unsigned \ -+cp %{3}.orig %{3}.unsigned \ - %{expand:%%{pesign -s -i %{2}.orig -o %{2}.one -a %{5} -c %{6} -n %{7}}} \ - %{expand:%%{pesign -s -i %{3}.orig -o %{3}.one -a %{5} -c %{6} -n %{7}}} \ - %{expand:%%{pesign -s -i %{2}.one -o %{2} -a %{8} -c %{9} -n %{10}}} \ -@@ -387,6 +396,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ - touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \ - ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ - $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ -+install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ -+install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ - install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ - install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ - install -D -m 700 unicode.pf2 \\\ -@@ -474,4 +485,8 @@ cd .. \ - %defattr(-,root,root,-) \ - %verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{3} \ - %verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \ -+ \ -+%{expand:%%files %{1}-unsigned} \ -+/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ -+/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ - %{nil} --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch b/grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch deleted file mode 100644 index b152e1bc0..000000000 --- a/grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 99a034b900d55da90234fd56a00944a4721c1390 Mon Sep 17 00:00:00 2001 -Message-Id: <99a034b900d55da90234fd56a00944a4721c1390.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Tue, 23 Jan 2018 14:57:29 -0500 -Subject: [PATCH 08/13] add pxeboot package - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 539b5d5..c945920 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -224,6 +224,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ - %{expand:%%description %{1}-unsigned} \ - This package contains unsigned version of GRUB EFI binaries. \ - \ -+%{expand:%%package %{1}-pxeboot} \ -+Summary: PXE bootable GRUB EFI binaries \ -+ \ -+%{expand:%%description %{1}-pxeboot} \ -+This package contains the version of EFI GRUB that is served by the pxeboot \ -+server \ -+ \ - %{nil} - - %global do_common_setup() \ -@@ -398,6 +405,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ - $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ - install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ - install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ -+install -D -m 755 %{2} $RPM_BUILD_ROOT/pxeboot/EFI/%{2} \ - install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ - install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ - install -D -m 700 unicode.pf2 \\\ -@@ -489,4 +497,8 @@ cd .. \ - %{expand:%%files %{1}-unsigned} \ - /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ - /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ -+ \ -+%{expand:%%files %{1}-pxeboot} \ -+/pxeboot/EFI/%{grubefiname} \ -+ \ - %{nil} --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0009-add-tboot.patch b/grub/grub2/centos/meta_patches/0009-add-tboot.patch deleted file mode 100644 index 20c956bc2..000000000 --- a/grub/grub2/centos/meta_patches/0009-add-tboot.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9b47b5107a4017c266b59093514dbdee603b0bdc Mon Sep 17 00:00:00 2001 -Message-Id: <9b47b5107a4017c266b59093514dbdee603b0bdc.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: jmckenna -Date: Wed, 28 Mar 2018 12:53:34 -0400 -Subject: [PATCH 09/13] add tboot - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 5 +++++ - SOURCES/grub.patches | 1 + - 2 files changed, 6 insertions(+) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index c945920..b279e7d 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -82,6 +82,10 @@ - %global legacy_package_arch pc - %global platform pc - -+%global wrs_modules " multiboot multiboot2" -+%else -+%global wrs_modules "" -+ - %endif - - %ifarch aarch64 -@@ -331,6 +335,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ - search_label serial sleep syslinuxcfg test tftp \\\ - video xfs" \ - GRUB_MODULES+=%{efi_modules} \ -+GRUB_MODULES+=%{wrs_modules} \ - %{expand:%%{mkimage %{1} %{2} %{3} %{4} %{5} %{6} %{7} %{8} %{9} %{10}}} \ - %{nil} - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index ab69be2..ba47129 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -333,3 +333,4 @@ Patch0332: 0332-linux-loader-avoid-overflow-on-initrd-size-calculati.patch - Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch - Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch - Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch -+Patch1001: 1001-add-tboot.patch --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch b/grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch deleted file mode 100644 index 9ebdcf016..000000000 --- a/grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d3bc2d9e09b1fff838e30eb064c5c73d201e47c5 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: jmckenna -Date: Wed, 28 Mar 2018 14:08:57 -0400 -Subject: [PATCH 10/13] Don't add a trailing colon after MAC - -A CentOS GRUB patch added support for macs > 6B in size. This -breaks PXEbooting the installer, because a routine within grub -relies on the max MAC string length. - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 2 +- - SOURCES/grub.patches | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index b279e7d..00c669f 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -82,7 +82,7 @@ - %global legacy_package_arch pc - %global platform pc - --%global wrs_modules " multiboot multiboot2" -+%global wrs_modules " multiboot multiboot2 regexp" - %else - %global wrs_modules "" - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index ba47129..3d4f708 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -334,3 +334,4 @@ Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch - Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch - Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch - Patch1001: 1001-add-tboot.patch -+Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch b/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch deleted file mode 100644 index 58884f1af..000000000 --- a/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 69ad59e9ca9961b84563cb40e04b8dce7c650e61 Mon Sep 17 00:00:00 2001 -Message-Id: <69ad59e9ca9961b84563cb40e04b8dce7c650e61.1643237526.git.Jim.Somerville@windriver.com> -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: root -Date: Fri, 6 Apr 2018 11:36:01 -0400 -Subject: [PATCH 11/13] Don't strip files from non-EFI build of grub - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 00c669f..d52861a 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -472,8 +472,6 @@ cd .. \ - %defattr(-,root,root) \ - %dir %{_libdir}/grub/%{2}/ \ - %{_libdir}/grub/%{2}/* \ --%exclude %{_libdir}/grub/%{2}/*.module \ --%exclude %{_libdir}/grub/%{2}/{boot,boot_hybrid,cdboot,diskboot,lzma_decompress,pxeboot}.{image,img} \ - %exclude %{_libdir}/grub/%{2}/*.o \ - %{nil} - --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch b/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch deleted file mode 100644 index 9e5387c82..000000000 --- a/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c2764661800f3b43fda4a7402087fafa84f9ed07 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: jma1 -Date: Mon, 30 Aug 2021 06:27:13 +0000 -Subject: [PATCH 12/13] tftp: roll over block counter to prevent timeouts with - data - -Signed-off-by: Jiping Ma -Signed-off-by: Jim Somerville ---- - SOURCES/grub.patches | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index 3d4f708..5ce9177 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -335,3 +335,4 @@ Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch - Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch - Patch1001: 1001-add-tboot.patch - Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch -+Patch1003: 1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch b/grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch deleted file mode 100644 index ea0ce7ca6..000000000 --- a/grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch +++ /dev/null @@ -1,39 +0,0 @@ -From dd8a4d64d16ec8f79c768293a4057581b4683803 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> -From: Bin Qian -Date: Wed, 29 Sep 2021 16:49:47 -0400 -Subject: [PATCH 13/13] Relocate /pxeboot to /var/pxeboot - -Relocate writable directory /pxeboot to /var/pxeboot - -Signed-off-by: Jim Somerville ---- - SOURCES/grub.macros | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index d52861a..fe88bf1 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -410,7 +410,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ - $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ - install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ - install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ --install -D -m 755 %{2} $RPM_BUILD_ROOT/pxeboot/EFI/%{2} \ -+install -D -m 755 %{2} $RPM_BUILD_ROOT/var/pxeboot/EFI/%{2} \ - install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ - install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ - install -D -m 700 unicode.pf2 \\\ -@@ -502,6 +502,6 @@ cd .. \ - /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ - \ - %{expand:%%files %{1}-pxeboot} \ --/pxeboot/EFI/%{grubefiname} \ -+/var/pxeboot/EFI/%{grubefiname} \ - \ - %{nil} --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/PATCH_ORDER b/grub/grub2/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 0f07a1a32..000000000 --- a/grub/grub2/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,13 +0,0 @@ -0001-Update-package-versioning-for-STX.patch -0002-fix-cflags.patch -0003-remove-debug-pkgs.patch -0004-remove-32-bit-build.patch -0005-ship-lst-files.patch -0006-debrand-the-grub_cfg-menu.patch -0007-add-unsigned-package.patch -0008-add-pxeboot-package.patch -0009-add-tboot.patch -0010-Don-t-add-a-trailing-colon-after-MAC.patch -0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch -0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch -0013-Relocate-pxeboot-to-var-pxeboot.patch diff --git a/grub/grub2/centos/patches/1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch b/grub/grub2/centos/patches/1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch deleted file mode 100644 index 10ba44d81..000000000 --- a/grub/grub2/centos/patches/1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6934956143557c548cc35dcc272aae1ee3d706c8 Mon Sep 17 00:00:00 2001 -From: RHEL Ninjas -Date: Wed, 5 Oct 2016 15:14:28 -0400 -Subject: [PATCH] 10_linux: mktitle: de-brand the grub.cfg menu - -Replace "CentOS" with a generic name. - -Signed-off-by: Michel Thebeau ---- - util/grub.d/10_linux.in | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index b3c460c..131c1f2 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -71,22 +71,20 @@ mktitle () - local title_type - local version - local OS_NAME -- local OS_VERS - - title_type=$1 && shift - version=$1 && shift - -- OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" -- OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" -+ OS_NAME="Linux" - - case $title_type in - recovery) -- title=$(printf '%s (%s) %s (recovery mode)' \ -- "${OS_NAME}" "${version}" "${OS_VERS}") -+ title=$(printf '%s (%s) (recovery mode)' \ -+ "${OS_NAME}" "${version}") - ;; - *) -- title=$(printf '%s (%s) %s' \ -- "${OS_NAME}" "${version}" "${OS_VERS}") -+ title=$(printf '%s (%s)' \ -+ "${OS_NAME}" "${version}") - ;; - esac - echo -n ${title} --- -1.8.3.1 - diff --git a/grub/grub2/centos/patches/1001-add-tboot.patch b/grub/grub2/centos/patches/1001-add-tboot.patch deleted file mode 100644 index ef6e94cb1..000000000 --- a/grub/grub2/centos/patches/1001-add-tboot.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4a1a40ca64be1a2350ec90ceb9089dc0a3950231 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Tue, 21 Nov 2017 15:36:42 -0500 -Subject: [PATCH 1/1] add tboot - ---- - util/grub-mkconfig.in | 2 +- - util/grub.d/10_linux.in | 5 +++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index 86801aa..b149cec 100644 ---- a/util/grub-mkconfig.in -+++ b/util/grub-mkconfig.in -@@ -125,7 +125,7 @@ set $grub_probe dummy - if test -f "$1"; then - : - else -- gettext_print "%s: Not found.\n" "$1" 1>&2 -+ gettext_printf "%s: Not found.\n" "$1" 1>&2 - exit 1 - fi - -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 3b29c23..61406e4 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -23,6 +23,11 @@ datarootdir="@datarootdir@" - - . "@datadir@/@PACKAGE@/grub-mkconfig_lib" - -+tboot=`cat /proc/cmdline | xargs -n1 | grep '^tboot=true$'` || true -+if [ -n "$tboot" ]; then -+ exit 0 -+fi -+ - export TEXTDOMAIN=@PACKAGE@ - export TEXTDOMAINDIR="@localedir@" - --- -1.8.3.1 - diff --git a/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch b/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch deleted file mode 100644 index 68e665343..000000000 --- a/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 56561f1b5850888c9266b1155d4ac6d352e791c4 Mon Sep 17 00:00:00 2001 -From: root -Date: Wed, 28 Mar 2018 11:23:17 -0400 -Subject: [PATCH] Don't write trailing colon when populating MAC string - ---- - grub-core/net/net.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index a6566bd..f3f964e 100644 ---- a/grub-core/net/net.c -+++ b/grub-core/net/net.c -@@ -797,11 +797,18 @@ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str) - return; - } - maxstr = addr->len * grub_strlen ("XX:"); -- for (ptr = str, i = 0; i < addr->len; i++) -+ if (addr->len == 0) -+ { -+ return; -+ } -+ -+ for (ptr = str, i = 0; i < (addr->len - 1); i++) - { - ptr += grub_snprintf (ptr, maxstr - (ptr - str), - "%02x:", addr->mac[i] & 0xff); - } -+ ptr += grub_snprintf (ptr, maxstr - (ptr - str), -+ "%02x", addr->mac[i] & 0xff); - } - - int --- -2.7.4 - diff --git a/grub/grub2/centos/patches/1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch b/grub/grub2/centos/patches/1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch deleted file mode 100644 index b31c7765c..000000000 --- a/grub/grub2/centos/patches/1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 250304ce7a6f31e3999d128183fe299b99ec95aa Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Mon, 24 Aug 2020 14:46:27 +0200 -Subject: [PATCH] tftp: roll over block counter to prevent timeouts with data - packets - -The block number is a 16-bit counter which only allows to fetch -files no bigger than 65535 * blksize. To avoid this limit, the -counter is rolled over. This behavior isn't defined in RFC 1350 -but is handled by many TFTP servers and it's what GRUB was doing -before implicitly due an overflow. - -Suggested-by: Peter Jones -Signed-off-by: Javier Martinez Canillas -Signed-off-by: Jiping Ma ---- - grub-core/net/tftp.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 79c16f9..eab9ab7 100644 ---- a/grub-core/net/tftp.c -+++ b/grub-core/net/tftp.c -@@ -183,8 +183,16 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), - return GRUB_ERR_NONE; - } - -- /* Ack old/retransmitted block. */ -- if (grub_be_to_cpu16 (tftph->u.data.block) < data->block + 1) -+ /* -+ * Ack old/retransmitted block. -+ * -+ * The block number is a 16-bit counter which only allows to fetch -+ * files no bigger than 65535 * blksize. To avoid this limit, the -+ * counter is rolled over. This behavior isn't defined in RFC 1350 -+ * but is handled by many TFTP servers and it's what GRUB was doing -+ * before implicitly due an overflow. -+ */ -+ if (grub_be_to_cpu16 (tftph->u.data.block) < ((data->block + 1) & 0xffffu)) - ack (data, grub_be_to_cpu16 (tftph->u.data.block)); - /* Ignore unexpected block. */ - else if (grub_be_to_cpu16 (tftph->u.data.block) > data->block + 1) --- -2.31.1 - diff --git a/grub/grub2/centos/srpm_path b/grub/grub2/centos/srpm_path deleted file mode 100644 index 95baf014a..000000000 --- a/grub/grub2/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/grub2-2.02-0.86.el7.centos.src.rpm diff --git a/grub/grubby/centos/build_srpm.data b/grub/grubby/centos/build_srpm.data deleted file mode 100644 index 1782b6c87..000000000 --- a/grub/grubby/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/grub/grubby/centos/meta_patches/0001-grubby-Update-package-versioning-for-TIS-format.patch b/grub/grubby/centos/meta_patches/0001-grubby-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 9dfb713fd..000000000 --- a/grub/grubby/centos/meta_patches/0001-grubby-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From aecf1e4686bbd50e96bea030bdf7ee4f4882fe5c Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:23:24 -0400 -Subject: [PATCH 1/2] WRS: - 0001-grubby-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/grubby.spec ---- - SPECS/grubby.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec -index dd8fa7f..22bff31 100644 ---- a/SPECS/grubby.spec -+++ b/SPECS/grubby.spec -@@ -1,6 +1,6 @@ - Name: grubby - Version: 8.28 --Release: 25%{?dist} -+Release: 25.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Command line tool for updating bootloader configs - Group: System Environment/Base - License: GPLv2+ --- -1.9.1 - diff --git a/grub/grubby/centos/meta_patches/0002-grubby-Generic-name-for-Titanium.patch b/grub/grubby/centos/meta_patches/0002-grubby-Generic-name-for-Titanium.patch deleted file mode 100644 index 57f910281..000000000 --- a/grub/grubby/centos/meta_patches/0002-grubby-Generic-name-for-Titanium.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3c4f2fef7d1d321a34a9777946879f187fdad2bc Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:23:24 -0400 -Subject: [PATCH 2/2] WRS: 0002-grubby-Generic-name-for-Titanium.patch - ---- - SPECS/grubby.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec -index 22bff31..882339a 100644 ---- a/SPECS/grubby.spec -+++ b/SPECS/grubby.spec -@@ -84,6 +84,9 @@ Patch0074: 0074-Add-s390-s390x-set-default-index-test-1285601.patch - Patch0075: 0075-Fix-setDefaultImage-for-s390-s390x-1285601.patch - Patch0076: 0076-grubby-Make-sure-configure-BOOTLOADER-variables-are-.patch - -+# WRS Titanium patches -+Patch1000: 1000-Generic-name-for-Titanium.patch -+ - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: pkgconfig glib2-devel popt-devel - BuildRequires: libblkid-devel git --- -1.9.1 - diff --git a/grub/grubby/centos/meta_patches/0003-grubby-add-multiboot2.patch b/grub/grubby/centos/meta_patches/0003-grubby-add-multiboot2.patch deleted file mode 100644 index fe02e09c9..000000000 --- a/grub/grubby/centos/meta_patches/0003-grubby-add-multiboot2.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 40211dceb45803c4bb4ff2afbc993f230872ad51 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Tue, 13 Feb 2018 23:02:49 -0500 -Subject: [PATCH 1/1] grubby add multiboot2 - ---- - SPECS/grubby.spec | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec -index 071463a..a3bb371 100644 ---- a/SPECS/grubby.spec -+++ b/SPECS/grubby.spec -@@ -86,6 +86,7 @@ Patch0076: 0076-grubby-Make-sure-configure-BOOTLOADER-variables-are-.patch - - # WRS Titanium patches - Patch1000: 1000-Generic-name-for-Titanium.patch -+Patch1001: 1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch - - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: pkgconfig glib2-devel popt-devel -@@ -102,6 +103,10 @@ Requires: s390utils-base - Requires: uboot-tools - %endif - Requires: system-release -+BuildRequires: python-setuptools -+Requires: python-devel -+ -+%define pythonroot /usr/lib64/python2.7/site-packages - - %description - grubby is a command line tool for updating and displaying information about -@@ -142,6 +147,11 @@ mkdir -p $RPM_BUILD_ROOT/boot - echo " " >> $RPM_BUILD_ROOT/boot/boot.scr - %endif - -+install -d -m 0755 $RPM_BUILD_ROOT/%{pythonroot}/grubby -+install -m 644 grub_cfg_update.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/grub_cfg_update.py -+install -m 644 __init__.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/__init__.py -+install -m 500 grub-cfg-update $RPM_BUILD_ROOT/usr/sbin/grub-cfg-update -+ - %clean - rm -rf $RPM_BUILD_ROOT - -@@ -154,6 +164,11 @@ rm -rf $RPM_BUILD_ROOT - %{_prefix}/sbin/installkernel - %{_prefix}/sbin/new-kernel-pkg - %{_prefix}/sbin/grubby -+%{pythonroot}/grubby -+%{_prefix}/sbin/grub-cfg-update -+%{pythonroot}/grubby/grub_cfg_update.py -+%{pythonroot}/grubby/__init__.py -+ - %{_mandir}/man8/*.8* - /usr/libexec/grubby/prune_debug - %ghost %attr(0644,-,-) %config(noreplace) %{_sysconfdir}/sysconfig/kernel --- -1.8.3.1 - diff --git a/grub/grubby/centos/meta_patches/PATCH_ORDER b/grub/grubby/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 26c430d5b..000000000 --- a/grub/grubby/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-grubby-Update-package-versioning-for-TIS-format.patch -0002-grubby-Generic-name-for-Titanium.patch -0003-grubby-add-multiboot2.patch diff --git a/grub/grubby/centos/patches/1000-Generic-name-for-Titanium.patch b/grub/grubby/centos/patches/1000-Generic-name-for-Titanium.patch deleted file mode 100644 index 57662b925..000000000 --- a/grub/grubby/centos/patches/1000-Generic-name-for-Titanium.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7d3bd33be8b2c9924a2987710f54f5c62853d86c Mon Sep 17 00:00:00 2001 -From: jmckenna -Date: Wed, 5 Apr 2017 09:35:06 -0400 -Subject: [PATCH] Use generic OS title for Titanium - ---- - new-kernel-pkg | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/new-kernel-pkg b/new-kernel-pkg -index 847e959..977ef2d 100755 ---- a/new-kernel-pkg -+++ b/new-kernel-pkg -@@ -166,6 +166,8 @@ set_title() { - fi - elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then - title=$(echo $version | sed 's/ /_/g') -+ elif [ -f /etc/build.info ]; then -+ title="Linux ($version)" - elif [ -f /etc/os-release ]; then - . /etc/os-release - title="$NAME ($version) $VERSION" --- -1.9.1 - diff --git a/grub/grubby/centos/patches/1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch b/grub/grubby/centos/patches/1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch deleted file mode 100644 index c91096dbb..000000000 --- a/grub/grubby/centos/patches/1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch +++ /dev/null @@ -1,263 +0,0 @@ -From b2fc58bcd1f18cbc3e0b3d303e9f2132d0e36cd8 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Tue, 13 Feb 2018 22:48:54 -0500 -Subject: [PATCH 1/1] Add support for updating grub.cfg with multiboot 2 - ---- - Makefile | 5 +++ - __init__.py | 8 ++++ - grub-cfg-update | 17 ++++++++ - grub_cfg_update.py | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - new-kernel-pkg | 33 ++++++++++---- - 5 files changed, 181 insertions(+), 8 deletions(-) - create mode 100644 __init__.py - create mode 100644 grub-cfg-update - create mode 100644 grub_cfg_update.py - -diff --git a/Makefile b/Makefile -index e021f35..93fa41b 100644 ---- a/Makefile -+++ b/Makefile -@@ -56,6 +56,11 @@ install: all - install -m 755 grubby $(DESTDIR)$(PREFIX)/sbin ; \ - install -m 644 grubby.8 $(DESTDIR)/$(mandir)/man8 ; \ - fi -+ mkdir -p $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby -+ install -m 644 grub_cfg_update.py $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby/grub_cfg_update.py -+ install -m 644 __init__.py $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby/__init__.py -+ install -m 500 grub-cfg-update $(DESTDIR)$(PREFIX)/sbin/grub-cfg-update -+ - - grubby:: $(OBJECTS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS) -diff --git a/__init__.py b/__init__.py -new file mode 100644 -index 0000000..5f30af6 ---- /dev/null -+++ b/__init__.py -@@ -0,0 +1,8 @@ -+#!/usr/bin/env python -+# -+# Copyright (c) 2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -\ No newline at end of file -diff --git a/grub-cfg-update b/grub-cfg-update -new file mode 100644 -index 0000000..5e457e9 ---- /dev/null -+++ b/grub-cfg-update -@@ -0,0 +1,17 @@ -+#!/usr/bin/env python -+ -+""" -+Copyright (c) 2018 Wind River Systems, Inc. -+ SPDX-License-Identifier: Apache-2.0 -+ -+ -+ -+""" -+ -+import sys -+ -+from grubby.grub_cfg_update import main -+ -+if __name__ == "__main__": -+ main() -+ -diff --git a/grub_cfg_update.py b/grub_cfg_update.py -new file mode 100644 -index 0000000..f5cd174 ---- /dev/null -+++ b/grub_cfg_update.py -@@ -0,0 +1,126 @@ -+#!/usr/bin/env python -+# -+# Copyright (c) 2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -+import sys -+import argparse -+import os.path -+import re -+import ntpath -+ -+ -+LINUX_KERNEL_RE = "^[ \t]*module2[ \t]{1,}/vmlinuz-[^ \n\t]*" -+INITRD_RE = "^[ \t]*module2[ \t]{1,}/initramfs-[^ \n\t]*" -+ -+ -+def is_title(line): -+ m = re.search('^[ ]*menuentry ', line) -+ if m: -+ return True -+ return False -+ -+ -+def update_title(line, ver): -+ m = re.search("Linux [^ \n\t']*", line) -+ if not m: -+ print "Title pattern not understandable, not updated" -+ return line -+ new_line = re.sub("Linux [^ \n\t']*", "Linux %s" % ver, line) -+ return new_line -+ -+ -+def is_kernel(line): -+ m = re.search(LINUX_KERNEL_RE, line) -+ if m: -+ return True -+ return False -+ -+ -+def update_kernel(line, kernel): -+ kernel_name = ntpath.basename(kernel) -+ new_line = re.sub(LINUX_KERNEL_RE, -+ " module2 /%s" % kernel_name, -+ line) -+ return new_line -+ -+ -+def is_initrd(line): -+ m = re.search(INITRD_RE, line) -+ if m: -+ return True -+ return False -+ -+ -+def update_initrd(line, initrd): -+ initrd_name = ntpath.basename(initrd) -+ new_line = re.sub(INITRD_RE, -+ " module2 /%s" % initrd_name, -+ line) -+ return new_line -+ -+ -+def convert_line(line, version): -+ pattern = "^[ \t]*echo[ \t]*['\"]Loading Linux [^ \n\t]*" -+ m = re.search(pattern, line) -+ if not m: -+ return line -+ -+ return " echo 'Loading Linux %s ...'\n" % version -+ -+ -+def update_cfg(cfg, kernel, initramfs, ver, cfg_out): -+ if not os.path.isfile(cfg): -+ print "grub config file %s not found\n" % cfg -+ sys.exit(-1) -+ -+ if not os.path.isfile(kernel): -+ print "specified kernel file %s not found\n" % kernel -+ sys.exit(-1) -+ -+ if not os.path.isfile(initramfs): -+ print "specified initrd file %s not found\n" % initramfs -+ sys.exit(-1) -+ -+ new_file_content = [] -+ with open(cfg) as f: -+ for line in f: -+ if is_title(line): -+ new_line = update_title(line, ver) -+ print new_line -+ elif is_kernel(line): -+ new_line = update_kernel(line, kernel) -+ print new_line -+ elif is_initrd(line): -+ new_line = update_initrd(line, initramfs) -+ print new_line -+ else: -+ new_line = convert_line(line, ver) -+ print new_line -+ -+ new_file_content.append(new_line) -+ with open(cfg_out, 'w') as f: -+ for line in new_file_content: -+ f.write("%s" % line) -+ -+ -+def main(): -+ try: -+ parser = argparse.ArgumentParser(description='Update tboot enabled grub config') -+ parser.add_argument('cfg', help='original grub.cfg file path') -+ parser.add_argument('kernel', help='kernel file path') -+ parser.add_argument('initramfs', help='initramfs file path') -+ parser.add_argument('version', help='new version of kernel') -+ parser.add_argument('--cfg-out', help='updated grub.cfg target file path') -+ args = parser.parse_args() -+ cfg_out = args.cfg_out -+ if cfg_out is None: -+ cfg_out = args.cfg -+ -+ update_cfg(args.cfg, args.kernel, args.initramfs, args.version, cfg_out) -+ except Exception as e: -+ print e -+ sys.exit(-1) -diff --git a/new-kernel-pkg b/new-kernel-pkg -index 977ef2d..1bb0a64 100755 ---- a/new-kernel-pkg -+++ b/new-kernel-pkg -@@ -185,6 +185,11 @@ install() { - return - fi - -+ grep -q 'tboot=true' /proc/cmdline 2>/dev/null -+ if [ $? == 0 ] ; then -+ return -+ fi -+ - INITRD="" - if [ -f $initrdfile ]; then - [ -n "$verbose" ] && echo "found $initrdfile and using it with grubby" -@@ -334,6 +339,11 @@ remove() { - return - fi - -+ grep -q 'tboot=true' /proc/cmdline 2>/dev/null -+ if [ $? == 0 ] ; then -+ return -+ fi -+ - local files - local f - files="/etc/kernel/prerm.d/*[^~] /etc/kernel/prerm.d/$version/*[^~]" -@@ -483,14 +493,21 @@ update() { - fi - - if [ -n "$cfgGrub2Efi" ]; then -- [ -n "$verbose" ] && echo "updating $version from $grub2EfiConfig" -- ARGS="--grub2 -c $grub2EfiConfig --efi --update-kernel=$kernelImage \ -- $INITRD ${kernargs:+--args=\"$kernargs\"} \ -- ${removeargs:+--remove-args=\"$removeargs\"} \ -- --title=\"$title\$debugtitle\"" -- -- rungrubby ${ARGS} -- rungrubby --debug ${ARGS} -+ grep -q 'tboot=true' /proc/cmdline 2>/dev/null -+ if [ $? == 0 ] ; then -+ [ -n "$verbose" ] && echo "calling grub-cfg-update $grub2EfiConfig $kernelImage $initrdfile $version" -+ grub-cfg-update $grub2EfiConfig $kernelImage $initrdfile $version -+ return -+ else -+ [ -n "$verbose" ] && echo "updating $version from $grub2EfiConfig" -+ ARGS="--grub2 -c $grub2EfiConfig --efi --update-kernel=$kernelImage \ -+ $INITRD ${kernargs:+--args=\"$kernargs\"} \ -+ ${removeargs:+--remove-args=\"$removeargs\"} \ -+ --title=\"$title\$debugtitle\"" -+ -+ rungrubby ${ARGS} -+ rungrubby --debug ${ARGS} -+ fi - else - [ -n "$verbose" ] && echo "$grub2EfiConfig does not exist, not running grubby" - fi --- -1.8.3.1 - diff --git a/grub/grubby/centos/srpm_path b/grub/grubby/centos/srpm_path deleted file mode 100644 index e07ec94cb..000000000 --- a/grub/grubby/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/grubby-8.28-25.el7.src.rpm diff --git a/kubernetes/chartmuseum/centos/build_srpm.data b/kubernetes/chartmuseum/centos/build_srpm.data deleted file mode 100644 index ef2acff03..000000000 --- a/kubernetes/chartmuseum/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -VERSION=0.12.0 -TAR_NAME=chartmuseum -TAR="$TAR_NAME-$VERSION.tar.gz" -COPY_LIST="${CGCS_BASE}/downloads/$TAR $STX_BASE/downloads/chartmuseum-v0.12.0-amd64" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/chartmuseum/centos/chartmuseum.spec b/kubernetes/chartmuseum/centos/chartmuseum.spec deleted file mode 100644 index f740c86ae..000000000 --- a/kubernetes/chartmuseum/centos/chartmuseum.spec +++ /dev/null @@ -1,71 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (c) 2020 Wind River Systems, Inc. -# -%global with_debug 0 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -Name: chartmuseum -Version: 0.12.0 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: Helm Chart Repository with support for Amazon S3 and Google Cloud Storage -Group: Kubernetes -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz -Source1: chartmuseum-v0.12.0-amd64 -Packager: Wind River -URL: https://github.com/helm/chartmuseum -#URL: https://s3.amazonaws.com/chartmuseum - -BuildRequires: pkgconfig(systemd) -BuildRequires: pkgconfig(libseccomp) -BuildRequires: pkgconfig(libsystemd-journal) - -# Build with our own prefered golang, not 1.11 from CentOS -# BuildRequires: golang >= 1.10.0 -BuildRequires: golang >= 1.13.0 - -BuildRequires: rsync -BuildRequires: go-md2man -BuildRequires: go-bindata -BuildRequires: rpm-devel >= 4.14.0 -BuildRequires: rpm-libs >= 4.14.0 - -Requires: /bin/bash - -%define CHARTMUSEUM_DIR ${HOME}/src/github.com/helm/%{name} - -%description -%{summary} - -%prep -%setup -q -c -n %{name} - -%build -# NOTE: chartmuseum is only used to build helm charts, and is not -# part of the ISO. -# Gather the licence and readme from the source tarball. -mkdir -v -p %{CHARTMUSEUM_DIR} -mv -v %{name}/* %{CHARTMUSEUM_DIR}/ -mv -v %{CHARTMUSEUM_DIR}/{LICENSE,README.md} %{name}/ -pushd %{CHARTMUSEUM_DIR} -# Stub out the make to build golang package; we are using a binary. -#make -popd - -%install -install -d %{buildroot}%{_bindir} -install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/chartmuseum - -%files -%defattr(-,root,root,-) -%doc %{name}/README.md -%license %{name}/LICENSE -%{_bindir}/chartmuseum - -%changelog diff --git a/kubernetes/cni/bond-cni/centos/bond-cni.spec b/kubernetes/cni/bond-cni/centos/bond-cni.spec deleted file mode 100644 index 445bf9c49..000000000 --- a/kubernetes/cni/bond-cni/centos/bond-cni.spec +++ /dev/null @@ -1,79 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (c) 2020 Wind River Systems, Inc. -# - -# Use the same build parameters as the other CNI plugins from containernetworking-plugins -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project k8snetworkplumbingwg -%global repo bond-cni -# https://github.com/k8snetworkplumbingwg/bond-cni -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit bff6422d7089d988dc1548e6abe0543601f6e1c7 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: bond-cni -Version: 1.0 -Release: %{shortcommit}%{?_tis_dist}.%{tis_patch_ver} -Summary: Bond CNI network plugin -License: ASL 2.0 -URL: https://%{provider_prefix} - -Source0: %{repo}-%{commit}.tar.gz -Patch1: 0001-Add-explicit-vendor-module-dependencies.patch -ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 %{ix86} - -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang = 1.17.5} -Provides: bond-cni = %{version}-%{release} - -%description -The Bond-CNI concerns itself only with providing network connectivity via -bonding of containers and removing any allocated resources when the container -is deleted. - -%prep -%setup -n %{repo}-%{commit} -%patch1 -p1 - -%build -export ORG_PATH="%{provider}.%{provider_tld}/%{project}" -export REPO_PATH="$ORG_PATH/%{repo}" - -if [ ! -h gopath/src/${REPO_PATH} ]; then - mkdir -p gopath/src/${ORG_PATH} - ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 -fi - -export GOPATH=$(pwd)/gopath -mkdir -p $(pwd)/bin - -echo "Building bond-cni plugin" - -%gobuild -o "${PWD}/bin/bond" "${PWD}/bond/" - -%install -install -d -p %{buildroot}/var/opt/cni/bin -install -p -m 0755 bin/* %{buildroot}/var/opt/cni/bin - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc *.md -%dir /var/opt/cni/bin -/var/opt/cni/bin/* - -%changelog -* Mon Jun 06 2022 Dan Voiculeasa -- Update install directory to /var/opt/cni/bin. -* Fri May 27 2022 Steven Webster -- Update install directory to /opt/cni/bin. -* Fri Jan 21 2022 Steven Webster -- Initial package, based on v1.0 + 14 additional commits. diff --git a/kubernetes/cni/bond-cni/centos/build_srpm.data b/kubernetes/cni/bond-cni/centos/build_srpm.data deleted file mode 100644 index 390b3dc00..000000000 --- a/kubernetes/cni/bond-cni/centos/build_srpm.data +++ /dev/null @@ -1,7 +0,0 @@ -VERSION=bff6422d7089d988dc1548e6abe0543601f6e1c7 -TAR_NAME=bond-cni -TAR="${TAR_NAME}-${VERSION}.tar.gz" - -COPY_LIST="${CGCS_BASE}/downloads/${TAR} ${FILES_BASE}/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch b/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch deleted file mode 100644 index 105b8ecbf..000000000 --- a/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 76ac4271502d6356f5150f6047d9dc05eb2470bd Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Fri, 8 Apr 2022 16:01:58 -0400 -Subject: [PATCH] Add explicit vendor module dependencies - -Signed-off-by: Steven Webster ---- - go.mod | 6 ++++++ - vendor/modules.txt | 11 +++++++---- - 2 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/go.mod b/go.mod -index c334299..385a70f 100644 ---- a/go.mod -+++ b/go.mod -@@ -8,3 +8,9 @@ require ( - github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 - github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 - ) -+ -+require ( -+ github.com/coreos/go-iptables v0.6.0 // indirect -+ github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 // indirect -+ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect -+) -diff --git a/vendor/modules.txt b/vendor/modules.txt -index ac4b3f5..d684960 100644 ---- a/vendor/modules.txt -+++ b/vendor/modules.txt -@@ -1,5 +1,5 @@ - # github.com/containernetworking/cni v1.0.1 --## explicit -+## explicit; go 1.14 - github.com/containernetworking/cni/pkg/invoke - github.com/containernetworking/cni/pkg/skel - github.com/containernetworking/cni/pkg/types -@@ -11,22 +11,25 @@ github.com/containernetworking/cni/pkg/types/internal - github.com/containernetworking/cni/pkg/utils - github.com/containernetworking/cni/pkg/version - # github.com/containernetworking/plugins v1.0.1 --## explicit -+## explicit; go 1.16 - github.com/containernetworking/plugins/pkg/ip - github.com/containernetworking/plugins/pkg/ipam - github.com/containernetworking/plugins/pkg/ns - github.com/containernetworking/plugins/pkg/utils/sysctl - # github.com/coreos/go-iptables v0.6.0 -+## explicit; go 1.16 - github.com/coreos/go-iptables/iptables - # github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 -+## explicit - github.com/safchain/ethtool - # github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 --## explicit -+## explicit; go 1.12 - github.com/vishvananda/netlink - github.com/vishvananda/netlink/nl - # github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 --## explicit -+## explicit; go 1.12 - github.com/vishvananda/netns - # golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e -+## explicit; go 1.17 - golang.org/x/sys/internal/unsafeheader - golang.org/x/sys/unix --- -2.29.2 - diff --git a/kubernetes/cni/plugins/centos/build_srpm.data b/kubernetes/cni/plugins/centos/build_srpm.data deleted file mode 100644 index dab75dc8b..000000000 --- a/kubernetes/cni/plugins/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="${CGCS_BASE}/downloads/containernetworking-plugins-v1.0.1.tar.gz ${FILES_BASE}/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/cni/plugins/centos/containernetworking-plugins.spec b/kubernetes/cni/plugins/centos/containernetworking-plugins.spec deleted file mode 100644 index 900f551a2..000000000 --- a/kubernetes/cni/plugins/centos/containernetworking-plugins.spec +++ /dev/null @@ -1,215 +0,0 @@ -%global with_debug 1 -%global with_check 0 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project containernetworking -%global repo plugins -# https://github.com/containernetworking/plugins -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit fe60fcddb897079746ec1523fd1837ab05b1e689 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: containernetworking-plugins -Version: 1.0.1 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: CNI network plugins -License: ASL 2.0 -URL: https://%{provider_prefix} - -Source0: %{project}-%{repo}-v%{version}.tar.gz -ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 %{ix86} - -Patch0001: 0001-Allow-setting-sysctls-on-a-particular-interface.patch - -%if 0%{?fedora} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -%else -#BuildRequires: go-toolset-1.10 -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -BuildRequires: openssl-devel -%endif #fedora - -Provides: containernetworking-cni = %{version}-%{release} - -%description -The CNI (Container Network Interface) project consists of a specification -and libraries for writing plugins to configure network interfaces in Linux -containers, along with a number of supported plugins. CNI concerns itself -only with network connectivity of containers and removing allocated resources -when the container is deleted. - -%{?enable_gotoolset110} - -%prep -%setup -q -n %{project}-%{repo}-v%{version} -%patch0001 -p1 -rm -rf plugins/main/windows - -%build -export ORG_PATH="%{provider}.%{provider_tld}/%{project}" -export REPO_PATH="$ORG_PATH/%{repo}" - -if [ ! -h gopath/src/${REPO_PATH} ]; then - mkdir -p gopath/src/${ORG_PATH} - ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 -fi - -export GOPATH=$(pwd)/gopath -mkdir -p $(pwd)/bin - -echo "Building plugins" -export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample" -for d in $PLUGINS; do - if [ -d "$d" ]; then - plugin="$(basename "$d")" - echo " $plugin" - %gobuild -o "${PWD}/bin/$plugin" "$@" "$REPO_PATH"/$d - fi -done - -%install -install -d -p %{buildroot}/var/opt/cni/bin -install -p -m 0755 bin/* %{buildroot}/var/opt/cni/bin - -%check -%if 0%{?with_check} - -%if ! 0%{?gotest:1} -%global gotest go test -%endif - -%gotest %{import_path}/libcni -%gotest %{import_path}/pkg/invoke -%gotest %{import_path}/pkg/ip -%gotest %{import_path}/pkg/ipam -%gotest %{import_path}/pkg/ns -%gotest %{import_path}/pkg/skel -%gotest %{import_path}/pkg/types -%gotest %{import_path}/pkg/types/020 -%gotest %{import_path}/pkg/types/current -%gotest %{import_path}/pkg/utils -%gotest %{import_path}/pkg/utils/hwaddr -%gotest %{import_path}/pkg/version -%gotest %{import_path}/pkg/version/legacy_examples -%gotest %{import_path}/pkg/version/testhelpers -%gotest %{import_path}/plugins/ipam/dhcp -%gotest %{import_path}/plugins/ipam/host-local -%gotest %{import_path}/plugins/ipam/host-local/backend/allocator -%gotest %{import_path}/plugins/main/bridge -%gotest %{import_path}/plugins/main/ipvlan -%gotest %{import_path}/plugins/main/loopback -%gotest %{import_path}/plugins/main/macvlan -%gotest %{import_path}/plugins/main/ptp -%gotest %{import_path}/plugins/meta/flannel -%gotest %{import_path}/plugins/test/noop -%endif - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc *.md -%dir /var/opt/cni/bin -/var/opt/cni/bin/* - -%changelog -* Mon Jun 27 2022 Steven Webster -- tuning: Support for IFNAME key - -* Mon Jun 06 2022 Dan Voiculeasa -- Update install directory to /var/opt/cni/bin. - -* Thu Feb 17 2022 Steven Webster - 1.0.1 -- bump to v1.0.1 - -* Sun Aug 08 2021 Steven Webster -- Support for compilation on StarlingX - -* Fri Jun 07 2019 Lokesh Mandvekar - 0.8.1-1 -- Resolves: #1717915 - bump to v0.8.1 - -* Tue May 14 2019 Lokesh Mandvekar - 0.8.0-1 -- Resolves: #1709630 - rebase to v0.8.0 - -* Wed Mar 27 2019 Frantisek Kluknavsky - 0.7.5-2 -- rebase - -* Mon Jan 07 2019 Lokesh Mandvekar - 0.7.4-1 -- Resolves: #1664009 - bump to v0.7.4 -- remove unused devel and unit-test* packages -- update go build env - -* Wed Nov 21 2018 Frantisek Kluknavsky - 0.7.3-3 -- buildrequires for centos - -* Wed Oct 03 2018 Frantisek Kluknavsky - 0.7.3-2 -- rebase - -* Wed Oct 03 2018 Frantisek Kluknavsky - 0.7.1-2 -- scl go toolset - -* Mon Jul 23 2018 Frantisek Kluknavsky - 0.7.1-1 -- rebase - -* Thu May 10 2018 Frantisek Kluknavsky - 0.7.0-101 -- rebase -- patches already upstream, removed - -* Thu Apr 26 2018 Frantisek Kluknavsky - 0.6.0-6 -- Imported from Fedora -- Renamed CNI -> plugins - -* Mon Apr 2 2018 Peter Robinson 0.6.0-4 -- Own the libexec cni directory - -* Wed Feb 07 2018 Fedora Release Engineering - 0.6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Jan 23 2018 Dan Williams - 0.6.0-2 -- skip settling IPv4 addresses - -* Mon Jan 08 2018 Frantisek Kluknavsky - 0.6.0-1 -- rebased to 7480240de9749f9a0a5c8614b17f1f03e0c06ab9 - -* Fri Oct 13 2017 Lokesh Mandvekar - 0.5.2-7 -- do not install to /opt (against Fedora Guidelines) - -* Thu Aug 24 2017 Jan Chaloupka - 0.5.2-6 -- Enable devel subpackage - -* Wed Aug 02 2017 Fedora Release Engineering - 0.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.5.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jul 13 2017 Lokesh Mandvekar - 0.5.2-3 -- excludearch: ppc64 as it's not in goarches anymore -- re-enable s390x - -* Fri Jun 30 2017 Lokesh Mandvekar - 0.5.2-2 -- upstream moved to github.com/containernetworking/plugins -- built commit dcf7368 -- provides: containernetworking-plugins -- use vendored deps because they're a lot less of a PITA -- excludearch: s390x for now (rhbz#1466865) - -* Mon Jun 12 2017 Timothy St. Clair - 0.5.2-1 -- Update to 0.5.2 -- Softlink to default /opt/cni/bin directories - -* Sun May 07 2017 Timothy St. Clair - 0.5.1-1 -- Initial package diff --git a/kubernetes/cni/plugins/centos/containernetworking-plugins.spec.orig b/kubernetes/cni/plugins/centos/containernetworking-plugins.spec.orig deleted file mode 100644 index 860427851..000000000 --- a/kubernetes/cni/plugins/centos/containernetworking-plugins.spec.orig +++ /dev/null @@ -1,199 +0,0 @@ -%global with_debug 1 -%global with_check 0 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project containernetworking -%global repo plugins -# https://github.com/containernetworking/plugins -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit fe60fcddb897079746ec1523fd1837ab05b1e689 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: containernetworking-plugins -Version: 0.8.1 -Release: 1%{?dist} -Summary: CNI network plugins -License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 %{ix86} - -%if 0%{?fedora} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -%else -BuildRequires: go-toolset-1.10 -BuildRequires: openssl-devel -%endif #fedora - -Provides: containernetworking-cni = %{version}-%{release} - -%description -The CNI (Container Network Interface) project consists of a specification -and libraries for writing plugins to configure network interfaces in Linux -containers, along with a number of supported plugins. CNI concerns itself -only with network connectivity of containers and removing allocated resources -when the container is deleted. - -%{?enable_gotoolset110} - -%prep -%autosetup -Sgit -n %{repo}-%{commit} -rm -rf plugins/main/windows - -%build -export ORG_PATH="%{provider}.%{provider_tld}/%{project}" -export REPO_PATH="$ORG_PATH/%{repo}" - -if [ ! -h gopath/src/${REPO_PATH} ]; then - mkdir -p gopath/src/${ORG_PATH} - ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 -fi - -export GOPATH=$(pwd)/gopath -mkdir -p $(pwd)/bin - -echo "Building plugins" -export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample" -for d in $PLUGINS; do - if [ -d "$d" ]; then - plugin="$(basename "$d")" - echo " $plugin" - %gobuild -o "${PWD}/bin/$plugin" "$@" "$REPO_PATH"/$d - fi -done - -%install -install -d -p %{buildroot}%{_libexecdir}/cni/ -install -p -m 0755 bin/* %{buildroot}/%{_libexecdir}/cni - -%check -%if 0%{?with_check} - -%if ! 0%{?gotest:1} -%global gotest go test -%endif - -%gotest %{import_path}/libcni -%gotest %{import_path}/pkg/invoke -%gotest %{import_path}/pkg/ip -%gotest %{import_path}/pkg/ipam -%gotest %{import_path}/pkg/ns -%gotest %{import_path}/pkg/skel -%gotest %{import_path}/pkg/types -%gotest %{import_path}/pkg/types/020 -%gotest %{import_path}/pkg/types/current -%gotest %{import_path}/pkg/utils -%gotest %{import_path}/pkg/utils/hwaddr -%gotest %{import_path}/pkg/version -%gotest %{import_path}/pkg/version/legacy_examples -%gotest %{import_path}/pkg/version/testhelpers -%gotest %{import_path}/plugins/ipam/dhcp -%gotest %{import_path}/plugins/ipam/host-local -%gotest %{import_path}/plugins/ipam/host-local/backend/allocator -%gotest %{import_path}/plugins/main/bridge -%gotest %{import_path}/plugins/main/ipvlan -%gotest %{import_path}/plugins/main/loopback -%gotest %{import_path}/plugins/main/macvlan -%gotest %{import_path}/plugins/main/ptp -%gotest %{import_path}/plugins/meta/flannel -%gotest %{import_path}/plugins/test/noop -%endif - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc *.md -%dir %{_libexecdir}/cni -%{_libexecdir}/cni/* - -%changelog -* Fri Jun 07 2019 Lokesh Mandvekar - 0.8.1-1 -- Resolves: #1717915 - bump to v0.8.1 - -* Tue May 14 2019 Lokesh Mandvekar - 0.8.0-1 -- Resolves: #1709630 - rebase to v0.8.0 - -* Wed Mar 27 2019 Frantisek Kluknavsky - 0.7.5-2 -- rebase - -* Mon Jan 07 2019 Lokesh Mandvekar - 0.7.4-1 -- Resolves: #1664009 - bump to v0.7.4 -- remove unused devel and unit-test* packages -- update go build env - -* Wed Nov 21 2018 Frantisek Kluknavsky - 0.7.3-3 -- buildrequires for centos - -* Wed Oct 03 2018 Frantisek Kluknavsky - 0.7.3-2 -- rebase - -* Wed Oct 03 2018 Frantisek Kluknavsky - 0.7.1-2 -- scl go toolset - -* Mon Jul 23 2018 Frantisek Kluknavsky - 0.7.1-1 -- rebase - -* Thu May 10 2018 Frantisek Kluknavsky - 0.7.0-101 -- rebase -- patches already upstream, removed - -* Thu Apr 26 2018 Frantisek Kluknavsky - 0.6.0-6 -- Imported from Fedora -- Renamed CNI -> plugins - -* Mon Apr 2 2018 Peter Robinson 0.6.0-4 -- Own the libexec cni directory - -* Wed Feb 07 2018 Fedora Release Engineering - 0.6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Jan 23 2018 Dan Williams - 0.6.0-2 -- skip settling IPv4 addresses - -* Mon Jan 08 2018 Frantisek Kluknavsky - 0.6.0-1 -- rebased to 7480240de9749f9a0a5c8614b17f1f03e0c06ab9 - -* Fri Oct 13 2017 Lokesh Mandvekar - 0.5.2-7 -- do not install to /opt (against Fedora Guidelines) - -* Thu Aug 24 2017 Jan Chaloupka - 0.5.2-6 -- Enable devel subpackage - -* Wed Aug 02 2017 Fedora Release Engineering - 0.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.5.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jul 13 2017 Lokesh Mandvekar - 0.5.2-3 -- excludearch: ppc64 as it's not in goarches anymore -- re-enable s390x - -* Fri Jun 30 2017 Lokesh Mandvekar - 0.5.2-2 -- upstream moved to github.com/containernetworking/plugins -- built commit dcf7368 -- provides: containernetworking-plugins -- use vendored deps because they're a lot less of a PITA -- excludearch: s390x for now (rhbz#1466865) - -* Mon Jun 12 2017 Timothy St. Clair - 0.5.2-1 -- Update to 0.5.2 -- Softlink to default /opt/cni/bin directories - -* Sun May 07 2017 Timothy St. Clair - 0.5.1-1 -- Initial package - diff --git a/kubernetes/cni/plugins/centos/files/0001-Allow-setting-sysctls-on-a-particular-interface.patch b/kubernetes/cni/plugins/centos/files/0001-Allow-setting-sysctls-on-a-particular-interface.patch deleted file mode 100644 index bd46bbf6f..000000000 --- a/kubernetes/cni/plugins/centos/files/0001-Allow-setting-sysctls-on-a-particular-interface.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c16cff9805427c5db34b43de3155769b362f596e Mon Sep 17 00:00:00 2001 -From: Piotr Skamruk -Date: Fri, 1 Oct 2021 18:07:50 +0200 -Subject: [PATCH] Allow setting sysctls on a particular interface - -Signed-off-by: Piotr Skamruk -[ commit c16cff9805427c5db34b43de3155769b362f596e - in upstream repo https://github.com/containernetworking/plugins ] -Signed-off-by: Steven Webster ---- - plugins/meta/tuning/tuning.go | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/plugins/meta/tuning/tuning.go b/plugins/meta/tuning/tuning.go -index 7b56944..d9eef83 100644 ---- a/plugins/meta/tuning/tuning.go -+++ b/plugins/meta/tuning/tuning.go -@@ -325,6 +325,11 @@ func cmdAdd(args *skel.CmdArgs) error { - - err = ns.WithNetNSPath(args.Netns, func(_ ns.NetNS) error { - for key, value := range tuningConf.SysCtl { -+ // If the key contains `IFNAME` - substitute it with args.IfName -+ // to allow setting sysctls on a particular interface, on which -+ // other operations (like mac/mtu setting) are performed -+ key = strings.Replace(key, "IFNAME", args.IfName, 1) -+ - fileName := filepath.Join("/proc/sys", strings.Replace(key, ".", "/", -1)) - fileName = filepath.Clean(fileName) - --- -2.29.2 - diff --git a/kubernetes/containerd/centos/build_srpm.data b/kubernetes/containerd/centos/build_srpm.data deleted file mode 100644 index cbe50d08e..000000000 --- a/kubernetes/containerd/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -COPY_LIST="${STX_BASE}/downloads/containerd-v1.4.11.tar.gz - ${STX_BASE}/downloads/runc-1.0.2.tar.gz - ${STX_BASE}/downloads/crictl-v1.21.0-linux-amd64.tar.gz - ${FILES_BASE}/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/containerd/centos/containerd.spec b/kubernetes/containerd/centos/containerd.spec deleted file mode 100644 index 1489874d7..000000000 --- a/kubernetes/containerd/centos/containerd.spec +++ /dev/null @@ -1,115 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (C) 2019 Intel Corporation -# -Name: containerd -Version: 1.4.11 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: Open and reliable container runtime -Group: Kubernetes -License: ASL 2.0 -Source0: containerd-v%{version}.tar.gz -Source1: runc-1.0.2.tar.gz -Source2: crictl-v1.21.0-linux-amd64.tar.gz -Source3: crictl.yaml -Source4: k8s-container-cleanup.sh -Patch1: 0001-customize-containerd-for-StarlingX.patch -Patch2: 0002-CRI-Reduce-clutter-of-log-entries-during-process-exe.patch -URL: https://www.starlingx.io -Vendor: StarlingX -Packager: StarlingX - -BuildRequires: pkgconfig(systemd) -BuildRequires: pkgconfig(libseccomp) -BuildRequires: pkgconfig(libsystemd-journal) - -# Build with our own prefered golang -BuildRequires: golang >= 1.16.8 - -BuildRequires: systemd -BuildRequires: rsync -BuildRequires: go-md2man -BuildRequires: go-bindata -BuildRequires: rpm-devel >= 4.14.0 -BuildRequires: rpm-libs >= 4.14.0 - -# required packages on install -Requires: /bin/sh -Requires: systemd - -Provides: containerd -Provides: runc -Provides: containerd.io - - -%global _missing_build_ids_terminate_build 0 - -%define local_sbindir /usr/local/sbin -%define CONTAINERD_DIR ${HOME}/go/src/github.com/containerd/containerd -%define RUNC_DIR ${HOME}/go/src/github.com/opencontainers/runc - -%description -Containerd is an industry-standard container runtime with an emphasis on -simplicity, robustness and portability. It is available as a daemon for Linux -and Windows, which can manage the complete container lifecycle of its host -system: image transfer and storage, container execution and supervision, -low-level storage and network attachments, etc. - -%prep -%setup -q -c -n src -a 1 -%setup -q -c -T -D -n src -a 2 -%patch1 -p1 -%patch2 -p1 - -%build -# build containerd -rm -rf %{CONTAINERD_DIR} -mkdir -p %{CONTAINERD_DIR} -cp -a %{_builddir}/src/containerd/* %{CONTAINERD_DIR}/ -pushd %{CONTAINERD_DIR} -go env -w GO111MODULE=auto -make -popd - -# build runc -rm -rf %{RUNC_DIR} -mkdir -p %{RUNC_DIR} -cp -a %{_builddir}/src/runc/* %{RUNC_DIR}/ -pushd %{RUNC_DIR} -make -popd - -%install -# install containerd -install -d %{buildroot}%{_bindir} -install -p -m 755 %{CONTAINERD_DIR}/bin/containerd %{buildroot}%{_bindir}/containerd -install -d %{buildroot}%{_prefix}/local/bin -ln -s %{_bindir}/containerd %{buildroot}%{_prefix}/local/bin/containerd -install -p -m 755 %{CONTAINERD_DIR}/bin/containerd-shim %{buildroot}%{_bindir}/containerd-shim -install -p -m 755 %{CONTAINERD_DIR}/bin/containerd-shim-runc-v1 %{buildroot}%{_bindir}/containerd-shim-runc-v1 -install -p -m 755 %{CONTAINERD_DIR}/bin/containerd-shim-runc-v2 %{buildroot}%{_bindir}/containerd-shim-runc-v2 -install -p -m 755 %{CONTAINERD_DIR}/bin/containerd-stress %{buildroot}%{_bindir}/containerd-stress -install -p -m 755 %{CONTAINERD_DIR}/bin/ctr %{buildroot}%{_bindir}/ctr -install -p -m 755 %{RUNC_DIR}/runc %{buildroot}%{_bindir}/runc -install -p -m 755 %{_builddir}/src/crictl %{buildroot}%{_bindir}/crictl -install -d %{buildroot}%{_sysconfdir} -install -m 644 %{_sourcedir}/crictl.yaml %{buildroot}%{_sysconfdir}/crictl.yaml -install -d %{buildroot}%{_unitdir} -install -p -m 644 %{CONTAINERD_DIR}/containerd.service %{buildroot}%{_unitdir}/containerd.service -install -d %{buildroot}%{local_sbindir} -install -m 755 %{SOURCE4} %{buildroot}%{local_sbindir}/k8s-container-cleanup - -# list files owned by the package here -%files -%{_prefix}/local/bin/containerd -%{_bindir}/containerd -%{_bindir}/containerd-shim -%{_bindir}/containerd-shim-runc-v1 -%{_bindir}/containerd-shim-runc-v2 -%{_bindir}/containerd-stress -%{_bindir}/ctr -%{_bindir}/runc -%{_bindir}/crictl -%{_sysconfdir}/crictl.yaml -%{_unitdir}/containerd.service -%{local_sbindir}/k8s-container-cleanup diff --git a/kubernetes/containerd/centos/files/0001-customize-containerd-for-StarlingX.patch b/kubernetes/containerd/centos/files/0001-customize-containerd-for-StarlingX.patch deleted file mode 100644 index 1725737e7..000000000 --- a/kubernetes/containerd/centos/files/0001-customize-containerd-for-StarlingX.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ddd7b4af14c97fe14290ce422ccc103a799ea626 Mon Sep 17 00:00:00 2001 -From: Kaustubh Dhokte -Date: Tue, 1 Mar 2022 20:43:42 -0500 -Subject: [PATCH] customize containerd for StarlingX - -1. disable btrfs to avoid needing to pull in the devel package -2. docker registry in StarlingX 3.0 branch doesn't support POST method -for token and will return 400. Switch to GET method to get token if -StatusCode is 400. -3. hardcode version info due to miss git info in tarball. - -Signed-off-by: Kaustubh Dhokte ---- - containerd/Makefile | 3 ++- - containerd/remotes/docker/authorizer.go | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/containerd/Makefile b/containerd/Makefile -index c0fecb9a6..d8cef89d5 100644 ---- a/containerd/Makefile -+++ b/containerd/Makefile -@@ -20,7 +20,7 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - DESTDIR ?= /usr/local - - # Used to populate variables in version package. --VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) -+VERSION=v1.4.11 - REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) - PACKAGE=github.com/containerd/containerd - SHIM_CGO_ENABLED ?= 0 -@@ -78,6 +78,7 @@ endif - # Build tags apparmor and selinux are needed by CRI plugin. - GO_BUILDTAGS ?= apparmor selinux - GO_BUILDTAGS += ${DEBUG_TAGS} -+GO_BUILDTAGS += no_btrfs - GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",) - GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' - SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)' -diff --git a/containerd/remotes/docker/authorizer.go b/containerd/remotes/docker/authorizer.go -index 2f459b70c..330971d5e 100644 ---- a/containerd/remotes/docker/authorizer.go -+++ b/containerd/remotes/docker/authorizer.go -@@ -370,7 +370,8 @@ func (ah *authHandler) fetchTokenWithOAuth(ctx context.Context, to tokenOptions) - // Registries without support for POST may return 404 for POST /v2/token. - // As of September 2017, GCR is known to return 404. - // As of February 2018, JFrog Artifactory is known to return 401. -- if (resp.StatusCode == 405 && to.username != "") || resp.StatusCode == 404 || resp.StatusCode == 401 { -+ // Registry in StarlingX 6.0 returns 400 for POST /v2/token. Should check if still applicable. -+ if (resp.StatusCode == 405 && to.username != "") || resp.StatusCode == 404 || resp.StatusCode == 401 || resp.StatusCode == 400 { - return ah.fetchToken(ctx, to) - } else if resp.StatusCode < 200 || resp.StatusCode >= 400 { - b, _ := ioutil.ReadAll(io.LimitReader(resp.Body, 64000)) // 64KB --- -2.25.1 - diff --git a/kubernetes/containerd/centos/files/0002-CRI-Reduce-clutter-of-log-entries-during-process-exe.patch b/kubernetes/containerd/centos/files/0002-CRI-Reduce-clutter-of-log-entries-during-process-exe.patch deleted file mode 100644 index 10f349371..000000000 --- a/kubernetes/containerd/centos/files/0002-CRI-Reduce-clutter-of-log-entries-during-process-exe.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 80f56a43f5ff7f7d10689a21a004279345221f70 Mon Sep 17 00:00:00 2001 -From: Davanum Srinivas -Date: Wed, 6 Jan 2021 08:57:31 -0500 -Subject: [PATCH] [CRI] Reduce clutter of log entries during process execution - -Signed-off-by: Davanum Srinivas ---- - .../containerd/cri/pkg/server/container_execsync.go | 4 ++-- - .../cri/pkg/server/instrumented_service.go | 12 ++++++------ - .../containerd/cri/pkg/server/io/container_io.go | 4 ++-- - .../containerd/cri/pkg/server/io/exec_io.go | 2 +- - 4 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/containerd/vendor/github.com/containerd/cri/pkg/server/container_execsync.go b/containerd/vendor/github.com/containerd/cri/pkg/server/container_execsync.go -index 1c019f651..17c2bd39d 100644 ---- a/containerd/vendor/github.com/containerd/cri/pkg/server/container_execsync.go -+++ b/containerd/vendor/github.com/containerd/cri/pkg/server/container_execsync.go -@@ -164,14 +164,14 @@ func (c *criService) execInternal(ctx context.Context, container containerd.Cont - } - // Wait for the process to be killed. - exitRes := <-exitCh -- log.G(ctx).Infof("Timeout received while waiting for exec process kill %q code %d and error %v", -+ log.G(ctx).Debugf("Timeout received while waiting for exec process kill %q code %d and error %v", - execID, exitRes.ExitCode(), exitRes.Error()) - <-attachDone - log.G(ctx).Debugf("Stream pipe for exec process %q done", execID) - return nil, errors.Wrapf(execCtx.Err(), "timeout %v exceeded", opts.timeout) - case exitRes := <-exitCh: - code, _, err := exitRes.Result() -- log.G(ctx).Infof("Exec process %q exits with exit code %d and error %v", execID, code, err) -+ log.G(ctx).Debugf("Exec process %q exits with exit code %d and error %v", execID, code, err) - if err != nil { - return nil, errors.Wrapf(err, "failed while waiting for exec %q", execID) - } -diff --git a/containerd/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go b/containerd/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go -index 2c2528ab6..74bebe858 100644 ---- a/containerd/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go -+++ b/containerd/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go -@@ -247,12 +247,12 @@ func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSync - if err := in.checkInitialized(); err != nil { - return nil, err - } -- log.G(ctx).Infof("ExecSync for %q with command %+v and timeout %d (s)", r.GetContainerId(), r.GetCmd(), r.GetTimeout()) -+ log.G(ctx).Debugf("ExecSync for %q with command %+v and timeout %d (s)", r.GetContainerId(), r.GetCmd(), r.GetTimeout()) - defer func() { - if err != nil { - log.G(ctx).WithError(err).Errorf("ExecSync for %q failed", r.GetContainerId()) - } else { -- log.G(ctx).Infof("ExecSync for %q returns with exit code %d", r.GetContainerId(), res.GetExitCode()) -+ log.G(ctx).Debugf("ExecSync for %q returns with exit code %d", r.GetContainerId(), res.GetExitCode()) - log.G(ctx).Debugf("ExecSync for %q outputs - stdout: %q, stderr: %q", r.GetContainerId(), - res.GetStdout(), res.GetStderr()) - } -@@ -265,13 +265,13 @@ func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest) - if err := in.checkInitialized(); err != nil { - return nil, err - } -- log.G(ctx).Infof("Exec for %q with command %+v, tty %v and stdin %v", -+ log.G(ctx).Debugf("Exec for %q with command %+v, tty %v and stdin %v", - r.GetContainerId(), r.GetCmd(), r.GetTty(), r.GetStdin()) - defer func() { - if err != nil { - log.G(ctx).WithError(err).Errorf("Exec for %q failed", r.GetContainerId()) - } else { -- log.G(ctx).Infof("Exec for %q returns URL %q", r.GetContainerId(), res.GetUrl()) -+ log.G(ctx).Debugf("Exec for %q returns URL %q", r.GetContainerId(), res.GetUrl()) - } - }() - res, err = in.c.Exec(ctrdutil.WithNamespace(ctx), r) -@@ -282,12 +282,12 @@ func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequ - if err := in.checkInitialized(); err != nil { - return nil, err - } -- log.G(ctx).Infof("Attach for %q with tty %v and stdin %v", r.GetContainerId(), r.GetTty(), r.GetStdin()) -+ log.G(ctx).Debugf("Attach for %q with tty %v and stdin %v", r.GetContainerId(), r.GetTty(), r.GetStdin()) - defer func() { - if err != nil { - log.G(ctx).WithError(err).Errorf("Attach for %q failed", r.GetContainerId()) - } else { -- log.G(ctx).Infof("Attach for %q returns URL %q", r.GetContainerId(), res.Url) -+ log.G(ctx).Debugf("Attach for %q returns URL %q", r.GetContainerId(), res.Url) - } - }() - res, err = in.c.Attach(ctrdutil.WithNamespace(ctx), r) -diff --git a/containerd/vendor/github.com/containerd/cri/pkg/server/io/container_io.go b/containerd/vendor/github.com/containerd/cri/pkg/server/io/container_io.go -index c66549ca5..c69cadd6c 100644 ---- a/containerd/vendor/github.com/containerd/cri/pkg/server/io/container_io.go -+++ b/containerd/vendor/github.com/containerd/cri/pkg/server/io/container_io.go -@@ -114,7 +114,7 @@ func (c *ContainerIO) Pipe() { - c.stdout.Close() - c.stdoutGroup.Close() - wg.Done() -- logrus.Infof("Finish piping stdout of container %q", c.id) -+ logrus.Debugf("Finish piping stdout of container %q", c.id) - }() - } - -@@ -127,7 +127,7 @@ func (c *ContainerIO) Pipe() { - c.stderr.Close() - c.stderrGroup.Close() - wg.Done() -- logrus.Infof("Finish piping stderr of container %q", c.id) -+ logrus.Debugf("Finish piping stderr of container %q", c.id) - }() - } - } -diff --git a/containerd/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go b/containerd/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go -index 4a695030d..f1b9ef370 100644 ---- a/containerd/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go -+++ b/containerd/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go -@@ -99,7 +99,7 @@ func (e *ExecIO) Attach(opts AttachOptions) <-chan struct{} { - } - e.closer.wg.Done() - wg.Done() -- logrus.Infof("Finish piping %q of container exec %q", t, e.id) -+ logrus.Debugf("Finish piping %q of container exec %q", t, e.id) - } - - if opts.Stdout != nil { --- -2.25.1 - diff --git a/kubernetes/containerd/centos/files/crictl.yaml b/kubernetes/containerd/centos/files/crictl.yaml deleted file mode 100644 index 908ee5325..000000000 --- a/kubernetes/containerd/centos/files/crictl.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -runtime-endpoint: unix:///var/run/containerd/containerd.sock -image-endpoint: unix:///var/run/containerd/containerd.sock -debug: false diff --git a/kubernetes/containerd/centos/files/k8s-container-cleanup.sh b/kubernetes/containerd/centos/files/k8s-container-cleanup.sh deleted file mode 100755 index 19b7d2792..000000000 --- a/kubernetes/containerd/centos/files/k8s-container-cleanup.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -# The script will run during containerd.service ExecStop. -# This script detects whether systemd state is 'stopping' due to -# shutdown/reboot, then will stop all running containers before the -# service shuts down. -# -# All running containers are stopped one container at a time. -# The internal implementation of 'crictl stop --timeout ' -# sends a SIGTERM to the container, and will use SIGKILL only -# if the timeout is reached. -# - -NAME=$(basename "${0}") - -# Log info message to /var/log/daemon.log -function LOG { - logger -p daemon.info -t "${NAME}($$): " "${@}" -} - -# Log error message to /var/log/daemon.log -function ERROR { - logger -p daemon.error -t "${NAME}($$): " "${@}" -} - -state=$(timeout 10 systemctl is-system-running) -RC=$? -LOG "System state is: ${state}, RC = ${RC}." -case $RC in - 124) - # systemctl hung. - ERROR "systemctl timed out. System state unknown." - ;; - - [01]) - # 0 - running; 1 - initializing, starting, degraded, maintenance, stopping - if [ "$state" = "stopping" ]; then - LOG "Stopping all containers." - # Use crictl to gracefully stop each container. If specified timeout is - # reached, it forcibly kills the container. There is no need to check - # return code since there is nothing more we can do, and crictl already - # logs to daemon.log. - crictl ps -q | xargs -r -I {} crictl stop --timeout 5 {} - LOG "Stopping all containers completed." - exit 0 - fi - ;; -esac - -exit 0 diff --git a/kubernetes/docker-distribution/centos/build_srpm.data b/kubernetes/docker-distribution/centos/build_srpm.data deleted file mode 100644 index caab94ff6..000000000 --- a/kubernetes/docker-distribution/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -VERSION=2.7.1 -TAR_NAME="docker-distribution" -TAR="$TAR_NAME-v$VERSION.tar.gz" -COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/*" -TIS_PATCH_VER=PKG_GITREVCOUNT - diff --git a/kubernetes/docker-distribution/centos/docker-distribution.spec b/kubernetes/docker-distribution/centos/docker-distribution.spec deleted file mode 100644 index aadbc3470..000000000 --- a/kubernetes/docker-distribution/centos/docker-distribution.spec +++ /dev/null @@ -1,373 +0,0 @@ -%global with_devel 0 -%global with_unit_test 0 - -%if 0%{?fedora} || 0%{?rhel} == 6 -%global with_debug 1 -%global with_check 1 -%else -%global with_debug 0 -%global with_check 0 -%endif - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; -%endif - -%if ! 0%{?gotest:1} -%define gotest() go test -ldflags "${LDFLAGS:-}" %{?**} -%endif - -%global provider github -%global provider_tld com -%global project docker -%global repo distribution -# https://github.com/docker/distribution -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: %{project}-%{repo} -Version: 2.7.1 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: Docker toolset to pack, ship, store, and deliver content -License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: %{project}-%{repo}-v%{version}.tar.gz -Source1: %{name}.service -Source2: config.yml -BuildRequires: systemd -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -Provides: docker-registry = %{version}-%{release} -Obsoletes: docker-registry <= 0.9.1-5 - -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}} - -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -# Build with our own prefered golang, not 1.11 from CentOS -# BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13} - -%description -%{summary} - -%if 0%{?with_devel} -%package devel -Summary: %{summary} -BuildArch: noarch - -%if 0%{?with_check} -BuildRequires: golang(github.com/AdRoll/goamz/aws) -BuildRequires: golang(github.com/AdRoll/goamz/cloudfront) -BuildRequires: golang(github.com/AdRoll/goamz/s3) -BuildRequires: golang(github.com/Azure/azure-sdk-for-go/storage) -BuildRequires: golang(github.com/Sirupsen/logrus) -BuildRequires: golang(github.com/Sirupsen/logrus/formatters/logstash) -BuildRequires: golang(github.com/bugsnag/bugsnag-go) -BuildRequires: golang(github.com/denverdino/aliyungo/oss) -BuildRequires: golang(github.com/docker/libtrust) -BuildRequires: golang(github.com/garyburd/redigo/redis) -BuildRequires: golang(github.com/gorilla/handlers) -BuildRequires: golang(github.com/gorilla/mux) -BuildRequires: golang(github.com/mitchellh/mapstructure) -BuildRequires: golang(github.com/ncw/swift) -BuildRequires: golang(github.com/noahdesu/go-ceph/rados) -BuildRequires: golang(github.com/spf13/cobra) -BuildRequires: golang(github.com/stevvooe/resumable) -BuildRequires: golang(github.com/stevvooe/resumable/sha256) -BuildRequires: golang(github.com/stevvooe/resumable/sha512) -BuildRequires: golang(github.com/yvasiyarov/gorelic) -BuildRequires: golang(golang.org/x/crypto/bcrypt) -BuildRequires: golang(golang.org/x/net/context) -BuildRequires: golang(golang.org/x/oauth2) -BuildRequires: golang(golang.org/x/oauth2/google) -BuildRequires: golang(golang.org/x/oauth2/jwt) -BuildRequires: golang(google.golang.org/api/googleapi) -BuildRequires: golang(google.golang.org/api/storage/v1) -BuildRequires: golang(google.golang.org/cloud) -BuildRequires: golang(google.golang.org/cloud/storage) -BuildRequires: golang(gopkg.in/check.v1) -BuildRequires: golang(gopkg.in/yaml.v2) -%endif - -Requires: golang(github.com/AdRoll/goamz/aws) -Requires: golang(github.com/AdRoll/goamz/cloudfront) -Requires: golang(github.com/AdRoll/goamz/s3) -Requires: golang(github.com/Azure/azure-sdk-for-go/storage) -Requires: golang(github.com/Sirupsen/logrus) -Requires: golang(github.com/Sirupsen/logrus/formatters/logstash) -Requires: golang(github.com/bugsnag/bugsnag-go) -Requires: golang(github.com/denverdino/aliyungo/oss) -Requires: golang(github.com/docker/libtrust) -Requires: golang(github.com/garyburd/redigo/redis) -Requires: golang(github.com/gorilla/handlers) -Requires: golang(github.com/gorilla/mux) -Requires: golang(github.com/mitchellh/mapstructure) -Requires: golang(github.com/ncw/swift) -Requires: golang(github.com/noahdesu/go-ceph/rados) -Requires: golang(github.com/spf13/cobra) -Requires: golang(github.com/stevvooe/resumable) -Requires: golang(github.com/stevvooe/resumable/sha256) -Requires: golang(github.com/stevvooe/resumable/sha512) -Requires: golang(github.com/yvasiyarov/gorelic) -Requires: golang(golang.org/x/crypto/bcrypt) -Requires: golang(golang.org/x/net/context) -Requires: golang(golang.org/x/oauth2) -Requires: golang(golang.org/x/oauth2/google) -Requires: golang(golang.org/x/oauth2/jwt) -Requires: golang(google.golang.org/api/googleapi) -Requires: golang(google.golang.org/api/storage/v1) -Requires: golang(google.golang.org/cloud) -Requires: golang(google.golang.org/cloud/storage) -Requires: golang(gopkg.in/check.v1) -Requires: golang(gopkg.in/yaml.v2) - -Provides: golang(%{import_path}) = %{version}-%{release} -Provides: golang(%{import_path}/configuration) = %{version}-%{release} -Provides: golang(%{import_path}/context) = %{version}-%{release} -Provides: golang(%{import_path}/digest) = %{version}-%{release} -Provides: golang(%{import_path}/health) = %{version}-%{release} -Provides: golang(%{import_path}/health/api) = %{version}-%{release} -Provides: golang(%{import_path}/health/checks) = %{version}-%{release} -Provides: golang(%{import_path}/manifest) = %{version}-%{release} -Provides: golang(%{import_path}/manifest/manifestlist) = %{version}-%{release} -Provides: golang(%{import_path}/manifest/schema1) = %{version}-%{release} -Provides: golang(%{import_path}/manifest/schema2) = %{version}-%{release} -Provides: golang(%{import_path}/notifications) = %{version}-%{release} -Provides: golang(%{import_path}/reference) = %{version}-%{release} -Provides: golang(%{import_path}/registry) = %{version}-%{release} -Provides: golang(%{import_path}/registry/api/errcode) = %{version}-%{release} -Provides: golang(%{import_path}/registry/api/v2) = %{version}-%{release} -Provides: golang(%{import_path}/registry/auth) = %{version}-%{release} -Provides: golang(%{import_path}/registry/auth/htpasswd) = %{version}-%{release} -Provides: golang(%{import_path}/registry/auth/silly) = %{version}-%{release} -Provides: golang(%{import_path}/registry/auth/token) = %{version}-%{release} -Provides: golang(%{import_path}/registry/client) = %{version}-%{release} -Provides: golang(%{import_path}/registry/client/auth) = %{version}-%{release} -Provides: golang(%{import_path}/registry/client/transport) = %{version}-%{release} -Provides: golang(%{import_path}/registry/handlers) = %{version}-%{release} -Provides: golang(%{import_path}/registry/listener) = %{version}-%{release} -Provides: golang(%{import_path}/registry/middleware/registry) = %{version}-%{release} -Provides: golang(%{import_path}/registry/middleware/repository) = %{version}-%{release} -Provides: golang(%{import_path}/registry/proxy) = %{version}-%{release} -Provides: golang(%{import_path}/registry/proxy/scheduler) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/cache) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/cache/cachecheck) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/cache/memory) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/cache/redis) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/azure) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/base) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/factory) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/filesystem) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/gcs) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/inmemory) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/middleware) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/middleware/cloudfront) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/oss) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/rados) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/s3) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/swift) = %{version}-%{release} -Provides: golang(%{import_path}/registry/storage/driver/testsuites) = %{version}-%{release} -Provides: golang(%{import_path}/testutil) = %{version}-%{release} -Provides: golang(%{import_path}/uuid) = %{version}-%{release} -Provides: golang(%{import_path}/version) = %{version}-%{release} - -%description devel -%{summary} - -This package contains library source intended for -building other packages which use import path with -%{import_path} prefix. -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%package unit-test -Summary: Unit tests for %{name} package -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} - -%if 0%{?with_check} -#Here comes all BuildRequires: PACKAGE the unit tests -#in %%check section need for running -%endif - -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%if 0%{?with_check} -BuildRequires: golang(github.com/ncw/swift/swifttest) -%endif - -%description unit-test -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif - -%prep -%setup -q -n %{project}-%{repo}-%{version} -sed -i 's/elliptic.P224(), //' vendor/golang.org/x/crypto/ocsp/ocsp.go - - -%build -mkdir -p src/github.com/%{project} -ln -s ../../../ src/%{import_path} -export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} -go env -w GO111MODULE=auto -%gobuild -o bin/registry %{import_path}/cmd/registry - -%install -install -d -p %{buildroot}%{_bindir} -install -p -m 0755 bin/registry %{buildroot}%{_bindir} - -# install systemd/init scripts -install -d %{buildroot}%{_unitdir} -install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} - -# install config file -install -d -p %{buildroot}%{_sysconfdir}/%{name}/registry -install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/registry - -# install root dir -install -d %{buildroot}%{_sharedstatedir}/registry - -# source code for building projects -%if 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do - echo "%dir %{gopath}/src/%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%{gopath}/src/%{import_path}/$file" >> devel.file-list -done -%endif - -# testing files for this project -%if 0%{?with_unit_test} && 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -# find all *_test.go files and generate unit-test.file-list -for file in $(find . -iname "*_test.go"); do - echo "%dir %{gopath}/src/%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%{gopath}/src/%{import_path}/$file" >> unit-test.file-list -done -%endif - -%if 0%{?with_devel} -sort -u -o devel.file-list devel.file-list -%endif - -%check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} -make test -%endif - -%pre - -%post -%systemd_post %{name}.service - -%preun -%systemd_preun %{name}.service - -%postun -%systemd_postun_with_restart %{name}.service - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%if 0%{?fedora} >= 23 -%license LICENSE -%else -%doc LICENSE -%endif -%doc CONTRIBUTING.md MAINTAINERS README.md -%{_bindir}/registry -%{_unitdir}/%{name}.service -%dir %{_sharedstatedir}/registry -%config(noreplace) %{_sysconfdir}/%{name}/registry/config.yml - -%if 0%{?with_devel} -%files devel -f devel.file-list -%if 0%{?fedora} >= 23 -%license LICENSE -%else -%doc LICENSE -%endif -%doc CONTRIBUTING.md README.md ROADMAP.md -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%files unit-test -f unit-test.file-list -%license LICENSE -%doc CONTRIBUTING.md README.md ROADMAP.md -%endif - -%changelog -* Tue Jul 25 2017 Lokesh Mandvekar - 2.6.2-1.git48294d9 -- Resolves: #1474894 - CVE-2017-11468 -- bump to tag 2.6.2 -- built commit 48294d9 -- built with bundled dependencies - -* Fri Feb 10 2017 Fedora Release Engineering - 2.5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Sep 23 2016 Frantisek Kluknavsky - 2.5.1-1 -- Resolves: #1346484 - rebase to v2.5.1 - -* Thu Jul 21 2016 Fedora Release Engineering - 2.4.1-2 -- https://fedoraproject.org/wiki/Changes/golang1.7 - -* Mon May 23 2016 Lokesh Mandvekar - 2.4.1-1 -- Resolves: #1311327 - rebase to v2.4.1 - -* Fri Mar 04 2016 jchaloup - 2.3.0-3 -- Provide devel subpackage -- Build from debundled dependencies - -* Mon Feb 22 2016 Fedora Release Engineering - 2.3.0-2 -- https://fedoraproject.org/wiki/Changes/golang1.6 - -* Mon Feb 15 2016 Lokesh Mandvekar - 2.3.0-1 -- Resolves: rhbz#1277743 - bump to v2.3.0 -- Resolves: rhbz#1308656 - obsolete docker-registry <= 0.9.1-5 - -* Wed Feb 03 2016 Fedora Release Engineering - 2.3.0-0.2.rc1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Jan 28 2016 Lokesh Mandvekar - 2.3.0-0.1.rc1 -- Resolves: rhbz#1277743 - bump to v2.3.0-rc1 - -* Wed Oct 28 2015 Lokesh Mandvekar - 2.1.1-4 -- Resolves: rhbz#1276046 - correct yml file location in unitfile - -* Wed Oct 07 2015 Lokesh Mandvekar - 2.1.1-3 -- do not install sysconfig file -- Install root dir /var/lib/registry - -* Tue Sep 22 2015 Lokesh Mandvekar - 2.1.1-2 -- systemd is a dep - -* Thu Sep 17 2015 Lokesh Mandvekar - 2.1.1-1 -- First package for Fedora - resolves: #1259005 diff --git a/kubernetes/docker-distribution/centos/files/config.yml b/kubernetes/docker-distribution/centos/files/config.yml deleted file mode 100644 index 4683478c1..000000000 --- a/kubernetes/docker-distribution/centos/files/config.yml +++ /dev/null @@ -1 +0,0 @@ -# This is a puppet managed config file diff --git a/kubernetes/docker-distribution/centos/files/docker-distribution.service b/kubernetes/docker-distribution/centos/files/docker-distribution.service deleted file mode 100644 index 7a48e8bcb..000000000 --- a/kubernetes/docker-distribution/centos/files/docker-distribution.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=v2 Registry server for Docker - -[Service] -Type=simple -Environment=REGISTRY_STORAGE_DELETE_ENABLED=true -ExecStart=/usr/bin/registry serve /etc/docker-distribution/registry/config.yml -Restart=on-failure -ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/docker-distribution.pid' -ExecStopPost=/bin/rm -f /var/run/docker-distribution.pid - -[Install] -WantedBy=multi-user.target diff --git a/kubernetes/etcd/centos/build_srpm.data b/kubernetes/etcd/centos/build_srpm.data deleted file mode 100644 index 9c373c2a2..000000000 --- a/kubernetes/etcd/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -VERSION=3.3.15 -TAR_NAME=etcd -TAR="$TAR_NAME-v$VERSION.tar.gz" -COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/etcd/centos/etcd.spec b/kubernetes/etcd/centos/etcd.spec deleted file mode 100644 index f284e4339..000000000 --- a/kubernetes/etcd/centos/etcd.spec +++ /dev/null @@ -1,265 +0,0 @@ -%global with_debug 1 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -buildmode pie -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro,-z,now'" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project coreos -%global repo etcd -# https://github.com/coreos/etcd -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 1674e682fe9fbecd66e9f20b77da852ad7f517a9 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -%global system_name etcd - -Name: etcd -Version: 3.3.15 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: A highly-available key value store for shared configuration -License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: %{name}-v%{version}.tar.gz -Source1: %{system_name}.service -Source2: %{system_name}.conf - -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x} - -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -# Build with our own prefered golang, not 1.11 from CentOS -# BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13} - -Obsoletes: etcd3 < 3.0.15 -Provides: etcd3 = %{version}-%{release} - -BuildRequires: libpcap-devel - -BuildRequires: systemd - -Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%description -A highly-available key value store for shared configuration. - -%prep -%setup -q -n %{repo}-v%{version} - -# move content of vendor under Godeps as has been so far -mkdir -p Godeps/_workspace/src -mv vendor/* Godeps/_workspace/src/. - -%build -mkdir -p src/github.com/coreos -ln -s ../../../ src/github.com/coreos/etcd - -export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} -go env -w GO111MODULE=auto - -export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" - -%gobuild -o bin/%{system_name} %{import_path} -%gobuild -o bin/%{system_name}ctl %{import_path}/%{system_name}ctl - -%install -install -D -p -m 0755 bin/%{system_name} %{buildroot}%{_bindir}/%{system_name} -install -D -p -m 0755 bin/%{system_name}ctl %{buildroot}%{_bindir}/%{system_name}ctl -install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{system_name}.service -install -d -m 0755 %{buildroot}%{_sysconfdir}/%{system_name} -install -m 644 -t %{buildroot}%{_sysconfdir}/%{system_name} %{SOURCE2} - -# And create /var/lib/etcd -install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{system_name} - -%pre -getent group %{system_name} >/dev/null || groupadd -r %{system_name} -getent passwd %{system_name} >/dev/null || useradd -r -g %{system_name} -d %{_sharedstatedir}/%{system_name} \ - -s /sbin/nologin -c "etcd user" %{system_name} - -%post -%systemd_post %{system_name}.service - -%preun -%systemd_preun %{system_name}.service - -%postun -%systemd_postun %{system_name}.service - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc *.md -%doc glide.lock -%config(noreplace) %{_sysconfdir}/%{system_name} -%{_bindir}/%{system_name} -%{_bindir}/%{system_name}ctl -%dir %attr(-,%{system_name},%{system_name}) %{_sharedstatedir}/%{system_name} -%{_unitdir}/%{system_name}.service - -%changelog -* Mon Jun 11 2018 Jan Chaloupka - 3.2.22-1 -- Update to 3.2.22 - resolves: #1541355 - -* Mon Jun 04 2018 Jan Chaloupka - 3.2.21-1 -- Update to 3.2.21 - resolves: #1585787 - -* Tue Apr 17 2018 Jan Chaloupka - 3.2.18-1 -- Update to 3.2.18 - resolves: #1568389 - -* Tue Feb 06 2018 Jan Chaloupka - 3.2.15-2 -- Rebuild for 7.5.0 - resolves: #1542526 - -* Mon Jan 29 2018 Jan Chaloupka - 3.2.15-1 -- Update to 3.2.15 - resolves: #1539670 - resolves: #1378706 - -* Wed Dec 06 2017 Jan Chaloupka - 3.2.11-1 -- Update to 3.2.11 - related: #1514612 - -* Tue Nov 21 2017 Jan Chaloupka - 3.2.10-1 -- Update to 3.2.10 - resolves: #1514612 - -* Mon Nov 20 2017 Jan Chaloupka - 3.2.9-3 -- Bump man-pages tarball - related: #1510480 - -* Mon Nov 20 2017 Jan Chaloupka - 3.2.9-2 -- Fix Synopsis of etcdctl3 man pages - related: #1510480 - -* Tue Nov 07 2017 Jan Chaloupka - 3.2.9-1 -- Update to 3.2.9 - resolves: #1510480 -- Generate etcd and etcdctl man-pages - resolves: #1444336 - -* Fri Sep 29 2017 Jan Chaloupka - 3.2.7-2 -- Rebuild with correct hardening flags - resolves: #1420783 - -* Tue Sep 19 2017 Jan Chaloupka - 3.2.7-1 -- Update to 3.2.7 - resolves: #1493165 - -* Tue Aug 08 2017 Jan Chaloupka - 3.2.5-1 -- Update to 3.2.5 - resolves: #1479371 - -* Mon Jun 12 2017 Jan Chaloupka - 3.1.9-2 -- Build for secondary architectures as well - -* Fri Jun 09 2017 Scott Dodson - 3.1.9-1 -- Update to 3.1.9 - resolves: #1458941 - -* Tue Jun 06 2017 Jan Chaloupka - 3.1.8-1 -- Update to 3.1.8 - resolves: #1459122 - -* Tue May 02 2017 Jan Chaloupka - 3.1.7-1 -- Update to 3.1.7 - resolves: #1447235 - -* Tue Apr 04 2017 Yaakov Selkowitz - 3.1.3-2 -- Circumvent runtime check of officially supported architectures - resolves: #1434973 - -* Tue Mar 21 2017 Jan Chaloupka - 3.1.3-1 -- Update to 3.1.3 - resolves: #1434364 - -* Mon Feb 27 2017 Josh Boyer - 3.1.0-2.1 -- Rebuild rebase on all architectures - -* Tue Feb 21 2017 Jan Chaloupka - 3.1.0-2 -- Apply "add --keep-cluster-id and --node-id to 'etcdctl backup'" - from extras-rhel-7.2 branch - resolves: #1350875 - -* Thu Feb 16 2017 Josh Boyer - 3.1.0-1.1 -- Rebuild rebase on all architectures - -* Mon Feb 06 2017 Jan Chaloupka - 3.1.0-1 -- Update to 3.1.0 - etcdctl-top removed by upstream - resolves: #1416440 - -* Fri Jan 20 2017 d.marlin -- Build for all archs (adding ppc64le and s390x) - -* Tue Jan 10 2017 d.marlin -- Add aarch64 to ExclusiveArch list. - -* Mon Jan 09 2017 d.marlin -- Correct 'link' warning for -X flag. - -* Thu Dec 01 2016 jchaloup - 3.0.15-1 -- Update to 3.0.15 - Obsolete etcd3 < 3.0.15 - -* Fri Nov 18 2016 jchaloup - 3.0.14-3 -- Build with debug-info subpackage -- Until etcd3 obsoletes etcd it conflicts with it - -* Tue Nov 15 2016 Avesh Agarwal - 3.0.14-2 -- Resolves: #1395359 etcd3 should not obsolete etcd - -* Mon Nov 07 2016 jchaloup - 3.0.14-1 -- Update to v3.0.14 - related: #1386963 - -* Thu Oct 27 2016 jchaloup - 3.0.13-1 -- Update to v3.0.13 - related: #1386963 - -* Fri Oct 21 2016 jchaloup - 3.0.12-3 -- etcdctl: fix migrate in outputing client.Node to json - resolves: #1386963 - -* Tue Oct 18 2016 jchaloup - 3.0.12-2 -- Replace etcd with etcd3 when upgrading - resolves: #1384161 - -* Thu Oct 13 2016 jchaloup - 3.0.12-1 -- Update to v3.0.12 - -* Thu Oct 06 2016 jchaloup - 3.0.10-1 -- Update to v3.0.10 - -* Fri Sep 23 2016 jchaloup - 3.0.3-2 -- Extend etcd.conf with new flags - resolves: #1378706 - -* Fri Jul 22 2016 jchaloup - 3.0.2-1 -- Update to v3.0.3 - related: #1347499 - -* Tue Jul 12 2016 jchaloup - 3.0.2-1 -- Update to v3.0.2 - related: #1347499 - -* Sun May 15 2016 jchaloup - 3.0.0-0.1.beta0 -- Build etcd3 v3.0.0-beta0 for AH 7.3 - resolves: #1347499 diff --git a/kubernetes/etcd/centos/etcd.spec.orig b/kubernetes/etcd/centos/etcd.spec.orig deleted file mode 100644 index fde07c024..000000000 --- a/kubernetes/etcd/centos/etcd.spec.orig +++ /dev/null @@ -1,276 +0,0 @@ -%global with_debug 1 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -buildmode pie -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro,-z,now'" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project coreos -%global repo etcd -# https://github.com/coreos/etcd -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 1674e682fe9fbecd66e9f20b77da852ad7f517a9 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -%global system_name etcd -%global man_version 3.2.22 - -Name: etcd -Version: 3.2.22 -Release: 1%{?dist} -Summary: A highly-available key value store for shared configuration -License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -Source1: %{system_name}.service -Source2: %{system_name}.conf -Source3: man-%{man_version}.tar.gz -Patch3: bz1350875-disaster-recovery-with-copies.patch -Patch4: expand-etcd-arch-validation.patch - -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x} -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} - -Obsoletes: etcd3 < 3.0.15 -Provides: etcd3 = %{version}-%{release} - -BuildRequires: libpcap-devel - -BuildRequires: systemd - -Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%description -A highly-available key value store for shared configuration. - -%prep -%setup -q -n man-%{man_version} -T -b 3 -%setup -q -n %{repo}-%{commit} -mkdir -p man/man1 -cp ../man-%{man_version}/*.1 man/man1/. - -# move content of vendor under Godeps as has been so far -mkdir -p Godeps/_workspace/src -mv cmd/vendor/* Godeps/_workspace/src/. - -%patch3 -p1 -%patch4 -p1 - -%build -mkdir -p src/github.com/coreos -ln -s ../../../ src/github.com/coreos/etcd - -export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} - -export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" - -%gobuild -o bin/%{system_name} %{import_path} -%gobuild -o bin/%{system_name}ctl %{import_path}/%{system_name}ctl - -%install -install -D -p -m 0755 bin/%{system_name} %{buildroot}%{_bindir}/%{system_name} -install -D -p -m 0755 bin/%{system_name}ctl %{buildroot}%{_bindir}/%{system_name}ctl -install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{system_name}.service -install -d -m 0755 %{buildroot}%{_sysconfdir}/%{system_name} -install -m 644 -t %{buildroot}%{_sysconfdir}/%{system_name} %{SOURCE2} - -# install manpages -install -d %{buildroot}%{_mandir}/man1 -install -p -m 644 man/man1/* %{buildroot}%{_mandir}/man1 - -# And create /var/lib/etcd -install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{system_name} - -%pre -getent group %{system_name} >/dev/null || groupadd -r %{system_name} -getent passwd %{system_name} >/dev/null || useradd -r -g %{system_name} -d %{_sharedstatedir}/%{system_name} \ - -s /sbin/nologin -c "etcd user" %{system_name} - -%post -%systemd_post %{system_name}.service - -%preun -%systemd_preun %{system_name}.service - -%postun -%systemd_postun %{system_name}.service - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc *.md -%doc glide.lock -%config(noreplace) %{_sysconfdir}/%{system_name} -%{_bindir}/%{system_name} -%{_bindir}/%{system_name}ctl -%dir %attr(-,%{system_name},%{system_name}) %{_sharedstatedir}/%{system_name} -%{_unitdir}/%{system_name}.service -%{_mandir}/man1/*.1* - -%changelog -* Mon Jun 11 2018 Jan Chaloupka - 3.2.22-1 -- Update to 3.2.22 - resolves: #1541355 - -* Mon Jun 04 2018 Jan Chaloupka - 3.2.21-1 -- Update to 3.2.21 - resolves: #1585787 - -* Tue Apr 17 2018 Jan Chaloupka - 3.2.18-1 -- Update to 3.2.18 - resolves: #1568389 - -* Tue Feb 06 2018 Jan Chaloupka - 3.2.15-2 -- Rebuild for 7.5.0 - resolves: #1542526 - -* Mon Jan 29 2018 Jan Chaloupka - 3.2.15-1 -- Update to 3.2.15 - resolves: #1539670 - resolves: #1378706 - -* Wed Dec 06 2017 Jan Chaloupka - 3.2.11-1 -- Update to 3.2.11 - related: #1514612 - -* Tue Nov 21 2017 Jan Chaloupka - 3.2.10-1 -- Update to 3.2.10 - resolves: #1514612 - -* Mon Nov 20 2017 Jan Chaloupka - 3.2.9-3 -- Bump man-pages tarball - related: #1510480 - -* Mon Nov 20 2017 Jan Chaloupka - 3.2.9-2 -- Fix Synopsis of etcdctl3 man pages - related: #1510480 - -* Tue Nov 07 2017 Jan Chaloupka - 3.2.9-1 -- Update to 3.2.9 - resolves: #1510480 -- Generate etcd and etcdctl man-pages - resolves: #1444336 - -* Fri Sep 29 2017 Jan Chaloupka - 3.2.7-2 -- Rebuild with correct hardening flags - resolves: #1420783 - -* Tue Sep 19 2017 Jan Chaloupka - 3.2.7-1 -- Update to 3.2.7 - resolves: #1493165 - -* Tue Aug 08 2017 Jan Chaloupka - 3.2.5-1 -- Update to 3.2.5 - resolves: #1479371 - -* Mon Jun 12 2017 Jan Chaloupka - 3.1.9-2 -- Build for secondary architectures as well - -* Fri Jun 09 2017 Scott Dodson - 3.1.9-1 -- Update to 3.1.9 - resolves: #1458941 - -* Tue Jun 06 2017 Jan Chaloupka - 3.1.8-1 -- Update to 3.1.8 - resolves: #1459122 - -* Tue May 02 2017 Jan Chaloupka - 3.1.7-1 -- Update to 3.1.7 - resolves: #1447235 - -* Tue Apr 04 2017 Yaakov Selkowitz - 3.1.3-2 -- Circumvent runtime check of officially supported architectures - resolves: #1434973 - -* Tue Mar 21 2017 Jan Chaloupka - 3.1.3-1 -- Update to 3.1.3 - resolves: #1434364 - -* Mon Feb 27 2017 Josh Boyer - 3.1.0-2.1 -- Rebuild rebase on all architectures - -* Tue Feb 21 2017 Jan Chaloupka - 3.1.0-2 -- Apply "add --keep-cluster-id and --node-id to 'etcdctl backup'" - from extras-rhel-7.2 branch - resolves: #1350875 - -* Thu Feb 16 2017 Josh Boyer - 3.1.0-1.1 -- Rebuild rebase on all architectures - -* Mon Feb 06 2017 Jan Chaloupka - 3.1.0-1 -- Update to 3.1.0 - etcdctl-top removed by upstream - resolves: #1416440 - -* Fri Jan 20 2017 d.marlin -- Build for all archs (adding ppc64le and s390x) - -* Tue Jan 10 2017 d.marlin -- Add aarch64 to ExclusiveArch list. - -* Mon Jan 09 2017 d.marlin -- Correct 'link' warning for -X flag. - -* Thu Dec 01 2016 jchaloup - 3.0.15-1 -- Update to 3.0.15 - Obsolete etcd3 < 3.0.15 - -* Fri Nov 18 2016 jchaloup - 3.0.14-3 -- Build with debug-info subpackage -- Until etcd3 obsoletes etcd it conflicts with it - -* Tue Nov 15 2016 Avesh Agarwal - 3.0.14-2 -- Resolves: #1395359 etcd3 should not obsolete etcd - -* Mon Nov 07 2016 jchaloup - 3.0.14-1 -- Update to v3.0.14 - related: #1386963 - -* Thu Oct 27 2016 jchaloup - 3.0.13-1 -- Update to v3.0.13 - related: #1386963 - -* Fri Oct 21 2016 jchaloup - 3.0.12-3 -- etcdctl: fix migrate in outputing client.Node to json - resolves: #1386963 - -* Tue Oct 18 2016 jchaloup - 3.0.12-2 -- Replace etcd with etcd3 when upgrading - resolves: #1384161 - -* Thu Oct 13 2016 jchaloup - 3.0.12-1 -- Update to v3.0.12 - -* Thu Oct 06 2016 jchaloup - 3.0.10-1 -- Update to v3.0.10 - -* Fri Sep 23 2016 jchaloup - 3.0.3-2 -- Extend etcd.conf with new flags - resolves: #1378706 - -* Fri Jul 22 2016 jchaloup - 3.0.2-1 -- Update to v3.0.3 - related: #1347499 - -* Tue Jul 12 2016 jchaloup - 3.0.2-1 -- Update to v3.0.2 - related: #1347499 - -* Sun May 15 2016 jchaloup - 3.0.0-0.1.beta0 -- Build etcd3 v3.0.0-beta0 for AH 7.3 - resolves: #1347499 diff --git a/kubernetes/etcd/centos/files/etcd.conf b/kubernetes/etcd/centos/files/etcd.conf deleted file mode 100644 index e7275d3f1..000000000 --- a/kubernetes/etcd/centos/files/etcd.conf +++ /dev/null @@ -1,69 +0,0 @@ -#[Member] -#ETCD_CORS="" -ETCD_DATA_DIR="/var/lib/etcd/default.etcd" -#ETCD_WAL_DIR="" -#ETCD_LISTEN_PEER_URLS="http://localhost:2380" -ETCD_LISTEN_CLIENT_URLS="http://localhost:2379" -#ETCD_MAX_SNAPSHOTS="5" -#ETCD_MAX_WALS="5" -ETCD_NAME="default" -#ETCD_SNAPSHOT_COUNT="100000" -#ETCD_HEARTBEAT_INTERVAL="100" -#ETCD_ELECTION_TIMEOUT="1000" -#ETCD_QUOTA_BACKEND_BYTES="0" -#ETCD_MAX_REQUEST_BYTES="1572864" -#ETCD_GRPC_KEEPALIVE_MIN_TIME="5s" -#ETCD_GRPC_KEEPALIVE_INTERVAL="2h0m0s" -#ETCD_GRPC_KEEPALIVE_TIMEOUT="20s" -# -#[Clustering] -#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380" -ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379" -#ETCD_DISCOVERY="" -#ETCD_DISCOVERY_FALLBACK="proxy" -#ETCD_DISCOVERY_PROXY="" -#ETCD_DISCOVERY_SRV="" -#ETCD_INITIAL_CLUSTER="default=http://localhost:2380" -#ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster" -#ETCD_INITIAL_CLUSTER_STATE="new" -#ETCD_STRICT_RECONFIG_CHECK="true" -#ETCD_ENABLE_V2="true" -# -#[Proxy] -#ETCD_PROXY="off" -#ETCD_PROXY_FAILURE_WAIT="5000" -#ETCD_PROXY_REFRESH_INTERVAL="30000" -#ETCD_PROXY_DIAL_TIMEOUT="1000" -#ETCD_PROXY_WRITE_TIMEOUT="5000" -#ETCD_PROXY_READ_TIMEOUT="0" -# -#[Security] -#ETCD_CERT_FILE="" -#ETCD_KEY_FILE="" -#ETCD_CLIENT_CERT_AUTH="false" -#ETCD_TRUSTED_CA_FILE="" -#ETCD_AUTO_TLS="false" -#ETCD_PEER_CERT_FILE="" -#ETCD_PEER_KEY_FILE="" -#ETCD_PEER_CLIENT_CERT_AUTH="false" -#ETCD_PEER_TRUSTED_CA_FILE="" -#ETCD_PEER_AUTO_TLS="false" -# -#[Logging] -#ETCD_DEBUG="false" -#ETCD_LOG_PACKAGE_LEVELS="" -#ETCD_LOG_OUTPUT="default" -# -#[Unsafe] -#ETCD_FORCE_NEW_CLUSTER="false" -# -#[Version] -#ETCD_VERSION="false" -#ETCD_AUTO_COMPACTION_RETENTION="0" -# -#[Profiling] -#ETCD_ENABLE_PPROF="false" -#ETCD_METRICS="basic" -# -#[Auth] -#ETCD_AUTH_TOKEN="simple" diff --git a/kubernetes/etcd/centos/files/etcd.service b/kubernetes/etcd/centos/files/etcd.service deleted file mode 100644 index afe51ea61..000000000 --- a/kubernetes/etcd/centos/files/etcd.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Etcd Server -After=network.target -After=network-online.target -Wants=network-online.target - -[Service] -Type=notify -WorkingDirectory=/var/lib/etcd/ -EnvironmentFile=-/etc/etcd/etcd.conf -User=etcd -# set GOMAXPROCS to number of processors -ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/bin/etcd --name=\"${ETCD_NAME}\" --data-dir=\"${ETCD_DATA_DIR}\" --listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\"" -Restart=on-failure -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target diff --git a/kubernetes/helm/centos/build_srpm.data b/kubernetes/helm/centos/build_srpm.data deleted file mode 100644 index 0d76b2f07..000000000 --- a/kubernetes/helm/centos/build_srpm.data +++ /dev/null @@ -1,9 +0,0 @@ -VERSION=3.2.1 -TAR_NAME=helm -TAR="$TAR_NAME-v$VERSION-linux-amd64.tar.gz" -HELM2TO3_TAR="helm-2to3-0.10.0.tar.gz" -HELMMAPKUBEAPIS_TAR="helm-mapkubeapis_0.3.0.tar.gz" -COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/* ${CGCS_BASE}/downloads/${HELM2TO3_TAR} ${CGCS_BASE}/downloads/${HELMMAPKUBEAPIS_TAR}" - -TIS_PATCH_VER=PKG_GITREVCOUNT - diff --git a/kubernetes/helm/centos/files/helm-upload b/kubernetes/helm/centos/files/helm-upload deleted file mode 100644 index 11337b797..000000000 --- a/kubernetes/helm/centos/files/helm-upload +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2018-2024 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# This script takes the names of packaged helm charts as arguments. -# It installs them in the on-node helm chart repository and regenerates -# the repository index. - - -# We want to run as the "www" user and scripts can't be setuid. The -# sudoers permissions are set up to allow sysadmin to run this script -# as the "www" user without a password. -WWW_ID=$(id -u www) -if [ ${UID} -ne ${WWW_ID} ]; then - exec sudo -u www -g www "$0" "$@" -fi - - -RETVAL=0 -REINDEX=0 - -REPO_BASE='/var/www/pages/helm_charts' -INDEX_FILENAME='index.yaml' - -# The 'check-only' optional parameter can be used to validate charts against the -# repo without uploading them. -# The 'upload-only' optional parameter can be used to upload charts bypassing the -# preliminary checks. -# If no optional parameters are passed then charts will be checked and uploaded if valid. -# The repository name must be passed as a parameter preceding the charts. -if [ $# -lt 2 ]; then - echo "Usage: helm-upload .. " - echo " helm-upload check-only .. " - echo " helm-upload upload-only .. " - exit 1 -fi - -if [ "$1" = "check-only" ]; then - RUN_CHECK=true - RUN_UPLOAD=false - REPO_DIR="${REPO_BASE}/$2" - shift 2 -elif [ "$1" = "upload-only" ]; then - RUN_CHECK=false - RUN_UPLOAD=true - REPO_DIR="${REPO_BASE}/$2" - shift 2 -else - RUN_CHECK=true - RUN_UPLOAD=true - REPO_DIR="${REPO_BASE}/$1" - shift 1 -fi - -# Make sure the repo directory exists -if [ ! -e $REPO_DIR ]; then - echo "$REPO_DIR doesn't exist." - exit 1 -fi - -declare -A CHARTS_INDEXED_BY_VERSION -INDEX_PATH="${REPO_DIR}/${INDEX_FILENAME}" -FOUND_NAME=false -FOUND_URL=false - -# Build an array of repository charts indexed by their version -while read -r LINE; do - - if [[ "$LINE" = *"name: "* ]]; then - CHART_NAME=$(echo "$LINE" | cut -d " " -f 2) - FOUND_NAME=true - fi - - if [ "$FOUND_NAME" = true ] && [[ "$LINE" = "- "*.tgz ]]; then - CHART_URL=$(echo "$LINE" | cut -d " " -f 2) - FOUND_URL=true - fi - - if [ "$FOUND_URL" = true ] && [[ "$LINE" = *"version: "* ]]; then - FOUND_NAME=false - FOUND_URL=false - - CHART_VERSION=$(echo "$LINE" | cut -d " " -f 2) - CHART_FULL_NAME="${CHART_NAME}-${CHART_VERSION}" - CHARTS_INDEXED_BY_VERSION["${CHART_FULL_NAME}"]="${REPO_DIR}/${CHART_URL}" - fi - -done < "$INDEX_PATH" - -for FILE in "$@"; do - IS_VALID=false - if [[ -r $FILE && "${RUN_CHECK}" = true ]] ; then - - FOUND_NAME=false - while read -r LINE; do - if [[ "$LINE" = *"name: "* ]]; then - INCOMING_CHART_NAME=$(echo "$LINE" | cut -d " " -f 2) - FOUND_NAME=true - fi - if [ "$FOUND_NAME" = true ] && [[ "$LINE" = *"version: "* ]]; then - INCOMING_CHART_VERSION=$(echo "$LINE" | cut -d " " -f 2) - INCOMING_CHART="$INCOMING_CHART_NAME-$INCOMING_CHART_VERSION" - break - fi - done <<< "$(helm show chart "$FILE")" - - # Check if the file already exists in the repository - if [[ -v "CHARTS_INDEXED_BY_VERSION[$INCOMING_CHART]" ]] && - diff <(tar -xOzf ${FILE} | sha256sum) <(tar -xOzf "${CHARTS_INDEXED_BY_VERSION[$INCOMING_CHART]}" | sha256sum) &>/dev/null; then - echo "Chart ${INCOMING_CHART_NAME} (version ${INCOMING_CHART_VERSION}) already " \ - "in the repository" - RETVAL=2 - elif [[ -v "CHARTS_INDEXED_BY_VERSION[$INCOMING_CHART]" ]]; then - echo "A chart with a different content but same name (${INCOMING_CHART_NAME})" \ - "and version (${INCOMING_CHART_VERSION}) already exists in the repository" - RETVAL=3 - else - IS_VALID=true - fi - elif [[ ! -r $FILE ]]; then - echo Cannot read file ${FILE}. - RETVAL=1 - fi - - if [[ -r $FILE && "${RUN_UPLOAD}" = true && ( "${RUN_CHECK}" = false || ( "${RUN_CHECK}" = true && "${IS_VALID}" = true ) ) ]]; then - cp $FILE $REPO_DIR - - if [ $? -ne 0 ]; then - echo Problem adding $FILE to helm chart registry. - RETVAL=1 - else - REINDEX=1 - fi - elif [[ ! -r $FILE ]]; then - echo Cannot read file ${FILE}. - RETVAL=1 - fi -done - - -# Now re-index the helm repository if we successfully copied in -# any new charts. -if [ $REINDEX -eq 1 ]; then - /usr/sbin/helm repo index $REPO_DIR -fi - -exit $RETVAL diff --git a/kubernetes/helm/centos/files/helm.sudo b/kubernetes/helm/centos/files/helm.sudo deleted file mode 100644 index 8a96f56d7..000000000 --- a/kubernetes/helm/centos/files/helm.sudo +++ /dev/null @@ -1,3 +0,0 @@ -sysadmin ALL=(www) NOPASSWD: /usr/local/sbin/helm-upload - -Defaults lecture=never, secure_path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin diff --git a/kubernetes/helm/centos/helm.spec b/kubernetes/helm/centos/helm.spec deleted file mode 100644 index b07267cfb..000000000 --- a/kubernetes/helm/centos/helm.spec +++ /dev/null @@ -1,57 +0,0 @@ -Name: helm -Version: 3.2.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: The Kubernetes Package Manager -License: Apache-2.0 -Group: devel -Packager: Wind River -URL: https://github.com/kubernetes/helm/releases -Source0: %{name}-v%{version}-linux-amd64.tar.gz -Source1: helm-upload -Source2: helm.sudo -Source3: helmv2-cli.sh -Source4: helm-2to3-0.10.0.tar.gz -Source5: helm-mapkubeapis_0.3.0.tar.gz - -Requires: /bin/bash - -%description -%{summary} - -%prep -%setup -n linux-amd64 - -# Extract helm plugins -mkdir -p ./2to3 -tar zxvf %{SOURCE4} -C ./2to3 -mkdir -p ./mapkubeapis -tar zxvf %{SOURCE5} -C ./mapkubeapis - -# helm-2to3 plugin needs to be slightly adjusted -mkdir -p ./2to3/bin -mv ./2to3/2to3 ./2to3/bin - -%install -install -d %{buildroot}%{_sbindir} -install -m 755 ${RPM_BUILD_DIR}/linux-amd64/helm %{buildroot}%{_sbindir}/helm -install -d %{buildroot}/usr/local/sbin -install -m 755 %{SOURCE1} %{buildroot}/usr/local/sbin/helm-upload -install -m 755 %{SOURCE3} %{buildroot}/usr/local/sbin/helmv2-cli -install -d %{buildroot}%{_sysconfdir}/sudoers.d -install -m 440 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudoers.d/helm - -# Install helm plugins -install -d %{buildroot}/usr/local/share/helm -install -d %{buildroot}/usr/local/share/helm/plugins - -# Install helm plugin 2to3 -cp -R 2to3 %{buildroot}/usr/local/share/helm/plugins/ -cp -R mapkubeapis %{buildroot}/usr/local/share/helm/plugins/ - -%files -%defattr(-,root,root,-) -%{_sbindir}/helm -/usr/local/sbin/helm-upload -%{_sysconfdir}/sudoers.d/helm -/usr/local/share/helm/plugins/2to3/* -/usr/local/share/helm/plugins/mapkubeapis/* diff --git a/kubernetes/k8s-cni-cache-cleanup/centos/build_srpm.data b/kubernetes/k8s-cni-cache-cleanup/centos/build_srpm.data deleted file mode 100644 index 2f3c17bc1..000000000 --- a/kubernetes/k8s-cni-cache-cleanup/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -SRC_DIR="." -COPY_LIST="$FILES_BASE/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/k8s-cni-cache-cleanup/centos/files/k8s-cni-cache-cleanup b/kubernetes/k8s-cni-cache-cleanup/centos/files/k8s-cni-cache-cleanup deleted file mode 100644 index 0e438a642..000000000 --- a/kubernetes/k8s-cni-cache-cleanup/centos/files/k8s-cni-cache-cleanup +++ /dev/null @@ -1,228 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2021 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -NAME=$(basename $0) -RESULTSDIR="/var/lib/cni/results" -MULTUSDIR="/var/lib/cni/multus" -PODS=$(crictl ps -v 2> /dev/null | grep -w -E 'PodID|pod.name') -PODIDS=($(echo "$PODS" | grep PodID | awk '{print $2}')) -PODNAMES=($(echo "$PODS" | grep -w pod.name | awk '{print $3}')) -KUBELET_UPTIME_MINUTES=5 -POD_ID_LENGTH=64 -DELETE="no" -OLDERTHANHOURS=1 - -# Log info message to /var/log/daemon.log -function LOG { - logger -p daemon.info -t "${NAME}($$): " "${@}" -} - -# Log error message to /var/log/daemon.log -function ERROR { - logger -p daemon.error -t "${NAME}($$): " "${@}" -} - -# Determine the age of a file in hours. -function file_age { - local file=${1} - local SECONDSPERHOUR=3600 - now=$(date +%s) - old=$(stat -c %Z ${file}) - diff=$(((${now} - ${old})/${SECONDSPERHOUR})) - echo ${diff} -} - -# Determine the pod id associated with a result CNI cache file. -function results_cni_cache_file_to_pod_id { - local path=${1} - local ret="" - file=$(basename ${path}) - - # A valid CNI cache results file looks like: - # type-pod_id-interface_name - RESULTS_REGEX='^.*-([0-9a-zA-Z]{64})-[0-9a-zA-Z]+$' - - if [[ ${file} =~ ${RESULTS_REGEX} ]]; then - ret=${BASH_REMATCH[1]} - fi - - echo ${ret} -} - -# Determine the pod id associated with a multus CNI cache file. -function multus_cni_cache_file_to_pod_id { - local path=${1} - local ret="" - file=$(basename ${path}) - - # A valid CNI cache multus file is simply the pod id - MULTUS_REGEX='^([0-9a-zA-Z]{64})$' - - if [[ ${file} =~ ${MULTUS_REGEX} ]]; then - ret=${BASH_REMATCH[1]} - fi - - echo ${ret} -} - -# Determine the pod id associated with a CNI cache file. -function cni_cache_file_to_pod_id { - local path=${1} - local ret="" - dir=$(dirname ${path}) - - if [[ "${dir}" == "${RESULTSDIR}" ]]; then - ret=$(results_cni_cache_file_to_pod_id ${path}) - elif [[ "${dir}" == "${MULTUSDIR}" ]]; then - ret=$(multus_cni_cache_file_to_pod_id ${path}) - fi - - echo ${ret} -} - -# Determine the original pod name from a CNI cache file (if any). -function cache_file_to_pod_name { - local path=${1} - local ret="unknown" - - grep -q "K8S_POD_NAME" ${path} - if [ ${?} -eq 0 ]; then - ret=$(cat ${path} | sed "s/.*K8S_POD_NAME\",\"//g" | cut -f1 -d"\"") - fi - - echo ${ret} -} - -# Given a CNI cache id, return the existing pod name (if any). -function get_pod { - local cacheid=${1} - local ret="" - - for i in ${!PODIDS[@]}; do - podid=${PODIDS[${i}]} - if [[ "${podid}" == "${cacheid}" ]]; then - ret=${PODNAMES[${i}]} - fi - done - - echo ${ret} -} - -# Determine if the CNI cache file is old enough to process. -function check_cache_file_age { - local age=${1} - local ret="" - - if [ -n ${OLDERTHANHOURS} ]; then - if [[ ${age} -ge ${OLDERTHANHOURS} ]]; then - ret=${age} - fi - fi - - echo ${ret} -} - -# Determine how long kubelet has been up in minutes -function kubelet_uptime { - local SECONDSPERMINUTE=60 - - # Check if the kubelet service is active - kubelet_status=$(systemctl is-active kubelet) - if [ "${kubelet_status}" = "active" ]; then - kubelet_ts_property=$(systemctl show kubelet --property ActiveEnterTimestamp) - RC=${?} - if [ "${RC}" -eq 0 ]; then - kubelet_uptime=$( echo "${kubelet_ts_property}" | awk -F= '{print $2}' ) - if [ -z "${kubelet_uptime}" ]; then - ERROR "Failed to get kubelet uptime, kubelet_uptime=${kubelet_uptime}" - minutes=0 - else - uptime=$(date --date="${kubelet_uptime}" +%s) - now=$(date +%s) - minutes=$(((${now}-${uptime})/${SECONDSPERMINUTE})) - fi - else - ERROR "Failed to get kubelet uptime, RC=${RC}" - minutes=0 - fi - else - # Log an error message if the kubelet service is not active - ERROR "The kubelet service is not active." - minutes=0 - fi - - echo ${minutes} -} - -# Wait for kubelet to be up for long enough to process CNI cache files. -function check_kubelet { - local retries=0 - - while [ ${retries} -le 30 ]; do - uptime=$(kubelet_uptime) - if [ ${uptime} -ge ${KUBELET_UPTIME_MINUTES} ]; then - return 0 - fi - remaining=$((${KUBELET_UPTIME_MINUTES}-${uptime})) - LOG "Waiting for kubelet to be up for ${remaining} minutes ..." - retries=$((${retries}+1)) - sleep 30 - done - - return 1 -} - -while getopts :o:d OPT; do - case ${OPT} in - o|--older-than) - OLDERTHANHOURS=${OPTARG} - ;; - d|+d) - DELETE="yes" - ;; - *) - echo "usage: ${0##*/} [-d] [-o older_than_hours]" - exit 2 - esac -done - -check_kubelet -if [[ ${?} -ne 0 ]]; then - LOG "Kubelet must be up for a minimum of ${KUBELET_UPTIME_MINUTES} minutes. Not running CNI cache cleanup." - exit 1 -fi - -for f in ${RESULTSDIR}/* ${MULTUSDIR}/*; do - cacheid=$(cni_cache_file_to_pod_id ${f}) - if [[ ${#cacheid} -ne ${POD_ID_LENGTH} ]]; then - # Unrecognized file pattern, skip. - continue - fi - - existing_podname=$(get_pod ${cacheid}) - if [[ ${existing_podname} ]]; then - LOG "Pod ${existing_podname} exists. Not cleaning up CNI cache file(s)." - continue - fi - - age=$(file_age ${f}) - if [[ ! $(check_cache_file_age ${age}) ]]; then - LOG "Stale CNI cache file ${f} detected. Cleanup to occur after $((${OLDERTHANHOURS} - ${age})) hour(s)." - continue - fi - - if [[ "${DELETE}" == "yes" ]]; then - rm -f ${f} - action="Deleted" - else - action="Detected" - fi - - cache_podname=$(cache_file_to_pod_name ${f}) - LOG "${action} stale CNI cache file ${f}: [age: ${age} hours old, podname: ${cache_podname}]." -done - diff --git a/kubernetes/k8s-cni-cache-cleanup/centos/k8s-cni-cache-cleanup.spec b/kubernetes/k8s-cni-cache-cleanup/centos/k8s-cni-cache-cleanup.spec deleted file mode 100644 index 280d43cd4..000000000 --- a/kubernetes/k8s-cni-cache-cleanup/centos/k8s-cni-cache-cleanup.spec +++ /dev/null @@ -1,27 +0,0 @@ -Name: k8s-cni-cache-cleanup -Version: 1.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Kubernetes CNI Cache Cleanup Utility -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown -Source0: k8s-cni-cache-cleanup - -Requires: /bin/bash - -%description -%{summary} - -%define local_dir /usr/local -%define local_sbindir %{local_dir}/sbin - -%prep - -%install -install -d %{buildroot}%{local_sbindir} -install -m 755 %{SOURCE0} %{buildroot}%{local_sbindir}/k8s-cni-cache-cleanup - -%files -%defattr(-,root,root,-) -%{local_sbindir}/k8s-cni-cache-cleanup diff --git a/kubernetes/k8s-pod-recovery/centos/build_srpm.data b/kubernetes/k8s-pod-recovery/centos/build_srpm.data deleted file mode 100644 index 2f3c17bc1..000000000 --- a/kubernetes/k8s-pod-recovery/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -SRC_DIR="." -COPY_LIST="$FILES_BASE/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery b/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery deleted file mode 100755 index 9d938aa4a..000000000 --- a/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery +++ /dev/null @@ -1,379 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2020-2021 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# -# chkconfig: 2345 76 25 -# -### BEGIN INIT INFO -# Provides: k8s-pod-recovery -# Default-Start: 3 5 -# Required-Start: -# Required-Stop: -# Default-Stop: 0 1 2 6 -# Short-Description: Service to recovery pods after host boot -### END INIT INFO - -. /etc/platform/platform.conf - -export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin -export KUBECONFIG=/etc/kubernetes/admin.conf -CONF_DIR=/etc/k8s-post-recovery.d -SLEEP_DELAY_SEC=15 - -NAME=$(basename $0) -PIDFILE=/var/run/${NAME}.pid -HOST=$(hostname) - -# Log info message to /var/log/daemon.log -function LOG { - logger -p daemon.info -t "${NAME}($$): " "$@" -} - -# Log error message to /var/log/daemon.log -function ERROR { - logger -p daemon.error -t "${NAME}($$): " "$@" -} - -function _check_for_k8s_config { - # If this node has not been configured, then there is nothing to recovery - if [ ! -f ${KUBECONFIG} ]; then - LOG "${KUBECONFIG} does not exist. No pods to recover." - exit 0 - fi -} - -function _check_for_existing_process { - # Abort if another instantiation is already running - if [ -e ${PIDFILE} ]; then - PID=$(cat ${PIDFILE}) - PROCESS=$(cat /proc/${PID}/comm) - if [ -n "${PID}" -a -e /proc/${PID} -a ${PROCESS} == ${NAME} ]; then - ERROR "Aborting, ${PID} already running: ${PIDFILE}." - exit 1 - else - OUT=$(rm -v -f ${PIDFILE}) - LOG "${OUT}" - fi - fi - - # Create pidfile to indicate the script is running - echo $$ > ${PIDFILE} -} - -function _wait_for_systemd { - while true; do - if systemctl is-system-running | grep -q -e running -e degraded; then - break - fi - LOG "Waiting for systemd to finish booting..." - sleep ${SLEEP_DELAY_SEC} - done -} - -function _do_cni_cache_cleanup { - # Cleanup any stale CNI cache files (not associated with any running pod) - # that are older than 1 hour old - LOG "Starting CNI cache cleanup..." - k8s-cni-cache-cleanup -o 1 -d - if [[ ${?} -ne 0 ]]; then - ERROR "Failed to run CNI cache cleanup." - fi -} - -function _wait_for_pod_stabilization { - - local extra_args=$1 - local time_between_polls=$2 - local stable_cycles=$3 - - last_count=0 - stability_count=0 - while [[ $stability_count -lt $stable_cycles ]] ; do - pods_in_flux=$(KUBECONFIG=/etc/kubernetes/admin.conf kubectl get pods --no-headers --all-namespaces $extra_args | grep -v -e Running -e Completed | wc -l) - if [[ $pods_in_flux -ne $last_count ]]; then - LOG "Waiting on pod transitions to stabilize... $pods_in_flux pods are not Running/Completed, extra_args:'${extra_args}'" - last_count=$pods_in_flux - stability_count=0 - else - LOG "Pods transitions are stable... for $((stability_count*time_between_polls)) seconds, extra_args:'${extra_args}'." - stability_count=$((stability_count+1)) - fi - sleep $time_between_polls - done -} - -function _unknown_pods { - # $1: actions - - # Target specific namespaces and pods on this host - SUPPORTED_NAMESPACES=('armada' 'openstack' 'monitor') - - shopt -s nullglob - for conf_file in ${CONF_DIR}/*.conf; do - grep -q '^namespace=' $conf_file || continue - SUPPORTED_NAMESPACES+=($(grep '^namespace=' $conf_file | awk -F '=' '{print $2}')) - done - - if [ "$1" == 'recover' ]; then - # Recovers pods that are: Running/Unknown and Pending/Init:Unknown - for ns in ${SUPPORTED_NAMESPACES[@]}; do - PODS=$(kubectl get pods -n $ns --field-selector spec.nodeName=${HOST} 2>/dev/null | awk /Unknown/'{print $1}') - for pod in $PODS ; do - LOG "Unknown pods: Recovering: $ns/$pod" - kubectl delete pods -n $ns $pod --wait=false - done - done - elif [ "$1" == 'verify' ]; then - for ns in ${SUPPORTED_NAMESPACES[@]}; do - PODS=$(kubectl get pods -n $ns --field-selector spec.nodeName=${HOST} 2>/dev/null | awk /Unknown/'{print $1}') - if [ -z "${PODS}" ]; then - LOG "Unknown pods: None present for namespace: $ns" - else - ERROR "Unknown pods: still present for namespace: $ns" - fi - done - else - ERROR "Unknown action: $1" - fi -} - -function _outofhugepages_pods { - # $1: actions - - # Target all namespaces and pods on this host - NAMESPACES=$(kubectl get ns | tail -n +2 | awk '{ print $1 }') - - if [ "$1" == 'recover' ]; then - # Recovers pods that are: Running/OutOfhugepages - for ns in ${NAMESPACES[@]}; do - PODS=$(kubectl get pods -n $ns --field-selector spec.nodeName=${HOST} 2>/dev/null | awk /OutOfhugepages/'{print $1}') - for pod in $PODS ; do - LOG "OutOfhugepages pods: Recovering: $ns/$pod" - kubectl delete pods -n $ns $pod --wait=false - done - done - elif [ "$1" == 'verify' ]; then - for ns in ${NAMESPACES[@]}; do - PODS=$(kubectl get pods -n $ns --field-selector spec.nodeName=${HOST} 2>/dev/null | awk /OutOfhugepages/'{print $1}') - if [ -z "${PODS}" ]; then - LOG "OutOfhugepages pods: None present for namespace: $ns" - else - ERROR "OutOfhugepages pods: still present for namespace: $ns" - fi - done - else - ERROR "Unknown action: $1" - fi -} - -function _node_affinity_pods { - # $1: actions - - if [ "$1" == 'recover' ]; then - PODS=$(kubectl get pods --all-namespaces --field-selector status.phase=Failed,spec.nodeName=${HOST} 2>/dev/null | awk /NodeAffinity/'{print $1"/"$2}') - for pod in $PODS ; do - LOG "NodeAffinity pods: Recovering: $pod" - kubectl delete pods -n ${pod//// } --wait=false - done - elif [ "$1" == 'verify' ]; then - PODS=$(kubectl get pods --all-namespaces --field-selector status.phase=Failed,spec.nodeName=${HOST} 2>/dev/null | awk /NodeAffnity/'{print $1"/"$2}') - if [ -z "${PODS}" ]; then - LOG "NodeAffinity pods: None present." - else - ERROR "NodeAffinity pods: still present" - fi - else - ERROR "Unknown action: $1" - fi - -} - -function _labeled_pods { - # $1: actions - - local SRIOVDP_STATUS="kubectl get pods --all-namespaces --no-headers --selector=app=sriovdp -o wide --field-selector=spec.nodeName=${HOST}" - local RESTARTPODS_STATUS="kubectl get pods --all-namespaces --no-headers --field-selector=spec.nodeName=${HOST} --selector=restart-on-reboot=true" - - if [ "$1" == 'recover' ]; then - POLLING_INTERVAL=5 - STABILITY_COUNT=6 - _wait_for_pod_stabilization "--selector=restart-on-reboot=true --field-selector=spec.nodeName=${HOST}" $POLLING_INTERVAL $STABILITY_COUNT - - - PODS=$(${RESTARTPODS_STATUS} 2>/dev/null | awk '{print $1"/"$2}') - - # Don't have to restart device-plugin if no labeled pods are present. System may not be configured for SRIOV. - if [ ! -z "${PODS}" ]; then - LOG "Waiting for SRIOV device plugin pod to become available" - _wait_for_pod_stabilization "--selector=app=sriovdp --field-selector=spec.nodeName=${HOST}" $POLLING_INTERVAL $STABILITY_COUNT - LOG "action $1: SRIOV device plugin pod status:'$(${SRIOVDP_STATUS})'." - # the wait for stabilization might finish with the pod not ready (but stable on a failed state) - # execute at least 2 attempts to restart it - for attempt in 1 2 - do - # Check if device-plugin is ready, but do not wait - kubectl wait pods -n kube-system --selector=app=sriovdp --field-selector=spec.nodeName=${HOST} --for=condition=Ready --timeout=0s - - # If device plugin is not ready, restart it and wait - if [ "$?" -ne 0 ]; then - kubectl delete pods -n kube-system --selector=app=sriovdp --field-selector=spec.nodeName=${HOST} --wait=false - ret_code=$? - if [ "${ret_code}" -ne 0 ]; then - ERROR "In attempt=${attempt}, SRIOV device plugin failed to delete in ${HOST} with ret_code=${ret_code}, SRIOV device plugin pod status:'$(${SRIOVDP_STATUS})'." - fi - - kubectl wait pods -n kube-system --selector=app=sriovdp --field-selector=spec.nodeName=${HOST} --for=condition=Ready --timeout=360s - ret_code=$? - if [ "${ret_code}" -ne 0 ]; then - ERROR "In attempt=${attempt}, SRIOV device plugin timed out on ready wait with ret_code=${ret_code}. SRIOV device plugin pod status:'$(${SRIOVDP_STATUS})'." - continue - fi - fi - break - done - - kubectl wait pods -n kube-system --selector=app=sriovdp --field-selector=spec.nodeName=${HOST} --for=condition=Ready --timeout=0s - ret_code=$? - if [ "${ret_code}" -ne 0 ]; then - ERROR "Continuing anyway with ret_code=${ret_code}. SRIOV pods may not recover. SRIOV device plugin pod status:'$(${SRIOVDP_STATUS})'." - fi - fi - - # Delete pods with the restart-on-reboot=true label - for pod in $PODS; do - LOG "restart-on-reboot labeled pods: Recovering: ${pod//// }" - kubectl delete pods -n ${pod//// } --wait=false - done - elif [ "$1" == 'verify' ]; then - PODS=$(${RESTARTPODS_STATUS} 2>/dev/null | awk '{print $1"/"$2}') - if [ ! -z "${PODS}" ]; then - STATUS=$(${SRIOVDP_STATUS} 2>/dev/null | awk '{print $4}') - if [[ "${STATUS}" != "Running" ]]; then - ERROR "SRIOV device plugin: not recovered: '$(${SRIOVDP_STATUS})'." - else - LOG "SRIOV device plugin: recovered." - fi - fi - for pod in $PODS; do - LOG "restart-on-reboot labeled pods: Verifying: ${pod//// }" - STATUS=$(kubectl get pod --no-headers -n ${pod//// } 2>/dev/null | awk '{print $3}') - if [[ "${STATUS}" != "Running" ]]; then - ERROR "$pod: not recovered: $STATUS" - else - LOG "$pod: recovered" - fi - done - else - ERROR "Unknown action: $1" - fi -} - -function _force_reset_pods { - # $1: actions - - # Handle resetting openstack libvirt pod as it sometimes is in a Running but - # unusable state - if kubectl get namespace openstack > /dev/null 2>&1; then - - # Get the libvirt pods on this host that are Running without all - # conditions True - # - # Conditions: - # Initialized True - # Ready True - # ContainersReady True - # PodScheduled True - # - # NAME STATUS CONDITIONS NODE - # libvirt-libvirt-controller-0-937646f6-xst4r Running True,True,True,True controller-0 - # - CUSTOM_COLUMNS='custom-columns=NAME:.metadata.name,STATUS:status.phase,CONDITIONS:status.conditions[*].status,NODE:spec.nodeName' - FIELD_SELECTOR="spec.nodeName=${HOST}" - PODS=$(kubectl get pods -n openstack -l application=libvirt --field-selector ${FIELD_SELECTOR} -o ${CUSTOM_COLUMNS} | grep -v NAME | grep -v 'True,True,True,True' | awk '{print $1}') - - if [ "$1" == 'recover' ]; then - for pod in $PODS ; do - LOG "Recovering libvirt pod: $pod" - kubectl delete pods -n openstack $pod --wait=false - done - elif [ "$1" == 'verify' ]; then - if [ -z "${PODS}" ]; then - LOG "Openstack libvirt pod on ${HOST} is running." - else - ERROR "Openstack libvirt pod on ${HOST} has not been recovered." - fi - else - ERROR "Unknown action: $1" - fi - fi -} - -function _examine_pods { - # $1: actions - - # Manage labeled pods first - _labeled_pods $1 - - # Wait for pods transitions to stop - _wait_for_pod_stabilization "" $SLEEP_DELAY_SEC 6 - - # Check for recovery actions - _unknown_pods $1 - _node_affinity_pods $1 - _force_reset_pods $1 - _outofhugepages_pods $1 -} - - -function start { - _check_for_k8s_config - _check_for_existing_process - - LOG "Starting." - - _wait_for_systemd - _examine_pods 'recover' - _examine_pods 'verify' - _do_cni_cache_cleanup -} - -function stop { - LOG "Stopping." -} - -function status { - : -} - -function reset { - : -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|force-reload|reload) - stop - start - ;; - status) - status - ;; - reset) - reset - ;; - *) - echo "Usage: $0 {start|stop|force-reload|restart|reload|status|reset}" - exit 1 - ;; -esac - -exit 0 diff --git a/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery.service b/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery.service deleted file mode 100644 index 113d0efd4..000000000 --- a/kubernetes/k8s-pod-recovery/centos/files/k8s-pod-recovery.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Kubernetes Pods Recovery Service -After=sw-patch.service -After=kubelet.service -Requires=kubelet.service - -[Service] -Type=simple -ExecStart=/usr/local/sbin/k8s-pod-recovery start -ExecStop=/usr/local/sbin/k8s-pod-recovery stop -PIDFile=/var/run/k8s-pod-recovery.pid - -[Install] -WantedBy=multi-user.target diff --git a/kubernetes/k8s-pod-recovery/centos/k8s-pod-recovery.spec b/kubernetes/k8s-pod-recovery/centos/k8s-pod-recovery.spec deleted file mode 100644 index f32f37340..000000000 --- a/kubernetes/k8s-pod-recovery/centos/k8s-pod-recovery.spec +++ /dev/null @@ -1,55 +0,0 @@ -Name: k8s-pod-recovery -Version: 1.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: Kubernetes Pod Recovery Service -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown -Source0: k8s-pod-recovery -Source1: k8s-pod-recovery.service - -Requires: /bin/bash -Requires: systemd - -%description -%{summary} - -%define local_dir /usr/local -%define local_sbindir %{local_dir}/sbin -%define k8s_recovery_conf_dir /etc/k8s-post-recovery.d - -%prep - -%install -install -d %{buildroot}%{k8s_recovery_conf_dir} -install -d %{buildroot}%{local_sbindir} -install -m 755 %{SOURCE0} %{buildroot}%{local_sbindir}/k8s-pod-recovery -install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/k8s-pod-recovery.service - -%post -if [ $1 -eq 1 ]; then - # Package install: enable and start it - /usr/bin/systemctl enable k8s-pod-recovery.service > /dev/null 2>&1 || : - /usr/bin/systemctl start k8s-pod-recovery.service > /dev/null 2>&1 || : -else - # Package upgrade: reenable in case [Install] changes and restart to pick up - # new actions - if /usr/bin/systemctl --quiet is-enabled k8s-pod-recovery.service ; then - /usr/bin/systemctl reenable k8s-pod-recovery.service > /dev/null 2>&1 || : - /usr/bin/systemctl restart k8s-pod-recovery.service > /dev/null 2>&1 || : - fi -fi - -%preun -if [ $1 -eq 0 ]; then - /usr/bin/systemctl stop k8s-pod-recovery.service > /dev/null 2>&1 || : - /usr/bin/systemctl disable k8s-pod-recovery.service > /dev/null 2>&1 || : -fi - - -%files -%defattr(-,root,root,-) -%{local_sbindir}/k8s-pod-recovery -%{_unitdir}/k8s-pod-recovery.service -%{k8s_recovery_conf_dir} diff --git a/kubernetes/kubernetes-unversioned/centos/build_srpm.data b/kubernetes/kubernetes-unversioned/centos/build_srpm.data deleted file mode 100644 index 28864ed61..000000000 --- a/kubernetes/kubernetes-unversioned/centos/build_srpm.data +++ /dev/null @@ -1,9 +0,0 @@ -CON_VERSION=1.18.1 -TAR_NAME=kubernetes-contrib -CONTRIB="$TAR_NAME-v$CON_VERSION.tar.gz" - -COPY_LIST="${CGCS_BASE}/downloads/$CONTRIB $FILES_BASE/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT - -BUILD_IS_BIG=4 diff --git a/kubernetes/kubernetes-unversioned/centos/files/LICENSE b/kubernetes/kubernetes-unversioned/centos/files/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/kubernetes/kubernetes-unversioned/centos/files/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/kubernetes/kubernetes-unversioned/centos/files/kubelet-service-remove-docker-dependency.patch b/kubernetes/kubernetes-unversioned/centos/files/kubelet-service-remove-docker-dependency.patch deleted file mode 100644 index 466fab6ef..000000000 --- a/kubernetes/kubernetes-unversioned/centos/files/kubelet-service-remove-docker-dependency.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/contrib/init/systemd/kubelet.service b/contrib/init/systemd/kubelet.service -index 1082bba..1fae395 100644 ---- a/contrib/init/systemd/kubelet.service -+++ b/contrib/init/systemd/kubelet.service -@@ -1,8 +1,8 @@ - [Unit] - Description=Kubernetes Kubelet Server - Documentation=https://kubernetes.io/docs/concepts/overview/components/#kubelet https://kubernetes.io/docs/reference/generated/kubelet/ --After=docker.service --Requires=docker.service -+Wants=network-online.target -+After=network-online.target - - [Service] - WorkingDirectory=/var/lib/kubelet diff --git a/kubernetes/kubernetes-unversioned/centos/files/kubelet_override.yaml b/kubernetes/kubernetes-unversioned/centos/files/kubelet_override.yaml deleted file mode 100644 index d6f2784aa..000000000 --- a/kubernetes/kubernetes-unversioned/centos/files/kubelet_override.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -kind: KubeletConfiguration -apiVersion: kubelet.config.k8s.io/v1beta1 -cgroupDriver: cgroupfs diff --git a/kubernetes/kubernetes-unversioned/centos/files/kubernetes-accounting.conf b/kubernetes/kubernetes-unversioned/centos/files/kubernetes-accounting.conf deleted file mode 100644 index 1e8065ea8..000000000 --- a/kubernetes/kubernetes-unversioned/centos/files/kubernetes-accounting.conf +++ /dev/null @@ -1,4 +0,0 @@ -[Manager] -DefaultCPUAccounting=yes -DefaultMemoryAccounting=yes - diff --git a/kubernetes/kubernetes-unversioned/centos/files/sanitize_kubelet_reserved_cpus.sh b/kubernetes/kubernetes-unversioned/centos/files/sanitize_kubelet_reserved_cpus.sh deleted file mode 100755 index 1dcdbfdb5..000000000 --- a/kubernetes/kubernetes-unversioned/centos/files/sanitize_kubelet_reserved_cpus.sh +++ /dev/null @@ -1,98 +0,0 @@ -#! /bin/bash -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -# The script will run everytime before the kubelet service is started. -# (Runs as a "ExecStartPre" action) -# -# It reads the reserved-cpus list for the kubelet from the kubelet -# environment file and sanitizes it on the basis of online CPUs. -# -# If none of the reserved cpus is online, it removes the --reserved-cpus flag -# from the environment file which allows the kubelet to choose CPUs itself -# - -ENVIRONMENT_FILE=$1 - -# Log info message to /var/log/daemon.log -function LOG { - logger -p daemon.info "$0($$): $@" -} - - -# Log error message to /var/log/daemon.log -function ERROR { - logger -s -p daemon.error "$0($$): ERROR: $@" -} - -function sanitize_reserved_cpus { - kubelet_extra_args=$(cat ${ENVIRONMENT_FILE} 2>/dev/null) - RC=$? - if [ ${RC} != "0" ]; then - ERROR "Error reading kubelet extra arguments. Error code: [${RC}]" - exit ${RC} - fi - - # Get reserved-cpus comma-separated-values string from environment file and strip double quotes - # format of kubelet_extra_args is: - # "KUBELET_EXTRA_ARGS=--cni-bin-dir=/usr/libexec/cni --node-ip=abcd:204::2 - # --system-reserved=memory=9000Mi --reserved-cpus="0-29" --pod-max-pids 10000" - if [[ ${kubelet_extra_args} =~ --reserved-cpus=\"([0-9,-]+)\" ]]; then - reserved_cpus=${BASH_REMATCH[1]} - else - reserved_cpus="" - fi - if test -z "${reserved_cpus}"; then - LOG "No reserved-cpu list found for kubelet. Nothing to do." - exit 0 - fi - LOG "Current reserved-cpus for the kubelet service: ${reserved_cpus}" - - cpus_online=$(cat /sys/devices/system/cpu/online) - RC=$? - if [ ${RC} != "0" ]; then - ERROR "Error reading online CPU list. Error code: [${RC}]" - exit ${RC} - fi - LOG "Online CPUs: ${cpus_online}" - - # Possible formats for reserved_cpus could be - # 0,2,4,6 - # 0-23,36-45 - # 0-4,6,9,13,23-34 - expanded_reserved_cpus=$(expand_sequence ${reserved_cpus}) - reserved_cpus_array=(${expanded_reserved_cpus//,/ }) - - sanitized_reserved_cpus="" - for element in "${reserved_cpus_array[@]}"; do - in_list ${element} ${cpus_online} - if [[ "$?" == "0" ]] ; then - sanitized_reserved_cpus+=",${element}" - fi - done - # Remove the extra leading ',' - sanitized_reserved_cpus=${sanitized_reserved_cpus#","} - LOG "Sanitized reserved-cpus list for the kubelet: ${sanitized_reserved_cpus}" - - if test -z "${sanitized_reserved_cpus}"; then - # Strip out --reserved-cpus option if no reserved-cpus are online - sed -i "s/ --reserved-cpus=\"${reserved_cpus}\"//g" ${ENVIRONMENT_FILE} - else - # Replace existing reserved-cpus with sanitized list - sed -i "s/--reserved-cpus=\"${reserved_cpus}\"/--reserved-cpus=\"${sanitized_reserved_cpus}\"/g" ${ENVIRONMENT_FILE} - fi - RC="$?" - if [ ${RC} != "0" ]; then - ERROR "Error updating reserved-cpus list for the kubelet. Error code: [${RC}]" - exit ${RC} - fi - LOG "Successfully updated reserved-cpus list for the kubelet." - -} - -source /etc/init.d/cpumap_functions.sh - -sanitize_reserved_cpus - -exit 0 diff --git a/kubernetes/kubernetes-unversioned/centos/kubernetes-unversioned.spec b/kubernetes/kubernetes-unversioned/centos/kubernetes-unversioned.spec deleted file mode 100644 index 836f4c4bb..000000000 --- a/kubernetes/kubernetes-unversioned/centos/kubernetes-unversioned.spec +++ /dev/null @@ -1,146 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (c) 2021 Wind River Systems, Inc. -# - -%define debug_package %{nil} -%define local_sbindir /usr/local/sbin - -%global _k8s_name kubernetes - -# Used to simplify the paths for install and files -%global _curr_stage1 %{_exec_prefix}/local/kubernetes/current/stage1 -%global _curr_stage2 %{_exec_prefix}/local/kubernetes/current/stage2 - -# https://github.com/kubernetes/contrib -%global con_provider github -%global con_provider_tld com -%global con_project kubernetes -%global con_repo kubernetes-contrib -%global con_commit 1.18.1 - -############################################## -Name: kubernetes-unversioned -Version: 1.0 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: Kubernetes unversioned common config and current version symlinks -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: LICENSE -Source1: %{con_repo}-v%{con_commit}.tar.gz - -# systemd resource control enable CPU and Memory accounting for cgroups -Source2: kubernetes-accounting.conf - -# kubelet config overrides parameters -Source3: kubelet_override.yaml - -Source5: sanitize_kubelet_reserved_cpus.sh - -Patch1: kubelet-service-remove-docker-dependency.patch - -BuildArch: noarch - -BuildRequires: systemd-devel - -Requires: /bin/bash -Requires: systemd - -%description -%{summary} - -%prep -%setup -q -n %{con_repo}-%{con_commit} -T -b 1 -mkdir contrib -cp -r ../%{con_repo}-%{con_commit}/init contrib/. -%patch1 -p1 - -cp %{SOURCE0} . - -%build - -%install -stage1_link() { - ln -v -sf %{_curr_stage1}$1/$2 %{buildroot}$1/$2 -} -stage2_link() { - ln -v -sf %{_curr_stage2}$1/$2 %{buildroot}$1/$2 -} - -# Current staged directories -install -v -m 755 -d %{buildroot}%{_curr_stage1} -install -v -m 755 -d %{buildroot}%{_curr_stage2} - -# Symlink targets -install -v -m 755 -d %{buildroot}%{_bindir} -install -v -m 755 -d %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d -install -v -m 755 -d %{buildroot}%{_datadir}/bash-completion/completions -stage1_link %{_bindir} kubeadm -stage2_link %{_sysconfdir}/systemd/system/kubelet.service.d kubeadm.conf -stage2_link %{_datadir}/bash-completion/completions kubectl -stage2_link %{_bindir} kubelet-cgroup-setup.sh -stage2_link %{_bindir} kubelet -stage2_link %{_bindir} kubectl - -# install environment files -install -v -d -m 0755 %{buildroot}%{_sysconfdir}/%{_k8s_name} -install -v -m 644 -t %{buildroot}%{_sysconfdir}/%{_k8s_name} contrib/init/systemd/environ/{config,kubelet,kubelet.kubeconfig,proxy} - -# install config files -install -v -d -m 0755 %{buildroot}%{_tmpfilesdir} -install -v -p -m 0644 -t %{buildroot}/%{_tmpfilesdir} contrib/init/systemd/tmpfiles.d/kubernetes.conf -mkdir -p %{buildroot}/run -install -v -d -m 0755 %{buildroot}/run/%{_k8s_name}/ -install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{_k8s_name}/kubelet_override.yaml - -install -d %{buildroot}%{local_sbindir} -# install execution scripts -install -m 700 %{SOURCE5} %{buildroot}/%{local_sbindir}/sanitize_kubelet_reserved_cpus.sh - -# install service files -install -v -d -m 0755 %{buildroot}%{_unitdir} -install -v -m 0644 -t %{buildroot}%{_unitdir} contrib/init/systemd/kubelet.service - -# install the place the kubelet defaults to put volumes (/var/lib/kubelet) -install -v -d %{buildroot}%{_sharedstatedir}/kubelet - -# enable CPU and Memory accounting -install -v -d -m 0755 %{buildroot}/%{_sysconfdir}/systemd/system.conf.d -install -v -p -m 0644 -t %{buildroot}/%{_sysconfdir}/systemd/system.conf.d %{SOURCE2} - -%files -%defattr(-,root,root,-) -%license LICENSE -%dir %{_curr_stage1} -%dir %{_curr_stage2} - -# the following are execution scripts -%{local_sbindir}/sanitize_kubelet_reserved_cpus.sh - -# the following are symlinks -%{_bindir}/kubeadm -%{_bindir}/kubelet -%{_bindir}/kubelet-cgroup-setup.sh -%{_bindir}/kubectl -%dir %{_sysconfdir}/systemd/system/kubelet.service.d -%{_sysconfdir}/systemd/system/kubelet.service.d/kubeadm.conf -%{_datadir}/bash-completion/completions/kubectl - -# the following are common config, environment, service -%{_unitdir}/kubelet.service -%dir %{_sharedstatedir}/kubelet -%dir %{_sysconfdir}/%{_k8s_name} -%config(noreplace) %{_sysconfdir}/%{_k8s_name}/config -%config(noreplace) %{_sysconfdir}/%{_k8s_name}/kubelet -%config(noreplace) %{_sysconfdir}/%{_k8s_name}/kubelet.kubeconfig -%config(noreplace) %{_sysconfdir}/%{_k8s_name}/kubelet_override.yaml -%config(noreplace) %{_sysconfdir}/%{_k8s_name}/proxy -%config(noreplace) %{_sysconfdir}/systemd/system.conf.d/kubernetes-accounting.conf -%{_tmpfilesdir}/kubernetes.conf -%verify(not size mtime md5) %attr(755, root,root) %dir /run/%{_k8s_name} - -%changelog diff --git a/kubernetes/n3000/centos/docker/Dockerfile b/kubernetes/n3000/centos/docker/Dockerfile deleted file mode 100644 index f4c7bbf1c..000000000 --- a/kubernetes/n3000/centos/docker/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -ARG BASE -FROM ${BASE} -RUN yum install -y \ - pciutils which hwloc-libs libuuid-devel \ - sysvinit-tools epel-release \ - opae.admin \ - opae-devel \ - opae-tools \ - opae-tools-extra && \ - yum install -y python-pip && \ - yum clean all && \ - rm -rf /var/cache/yum -RUN pip install intelhex diff --git a/kubernetes/n3000/centos/n3000-opae.stable_docker_image b/kubernetes/n3000/centos/n3000-opae.stable_docker_image deleted file mode 100644 index 15a69c39e..000000000 --- a/kubernetes/n3000/centos/n3000-opae.stable_docker_image +++ /dev/null @@ -1,3 +0,0 @@ -BUILDER=docker -LABEL=n3000-opae - diff --git a/kubernetes/plugins/isolcpus-device-plugin/centos/build_srpm.data b/kubernetes/plugins/isolcpus-device-plugin/centos/build_srpm.data deleted file mode 100644 index b0740891c..000000000 --- a/kubernetes/plugins/isolcpus-device-plugin/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR="files" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/plugins/isolcpus-device-plugin/centos/isolcpus-device-plugin.spec b/kubernetes/plugins/isolcpus-device-plugin/centos/isolcpus-device-plugin.spec deleted file mode 100644 index 7feba35d6..000000000 --- a/kubernetes/plugins/isolcpus-device-plugin/centos/isolcpus-device-plugin.spec +++ /dev/null @@ -1,70 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (C) 2019 Intel Corporation -# -Summary: isolcpus-device-plugin -Name: isolcpus-device-plugin -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown -BuildArch: x86_64 -Source: %name-%version.tar.gz - -# Build with our own prefered golang, not 1.11 from CentOS -# BuildRequires: golang -BuildRequires: golang >= 1.13 - -BuildRequires: systemd -Requires: kubernetes-unversioned -Summary: Kubernetes device plugin for isolcpus - -%define debug_package %{nil} -%description -Expose isolated CPUs to Kubernetes as devices via the device plugin API - -%define local_etc_pmond /etc/pmon.d/ - -%prep -%autosetup - -# The "-mod=vendor" bit is because we want to use the dependencies from the vendor -# directory rather than downloading them on the fly. The "-ldflags=-linkmode=external" -# is there to work around the fact that the RPM infrastructure wants to see -# a ".note.gnu.build-id" build ID, but "go build" gives a ".note.go.build-id" build ID. -%build -go build -mod=vendor -ldflags=-linkmode=external - -%install -mkdir -p %{buildroot}%{_exec_prefix}/local/sbin -install -m 755 isolcpu_plugin %{buildroot}%{_exec_prefix}/local/sbin/isolcpu_plugin -mkdir -p %{buildroot}%{_unitdir} -install -m 644 isolcpu_plugin.service %{buildroot}%{_unitdir}/isolcpu_plugin.service -mkdir -p %{buildroot}%{local_etc_pmond} -install -m 644 isolcpu_plugin.conf %{buildroot}%{local_etc_pmond}/isolcpu_plugin.conf - - -%files -%{_exec_prefix}/local/sbin/isolcpu_plugin -%{_unitdir}/isolcpu_plugin.service -%{local_etc_pmond}/isolcpu_plugin.conf - -# Enable the service and start it. -%post -if [ $1 -eq 1 ] ; then - # Initial installation - systemctl enable --now isolcpu_plugin.service >/dev/null 2>&1 || : -fi - - -# Disable the service and stop it. -%preun -%systemd_preun isolcpu_plugin.service - -# Try to restart the service. Usefull for RPM package upgrades during patching. -%postun -%systemd_postun_with_restart isolcpu_plugin.service -exit 0 diff --git a/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data b/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data deleted file mode 100644 index 3bcf1bea3..000000000 --- a/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -TAR="kubectl-cert_manager-linux-amd64.tar.gz" - -COPY_LIST="${CGCS_BASE}/downloads/${TAR}" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec b/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec deleted file mode 100644 index 4cb3c2d2e..000000000 --- a/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec +++ /dev/null @@ -1,26 +0,0 @@ -Summary: Cert-Manager Kubernetes plugin - -Name: kubectl-cert-manager -Version: 1.7.1 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/kubectl-cert_manager-linux-amd64.tar.gz - -Source0: kubectl-cert_manager-linux-amd64.tar.gz - -%description -Cert-Manager Kubernetes plugin - -%prep -cp %{SOURCE0} . -tar -xvf kubectl-cert_manager-linux-amd64.tar.gz - -%install -install -d -m 755 %{buildroot}/usr/local/sbin -install -p -D -m 755 %{_builddir}/kubectl-cert_manager %{buildroot}/usr/local/sbin - -%files -%defattr(-,root,root,-) -/usr/local/sbin/kubectl-cert_manager diff --git a/ldap/ldapscripts/centos/build_srpm.data b/ldap/ldapscripts/centos/build_srpm.data deleted file mode 100644 index b234af2d1..000000000 --- a/ldap/ldapscripts/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="files/* \ - $CGCS_BASE/downloads/ldapscripts-2.0.8.tgz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/ldap/ldapscripts/centos/ldapscripts.spec b/ldap/ldapscripts/centos/ldapscripts.spec deleted file mode 100644 index 6e5b116cd..000000000 --- a/ldap/ldapscripts/centos/ldapscripts.spec +++ /dev/null @@ -1,71 +0,0 @@ -Name: ldapscripts -Version: 2.0.8 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Summary: ldapscripts - -Group: base -License: GPLv2 -URL: unknown -Source0: %{name}-%{version}.tgz -Source1: ldapscripts.conf.cgcs -Source2: ldapadduser.template.cgcs -Source3: ldapaddgroup.template.cgcs -Source4: ldapmoduser.template.cgcs -Source5: ldapaddsudo.template.cgcs -Source6: ldapmodsudo.template.cgcs -Source7: ldapscripts.passwd - -Patch0: sudo-support.patch -Patch1: sudo-delete-support.patch -Patch2: log_timestamp.patch -Patch3: ldap-user-setup-support.patch -Patch4: allow-anonymous-bind-for-ldap-search.patch -Patch5: install-ldapscripts-files-to-etc.patch - -%define debug_package %{nil} - -# BuildRequires: -# Requires: - -%description -Shell scripts that allow to manage POSIX accounts (users, groups, machines) in an LDAP directory. - -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - -%build - -%install -make install DESTDIR=%{buildroot} - -rm -Rf %{buildroot}/usr/local/man -rm -f %{buildroot}/usr/local/sbin/*machine* -rm -f %{buildroot}/usr/local/etc/ldapscripts/ldapaddmachine.template.sample -install -d %{buildroot}/usr/local/etc/ -install -d %{buildroot}/etc/ldapscripts/ -install -m 644 %{SOURCE1} %{buildroot}/etc/ldapscripts/ldapscripts.conf -install -m 644 %{SOURCE2} %{buildroot}/etc/ldapscripts/ldapadduser.template.cgcs -install -m 644 %{SOURCE3} %{buildroot}/etc/ldapscripts/ldapaddgroup.template.cgcs -install -m 644 %{SOURCE4} %{buildroot}/etc/ldapscripts/ldapmoduser.template.cgcs -install -m 644 %{SOURCE5} %{buildroot}/etc/ldapscripts/ldapaddsudo.template.cgcs -install -m 644 %{SOURCE6} %{buildroot}/etc/ldapscripts/ldapmodsudo.template.cgcs -install -m 600 %{SOURCE7} %{buildroot}/etc/ldapscripts/ldapscripts.passwd - -%files -%defattr(-,root,root,-) -%dir /etc/ldapscripts/ -%dir /usr/local/lib/ldapscripts/ -/usr/local/sbin/* -%config(noreplace) /etc/ldapscripts/ldapscripts.passwd -/etc/ldapscripts/* -/usr/local/lib/ldapscripts/* - - -%changelog - diff --git a/ldap/openldap/centos/build_srpm.data b/ldap/openldap/centos/build_srpm.data deleted file mode 100644 index 22c8f12b3..000000000 --- a/ldap/openldap/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_SLOW=3 diff --git a/ldap/openldap/centos/meta_patches/PATCH_ORDER b/ldap/openldap/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 5c1220c5b..000000000 --- a/ldap/openldap/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -openldap-spec-file.patch -openldap-enable-password-policy.patch -Update-package-versioning-for-TIS-format.patch diff --git a/ldap/openldap/centos/meta_patches/Update-package-versioning-for-TIS-format.patch b/ldap/openldap/centos/meta_patches/Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 09f2e10f9..000000000 --- a/ldap/openldap/centos/meta_patches/Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 935686ff5e53cec008f129cc5d17146bd9365eb0 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:11:22 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/openldap.spec ---- - SPECS/openldap.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/openldap.spec b/SPECS/openldap.spec -index c38f1bd..d35d73f 100644 ---- a/SPECS/openldap.spec -+++ b/SPECS/openldap.spec -@@ -5,7 +5,7 @@ - - Name: openldap - Version: 2.4.44 --Release: 20%{?dist} -+Release: 20.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: LDAP support libraries - Group: System Environment/Daemons - License: OpenLDAP --- -2.7.4 - diff --git a/ldap/openldap/centos/meta_patches/openldap-enable-password-policy.patch b/ldap/openldap/centos/meta_patches/openldap-enable-password-policy.patch deleted file mode 100644 index 0163f23b3..000000000 --- a/ldap/openldap/centos/meta_patches/openldap-enable-password-policy.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9fcb15e18f21acf3fef0fb59dccc3fa0dd37efd4 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:11:22 -0400 -Subject: [PATCH] WRS: openldap-enable-password-policy.patch - ---- - SPECS/openldap.spec | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/SPECS/openldap.spec b/SPECS/openldap.spec -index 66a1377..468ca0e 100644 ---- a/SPECS/openldap.spec -+++ b/SPECS/openldap.spec -@@ -71,6 +71,9 @@ Patch101: openldap-tlsmc.patch - # Fedora specific patches - Patch102: openldap-fedora-systemd.patch - -+# WRS specific patches -+Patch200: rootdn-should-not-bypass-ppolicy.patch -+ - BuildRequires: cyrus-sasl-devel, nss-devel, openssl-devel, krb5-devel, tcp_wrappers-devel, unixODBC-devel - BuildRequires: glibc-devel, libtool, libtool-ltdl-devel, groff, perl, perl-devel, perl(ExtUtils::Embed) - Requires: nss-tools -@@ -190,6 +193,9 @@ AUTOMAKE=%{_bindir}/true autoreconf -fi - - %patch102 -p1 - -+# WRS -+%patch200 -p1 -+ - # build smbk5pwd with other overlays - ln -s ../../../contrib/slapd-modules/smbk5pwd/smbk5pwd.c servers/slapd/overlays - mv contrib/slapd-modules/smbk5pwd/README contrib/slapd-modules/smbk5pwd/README.smbk5pwd -@@ -312,12 +318,12 @@ install -d -m 740 %{buildroot}%{_sysconfdir}/openldap - cat > %{buildroot}%{_sysconfdir}/openldap/check_password.conf < -Date: Mon, 2 Oct 2017 17:11:21 -0400 -Subject: [PATCH] WRS: openldap-spec-file.patch - ---- - SPECS/openldap.spec | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/SPECS/openldap.spec b/SPECS/openldap.spec -index 85abac9..66a1377 100644 ---- a/SPECS/openldap.spec -+++ b/SPECS/openldap.spec -@@ -308,7 +308,7 @@ mv check_password.so check_password.so.%{check_password_version} - ln -s check_password.so.%{check_password_version} %{buildroot}%{_libdir}/openldap/check_password.so - install -m 755 check_password.so.%{check_password_version} %{buildroot}%{_libdir}/openldap/ - # install -m 644 README %{buildroot}%{_libdir}/openldap --install -d -m 755 %{buildroot}%{_sysconfdir}/openldap -+install -d -m 740 %{buildroot}%{_sysconfdir}/openldap - cat > %{buildroot}%{_sysconfdir}/openldap/check_password.conf </dev/null -- mv %{_sysconfdir}/openldap/slapd.conf %{_sysconfdir}/openldap/slapd.conf.bak - else - %{_libexecdir}/openldap/convert-config.sh -f %{_datadir}/openldap-servers/slapd.ldif &>/dev/null - fi -@@ -653,8 +653,8 @@ exit 0 - %{_mandir}/man5/slapd*.5* - %{_mandir}/man5/slapo-*.5* - # obsolete configuration --%ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf --%ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf.bak -+# %ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf -+# %ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf.bak - - %files servers-sql - %doc openldap-%{version}/servers/slapd/back-sql/docs/* --- -2.7.4 - diff --git a/ldap/openldap/centos/patches/rootdn-should-not-bypass-ppolicy.patch b/ldap/openldap/centos/patches/rootdn-should-not-bypass-ppolicy.patch deleted file mode 100644 index 797c8ad1f..000000000 --- a/ldap/openldap/centos/patches/rootdn-should-not-bypass-ppolicy.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9456b0eee753d9fd368347b6974a2f6f8d941d4f Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Tue, 11 Apr 2017 17:23:03 -0400 -Subject: [PATCH] rootdn should not bypass ppolicy - ---- - servers/slapd/overlays/ppolicy.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c -index b446deb..fa79872 100644 ---- a/servers/slapd/overlays/ppolicy.c -+++ b/servers/slapd/overlays/ppolicy.c -@@ -1905,7 +1905,8 @@ ppolicy_modify( Operation *op, SlapReply *rs ) - for(p=tl; p; p=p->next, hsize++); /* count history size */ - } - -- if (be_isroot( op )) goto do_modify; -+ /* WRS UPDATE: Run ppolicy for all user password modify ops */ -+ //if (be_isroot( op )) goto do_modify; - - /* NOTE: according to draft-behera-ldap-password-policy - * pwdAllowUserChange == FALSE must only prevent pwd changes -@@ -2009,7 +2010,13 @@ ppolicy_modify( Operation *op, SlapReply *rs ) - } - - bv = newpw.bv_val ? &newpw : &addmod->sml_values[0]; -- if (pp.pwdCheckQuality > 0) { -+ -+ /* WRS UPDATE: -+ * If this is a rootDN op and this is the first password -+ * then bypass password policies as this is a new account -+ * creation -+ */ -+ if (pp.pwdCheckQuality > 0 && !(be_isroot( op ) && !pa)) { - - rc = check_password_quality( bv, &pp, &pErr, e, (char **)&txt ); - if (rc != LDAP_SUCCESS) { --- -1.9.1 - diff --git a/ldap/openldap/centos/srpm_path b/ldap/openldap/centos/srpm_path deleted file mode 100644 index 76892ba0e..000000000 --- a/ldap/openldap/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/openldap-2.4.44-20.el7.src.rpm diff --git a/logging/logrotate/centos/build_srpm.data b/logging/logrotate/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/logging/logrotate/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/logging/logrotate/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/logging/logrotate/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 19fdeb77d..000000000 --- a/logging/logrotate/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ebe97c306c3251fc4ba58110ad4f0fa709d04969 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 16:22:44 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - ---- - SPECS/logrotate.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/logrotate.spec b/SPECS/logrotate.spec -index c22af07..0dbde7d 100644 ---- a/SPECS/logrotate.spec -+++ b/SPECS/logrotate.spec -@@ -1,7 +1,7 @@ - Summary: Rotates, compresses, removes and mails system log files - Name: logrotate - Version: 3.8.6 --Release: 17%{?dist} -+Release: 17.el7%{?_tis_dist}.%{tis_patch_ver} - License: GPL+ - Group: System Environment/Base - URL: https://github.com/logrotate/logrotate --- -2.7.4 - diff --git a/logging/logrotate/centos/meta_patches/0002-Add-upstream-patches.patch b/logging/logrotate/centos/meta_patches/0002-Add-upstream-patches.patch deleted file mode 100644 index 7096e018c..000000000 --- a/logging/logrotate/centos/meta_patches/0002-Add-upstream-patches.patch +++ /dev/null @@ -1,36 +0,0 @@ -From dfd8e1c325e43cc8a5eb5ba939e355f89515a1d3 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Fri, 19 Jan 2018 23:04:46 -0500 -Subject: Add upstream patches - ---- - SPECS/logrotate.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/logrotate.spec b/SPECS/logrotate.spec -index 0eac8bf..99a22ac 100644 ---- a/SPECS/logrotate.spec -+++ b/SPECS/logrotate.spec -@@ -54,6 +54,9 @@ Patch19: logrotate-3.8.6-monthly-dst.patch - # fix #1374550 - unlink destination file when rotation fails - Patch20: logrotate-3.8.6-unlink-on-failure.patch - -+Patch10001: 0001-createOutputFile-rename-already-existing-file.patch -+Patch10002: 0002-createOutputFile-eliminate-stat-open-TOCTOU-race.patch -+ - Requires: coreutils >= 5.92 popt - BuildRequires: libselinux-devel popt-devel libacl-devel acl - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -@@ -93,6 +96,9 @@ log files on your system. - %patch19 -p1 - %patch20 -p1 - -+%patch10001 -p1 -+%patch10002 -p1 -+ - %build - make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes WITH_ACL=yes - --- -2.7.4 - diff --git a/logging/logrotate/centos/meta_patches/PATCH_ORDER b/logging/logrotate/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 26e1a4ef1..000000000 --- a/logging/logrotate/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Add-upstream-patches.patch diff --git a/logging/logrotate/centos/patches/0001-createOutputFile-rename-already-existing-file.patch b/logging/logrotate/centos/patches/0001-createOutputFile-rename-already-existing-file.patch deleted file mode 100644 index e62951182..000000000 --- a/logging/logrotate/centos/patches/0001-createOutputFile-rename-already-existing-file.patch +++ /dev/null @@ -1,105 +0,0 @@ -From cbd37cc302ed71fb27cb0af0293e949698ee4309 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 22 Aug 2018 00:13:32 +0800 -Subject: [PATCH] createOutputFile: rename already existing file - -Upstream patch: -From fc1c3eff61edf8e9f0a4bfa980f3a6030a6b271f Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Tue, 8 Mar 2016 16:56:50 +0100 -Subject: [PATCH] createOutputFile: rename already existing file - -See https://bugs.debian.org/734688 - -Closes #23 ---- - logrotate.c | 20 ++++++++++++++++++-- - test/test | 26 ++++++++++++++++++++++++++ - test/test-config.72.in | 7 +++++++ - 3 files changed, 51 insertions(+), 2 deletions(-) - create mode 100644 test/test-config.72.in - -diff --git a/logrotate.c b/logrotate.c -index e056ccd..e415164 100644 ---- a/logrotate.c -+++ b/logrotate.c -@@ -395,8 +395,24 @@ static int runScript(struct logInfo *log, char *logfn, char *script) - int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode) - { - int fd; -- struct stat sb_create; -- int acl_set = 0; -+ struct stat sb_create; -+ int acl_set = 0; -+ -+ if (stat(fileName, &sb_create) == 0) { -+ /* the destination file already exists, while it should not */ -+ struct tm now = *localtime(&nowSecs); -+ size_t fileName_size = strlen(fileName); -+ char* backupName = alloca(fileName_size + sizeof("-YYYYMMDDHH.backup")); -+ strncpy(backupName, fileName, fileName_size); -+ size_t date_size=strftime(backupName+fileName_size, 12, "-%Y%m%d%H", &now); -+ strncpy(backupName+fileName_size+date_size, ".backup\0", 8); -+ message(MESS_ERROR, "destination %s already exists, renaming to %s\n", fileName, backupName); -+ if (rename(fileName, backupName) != 0) { -+ message(MESS_ERROR, "error renaming already existing output file %s to %s: %s\n", -+ fileName, backupName, strerror(errno)); -+ return -1; -+ } -+ } - - fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW), - (S_IRUSR | S_IWUSR) & sb->st_mode); -diff --git a/test/test b/test/test -index bcdfe05..b47ac6a 100755 ---- a/test/test -+++ b/test/test -@@ -1586,6 +1586,32 @@ EOF - rm -rf testdir adir - rm -rf testdir bdir - -+cleanup 72 -+ -+# ------------------------------- Test 72 ------------------------------------ -+preptest test.log 72 2 -+ -+$RLR test-config.72 --force -+ -+checkoutput < test.log.1.gz -+ -+$RLR test-config.72 --force -+dt="$(date +%Y%m%d%H)" -+ -+checkoutput < -Date: Mon, 17 Oct 2016 17:59:31 +0200 -Subject: createOutputFile: eliminate stat/open TOCTOU race - ---- - logrotate.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/logrotate.c b/logrotate.c -index e415164..c4b8e0c 100644 ---- a/logrotate.c -+++ b/logrotate.c -@@ -394,11 +394,18 @@ static int runScript(struct logInfo *log, char *logfn, char *script) - - int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode) - { -- int fd; -+ int fd = -1; - struct stat sb_create; - int acl_set = 0; -+ int i; -+ -+ for (i = 0; i < 2; ++i) { -+ fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW), -+ (S_IRUSR | S_IWUSR) & sb->st_mode); -+ -+ if ((fd >= 0) || (errno != EEXIST)) -+ break; - -- if (stat(fileName, &sb_create) == 0) { - /* the destination file already exists, while it should not */ - struct tm now = *localtime(&nowSecs); - size_t fileName_size = strlen(fileName); -@@ -412,11 +419,9 @@ int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, i - fileName, backupName, strerror(errno)); - return -1; - } -+ /* existing file renamed, try it once again */ - } - -- fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW), -- (S_IRUSR | S_IWUSR) & sb->st_mode); -- - if (fd < 0) { - message(MESS_ERROR, "error creating output file %s: %s\n", - fileName, strerror(errno)); --- -2.7.4 - diff --git a/logging/logrotate/centos/srpm_path b/logging/logrotate/centos/srpm_path deleted file mode 100644 index 4f7dfdd7c..000000000 --- a/logging/logrotate/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/logrotate-3.8.6-17.el7.src.rpm diff --git a/networking/iproute/centos/build_srpm.data b/networking/iproute/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/networking/iproute/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/iproute/centos/meta_patches/PATCH_ORDER b/networking/iproute/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 032f84b55..000000000 --- a/networking/iproute/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -iproute.spec-Modify-Release-field-for-StarlingX.patch diff --git a/networking/iproute/centos/meta_patches/iproute.spec-Modify-Release-field-for-StarlingX.patch b/networking/iproute/centos/meta_patches/iproute.spec-Modify-Release-field-for-StarlingX.patch deleted file mode 100644 index 2fa53add3..000000000 --- a/networking/iproute/centos/meta_patches/iproute.spec-Modify-Release-field-for-StarlingX.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8b090dec49da1d238ce9e6be1b4b9627707a1c2f Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 27 Oct 2021 11:59:52 -0400 -Subject: [PATCH] iproute.spec: Modify Release field for StarlingX - -This commit modifies the Release field of the iproute package's spec -file for StarlingX. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/iproute.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/iproute.spec b/SPECS/iproute.spec -index 1b5b5a719fdc..20869a9defbd 100644 ---- a/SPECS/iproute.spec -+++ b/SPECS/iproute.spec -@@ -1,7 +1,7 @@ - Summary: Advanced IP routing and network device configuration tools - Name: iproute - Version: 5.12.0 --Release: 4%{?dist}%{?buildid} -+Release: 4%{?_tis_dist}.%{tis_patch_ver}%{?buildid} - Group: Applications/System - URL: http://kernel.org/pub/linux/utils/net/%{name}2/ - Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz --- -2.29.2 - diff --git a/networking/iproute/centos/srpm_path b/networking/iproute/centos/srpm_path deleted file mode 100644 index 35ac27397..000000000 --- a/networking/iproute/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/iproute-5.12.0-4.el8.src.rpm diff --git a/networking/iptables/centos/build_srpm.data b/networking/iptables/centos/build_srpm.data deleted file mode 100644 index bc37bdcbe..000000000 --- a/networking/iptables/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$DISTRO/patches/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/iptables/centos/meta_patches/PATCH_ORDER b/networking/iptables/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 9a77dc6c4..000000000 --- a/networking/iptables/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -iptables.spec-Modify-Release-field-for-StarlingX.patch -iptables.spec-Add-a-patch-for-compat.-with-older-gli.patch -iptables.spec-Include-legacy-tools-in-the-RPM.patch diff --git a/networking/iptables/centos/meta_patches/iptables.spec-Add-a-patch-for-compat.-with-older-gli.patch b/networking/iptables/centos/meta_patches/iptables.spec-Add-a-patch-for-compat.-with-older-gli.patch deleted file mode 100644 index dd8ba8c9a..000000000 --- a/networking/iptables/centos/meta_patches/iptables.spec-Add-a-patch-for-compat.-with-older-gli.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 281334baa2ea1b21abc9e70fe27980f81a19bca1 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 27 Oct 2021 14:45:36 -0400 -Subject: [PATCH] iptables.spec: Add a patch for compat. with older glibc - -This patch avoids the following compilation failures, which according to -the description of the imported patch, occurs due to the older version -of glibc in StarlingX: - -xtables-monitor.c:406:43: error: 'const struct tcphdr' has no member named 'th_sport' - printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); - -xtables-monitor.c:406:66: error: 'const struct tcphdr' has no member named 'th_dport' - printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/iptables.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/iptables.spec b/SPECS/iptables.spec -index cb4ac571791e..befe5ec262f1 100644 ---- a/SPECS/iptables.spec -+++ b/SPECS/iptables.spec -@@ -32,6 +32,7 @@ Source10: ebtables-config - %if 0%{?bootstrap} - Source11: %{url}/files/%{name}-%{version_old}.tar.bz2 - Source12: 0003-extensions-format-security-fixes-in-libip-6-t_icmp.patch -+Source13: 0013-xtables-monitor-fix-build-with-older-glibc.patch - %endif - - Patch01: 0001-iptables-apply-Use-mktemp-instead-of-tempfile.patch -@@ -231,6 +232,7 @@ replacement of the legacy tool. - pushd bootstrap_ver - %{__tar} --strip-components=1 -xf %{SOURCE11} - %{__patch} -p1 <%{SOURCE12} -+%{__patch} -p1 <%{SOURCE13} - popd - %endif - --- -2.29.2 - diff --git a/networking/iptables/centos/meta_patches/iptables.spec-Include-legacy-tools-in-the-RPM.patch b/networking/iptables/centos/meta_patches/iptables.spec-Include-legacy-tools-in-the-RPM.patch deleted file mode 100644 index 7c00debae..000000000 --- a/networking/iptables/centos/meta_patches/iptables.spec-Include-legacy-tools-in-the-RPM.patch +++ /dev/null @@ -1,74 +0,0 @@ -From cc1555a06c7deb3fd0c281d6b8d3ab01059a9c73 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Sat, 4 Dec 2021 10:42:39 -0500 -Subject: [PATCH] iptables.spec: Include legacy tools in the RPM - -This patch modifies the iptables.spec file so that iptables-legacy -binaries are included in the RPM package as well. This is required in -case a container sets up firewall rules with iptables-legacy and it is -necessary to inspect or manipulate these rules from the host side. - -With this patch, /usr/sbin on a StarlingX host will include the -iptables-legacy and ip6tables-legacy symlinks to xtables-legacy-multi. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/iptables.spec | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/SPECS/iptables.spec b/SPECS/iptables.spec -index befe5ec262f1..9147bead122b 100644 ---- a/SPECS/iptables.spec -+++ b/SPECS/iptables.spec -@@ -334,12 +334,6 @@ install -m 644 iptables/iptables-apply.8 %{buildroot}%{_mandir}/man8/ - rm -f %{buildroot}%{_sysconfdir}/ethertypes - %endif - --# drop all legacy tools --rm -f %{buildroot}%{_sbindir}/*legacy* --rm -f %{buildroot}%{_bindir}/iptables-xml --rm -f %{buildroot}%{_mandir}/man1/iptables-xml* --rm -f %{buildroot}%{_mandir}/man8/xtables-legacy* -- - # rename nft versions to standard name - pfx=%{buildroot}%{_sbindir}/iptables - for pfx in %{buildroot}%{_sbindir}/{iptables,ip6tables,arptables,ebtables}; do -@@ -418,25 +412,35 @@ done - %if 0%{?fedora} <= 24 - %{_sysconfdir}/ethertypes - %endif -+%{_bindir}/iptables-xml - %{_sbindir}/iptables - %{_sbindir}/iptables-apply -+%{_sbindir}/iptables-legacy -+%{_sbindir}/iptables-legacy-restore -+%{_sbindir}/iptables-legacy-save - %{_sbindir}/iptables-restore - %{_sbindir}/iptables-restore-translate - %{_sbindir}/iptables-save - %{_sbindir}/iptables-translate - %{_sbindir}/ip6tables -+%{_sbindir}/ip6tables-legacy -+%{_sbindir}/ip6tables-legacy-restore -+%{_sbindir}/ip6tables-legacy-save - %{_sbindir}/ip6tables-restore - %{_sbindir}/ip6tables-restore-translate - %{_sbindir}/ip6tables-save - %{_sbindir}/ip6tables-translate - %{_sbindir}/xtables-monitor - %{_sbindir}/xtables-nft-multi -+%{_sbindir}/xtables-legacy-multi -+%doc %{_mandir}/man1/iptables-xml* - %doc %{_mandir}/man8/iptables* - %doc %{_mandir}/man8/ip6tables* - %doc %{_mandir}/man8/xtables-monitor* - %doc %{_mandir}/man8/xtables-nft* - %doc %{_mandir}/man8/*tables-translate* - %doc %{_mandir}/man8/*tables-restore-translate* -+%doc %{_mandir}/man8/xtables-legacy* - %dir %{_libdir}/xtables - %{_libdir}/xtables/libarpt* - %{_libdir}/xtables/libebt* --- -2.29.2 - diff --git a/networking/iptables/centos/meta_patches/iptables.spec-Modify-Release-field-for-StarlingX.patch b/networking/iptables/centos/meta_patches/iptables.spec-Modify-Release-field-for-StarlingX.patch deleted file mode 100644 index 8a2001d42..000000000 --- a/networking/iptables/centos/meta_patches/iptables.spec-Modify-Release-field-for-StarlingX.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b64b3b0adc9391431fad330485993981fba5303c Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 27 Oct 2021 12:30:19 -0400 -Subject: [PATCH] iptables.spec: Modify Release field for StarlingX - -This commit modifies the Release field of the iptables package's spec -file for StarlingX. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/iptables.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/iptables.spec b/SPECS/iptables.spec -index 58df10b96201..cb4ac571791e 100644 ---- a/SPECS/iptables.spec -+++ b/SPECS/iptables.spec -@@ -17,7 +17,7 @@ Name: iptables - Summary: Tools for managing Linux kernel packet filtering capabilities - URL: http://www.netfilter.org/projects/iptables - Version: 1.8.4 --Release: 21%{?dist} -+Release: 21%{?_tis_dist}.%{tis_patch_ver} - Source: %{url}/files/%{name}-%{version}.tar.bz2 - Source1: iptables.init - Source2: iptables-config --- -2.29.2 - diff --git a/networking/iptables/centos/patches/0013-xtables-monitor-fix-build-with-older-glibc.patch b/networking/iptables/centos/patches/0013-xtables-monitor-fix-build-with-older-glibc.patch deleted file mode 100644 index 5ed0d2d55..000000000 --- a/networking/iptables/centos/patches/0013-xtables-monitor-fix-build-with-older-glibc.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 7c8791edac3e74f6ce0bf21f98bc820db8e55e62 Mon Sep 17 00:00:00 2001 -From: Baruch Siach -Date: Fri, 16 Nov 2018 07:23:32 +0200 -Subject: [PATCH] xtables-monitor: fix build with older glibc - -glibc older than 2.19 only expose BSD style fields of struct tcphdr when -_BSD_SOURCE is define. Current glibc however, warn that _BSD_SOURCE is -deprecated. Migrate to the GNU style of tcphdr fields to make the code -compatible with any glibc version. - -Fix the following build failure: - -xtables-monitor.c: In function 'trace_print_packet': -xtables-monitor.c:406:43: error: 'const struct tcphdr' has no member named 'th_sport' - printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); - ^ -xtables-monitor.c:406:66: error: 'const struct tcphdr' has no member named 'th_dport' - printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); - ^ -... - -Signed-off-by: Baruch Siach -Signed-off-by: Florian Westphal ---- - iptables/xtables-monitor.c | 30 ++++++++++++++---------------- - 1 file changed, 14 insertions(+), 16 deletions(-) - -diff --git a/iptables/xtables-monitor.c b/iptables/xtables-monitor.c -index 3b1ca777a28a..5d1611122df5 100644 ---- a/iptables/xtables-monitor.c -+++ b/iptables/xtables-monitor.c -@@ -403,26 +403,24 @@ static void trace_print_packet(const struct nftnl_trace *nlt, struct cb_arg *arg - case IPPROTO_UDP: - if (len < 4) - break; -- printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); -+ printf("SPORT=%d DPORT=%d ", ntohs(tcph->source), ntohs(tcph->dest)); - break; - case IPPROTO_TCP: - if (len < sizeof(*tcph)) - break; -- printf("SPORT=%d DPORT=%d ", ntohs(tcph->th_sport), ntohs(tcph->th_dport)); -- if (tcph->th_flags & (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG)) { -- if (tcph->th_flags & TH_SYN) -- printf("SYN "); -- if (tcph->th_flags & TH_ACK) -- printf("ACK "); -- if (tcph->th_flags & TH_FIN) -- printf("FIN "); -- if (tcph->th_flags & TH_RST) -- printf("RST "); -- if (tcph->th_flags & TH_PUSH) -- printf("PSH "); -- if (tcph->th_flags & TH_URG) -- printf("URG "); -- } -+ printf("SPORT=%d DPORT=%d ", ntohs(tcph->source), ntohs(tcph->dest)); -+ if (tcph->syn) -+ printf("SYN "); -+ if (tcph->ack) -+ printf("ACK "); -+ if (tcph->fin) -+ printf("FIN "); -+ if (tcph->rst) -+ printf("RST "); -+ if (tcph->psh) -+ printf("PSH "); -+ if (tcph->urg) -+ printf("URG "); - break; - default: - break; --- -2.29.2 - diff --git a/networking/iptables/centos/srpm_path b/networking/iptables/centos/srpm_path deleted file mode 100644 index 59817419c..000000000 --- a/networking/iptables/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/iptables-1.8.4-21.el8.src.rpm diff --git a/networking/keepalived/centos/build_srpm.data b/networking/keepalived/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/networking/keepalived/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/keepalived/centos/meta_patches/PATCH_ORDER b/networking/keepalived/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 88d17423a..000000000 --- a/networking/keepalived/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -keepalived.spec-Modify-Release-field-for-StarlingX.patch -keepalived.spec-Disable-dependency-on-snmp.patch -keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch deleted file mode 100644 index 44bcc0499..000000000 --- a/networking/keepalived/centos/meta_patches/keepalived.spec-Disable-dependency-on-snmp.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2c2b300edea3dea24d59dce0347a70d37994c135 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 10 Nov 2021 20:52:06 -0500 -Subject: [PATCH] keepalived.spec: Disable dependency on snmp - -This commit removes keepalived package's dependency on SNMP. This was -done for two reasons: - -- keepalived's configure script fails with the following error message - when attempting to check the sanity of the C compiler flags needed to - link keepalived with the net-snmp library. - - configure:11981: checking whether C compiler supports flag "..." from Net-SNMP - configure:11992: gcc -o conftest -O2 -g -pipe -Wall ... - /usr/lib64/libnetsnmpmibs.so: undefined reference to `headerGetEntry' - collect2: error: ld returned 1 exit status - - This occurs because of the mock build environment has a version of RPM - (and hence librpm) that is more recent than the one shipped with - CentOS 7.x, and librpm's "headerGetEntry" function has since been - deprecated, but net-snmp library is expected to dynamically link - against an RPM library with the "headerGetEntry" function defined. - - For the record, another colleague has encountered this issue in the - past, but with lldp instead of keepalived: - https://gist.github.com/ericho/049d1908f5d80485541e918515996702 - -- To resolve the aforementioned issue, one can build net-snmp library in - StarlingX as well. net-snmp used to be included in StarlingX's integ - repository, but it was removed with the following commit: - https://review.opendev.org/c/starlingx/integ/+/765381 - -keepalived is being updated in StarlingX, because OpenStack's neutron -depends on keepalived, and the stock version in CentOS 7 is not -compatible with the recently updated iptables. A software architect -colleague confirmed that neutron does not need to use keepalived in -StarlingX's context. This change is made to avoid the need to re-package -a large number of dependencies due to the recent iptables update. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/keepalived.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec -index 13650da79d64..8087fd474585 100644 ---- a/SPECS/keepalived.spec -+++ b/SPECS/keepalived.spec -@@ -1,4 +1,4 @@ --%bcond_without snmp -+%bcond_with snmp - %bcond_without vrrp - %bcond_without sha1 - %bcond_with iptables --- -2.29.2 - diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch deleted file mode 100644 index 679144ec1..000000000 --- a/networking/keepalived/centos/meta_patches/keepalived.spec-Modify-Release-field-for-StarlingX.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 63e4c62e7b642e273409b28bac8658af627553b6 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 10 Nov 2021 19:01:31 -0500 -Subject: [PATCH] keepalived.spec: Modify Release field for StarlingX - -This commit modifies the Release field of the keepalived package's spec -file for StarlingX. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/keepalived.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec -index b719d6cf2789..13650da79d64 100644 ---- a/SPECS/keepalived.spec -+++ b/SPECS/keepalived.spec -@@ -10,7 +10,7 @@ - Name: keepalived - Summary: High Availability monitor built upon LVS, VRRP and service pollers - Version: 2.1.5 --Release: 6%{?dist} -+Release: 6%{?_tis_dist}.%{tis_patch_ver} - License: GPLv2+ - URL: http://www.keepalived.org/ - Group: System Environment/Daemons --- -2.29.2 - diff --git a/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch b/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch deleted file mode 100644 index b0e8ef2c1..000000000 --- a/networking/keepalived/centos/meta_patches/keepalived.spec-Remove-usr-share-doc-keepalived-READ.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e111abc4421d848c99b30f6aaf077d08aea61337 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 10 Nov 2021 21:34:32 -0500 -Subject: [PATCH] keepalived.spec: Remove /usr/share/doc/keepalived/README - -This commit removes the file "/usr/share/doc/keepalived/README" from the -installation directory, because the same file is already installed into -"/usr/share/doc/keepalived-/README", and RPM reports the -following error about the former file: - - Checking for unpackaged file(s): /usr/lib/rpm/check-files \ - /builddir/build/BUILDROOT/keepalived-2.1.5-6.tis.1.x86_64 - RPM build errors: - error: Installed (but unpackaged) file(s) found: - /usr/share/doc/keepalived/README - Installed (but unpackaged) file(s) found: - /usr/share/doc/keepalived/README - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/keepalived.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec -index 8087fd474585..44b5a3f06578 100644 ---- a/SPECS/keepalived.spec -+++ b/SPECS/keepalived.spec -@@ -69,6 +69,7 @@ rm -rf %{buildroot} - make install DESTDIR=%{buildroot} - rm -rf %{buildroot}%{_initrddir}/ - rm -rf %{buildroot}%{_sysconfdir}/keepalived/samples/ -+rm -f %{buildroot}%{_docdir}/%{name}/README - %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service - mkdir -p %{buildroot}%{_libexecdir}/keepalived - --- -2.29.2 - diff --git a/networking/keepalived/centos/srpm_path b/networking/keepalived/centos/srpm_path deleted file mode 100644 index 85172d2d5..000000000 --- a/networking/keepalived/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/keepalived-2.1.5-6.el8.src.rpm diff --git a/networking/libnftnl/centos/build_srpm.data b/networking/libnftnl/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/networking/libnftnl/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/libnftnl/centos/meta_patches/PATCH_ORDER b/networking/libnftnl/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 37890c563..000000000 --- a/networking/libnftnl/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -libnftnl.spec-Modify-Release-field-for-StarlingX.patch diff --git a/networking/libnftnl/centos/meta_patches/libnftnl.spec-Modify-Release-field-for-StarlingX.patch b/networking/libnftnl/centos/meta_patches/libnftnl.spec-Modify-Release-field-for-StarlingX.patch deleted file mode 100644 index f14379711..000000000 --- a/networking/libnftnl/centos/meta_patches/libnftnl.spec-Modify-Release-field-for-StarlingX.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1f7f2beb8a94133938891fdff1fdd179603dd120 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Wed, 27 Oct 2021 13:38:14 -0400 -Subject: [PATCH] libnftnl.spec: Modify Release field for StarlingX - -This commit modifies the Release field of the libnftnl package's spec -file for StarlingX. - -Signed-off-by: M. Vefa Bicakci ---- - SPECS/libnftnl.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/libnftnl.spec b/SPECS/libnftnl.spec -index 4769895895b7..19681de0c2af 100644 ---- a/SPECS/libnftnl.spec -+++ b/SPECS/libnftnl.spec -@@ -1,5 +1,5 @@ - %define rpmversion 1.1.5 --%define specrelease 4%{?dist} -+%define specrelease 4%{?_tis_dist}.%{tis_patch_ver} - - Name: libnftnl - Version: %{rpmversion} --- -2.29.2 - diff --git a/networking/libnftnl/centos/srpm_path b/networking/libnftnl/centos/srpm_path deleted file mode 100644 index 50df41020..000000000 --- a/networking/libnftnl/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/libnftnl-1.1.5-4.el8.src.rpm diff --git a/networking/lldpd/centos/build_srpm.data b/networking/lldpd/centos/build_srpm.data deleted file mode 100644 index dd7c8d728..000000000 --- a/networking/lldpd/centos/build_srpm.data +++ /dev/null @@ -1,4 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/lldpd-0.9.0.tar.gz \ - $PKG_BASE/lldpd-0.9.0/* \ - $PKG_BASE/centos/files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/lldpd/centos/files/i40e-lldp-configure.sh b/networking/lldpd/centos/files/i40e-lldp-configure.sh deleted file mode 100644 index 1141207bc..000000000 --- a/networking/lldpd/centos/files/i40e-lldp-configure.sh +++ /dev/null @@ -1,215 +0,0 @@ -#!/bin/bash -################################################################################ -# Copyright (c) 2021 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ - -# Certain i40e network devices (XL710 Fortville) have an internal firmware LLDP -# agent enabled by default. This can prevent LLDP PDUs from being processed by -# the driver and any upper layer agents. -# -# This script allows a user to enable and disable the internal LLDP agent. -# -# Note: debugfs must be enabled in the kernel -# -# Note: Devices with firmware 5.05 and 8.10 use the ethtool command -# Devices with firmware 7.10 use the sysfs command -# -# To enable: -# ./i40e-lldp-configure.sh start -# -# To disable: -# ./i40e-lldp-configure.sh stop - -PROGNAME=$(basename $0) -DEBUGFS_PATH=/sys/kernel/debug -DEBUGFS_I40_DEVICES_PATH=$DEBUGFS_PATH/i40e -LLDP_COMMAND=lldp - -function log { - local MSG="${PROGNAME}: $1" - logger -p notice "${MSG}" -} - -function err { - local MSG="${PROGNAME}: $1" - logger -p error "${MSG}" -} - -function configure_device { - local DEVICE=$1 - local ACTION=$2 - local DEVICE_PATH=${DEBUGFS_I40_DEVICES}/${DEVICE} - - if [ ! -d ${DEVICE_PATH} ]; then - return 1 - fi - - echo "${LLDP_COMMAND} ${ACTION}" > ${DEVICE_PATH}/command - RET=$? - - if [ ${RET} -ne 0 ]; then - err "Failed to ${ACTION} internal LLDP agent for device ${DEVICE}" - return ${RET} - fi - - log "${ACTION} internal LLDP agent for device ${DEVICE}" - return ${RET} -} - -function ethtool_device { - local DEVICE=$1 - local COMMAND=$2 - - ethtool --set-priv-flags ${DEVICE} disable-fw-lldp ${COMMAND} - RET=$? - - if [ ${RET} -ne 0 ]; then - err "Failed to set disable-fw-lldp ${COMMAND} for device ${DEVICE}" - return ${RET} - fi - - log "Set disable-fw-lldp ${COMMAND} for device ${DEVICE}" - return ${RET} -} - - -function is_debugfs_mounted { - if grep -qs "${DEBUGFS_PATH}" /proc/mounts; then - return 0 - fi - return 1 -} - -function mount_debugfs { - mount -t debugfs none ${DEBUGFS_PATH} -} - -function unmount_debugfs { - umount ${DEBUGFS_PATH} -} - -function find_device_interface_from_pciaddr { - INTERFACE="" - - #Get device PCI address from path - local PCI_ADDR=${DEVICE##*/} - - #Lookup the device directory - local DEVICE_PATH - DEVICE_PATH=$(find /sys/devices -type d -name ${PCI_ADDR}) - - if [ -z "${DEVICE_PATH}" ]; then - log "Unable to find interface for ${PCI_ADDR}" - else - #Get the interface name for device - INTERFACE=$(ls ${DEVICE_PATH}/net) - if [ -z "${INTERFACE}" ]; then - log "Unable to find interface for ${PCI_ADDR}" - else - log "Found interface ${INTERFACE} for PCI address ${PCI_ADDR}" - fi - fi - -} - -function scan_devices { - local ACTION=$1 - local DEBUGFS_MOUNTED="false" - local DEVICES=${DEBUGFS_I40_DEVICES_PATH}/* - - if [ "${ACTION}" = "start" ]; then - local ETHTOOL_COMMAND="off" - else - local ETHTOOL_COMMAND="on" - fi - - if is_debugfs_mounted; then - DEBUGFS_MOUNTED="true" - fi - - if [ ${DEBUGFS_MOUNTED} = "false" ]; then - mount_debugfs - RET=$? - if [ ${RET} -ne 0 ]; then - err "Failed to mount debugfs" - return ${RET} - fi - log "Mounted debugfs" - fi - - # Set option to prevent the below for loop from running once - # if there are no directories in the $DEVICES path. - # Save the initial state in order to reset later - shopt -q nullglob - NULLGLOB=$? - shopt -s nullglob - - for DEVICE in $DEVICES; do - find_device_interface_from_pciaddr - if [ ! -z "${INTERFACE}" ]; then - ethtool_device ${INTERFACE} ${ETHTOOL_COMMAND} - RET=$? - # Ethtool method does not work for some firmware versions - # Fall back to sysfs method if ethtool does not work - if [ ${RET} -ne 0 ]; then - # Sysfs method is not able to return 1 if it fails - configure_device ${DEVICE} ${ACTION} - fi - else - configure_device ${DEVICE} ${ACTION} - fi - done - - # Unset option if that was the original state - if [ "${NULLGLOB}" -eq 1 ]; then - shopt -u nullglob - fi - - if [ ${DEBUGFS_MOUNTED} = "false" ]; then - unmount_debugfs - RET=$? - if [ ${RET} -ne 0 ]; then - err "Failed to unmount debugfs" - return ${RET} - fi - log "Unmounted debugfs" - fi - - return 0 -} - -function start { - scan_devices start - return $? -} - -function stop { - scan_devices stop - return $? -} - -function status { - return 0 -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - status) - status - ;; - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 -esac diff --git a/networking/lldpd/centos/files/lldpd-clear-station.patch b/networking/lldpd/centos/files/lldpd-clear-station.patch deleted file mode 100644 index 6ab09f0c5..000000000 --- a/networking/lldpd/centos/files/lldpd-clear-station.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b2ed14edc66c7876cd9239a346b92630403e996c Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Sun, 18 Jun 2017 22:23:49 -0400 -Subject: [PATCH 1/1] Clear station bit if any other capability is enabled - ---- - src/daemon/interfaces.c | 2 ++ - src/daemon/lldpd.c | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/src/daemon/interfaces.c b/src/daemon/interfaces.c -index ec81721..4923049 100644 ---- a/src/daemon/interfaces.c -+++ b/src/daemon/interfaces.c -@@ -309,6 +309,8 @@ interfaces_helper_chassis(struct lldpd *cfg, - if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) && - (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0)) - LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION; -+ else if (LOCAL_CHASSIS(cfg)->c_cap_enabled != LLDP_CAP_STATION) -+ LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_STATION; - - if (LOCAL_CHASSIS(cfg)->c_id != NULL && - LOCAL_CHASSIS(cfg)->c_id_subtype == LLDP_CHASSISID_SUBTYPE_LLADDR) -diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c -index c815705..dac633f 100644 ---- a/src/daemon/lldpd.c -+++ b/src/daemon/lldpd.c -@@ -1152,6 +1152,8 @@ lldpd_update_localchassis(struct lldpd *cfg) - if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) && - (LOCAL_CHASSIS(cfg)->c_cap_enabled == 0)) - LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION; -+ else if (LOCAL_CHASSIS(cfg)->c_cap_enabled != LLDP_CAP_STATION) -+ LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_STATION; - - /* Set chassis ID if needed. This is only done if chassis ID - has not been set previously (with the MAC address of an --- -1.8.3.1 - diff --git a/networking/lldpd/centos/files/lldpd-create-run-dir.patch b/networking/lldpd/centos/files/lldpd-create-run-dir.patch deleted file mode 100644 index a4e9d00a2..000000000 --- a/networking/lldpd/centos/files/lldpd-create-run-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: lldpd-0.9.0/src/daemon/lldpd.service.in -=================================================================== ---- lldpd-0.9.0.orig/src/daemon/lldpd.service.in -+++ lldpd-0.9.0/src/daemon/lldpd.service.in -@@ -9,6 +9,7 @@ Type=notify - NotifyAccess=main - EnvironmentFile=-/etc/default/lldpd - EnvironmentFile=-/etc/sysconfig/lldpd -+ExecStartPre=/bin/mkdir -p /var/run/lldpd - ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS - Restart=on-failure - diff --git a/networking/lldpd/centos/files/lldpd-i40e-disable.patch b/networking/lldpd/centos/files/lldpd-i40e-disable.patch deleted file mode 100644 index 1262e94db..000000000 --- a/networking/lldpd/centos/files/lldpd-i40e-disable.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: lldpd-0.9.0/src/daemon/lldpd.service.in -=================================================================== ---- lldpd-0.9.0.orig/src/daemon/lldpd.service.in -+++ lldpd-0.9.0/src/daemon/lldpd.service.in -@@ -10,6 +10,7 @@ - EnvironmentFile=-/etc/default/lldpd - EnvironmentFile=-/etc/sysconfig/lldpd - ExecStartPre=/bin/mkdir -p /var/run/lldpd -+ExecStartPre=/etc/init.d/i40e-lldp-configure.sh stop - ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS - Restart=on-failure - \ No newline at end of file diff --git a/networking/lldpd/centos/lldpd.spec b/networking/lldpd/centos/lldpd.spec deleted file mode 100644 index 6ab4c6912..000000000 --- a/networking/lldpd/centos/lldpd.spec +++ /dev/null @@ -1,420 +0,0 @@ -# This .spec file is targeted for SuSE OBS. It relies on macro that -# are not available on regular distributions. If you use directly -# rpmbuild, be sure to use something like `--define 'rhel_version -# 700'`. - -# Conditional build options, disable with "--without xxx" -%bcond_without xml -%bcond_without cdp -%bcond_without edp -%bcond_without sonmp -%bcond_without fdp -%bcond_without lldpmed -%bcond_without dot1 -%bcond_without dot3 -%bcond_without custom -# This has been conditionally removed since starlingx host code no longer -# manages or uses net-snmp because it's now containerized. -%bcond_with snmp -%bcond_with json - -# On RHEL <= 6, compile with oldies -# For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12. -%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 -%bcond_without oldies -%else -%bcond_with oldies -%endif - -# On RHEL < 7, disable systemd -# On SuSE < 12, disable systemd -%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200 -%bcond_with systemd -%else -%bcond_without systemd -%endif - -# On RHEL < 7, use embedded libevent -%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200 -%bcond_with system_libevent -%else -%bcond_without system_libevent -%endif - -%define lldpd_user lldpd -%define lldpd_group lldpd -%define lldpd_chroot /var/run/lldpd -%define lldpd_ctl_socket /var/run/lldpd/lldpd.socket -%define lldpd_pid_file /var/run/lldpd/lldpd.pid - -Summary: Implementation of IEEE 802.1ab (LLDP) -Name: lldpd -Version: 0.9.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: MIT -Group: System/Management -URL: http://vincentbernat.github.com/lldpd/ -Source0: http://media.luffy.cx/files/lldpd/%{name}-%{version}.tar.gz -Source1: lldpd.init%{?suse_version:.suse} -# Source2: lldpd.sysconfig -Source3: lldpd.default -Source4: i40e-lldp-configure.sh - -Patch0: lldpd-interface-show.patch -Patch1: lldpd-create-run-dir.patch -Patch2: lldpd-i40e-disable.patch -Patch3: lldpd-clear-station.patch - -BuildRequires: pkgconfig -%if %{with system_libevent} -BuildRequires: libevent-devel -%endif -BuildRequires: readline-devel -%if %{with snmp} -BuildRequires: net-snmp-devel -BuildRequires: openssl-devel -%{!?suse_version:BuildRequires: lm_sensors-devel} -%endif -%if %{with xml} -BuildRequires: libxml2-devel -%endif - -BuildRequires: json-c-devel -BuildRequires: pciutils-devel - -%if %{with systemd} -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd -BuildRequires: systemd -BuildRequires: systemd-devel -BuildRequires: systemd-units -%endif -%if 0%{?suse_version} -PreReq: %fillup_prereq %insserv_prereq pwdutils -%else -Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts -%endif - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} - -%description -This implementation provides LLDP sending and reception, supports VLAN -and includes an SNMP subagent that can interface to an SNMP agent -through AgentX protocol. - -LLDP is an industry standard protocol designed to supplant proprietary -Link-Layer protocols such as Extreme EDP (Extreme Discovery Protocol) -and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an -inter-vendor compatible mechanism to deliver Link-Layer notifications -to adjacent network devices. - -This daemon is also able to deal with CDP, FDP, SONMP and EDP -protocol. It also handles LLDP-MED extension. - -%package devel -Summary: Implementation of IEEE 802.1ab - Tools and header files for developers -Group: Development/Libraries/C -BuildRequires: pkgconfig -Requires: lldpd = %{version}-%{release} - -%description devel -This package is required to develop alternate clients for lldpd. - -LLDP is an industry standard protocol designed to supplant proprietary -Link-Layer protocols such as Extreme EDP (Extreme Discovery Protocol) -and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an -inter-vendor compatible mechanism to deliver Link-Layer notifications -to adjacent network devices. - -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - - -%build -%configure \ -%if %{with snmp} - --with-snmp \ -%endif -%if %{with xml} - --with-xml \ -%endif -%if %{with cdp} - --enable-cdp \ -%else - --disable-cdp \ -%endif -%if %{with edp} - --enable-edp \ -%else - --disable-edp \ -%endif -%if %{with sonmp} - --enable-sonmp \ -%else - --disable-sonmp \ -%endif -%if %{with fdp} - --enable-fdp \ -%else - --disable-fdp \ -%endif -%if %{with lldpmed} - --enable-lldpmed \ -%else - --disable-lldpmed \ -%endif -%if %{with dot1} - --enable-dot1 \ -%else - --disable-dot1 \ -%endif -%if %{with dot3} - --enable-dot3 \ -%else - --disable-dot3 \ -%endif -%if %{with custom} - --enable-custom \ -%else - --disable-custom \ -%endif -%if %{with oldies} - --enable-oldies \ -%else - --disable-oldies \ -%endif - --with-privsep-user=%lldpd_user \ - --with-privsep-group=%lldpd_group \ - --with-privsep-chroot=%lldpd_chroot \ -%if %{without systemd} - --with-systemdsystemunitdir=no \ -%endif - --with-sysusersdir=no \ - --prefix=%{_usr} \ - --localstatedir=%{_localstatedir} \ - --sysconfdir=%{_sysconfdir} \ - --libdir=%{_libdir} \ - --docdir=%{_docdir}/lldpd \ - --enable-pie \ - --with-lldpd-ctl-socket=%lldpd_ctl_socket \ - --with-lldpd-pid-file=%lldpd_pid_file - -[ -f %{_includedir}/net-snmp/agent/struct.h ] || touch src/struct.h -make %{?_smp_mflags} - -%install -make install DESTDIR=$RPM_BUILD_ROOT -%if %{without systemd} -install -d $RPM_BUILD_ROOT/%{_initrddir} -install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/lldpd -%endif -# %if 0%{?suse_version} -# mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates -# install -m700 %{SOURCE2} ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.lldpd -# %else -# install -d $RPM_BUILD_ROOT/etc/sysconfig -# install -m644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lldpd -# %endif - -install -Dm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/default/lldpd -install -d %{buildroot}%{_initrddir} -install -Dm 0755 %{SOURCE4} %{buildroot}%{_initrddir}/ - -# Make an empty configuration file -touch %{buildroot}%{_sysconfdir}/lldpd.conf - -%pre -# Create lldpd user/group -if getent group %lldpd_group >/dev/null 2>&1 ; then : ; else \ - %{_sbindir}/groupadd -r %lldpd_group > /dev/null 2>&1 || exit 1 ; fi -if getent passwd %lldpd_user >/dev/null 2>&1 ; then : ; else \ - %{_sbindir}/useradd --system --shell /bin/false --no-create-home \ - -g %lldpd_group %lldpd_user 2> /dev/null \ - || exit 1 ; fi - -%if 0%{?suse_version} -# Service management for SuSE - -%post -/sbin/ldconfig -%{fillup_and_insserv lldpd} -%postun -/sbin/ldconfig -%restart_on_update lldpd -%insserv_cleanup -%preun -%stop_on_removal lldpd - -%else -%if %{without systemd} -# Service management for Redhat/CentOS without systemd - -%post -/sbin/ldconfig -/sbin/chkconfig --add lldpd -%postun -/sbin/ldconfig -if [ "$1" -ge "1" ]; then - /sbin/service lldpd condrestart >/dev/null 2>&1 || : -fi -%preun -if [ "$1" = "0" ]; then - /sbin/service lldpd stop > /dev/null 2>&1 - /sbin/chkconfig --del lldpd -fi - -%else -# Service management for Redhat/CentOS with systemd - -%post -/sbin/ldconfig -%systemd_post lldpd.service -/bin/systemctl enable lldpd.service - -%preun -%systemd_preun lldpd.service - -%postun -%systemd_postun_with_restart lldpd.service -/sbin/ldconfig - -%endif -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%dir %{_docdir}/lldpd -%doc %{_docdir}/lldpd/NEWS -%doc %{_docdir}/lldpd/ChangeLog -%doc %{_docdir}/lldpd/README.md -%doc %{_docdir}/lldpd/CONTRIBUTE.md -%{_sbindir}/lldpd -%{_sbindir}/lldpctl -%{_sbindir}/lldpcli -%{_libdir}/liblldpctl.so.* -%{_datadir}/zsh -%{_datadir}/bash-completion -%doc %{_mandir}/man8/lldp* -%config(noreplace) %{_sysconfdir}/lldpd.d -%if %{without systemd} -%config(noreplace) %attr(755,root,root) %{_initrddir}/lldpd -%else -%{_unitdir}/lldpd.service -%endif -%config(noreplace) %{_sysconfdir}/default/lldpd -%config(noreplace) %{_sysconfdir}/lldpd.conf -%{_initrddir}/i40e-lldp-configure.sh - -%files devel -%defattr(-,root,root) -%{_libdir}/liblldpctl.so -%{_libdir}/liblldpctl.a -%{_libdir}/liblldpctl.la -%{_libdir}/pkgconfig/lldpctl.pc -%{_includedir}/lldpctl.h -%{_includedir}/lldp-const.h - -%changelog -* Fri Jan 01 2016 Vincent Bernat - 0.9.0-1 -- New upstream version. -- Do not rely on libnl3. - -* Sun Dec 27 2015 Vincent Bernat - 0.8.0-1 -- New upstream version. -- Use system libnl3 when possible. -- Use system libevent when possible. - -* Wed Sep 09 2015 Vincent Bernat - 0.7.17-1 -- New upstream version. - -* Fri Aug 07 2015 Vincent Bernat - 0.7.16-1 -- New upstream version. - -* Wed May 20 2015 Vincent Bernat - 0.7.15-1 -- New upstream version. - -* Sat Apr 04 2015 Vincent Bernat - 0.7.14-1 -- New upstream version. - -* Tue Dec 30 2014 Vincent Bernat - 0.7.13-1 -- New upstream version. - -* Sat Nov 22 2014 Vincent Bernat - 0.7.12-1 -- New upstream version. -- Completion for bash and zsh. - -* Wed Oct 08 2014 Vincent Bernat - 0.7.11-1 -- New upstream version. -- Completion for bash and zsh. - -* Mon Jul 21 2014 Vincent Bernat - 0.7.10-1 -- New upstream version. - -* Wed May 28 2014 Vincent Bernat - 0.7.9-1 -- New upstream version. - -* Sun Apr 13 2014 Vincent Bernat - 0.7.8-1 -- New upstream version. - -* Sun Nov 10 2013 Vincent Bernat - 0.7.7-1 -- New upstream version. - -* Fri Jul 12 2013 Vincent Bernat - 0.7.6-1 -- New upstream version. - -* Sat Jun 22 2013 Vincent Bernat - 0.7.5-1 -- New upstream version. - -* Sun May 12 2013 Vincent Bernat - 0.7.3-1 -- New upstream version. - -* Fri Apr 19 2013 Vincent Bernat - 0.7.2-1 -- New upstream version. - -* Sat Jan 12 2013 Vincent Bernat - 0.7.1-1 -- New upstream version. - -* Sun Jan 06 2013 Vincent Bernat - 0.7.0-1 -- New upstream version. -- Requires readline-devel. -- Ships lldpcli. - -* Thu Sep 27 2012 Vincent Bernat - 0.6.1-1 -- New upstream version -- Do not require libevent, use embedded copy. -- Provide a -devel package. - -* Fri Jun 11 2010 Vincent Bernat - 0.5.1-1 -- New upstream version -- Define bcond_without and with macros if not defined to be compatible - with RHEL -- Requires useradd and groupadd -- Adapt to make it work with SuSE -- Provide an init script targetted at SuSE -- Build require lm_sensors-devel on RHEL - -* Fri Mar 12 2010 Vincent Bernat - 0.5.0-1 -- New upstream version -- Add XML support - -* Tue May 19 2009 Vincent Bernat - 0.4.0-1 -- Add variables -- Enable SNMP support -- Add _lldpd user creation -- Add initscript -- New upstream version - -* Mon May 18 2009 Dean Hamstead - 0.3.3-1 -- Initial attempt diff --git a/networking/net-tools/centos/build_srpm.data b/networking/net-tools/centos/build_srpm.data deleted file mode 100644 index c3c7e2378..000000000 --- a/networking/net-tools/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/networking/net-tools/centos/meta_patches/PATCH_ORDER b/networking/net-tools/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 7e70f0b80..000000000 --- a/networking/net-tools/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -spec-to-include-TiS-patches.patch diff --git a/networking/net-tools/centos/meta_patches/spec-to-include-TiS-patches.patch b/networking/net-tools/centos/meta_patches/spec-to-include-TiS-patches.patch deleted file mode 100644 index 3e0006e37..000000000 --- a/networking/net-tools/centos/meta_patches/spec-to-include-TiS-patches.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 98d37e1ee488883576260d9098d233902ef26ffb Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Sun, 16 Feb 2020 04:59:41 +0000 -Subject: [PATCH] WRS: spec-to-include-TiS-patches.patch - -Signed-off-by: Shuicheng Lin ---- - SPECS/net-tools.spec | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/SPECS/net-tools.spec b/SPECS/net-tools.spec -index d8497ee..25285cc 100644 ---- a/SPECS/net-tools.spec -+++ b/SPECS/net-tools.spec -@@ -3,7 +3,7 @@ - Summary: Basic networking tools - Name: net-tools - Version: 2.0 --Release: 0.24.%{checkout}%{?dist} -+Release: 0.24.20131004git.el7%{?_tis_dist}.%{tis_patch_ver} - License: GPLv2+ - Group: System Environment/Base - URL: http://sourceforge.net/projects/net-tools/ -@@ -68,6 +68,11 @@ Patch24: net-tools-netstat-sctp-man.patch - # output of interface names was restricted to 8-10 characters max - Patch25: net-tools-interface-name-len.patch - -+# STX patches -+Patch100: net-tools-hostname-ipv6-shortname.patch -+Patch101: net-tools-ifconfig-no-ifstate-on-flush.patch -+Patch102: fix-compile-error-with-4.18-kernel.patch -+ - BuildRequires: gettext, libselinux - BuildRequires: libselinux-devel - BuildRequires: systemd-units -@@ -107,6 +112,10 @@ cp %SOURCE8 ./man/en_US - %patch24 -p1 -b .sctp-man - %patch25 -p1 -b .interface-name-len - -+%patch100 -p1 -b .hostname-ipv6 -+%patch101 -p1 -b .ifconfig-no-ifstate-on-flush -+%patch102 -p1 -b .fix-compile-error -+ - touch ./config.h - - %build --- -2.7.4 - diff --git a/networking/net-tools/centos/srpm_path b/networking/net-tools/centos/srpm_path deleted file mode 100644 index 70f217433..000000000 --- a/networking/net-tools/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/net-tools-2.0-0.24.20131004git.el7.src.rpm diff --git a/networking/openvswitch/centos/build_srpm.data b/networking/openvswitch/centos/build_srpm.data deleted file mode 100644 index e482d70d2..000000000 --- a/networking/openvswitch/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -COPY_LIST="files/* \ - $PATCHES_BASE/* \ - $STX_BASE/downloads/openvswitch-2.11.0.tar.gz \ - $STX_BASE/downloads/dpdk-18.11.tar.xz" -TIS_PATCH_VER=PKG_GITREVCOUNT -BUILD_IS_SLOW=12 diff --git a/networking/openvswitch/centos/docker/Dockerfile b/networking/openvswitch/centos/docker/Dockerfile deleted file mode 100644 index c19a2152e..000000000 --- a/networking/openvswitch/centos/docker/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -# Expected build arguments: -# BASE: specify base layer -# -ARG BASE - -FROM ${BASE} - -ENV OVS_VERSION=2.11.0 - -RUN set -ex ;\ - yum install -y \ - bash \ - gcc \ - python2-sphinx \ - autoconf \ - automake \ - libtool \ - systemd-units \ - openssl \ - openssl-devel \ - python2-devel \ - python2-six \ - desktop-file-utils \ - groff-base \ - graphviz \ - procps-ng \ - python2-pyOpenSSL \ - nmap-ncat \ - libcap-ng \ - libcap-ng-devel \ - curl ;\ - yum clean all ;\ - TMP_DIR=$(mktemp -d) ;\ - curl -sSL http://openvswitch.org/releases/openvswitch-${OVS_VERSION}.tar.gz | tar xz -C ${TMP_DIR} --strip-components=1 ;\ - cd ${TMP_DIR} ;\ - ./boot.sh ;\ - ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc ;\ - make ;\ - make install ;\ - cd / ;\ - rm -rf ${TMP_DIR} ;\ - yum autoremove -y \ - openssl-devel \ - python2-devel \ - libcap-ng-devel \ - gcc \ - python2-sphinx \ - autoconf \ - automake \ - libtool \ - python2-six \ - desktop-file-utils \ - groff-base \ - graphviz \ - python2-pyOpenSSL \ - nmap-ncat ;\ diff --git a/networking/openvswitch/centos/openvswitch.spec b/networking/openvswitch/centos/openvswitch.spec deleted file mode 100644 index c5676c7ff..000000000 --- a/networking/openvswitch/centos/openvswitch.spec +++ /dev/null @@ -1,1016 +0,0 @@ -# Uncomment these for snapshot releases: -# commit0 is the git sha of the last commit -# date is the date YYYYMMDD of the snapshot -#%%global commit0 bd916d13dbb845746983a6780da772154df647ba -#%%global date 20180219 -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) - -# If wants to run tests while building, specify the '--with check' -# option. For example: -# rpmbuild -bb --with check openvswitch.spec - -# Enable PIE, bz#955181 -%global _hardened_build 1 - -# RHEL-7 doesn't define _rundir macro yet -# Fedora 15 onwards uses /run as _rundir -%if 0%{!?_rundir:1} -%define _rundir /run -%endif - -# To disable DPDK support, specify '--without dpdk' when building -%bcond_without dpdk - -# test-suite is broken for big endians -# https://bugzilla.redhat.com/show_bug.cgi?id=1105458#c10 -# "ofproto-dpif - select group with dp_hash selection method" test is broken on armv7lh -%ifarch x86_64 aarch64 ppc64le -%bcond_with check -%else -%bcond_with check -%endif -# option to run kernel datapath tests, requires building as root! -%bcond_with check_datapath_kernel -# option to build with libcap-ng, needed for running OVS as regular user -%bcond_without libcapng -# option to build openvswitch-ovn-docker package -%bcond_with ovn_docker - -%if 0%{?fedora} -%global with_python3 1 -%endif - -Name: openvswitch -Summary: Open vSwitch daemon/database/utilities -URL: http://www.openvswitch.org/ -# Carried over from 2.6.1 CBS builds, introduced to win over 2.6.90 -Epoch: 1 -Version: 2.11.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} - -# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the -# lib/sflow*.[ch] files are SISSL -# datapath/ is GPLv2 (although not built into any of the binary packages) -License: ASL 2.0 and LGPLv2+ and SISSL - -%define dpdkver 18.11 -%define dpdkdir dpdk -%define dpdksver %(echo %{dpdkver} | cut -d. -f-2) -# NOTE: DPDK does not currently build for s390x -%define dpdkarches x86_64 aarch64 ppc64le - -%if 0%{?commit0:1} -Source: https://github.com/openvswitch/ovs/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz -%else -Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz -%endif -Source10: http://fast.dpdk.org/rel/dpdk-%{dpdkver}.tar.xz - -Source500: configlib.sh -Source501: gen_config_group.sh -Source502: set_config.sh - -Source506: x86_64-native-linuxapp-gcc-config - -# The DPDK is designed to optimize througput of network traffic using, among -# other techniques, carefully crafted assembly instructions. As such it -# needs extensive work to port it to other architectures. -ExclusiveArch: x86_64 aarch64 ppc64le s390x - -# dpdk_mach_arch maps between rpm and dpdk arch name, often same as _target_cpu -# dpdk_mach_tmpl is the config template dpdk_mach name, often "native" -# dpdk_mach is the actual dpdk_mach name used in the dpdk make system -%ifarch x86_64 -%define dpdk_mach_arch x86_64 -%define dpdk_mach_tmpl native -%define dpdk_mach default -%endif - -%define dpdktarget %{dpdk_mach_arch}-%{dpdk_mach_tmpl}-linuxapp-gcc - -# ovs-patches -Patch01: run-services-as-root-user.patch - -BuildRequires: gcc -BuildRequires: python2-sphinx -BuildRequires: autoconf automake libtool -BuildRequires: systemd-units openssl openssl-devel -BuildRequires: python2-devel python2-six -%if 0%{?with_python3} -BuildRequires: python3-devel python3-six -%endif -BuildRequires: desktop-file-utils -BuildRequires: groff-base graphviz -# make check dependencies -BuildRequires: procps-ng -BuildRequires: python2-pyOpenSSL -%if %{with check_datapath_kernel} -BuildRequires: nmap-ncat -# would be useful but not available in RHEL or EPEL -#BuildRequires: python2-pyftpdlib -%endif - -%if %{with libcapng} -BuildRequires: libcap-ng libcap-ng-devel -%endif - -%if %{with dpdk} -%ifarch %{dpdkarches} -# DPDK driver dependencies -BuildRequires: zlib-devel libpcap-devel numactl-devel -BuildRequires: rdma-core-devel -BuildRequires: libmnl-devel -Requires: python-pyelftools - -# Virtual provide for depending on DPDK-enabled OVS -Provides: openvswitch-dpdk = %{version}-%{release} -# Migration path for openvswitch-dpdk package -Obsoletes: openvswitch-dpdk < 2.6.0 -# Required by packaging policy for the bundled DPDK -Provides: bundled(dpdk) = %{dpdkver} -%endif -%endif - -Requires: openssl iproute module-init-tools -#Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 -#Requires: kernel >= 3.15.0-0 - -Requires(post): /usr/bin/getent -Requires(post): /usr/sbin/useradd -Requires(post): /bin/sed -Requires(post): /usr/sbin/usermod -Requires(post): /usr/sbin/groupadd -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -Obsoletes: openvswitch-controller <= 0:2.1.0-1 - -%description -Open vSwitch provides standard network bridging functions and -support for the OpenFlow protocol for remote per-flow control of -traffic. - -%package -n python2-openvswitch -Summary: Open vSwitch python2 bindings -License: ASL 2.0 -BuildArch: noarch -Requires: python2 python2-six -Obsoletes: python-openvswitch < %{epoch}:2.7.2 -Provides: python-openvswitch = %{epoch}:%{version}-%{release} - -%description -n python2-openvswitch -Python bindings for the Open vSwitch database - -%if 0%{?with_python3} -%package -n python3-openvswitch -Summary: Open vSwitch python3 bindings -License: ASL 2.0 -BuildArch: noarch -Requires: python3 python3-six - -%description -n python3-openvswitch -Python bindings for the Open vSwitch database -%endif - -%package test -Summary: Open vSwitch testing utilities -License: ASL 2.0 -BuildArch: noarch -Requires: python2-openvswitch = %{epoch}:%{version}-%{release} -Requires: python2 python2-twisted - -%description test -Utilities that are useful to diagnose performance and connectivity -issues in Open vSwitch setup. - -%package devel -Summary: Open vSwitch OpenFlow development package (library, headers) -License: ASL 2.0 -Provides: openvswitch-static = %{epoch}:%{version}-%{release} - -%description devel -This provides static library, libopenswitch.a and the openvswitch header -files needed to build an external application. - -%package ovn-central -Summary: Open vSwitch - Open Virtual Network support -License: ASL 2.0 -Requires: openvswitch openvswitch-ovn-common -Requires: firewalld-filesystem - -%description ovn-central -OVN, the Open Virtual Network, is a system to support virtual network -abstraction. OVN complements the existing capabilities of OVS to add -native support for virtual network abstractions, such as virtual L2 and L3 -overlays and security groups. - -%package ovn-host -Summary: Open vSwitch - Open Virtual Network support -License: ASL 2.0 -Requires: openvswitch openvswitch-ovn-common -Requires: firewalld-filesystem - -%description ovn-host -OVN, the Open Virtual Network, is a system to support virtual network -abstraction. OVN complements the existing capabilities of OVS to add -native support for virtual network abstractions, such as virtual L2 and L3 -overlays and security groups. - -%package ovn-vtep -Summary: Open vSwitch - Open Virtual Network support -License: ASL 2.0 -Requires: openvswitch openvswitch-ovn-common - -%description ovn-vtep -OVN vtep controller - -%package ovn-common -Summary: Open vSwitch - Open Virtual Network support -License: ASL 2.0 -Requires: openvswitch - -%description ovn-common -Utilities that are use to diagnose and manage the OVN components. - -%if %{with ovn_docker} -%package ovn-docker -Summary: Open vSwitch - Open Virtual Network support -License: ASL 2.0 -Requires: openvswitch openvswitch-ovn-common python2-openvswitch - -%description ovn-docker -Docker network plugins for OVN. -%endif - -%prep -%if 0%{?commit0:1} -%autosetup -n ovs-%{commit0} -a 10 -p 1 -%else -%autosetup -a 10 -p 1 -%endif - -%build -%if 0%{?commit0:1} -# fix the snapshot unreleased version to be the released one. -sed -i.old -e "s/^AC_INIT(openvswitch,.*,/AC_INIT(openvswitch, %{version},/" configure.ac -%endif -./boot.sh - -%if %{with dpdk} -%ifarch %{dpdkarches} # build dpdk -# Lets build DPDK first -cd %{dpdkdir}-%{dpdkver} - -# In case dpdk-devel is installed -unset RTE_SDK RTE_INCLUDE RTE_TARGET - -# Avoid appending second -Wall to everything, it breaks upstream warning -# disablers in makefiles. Strip explicit -march= from optflags since they -# will only guarantee build failures, DPDK is picky with that. -export EXTRA_CFLAGS="$(echo %{optflags} | sed -e 's:-Wall::g' -e 's:-march=[[:alnum:]]* ::g') -Wformat -fPIC" - -# DPDK defaults to using builder-specific compiler flags. However, -# the config has been changed by specifying CONFIG_RTE_MACHINE=default -# in order to build for a more generic host. NOTE: It is possible that -# the compiler flags used still won't work for all Fedora-supported -# machines, but runtime checks in DPDK will catch those situations. - -make V=1 O=%{dpdktarget} T=%{dpdktarget} %{?_smp_mflags} config - -cp -f %{SOURCE500} %{SOURCE502} "%{_sourcedir}/%{dpdktarget}-config" . -%{SOURCE502} %{dpdktarget}-config "%{dpdktarget}/.config" - -make V=1 O=%{dpdktarget} %{?_smp_mflags} - -# Generate a list of supported drivers, its hard to tell otherwise. -cat << EOF > README.DPDK-PMDS -DPDK drivers included in this package: - -EOF - -for f in $(ls %{dpdk_mach_arch}-%{dpdk_mach_tmpl}-linuxapp-gcc/lib/lib*_pmd_*); do - basename ${f} | cut -c12- | cut -d. -f1 | tr [:lower:] [:upper:] -done >> README.DPDK-PMDS - -cat << EOF >> README.DPDK-PMDS - -For further information about the drivers, see -http://dpdk.org/doc/guides-%{dpdksver}/nics/index.html -EOF - -cd - -%endif # build dpdk -%endif - -# And now for OVS... -%configure \ -%if %{with libcapng} - --enable-libcapng \ -%else - --disable-libcapng \ -%endif - --enable-ssl \ -%if %{with dpdk} -%ifarch %{dpdkarches} - --with-dpdk=$(pwd)/%{dpdkdir}-%{dpdkver}/%{dpdktarget} \ -%endif -%endif - --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ - PYTHON=/usr/bin/python2 -/usr/bin/python2 build-aux/dpdkstrip.py \ - --dpdk \ - < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ - > rhel/usr_lib_systemd_system_ovs-vswitchd.service -make %{?_smp_mflags} \ -%if %{with dpdk} -%ifarch %{dpdkarches} - LDFLAGS="-libverbs -lmlx5" -%endif -%endif - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch -install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch -install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch - -install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \ - $RPM_BUILD_ROOT%{_udevrulesdir}/91-vfio.rules - -install -p -D -m 0644 \ - rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ - $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch - -for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \ - ovn-controller ovn-controller-vtep ovn-northd; do - install -p -D -m 0644 \ - rhel/usr_lib_systemd_system_${service}.service \ - $RPM_BUILD_ROOT%{_unitdir}/${service}.service -done - -install -m 0755 rhel/etc_init.d_openvswitch \ - $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init - -install -p -D -m 0644 rhel/etc_openvswitch_default.conf \ - $RPM_BUILD_ROOT/%{_sysconfdir}/openvswitch/default.conf - -install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \ - $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch - -install -m 0644 vswitchd/vswitch.ovsschema \ - $RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema - -install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ -install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \ - $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs -install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \ - $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs - -install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib} -cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \ - $RPM_BUILD_ROOT%{python2_sitelib} -%if 0%{?with_python3} -install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib} -cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \ - $RPM_BUILD_ROOT%{python3_sitelib} -%endif -rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ - -install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch - -install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ -install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ - $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml -install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ - $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml - -install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn -ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ - $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers - -install -p -D -m 0755 \ - rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \ - $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-systemd-reload - -touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db -touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf - -%if %{with dpdk} -%ifarch %{dpdkarches} - install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-pmdinfo.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py - install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-devbind.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-devbind.py -%endif -%endif - -# remove unpackaged files -rm -f $RPM_BUILD_ROOT/%{_bindir}/ovs-benchmark \ - $RPM_BUILD_ROOT/%{_bindir}/ovs-docker \ - $RPM_BUILD_ROOT/%{_bindir}/ovs-parse-backtrace \ - $RPM_BUILD_ROOT/%{_bindir}/ovs-testcontroller \ - $RPM_BUILD_ROOT/%{_sbindir}/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT/%{_mandir}/man1/ovs-benchmark.1* \ - $RPM_BUILD_ROOT/%{_mandir}/man8/ovs-testcontroller.* \ - $RPM_BUILD_ROOT/%{_mandir}/man8/ovs-vlan-bug-workaround.8* - -%if %{without ovn_docker} -rm -f $RPM_BUILD_ROOT/%{_bindir}/ovn-docker-overlay-driver \ - $RPM_BUILD_ROOT/%{_bindir}/ovn-docker-underlay-driver -%endif - -%check -%if %{with check} - if make check TESTSUITEFLAGS='%{_smp_mflags}' || - make check TESTSUITEFLAGS='--recheck'; then :; - else - cat tests/testsuite.log - exit 1 - fi -%endif -%if %{with check_datapath_kernel} - if make check-kernel RECHECK=yes; then :; - else - cat tests/system-kmod-testsuite.log - exit 1 - fi -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - -%preun -%if 0%{?systemd_preun:1} - %systemd_preun %{name}.service -%else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : - /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : - fi -%endif - -%preun ovn-central -%if 0%{?systemd_preun:1} - %systemd_preun ovn-northd.service -%else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : - /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : - fi -%endif - -%preun ovn-host -%if 0%{?systemd_preun:1} - %systemd_preun ovn-controller.service -%else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : - /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : - fi -%endif - -%preun ovn-vtep -%if 0%{?systemd_preun:1} - %systemd_preun ovn-controller-vtep.service -%else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : - /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : - fi -%endif - -%if 0%{?systemd_post:1} - %systemd_post %{name}.service -%else - # Package install, not upgrade - if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >dev/null || : - fi -%endif - -%post ovn-central -%if 0%{?systemd_post:1} - %systemd_post ovn-northd.service -%else - # Package install, not upgrade - if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >dev/null || : - fi -%endif - -%post ovn-host -%if 0%{?systemd_post:1} - %systemd_post ovn-controller.service -%else - # Package install, not upgrade - if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >dev/null || : - fi -%endif - -%post ovn-vtep -%if 0%{?systemd_post:1} - %systemd_post ovn-controller-vtep.service -%else - # Package install, not upgrade - if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >dev/null || : - fi -%endif -%postun ovn-central -%if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart ovn-northd.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ "$1" -ge "1" ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || : - fi -%endif - -%postun ovn-host -%if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart ovn-controller.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ "$1" -ge "1" ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || : - fi -%endif - -%postun ovn-vtep -%if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart ovn-controller-vtep.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ "$1" -ge "1" ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || : - fi -%endif - -%postun -%if 0%{?systemd_postun:1} - %systemd_postun %{name}.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -%endif - - -%files -n python2-openvswitch -%{python2_sitelib}/ovs - -%if 0%{?with_python3} -%files -n python3-openvswitch -%{python3_sitelib}/ovs -%endif - -%files test -%{_bindir}/ovs-test -%{_bindir}/ovs-vlan-test -%{_bindir}/ovs-l3ping -%{_bindir}/ovs-pcap -%{_bindir}/ovs-tcpdump -%{_bindir}/ovs-tcpundump -%{_mandir}/man8/ovs-test.8* -%{_mandir}/man8/ovs-vlan-test.8* -%{_mandir}/man8/ovs-l3ping.8* -%{_mandir}/man1/ovs-pcap.1* -%{_mandir}/man8/ovs-tcpdump.8* -%{_mandir}/man1/ovs-tcpundump.1* -%{python2_sitelib}/ovstest - -%files devel -%{_libdir}/*.a -%{_libdir}/*.la -%{_libdir}/pkgconfig/*.pc -%{_includedir}/openvswitch/* -%{_includedir}/openflow/* -%{_includedir}/ovn/* - -%files -%defattr(-,openvswitch,openvswitch) -%verify(not owner group) %dir %{_sysconfdir}/openvswitch -%verify(not owner group) %{_sysconfdir}/openvswitch/default.conf -%config %ghost %verify(not owner group md5 size mtime) %{_sysconfdir}/openvswitch/conf.db -%config %ghost %verify(not owner group md5 size mtime) %{_sysconfdir}/openvswitch/system-id.conf -%config(noreplace) %verify(not owner group md5 size mtime) %{_sysconfdir}/sysconfig/openvswitch -%defattr(-,root,root) -%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash -%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash -%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch -%{_unitdir}/openvswitch.service -%{_unitdir}/ovsdb-server.service -%{_unitdir}/ovs-vswitchd.service -%{_unitdir}/ovs-delete-transient-ports.service -%{_datadir}/openvswitch/scripts/openvswitch.init -%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs -%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs -%{_datadir}/openvswitch/bugtool-plugins/ -%{_datadir}/openvswitch/scripts/ovs-bugtool-* -%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs -%{_datadir}/openvswitch/scripts/ovs-lib -%{_datadir}/openvswitch/scripts/ovs-save -%{_datadir}/openvswitch/scripts/ovs-vtep -%{_datadir}/openvswitch/scripts/ovs-ctl -%{_datadir}/openvswitch/scripts/ovs-kmod-ctl -%{_datadir}/openvswitch/scripts/ovs-monitor-ipsec -%{_datadir}/openvswitch/scripts/ovs-systemd-reload -%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py -%{_datadir}/openvswitch/scripts/dpdk-devbind.py -%exclude %{_datadir}/openvswitch/scripts/*.py[oc] -%config %{_datadir}/openvswitch/vswitch.ovsschema -%config %{_datadir}/openvswitch/vtep.ovsschema -%{_bindir}/ovs-appctl -%{_bindir}/ovs-dpctl -%{_bindir}/ovs-dpctl-top -%{_bindir}/ovs-ofctl -%{_bindir}/ovs-vsctl -%{_bindir}/ovsdb-client -%{_bindir}/ovsdb-tool -%{_bindir}/ovs-pki -%{_bindir}/vtep-ctl -%{_sbindir}/ovs-bugtool -%{_sbindir}/ovs-vswitchd -%{_sbindir}/ovsdb-server -%{_mandir}/man1/ovsdb-client.1* -%{_mandir}/man1/ovsdb-server.1* -%{_mandir}/man1/ovsdb-tool.1* -%{_mandir}/man5/ovsdb.5* -%{_mandir}/man5/ovsdb-server.5.* -%{_mandir}/man5/ovs-vswitchd.conf.db.5* -%{_mandir}/man5/vtep.5* -%{_mandir}/man7/ovsdb-server.7* -%{_mandir}/man7/ovsdb.7* -%{_mandir}/man7/ovs-actions.7* -%{_mandir}/man7/ovs-fields.7* -%{_mandir}/man8/vtep-ctl.8* -%{_mandir}/man8/ovs-appctl.8* -%{_mandir}/man8/ovs-bugtool.8* -%{_mandir}/man8/ovs-ctl.8* -%{_mandir}/man8/ovs-dpctl.8* -%{_mandir}/man8/ovs-dpctl-top.8* -%{_mandir}/man8/ovs-kmod-ctl.8* -%{_mandir}/man8/ovs-ofctl.8* -%{_mandir}/man8/ovs-pki.8* -%{_mandir}/man8/ovs-vsctl.8* -%{_mandir}/man8/ovs-vswitchd.8* -%{_mandir}/man8/ovs-parse-backtrace.8* -%{_udevrulesdir}/91-vfio.rules -%doc LICENSE NOTICE README.rst NEWS rhel/README.RHEL.rst -%if %{with dpdk} -%ifarch %{dpdkarches} -%doc dpdk-%{dpdkver}/README.DPDK-PMDS -%endif -%endif -/var/lib/openvswitch -%attr(755,-,-) /var/log/openvswitch -%ghost %attr(755,root,root) %{_rundir}/openvswitch - -%if %{with ovn_docker} -%files ovn-docker -%{_bindir}/ovn-docker-overlay-driver -%{_bindir}/ovn-docker-underlay-driver -%endif - -%files ovn-common -%{_bindir}/ovn-detrace -%{_bindir}/ovn-nbctl -%{_bindir}/ovn-sbctl -%{_bindir}/ovn-trace -%{_datadir}/openvswitch/scripts/ovn-ctl -%{_datadir}/openvswitch/scripts/ovndb-servers.ocf -%{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show -%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list -%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show -%{_mandir}/man1/ovn-detrace.1* -%{_mandir}/man8/ovn-ctl.8* -%{_mandir}/man8/ovn-nbctl.8* -%{_mandir}/man8/ovn-trace.8* -%{_mandir}/man7/ovn-architecture.7* -%{_mandir}/man8/ovn-sbctl.8* -%{_mandir}/man5/ovn-nb.5* -%{_mandir}/man5/ovn-sb.5* -%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers - -%files ovn-central -%{_bindir}/ovn-northd -%{_mandir}/man8/ovn-northd.8* -%config %{_datadir}/openvswitch/ovn-nb.ovsschema -%config %{_datadir}/openvswitch/ovn-sb.ovsschema -%{_unitdir}/ovn-northd.service -%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml - -%files ovn-host -%{_bindir}/ovn-controller -%{_mandir}/man8/ovn-controller.8* -%{_unitdir}/ovn-controller.service -%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml - -%files ovn-vtep -%{_bindir}/ovn-controller-vtep -%{_mandir}/man8/ovn-controller-vtep.8* -%{_unitdir}/ovn-controller-vtep.service - -%changelog -* Tue Feb 20 2018 Iryna Shcherbina - 2.9.0-3 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Tue Feb 20 2018 Timothy Redaelli - 2.9.0-2 -- Align totally with RHEL "Fast Datapath" channel 2.9.0-1 - -* Tue Feb 20 2018 Timothy Redaelli - 2.9.0-1 -- Update to Open vSwitch 2.9.0 and DPDK 17.11 -- Align with RHEL "Fast Datapath" channel 2.9.0-1 - -* Fri Feb 09 2018 Aaron Conole - 2.8.1-2 -- Update to include 94cd8383e297 and 951d79e638ec from upstream - -* Thu Feb 08 2018 Fedora Release Engineering - 2.8.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Oct 02 2017 Timothy Redaelli - 2.8.1-1 -- Update to Open vSwitch 2.8.1 - -* Tue Sep 19 2017 Timothy Redaelli - 2.8.0-2 -- Update DPDK to 17.05.2 (bugfixes) - -* Mon Sep 04 2017 Timothy Redaelli - 2.8.0-1 -- Update to Open vSwitch 2.8.0 and DPDK 17.05.1 (#1487971) - -* Thu Aug 03 2017 Fedora Release Engineering - 2.7.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 2.7.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Jul 19 2017 Timothy Redaelli - 2.7.2-1 -- Update to Open vSwitch 2.7.2 -- Add a symlink of the OCF script in the OCF resources folder - -* Fri Jul 14 2017 Timothy Redaelli - 2.7.1-2 -- Backport fix for CVE-2017-9263 (#1457327) -- Backport fix for CVE-2017-9265 (#1457335) - -* Thu Jul 06 2017 Timothy Redaelli - 2.7.1-1 -- Updated to Open vSwitch 2.7.1 and DPDK 16.11.2 (#1468234) - -* Tue Jun 13 2017 Timothy Redaelli - 2.7.0-5 -- Backport fix for CVE-2017-9264 (#1457329) - -* Wed Jun 07 2017 Timothy Redaelli - 2.7.0-4 -- Remove PYTHONCOERCECLOCALE=0 workaround and backport upstream patch (#1454364) - -* Wed May 31 2017 Timothy Redaelli - 2.7.0-3 -- Backport fix for CVE-2017-9214 (#1456797) -- Use %%autosetup instead of %%setup - -* Mon May 29 2017 Timothy Redaelli - 2.7.0-2 -- Install OVN firewalld rules - -* Thu May 18 2017 Timothy Redaelli - 2.7.0-1 -- Link statically with DPDK 16.11.1 (#1451476) -- Build OVS without DPDK support on all architectures not supported by DPDK -- Added python3-six to BuildRequires in order to launch python3 tests too -- Export PYTHONCOERCECLOCALE=0 in order to workaround an incompatibility - between Python 3.6.0 (with PEP 538) on Fedora 26+ and testsuite (#1454364) -- Disable tests on armv7hl - -* Fri Feb 24 2017 Timothy Redaelli - 2.7.0-0 -- Updated to Open vSwitch 2.7.0 (#1426596) -- Enable DPDK support - -* Thu Feb 16 2017 Timothy Redaelli - 2.6.1-2 -- Added python3-openvswitch and renamed python-openvswitch to python2-openvswitch - -* Sat Feb 11 2017 Fedora Release Engineering - 2.6.1-1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Nov 24 2016 Flavio Leitner - 2.6.1-0 -- Updated to Open vSwitch 2.6.1 - -* Tue Nov 01 2016 Aaron Conole - 2.6.0-0 -- Update to Open vSwitch 2.6.0 -- Enable OVN - -* Wed Aug 24 2016 Dan Horák - 2.5.0-4 -- don't run the test-suite for big endian arches - -* Tue Jul 19 2016 Fedora Release Engineering - 2.5.0-3 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Tue Mar 15 2016 Panu Matilainen - 2.5.0-2 -- Remove unpackaged files instead of excluding (#1281913) - -* Wed Mar 02 2016 Panu Matilainen - 2.5.0-1 -- Update to 2.5.0 (#1312617) - -* Thu Feb 04 2016 Fedora Release Engineering - 2.4.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Aug 24 2015 Flavio Leitner - 2.4.0-1 -- updated to 2.4.0 (#1256171) - -* Thu Jun 18 2015 Flavio Leitner - 2.3.2-1 -- updated to 2.3.2 (#1233442) -- fixed to own /var/run/openvswitch directory (#1200887) - -* Thu Jun 18 2015 Fedora Release Engineering - 2.3.1-4.git20150327 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Mar 27 2015 Flavio Leitner - 2.3.1-3.git20150327 -- updated to 2.3.1-git4750c96 -- commented out kernel requires -- added requires to procps-ng (testsuite #84) - -* Wed Jan 14 2015 Flavio Leitner - 2.3.1-2.git20150113 -- updated to 2.3.1-git3282e51 - -* Fri Dec 05 2014 Flavio Leitner - 2.3.1-1 -- updated to 2.3.1 - -* Fri Nov 07 2014 Flavio Leitner - 2.3.0-3.git20141107 -- updated to 2.3.0-git39ebb203 - -* Thu Oct 23 2014 Flavio Leitner - 2.3.0-2 -- fixed to own conf.db and system-id.conf in /etc/openvswitch. - (#1132707) - -* Tue Aug 19 2014 Flavio Leitner - 2.3.0-1 -- updated to 2.3.0 - -* Sun Aug 17 2014 Fedora Release Engineering - 2.1.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Jun 12 2014 Flavio Leitner - 2.1.2-4 -- moved README.RHEL to be in the standard doc dir. -- added FAQ and NEWS files to the doc list. -- excluded PPC arch - -* Thu Jun 12 2014 Flavio Leitner - 2.1.2-3 -- removed ovsdbmonitor packaging - -* Sat Jun 07 2014 Fedora Release Engineering - 2.1.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Mar 25 2014 Flavio Leitner - 2.1.2-1 -- updated to 2.1.2 - -* Tue Mar 25 2014 Flavio Leitner - 2.1.0-1 -- updated to 2.1.0 -- obsoleted openvswitch-controller package -- requires kernel 3.15.0-0 or newer - (kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 - openvswitch: fix a possible deadlock and lockdep warning) -- ovs-lib: allow non-root users to check service status - (upstream commit 691e47554dd03dd6492e00bab5bd6d215f5cbd4f) -- rhel: Add Patch Port support to initscripts - (upstream commit e2bcc8ef49f5e51f48983b87ab1010f0f9ab1454) - -* Mon Jan 27 2014 Flavio Leitner - 2.0.1-1 -- updated to 2.0.1 - -* Mon Jan 27 2014 Flavio Leitner - 2.0.0-6 -- create a -devel package - (from Chris Wright ) - -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-5 -- Enable DHCP support for internal ports - (upstream commit 490db96efaf89c63656b192d5ca287b0908a6c77) - -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-4 -- disabled ovsdbmonitor packaging - (upstream has removed the component) - -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-3 -- fedora package: fix systemd ordering and deps. - (upstream commit b49c106ef00438b1c59876dad90d00e8d6e7b627) - -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-2 -- util: use gcc builtins to better check array sizes - (upstream commit 878f1972909b33f27b32ad2ded208eb465b98a9b) - -* Mon Oct 28 2013 Flavio Leitner - 2.0.0-1 -- updated to 2.0.0 (#1023184) - -* Mon Oct 28 2013 Flavio Leitner - 1.11.0-8 -- applied upstream commit 7b75828bf5654c494a53fa57be90713c625085e2 - rhel: Option to create tunnel through ifcfg scripts. - -* Mon Oct 28 2013 Flavio Leitner - 1.11.0-7 -- applied upstream commit 32aa46891af5e173144d672e15fec7c305f9a4f3 - rhel: Set STP of a bridge during bridge creation. - -* Mon Oct 28 2013 Flavio Leitner - 1.11.0-6 -- applied upstream commit 5b56f96aaad4a55a26576e0610fb49bde448dabe - rhel: Prevent duplicate ifup calls. - -* Mon Oct 28 2013 Flavio Leitner - 1.11.0-5 -- applied upstream commit 79416011612541d103a1d396d888bb8c84eb1da4 - rhel: Return an exit value of 0 for ifup-ovs. - -* Mon Oct 28 2013 Flavio Leitner - 1.11.0-4 -- applied upstream commit 2517bad92eec7e5625bc8b248db22fdeaa5fcde9 - Added RHEL ovs-ifup STP option handling - -* Tue Oct 1 2013 Flavio Leitner - 1.11.0-3 -- don't use /var/lock/subsys with systemd (#1006412) - -* Thu Sep 19 2013 Flavio Leitner - 1.11.0-2 -- ovsdbmonitor package is optional - -* Thu Aug 29 2013 Thomas Graf - 1.11.0-1 -- Update to 1.11.0 - -* Tue Aug 13 2013 Flavio Leitner - 1.10.0-7 -- Fixed openvswitch-nonetwork to start openvswitch.service (#996804) - -* Sat Aug 03 2013 Petr Pisar - 1.10.0-6 -- Perl 5.18 rebuild - -* Tue Jul 23 2013 Thomas Graf - 1.10.0-5 -- Typo - -* Tue Jul 23 2013 Thomas Graf - 1.10.0-4 -- Spec file fixes -- Maintain local copy of sysconfig.template - -* Thu Jul 18 2013 Petr Pisar - 1.10.0-3 -- Perl 5.18 rebuild - -* Mon Jul 01 2013 Thomas Graf - 1.10.0-2 -- Enable PIE (#955181) -- Provide native systemd unit files (#818754) - -* Thu May 02 2013 Thomas Graf - 1.10.0-1 -- Update to 1.10.0 (#958814) - -* Thu Feb 28 2013 Thomas Graf - 1.9.0-1 -- Update to 1.9.0 (#916537) - -* Tue Feb 12 2013 Thomas Graf - 1.7.3-8 -- Fix systemd service dependency loop (#818754) - -* Fri Jan 25 2013 Thomas Graf - 1.7.3-7 -- Auto-start openvswitch service on ifup/ifdown (#818754) -- Add OVSREQUIRES to allow defining OpenFlow interface dependencies - -* Thu Jan 24 2013 Thomas Graf - 1.7.3-6 -- Update to Open vSwitch 1.7.3 - -* Tue Nov 20 2012 Thomas Graf - 1.7.1-6 -- Increase max fd limit to support 256 bridges (#873072) - -* Thu Nov 1 2012 Thomas Graf - 1.7.1-5 -- Don't create world writable pki/*/incomming directory (#845351) - -* Thu Oct 25 2012 Thomas Graf - 1.7.1-4 -- Don't add iptables accept rule for -p GRE as GRE tunneling is unsupported - -* Tue Oct 16 2012 Thomas Graf - 1.7.1-3 -- require systemd instead of systemd-units to use macro helpers (#850258) - -* Tue Oct 9 2012 Thomas Graf - 1.7.1-2 -- make ovs-vsctl timeout if daemon is not running (#858722) - -* Mon Sep 10 2012 Thomas Graf - 1.7.1.-1 -- Update to 1.7.1 - -* Fri Sep 7 2012 Thomas Graf - 1.7.0.-3 -- add controller package containing ovs-controller - -* Thu Aug 23 2012 Tomas Hozza - 1.7.0-2 -- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850258) - -* Fri Aug 17 2012 Tomas Hozza - 1.7.0-1 -- Update to 1.7.0 -- Fixed openvswitch-configure-ovskmod-var-autoconfd.patch because - openvswitch kernel module name changed in 1.7.0 -- Removed Source8: ovsdbmonitor-move-to-its-own-data-directory.patch -- Patches merged: - - ovsdbmonitor-move-to-its-own-data-directory-automaked.patch - - openvswitch-rhel-initscripts-resync.patch - -* Fri Jul 20 2012 Fedora Release Engineering - 1.4.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Mar 15 2012 Chris Wright - 1.4.0-5 -- fix ovs network initscripts DHCP address acquisition (#803843) - -* Tue Mar 6 2012 Chris Wright - 1.4.0-4 -- make BuildRequires openssl explicit (needed on f18/rawhide now) - -* Tue Mar 6 2012 Chris Wright - 1.4.0-3 -- use glob to catch compressed manpages - -* Thu Mar 1 2012 Chris Wright - 1.4.0-2 -- Update License comment, use consitent macros as per review comments bz799171 - -* Wed Feb 29 2012 Chris Wright - 1.4.0-1 -- Initial package for Fedora diff --git a/networking/openvswitch/centos/patches/run-services-as-root-user.patch b/networking/openvswitch/centos/patches/run-services-as-root-user.patch deleted file mode 100644 index a39382612..000000000 --- a/networking/openvswitch/centos/patches/run-services-as-root-user.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 76ba5dcc92ad317d2b19cac916d710465e43e3a8 Mon Sep 17 00:00:00 2001 -From: Matt Peters -Date: Tue, 29 May 2018 12:20:27 -0500 -Subject: [PATCH] run services as root user - ---- - rhel/etc_openvswitch_default.conf | 2 +- - rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ---- - 2 files changed, 1 insertion(+), 5 deletions(-) - -diff --git a/rhel/etc_openvswitch_default.conf b/rhel/etc_openvswitch_default.conf -index c74417d..56d79eb 100644 ---- a/rhel/etc_openvswitch_default.conf -+++ b/rhel/etc_openvswitch_default.conf -@@ -2,4 +2,4 @@ - - # The following is the *default* configuration for the openvswitch user ID. - # This is for backward compatibility. --OVS_USER_ID="root:root" -+OVS_USER_ID="" -diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -index c6d9aa1..63eb68e 100644 ---- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -@@ -14,10 +14,6 @@ Environment=XDG_RUNTIME_DIR=/var/run/openvswitch - EnvironmentFile=/etc/openvswitch/default.conf - EnvironmentFile=-/etc/sysconfig/openvswitch - EnvironmentFile=-/run/openvswitch/useropts --@begin_dpdk@ --ExecStartPre=-/bin/sh -c '/usr/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages' --ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages --@end_dpdk@ - ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ - --no-ovsdb-server --no-monitor --system-id=random \ - ${OVSUSER} \ --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/stx-ovs.stable_docker_image b/networking/openvswitch/centos/stx-ovs.stable_docker_image deleted file mode 100644 index c5892097f..000000000 --- a/networking/openvswitch/centos/stx-ovs.stable_docker_image +++ /dev/null @@ -1,2 +0,0 @@ -BUILDER=docker -LABEL=stx-ovs diff --git a/python/python-daemon/centos/build_srpm.data b/python/python-daemon/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/python/python-daemon/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch b/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch deleted file mode 100644 index 5ef07c9b4..000000000 --- a/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1539089bcd70852304a630e56516f21645d94484 Mon Sep 17 00:00:00 2001 -From: SidneyAn -Date: Fri, 3 Apr 2020 06:51:41 +0000 -Subject: using el7 python3 dep pkgs - -using el7 pkgs as python3 dep instead of el8 ones -unit tests are also disabled to reduce the python3 deps -which is not supported by el7 - -Signed-off-by: SidneyAn ---- - SPECS/python-daemon.spec | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/SPECS/python-daemon.spec b/SPECS/python-daemon.spec -index 97e1cb2..686228e 100644 ---- a/SPECS/python-daemon.spec -+++ b/SPECS/python-daemon.spec -@@ -1,7 +1,7 @@ - %{?python_enable_dependency_generator} - Name: python-daemon - Version: 2.2.3 --Release: 7%{?dist} -+Release: 7.el8%{?_tis_dist}.%{tis_patch_ver} - Summary: Library to implement a well-behaved Unix daemon process - - # Some build scripts and test franework are licensed GPLv3+ but htose aren't shipped -@@ -15,11 +15,11 @@ Patch1: 0001-Mock-the-.__class__-attribute-so-tests-pass-in-py2.patch - - BuildArch: noarch - BuildRequires: python3-devel, python3-setuptools --BuildRequires: python3-testscenarios --BuildRequires: python3-docutils -+#BuildRequires: python3-testscenarios -+BuildRequires: python36-docutils - BuildRequires: python3-lockfile --BuildRequires: python3-mock --BuildRequires: python3-testtools -+BuildRequires: python36-mock -+#BuildRequires: python3-testtools - - %global _description\ - This library implements the well-behaved daemon specification of PEP 3143,\ -@@ -32,8 +32,8 @@ This is the python2 version of the library. - %package -n python3-daemon - Summary: Library to implement a well-behaved Unix daemon process - Requires: python3-lockfile --Requires: python3-docutils --%{?python_provide:%python_provide python3-daemon} -+Requires: python36-docutils -+%{?python_provide:%python_provide python%{python3_pkgversion}-daemon} - - %description -n python3-daemon %_description - -@@ -51,7 +51,7 @@ rm -fr %{buildroot}%{python3_sitelib}/tests - - # Test suite requires minimock and lockfile - %check --PYTHONPATH=$(pwd) %{__python3} -m unittest discover -+#PYTHONPATH=$(pwd) %{__python3} -m unittest discover - - %files -n python3-daemon - %license LICENSE.ASF-2 --- -2.7.4 - diff --git a/python/python-daemon/centos/meta_patches/PATCH_ORDER b/python/python-daemon/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index dba6bc4b8..000000000 --- a/python/python-daemon/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -0001-using-el7-python3-dep-pkgs.patch diff --git a/python/python-daemon/centos/srpm_path b/python/python-daemon/centos/srpm_path deleted file mode 100644 index b37e0b69d..000000000 --- a/python/python-daemon/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-daemon-2.2.3-7.el8.src.rpm diff --git a/python/python-html5lib/centos/build_srpm.data b/python/python-html5lib/centos/build_srpm.data deleted file mode 100644 index c40a7b495..000000000 --- a/python/python-html5lib/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="$STX_BASE/downloads/html5lib-python-1.0.1.tar.gz" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-html5lib/centos/python-html5lib.spec b/python/python-html5lib/centos/python-html5lib.spec deleted file mode 100644 index e26cefe8a..000000000 --- a/python/python-html5lib/centos/python-html5lib.spec +++ /dev/null @@ -1,110 +0,0 @@ -# define some macros for RHEL 6 -%global __python2 %__python -%global python2_sitelib %python_sitelib - -Name: html5lib-python -Version: 1.0.1 -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} -Summary: Python library for parsing HTML - -Group: Applications/System -License: MIT License -URL: https://github.com/html5lib/html5lib-python/archive/1.0.1.tar.gz -Source0: html5lib-python-1.0.1.tar.gz - -BuildArch: noarch - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-pip -BuildRequires: python3-wheel -Requires: python3-webencodings -%else -BuildRequires: python2-devel -BuildRequires: python-pip -BuildRequires: python-wheel -Requires: python-webencodings -%endif - - -%description -Python library for parsing HTML - -%package -n python2-html5lib -Summary: Python library for parsing HTML -%{?python_provide:%python_provide python2-html5lib} -%description -n python2-html5lib -Python library for parsing HTML - -%if 0%{?with_python3} -%package -n python3-html5lib -Summary: Python library for parsing HTML -Group: Applications/System -%{?python_provide:%python_provide python3-html5lib} - -%description -n python3-html5lib -Python library for parsing HTML - -%endif # with_python3 - -%prep -%setup -q -n html5lib-%{version} - - -%build -export PBR_VERSION=%{version} -%{__python} setup.py build -%py2_build_wheel - -%if 0%{?with_python3} -%{__python3} setup.py build -%endif # with_python3 - -%install -# Must do the python3 install first because the scripts in /usr/bin are -# overwritten with every setup.py install (and we want the python2 version -# to be the default for now). -%if 0%{?with_python3} -%if 0%{?build_wheel} -pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} - -sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record} -%else -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif - -find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f -%endif # with_python3 - -%if 0%{?build_wheel} -pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} -%else -%{__python2} setup.py install --skip-build --root %{buildroot} -%endif - -find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f - -# Don't ship these -# rm -r docs/{Makefile,conf.py} - -%if 0%{?with_check} -%check -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test - -%if 0%{?with_python3} -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} -%endif # with_python3 -%endif # with_check - -%files -n python2-html5lib -# %doc docs/* -%{python2_sitelib}/* - -%if 0%{?with_python3} -%files -n python3-html5lib -# %doc docs/* -%{python3_sitelib}/html5lib*/ -%endif # with_python3 - -%changelog - diff --git a/python/python-kubernetes/centos/build_srpm.data b/python/python-kubernetes/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/python/python-kubernetes/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-kubernetes/centos/meta_patches/0001-Include-watch.py-bug-fixes.patch b/python/python-kubernetes/centos/meta_patches/0001-Include-watch.py-bug-fixes.patch deleted file mode 100644 index 24d028537..000000000 --- a/python/python-kubernetes/centos/meta_patches/0001-Include-watch.py-bug-fixes.patch +++ /dev/null @@ -1,95 +0,0 @@ -From b33ab116b3a32578131712e9a450eb6c88782ef6 Mon Sep 17 00:00:00 2001 -From: Kyle MacLeod -Date: Tue, 17 Aug 2021 10:25:31 -0400 -Subject: [PATCH] Include watch.py bug fixes - -Patches watch.py up to commit 10ae476 in the 'base' repo -(kubernetes-client/python-base). ---- - SPECS/python-kubernetes.spec | 45 +++++++++++++++++++++++++++++++++--- - 1 file changed, 42 insertions(+), 3 deletions(-) - -diff --git a/SPECS/python-kubernetes.spec b/SPECS/python-kubernetes.spec -index 87c48ca..1c6fb59 100644 ---- a/SPECS/python-kubernetes.spec -+++ b/SPECS/python-kubernetes.spec -@@ -21,7 +21,7 @@ Source2: make-adal-optional.patch - - Name: python-%{library} - Version: 8.0.0 --Release: 8%{?dist} -+Release: 8.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Python client for the kubernetes API. - License: ASL 2.0 - URL: https://pypi.python.org/pypi/kubernetes -@@ -30,6 +30,20 @@ Source0: https://github.com/kubernetes-incubator/client-python/archive/v%{ver - Source1: https://github.com/kubernetes-client/python-base/archive/83ebb9d5fdc0d46bbb2e30afcd8eec42c5da4ad1.tar.gz - BuildArch: noarch - -+Source3: 0001-Verify-Boilerplate-fix.patch -+Source4: 0002-fix-watching-with-a-specified-resource-version.patch -+Source5: 0003-Making-watch-work-with-read_namespaced_pod_log.patch -+Source6: 0004-Don-t-use-break-inside-finally.patch -+Source7: 0005-Remove-all-shebangs-from-Python-modules-and-checker.patch -+Source8: 0006-Fixed-Watch.unmarshal_event-when-data-is-not-a-JSON-.patch -+Source9: 0007-watch-stream-stop-unmarshalling-when-streaming-log.patch -+Source10: 0008-Retry-watch-if-request-expires.patch -+Source11: 0009-Fix-a-Python-2-compatibility-issue.patch -+Source12: 0010-Fixes-codestyle-failures.patch -+Source13: 0011-Fix-Watch-retries-with-410-errors.patch -+Source14: 0012-Fixes-kubernetes-client-python-issue-1047-ResponseNo.patch -+Source15: 0013-quick-fix-of-decoding-error-for-BOOKMARK-event.patch -+ - %if 0%{?with_python2} - %package -n python2-%{library} - Summary: Kubernetes Python Client -@@ -133,11 +147,34 @@ mv python-base-83ebb9d5fdc0d46bbb2e30afcd8eec42c5da4ad1 base - %if 0%{?rhel} == 7 - patch -p1 < %{SOURCE2} - %endif -+ -+# Apply StarlingX patches. -+# The patches are taken from the context of the 'base' directory -+# which is a git submodule. -+# We have to use redirection since we can't run the patches -+# via autosetup due to the above tarball extraction: -+pushd base -+patch -p1 < %{SOURCE3} -+patch -p1 < %{SOURCE4} -+patch -p1 < %{SOURCE5} -+patch -p1 < %{SOURCE6} -+patch -p1 < %{SOURCE7} -+patch -p1 < %{SOURCE8} -+patch -p1 < %{SOURCE9} -+patch -p1 < %{SOURCE10} -+patch -p1 < %{SOURCE11} -+patch -p1 < %{SOURCE12} -+patch -p1 < %{SOURCE13} -+patch -p1 < %{SOURCE14} -+patch -p1 < %{SOURCE15} -+popd - popd - - %build - %if 0%{?with_python2} --%py2_build -+# NOTE: py2_build macro is called py_build in our loadbuild servers -+# %py2_build -+%py_build - %endif - %if 0%{?with_python3} - %py3_build -@@ -159,7 +196,9 @@ sphinx-build doc/source/ html - - %install - %if 0%{?with_python2} --%py2_install -+# NOTE: py2_install macro is called py_install in our loadbuild servers -+# %py2_install -+%py_install - cp -pr kubernetes/test %{buildroot}%{python2_sitelib}/%{library}/ - cp -pr kubernetes/e2e_test %{buildroot}%{python2_sitelib}/%{library}/ - %endif --- -2.25.1 - diff --git a/python/python-kubernetes/centos/meta_patches/PATCH_ORDER b/python/python-kubernetes/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 926ba153e..000000000 --- a/python/python-kubernetes/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -0001-Include-watch.py-bug-fixes.patch diff --git a/python/python-kubernetes/centos/patches/0001-Verify-Boilerplate-fix.patch b/python/python-kubernetes/centos/patches/0001-Verify-Boilerplate-fix.patch deleted file mode 100644 index 6b83785b1..000000000 --- a/python/python-kubernetes/centos/patches/0001-Verify-Boilerplate-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d56fdbc0cc33a6c8e4782c93b50c56c889fb3fa3 Mon Sep 17 00:00:00 2001 -From: Neha Yadav -Date: Wed, 5 Dec 2018 22:22:59 +0530 -Subject: [PATCH 01/13] Verify Boilerplate fix - ---- - watch/watch.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/watch/watch.py b/watch/watch.py -index 21899dd..fb4c1ab 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -1,3 +1,5 @@ -+#!/usr/bin/env python -+ - # Copyright 2016 The Kubernetes Authors. - # - # Licensed under the Apache License, Version 2.0 (the "License"); --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0002-fix-watching-with-a-specified-resource-version.patch b/python/python-kubernetes/centos/patches/0002-fix-watching-with-a-specified-resource-version.patch deleted file mode 100644 index 215dfb6f3..000000000 --- a/python/python-kubernetes/centos/patches/0002-fix-watching-with-a-specified-resource-version.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 3c30a3099336a5976074c18ea61814646689b4a8 Mon Sep 17 00:00:00 2001 -From: Julian Taylor -Date: Sat, 19 Jan 2019 12:38:57 +0100 -Subject: [PATCH 02/13] fix watching with a specified resource version - -The watch code reset the version to the last found in the -response. -When you first list existing objects and then start watching from that -resource version the existing versions are older than the version you -wanted and the watch starts from the wrong version after the first -restart. -This leads to for example already deleted objects ending in the stream -again. - -Fix this by setting the minimum resource version to reset from to the -input resource version. As long as k8s returns all objects in order in -the watch this should work. -We cannot use the integer value of the resource version to order it as -one should be treat the value as opaque. - -Closes https://github.com/kubernetes-client/python/issues/700 ---- - watch/watch.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/watch/watch.py b/watch/watch.py -index 21899dd..a9c315c 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -122,6 +122,8 @@ class Watch(object): - return_type = self.get_return_type(func) - kwargs['watch'] = True - kwargs['_preload_content'] = False -+ if 'resource_version' in kwargs: -+ self.resource_version = kwargs['resource_version'] - - timeouts = ('timeout_seconds' in kwargs) - while True: --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0003-Making-watch-work-with-read_namespaced_pod_log.patch b/python/python-kubernetes/centos/patches/0003-Making-watch-work-with-read_namespaced_pod_log.patch deleted file mode 100644 index db0516091..000000000 --- a/python/python-kubernetes/centos/patches/0003-Making-watch-work-with-read_namespaced_pod_log.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 8e6f0435a38e24aac700d9ebac700bdf6138ba8c Mon Sep 17 00:00:00 2001 -From: Mitar -Date: Mon, 15 Oct 2018 23:57:46 -0700 -Subject: [PATCH 03/13] Making watch work with read_namespaced_pod_log. - -Fixes https://github.com/kubernetes-client/python/issues/199. ---- - watch/watch.py | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index bdf24f1..79b2358 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -20,6 +20,7 @@ import pydoc - from kubernetes import client - - PYDOC_RETURN_LABEL = ":return:" -+PYDOC_FOLLOW_PARAM = ":param bool follow:" - - # Removing this suffix from return type name should give us event's object - # type. e.g., if list_namespaces() returns "NamespaceList" type, -@@ -65,7 +66,7 @@ class Watch(object): - self._raw_return_type = return_type - self._stop = False - self._api_client = client.ApiClient() -- self.resource_version = 0 -+ self.resource_version = None - - def stop(self): - self._stop = True -@@ -78,8 +79,17 @@ class Watch(object): - return return_type[:-len(TYPE_LIST_SUFFIX)] - return return_type - -+ def get_watch_argument_name(self, func): -+ if PYDOC_FOLLOW_PARAM in pydoc.getdoc(func): -+ return 'follow' -+ else: -+ return 'watch' -+ - def unmarshal_event(self, data, return_type): -- js = json.loads(data) -+ try: -+ js = json.loads(data) -+ except ValueError: -+ return data - js['raw_object'] = js['object'] - if return_type: - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) -@@ -122,7 +132,7 @@ class Watch(object): - - self._stop = False - return_type = self.get_return_type(func) -- kwargs['watch'] = True -+ kwargs[self.get_watch_argument_name(func)] = True - kwargs['_preload_content'] = False - if 'resource_version' in kwargs: - self.resource_version = kwargs['resource_version'] -@@ -136,9 +146,12 @@ class Watch(object): - if self._stop: - break - finally: -- kwargs['resource_version'] = self.resource_version - resp.close() - resp.release_conn() -+ if self.resource_version is not None: -+ kwargs['resource_version'] = self.resource_version -+ else: -+ break - - if timeouts or self._stop: - break --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0004-Don-t-use-break-inside-finally.patch b/python/python-kubernetes/centos/patches/0004-Don-t-use-break-inside-finally.patch deleted file mode 100644 index 7086d63b1..000000000 --- a/python/python-kubernetes/centos/patches/0004-Don-t-use-break-inside-finally.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 972a76a83d0133b45db03495b0f9fd05ed2b94a3 Mon Sep 17 00:00:00 2001 -From: Mitar -Date: Wed, 20 Feb 2019 23:56:38 -0800 -Subject: [PATCH 04/13] Don't use break inside finally. - -It swallows exceptions. ---- - watch/watch.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/watch/watch.py b/watch/watch.py -index 79b2358..5966eac 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -151,7 +151,7 @@ class Watch(object): - if self.resource_version is not None: - kwargs['resource_version'] = self.resource_version - else: -- break -+ self._stop = True - - if timeouts or self._stop: - break --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0005-Remove-all-shebangs-from-Python-modules-and-checker.patch b/python/python-kubernetes/centos/patches/0005-Remove-all-shebangs-from-Python-modules-and-checker.patch deleted file mode 100644 index 288a1da82..000000000 --- a/python/python-kubernetes/centos/patches/0005-Remove-all-shebangs-from-Python-modules-and-checker.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c941d74b3745550fc886ebf20e40725aa4722f5c Mon Sep 17 00:00:00 2001 -From: Oz N Tiram -Date: Tue, 20 Aug 2019 22:25:57 +0200 -Subject: [PATCH 05/13] Remove all shebangs from Python modules and checker - -As discussed, Python modules which aren't intended to be invoked -as scripts should not include a shebang line. - -Update CONTRIBUTING.md and the checker script. -This script now includes a list SKIP_FILES for files that -should not be checked for boilerplate template. -The tests will now fail if a Python module has a shebang line. -Scripts which should have a shebang line and exists in the directory -`hack` can be ignored by adding them to the SKIP_FILES list. ---- - watch/watch.py | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index 5966eac..77b9794 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -1,5 +1,3 @@ --#!/usr/bin/env python -- - # Copyright 2016 The Kubernetes Authors. - # - # Licensed under the Apache License, Version 2.0 (the "License"); --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0006-Fixed-Watch.unmarshal_event-when-data-is-not-a-JSON-.patch b/python/python-kubernetes/centos/patches/0006-Fixed-Watch.unmarshal_event-when-data-is-not-a-JSON-.patch deleted file mode 100644 index 68fbd557a..000000000 --- a/python/python-kubernetes/centos/patches/0006-Fixed-Watch.unmarshal_event-when-data-is-not-a-JSON-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f11587d0e3cedf645ba12fe4dfd7971ee7162c9d Mon Sep 17 00:00:00 2001 -From: Alexey Volkov -Date: Thu, 17 Oct 2019 17:40:20 -0700 -Subject: [PATCH 06/13] Fixed Watch.unmarshal_event when data is not a - JSON-serialized object - -Fixes https://github.com/kubernetes-client/python/issues/982 -Fixes https://github.com/kubernetes-client/python/issues/983 ---- - watch/watch.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/watch/watch.py b/watch/watch.py -index 77b9794..ba87de9 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -88,6 +88,8 @@ class Watch(object): - js = json.loads(data) - except ValueError: - return data -+ if not (isinstance(js, dict) and 'object' in js): -+ return data - js['raw_object'] = js['object'] - if return_type: - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0007-watch-stream-stop-unmarshalling-when-streaming-log.patch b/python/python-kubernetes/centos/patches/0007-watch-stream-stop-unmarshalling-when-streaming-log.patch deleted file mode 100644 index 2cb3e903a..000000000 --- a/python/python-kubernetes/centos/patches/0007-watch-stream-stop-unmarshalling-when-streaming-log.patch +++ /dev/null @@ -1,54 +0,0 @@ -From ea11e44daf06e38a9b49c5f8cc41f19447d79bfe Mon Sep 17 00:00:00 2001 -From: Haowei Cai -Date: Fri, 21 Feb 2020 15:19:35 -0800 -Subject: [PATCH 07/13] watch stream: stop unmarshalling when streaming log - ---- - watch/watch.py | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index ba87de9..fe7a924 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -84,12 +84,7 @@ class Watch(object): - return 'watch' - - def unmarshal_event(self, data, return_type): -- try: -- js = json.loads(data) -- except ValueError: -- return data -- if not (isinstance(js, dict) and 'object' in js): -- return data -+ js = json.loads(data) - js['raw_object'] = js['object'] - if return_type: - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) -@@ -132,7 +127,8 @@ class Watch(object): - - self._stop = False - return_type = self.get_return_type(func) -- kwargs[self.get_watch_argument_name(func)] = True -+ watch_arg = self.get_watch_argument_name(func) -+ kwargs[watch_arg] = True - kwargs['_preload_content'] = False - if 'resource_version' in kwargs: - self.resource_version = kwargs['resource_version'] -@@ -142,7 +138,12 @@ class Watch(object): - resp = func(*args, **kwargs) - try: - for line in iter_resp_lines(resp): -- yield self.unmarshal_event(line, return_type) -+ # unmarshal when we are receiving events from watch, -+ # return raw string when we are streaming log -+ if watch_arg == "watch": -+ yield self.unmarshal_event(line, return_type) -+ else: -+ yield line - if self._stop: - break - finally: --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0008-Retry-watch-if-request-expires.patch b/python/python-kubernetes/centos/patches/0008-Retry-watch-if-request-expires.patch deleted file mode 100644 index 97af1c691..000000000 --- a/python/python-kubernetes/centos/patches/0008-Retry-watch-if-request-expires.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 06e48c585c003742ff42fb1995ec18e85226055e Mon Sep 17 00:00:00 2001 -From: Mitar -Date: Mon, 11 Feb 2019 00:23:39 -0800 -Subject: [PATCH 08/13] Retry watch if request expires. - ---- - watch/watch.py | 30 ++++++++++++++++++++++++++++-- - 1 file changed, 28 insertions(+), 2 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index fe7a924..f67dbe4 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -12,6 +12,7 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - -+import http - import json - import pydoc - -@@ -86,7 +87,7 @@ class Watch(object): - def unmarshal_event(self, data, return_type): - js = json.loads(data) - js['raw_object'] = js['object'] -- if return_type: -+ if return_type and js['type'] != 'ERROR': - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) - js['object'] = self._api_client.deserialize(obj, return_type) - if hasattr(js['object'], 'metadata'): -@@ -102,6 +103,14 @@ class Watch(object): - def stream(self, func, *args, **kwargs): - """Watch an API resource and stream the result back via a generator. - -+ Note that watching an API resource can expire. The method tries to -+ resume automatically once from the last result, but if that last result -+ is too old as well, an `ApiException` exception will be thrown with -+ ``code`` 410. In that case you have to recover yourself, probably -+ by listing the API resource to obtain the latest state and then -+ watching from that state on by setting ``resource_version`` to -+ one returned from listing. -+ - :param func: The API function pointer. Any parameter to the function - can be passed after this parameter. - -@@ -134,6 +143,7 @@ class Watch(object): - self.resource_version = kwargs['resource_version'] - - timeouts = ('timeout_seconds' in kwargs) -+ retry_after_410 = False - while True: - resp = func(*args, **kwargs) - try: -@@ -141,7 +151,23 @@ class Watch(object): - # unmarshal when we are receiving events from watch, - # return raw string when we are streaming log - if watch_arg == "watch": -- yield self.unmarshal_event(line, return_type) -+ event = self.unmarshal_event(line, return_type) -+ if isinstance(event, dict) \ -+ and event['type'] == 'ERROR': -+ obj = event['raw_object'] -+ # Current request expired, let's retry, -+ # but only if we have not already retried. -+ if not retry_after_410 and \ -+ obj['code'] == http.HTTPStatus.GONE: -+ retry_after_410 = True -+ break -+ else: -+ reason = "%s: %s" % (obj['reason'], obj['message']) -+ raise client.rest.ApiException(status=obj['code'], -+ reason=reason) -+ else: -+ retry_after_410 = False -+ yield event - else: - yield line - if self._stop: --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0009-Fix-a-Python-2-compatibility-issue.patch b/python/python-kubernetes/centos/patches/0009-Fix-a-Python-2-compatibility-issue.patch deleted file mode 100644 index cc7c3c442..000000000 --- a/python/python-kubernetes/centos/patches/0009-Fix-a-Python-2-compatibility-issue.patch +++ /dev/null @@ -1,60 +0,0 @@ -From a54f404366c0800497f8b62122d7be77c143297f Mon Sep 17 00:00:00 2001 -From: Nabarun Pal -Date: Thu, 16 Jul 2020 14:02:12 +0530 -Subject: [PATCH 09/13] Fix a Python 2 compatibility issue - -PR #133 introduces the usage of `http` module for checking the status -code for `GONE` HTTP status. However, this doesn't work in Python 2.7. - -This commit checks if the interpreter is Python 2 and imports the -status code from `httplib` module instead and unifies the approach -to the checks. - -Signed-off-by: Nabarun Pal ---- - watch/watch.py | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index f67dbe4..6410dfa 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -12,9 +12,9 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --import http - import json - import pydoc -+import sys - - from kubernetes import client - -@@ -29,6 +29,15 @@ PYDOC_FOLLOW_PARAM = ":param bool follow:" - TYPE_LIST_SUFFIX = "List" - - -+PY2 = sys.version_info[0] == 2 -+if PY2: -+ import httplib -+ HTTP_STATUS_GONE = httplib.GONE -+else: -+ import http -+ HTTP_STATUS_GONE = http.HTTPStatus.GONE -+ -+ - class SimpleNamespace: - - def __init__(self, **kwargs): -@@ -158,7 +167,7 @@ class Watch(object): - # Current request expired, let's retry, - # but only if we have not already retried. - if not retry_after_410 and \ -- obj['code'] == http.HTTPStatus.GONE: -+ obj['code'] == HTTP_STATUS_GONE: - retry_after_410 = True - break - else: --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0010-Fixes-codestyle-failures.patch b/python/python-kubernetes/centos/patches/0010-Fixes-codestyle-failures.patch deleted file mode 100644 index d33f729b1..000000000 --- a/python/python-kubernetes/centos/patches/0010-Fixes-codestyle-failures.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b68ca3055178e31a5d87a0a98780e4987a4d23ae Mon Sep 17 00:00:00 2001 -From: Nabarun Pal -Date: Thu, 16 Jul 2020 14:08:44 +0530 -Subject: [PATCH 10/13] Fixes codestyle failures - -Signed-off-by: Nabarun Pal ---- - watch/watch.py | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index 6410dfa..3058ed9 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -171,9 +171,10 @@ class Watch(object): - retry_after_410 = True - break - else: -- reason = "%s: %s" % (obj['reason'], obj['message']) -- raise client.rest.ApiException(status=obj['code'], -- reason=reason) -+ reason = "%s: %s" % ( -+ obj['reason'], obj['message']) -+ raise client.rest.ApiException( -+ status=obj['code'], reason=reason) - else: - retry_after_410 = False - yield event --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0011-Fix-Watch-retries-with-410-errors.patch b/python/python-kubernetes/centos/patches/0011-Fix-Watch-retries-with-410-errors.patch deleted file mode 100644 index 2ec9985d2..000000000 --- a/python/python-kubernetes/centos/patches/0011-Fix-Watch-retries-with-410-errors.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ebea7e343046d7afbbdc0e199294d5c79ae87362 Mon Sep 17 00:00:00 2001 -From: Chris Ayoub -Date: Thu, 25 Feb 2021 00:27:33 -0500 -Subject: [PATCH 11/13] Fix Watch retries with 410 errors - ---- - watch/watch.py | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/watch/watch.py b/watch/watch.py -index 3058ed9..b432778 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -151,7 +151,9 @@ class Watch(object): - if 'resource_version' in kwargs: - self.resource_version = kwargs['resource_version'] - -- timeouts = ('timeout_seconds' in kwargs) -+ # Do not attempt retries if user specifies a timeout. -+ # We want to ensure we are returning within that timeout. -+ disable_retries = ('timeout_seconds' in kwargs) - retry_after_410 = False - while True: - resp = func(*args, **kwargs) -@@ -164,9 +166,9 @@ class Watch(object): - if isinstance(event, dict) \ - and event['type'] == 'ERROR': - obj = event['raw_object'] -- # Current request expired, let's retry, -+ # Current request expired, let's retry, (if enabled) - # but only if we have not already retried. -- if not retry_after_410 and \ -+ if not disable_retries and not retry_after_410 and \ - obj['code'] == HTTP_STATUS_GONE: - retry_after_410 = True - break -@@ -190,5 +192,5 @@ class Watch(object): - else: - self._stop = True - -- if timeouts or self._stop: -+ if self._stop or disable_retries: - break --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0012-Fixes-kubernetes-client-python-issue-1047-ResponseNo.patch b/python/python-kubernetes/centos/patches/0012-Fixes-kubernetes-client-python-issue-1047-ResponseNo.patch deleted file mode 100644 index b95198946..000000000 --- a/python/python-kubernetes/centos/patches/0012-Fixes-kubernetes-client-python-issue-1047-ResponseNo.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 90399663f378b33227f723d3f0c1677965b6d96b Mon Sep 17 00:00:00 2001 -From: Darren Hague -Date: Thu, 8 Apr 2021 13:49:46 +0100 -Subject: [PATCH 12/13] Fixes kubernetes-client/python issue 1047 - "ResponseNotChunked from watch" - -In recent versions of K8S (>1.16?), when a `Watch.stream()` call uses a -resource_version which is too old the resulting 410 error is wrapped in JSON -and returned in a non-chunked 200 response. Using `resp.stream()` instead of -`resp.read_chunked()` automatically handles the response being either chunked or -non-chunked. ---- - watch/watch.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/watch/watch.py b/watch/watch.py -index b432778..3bbb770 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -53,7 +53,7 @@ def _find_return_type(func): - - def iter_resp_lines(resp): - prev = "" -- for seg in resp.read_chunked(decode_content=False): -+ for seg in resp.stream(amt=None, decode_content=False): - if isinstance(seg, bytes): - seg = seg.decode('utf8') - seg = prev + seg --- -2.25.1 - diff --git a/python/python-kubernetes/centos/patches/0013-quick-fix-of-decoding-error-for-BOOKMARK-event.patch b/python/python-kubernetes/centos/patches/0013-quick-fix-of-decoding-error-for-BOOKMARK-event.patch deleted file mode 100644 index 17938425b..000000000 --- a/python/python-kubernetes/centos/patches/0013-quick-fix-of-decoding-error-for-BOOKMARK-event.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 10ae4760b53a917116ae7525a7bbc94f35632cfb Mon Sep 17 00:00:00 2001 -From: Yu Liao -Date: Mon, 12 Apr 2021 17:17:42 -0700 -Subject: [PATCH 13/13] quick fix of decoding error for BOOKMARK event - ---- - watch/watch.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/watch/watch.py b/watch/watch.py -index 3bbb770..71fd459 100644 ---- a/watch/watch.py -+++ b/watch/watch.py -@@ -96,7 +96,11 @@ class Watch(object): - def unmarshal_event(self, data, return_type): - js = json.loads(data) - js['raw_object'] = js['object'] -- if return_type and js['type'] != 'ERROR': -+ # BOOKMARK event is treated the same as ERROR for a quick fix of -+ # decoding exception -+ # TODO: make use of the resource_version in BOOKMARK event for more -+ # efficient WATCH -+ if return_type and js['type'] != 'ERROR' and js['type'] != 'BOOKMARK': - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) - js['object'] = self._api_client.deserialize(obj, return_type) - if hasattr(js['object'], 'metadata'): --- -2.25.1 - diff --git a/python/python-kubernetes/centos/srpm_path b/python/python-kubernetes/centos/srpm_path deleted file mode 100644 index 1e85d6453..000000000 --- a/python/python-kubernetes/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-kubernetes-8.0.0-8.el7.src.rpm diff --git a/python/python-mechanize/centos/build_srpm.data b/python/python-mechanize/centos/build_srpm.data deleted file mode 100644 index 3ed9b1130..000000000 --- a/python/python-mechanize/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="$STX_BASE/downloads/mechanize-0.4.5.tar.gz" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-mechanize/centos/python-mechanize.spec b/python/python-mechanize/centos/python-mechanize.spec deleted file mode 100644 index e139cc31e..000000000 --- a/python/python-mechanize/centos/python-mechanize.spec +++ /dev/null @@ -1,125 +0,0 @@ -# Dependencies for check and wheel introduce circular dependencies -# Set this to 0 after we've bootstrapped. - -%global with_check 0 -%global build_wheel 0 - -# define some macros for RHEL 6 -%global __python2 %__python -%global python2_sitelib %python_sitelib - -Name: mechanize -Version: 0.4.5 -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} -Summary: Automate interaction with HTTP web servers - -Group: Applications/System -License: (Python or ZPLv2.0) and ASL 2.0 -URL: https://github.com/python-mechanize/mechanize -Source0: mechanize-0.4.5.tar.gz - -BuildArch: noarch -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-pip -BuildRequires: python3-wheel -Requires: python3-html5lib -%else -BuildRequires: python2-devel -BuildRequires: python-pip -BuildRequires: python-wheel -Requires: python-html5lib -%endif - - -%description -Stateful programmatic web browsing in Python. - -%package -n python2-mechanize -Summary: Automate interaction with HTTP web servers -%{?python_provide:%python_provide python2-mechanize} -%description -n python2-mechanize -Stateful programmatic web browsing in Python. - -%if 0%{?with_python3} -%package -n python3-mechanize -Summary: Automate interaction with HTTP web servers -Group: Applications/System -%{?python_provide:%python_provide python3-mechanize} - -%description -n python3-mechanize -Stateful programmatic web browsing in Python. - -%endif # with_python3 - -%prep -%setup - -%build -export PBR_VERSION=%{version} -%{__python} setup.py build - -%if 0%{?with_python3} -%{__python3} setup.py build -%endif # with_python3 - -%install -# Must do the python3 install first because the scripts in /usr/bin are -# overwritten with every setup.py install (and we want the python2 version -# to be the default for now). -%if 0%{?with_python3} -%if 0%{?build_wheel} -pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} -%else -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif - -rm -rf %{buildroot}%{python3_sitelib}/mechanize/test -rm -rf %{buildroot}%{python3_sitelib}/mechanize/test-tools -rm -rf %{buildroot}%{python3_sitelib}/mechanize/run_tests.py -%if 0%{?build_wheel} -sed -i '/^mechanize\/tests\//d' %{buildroot}%{python3_record} -%endif - -find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f -%endif # with_python3 - -%if 0%{?build_wheel} -pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} -%else -%{__python2} setup.py install --skip-build --root %{buildroot} -%endif - -rm -rf %{buildroot}%{python2_sitelib}/mechanize/test -rm -rf %{buildroot}%{python2_sitelib}/mechanize/test-tools -rm -rf %{buildroot}%{python2_sitelib}/mechanize/run_tests.py -%if 0%{?build_wheel} -sed -i '/^mechanize\/tests\//d' %{buildroot}%{python2_record} -%endif - -find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f - -# Don't ship these -rm -r docs/{Makefile,conf.py} - -%if 0%{?with_check} -%check -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test - -%if 0%{?with_python3} -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} -%endif # with_python3 -%endif # with_check - -%files -n python2-mechanize -%doc docs/* -%{python2_sitelib}/* - -%if 0%{?with_python3} -%files -n python3-mechanize -%doc docs/* -%{python3_sitelib}/mechanize*/ -%endif # with_python3 - -%changelog - diff --git a/python/python-setuptools/centos/build_srpm.data b/python/python-setuptools/centos/build_srpm.data deleted file mode 100644 index e666a6c41..000000000 --- a/python/python-setuptools/centos/build_srpm.data +++ /dev/null @@ -1,5 +0,0 @@ -#python-setuptools-v38.5.1.tar.gz - -COPY_LIST="$CGCS_BASE/downloads/python-setuptools-v38.5.1.tar.gz $PKG_BASE/files/*" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-setuptools/centos/python-setuptools.spec b/python/python-setuptools/centos/python-setuptools.spec deleted file mode 100644 index 630f078a2..000000000 --- a/python/python-setuptools/centos/python-setuptools.spec +++ /dev/null @@ -1,629 +0,0 @@ -# Dependencies for check and wheel introduce circular dependencies -# Set this to 0 after we've bootstrapped. - -%global with_check 0 -%global build_wheel 0 - -# define some macros for RHEL 6 -%global __python2 %__python -%global python2_sitelib %python_sitelib - -%global srcname setuptools -%if 0%{?build_wheel} -%global python2_wheelname %{srcname}-%{version}-py2.py3-none-any.whl -%global python2_record %{python2_sitelib}/%{srcname}-%{version}.dist-info/RECORD -%if 0%{?with_python3} -%global python3_wheelname %python2_wheelname -%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD -%endif -%endif - -Name: python-setuptools -Version: 38.5.1 -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} -Summary: Easily build and distribute Python packages - -Group: Applications/System -# LIcensing is in flux, see https://bitbucket.org/pypa/setuptools/issues/132/missing-license -License: (Python or ZPLv2.0) and ASL 2.0 -URL: https://pypi.python.org/pypi/%{srcname} -#Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz -Source0: python-setuptools-v38.5.1.tar.gz -# PSFL -#Source1: https://hg.python.org/cpython/raw-file/tip/LICENSE -Source1: LICENSE -# ZPL -#Source2: https://raw.githubusercontent.com/zopefoundation/Zope/master/LICENSE.txt -Source2: LICENSE.txt -# ASL 2.0 -#Source3: http://www.apache.org/licenses/LICENSE-2.0 -Source3: LICENSE-2.0 - -BuildArch: noarch -BuildRequires: python2-devel -%if 0%{?build_wheel} -BuildRequires: python-pip -BuildRequires: python-wheel -%endif -%if 0%{?with_check} -BuildRequires: pytest -BuildRequires: python-mock -%endif # with_check - -%if 0%{?with_python3} -BuildRequires: python3-devel -%if 0%{?with_check} -BuildRequires: python3-pytest -BuildRequires: python3-mock -%endif # with_check -%if 0%{?build_wheel} -BuildRequires: python3-pip -BuildRequires: python3-wheel -%endif # build_wheel -%endif # with_python3 - -# We're now back to setuptools as the package. -# Keep the python-distribute name active for a few releases. Eventually we'll -# want to get rid of the Provides and just keep the Obsoletes -Provides: python-distribute = %{version}-%{release} -Obsoletes: python-distribute < 0.6.36-2 - - -%description -Setuptools is a collection of enhancements to the Python distutils that allow -you to more easily build and distribute Python packages, especially ones that -have dependencies on other packages. - -This package also contains the runtime components of setuptools, necessary to -execute the software that requires pkg_resources.py. - -%package -n python2-setuptools -Summary: Easily build and distribute Python packages -%{?python_provide:%python_provide python2-setuptools} -%description -n python2-setuptools -Setuptools is a collection of enhancements to the Python distutils that allow -you to more easily build and distribute Python packages, especially ones that -have dependencies on other packages. - -This package also contains the runtime components of setuptools, necessary to -execute the software that requires pkg_resources.py. - -%if 0%{?with_python3} -%package -n python3-setuptools -Summary: Easily build and distribute Python 3 packages -Group: Applications/System -%{?python_provide:%python_provide python3-setuptools} - -# Note: Do not need to Require python3-backports-ssl_match_hostname because it -# has been present since python3-3.2. We do not ship python3-3.0 or -# python3-3.1 anywhere - -%description -n python3-setuptools -Setuptools is a collection of enhancements to the Python 3 distutils that allow -you to more easily build and distribute Python 3 packages, especially ones that -have dependencies on other packages. - -This package also contains the runtime components of setuptools, necessary to -execute the software that requires pkg_resources.py. - -%endif # with_python3 - -%prep -%setup -q -n %{srcname}-%{version} - -# We can't remove .egg-info (but it doesn't matter, since it'll be rebuilt): -# The problem is that to properly execute setuptools' setup.py, -# it is needed for setuptools to be loaded as a Distribution -# (with egg-info or .dist-info dir), it's not sufficient -# to just have them on PYTHONPATH -# Running "setup.py install" without having setuptools installed -# as a distribution gives warnings such as -# ... distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' -# and doesn't create "easy_install" and .egg-info directory -# Note: this is only a problem if bootstrapping wheel or building on RHEL, -# otherwise setuptools are installed as dependency into buildroot - -# Strip shbang -find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}' -# Remove bundled exes -rm -f setuptools/*.exe -# These tests require internet connection -rm setuptools/tests/test_integration.py - -%build -%if 0%{?build_wheel} -%{__python} setup.py bdist_wheel -%else -export PBR_VERSION=%{version} -%{__python} bootstrap.py -%{__python} setup.py build -%endif - -%if 0%{?with_python3} -%if 0%{?build_wheel} -%{__python3} setup.py bdist_wheel -%else -%{__python3} setup.py build -%endif -%endif # with_python3 - -%install -# Must do the python3 install first because the scripts in /usr/bin are -# overwritten with every setup.py install (and we want the python2 version -# to be the default for now). -%if 0%{?with_python3} -%if 0%{?build_wheel} -pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} - -# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to -# (pip install wheel doesn't overwrite) -rm %{buildroot}%{_bindir}/easy_install - -sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record} -%else -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif - -rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests -%if 0%{?build_wheel} -sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record} -%endif - -find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f -%endif # with_python3 - -%if 0%{?build_wheel} -pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot} -%else -%{__python2} setup.py install --skip-build --root %{buildroot} -%endif - -rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests -%if 0%{?build_wheel} -sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record} -%endif - -install -p -m 0644 %{SOURCE1} psfl.txt -install -p -m 0644 %{SOURCE2} zpl.txt -install -p -m 0644 %{SOURCE3} asl.txt -find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f - -# Don't ship these -rm -r docs/{Makefile,conf.py,_*} - -%if 0%{?with_check} -%check -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test - -%if 0%{?with_python3} -LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} -%endif # with_python3 -%endif # with_check - -%files -n python2-setuptools -%license psfl.txt zpl.txt asl.txt -%doc docs/* -%{python2_sitelib}/* -%{_bindir}/easy_install -%{_bindir}/easy_install-2.* - -%if 0%{?with_python3} -%files -n python3-setuptools -%license psfl.txt zpl.txt asl.txt -%doc docs/* -%{python3_sitelib}/easy_install.py -%{python3_sitelib}/pkg_resources/ -%{python3_sitelib}/setuptools*/ -%{python3_sitelib}/__pycache__/* -%{_bindir}/easy_install-3.* -%endif # with_python3 - -%changelog -* Tue Jun 07 2016 Kevin Fenzi - 22.0.5-1 -- Update to 22.0.5. Fixes bug #1342706 - -* Thu Jun 02 2016 Kevin Fenzi - 20.0.0-1 -- Upgrade to 22.0.0 - -* Tue May 31 2016 Nils Philippsen -- fix source URL - -* Sun May 29 2016 Kevin Fenzi - 21.2.2-1 -- Update to 21.2.2. Fixes bug #1332357 - -* Thu Apr 28 2016 Kevin Fenzi - 20.10.1-1 -- Update to 20.10.1. Fixes bug #1330375 - -* Sat Apr 16 2016 Kevin Fenzi - 20.9.0-1 -- Update to 20.9.0. Fixes bug #1327827 - -* Fri Apr 15 2016 Kevin Fenzi - 20.8.1-1 -- Update to 20.8.1. Fixes bug #1325910 - -* Thu Mar 31 2016 Kevin Fenzi - 20.6.7-1 -- Update to 20.6.7. Fixes bug #1322836 - -* Wed Mar 30 2016 Kevin Fenzi - 20.4-1 -- Update to 20.4. Fixes bug #1319366 - -* Wed Mar 16 2016 Kevin Fenzi - 20.3-1 -- Update to 20.3. Fixes bug #1311967 - -* Sat Feb 27 2016 Kevin Fenzi - 20.2.2-1 -- Update to 20.2.2. Fixes bug #1311967 - -* Sat Feb 13 2016 Kevin Fenzi - 20.1.1-1 -- Update to 20.1.1. Fixes bug #130719 - -* Fri Feb 12 2016 Kevin Fenzi - 20.1-1 -- Update to 20.1. Fixes bug #1307000 - -* Mon Feb 08 2016 Kevin Fenzi - 20.0-1 -- Update to 20.0. Fixes bug #1305394 - -* Sat Feb 06 2016 Kevin Fenzi - 19.7-1 -- Update to 19.7. Fixes bug #1304563 - -* Wed Feb 3 2016 Orion Poplawski - 19.6.2-2 -- Fix python3 package file ownership - -* Sun Jan 31 2016 Kevin Fenzi - 19.6.2-1 -- Update to 19.6.2. Fixes bug #1303397 - -* Mon Jan 25 2016 Kevin Fenzi - 19.6-1 -- Update to 19.6. - -* Mon Jan 25 2016 Kevin Fenzi - 19.5-1 -- Update to 19.5. Fixes bug #1301313 - -* Mon Jan 18 2016 Kevin Fenzi - 19.4-1 -- Update to 19.4. Fixes bug #1299288 - -* Tue Jan 12 2016 Orion Poplawski - 19.2-2 -- Cleanup spec from python3-setuptools review - -* Fri Jan 08 2016 Kevin Fenzi - 19.2-1 -- Update to 19.2. Fixes bug #1296755 - -* Fri Dec 18 2015 Kevin Fenzi - 19.1.1-1 -- Update to 19.1.1. Fixes bug #1292658 - -* Tue Dec 15 2015 Kevin Fenzi - 18.8.1-1 -- Update to 18.8.1. Fixes bug #1291678 - -* Sat Dec 12 2015 Kevin Fenzi - 18.8-1 -- Update to 18.8. Fixes bug #1290942 - -* Fri Dec 04 2015 Kevin Fenzi - 18.7.1-1 -- Update to 18.7.1. Fixes bug #1287372 - -* Wed Nov 25 2015 Kevin Fenzi - 18.6.1-1 -- Update to 18.6.1. Fixes bug #1270578 - -* Sun Nov 15 2015 Thomas Spura - 18.5-3 -- Try to disable zip_safe bug #1271776 -- Add python2 subpackage - -* Fri Nov 06 2015 Robert Kuska - 18.5-2 -- Add patch so it is possible to set test_args variable - -* Tue Nov 03 2015 Robert Kuska - 18.5-1 -- Update to 18.5. Fixes bug #1270578 - -* Tue Oct 13 2015 Robert Kuska - 18.4-1 -- Update to 18.4. Fixes bug #1270578 -- Build with wheel and check phase - -* Wed Sep 23 2015 Robert Kuska - 18.3.2-2 -- Python3.5 rebuild: rebuild without wheel and check phase - -* Tue Sep 22 2015 Kevin Fenzi 18.3.2-1 -- Update to 18.3.2. Fixes bug #1264902 - -* Mon Sep 07 2015 Kevin Fenzi 18.3.1-1 -- Update to 18.3.1. Fixes bug #1256188 - -* Wed Aug 05 2015 Kevin Fenzi 18.1-1 -- Update to 18.1. Fixes bug #1249436 - -* Mon Jun 29 2015 Pierre-Yves Chibon - 18.0.1-2 -- Explicitely provide python2-setuptools - -* Thu Jun 25 2015 Kevin Fenzi 18.0.1-1 -- Update to 18.0.1 - -* Sat Jun 20 2015 Kevin Fenzi 17.1.1-3 -- Drop no longer needed Requires/BuildRequires on python-backports-ssl_match_hostname -- Fixes bug #1231325 - -* Thu Jun 18 2015 Fedora Release Engineering - 17.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Jun 10 2015 Kevin Fenzi 17.1.1-1 -- Update to 17.1.1. Fixes bug 1229507 - -* Sun Jun 07 2015 Kevin Fenzi 17.1-1 -- Update to 17.1. Fixes bug 1229066 - -* Sat May 30 2015 Kevin Fenzi 17.0-1 -- Update to 17 - -* Mon May 18 2015 Kevin Fenzi 16.0-1 -- Update to 16 - -* Mon Apr 27 2015 Ralph Bean - 15.2-1 -- new version - -* Sat Apr 04 2015 Ralph Bean - 15.0-1 -- new version - -* Sun Mar 22 2015 Ralph Bean - 14.3.1-1 -- new version - -* Sat Mar 21 2015 Ralph Bean - 14.3.1-1 -- new version - -* Mon Mar 16 2015 Ralph Bean - 14.3-1 -- new version - -* Sun Mar 15 2015 Ralph Bean - 14.2-1 -- new version - -* Sun Mar 15 2015 Ralph Bean - 14.1.1-1 -- new version - -* Fri Mar 06 2015 Ralph Bean - 13.0.2-1 -- new version - -* Thu Mar 05 2015 Ralph Bean - 12.4-1 -- new version - -* Fri Feb 27 2015 Ralph Bean - 12.3-1 -- new version - -* Tue Jan 20 2015 Kevin Fenzi 12.0.3-1 -- Update to 12.0.3 - -* Fri Jan 09 2015 Slavek Kabrda - 11.3.1-2 -- Huge spec cleanup -- Make spec buildable on all Fedoras and RHEL 6 and 7 -- Make tests actually run - -* Wed Jan 07 2015 Kevin Fenzi 11.3.1-1 -- Update to 11.3.1. Fixes bugs: #1179393 and #1178817 - -* Sun Jan 04 2015 Kevin Fenzi 11.0-1 -- Update to 11.0. Fixes bug #1178421 - -* Fri Dec 26 2014 Kevin Fenzi 8.2.1-1 -- Update to 8.2.1. Fixes bug #1175229 - -* Thu Oct 23 2014 Ralph Bean - 7.0-1 -- Latest upstream. Fixes bug #1154590. - -* Mon Oct 13 2014 Ralph Bean - 6.1-1 -- Latest upstream. Fixes bug #1152130. - -* Sat Oct 11 2014 Ralph Bean - 6.0.2-2 -- Modernized python2 macros. -- Inlined locale environment variables in the %%check section. -- Remove bundled egg-info and .exes. - -* Fri Oct 03 2014 Kevin Fenzi 6.0.2-1 -- Update to 6.0.2 - -* Sat Sep 27 2014 Kevin Fenzi 6.0.1-1 -- Update to 6.0.1. Fixes bug #1044444 - -* Mon Jun 30 2014 Toshio Kuratomi - 2.0-8 -- Remove the python-setuptools-devel Virtual Provides as per this Fedora 21 - Change: http://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel - -* Mon Jun 30 2014 Toshio Kuratomi - 2.0-7 -- And another bug in sdist - -* Mon Jun 30 2014 Toshio Kuratomi - 2.0-6 -- Fix a bug in the sdist command - -* Sat Jun 07 2014 Fedora Release Engineering - 2.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri Apr 25 2014 Matej Stuchlik - 2.0-4 -- Rebuild as wheel for Python 3.4 - -* Thu Apr 24 2014 Tomas Radej - 2.0-3 -- Rebuilt for tag f21-python - -* Wed Apr 23 2014 Matej Stuchlik - 2.0-2 -- Add a switch to build setuptools as wheel - -* Mon Dec 9 2013 Toshio Kuratomi - 2.0-1 -- Update to new upstream release with a few things removed from the API: - Changelog: https://pypi.python.org/pypi/setuptools#id139 - -* Mon Nov 18 2013 Toshio Kuratomi - 1.4-1 -- Update to 1.4 that gives easy_install pypi credential handling - -* Thu Nov 7 2013 Toshio Kuratomi - 1.3.1-1 -- Minor upstream update to reign in overzealous warnings - -* Mon Nov 4 2013 Toshio Kuratomi - 1.3-1 -- Upstream update that pulls in our security patches - -* Mon Oct 28 2013 Toshio Kuratomi - 1.1.7-1 -- Update to newer upstream release that has our patch to the unittests -- Fix for http://bugs.python.org/issue17997#msg194950 which affects us since - setuptools copies that code. Changed to use - python-backports-ssl_match_hostname so that future issues can be fixed in - that package. - -* Sat Oct 26 2013 Toshio Kuratomi - 1.1.6-1 -- Update to newer upstream release. Some minor incompatibilities listed but - they should affect few, if any consumers. - -* Sun Aug 04 2013 Fedora Release Engineering - 0.9.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 23 2013 Toshio Kuratomi - 0.9.6-1 -- Upstream update -- just fixes python-2.4 compat - -* Tue Jul 16 2013 Toshio Kuratomi - 0.9.5-1 -- Update to 0.9.5 - - package_index can handle hashes other than md5 - - Fix security vulnerability in SSL certificate validation - - https://bugzilla.redhat.com/show_bug.cgi?id=963260 - -* Fri Jul 5 2013 Toshio Kuratomi - 0.8-1 -- Update to upstream 0.8 release. Codebase now runs on anything from - python-2.4 to python-3.3 without having to be translated by 2to3. - -* Wed Jul 3 2013 Toshio Kuratomi - 0.7.7-1 -- Update to 0.7.7 upstream release - -* Mon Jun 10 2013 Toshio Kuratomi - 0.7.2-2 -- Update to the setuptools-0.7 branch that merges distribute and setuptools - -* Thu Apr 11 2013 Toshio Kuratomi - 0.6.36-1 -- Update to upstream 0.6.36. Many bugfixes - -* Thu Feb 14 2013 Fedora Release Engineering - 0.6.28-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Fri Aug 03 2012 David Malcolm - 0.6.28-3 -- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 - -* Fri Aug 3 2012 David Malcolm - 0.6.28-2 -- remove rhel logic from with_python3 conditional - -* Mon Jul 23 2012 Toshio Kuratomi - 0.6.28-1 -- New upstream release: - - python-3.3 fixes - - honor umask when setuptools is used to install other modules - -* Sat Jul 21 2012 Fedora Release Engineering - 0.6.27-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jun 11 2012 Toshio Kuratomi - 0.6.27-2 -- Fix easy_install.py having a python3 shebang in the python2 package - -* Thu Jun 7 2012 Toshio Kuratomi - 0.6.27-1 -- Upstream bugfix - -* Tue May 15 2012 Toshio Kuratomi - 0.6.24-2 -- Upstream bugfix - -* Sat Jan 14 2012 Fedora Release Engineering - 0.6.24-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Oct 17 2011 Toshio Kuratomi - 0.6.24-1 -- Upstream bugfix -- Compile the win32 launcher binary using mingw - -* Sun Aug 21 2011 Toshio Kuratomi - 0.6.21-1 -- Upstream bugfix release - -* Thu Jul 14 2011 Toshio Kuratomi - 0.6.19-1 -- Upstream bugfix release - -* Tue Feb 22 2011 Toshio Kuratomi - 0.6.14-7 -- Switch to patch that I got in to upstream - -* Tue Feb 22 2011 Toshio Kuratomi - 0.6.14-6 -- Fix build on python-3.2 - -* Wed Feb 09 2011 Fedora Release Engineering - 0.6.14-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sun Aug 22 2010 Thomas Spura - 0.6.14-4 -- rebuild with python3.2 - http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html - -* Tue Aug 10 2010 Toshio Kuratomi - 0.6.14-3 -- Update description to mention this is distribute - -* Thu Jul 22 2010 Thomas Spura - 0.6.14-2 -- bump for building against python 2.7 - -* Thu Jul 22 2010 Thomas Spura - 0.6.14-1 -- update to new version -- all patches are upsteam - -* Wed Jul 21 2010 David Malcolm - 0.6.13-7 -- generalize path of easy_install-2.6 and -3.1 to -2.* and -3.* - -* Wed Jul 21 2010 David Malcolm - 0.6.13-6 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Sat Jul 3 2010 Toshio Kuratomi - 0.6.13-5 -- Upstream patch for compatibility problem with setuptools -- Minor spec cleanups -- Provide python-distribute for those who see an import distribute and need - to get the proper package. - -* Thu Jun 10 2010 Toshio Kuratomi - 0.6.13-4 -- Fix race condition in unittests under the python-2.6.x on F-14. - -* Thu Jun 10 2010 Toshio Kuratomi - 0.6.13-3 -- Fix few more buildroot macros - -* Thu Jun 10 2010 Toshio Kuratomi - 0.6.13-2 -- Include data that's needed for running tests - -* Thu Jun 10 2010 Toshio Kuratomi - 0.6.13-1 -- Update to upstream 0.6.13 -- Minor specfile formatting fixes - -* Thu Feb 04 2010 Toshio Kuratomi - 0.6.10-3 -- First build with python3 support enabled. - -* Fri Jan 29 2010 Toshio Kuratomi - 0.6.10-2 -- Really disable the python3 portion - -* Fri Jan 29 2010 Toshio Kuratomi - 0.6.10-1 -- Update the python3 portions but disable for now. -- Update to 0.6.10 -- Remove %%pre scriptlet as the file has a different name than the old - package's directory - -* Tue Jan 26 2010 Toshio Kuratomi - 0.6.9-4 -- Fix install to make /usr/bin/easy_install the py2 version -- Don't need python3-tools since the library is now in the python3 package -- Few other changes to cleanup style - -* Fri Jan 22 2010 David Malcolm - 0.6.9-2 -- add python3 subpackage - -* Mon Dec 14 2009 Toshio Kuratomi - 0.6.9-1 -- New upstream bugfix release. - -* Sun Dec 13 2009 Toshio Kuratomi - 0.6.8-2 -- Test rebuild - -* Mon Nov 16 2009 Toshio Kuratomi - 0.6.8-1 -- Update to 0.6.8. -- Fix directory => file transition when updating from setuptools-0.6c9. - -* Tue Nov 3 2009 Toshio Kuratomi - 0.6.7-2 -- Fix duplicate inclusion of files. -- Only Obsolete old versions of python-setuptools-devel - -* Tue Nov 3 2009 Toshio Kuratomi - 0.6.7-1 -- Move easy_install back into the main package as the needed files have been - moved from python-devel to the main python package. -- Update to 0.6.7 bugfix. - -* Fri Oct 16 2009 Toshio Kuratomi - 0.6.6-1 -- Upstream bugfix release. - -* Mon Oct 12 2009 Toshio Kuratomi - 0.6.4-1 -- First build from the distribute codebase -- distribute-0.6.4. -- Remove svn patch as upstream has chosen to go with an easier change for now. - -* Sun Jul 26 2009 Fedora Release Engineering - 0.6c9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Tue Jul 14 2009 Konstantin Ryabitsev - 0.6c9-4 -- Apply SVN-1.6 versioning patch (rhbz #511021) - -* Thu Feb 26 2009 Fedora Release Engineering - 0.6c9-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/python/python-voluptuous/centos/build_srpm.data b/python/python-voluptuous/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/python/python-voluptuous/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-voluptuous/centos/meta_patches/0001-meta-add-NotIn-validation.patch b/python/python-voluptuous/centos/meta_patches/0001-meta-add-NotIn-validation.patch deleted file mode 100644 index f11e381a0..000000000 --- a/python/python-voluptuous/centos/meta_patches/0001-meta-add-NotIn-validation.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a64cf29a67df13212e173c4aa74fe9de538ea97d Mon Sep 17 00:00:00 2001 -From: Angie Wang -Date: Mon, 28 May 2018 20:18:19 -0400 -Subject: [PATCH 1/1] meta add NotIn validation - ---- - SPECS/python-voluptuous.spec | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/SPECS/python-voluptuous.spec b/SPECS/python-voluptuous.spec -index 2b1217c..9f82511 100644 ---- a/SPECS/python-voluptuous.spec -+++ b/SPECS/python-voluptuous.spec -@@ -6,7 +6,7 @@ - - Name: python-%{upname} - Version: 0.8.9 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A Python data validation library - License: BSD - Group: Development/Languages -@@ -15,6 +15,10 @@ URL: http://github.com/alecthomas/voluptuous - # Use the tarball from github instead - #Source0: http://pypi.python.org/packages/source/v/voluptuous/%{upname}-%{version}.tar.gz - Source0: http://github.com/alecthomas/voluptuous/archive/%{version}.tar.gz#/%{upname}-%{version}.tar.gz -+ -+# WRS -+Patch0001: 0001-add-NotIn-validation.patch -+ - BuildRequires: python2-devel python-setuptools - - BuildArch: noarch -@@ -38,6 +42,7 @@ primarily intended for validating data coming into Python as JSON, YAML, etc. - - %prep - %setup -q -n %{upname}-%{version} -+%patch0001 -p1 - rm -rf %{upname}.egg-info - - %if 0%{?with_python3} --- -1.8.3.1 - diff --git a/python/python-voluptuous/centos/meta_patches/PATCH_ORDER b/python/python-voluptuous/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 9d985e43c..000000000 --- a/python/python-voluptuous/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -0001-meta-add-NotIn-validation.patch diff --git a/python/python-voluptuous/centos/patches/0001-add-NotIn-validation.patch b/python/python-voluptuous/centos/patches/0001-add-NotIn-validation.patch deleted file mode 100644 index dd755584c..000000000 --- a/python/python-voluptuous/centos/patches/0001-add-NotIn-validation.patch +++ /dev/null @@ -1,47 +0,0 @@ -From afc63cafd4388310f865fb0fba3165a228796049 Mon Sep 17 00:00:00 2001 -From: Angie Wang -Date: Mon, 28 May 2018 20:12:43 -0400 -Subject: [PATCH 1/1] add NotIn validation - ---- - voluptuous.py | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/voluptuous.py b/voluptuous.py -index 5b561b1..b4ed666 100644 ---- a/voluptuous.py -+++ b/voluptuous.py -@@ -1584,6 +1584,30 @@ def In(container, msg=None): - return validator - - -+class NotInInvalid(Invalid): -+ pass -+ -+ -+class NotIn(object): -+ """Validate that a value is not in a collection.""" -+ -+ def __init__(self, container, msg=None): -+ self.container = container -+ self.msg = msg -+ -+ def __call__(self, v): -+ try: -+ check = v in self.container -+ except TypeError: -+ check = True -+ if check: -+ raise NotInInvalid(self.msg or 'value is not allowed') -+ return v -+ -+ def __repr__(self): -+ return 'NotIn(%s)' % (self.container,) -+ -+ - def Lower(v): - """Transform a string to lower case. - --- -1.8.3.1 - diff --git a/python/python-voluptuous/centos/srpm_path b/python/python-voluptuous/centos/srpm_path deleted file mode 100644 index 40dab40c8..000000000 --- a/python/python-voluptuous/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-voluptuous-0.8.9-1.el7.src.rpm diff --git a/python/python-webencodings/centos/build_srpm.data b/python/python-webencodings/centos/build_srpm.data deleted file mode 100644 index c865039bb..000000000 --- a/python/python-webencodings/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="$STX_BASE/downloads/python-webencodings-0.5.1.tar.gz" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python/python-webencodings/centos/python-webencodings.spec b/python/python-webencodings/centos/python-webencodings.spec deleted file mode 100644 index 52c56ef12..000000000 --- a/python/python-webencodings/centos/python-webencodings.spec +++ /dev/null @@ -1,50 +0,0 @@ -%global __python2 %__python -%global python2_sitelib %python_sitelib - -Name: python-webencodings -Version: 0.5.1 -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} -Summary: This is a Python implementation of the WHATWG Encoding standard. - -Group: Applications/System -License: (Python or ZPLv2.0) and ASL 2.0 -URL: https://github.com/gsnedders/python-webencodings/archive/v0.5.1.tar.gz -Source0: python-webencodings-0.5.1.tar.gz - -BuildArch: noarch -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-pip -%else -BuildRequires: python2-devel -BuildRequires: python-pip -%endif - -%description -This is a Python implementation of the WHATWG Encoding standard. - -%package -n python2-webencodings -Summary: This is a Python implementation of the WHATWG Encoding standard. -%{?python_provide:%python_provide python2-webencodings} -%description -n python2-webencodings -This is a Python implementation of the WHATWG Encoding standard. - -%prep -%setup -q -n webencodings-%{version} - -%build -export PBR_VERSION=%{version} -%{__python} setup.py build - -%install -%{__python2} setup.py install --skip-build --root %{buildroot} - -# Don't ship these -# rm -r docs/{conf.py} - -%files -n python2-webencodings -# %doc docs/* -%{python2_sitelib}/* - -%changelog - diff --git a/requests-toolbelt/centos/build_srpm.data b/requests-toolbelt/centos/build_srpm.data deleted file mode 100644 index 3636c616b..000000000 --- a/requests-toolbelt/centos/build_srpm.data +++ /dev/null @@ -1,7 +0,0 @@ -VERSION=0.9.1 -TAR_NAME=requests-toolbelt -TAR="$TAR_NAME-$VERSION.tar.gz" -# SRC_DIR="$TAR_NAME-$VERSION" -COPY_LIST="${CGCS_BASE}/downloads/$TAR" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/requests-toolbelt/centos/requests-toolbelt.spec b/requests-toolbelt/centos/requests-toolbelt.spec deleted file mode 100644 index d6cbb7bab..000000000 --- a/requests-toolbelt/centos/requests-toolbelt.spec +++ /dev/null @@ -1,56 +0,0 @@ -Summary: A utility belt for advanced users of python-requests -Name: requests-toolbelt -Version: 0.9.1 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: https://toolbelt.readthedocs.org/ -Source0: %{name}-%{version}.tar.gz - -%define debug_package %{nil} - -BuildRequires: python-setuptools -BuildRequires: python2-pip -BuildRequires: python2-wheel -Requires: python-devel -Requires: /bin/bash - -%description -A utility belt for advanced users of python-requests - -%define pythonroot /usr/lib64/python2.7/site-packages - -%prep -%setup - -%build -%{__python} setup.py build -%py2_build_wheel - -%install -%{__python} setup.py install --root=$RPM_BUILD_ROOT \ - --install-lib=%{pythonroot} \ - --prefix=/usr \ - --install-data=/usr/share \ - --single-version-externally-managed -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%doc LICENSE -%{pythonroot}/requests_toolbelt -%{pythonroot}/requests_toolbelt-*.egg-info - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/wheels/* diff --git a/security/libtpms/centos/build_srpm.data b/security/libtpms/centos/build_srpm.data deleted file mode 100644 index 9d3cdcbbd..000000000 --- a/security/libtpms/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/libtpms-0.6.0-4f0d59d.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/libtpms/centos/libtpms.spec b/security/libtpms/centos/libtpms.spec deleted file mode 100644 index 48b4fa363..000000000 --- a/security/libtpms/centos/libtpms.spec +++ /dev/null @@ -1,218 +0,0 @@ -# --- libtpm rpm-spec --- - -%define name libtpms -%define version 0.6.0 -#WRS -#%define release 1_dev1 -%define release 2%{?_tis_dist}.%{tis_patch_ver} - -# Valid crypto subsystems are 'freebl' and 'openssl' -#WRS -#%if "%{?crypto_subsystem}" == "" -%define crypto_subsystem openssl -#%endif - -# Valid build types are 'production' or 'debug' -%define build_type production - -Summary: Library providing Trusted Platform Module (TPM) functionality -Name: %{name} -Version: %{version} -#WRS -#Release: %{release}%{?dist} -Release: %{release} -License: BSD -Group: Development/Libraries -#WRS -#Url: http://sourceforge.net/projects/ibmswtpm -#Source: http://bergerstefan.users.sourceforge.net/libtpms/%{name}-%{version}.tar.gz -Url: https://github.com/stefanberger/libtpms -Source: %{name}-%{version}-4f0d59d.tar.gz -Provides: libtpms-%{crypto_subsystem} - -%if "%{crypto_subsystem}" == "openssl" -BuildRequires: openssl-devel -%else -BuildRequires: nss-devel >= 3.12.9-2 -BuildRequires: nss-softokn-freebl-devel >= 3.12.9-2 -%if 0%{?rhel} > 6 || 0%{?fedora} >= 13 -BuildRequires: nss-softokn-freebl-static >= 3.12.9-2 -%endif -BuildRequires: nss-softokn-devel >= 3.12.9-2, gmp-devel -%endif -BuildRequires: pkgconfig gawk sed -BuildRequires: automake autoconf libtool bash coreutils - -%if "%{crypto_subsystem}" == "openssl" -Requires: openssl -%else -Requires: nss-softokn-freebl >= 3.12.9-2, nss-softokn >= 3.12.9-2 -%endif -Requires: gmp - -%description -A library providing TPM functionality for VMs. Targeted for integration -into Qemu. - -%package devel -Summary: Include files for libtpms -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -Libtpms header files and documentation. - -%files -%defattr(-, root, root, -) -%{_libdir}/%{name}.so.%{version} -%{_libdir}/%{name}.so.0 -%doc LICENSE README CHANGES - -%files devel -%defattr(-, root, root, -) - -%{_libdir}/%{name}.so -%dir %{_includedir}/%{name} -%attr(644, root, root) %{_libdir}/pkgconfig/*.pc -%attr(644, root, root) %{_includedir}/%{name}/*.h -%attr(644, root, root) %{_mandir}/man3/* - -%prep -%setup -q - -%build - -%if "%{crypto_subsystem}" == "openssl" -%define _with_openssl --with-openssl -%endif - -%if %{build_type} == debug -%define _enable_debug --enable-debug -%endif - -./bootstrap.sh -%if %{build_type} == debug -CFLAGS=-O0 -%endif -%configure \ - --with-tpm2 \ - --disable-static \ - --prefix=/usr \ - --libdir=%{_libdir} \ - %{?_with_openssl} \ - %{?_enable_debug} - -make %{?_smp_mflags} - -%check -make check - -%install -install -d -m 0755 $RPM_BUILD_ROOT%{_libdir} -install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/libtpms -install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man3 - -make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT} - -rm -f $RPM_BUILD_ROOT%{_libdir}/libtpms.la - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%changelog -* Mon Jun 30 2014 Stefan Berger - 0.5.2-1 -- Updated to version 0.5.2 -- coverity fixes -- fixes for ARM64 using __aarch64__ - -* Sat Jun 07 2014 Fedora Release Engineering - 0.5.1-20.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat Aug 03 2013 Fedora Release Engineering - 0.5.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Mon Mar 25 2013 Stefan Berger - 0.5.1-18 -- Ran autoreconf for support of aarch64 -- Checking for __arm64__ in code - -* Thu Feb 14 2013 Fedora Release Engineering - 0.5.1-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Jul 19 2012 Fedora Release Engineering - 0.5.1-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Feb 17 2012 Peter Robinson - 0.5.1-15 -- Add dist tag as required by package guidelines - -* Fri Jan 27 2012 Stefan Berger - 0.5.1-14 -- fix gcc-4.7 compilation problem - -* Fri Jan 13 2012 Fedora Release Engineering - 0.5.1-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Dec 20 2011 Dan Horák - 0.5.1-12 -- fix build on secondary arches - -* Wed Nov 2 2011 Stefan Berger - 0.5.1-11 -- added (lib)gmp as runtime dependency - -* Sat Oct 8 2011 Stefan Berger - 0.5.1-10 -- internal fixes; callback fixes - -* Tue Aug 30 2011 Stefan Berger - 0.5.1-9 -- new directory structure and build process - -* Tue Jul 12 2011 Stefan Berger - 0.5.1-8 -- added pkgconfig as build dependency -- enabling __powerpc__ build following Bz 728220 - -* Wed May 25 2011 Stefan Berger - 0.5.1-7 -- increasing NVRAM area space to have enough room for certificates - -* Wed May 25 2011 Stefan Berger - 0.5.1-6 -- adding libtpms.pc pkg-config file - -* Wed Apr 13 2011 Stefan Berger - 0.5.1-5 -- adding BuildRequires for nss-softokn-freebl-static -- several libtpms-internal changes around state serialization and - deserialization -- fixes to libtpms makefile (makefile-libtpms) -- adding build_type to generate a debug or production build -- need nss-devel to have nss-config - -* Tue Mar 08 2011 Stefan Berger - 0.5.1-4 -- small fixes to libtpms makefile - -* Fri Feb 25 2011 Stefan Berger - 0.5.1-3 -- removing release from tar ball name -- Use {?_smp_mflags} for make rather than hardcoding it -- Fixing post and postun scripts; removing the scripts for devel package -- Fixing usage of defattr -- Adding version information into the changelog headers and spaces between the changelog entries -- Adding LICENSE, README and CHANGELOG file into tar ball and main rpm -- Removing clean section -- removed command to clean the build root -- adding library version to the libries required for building and during - runtime -- Extended Requires in devel package with {?_isa} - -* Fri Feb 18 2011 Stefan Berger - 0.5.1-2 -- make rpmlint happy by replacing tabs with spaces -- providing a valid URL for the tgz file -- release is now 2 -> 0.5.1-2 - -* Mon Jan 17 2011 Stefan Berger - 0.5.1-1 -- Update version to 0.5.1 - -* Fri Jan 14 2011 Stefan Berger - 0.5.0-1 -- Changes following Fedora review comments - -* Thu Dec 2 2010 Stefan Berger -- Small tweaks after reading the FedoreCore packaging requirements - -* Tue Nov 16 2010 Stefan Berger -- Created initial version of rpm spec files -- Version of library is now 0.5.0 -- Debuginfo rpm is built but empty -- seems to be a known problem - Check https://bugzilla.redhat.com/show_bug.cgi?id=209316 diff --git a/security/python-keyring/centos/build_srpm.data b/security/python-keyring/centos/build_srpm.data deleted file mode 100644 index fa4c6e655..000000000 --- a/security/python-keyring/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="python-keyring/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/python-keyring/centos/meta_patches/0001-move-package-from-tarball-to-srpm.patch b/security/python-keyring/centos/meta_patches/0001-move-package-from-tarball-to-srpm.patch deleted file mode 100644 index 151ad3d73..000000000 --- a/security/python-keyring/centos/meta_patches/0001-move-package-from-tarball-to-srpm.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d7f5646de9ec990ed81489cc12d7942654bc017d Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Fri, 23 Dec 2016 14:30:17 -0500 -Subject: [PATCH] first meta patch to move python-keyring package from download - tarball to srpm. Also updated to add tis patch versioning - ---- - SPECS/python-keyring.spec | 30 +++++++++++++++++++++++++++--- - 1 file changed, 27 insertions(+), 3 deletions(-) - -diff --git a/SPECS/python-keyring.spec b/SPECS/python-keyring.spec -index 14e4e93..60d05ee 100644 ---- a/SPECS/python-keyring.spec -+++ b/SPECS/python-keyring.spec -@@ -2,7 +2,7 @@ - - Name: python-keyring - Version: 5.7.1 --Release: 1%{?dist} -+Release: 1%{?_tis_dist}.%{tis_patch_ver} - Summary: Python 2 library to store and access passwords safely - License: MIT and Python - URL: http://bitbucket.org/kang/python-keyring-lib/ -@@ -10,10 +10,21 @@ Source0: https://pypi.io/packages/source/k/keyring/keyring-%{version}.tar - BuildArch: noarch - BuildRequires: python2-devel - BuildRequires: python-setuptools --BuildRequires: python-setuptools_scm - Obsoletes: %{name}-kwallet < %{version}-%{release} - Obsoletes: %{name}-gnome < %{version}-%{release} - -+Patch0: no_keyring_password.patch -+Patch1: lock_keyring_file.patch -+Patch2: lock_keyring_file2.patch -+Patch3: use_new_lock.patch -+Patch4: fix_keyring_lockfile_location.patch -+Patch5: use_temporary_file.patch -+Patch6: chown_keyringlock_file.patch -+Patch7: chmod_keyringlock2.patch -+Patch8: keyring_path_change.patch -+Patch9: remove-reader-lock.patch -+Patch10: remove_others_perms_on_keyringcfg_file.patch -+ - %description - The Python keyring lib provides a easy way to access the system keyring - service from python. It can be used in any application that needs safe -@@ -39,7 +50,6 @@ Python keyring lib also provides following build-in keyrings. - Summary: Python 3 library to access the system keyring service - BuildRequires: python3-devel - BuildRequires: python3-setuptools --BuildRequires: python3-setuptools_scm - - %description -n python3-keyring - The Python keyring lib provides a easy way to access the system keyring -@@ -64,6 +74,20 @@ Python keyring lib also provides following build-in keyrings. - - %prep - %setup -qn keyring-%{version} -+ -+# WRS -+%patch0 -p1 -+%patch1 -p1 -+%patch2 -p1 -+%patch3 -p1 -+%patch4 -p1 -+%patch5 -p1 -+%patch6 -p1 -+%patch7 -p1 -+%patch8 -p1 -+%patch9 -p1 -+%patch10 -p1 -+ - rm -frv keyring.egg-info - # Drop redundant shebangs. - sed -i '1{\@^#!/usr/bin/env python@d}' keyring/cli.py --- -1.8.3.1 - diff --git a/security/python-keyring/centos/meta_patches/0002-meta-buildrequires-python-setuptools_scm.patch b/security/python-keyring/centos/meta_patches/0002-meta-buildrequires-python-setuptools_scm.patch deleted file mode 100644 index 28c9e490e..000000000 --- a/security/python-keyring/centos/meta_patches/0002-meta-buildrequires-python-setuptools_scm.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/SPECS/python-keyring.spec b/SPECS/python-keyring.spec -index 60d05ee..a41f849 100644 ---- a/SPECS/python-keyring.spec -+++ b/SPECS/python-keyring.spec -@@ -10,6 +10,7 @@ Source0: https://pypi.io/packages/source/k/keyring/keyring-%{version}.tar - BuildArch: noarch - BuildRequires: python2-devel - BuildRequires: python-setuptools -+BuildRequires: python2-setuptools_scm - Obsoletes: %{name}-kwallet < %{version}-%{release} - Obsoletes: %{name}-gnome < %{version}-%{release} - -@@ -50,6 +51,7 @@ Python keyring lib also provides following build-in keyrings. - Summary: Python 3 library to access the system keyring service - BuildRequires: python3-devel - BuildRequires: python3-setuptools -+BuildRequires: python3-setuptools_scm - - %description -n python3-keyring - The Python keyring lib provides a easy way to access the system keyring diff --git a/security/python-keyring/centos/meta_patches/PATCH_ORDER b/security/python-keyring/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index d6a71099d..000000000 --- a/security/python-keyring/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-move-package-from-tarball-to-srpm.patch -0002-meta-buildrequires-python-setuptools_scm.patch diff --git a/security/python-keyring/centos/srpm_path b/security/python-keyring/centos/srpm_path deleted file mode 100644 index 1dce7079a..000000000 --- a/security/python-keyring/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-keyring-5.7.1-1.el7.src.rpm diff --git a/security/shim-signed/centos/build_srpm.data b/security/shim-signed/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/security/shim-signed/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/shim-signed/centos/meta_patches/0001-Titanium-release-info.patch b/security/shim-signed/centos/meta_patches/0001-Titanium-release-info.patch deleted file mode 100644 index 48fdb08bb..000000000 --- a/security/shim-signed/centos/meta_patches/0001-Titanium-release-info.patch +++ /dev/null @@ -1,24 +0,0 @@ -From a19b16baa019609714fb741db4e3c73d67f2adf1 Mon Sep 17 00:00:00 2001 -From: jmckenna -Date: Tue, 16 Jan 2018 08:14:08 -0500 -Subject: [PATCH 1/2] Titanium release info - ---- - SPECS/shim-signed.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/shim-signed.spec b/SPECS/shim-signed.spec -index d2a13b1..9cfcb2f 100644 ---- a/SPECS/shim-signed.spec -+++ b/SPECS/shim-signed.spec -@@ -1,6 +1,6 @@ - Name: shim-signed - Version: 15 --Release: 1%{?dist}%{?buildid} -+Release: 1%{?_tis_dist}.%{tis_patch_ver} - Summary: First-stage UEFI bootloader - %define unsigned_release 1%{?dist} - --- -1.8.3.1 - diff --git a/security/shim-signed/centos/meta_patches/0002-Use-presigned-binaries.patch b/security/shim-signed/centos/meta_patches/0002-Use-presigned-binaries.patch deleted file mode 100644 index d9a3a12cd..000000000 --- a/security/shim-signed/centos/meta_patches/0002-Use-presigned-binaries.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff --git a/SPECS/shim-signed.spec b/SPECS/shim-signed.spec -old mode 100644 -new mode 100755 -index 9cfcb2f..f6ce87e ---- a/SPECS/shim-signed.spec -+++ b/SPECS/shim-signed.spec -@@ -2,18 +2,20 @@ Name: shim-signed - Version: 15 - Release: 1%{?_tis_dist}.%{tis_patch_ver} - Summary: First-stage UEFI bootloader --%define unsigned_release 1%{?dist} - - License: BSD - URL: https://github.com/rhboot/shim/ - # incorporate mokutil for packaging simplicity - %global mokutil_version 0.3.0 -+%global srcbasename shimx64 -+%global srcbasenameia32 shimia32 -+ - Source0: https://github.com/lcp/mokutil/archive/mokutil-%{mokutil_version}.tar.gz - Source1: centossecureboot001.crt - Source2: centos-ca-secureboot.der - %define pesign_name centossecureboot001 --Source10: shimx64.efi --Source11: shimia32.efi -+Source10: %{srcbasename}.efi -+Source11: %{srcbasenameia32}.efi - Source12: shimaa64.efi - Source20: BOOTX64.CSV - Source21: BOOTIA32.CSV -@@ -52,11 +54,17 @@ BuildRequires: git - BuildRequires: openssl-devel openssl - BuildRequires: pesign >= 0.106-5%{dist} - BuildRequires: efivar-devel --BuildRequires: shim-unsigned-%{efiarchlc} = %{version}-%{unsigned_release} -+BuildRequires: shim-unsigned-%{efiarchlc} - %ifarch x86_64 --BuildRequires: shim-unsigned-ia32 = %{version}-%{unsigned_release} -+BuildRequires: shim-unsigned-ia32 - %endif - -+# Rather than hardcode a release, we get the release from the installed shim-unsigned package -+%define unsigned_release %(rpm -q shim-unsigned-x64 --info | grep Release | awk '{print $3}') -+%define unsigned_dir "%{_datadir}/shim/%{efiarchlc}-%{version}-%{unsigned_release}/" -+%define unsigned_release_ia32 %(rpm -q shim-unsigned-ia32 --info | grep Release | awk '{print $3}') -+%define unsigned_dir_ia32 "%{_datadir}/shim/ia32-%{version}-%{unsigned_release_ia32}/" -+ - # for mokutil's configure - BuildRequires: autoconf automake - -@@ -148,39 +156,34 @@ cd .. - %define vendor_cert_str %{expand:%%{!?vendor_cert_nickname:-c "Red Hat Test Certificate"}%%{?vendor_cert_nickname:-c "%%{vendor_cert_nickname}"}} - - %ifarch %{ca_signed_arches} --pesign -i %{shimsrc} -h -P > shim%{efiarchlc}.hash --if ! cmp shim%{efiarchlc}.hash %{unsigned_dir}shim%{efiarchlc}.hash ; then -- echo Invalid signature\! > /dev/stderr -- echo saved hash is $(cat %{unsigned_dir}shim%{efiarchlc}.hash) > /dev/stderr -- echo shim%{efiarchlc}.efi hash is $(cat shim%{efiarchlc}.hash) > /dev/stderr -- exit 1 -+ -+# if we already have a presigned EFI image, then do not do signing -- just -+# use the presigned one. -+if [ -e %{unsigned_dir}%{srcbasename}-presigned.efi ]; then -+ cp %{unsigned_dir}%{srcbasename}-presigned.efi %{srcbasename}.efi -+ cp %{unsigned_dir}%{srcbasename}-presigned.efi shim%{efiarchlc}.efi -+else -+ cp %{shimsrc} shim%{efiarchlc}.efi - fi --cp %{shimsrc} shim%{efiarchlc}.efi - %ifarch x86_64 --pesign -i %{shimsrcia32} -h -P > shimia32.hash --if ! cmp shimia32.hash %{unsigned_dir_ia32}shimia32.hash ; then -- echo Invalid signature\! > /dev/stderr -- echo saved hash is $(cat %{unsigned_dir_ia32}shimia32.hash) > /dev/stderr -- echo shimia32.efi hash is $(cat shimia32.hash) > /dev/stderr -- exit 1 -+if [ -e %{unsigned_dir_ia32}%{srcbasenameia32}-presigned.efi ]; then -+ cp %{unsigned_dir_ia32}%{srcbasenameia32}-presigned.efi %{srcbasenameia32}.efi -+else -+ cp %{shimsrcia32} %{srcbasenameia32}.efi - fi --cp %{shimsrcia32} shimia32.efi --%endif --%endif --%ifarch %{rh_signed_arches} --%pesign -s -i %{unsigned_dir}shim%{efiarchlc}.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -o shim%{efiarchlc}-%{efidir}.efi --%ifarch x86_64 --%pesign -s -i %{unsigned_dir_ia32}shimia32.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -o shimia32-%{efidir}.efi --%endif --%endif --%ifarch %{rh_signed_arches} --%ifnarch %{ca_signed_arches} --cp shim%{efiarchlc}-%{efidir}.efi shim%{efiarchlc}.efi - %endif - %endif - --%pesign -s -i %{unsigned_dir}mm%{efiarchlc}.efi -o mm%{efiarchlc}.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} --%pesign -s -i %{unsigned_dir}fb%{efiarchlc}.efi -o fb%{efiarchlc}.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -+if [ -e %{unsigned_dir}mm%{efiarchlc}-presigned.efi ]; then -+ cp %{unsigned_dir}mm%{efiarchlc}-presigned.efi mm%{efiarchlc}.efi -+else -+ %pesign -s -i %{unsigned_dir}mm%{efiarchlc}.efi -o mm%{efiarchlc}.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -+fi -+if [ -e %{unsigned_dir}fb%{efiarchlc}-presigned.efi ]; then -+ cp %{unsigned_dir}fb%{efiarchlc}-presigned.efi fb%{efiarchlc}.efi -+else -+ %pesign -s -i %{unsigned_dir}fb%{efiarchlc}.efi -o fb%{efiarchlc}.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -+fi - - %ifarch x86_64 - %pesign -s -i %{unsigned_dir_ia32}mmia32.efi -o mmia32.efi -a %{SOURCE2} -c %{SOURCE1} -n %{pesign_name} -@@ -196,7 +199,7 @@ make %{?_smp_mflags} - rm -rf $RPM_BUILD_ROOT - install -D -d -m 0700 $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ - install -m 0700 shim%{efiarchlc}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shim%{efiarchlc}.efi --install -m 0700 shim%{efiarchlc}-%{efidir}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shim%{efiarchlc}-%{efidir}.efi -+#install -m 0700 shim%{efiarchlc}-%{efidir}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shim%{efiarchlc}-%{efidir}.efi - install -m 0700 mm%{efiarchlc}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/mm%{efiarchlc}.efi - install -m 0700 mm%{efiarchlc}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/MokManager.efi - install -m 0700 %{bootsrc} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/BOOT%{efiarch}.CSV -@@ -218,7 +221,7 @@ install -m 0700 %{bootsrc} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/BOOT.CSV - - install -m 0700 shimia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shimia32.efi - install -m 0700 shimia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shimia32.efi --install -m 0700 shimia32-%{efidir}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shimia32-%{efidir}.efi -+#install -m 0700 shimia32-%{efidir}.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/shimia32-%{efidir}.efi - install -m 0700 mmia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/mmia32.efi - install -m 0700 %{bootsrcia32} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/BOOTIA32.CSV - -@@ -232,7 +235,7 @@ make PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install - %files -n shim-%{efiarchlc} - %defattr(0700,root,root,-) - /boot/efi/EFI/%{efidir}/shim%{efiarchlc}.efi --/boot/efi/EFI/%{efidir}/shim%{efiarchlc}-%{efidir}.efi -+#/boot/efi/EFI/%{efidir}/shim%{efiarchlc}-%{efidir}.efi - /boot/efi/EFI/%{efidir}/mm%{efiarchlc}.efi - /boot/efi/EFI/%{efidir}/MokManager.efi - /boot/efi/EFI/%{efidir}/BOOT%{efiarch}.CSV -@@ -247,7 +250,7 @@ make PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install - %files -n shim-ia32 - %defattr(0700,root,root,-) - /boot/efi/EFI/%{efidir}/shimia32.efi --/boot/efi/EFI/%{efidir}/shimia32-%{efidir}.efi -+#/boot/efi/EFI/%{efidir}/shimia32-%{efidir}.efi - /boot/efi/EFI/%{efidir}/mmia32.efi - /boot/efi/EFI/%{efidir}/BOOTIA32.CSV - /boot/efi/EFI/BOOT/BOOTIA32.EFI --- -1.8.3.1 - diff --git a/security/shim-signed/centos/meta_patches/0003-Support-pxeboot-secure-boot.patch b/security/shim-signed/centos/meta_patches/0003-Support-pxeboot-secure-boot.patch deleted file mode 100644 index 572c33744..000000000 --- a/security/shim-signed/centos/meta_patches/0003-Support-pxeboot-secure-boot.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e8566efa702a88c1efe15daaf52b3a00446f1d8c Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Thu, 6 May 2021 13:42:27 -0400 -Subject: [PATCH] Support pxeboot secure boot - -In order to support secure boot with pxeboot, we need to package the -shim.efi file in /pxeboot/EFI, accessible to tftp for the UEFI -install. As well, please note that while /boot/efi/EFI/centos/shim.efi -and other files provided by the shim-x64 package are only accessible -to root, the file under /pxeboot must have broader permissions so that -the dnsmasq-tftp daemon is able to serve it to the requesting host. -Therefore, its file permissions are set to be readable to all. - -Signed-off-by: Don Penney ---- - SPECS/shim-signed.spec | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/SPECS/shim-signed.spec b/SPECS/shim-signed.spec -index 20cdc80..978818a 100755 ---- a/SPECS/shim-signed.spec -+++ b/SPECS/shim-signed.spec -@@ -227,6 +227,9 @@ install -m 0700 %{bootsrcia32} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/BOOTIA32.C - - install -m 0700 shimia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/BOOT/BOOTIA32.EFI - install -m 0700 fbia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/BOOT/fbia32.efi -+ -+# pxeboot support -+install -D -p -m 0755 shimx64.efi $RPM_BUILD_ROOT/pxeboot/EFI/shim.efi - %endif - - cd mokutil-%{mokutil_version} -@@ -243,6 +246,7 @@ make PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install - /boot/efi/EFI/BOOT/fb%{efiarchlc}.efi - /boot/efi/EFI/BOOT/fallback.efi - /boot/efi/EFI/%{efidir}/shim.efi -+%attr(755,root,root) /pxeboot/EFI/shim.efi - - %ifarch x86_64 - /boot/efi/EFI/%{efidir}/BOOT.CSV --- -2.29.2 - diff --git a/security/shim-signed/centos/meta_patches/0004-relocate-pxeboot-to-var-pxeboot.patch b/security/shim-signed/centos/meta_patches/0004-relocate-pxeboot-to-var-pxeboot.patch deleted file mode 100644 index 653f82888..000000000 --- a/security/shim-signed/centos/meta_patches/0004-relocate-pxeboot-to-var-pxeboot.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7d276fc48d468cc257bcfc7e957c18e3035f2503 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Wed, 29 Sep 2021 20:17:18 -0400 -Subject: [PATCH] relocate /pxeboot to /var/pxeboot - ---- - SPECS/shim-signed.spec | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/SPECS/shim-signed.spec b/SPECS/shim-signed.spec -index c085104..6dd7b95 100755 ---- a/SPECS/shim-signed.spec -+++ b/SPECS/shim-signed.spec -@@ -229,7 +229,7 @@ install -m 0700 shimia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/BOOT/BOOTIA32.EFI - install -m 0700 fbia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/BOOT/fbia32.efi - - # pxeboot support --install -D -p -m 0755 shimx64.efi $RPM_BUILD_ROOT/pxeboot/EFI/shim.efi -+install -D -p -m 0755 shimx64.efi $RPM_BUILD_ROOT/var/pxeboot/EFI/shim.efi - %endif - - cd mokutil-%{mokutil_version} -@@ -246,7 +246,7 @@ make PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install - /boot/efi/EFI/BOOT/fb%{efiarchlc}.efi - /boot/efi/EFI/BOOT/fallback.efi - /boot/efi/EFI/%{efidir}/shim.efi --%attr(755,root,root) /pxeboot/EFI/shim.efi -+%attr(755,root,root) /var/pxeboot/EFI/shim.efi - - %ifarch x86_64 - /boot/efi/EFI/%{efidir}/BOOT.CSV --- -2.29.2 - diff --git a/security/shim-signed/centos/meta_patches/PATCH_ORDER b/security/shim-signed/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 72deb920a..000000000 --- a/security/shim-signed/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,4 +0,0 @@ -0001-Titanium-release-info.patch -0002-Use-presigned-binaries.patch -0003-Support-pxeboot-secure-boot.patch -0004-relocate-pxeboot-to-var-pxeboot.patch diff --git a/security/shim-signed/centos/srpm_path b/security/shim-signed/centos/srpm_path deleted file mode 100644 index 90af5a681..000000000 --- a/security/shim-signed/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/shim-signed-15-1.el7.centos.src.rpm diff --git a/security/shim-unsigned/centos/build_srpm.data b/security/shim-unsigned/centos/build_srpm.data deleted file mode 100644 index ab3d4a60b..000000000 --- a/security/shim-unsigned/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT -COPY_LIST="$PKG_BASE/files/tis-shim.crt" diff --git a/security/shim-unsigned/centos/meta_patches/0001-Ti-version-string.patch b/security/shim-unsigned/centos/meta_patches/0001-Ti-version-string.patch deleted file mode 100644 index b38f191c2..000000000 --- a/security/shim-unsigned/centos/meta_patches/0001-Ti-version-string.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fc1f1853e99c5afaae334b0c37296e34e9cf19fd Mon Sep 17 00:00:00 2001 -From: root -Date: Mon, 15 Jan 2018 13:09:41 -0500 -Subject: [PATCH 1/2] Ti version string - ---- - SPECS/shim.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - mode change 100755 => 100644 SPECS/shim.spec - -diff --git a/SPECS/shim.spec b/SPECS/shim.spec -old mode 100755 -new mode 100644 -index afd533b..de216b6 ---- a/SPECS/shim.spec -+++ b/SPECS/shim.spec -@@ -1,6 +1,6 @@ - Name: shim - Version: 15 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: First-stage UEFI bootloader - - License: BSD --- -1.8.3.1 - diff --git a/security/shim-unsigned/centos/meta_patches/0002-Add-Ti-certificate.patch b/security/shim-unsigned/centos/meta_patches/0002-Add-Ti-certificate.patch deleted file mode 100644 index 33fb501ad..000000000 --- a/security/shim-unsigned/centos/meta_patches/0002-Add-Ti-certificate.patch +++ /dev/null @@ -1,46 +0,0 @@ -From fb4da7f4d7d8e8565371ed236150de2e4bb47b95 Mon Sep 17 00:00:00 2001 -From: root -Date: Mon, 15 Jan 2018 13:22:09 -0500 -Subject: [PATCH 2/2] Add Ti certificate - ---- - SPECS/shim.spec | 4 ++++ - 1 file changed, 4 insertions(+) - mode change 100644 => 100755 SPECS/shim.spec - -diff --git a/SPECS/shim.spec b/SPECS/shim.spec -old mode 100644 -new mode 100755 -index de216b6..83da6cd ---- a/SPECS/shim.spec -+++ b/SPECS/shim.spec -@@ -12,8 +12,10 @@ Source0: https://github.com/mjg59/shim/releases/download/%{version}/shim- - #Source3: dbx-aa64.esl - Source4: shim-find-debuginfo.sh - Source5: centos.esl -+Source1000: tis-shim.crt - - Patch0: 0001-Add-vendor-esl.patch -+Patch1000: 0001-Use-Titanium-certificate.patch - - BuildRequires: git openssl-devel openssl - BuildRequires: pesign >= 0.106-1 -@@ -104,6 +106,7 @@ git commit -a -q -m "%{version} baseline." - git am --ignore-whitespace %{patches} -Date: Mon, 15 Jan 2018 13:25:04 -0500 -Subject: [PATCH] Use Titanium certificate - -Signed-off-by: Scott Little ---- - Make.defaults | 6 ++++++ - Makefile | 29 ++++++++++++++++------------- - 2 files changed, 22 insertions(+), 13 deletions(-) - -diff --git a/Make.defaults b/Make.defaults -index e11ab5a..d16510c 100644 ---- a/Make.defaults -+++ b/Make.defaults -@@ -51,6 +51,12 @@ CLANG_BUGS = $(if $(findstring gcc,$(CC)),-maccumulate-outgoing-args,) - - COMMIT_ID ?= $(shell if [ -e .git ] ; then git log -1 --pretty=format:%H ; elif [ -f commit ]; then cat commit ; else echo master; fi) - -+# We compile a certificate into shim. Usually this is a one-time generated -+# certificate (make-certs script) however we want to include a custom -+# certificate for which we have the key. We use the key to sign the kernel and -+# grub down the road -+INTERNAL_CERT = tis-shim -+ - ifneq ($(origin OVERRIDE_SECURITY_POLICY), undefined) - CFLAGS += -DOVERRIDE_SECURITY_POLICY - endif -diff --git a/Makefile b/Makefile -index 115e7f0..f2b37fa 100644 ---- a/Makefile -+++ b/Makefile -@@ -32,9 +32,10 @@ TARGETS += $(MMNAME).signed $(FBNAME).signed - CFLAGS += -DENABLE_SHIM_CERT - else - TARGETS += $(MMNAME) $(FBNAME) -+CFLAGS += -DENABLE_SHIM_CERT - endif - OBJS = shim.o mok.o netboot.o cert.o replacements.o tpm.o version.o errlog.o --KEYS = shim_cert.h ocsp.* ca.* shim.crt shim.csr shim.p12 shim.pem shim.key shim.cer -+KEYS = shim_cert.h ocsp.* ca.* $(INTERNAL_CERT).crt $(INTERNAL_CERT).csr $(INTERNAL_CERT).p12 $(INTERNAL_CERT).pem $(INTERNAL_CERT).key $(INTERNAL_CERT).cer - ORIG_SOURCES = shim.c mok.c netboot.c replacements.c tpm.c errlog.c shim.h version.h $(wildcard include/*.h) - MOK_OBJS = MokManager.o PasswordCrypt.o crypt_blowfish.o - ORIG_MOK_SOURCES = MokManager.c PasswordCrypt.c crypt_blowfish.c shim.h $(wildcard include/*.h) -@@ -52,14 +53,18 @@ FALLBACK_SRCS = $(foreach source,$(ORIG_FALLBACK_SRCS),$(TOPDIR)/$(source)) - - all: $(TARGETS) - --shim.crt: -- $(TOPDIR)/make-certs shim shim@xn--u4h.net all codesign 1.3.6.1.4.1.311.10.3.1 $@ - $(HEXDUMP) -v -e '1/1 "0x%02x, "' $< >> $@ - echo "};" >> $@ -@@ -70,15 +75,13 @@ version.c : $(TOPDIR)/version.c.in - -e "s,@@COMMIT@@,$(COMMIT_ID)," \ - < $< > $@ - --certdb/secmod.db: shim.crt -+certdb/secmod.db: $(INTERNAL_CERT).crt - -mkdir certdb -- $(PK12UTIL) -d certdb/ -i shim.p12 -W "" -K "" -- $(CERTUTIL) -d certdb/ -A -i shim.crt -n shim -t u -+ $(PK12UTIL) -d certdb/ -i $(INTERNAL_CERT).p12 -W "" -K "" -+ $(CERTUTIL) -d certdb/ -A -i $(INTERNAL_CERT).crt -n shim -t u - - shim.o: $(SOURCES) --ifneq ($(origin ENABLE_SHIM_CERT),undefined) - shim.o: shim_cert.h --endif - shim.o: $(wildcard $(TOPDIR)/*.h) - - cert.o : $(TOPDIR)/cert.S -@@ -213,8 +216,8 @@ endif - $^ $@ - - ifneq ($(origin ENABLE_SBSIGN),undefined) --%.efi.signed: %.efi shim.key shim.crt -- $(SBSIGN) --key shim.key --cert shim.crt --output $@ $< -+%.efi.signed: %.efi $(INTERNAL_CERT).key $(INTERNAL_CERT).crt -+ $(SBSIGN) --key $(INTERNAL_CERT).key --cert $(INTERNAL_CERT).crt --output $@ $< - else - %.efi.signed: %.efi certdb/secmod.db - $(PESIGN) -n certdb -i $< -c "shim" -s -o $@ -f -@@ -258,6 +261,6 @@ archive: tag - @rm -rf /tmp/shim-$(VERSION) - @echo "The archive is in shim-$(VERSION).tar.bz2" - --.PHONY : install-deps shim.key -+.PHONY : install-deps $(INTERNAL_CERT).key - - export ARCH CC LD OBJCOPY EFI_INCLUDE --- -1.8.3.1 - diff --git a/security/shim-unsigned/centos/srpm_path b/security/shim-unsigned/centos/srpm_path deleted file mode 100644 index eb27711fa..000000000 --- a/security/shim-unsigned/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/shim-15-1.el7.centos.src.rpm diff --git a/security/spectre-meltdown-checker/centos/build_srpm.data b/security/spectre-meltdown-checker/centos/build_srpm.data deleted file mode 100644 index 916cfcf79..000000000 --- a/security/spectre-meltdown-checker/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/spectre-meltdown-checker-0.37+-5cc77741.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/spectre-meltdown-checker/centos/spectre-meltdown-checker.spec b/security/spectre-meltdown-checker/centos/spectre-meltdown-checker.spec deleted file mode 100644 index 8e545dd92..000000000 --- a/security/spectre-meltdown-checker/centos/spectre-meltdown-checker.spec +++ /dev/null @@ -1,35 +0,0 @@ -Name: spectre-meltdown-checker -Version: 0.37+ -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: Checker script for spectre/meltdown - -Group: base -License: GPLv3 -URL: https://github.com/speed47/spectre-meltdown-checker.git -Source0: spectre-meltdown-checker-0.37+-5cc77741.tar.gz - -BuildArch: noarch -Requires: bash - -%description -Script to check whether kernel is susceptible to spectre/meltdown vulnerabilities. - - -%prep -tar xf %{SOURCE0} - -%build - - -%install -install -d -m 755 %{buildroot}/usr/sbin/ -install -m 744 spectre-meltdown-checker/spectre-meltdown-checker.sh %{buildroot}/usr/sbin/spectre-meltdown-checker.sh - - -%files -%license %{name}/LICENSE -/usr/sbin/* - - -%changelog - diff --git a/security/swtpm/centos/build_srpm.data b/security/swtpm/centos/build_srpm.data deleted file mode 100644 index 6f623288d..000000000 --- a/security/swtpm/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$PKG_BASE/files/* $CGCS_BASE/downloads/swtpm-0.1.0-253eac5.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/swtpm/centos/swtpm.spec b/security/swtpm/centos/swtpm.spec deleted file mode 100644 index 4ba9ce200..000000000 --- a/security/swtpm/centos/swtpm.spec +++ /dev/null @@ -1,212 +0,0 @@ -# --- swtpm rpm-spec --- - -%define name swtpm -%define version 0.1.0 -#STX -#%define release 1 -%define release 2%{?_tis_dist}.%{tis_patch_ver} - -# Valid crypto subsystems are 'freebl' and 'openssl' -#STX -#%if "%{crypto_subsystem}" == "" -%define crypto_subsystem openssl -#%endif - -Summary: TPM Emulator -Name: %{name} -Version: %{version} -#STX -#Release: %{release}.dev2%{?dist} -Release: %{release} -License: BSD -Group: Applications/Emulators -Source: %{name}-%{version}-253eac5.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -#STX -Source1: setup_vtpm - - -# due to gnutls backlevel API: -%if 0%{?rhel} >= 7 || 0%{?fedora} >= 19 - %define with_gnutls 1 -%else - %define with_gnutls 0 -%endif - -BuildRequires: automake autoconf bash coreutils libtool sed -BuildRequires: libtpms-devel >= 0.6.0 fuse-devel glib2-devel gmp-devel -BuildRequires: expect bash net-tools nss-devel socat python-twisted -%if %{with_gnutls} -BuildRequires: gnutls >= 3.1.0 gnutls-devel gnutls-utils -BuildRequires: libtasn1-devel libtasn1 -%if 0%{?fedora} -BuildRequires: libtasn1-tools -%endif -%endif -%if 0%{?fedora} > 16 -BuildRequires: kernel-modules-extra -%endif - -#STX -BuildRequires: openssl-devel -Requires: openssl - -#STX -Requires: seabios-bin >= 1.10.2-3 - -Requires: fuse expect libtpms >= 0.6.0 -%if 0%{?fedora} > 16 -Requires: kernel-modules-extra -%endif - -%description -TPM emulator built on libtpms providing TPM functionality for QEMU VMs - -%package libs -Summary: Common libraries for TPM emulators -Group: System Environment/Libraries -License: BSD - -%description libs -A library with callback functions for libtpms based TPM emulator - -%package cuse -Summary: TPM emulator with CUSE interface -Group: Applications/Emulators -License: BSD -BuildRequires: selinux-policy-devel - -%description cuse -TPM Emulator with CUSE interface - -%package devel -Summary: Include files for the TPM emulator's CUSE interface for usage by clients -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -Include files for the TPM emulator's CUSE interface. - -%package tools -Summary: Tools for the TPM emulator -License: BSD -Group: Applications/Emulators -Requires: swtpm fuse -#STX -#Requires: trousers >= 0.3.9 tpm-tools >= 1.3.8-6 expect bash net-tools gnutls-utils -Requires: trousers >= 0.3.9 expect bash net-tools gnutls-utils - -%description tools -Tools for the TPM emulator from the swtpm package - -%files -%defattr(-,root,root,-) -%attr( 755, root, root) %{_bindir}/swtpm -%{_mandir}/man8/swtpm.8* - -#STX -/etc/libvirt/setup_vtpm - - -%files cuse -%defattr(-,root,root,-) -%attr( 755, root, root) %{_bindir}/swtpm_cuse -%{_mandir}/man8/swtpm_cuse.8* -%attr( 755, root, root) %{_datadir}/swtpm/*.pp - -%files libs -%{_libdir}/libswtpm_libtpms.so.* - -%files devel -%defattr(-, root, root, -) -%{_libdir}/libswtpm_libtpms.so - -%dir %{_includedir}/%{name} -%attr(644, root, root) %{_includedir}/%{name}/*.h -%{_mandir}/man3/swtpm_ioctls.3* - -%files tools -%defattr(-,root,root,-) -%attr( 755, root, root) %{_bindir}/swtpm_bios -%if %{with_gnutls} -%attr( 755, root, root) %{_bindir}/swtpm_cert -%endif -%attr( 755, root, root) %{_bindir}/swtpm_setup -%attr( 755, tss , tss) %{_bindir}/swtpm_setup.sh -%attr( 755, root, root) %{_bindir}/swtpm_ioctl -%{_mandir}/man8/swtpm_bios.8* -%{_mandir}/man8/swtpm_cert.8* -%{_mandir}/man8/swtpm_ioctl.8* -%{_mandir}/man8/swtpm-localca.conf.8* -%{_mandir}/man8/swtpm-localca.options.8* -%{_mandir}/man8/swtpm-localca.8* -%{_mandir}/man8/swtpm_setup.8* -%{_mandir}/man8/swtpm_setup.conf.8* -%{_mandir}/man8/swtpm_setup.sh.8* -%config(noreplace) %{_sysconfdir}/swtpm_setup.conf -%config(noreplace) %{_sysconfdir}/swtpm-localca.options -%config(noreplace) %{_sysconfdir}/swtpm-localca.conf -%attr( 755, root, root) %{_datadir}/swtpm/swtpm-localca -%attr( 755, tss, tss) %{_localstatedir}/lib/swtpm-localca - - -%prep -%setup -q - -%build - -#STX -./bootstrap.sh -%configure \ - --prefix=/usr \ -%if %{with_gnutls} - --with-gnutls \ -%endif -%if "%{crypto_subsystem}" == "openssl" - --with-openssl \ -%endif - TPM_NVDEFINE=/bin/true - -make %{?_smp_mflags} - -%check -make %{?_smp_mflags} check - -%install - -make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT} -rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.a ${RPM_BUILD_ROOT}%{_libdir}/*.la - -#STX -mkdir -p $RPM_BUILD_ROOT/etc/libvirt - -install -m 0500 %{SOURCE1} $RPM_BUILD_ROOT/etc/libvirt/setup_vtpm - -# STX: Don't set (or remove on uninstall): SELINUX Policy and contexts -#%post cuse -#if [ -n "$(type -p semodule)" ]; then -# for pp in /usr/share/swtpm/*.pp ; do -# echo "Activating SELinux policy $pp" -# semodule -i $pp -# done -#fi - -#if [ -n "$(type -p restorecon)" ]; then -# restorecon /usr/bin/swtpm_cuse -#fi - -#%postun cuse -#if [ $1 -eq 0 ]; then -# if [ -n "$(type -p semodule)" ]; then -# for p in swtpmcuse_svirt swtpmcuse ; do -# echo "Removing SELinux policy $p" -# semodule -r $p -# done -# fi -#fi - -%post libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig - -%changelog diff --git a/security/tboot/centos/build_srpm.data b/security/tboot/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/security/tboot/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/tboot/centos/meta_patches/0001-tboot-Update-package-versioning-for-TIS-format.patch b/security/tboot/centos/meta_patches/0001-tboot-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 812c404d1..000000000 --- a/security/tboot/centos/meta_patches/0001-tboot-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f7ac0c586ee46b67c7b5a541ee823f459e19c5c6 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Mon, 27 Nov 2017 08:35:10 -0500 -Subject: [PATCH 1/1] WRS: 8000-TiS-tboot.patch - ---- - SPECS/tboot.spec | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/SPECS/tboot.spec b/SPECS/tboot.spec -index 2f6f0a8..c2d5eb7 100644 ---- a/SPECS/tboot.spec -+++ b/SPECS/tboot.spec -@@ -1,13 +1,14 @@ - Summary: Performs a verified launch using Intel TXT - Name: tboot - Version: 1.9.6 --Release: 3%{?dist} -+Release: 3.el7%{?_tis_dist}.%{tis_patch_ver} - Epoch: 1 - - Group: System Environment/Base - License: BSD - URL: http://sourceforge.net/projects/tboot/ - Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -+ - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - - Patch01: ../patches/0001-Fix-a-logical-error-in-function-bool-evtlog_append.patch --- -2.7.4 - diff --git a/security/tboot/centos/meta_patches/0002-TiS-tboot.patch b/security/tboot/centos/meta_patches/0002-TiS-tboot.patch deleted file mode 100644 index 4c0593abf..000000000 --- a/security/tboot/centos/meta_patches/0002-TiS-tboot.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 16a82ea84332a117c4524caaa4209b912e18e888 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Wed, 6 Dec 2017 08:47:12 -0500 -Subject: [PATCH 1/1] TiS tboot - ---- - SPECS/tboot.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/tboot.spec b/SPECS/tboot.spec -index c2d5eb7..f04dd17 100644 ---- a/SPECS/tboot.spec -+++ b/SPECS/tboot.spec -@@ -27,6 +27,7 @@ Patch13: ../patches/0013-Add-centos7-instructions-for-Use-in-EFI-boot-mode.patch - Patch14: ../patches/0014-Ensure-tboot-log-is-available-even-when-measured-lau.patch - Patch15: ../patches/0015-Add-support-for-appending-to-a-TPM2-TCG-style-event-.patch - Patch16: ../patches/0016-Add-an-option-in-tboot-to-force-SINIT-to-use-the-leg.patch -+Patch999: ../patches/1000-tboot-for-tis.patch - - BuildRequires: trousers-devel - BuildRequires: openssl-devel -@@ -56,6 +57,7 @@ and verified launch of an OS kernel/VMM. - %patch14 -p1 -b .0014 - %patch15 -p1 -b .0015 - %patch16 -p1 -b .0016 -+%patch999 -p1 - - %build - CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS --- -2.7.4 - diff --git a/security/tboot/centos/meta_patches/0003-security-set-immutable-attribute.patch b/security/tboot/centos/meta_patches/0003-security-set-immutable-attribute.patch deleted file mode 100644 index 1036e50f7..000000000 --- a/security/tboot/centos/meta_patches/0003-security-set-immutable-attribute.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 15d8e3a327bc4ee96845163f962837cfcb4699bb Mon Sep 17 00:00:00 2001 -From: Kam Nasim -Date: Tue, 6 Feb 2018 15:25:00 -0500 -Subject: [PATCH] CGTS-8849: Security: Set immutable attribute and permissions - ---- - SPECS/tboot.spec | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/SPECS/tboot.spec b/SPECS/tboot.spec -index f04dd17..1673095 100644 ---- a/SPECS/tboot.spec -+++ b/SPECS/tboot.spec -@@ -75,6 +75,13 @@ if [ -e "/sys/firmware/efi" ]; then - exit 0; - fi - -+# On updating this package, we want to clear the immutable -+# attribute so that the module files can get overwritten -+if [ $1 -gt 1 ]; then -+ chattr -i /boot/tboot.gz /boot/tboot-syms -+fi -+exit 0 -+ - %install - rm -rf $RPM_BUILD_ROOT - make debug=y DISTDIR=$RPM_BUILD_ROOT install -@@ -82,6 +89,11 @@ make debug=y DISTDIR=$RPM_BUILD_ROOT install - %clean - rm -rf $RPM_BUILD_ROOT - -+%post -+# Set immutable attribute on tboot modules -+chattr +i /boot/tboot.gz /boot/tboot-syms -+exit 0 -+ - %files - %defattr(-,root,root,-) - %doc README COPYING docs/* lcptools/lcptools2.txt lcptools/Linux_LCP_Tools_User_Manual.pdf -@@ -118,8 +130,8 @@ rm -rf $RPM_BUILD_ROOT - %{_mandir}/man8/lcp_writepol.8.gz - %{_mandir}/man8/tb_polgen.8.gz - %{_mandir}/man8/txt-stat.8.gz --/boot/tboot.gz --/boot/tboot-syms -+%attr(0400,root,root) /boot/tboot.gz -+%attr(0400,root,root) /boot/tboot-syms - - %changelog - * Mon Jul 16 2018 Tony Camuso - 1:1.9.6-3 --- -2.7.4 - diff --git a/security/tboot/centos/meta_patches/PATCH_ORDER b/security/tboot/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 41c6a11d7..000000000 --- a/security/tboot/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-tboot-Update-package-versioning-for-TIS-format.patch -0002-TiS-tboot.patch -0003-security-set-immutable-attribute.patch diff --git a/security/tboot/centos/patches/1000-tboot-for-tis.patch b/security/tboot/centos/patches/1000-tboot-for-tis.patch deleted file mode 100644 index a12d40b08..000000000 --- a/security/tboot/centos/patches/1000-tboot-for-tis.patch +++ /dev/null @@ -1,188 +0,0 @@ -From c2edea1ff347242a70075808652fa1ad4c86037a Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Mon, 27 Nov 2017 08:35:11 -0500 -Subject: [PATCH 1/1] WRS: Patch1: 9000-tboot-for-tis.patch - ---- - tboot/20_linux_tboot | 21 ++++++++++++--------- - tboot/20_linux_xen_tboot | 2 +- - tboot/common/policy.c | 16 +++++++++++----- - tboot/common/tpm_20.c | 7 ++++--- - 4 files changed, 28 insertions(+), 18 deletions(-) - -diff --git a/tboot/20_linux_tboot b/tboot/20_linux_tboot -index 816d50a..eed512d 100644 ---- a/tboot/20_linux_tboot -+++ b/tboot/20_linux_tboot -@@ -22,6 +22,13 @@ exec_prefix=${prefix} - bindir=${exec_prefix}/bin - libdir=${exec_prefix}/lib - sysconfdir=/etc -+ -+ -+tboot=`cat /proc/cmdline | xargs -n1 | grep '^tboot=true$'` || true -+if [ -z "$tboot" ]; then -+ exit 0 -+fi -+ - if test -e /usr/share/grub/grub-mkconfig_lib; then - . /usr/share/grub/grub-mkconfig_lib - elif test -e ${libdir}/grub/grub-mkconfig_lib; then -@@ -40,7 +47,7 @@ fi - [ -z "${GRUB_CMDLINE_LINUX_TBOOT}" ] && unset GRUB_CMDLINE_LINUX_TBOOT - [ -z "${GRUB_TBOOT_POLICY_DATA}" ] && unset GRUB_TBOOT_POLICY_DATA - # Command line for tboot itself --: ${GRUB_CMDLINE_TBOOT='logging=serial,memory,vga'} -+: ${GRUB_CMDLINE_TBOOT='logging=serial,memory,vga extpol=sha256'} - # Linux kernel parameters to append for tboot - : ${GRUB_CMDLINE_LINUX_TBOOT='intel_iommu=on'} - # Base name of LCP policy data file for list policy -@@ -69,10 +76,8 @@ export TEXTDOMAINDIR=${prefix}/share/locale - - CLASS="--class gnu-linux --class gnu --class os --class tboot" - --if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then -- OS=GNU/Linux --else -- OS="${GRUB_DISTRIBUTOR} GNU/Linux" -+OS="CentOS GNU/Linux" -+if [ -n "${GRUB_DISTRIBUTOR}" ] ; then - CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" - fi - -@@ -109,9 +114,9 @@ linux_entry () - iommu_args="$7" - - if ${recovery} ; then -- title="$(gettext_quoted "%s, with tboot %s and Linux %s (recovery mode)")" -+ title="$(gettext_quoted "%s, w/ tboot %s & Linux %s (recovery mode)")" - else -- title="$(gettext_quoted "%s, with tboot %s and Linux %s")" -+ title="$(gettext_quoted "%s, w/ tboot %s & Linux %s")" - fi - - if [ -d /sys/firmware/efi ] ; then -@@ -202,7 +207,6 @@ while [ "x${tboot_list}" != "x" ] && [ "x$linux_list" != "x" ] ; do - rel_tboot_dirname=`make_system_path_relative_to_its_root $tboot_dirname` - # tboot_version=`echo $tboot_basename | sed -e "s,.gz$,,g;s,^tboot-,,g"` - tboot_version="1.9.6" -- echo "submenu \"tboot ${tboot_version}\" {" - while [ "x$list" != "x" ] ; do - linux=`version_find_latest $list` - echo "Found linux image: $linux" >&2 -@@ -243,6 +247,5 @@ while [ "x${tboot_list}" != "x" ] && [ "x$linux_list" != "x" ] ; do - - list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` - done -- echo "}" - tboot_list=`echo $tboot_list | tr ' ' '\n' | grep -vx $current_tboot | tr '\n' ' '` - done -diff --git a/tboot/20_linux_xen_tboot b/tboot/20_linux_xen_tboot -index a113a3c..b1e4b09 100644 ---- a/tboot/20_linux_xen_tboot -+++ b/tboot/20_linux_xen_tboot -@@ -41,7 +41,7 @@ fi - [ -z "${GRUB_CMDLINE_LINUX_XEN_TBOOT}" ] && unset GRUB_CMDLINE_LINUX_XEN_TBOOT - [ -z "${GRUB_TBOOT_POLICY_DATA}" ] && unset GRUB_TBOOT_POLICY_DATA - # Command line for tboot itself --: ${GRUB_CMDLINE_TBOOT='logging=serial,memory,vga'} -+: ${GRUB_CMDLINE_TBOOT='logging=serial,memory,vga extpol=sha256'} - # Xen parameters to append for tboot - : ${GRUB_CMDLINE_XEN_TBOOT=''} - # Linux kernel parameters to append for tboot + Xen -diff --git a/tboot/common/policy.c b/tboot/common/policy.c -index 9678b7c..5a16d81 100644 ---- a/tboot/common/policy.c -+++ b/tboot/common/policy.c -@@ -353,6 +353,7 @@ tb_error_t set_policy(void) - * type is LCP_POLTYPE_LIST (since we could have been give a policy data - * file even though the policy was not a LIST */ - printk(TBOOT_INFO"reading Launch Control Policy from TPM NV...\n"); -+ - if ( read_policy_from_tpm(tpm->lcp_own_index, - _policy_index_buf, &policy_index_size) ) { - printk(TBOOT_DETA"\t:%lu bytes read\n", policy_index_size); -@@ -412,6 +413,7 @@ bool hash_policy(tb_hash_t *hash, uint16_t hash_alg) - - /* generate hash by hashing cmdline and module image */ - static bool hash_module(hash_list_t *hl, -+ u16 cur_alg, - const char* cmdline, void *base, - size_t size) - { -@@ -423,6 +425,7 @@ static bool hash_module(hash_list_t *hl, - return false; - } - -+ printk(TBOOT_INFO"Using hash algorithm %d\n", cur_alg); - /* final hash is SHA-1( SHA-1(cmdline) | SHA-1(image) ) */ - /* where cmdline is first stripped of leading spaces, file name, then */ - /* any spaces until the next non-space char */ -@@ -437,16 +440,17 @@ static bool hash_module(hash_list_t *hl, - switch (tpm->extpol) { - case TB_EXTPOL_FIXED: - hl->count = 1; -- hl->entries[0].alg = tpm->cur_alg; -+ // hl->entries[0].alg = tpm->cur_alg; -+ hl->entries[0].alg = cur_alg; - - if ( !hash_buffer((const unsigned char *)cmdline, strlen(cmdline), -- &hl->entries[0].hash, tpm->cur_alg) ) -+ &hl->entries[0].hash, cur_alg) ) - return false; - /* hash image and extend into cmdline hash */ - tb_hash_t img_hash; -- if ( !hash_buffer(base, size, &img_hash, tpm->cur_alg) ) -+ if ( !hash_buffer(base, size, &img_hash, cur_alg) ) - return false; -- if ( !extend_hash(&hl->entries[0].hash, &img_hash, tpm->cur_alg) ) -+ if ( !extend_hash(&hl->entries[0].hash, &img_hash, cur_alg) ) - return false; - - break; -@@ -643,7 +647,7 @@ static tb_error_t verify_module(module_t *module, tb_policy_entry_t *pol_entry, - } - - hash_list_t hl; -- if ( !hash_module(&hl, cmdline, base, size) ) { -+ if ( !hash_module(&hl, hash_alg, cmdline, base, size) ) { - printk(TBOOT_ERR"\t hash cannot be generated.\n"); - return TB_ERR_MODULE_VERIFICATION_FAILED; - } -@@ -667,6 +671,8 @@ static tb_error_t verify_module(module_t *module, tb_policy_entry_t *pol_entry, - if ( pol_entry != NULL && - !is_hash_in_policy_entry(pol_entry, &hl.entries[0].hash, hash_alg) ) { - printk(TBOOT_ERR"\t verification failed\n"); -+ print_hash(&hl.entries[0].hash, hash_alg); -+ print_hash(&pol_entry->hashes[0], hash_alg); - return TB_ERR_MODULE_VERIFICATION_FAILED; - } - -diff --git a/tboot/common/tpm_20.c b/tboot/common/tpm_20.c -index b9b67c9..b7c5d62 100644 ---- a/tboot/common/tpm_20.c -+++ b/tboot/common/tpm_20.c -@@ -2096,7 +2096,7 @@ static bool tpm20_nv_read(struct tpm_if *ti, uint32_t locality, - - ret = _tpm20_nv_read(locality, &read_in, &read_out); - if ( ret != TPM_RC_SUCCESS ) { -- printk(TBOOT_WARN"TPM: read NV index %08x from offset %08x, return value = %08X\n", -+ printk(TBOOT_WARN"TPM 2.0: read NV index %08x from offset %08x, return value = %08X\n", - index, offset, ret); - ti->error = ret; - return false; -@@ -2504,8 +2504,9 @@ static bool tpm20_init(struct tpm_if *ti) - get_tboot_extpol(); - if (info_list->capabilities.tpm_nv_index_set == 0){ - /* init NV index */ -- ti->tb_policy_index = 0x1200001; -- ti->lcp_own_index = 0x1400001; -+ ti->tb_policy_index = 0x1800001; -+ // ti->lcp_own_index = 0x1400001; -+ ti->lcp_own_index = 0x1c10131; - ti->tb_err_index = 0x1200002; - ti->sgx_svn_index = 0x01800004; - } --- -2.7.4 - diff --git a/security/tboot/centos/srpm_path b/security/tboot/centos/srpm_path deleted file mode 100644 index 97d222fd6..000000000 --- a/security/tboot/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/tboot-1.9.6-3.el7.src.rpm diff --git a/security/tpm2-tools/centos/build_srpm.data b/security/tpm2-tools/centos/build_srpm.data deleted file mode 100644 index a6fc416b3..000000000 --- a/security/tpm2-tools/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -#COPY_LIST="tpm2-tools/*" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/tpm2-tools/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/security/tpm2-tools/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index b8f1f68ac..000000000 --- a/security/tpm2-tools/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 63375de22771a9384eb9c4a90abc8ee2143a7721 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:30:57 -0400 -Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch - - ---- - SPECS/tpm2-tools.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/tpm2-tools.spec b/SPECS/tpm2-tools.spec -index 935580d..12aa6a0 100644 ---- a/SPECS/tpm2-tools.spec -+++ b/SPECS/tpm2-tools.spec -@@ -1,6 +1,6 @@ - Name: tpm2-tools - Version: 3.0.4 --Release: 2%{?dist} -+Release: 2.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A TPM2.0 testing tool build upon TPM2.0-TSS - - License: BSD --- -2.7.4 - diff --git a/security/tpm2-tools/centos/meta_patches/PATCH_ORDER b/security/tpm2-tools/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 2bcda5ed9..000000000 --- a/security/tpm2-tools/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -disable-socket-mode-TCTI.patch -0001-Update-package-versioning-for-TIS-format.patch diff --git a/security/tpm2-tools/centos/meta_patches/disable-socket-mode-TCTI.patch b/security/tpm2-tools/centos/meta_patches/disable-socket-mode-TCTI.patch deleted file mode 100644 index 26949b7fe..000000000 --- a/security/tpm2-tools/centos/meta_patches/disable-socket-mode-TCTI.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e54d19f53dcd78d0aaceb30d1fb89eebefc1c066 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 17:30:56 -0400 -Subject: [PATCH 1/2] WRS: disable-socket-mode-TCTI.patch - ---- - SPECS/tpm2-tools.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/tpm2-tools.spec b/SPECS/tpm2-tools.spec -index 308ecfa..935580d 100644 ---- a/SPECS/tpm2-tools.spec -+++ b/SPECS/tpm2-tools.spec -@@ -43,7 +43,7 @@ tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss. - ./bootstrap - - %build --%configure --prefix=/usr --disable-static --disable-silent-rules -+%configure --prefix=/usr --disable-static --disable-silent-rules --without-tcti-socket - %make_build - - %install --- -2.7.4 - diff --git a/security/tpm2-tools/centos/srpm_path b/security/tpm2-tools/centos/srpm_path deleted file mode 100644 index a145dab60..000000000 --- a/security/tpm2-tools/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/tpm2-tools-3.0.4-2.el7.src.rpm diff --git a/security/tss2/centos/build_srpm.data b/security/tss2/centos/build_srpm.data deleted file mode 100644 index f4dbbd33d..000000000 --- a/security/tss2/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/tss2-930.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/security/tss2/centos/tss2.spec b/security/tss2/centos/tss2.spec deleted file mode 100644 index de16dde30..000000000 --- a/security/tss2/centos/tss2.spec +++ /dev/null @@ -1,81 +0,0 @@ -# -# Spec file for IBM's TSS for the TPM 2.0 -# -%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} - -Name: tss2 -Version: 930 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: IBM's TCG Software Stack (TSS) for TPM 2.0 and related utilities - -Group: Applications/System -License: BSD -Source0: %{name}-%{version}.tar.gz - -# tss2 does not work on Big Endian arch yet -ExcludeArch: ppc64 s390x -BuildRequires: openssl-devel -Requires: openssl - -%description -TSS2 is a user space Trusted Computing Group's Software Stack (TSS) for -TPM 2.0. It implements the functionality equivalent to the TCG TSS -working group's ESAPI, SAPI, and TCTI layers (and perhaps more) but with -a hopefully far simpler interface. - -It comes with about 80 "TPM tools" that can be used for rapid prototyping, -education and debugging. - -%package devel -Summary: Development libraries and headers for IBM's TSS 2.0 -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -Development libraries and headers for IBM's TSS 2.0. You will need this in -order to build TSS 2.0 applications. - -%prep -%setup -q -c %{name}-%{version} - -%build -# nonstandard variable names are used in place of CFLAGS and LDFLAGS -pushd %{name}-%{version}/utils -CCFLAGS="%{optflags}" \ -LNFLAGS="%{__global_ldflags}" \ -make %{?_smp_mflags} -popd - -%install -# Prefix for namespacing -BIN_PREFIX=tss2_ -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{_libdir} -mkdir -p %{buildroot}/%{_includedir}/%{name}/ -pushd %{name}-%{version}/utils -# Pick out executables and copy with namespacing -for f in *; do - if [[ -x $f && -f $f && ! $f =~ .*\..* ]]; then - cp -p $f %{buildroot}/%{_bindir}/${BIN_PREFIX}$f - fi; -done -cp -p *.so %{buildroot}/%{_libdir} -cp -p %{name}/*.h %{buildroot}/%{_includedir}/%{name}/ -popd - -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - -%files -%license %{name}-%{version}/LICENSE -%{_bindir}/tss2* -%{_libdir}/libtss.so* - -%files devel -%{_includedir}/%{name} -%{_libdir}/libtss.so -#%doc ibmtss.doc - -%changelog -* Thu Feb 16 2017 Kam Nasim - 930-1 -- initial RPM for tss v930 tarball (released: 2017-01-27) diff --git a/storage-drivers/python-3parclient/centos/build_srpm.data b/storage-drivers/python-3parclient/centos/build_srpm.data deleted file mode 100644 index 921cba905..000000000 --- a/storage-drivers/python-3parclient/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -SRC_DIR=$CGCS_BASE/git/python-3parclient -TIS_BASE_SRCREV=d0e6de393cecc765eba70312c466e91405fb2a69 -TIS_PATCH_VER=GITREVCOUNT+PKG_GITREVCOUNT diff --git a/storage-drivers/python-3parclient/centos/python-3parclient.spec b/storage-drivers/python-3parclient/centos/python-3parclient.spec deleted file mode 100644 index 395019f78..000000000 --- a/storage-drivers/python-3parclient/centos/python-3parclient.spec +++ /dev/null @@ -1,49 +0,0 @@ -%define name python-3parclient -%define version 4.2.3 -Summary: HPE 3PAR HTTP REST Client -Name: %{name} -Version: %{version} -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Source0: %{name}-%{version}.tar.gz -License: Apache License, Version 2.0 -Group: Development/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -Prefix: %{_prefix} -BuildArch: noarch -Vendor: Walter A. Boring IV -Url: http://packages.python.org/python-3parclient - -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python2-pip -BuildRequires: python2-wheel - -%description -HPE 3PAR HTTP REST Client - -%prep -%setup -q - -%build -%{__python2} setup.py build -%py2_build_wheel - -%install -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --record=INSTALLED_FILES -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -%clean -rm -rf %{buildroot} - -%files -f INSTALLED_FILES -%defattr(-,root,root) - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/wheels/* diff --git a/storage-drivers/python-lefthandclient/centos/build_srpm.data b/storage-drivers/python-lefthandclient/centos/build_srpm.data deleted file mode 100644 index 64d373464..000000000 --- a/storage-drivers/python-lefthandclient/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -SRC_DIR=$CGCS_BASE/git/python-lefthandclient -TIS_BASE_SRCREV=db9773f0f97c5af04da89fcb7dca2a6ddf8d5e4a -TIS_PATCH_VER=GITREVCOUNT+PKG_GITREVCOUNT diff --git a/storage-drivers/python-lefthandclient/centos/python-lefthandclient.spec b/storage-drivers/python-lefthandclient/centos/python-lefthandclient.spec deleted file mode 100644 index e615841d8..000000000 --- a/storage-drivers/python-lefthandclient/centos/python-lefthandclient.spec +++ /dev/null @@ -1,51 +0,0 @@ -%define name python-lefthandclient -%define version 2.1.0 -%define release 1 - -Summary: HPE LeftHand/StoreVirtual HTTP REST Client -Name: %{name} -Version: %{version} -Release: 0%{?_tis_dist}.%{tis_patch_ver} -Source0: %{name}-%{version}.tar.gz -License: Apache License, Version 2.0 -Group: Development/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -Prefix: %{_prefix} -BuildArch: noarch -Vendor: Kurt Martin -Url: http://packages.python.org/python-lefthandclient - -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python2-pip -BuildRequires: python2-wheel - -%description -HPE LeftHand/StoreVirtual HTTP REST Client - -%prep -%setup -q - -%build -%{__python2} setup.py build -%py2_build_wheel - -%install -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --record=INSTALLED_FILES -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -%clean -rm -rf %{buildroot} - -%files -f INSTALLED_FILES -%defattr(-,root,root) - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/wheels/* diff --git a/storage-drivers/trident-installer/centos/build_srpm.data b/storage-drivers/trident-installer/centos/build_srpm.data deleted file mode 100644 index 1ae3c8231..000000000 --- a/storage-drivers/trident-installer/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$CGCS_BASE/downloads/trident-installer-22.07.0.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/storage-drivers/trident-installer/centos/trident-installer.spec b/storage-drivers/trident-installer/centos/trident-installer.spec deleted file mode 100644 index e0fbbf06c..000000000 --- a/storage-drivers/trident-installer/centos/trident-installer.spec +++ /dev/null @@ -1,33 +0,0 @@ -Summary: trident-installer -Name: trident-installer -Version: 22.07.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: https://github.com/NetApp/trident/releases/download/v22.07.0/trident-installer-22.07.0.tar.gz -Source0: %{name}-%{version}.tar.gz - -Requires: nfs-utils - -%description -Netapp Trident-installer -https://docs.netapp.com/us-en/trident/trident-rn.html - -%define debug_package %{nil} - -%prep -%setup -q - -%build - -%install -mkdir -p %{buildroot}/%{_bindir} -install -m 755 tridentctl %{buildroot}/%{_bindir}/tridentctl - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root,-) -%{_bindir}/tridentctl diff --git a/tools/kexec-tools/centos/build_srpm.data b/tools/kexec-tools/centos/build_srpm.data deleted file mode 100644 index 2dda78eb2..000000000 --- a/tools/kexec-tools/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -COPY_LIST=" - $STX_BASE/downloads/kexec-tools-2.0.21.tar.xz \ - $STX_BASE/downloads/makedumpfile-1.6.9.tar.gz \ - $STX_BASE/downloads/eppic_050615.tar.gz \ - $STX_BASE/downloads/kdump-anaconda-addon-003-29-g4c517c5.tar.gz \ - $PKG_BASE/files/* - " -TIS_PATCH_VER=PKG_GITREVCOUNT+1 diff --git a/tools/kexec-tools/centos/kexec-tools.spec b/tools/kexec-tools/centos/kexec-tools.spec deleted file mode 100644 index a372ccdd1..000000000 --- a/tools/kexec-tools/centos/kexec-tools.spec +++ /dev/null @@ -1,325 +0,0 @@ -Name: kexec-tools -Version: 2.0.21 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -License: GPLv2 -Group: Applications/System -Summary: The kexec/kdump userspace component. -Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz -Source1: kdumpctl -Source2: kdump.sysconfig -Source3: kdump.sysconfig.x86_64 -Source7: mkdumprd -Source8: kdump.conf -Source9: makedumpfile-1.6.9.tar.gz -Source10: kexec-kdump-howto.txt -Source12: mkdumprd.8 -Source14: 98-kexec.rules -Source15: kdump.conf.5 -Source16: kdump.service -Source19: eppic_050615.tar.gz -Source20: kdump-lib.sh -Source21: kdump-in-cluster-environment.txt -Source22: supported-kdump-targets.txt -Source23: kdump-dep-generator.sh -Source24: kdump-lib-initramfs.sh -Source25: kdump-anaconda-addon-003-29-g4c517c5.tar.gz -Source28: kdumpctl.8 - -####################################### -# These are sources for mkdumpramfs -# Which is currently in development -####################################### -Source100: dracut-kdump.sh -Source101: dracut-module-setup.sh -Source102: dracut-monitor_dd_progress -Source103: dracut-kdump-error-handler.sh -Source104: dracut-kdump-emergency.service -Source105: dracut-kdump-error-handler.service -Source106: dracut-kdump-capture.service -Source107: dracut-kdump-emergency.target - -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -Requires(pre): coreutils sed zlib -Requires: dracut >= 033-552 -Requires: dracut-network >= 033-552 -Requires: ethtool -BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel -BuildRequires: pkgconfig intltool gettext -BuildRequires: systemd-units -%ifarch %{ix86} x86_64 -Obsoletes: diskdumputils netdump -%endif - - -#START INSERT - -# -# Patches 0 through 100 are meant for x86 kexec-tools enablement -# - -# -# Patches 101 through 200 are meant for x86_64 kexec-tools enablement -# - -# -# Patches 601 through 700 are meant for arm64 kexec-tools enablement -# -# -# Patches 701 onward are generic patches -# - -# -# Patch 701 through 800 are meant for kdump anaconda addon -# - -%description -kexec-tools provides /sbin/kexec binary that facilitates a new -kernel to boot using the kernel's kexec feature either on a -normal or a panic reboot. This package contains the /sbin/kexec -binary and ancillary utilities that together form the userspace -component of the kernel's kexec feature. - -%ifarch %{ix86} x86_64 -%package eppic -Requires: %{name} = %{version}-%{release} -Summary: Additional eppic_makedumpfile.so shared object -Group: Applications/System - -%description eppic -The eppic_makedumpfile.so shared object is loaded by the -"makedumpfile --eppic" option, and is used to erase sensitive -or confidential kernel data from a dumpfile. -%endif - -%package anaconda-addon -Summary: Kdump configration anaconda addon -Requires: anaconda >= 19.31.85 -%description anaconda-addon -Kdump anaconda addon - -%prep -%setup -q - -mkdir -p -m755 kcp -tar -z -x -v -f %{SOURCE9} -tar -z -x -v -f %{SOURCE19} -tar -z -x -v -f %{SOURCE25} - - - - -%build -%configure \ - --sbindir=/sbin -rm -f kexec-tools.spec.in -# setup the docs -cp %{SOURCE10} . -cp %{SOURCE21} . -cp %{SOURCE22} . - -make -%ifarch %{ix86} x86_64 -make -C eppic/libeppic -make -C makedumpfile-1.6.9 LINKTYPE=dynamic USELZO=on USESNAPPY=on -make -C makedumpfile-1.6.9 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so -%endif -make -C kdump-anaconda-addon/po - -%install -mkdir -p -m755 $RPM_BUILD_ROOT/sbin -mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig -mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash -mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man8/ -mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man5/ -mkdir -p -m755 $RPM_BUILD_ROOT%{_docdir} -mkdir -p -m755 $RPM_BUILD_ROOT%{_datadir}/kdump -mkdir -p -m755 $RPM_BUILD_ROOT%{_udevrulesdir} -mkdir -p $RPM_BUILD_ROOT%{_unitdir} -mkdir -p -m755 $RPM_BUILD_ROOT%{_bindir} -mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir} -mkdir -p -m755 $RPM_BUILD_ROOT%{_prefix}/lib/kdump -install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/kdumpctl - -install -m 755 build/sbin/kexec $RPM_BUILD_ROOT/sbin/kexec -install -m 755 build/sbin/vmcore-dmesg $RPM_BUILD_ROOT/sbin/vmcore-dmesg -install -m 644 build/man/man8/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -install -m 644 build/man/man8/vmcore-dmesg.8 $RPM_BUILD_ROOT%{_mandir}/man8/ - -SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu} -[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_arch} -[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig -install -m 644 $SYSCONFIG $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump - -install -m 755 %{SOURCE7} $RPM_BUILD_ROOT/sbin/mkdumprd -install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/kdump.conf -install -m 644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/kexec.8 -install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8 -install -m 644 %{SOURCE28} $RPM_BUILD_ROOT%{_mandir}/man8/kdumpctl.8 -install -m 755 %{SOURCE20} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib.sh -install -m 755 %{SOURCE24} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib-initramfs.sh -install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_udevrulesdir}/98-kexec.rules -install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man5/kdump.conf.5 -install -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/kdump.service -install -m 755 -D %{SOURCE23} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh - -%ifarch %{ix86} x86_64 -install -m 755 makedumpfile-1.6.9/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile -install -m 644 makedumpfile-1.6.9/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz -install -m 644 makedumpfile-1.6.9/makedumpfile.conf.5.gz $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5.gz -install -m 644 makedumpfile-1.6.9/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample -install -m 755 makedumpfile-1.6.9/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so -mkdir -p $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/ -install -m 644 makedumpfile-1.6.9/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/ -%endif -make -C kdump-anaconda-addon install DESTDIR=$RPM_BUILD_ROOT -%find_lang kdump-anaconda-addon - -%define remove_dracut_prefix() %(echo -n %1|sed 's/.*dracut-//g') - -# deal with dracut modules -mkdir -p -m755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase -cp %{SOURCE100} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE100}} -cp %{SOURCE101} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE101}} -cp %{SOURCE102} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE102}} -cp %{SOURCE103} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE103}} -cp %{SOURCE104} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE104}} -cp %{SOURCE105} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE105}} -cp %{SOURCE106} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE106}} -cp %{SOURCE107} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE107}} -chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE100}} -chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE101}} - - -%define dracutlibdir %{_prefix}/lib/dracut -#and move the custom dracut modules to the dracut directory -mkdir -p $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/ -mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/ - -%post -# Initial installation -%systemd_post kdump.service - -touch /etc/kdump.conf -# This portion of the script is temporary. Its only here -# to fix up broken boxes that require special settings -# in /etc/sysconfig/kdump. It will be removed when -# These systems are fixed. - -if [ -d /proc/bus/mckinley ] -then - # This is for HP zx1 machines - # They require machvec=dig on the kernel command line - sed -e's/\(^KDUMP_COMMANDLINE_APPEND.*\)\("$\)/\1 machvec=dig"/' \ - /etc/sysconfig/kdump > /etc/sysconfig/kdump.new - mv /etc/sysconfig/kdump.new /etc/sysconfig/kdump -elif [ -d /proc/sgi_sn ] -then - # This is for SGI SN boxes - # They require the --noio option to kexec - # since they don't support legacy io - sed -e's/\(^KEXEC_ARGS.*\)\("$\)/\1 --noio"/' \ - /etc/sysconfig/kdump > /etc/sysconfig/kdump.new - mv /etc/sysconfig/kdump.new /etc/sysconfig/kdump -fi - - -%postun -%systemd_postun_with_restart kdump.service - -%preun -# Package removal, not upgrade -%systemd_preun kdump.service - -%triggerun -- kexec-tools < 2.0.2-3 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply kdump -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save kdump >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del kdump >/dev/null 2>&1 || : -/bin/systemctl try-restart kdump.service >/dev/null 2>&1 || : - - -%triggerin -- kernel-kdump -touch %{_sysconfdir}/kdump.conf - - -%triggerpostun -- kernel kernel-xen kernel-debug kernel-PAE kernel-kdump -# List out the initrds here, strip out version nubmers -# and search for corresponding kernel installs, if a kernel -# is not found, remove the corresponding kdump initrd - -#start by getting a list of all the kdump initrds -MY_ARCH=`uname -m` -IMGDIR=/boot - -for i in `ls $IMGDIR/initramfs*kdump.img 2>/dev/null` -do - KDVER=`echo $i | sed -e's/^.*initramfs-//' -e's/kdump.*$//'` - if [ ! -e $IMGDIR/vmlinuz-$KDVER ] - then - # We have found an initrd with no corresponding kernel - # so we should be able to remove it - rm -f $i - fi -done - -%files -/sbin/kexec -/sbin/vmcore-dmesg -%ifarch %{ix86} x86_64 -/sbin/makedumpfile -%endif -/sbin/mkdumprd -%{_bindir}/* -%{_datadir}/kdump -%{_prefix}/lib/kdump -%ifarch %{ix86} x86_64 -%{_sysconfdir}/makedumpfile.conf.sample -%endif -%config(noreplace,missingok) %{_sysconfdir}/sysconfig/kdump -%config(noreplace,missingok) %verify(not mtime) %{_sysconfdir}/kdump.conf -%config %{_udevrulesdir} -%{dracutlibdir}/modules.d/* -%dir %{_localstatedir}/crash -%{_mandir}/man8/kdumpctl.8.gz -%{_mandir}/man8/kexec.8.gz -%ifarch %{ix86} x86_64 -%{_mandir}/man8/makedumpfile.8.gz -%endif -%{_mandir}/man8/mkdumprd.8.gz -%{_mandir}/man8/vmcore-dmesg.8.gz -%{_mandir}/man5/* -%{_unitdir}/kdump.service -%{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh -%doc News -%doc COPYING -%doc TODO -%doc kexec-kdump-howto.txt -%doc kdump-in-cluster-environment.txt -%doc supported-kdump-targets.txt - -%ifarch %{ix86} x86_64 -%files eppic -%{_libdir}/eppic_makedumpfile.so -/usr/share/makedumpfile/eppic_scripts/ -%endif - -%files anaconda-addon -f kdump-anaconda-addon.lang -%{_datadir}/anaconda/addons/com_redhat_kdump -%{_datadir}/icons/hicolor/scalable/apps/kdump.svg -%doc - -%changelog -* Fri Jul 30 2021 M. Vefa Bicakci 2.0.21-1.tis.1 -- Adapt to kexec-tools 2.0.21 for v5.10 kernel, while attempting to keep - compatibility with CentOS 7. -- Use makedumpfile 1.6.9 for compatibility with the v5.10 kernel. -- Remove aarch64, PowerPC, ia64 and s390-related spec file sections. -- Trim the spec file changelog. - -* Thu Aug 30 2018 Pingfan Liu 2.0.15-21 -- kexec/ppc64: add support to parse ibm, dynamic-memory-v2 diff --git a/tools/libbpf/centos/build_srpm.data b/tools/libbpf/centos/build_srpm.data deleted file mode 100644 index 13c6948c2..000000000 --- a/tools/libbpf/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="$STX_BASE/downloads/libbpf-0.5.0.tar.gz" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/tools/libbpf/centos/libbpf.spec b/tools/libbpf/centos/libbpf.spec deleted file mode 100644 index 34290a8b7..000000000 --- a/tools/libbpf/centos/libbpf.spec +++ /dev/null @@ -1,109 +0,0 @@ -%global githubname libbpf -%global githubver 0.5.0 -%global githubfull %{githubname}-%{githubver} - -Name: %{githubname} -Version: %{githubver} -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: Libbpf library - -License: LGPLv2 or BSD -URL: https://github.com/%{githubname}/%{githubname} -Source: %{githubname}-%{githubver}.tar.gz -BuildRequires: gcc elfutils-libelf-devel elfutils-devel -BuildRequires: make -%if 0%{?rhel} == 7 -BuildRequires: devtoolset-8-build -BuildRequires: devtoolset-8-binutils -BuildRequires: devtoolset-8-gcc -BuildRequires: devtoolset-8-make -%endif - -# This package supersedes libbpf from kernel-tools, -# which has default Epoch: 0. By having Epoch: > 0 -# this libbpf will take over smoothly -Epoch: 2 - -%description -A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its -supporting header files. The version of the package reflects the version of -ABI. - -%package devel -Summary: Development files for %{name} -Requires: %{name} = 2:%{version}-%{release} -Requires: kernel-headers >= 5.10.0 -Requires: zlib - -%description devel -The %{name}-devel package contains libraries header files for -developing applications that use %{name} - -%package static -Summary: Static library for libbpf development -Requires: %{name}-devel = 2:%{version}-%{release} - -%description static -The %{name}-static package contains static library for -developing applications that use %{name} - -%define _lto_cflags %{nil} - -%global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC" LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1 - -%prep -%if 0%{?rhel} == 7 -source scl_source enable devtoolset-8 || : -%endif - -%autosetup -n %{githubfull} - -%build -%if 0%{?rhel} == 7 -source scl_source enable devtoolset-8 || : -%endif - -%make_build -C ./src %{make_flags} - -%install -%if 0%{?rhel} == 7 -source scl_source enable devtoolset-8 || : -%endif - -%make_install -C ./src %{make_flags} - -%files -%{_libdir}/libbpf.so.%{version} -%{_libdir}/libbpf.so.0 - -%files devel -%{_libdir}/libbpf.so -%{_includedir}/bpf/ -%{_libdir}/pkgconfig/libbpf.pc - -%files static -%{_libdir}/libbpf.a - -%changelog -* Wed Oct 27 2021 M. Vefa Bicakci - 2:0.5.0-1.tis -- Adapt to StarlingX. The base spec file was acquired from: - https://src.fedoraproject.org/rpms/libbpf/blob/main/f/libbpf.spec -- Change the kernel-headers requirement from 5.14.0 to 5.10.0. This should - not be an issue, as libbpf advertises itself to be kernel-version agnostic. -- Add build-time dependency on devtoolset-8 and make the build use it. -- Trim all changelog entries belonging to years before 2021. - -* Fri Sep 10 2021 Jiri Olsa - 2:0.5.0-1 -- release 0.5.0-1 - -* Thu Jul 22 2021 Fedora Release Engineering - 2:0.4.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed May 26 2021 Jiri Olsa - 2:0.4.0-1 -- release 0.4.0-1 - -* Tue Jan 26 2021 Fedora Release Engineering - 2:0.3.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 22 2021 Jiri Olsa - 2:0.3.0-1 -- release 0.3.0-1 diff --git a/virt/cloud-init/centos/build_srpm.data b/virt/cloud-init/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/virt/cloud-init/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/virt/cloud-init/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/virt/cloud-init/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 1b6a0f238..000000000 --- a/virt/cloud-init/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9a97a6ade7470e525b2013b85782b887a96b7489 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 7 Nov 2017 15:25:12 -0500 -Subject: [PATCH] Update-package-versioning-for-TIS-format - ---- - SPECS/cloud-init.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec -index 390ed96..ef82dd1 100644 ---- a/SPECS/cloud-init.spec -+++ b/SPECS/cloud-init.spec -@@ -7,7 +7,7 @@ - - Name: cloud-init - Version: 0.7.9 --Release: 24%{?dist}.1 -+Release: 24.el7.centos.1%{?_tis_dist}.%{tis_patch_ver} - Summary: Cloud instance init scripts - - Group: System Environment/Base --- -2.7.4 - diff --git a/virt/cloud-init/centos/meta_patches/PATCH_ORDER b/virt/cloud-init/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index d329ace03..000000000 --- a/virt/cloud-init/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -spec-include-tis-changes.patch diff --git a/virt/cloud-init/centos/meta_patches/spec-include-tis-changes.patch b/virt/cloud-init/centos/meta_patches/spec-include-tis-changes.patch deleted file mode 100644 index 9fddda9fd..000000000 --- a/virt/cloud-init/centos/meta_patches/spec-include-tis-changes.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 1fa41f1116464169399c683abd9920c7bbf28a5b Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Wed, 8 Nov 2017 11:13:02 -0500 -Subject: [PATCH] spec-include-tis-changes - ---- - SPECS/cloud-init.spec | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec -index ef82dd1..022e779 100644 ---- a/SPECS/cloud-init.spec -+++ b/SPECS/cloud-init.spec -@@ -69,7 +69,10 @@ Patch41: ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch - # For bz#1578702 - cloud-init-0.7.9-9.el7_4.6 breaks IPv4/IPv6 dual-stack EC2 instances in AWS [rhel-7.5.z] - Patch42: ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch - --Patch9999: cloud-init-add-centos-os.patch -+Patch0999: cloud-init-add-centos-os.patch -+ -+# WRS patches -+Patch2000: cloud-init-interactive-parted.patch - - # Deal with noarch -> arch - # https://bugzilla.redhat.com/show_bug.cgi?id=1067089 --- -2.7.4 - diff --git a/virt/cloud-init/centos/patches/cloud-init-interactive-parted.patch b/virt/cloud-init/centos/patches/cloud-init-interactive-parted.patch deleted file mode 100644 index facd62471..000000000 --- a/virt/cloud-init/centos/patches/cloud-init-interactive-parted.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 70b90db2364256fe8ba7e368cbd96cd53b246cb3 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Wed, 8 Nov 2017 11:02:42 -0500 -Subject: [PATCH] cloud-init-interactive-parted - ---- - cloudinit/config/cc_growpart.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py -index 832bb3f..71c4f7f 100644 ---- a/cloudinit/config/cc_growpart.py -+++ b/cloudinit/config/cc_growpart.py -@@ -182,7 +182,7 @@ class ResizeGpart(object): - - before = get_size(partdev) - try: -- util.subp(["gpart", "resize", "-i", partnum, diskdev]) -+ util.subp(["resizepart.sh", diskdev, partnum]) - except util.ProcessExecutionError as e: - util.logexc(LOG, "Failed: gpart resize -i %s %s", partnum, diskdev) - raise ResizeFailedException(e) --- -1.8.3.1 - diff --git a/virt/cloud-init/centos/srpm_path b/virt/cloud-init/centos/srpm_path deleted file mode 100644 index 8947c1143..000000000 --- a/virt/cloud-init/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/cloud-init-0.7.9-24.el7.centos.1.src.rpm diff --git a/virt/kvm-timer-advance/centos/build_srpm.data b/virt/kvm-timer-advance/centos/build_srpm.data deleted file mode 100644 index b0740891c..000000000 --- a/virt/kvm-timer-advance/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR="files" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/virt/kvm-timer-advance/centos/kvm-timer-advance.spec b/virt/kvm-timer-advance/centos/kvm-timer-advance.spec deleted file mode 100644 index 6a7562917..000000000 --- a/virt/kvm-timer-advance/centos/kvm-timer-advance.spec +++ /dev/null @@ -1,41 +0,0 @@ -Summary: StarlingX KVM Timer Advance Package -Name: kvm-timer-advance -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: GPLv2 -Group: base -Packager: StarlingX -URL: unknown - -Source: %name-%version.tar.gz - -BuildArch: noarch - -BuildRequires: systemd-devel - -Requires: qemu-kvm-tools-ev -Requires: systemd - - -%description -StarlingX KVM Timer Advance Package - -%define debug_package %{nil} - -%prep - -%setup - -%build - -%install -install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} -install -p -D -m 755 setup_kvm_timer_advance.sh %{buildroot}%{_bindir}/setup_kvm_timer_advance.sh -install -p -D -m 444 kvm_timer_advance_setup.service %{buildroot}%{_unitdir}/kvm_timer_advance_setup.service - -%files -%defattr(-,root,root,-) -%doc LICENSE -%{_bindir}/setup_kvm_timer_advance.sh -%{_unitdir}/kvm_timer_advance_setup.service -%dir %{_sysconfdir}/%{name} diff --git a/virt/libvirt-python/centos/build_srpm.data b/virt/libvirt-python/centos/build_srpm.data deleted file mode 100644 index 69abd61b8..000000000 --- a/virt/libvirt-python/centos/build_srpm.data +++ /dev/null @@ -1 +0,0 @@ -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/virt/libvirt-python/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/virt/libvirt-python/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index f899a8ff7..000000000 --- a/virt/libvirt-python/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 91c0943613fa00e7fd446759899fa6ad534f390f Mon Sep 17 00:00:00 2001 -Message-Id: <91c0943613fa00e7fd446759899fa6ad534f390f.1536700525.git.Jim.Somerville@windriver.com> -From: Jim Somerville -Date: Tue, 15 Aug 2017 14:04:06 -0400 -Subject: [PATCH 1/1] Update package versioning for TIS format - -Signed-off-by: Jim Somerville ---- - SPECS/libvirt-python.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/libvirt-python.spec b/SPECS/libvirt-python.spec -index 8a9ac2f..475bb0a 100644 ---- a/SPECS/libvirt-python.spec -+++ b/SPECS/libvirt-python.spec -@@ -34,7 +34,7 @@ - Summary: The libvirt virtualization API python2 binding - Name: libvirt-python - Version: 4.7.0 --Release: 1%{?dist}%{?extra_release} -+Release: 1%{?_tis_dist}.%{tis_patch_ver} - Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz - Url: http://libvirt.org - License: LGPLv2+ --- -1.8.3.1 - diff --git a/virt/libvirt-python/centos/meta_patches/0002-Build-python-wheel.patch b/virt/libvirt-python/centos/meta_patches/0002-Build-python-wheel.patch deleted file mode 100644 index d76c6145c..000000000 --- a/virt/libvirt-python/centos/meta_patches/0002-Build-python-wheel.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 8feb14092d9db4aacd907bd8f76d90931f537eda Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 17 Oct 2018 15:25:33 -0400 -Subject: [PATCH 2/2] Build python wheel - ---- - SPECS/libvirt-python.spec | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/SPECS/libvirt-python.spec b/SPECS/libvirt-python.spec -index 475bb0a..4d7fced 100644 ---- a/SPECS/libvirt-python.spec -+++ b/SPECS/libvirt-python.spec -@@ -36,6 +36,7 @@ Name: libvirt-python - Version: 4.7.0 - Release: 1%{?_tis_dist}.%{tis_patch_ver} - Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz -+Patch0: 0001-Fix-setup-import-to-support-building-wheel.patch - Url: http://libvirt.org - License: LGPLv2+ - BuildRequires: libvirt-devel == %{version} -@@ -44,10 +45,14 @@ BuildRequires: libvirt-devel == %{version} - BuildRequires: python2-devel - BuildRequires: python2-nose - BuildRequires: python2-lxml -+BuildRequires: python2-pip -+BuildRequires: python2-wheel - %else - BuildRequires: python-devel - BuildRequires: python-nose - BuildRequires: python-lxml -+BuildRequires: python2-pip -+BuildRequires: python2-wheel - %endif - %endif - %if %{with_python3} -@@ -106,6 +111,7 @@ of recent versions of Linux (and other OSes). - - %prep - %setup -q -+%patch0 -p1 - - # Unset execute bit for example scripts; it can introduce spurious - # RPM dependencies, like /usr/bin/python which can pull in python2 -@@ -120,6 +126,7 @@ exit 1 - - %if %{with_python2} - CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build -+CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py bdist_wheel - %endif - %if %{with_python3} - CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build -@@ -128,6 +135,8 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build - %install - %if %{with_python2} - %{__python2} setup.py install --skip-build --root=%{buildroot} -+mkdir -p $RPM_BUILD_ROOT/wheels -+install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - %endif - %if %{with_python3} - %{__python3} setup.py install --skip-build --root=%{buildroot} -@@ -166,4 +175,13 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build - %{python3_sitearch}/*egg-info - %endif - -+%package wheels -+Summary: %{name} wheels -+ -+%description wheels -+Contains python wheels for %{name} -+ -+%files wheels -+/wheels/* -+ - %changelog --- -1.8.3.1 - diff --git a/virt/libvirt-python/centos/meta_patches/PATCH_ORDER b/virt/libvirt-python/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 90843c6f5..000000000 --- a/virt/libvirt-python/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-Build-python-wheel.patch diff --git a/virt/libvirt-python/centos/patches/0001-Fix-setup-import-to-support-building-wheel.patch b/virt/libvirt-python/centos/patches/0001-Fix-setup-import-to-support-building-wheel.patch deleted file mode 100644 index f931d0ebd..000000000 --- a/virt/libvirt-python/centos/patches/0001-Fix-setup-import-to-support-building-wheel.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6c1041d2683f472dc645a44351b5938676e89738 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Wed, 17 Oct 2018 15:26:37 -0400 -Subject: [PATCH] Fix setup import to support building wheel - ---- - setup.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 964a40e..263266d 100755 ---- a/setup.py -+++ b/setup.py -@@ -1,6 +1,7 @@ - #!/usr/bin/env python - --from distutils.core import setup, Extension, Command -+from setuptools import setup -+from distutils.core import Extension, Command - from distutils.command.build import build - from distutils.command.clean import clean - from distutils.command.sdist import sdist --- -1.8.3.1 - diff --git a/virt/libvirt-python/centos/srpm_path b/virt/libvirt-python/centos/srpm_path deleted file mode 100644 index 9ab39943d..000000000 --- a/virt/libvirt-python/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/libvirt-python-4.7.0-1.fc28.src.rpm