diff --git a/rpmbuild/ganeti/SOURCES/ganeti-2.16.1-ask-whether-upgrade-without-rpm.patch b/rpmbuild/ganeti/SOURCES/ganeti-2.16.1-ask-whether-upgrade-without-rpm.patch new file mode 100644 index 0000000..4a7e7b4 --- /dev/null +++ b/rpmbuild/ganeti/SOURCES/ganeti-2.16.1-ask-whether-upgrade-without-rpm.patch @@ -0,0 +1,15 @@ +diff -urN ganeti-2.16.1.default/lib/client/gnt_cluster.py ganeti-2.16.1/lib/client/gnt_cluster.py +--- ganeti-2.16.1.default/lib/client/gnt_cluster.py 2019-04-01 15:29:37.000000000 +0900 ++++ ganeti-2.16.1/lib/client/gnt_cluster.py 2020-02-28 14:38:17.455632899 +0900 +@@ -2376,6 +2376,11 @@ + " has to be given") + return 1 + ++ usertext = ("This Ganeti is installed by RPM package, so it is recommended" ++ " to upgrade using RPM. Continue?") ++ if not AskUser(usertext): ++ return 1 ++ + # If we're not told to resume, verify there is no upgrade + # in progress. + if not opts.resume: diff --git a/rpmbuild/ganeti/SPECS/ganeti.spec b/rpmbuild/ganeti/SPECS/ganeti.spec index 3dd8b5b..52724ec 100644 --- a/rpmbuild/ganeti/SPECS/ganeti.spec +++ b/rpmbuild/ganeti/SPECS/ganeti.spec @@ -37,6 +37,7 @@ Patch5: ganeti-2.16.1-fix-new-cluster-node-certificates.patch Patch6: ganeti-2.16.1-default-kvmd-args.patch Patch7: ganeti-2.16.1-rapi-require-authentication.patch Patch8: ganeti-2.16.1-systemd-ambient-capabilities.patch +Patch9: ganeti-2.16.1-ask-whether-upgrade-without-rpm.patch BuildRequires: python BuildRequires: pyOpenSSL @@ -145,6 +146,7 @@ It is not required when the init system used is systemd. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build %configure \ @@ -256,6 +258,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Fri Feb 28 2020 Jun Futagawa - 2.16.1-3 - Add AmbientCapabilities in ganeti-metad.service (#26) +- Add ask whether to continue the upgrade without RPM (#24) * Tue Feb 25 2020 Jun Futagawa - 2.16.1-2 - Add build dependencies for metad and mond and enable them in the build (#25, thanks @ramereth)