app-emulation/ganeti: cleanup unused patches.
authorRobin H. Johnson <robbat2@gentoo.org>
Fri, 6 Jan 2017 20:43:12 +0000 (12:43 -0800)
committerRobin H. Johnson <robbat2@gentoo.org>
Sat, 7 Jan 2017 00:37:35 +0000 (16:37 -0800)
Package-Manager: portage-2.3.2

app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.11-qemu-enable-kvm.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.11-regex-builtin.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.11-useradd.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.12-tests.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.13-daemon-util.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.13-disable-usersgroups-test.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.13-regex-pcre-builtin.patch [deleted file]
app-emulation/ganeti/files/ganeti-2.7-fix-tests.patch [deleted file]

diff --git a/app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch b/app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch
deleted file mode 100644 (file)
index 09b10cd..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
-index 01f2cbb..de4e396 100644
---- a/daemons/daemon-util.in
-+++ b/daemons/daemon-util.in
-@@ -22,18 +22,25 @@ set -e
- @SHELL_ENV_INIT@
--readonly defaults_file="$SYSCONFDIR/default/ganeti"
-+readonly defaults_file="$SYSCONFDIR/conf.d/ganeti"
- # This is a list of all daemons and the order in which they're started. The
- # order is important as there are dependencies between them. On shutdown,
- # they're stopped in reverse order.
--DAEMONS=(
--  ganeti-noded
--  ganeti-masterd
--  ganeti-rapi
--  ganeti-luxid
--  ganeti-kvmd
--  )
-+
-+DAEMONS=( ganeti-noded  ) 
-+
-+_is_master() {
-+        [ -z "${ganeti_master}" ] && ganeti_master="$(gnt-cluster getmaster)"
-+        [ -z "${local_hostname}" ] && local_hostname="$(hostname -f)"
-+        [ "${ganeti_master}" = "${local_hostname}" ]
-+}
-+
-+if _is_master; then
-+  DAEMONS+=( ganeti-masterd ganeti-rapi ganeti-luxid )
-+fi
-+
-+DAEMONS+=( ganeti-kvmd )
- _confd_enabled() {
-   [[ "@CUSTOM_ENABLE_CONFD@" == True ]]
diff --git a/app-emulation/ganeti/files/ganeti-2.11-qemu-enable-kvm.patch b/app-emulation/ganeti/files/ganeti-2.11-qemu-enable-kvm.patch
deleted file mode 100644 (file)
index f2cce0c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
-index b61be65..100aafd 100644
---- a/lib/hypervisor/hv_kvm.py
-+++ b/lib/hypervisor/hv_kvm.py
-@@ -1380,6 +1380,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
-     kvm = hvp[constants.HV_KVM_PATH]
-     kvm_cmd = [kvm]
-     # used just by the vnc server, if enabled
-+    kvm_cmd.extend(["-enable-kvm"])
-     kvm_cmd.extend(["-name", instance.name])
-     kvm_cmd.extend(["-m", instance.beparams[constants.BE_MAXMEM]])
diff --git a/app-emulation/ganeti/files/ganeti-2.11-regex-builtin.patch b/app-emulation/ganeti/files/ganeti-2.11-regex-builtin.patch
deleted file mode 100644 (file)
index 08ef377..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index d70db62..f94043f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -612,8 +612,8 @@ CONFD_PKG=
- # if a new confd dependency is needed, add it here like:
- # AC_GHC_PKG_CHECK([somepkg], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG somepkg"])
- HS_REGEX_PCRE=-DNO_REGEX_PCRE
--AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
--                 [HS_NODEV=1; CONFD_PKG="$CONFD_PKG regex-pcre"])
-+AC_GHC_PKG_CHECK([regex-pcre-builtin], [HS_REGEX_PCRE=],
-+                 [HS_NODEV=1; CONFD_PKG="$CONFD_PKG regex-pcre-builtin"])
- has_confd=False
- if test "$enable_confd" != no; then
diff --git a/app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch b/app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch
deleted file mode 100644 (file)
index 6f90233..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
-index 4d1d7c5..3deeab7 100644
---- a/daemons/daemon-util.in
-+++ b/daemons/daemon-util.in
-@@ -246,10 +246,11 @@ start() {
-   @PKGLIBDIR@/ensure-dirs
-   if type -p start-stop-daemon >/dev/null; then
--    start-stop-daemon --start --quiet --oknodo \
-+    start-stop-daemon --start --quiet \
-       --pidfile $pidfile \
--      --startas $daemonexec \
--      --chuid $usergroup \
-+      --exec $daemonexec \
-+      --user $usergroup \
-+      --wait 300 \
-       -- $args "$@"
-   else
-     # TODO: Find a way to start daemon with a group, until then the group must
-@@ -273,7 +274,7 @@ stop() {
-   local pidfile=$(_daemon_pidfile $name)
-   if type -p start-stop-daemon >/dev/null; then
--    start-stop-daemon --stop --quiet --oknodo --retry 30 \
-+    start-stop-daemon --stop --quiet --retry 30 \
-       --pidfile $pidfile
-   else
-     _ignore_error killproc -p $pidfile $name
-@@ -348,8 +348,8 @@ rotate_logs() {
-   local daemonexec=$(_daemon_executable $name)
-   if type -p start-stop-daemon >/dev/null; then
--    start-stop-daemon --stop --signal HUP --quiet \
--      --oknodo --pidfile $pidfile
-+    start-stop-daemon --signal HUP --quiet \
-+      --pidfile $pidfile
-   else
-     _ignore_error killproc \
-       -p $pidfile \
diff --git a/app-emulation/ganeti/files/ganeti-2.11-useradd.patch b/app-emulation/ganeti/files/ganeti-2.11-useradd.patch
deleted file mode 100644 (file)
index d546921..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 7666d18..a8b6396 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1695,9 +1695,9 @@ tools/users-setup: Makefile $(userspecs)
-         echo 'read confirm'; \
-         echo 'if [ "x$$confirm" != "xy" ]; then exit 0; fi'; \
-         echo 'fi'; \
--        $(AWK) -- '{print "addgroup --system",$$1}' doc/users/groups; \
--        $(AWK) -- '{if (NF > 1) {print "adduser --system --ingroup",$$2,$$1} else {print "adduser --system",$$1}}' doc/users/users; \
--        $(AWK) -- '{print "adduser",$$1,$$2}' doc/users/groupmemberships; \
-+        $(AWK) -- '{print "groupadd --system",$$1}' doc/users/groups; \
-+        $(AWK) -- '{if (NF > 1) {print "useradd --system --gid",$$2,$$1} else {print "useradd --system",$$1}}' doc/users/users; \
-+        $(AWK) -- '{print "usermod --append --groups",$$2,$$1}' doc/users/groupmemberships; \
-       } > $@
-       chmod +x $@
diff --git a/app-emulation/ganeti/files/ganeti-2.12-tests.patch b/app-emulation/ganeti/files/ganeti-2.12-tests.patch
deleted file mode 100644 (file)
index dcf9b51..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/test/hs/Test/Ganeti/Runtime.hs b/test/hs/Test/Ganeti/Runtime.hs
-index b15aa36..a805869 100644
---- a/test/hs/Test/Ganeti/Runtime.hs
-+++ b/test/hs/Test/Ganeti/Runtime.hs
-@@ -126,10 +126,6 @@ case_UsersGroups = do
-     (length py_users) (length users)
-   assertEqual "Mismatch in number of returned users"
-     (length py_groups) (length groups)
--  mapM_ (uncurry (assertEqual "Different result for users")
--        ) $ zip users py_users
--  mapM_ (uncurry (assertEqual "Different result for groups")
--        ) $ zip groups py_groups
- testSuite "Runtime"
-           [ 'case_LogFiles
-diff --git a/test/py/daemon-util_unittest.bash b/test/py/daemon-util_unittest.bash
-index edaeac5..1ee6eae 100755
---- a/test/py/daemon-util_unittest.bash
-+++ b/test/py/daemon-util_unittest.bash
-@@ -45,8 +45,8 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then
-   err "Please update $0, mond enable feature is missing"
- fi
--DAEMONS_LIST="noded wconfd rapi luxid kvmd"
--STOPDAEMONS_LIST="kvmd luxid rapi wconfd noded"
-+DAEMONS_LIST="noded wconfd kvmd"
-+STOPDAEMONS_LIST="kvmd wconfd noded"
- if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then
-   DAEMONS_LIST="$DAEMONS_LIST confd"
-diff --git a/test/py/ganeti.utils.process_unittest.py b/test/py/ganeti.utils.process_unittest.py
-index 7d4cbb6..08752fe 100755
---- a/test/py/ganeti.utils.process_unittest.py
-+++ b/test/py/ganeti.utils.process_unittest.py
-@@ -274,7 +274,7 @@ class TestRunCmd(testutils.GanetiTestCase):
-     result = utils.RunCmd(["/bin/sh", "-c", cmd], timeout=0.2,
-                           noclose_fds=[self.proc_ready_helper.write_fd],
-                           postfork_fn=self.proc_ready_helper.Ready)
--    self.assertEqual(result.exit_code, 0)
-+    self.assertEqual(result.exit_code, None)
-   def testTimeoutKill(self):
-     cmd = ["/bin/sh", "-c", "trap '' TERM; echo >&%d; read < %s" %
-@@ -289,15 +289,6 @@ class TestRunCmd(testutils.GanetiTestCase):
-     self.assert_(status < 0)
-     self.assertEqual(-status, signal.SIGKILL)
--  def testTimeoutOutputAfterTerm(self):
--    cmd = ("trap 'echo sigtermed; exit 1' TERM; echo >&%d; read < %s" %
--           (self.proc_ready_helper.write_fd, self.fifo_file))
--    result = utils.RunCmd(["/bin/sh", "-c", cmd], timeout=0.2,
--                          noclose_fds=[self.proc_ready_helper.write_fd],
--                          postfork_fn=self.proc_ready_helper.Ready)
--    self.assert_(result.failed)
--    self.assertEqual(result.stdout, "sigtermed\n")
--
-   def testListRun(self):
-     """Test list runs"""
-     result = utils.RunCmd(["true"])
diff --git a/app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch b/app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch
deleted file mode 100644 (file)
index 2f6bfa3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
-index 6a47253..d7afd84 100644
---- a/daemons/daemon-util.in
-+++ b/daemons/daemon-util.in
-@@ -31,18 +31,24 @@ set -e
- @SHELL_ENV_INIT@
--readonly defaults_file="$SYSCONFDIR/default/ganeti"
-+readonly defaults_file="$SYSCONFDIR/conf.d/ganeti"
- # This is a list of all daemons and the order in which they're started. The
- # order is important as there are dependencies between them. On shutdown,
- # they're stopped in reverse order.
--DAEMONS=(
--  ganeti-noded
--  ganeti-wconfd
--  ganeti-rapi
--  ganeti-luxid
--  ganeti-kvmd
--  )
-+DAEMONS=( ganeti-noded ) 
-+
-+_is_master() {
-+        [ -z "${GANETI_MASTER}" ] && GANETI_MASTER="$(gnt-cluster getmaster)"
-+        [ -z "${LOCAL_HOSTNAME}" ] && LOCAL_HOSTNAME="$(hostname -f)"
-+        [ "${GANETI_MASTER}" = "${LOCAL_HOSTNAME}" ]
-+}
-+
-+if _is_master; then
-+  DAEMONS+=( ganeti-wconfd ganeti-rapi ganeti-luxid )
-+fi
-+
-+DAEMONS+=( ganeti-kvmd )
- # This is the list of daemons that are loaded on demand; they should only be
- # stopped, not started.
diff --git a/app-emulation/ganeti/files/ganeti-2.13-daemon-util.patch b/app-emulation/ganeti/files/ganeti-2.13-daemon-util.patch
deleted file mode 100644 (file)
index 5d8dedf..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
-index 7636fc9..e93370f 100644
---- a/daemons/daemon-util.in
-+++ b/daemons/daemon-util.in
-@@ -31,25 +31,28 @@ set -e
- @SHELL_ENV_INIT@
--readonly defaults_file="$SYSCONFDIR/default/ganeti"
--
--# This is a list of all daemons and the order in which they're started. The
--# order is important as there are dependencies between them. On shutdown,
--# they're stopped in reverse order.
--DAEMONS=(
--  ganeti-noded
--  ganeti-confd
--  ganeti-wconfd
--  ganeti-rapi
--  ganeti-luxid
--  ganeti-kvmd
--  )
-+readonly defaults_file="$SYSCONFDIR/conf.d/ganeti"
- # This is the list of daemons that are loaded on demand; they should only be
- # stopped, not started.
- ON_DEMAND_DAEMONS=(
-   ganeti-metad
-   )
-+DAEMONS=( ganeti-noded ganeti-confd )
-+
-+_is_master() {
-+        [ -z "${GANETI_MASTER}" ] && GANETI_MASTER="$(gnt-cluster getmaster)"
-+        [ -z "${LOCAL_HOSTNAME}" ] && LOCAL_HOSTNAME="$(hostname -f)"
-+        [ "${GANETI_MASTER}" = "${LOCAL_HOSTNAME}" ]
-+}
-+
-+if _is_master; then
-+  DAEMONS+=( ganeti-wconfd ganeti-rapi ganeti-luxid )
-+else
-+  DAEMONS+=( ganeti-rapi )
-+fi
-+
-+DAEMONS+=( ganeti-kvmd )
- _mond_enabled() {
-   [[ "@CUSTOM_ENABLE_MOND@" == True ]]
diff --git a/app-emulation/ganeti/files/ganeti-2.13-disable-usersgroups-test.patch b/app-emulation/ganeti/files/ganeti-2.13-disable-usersgroups-test.patch
deleted file mode 100644 (file)
index 6e81b51..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git a/test/hs/Test/Ganeti/Runtime.hs b/test/hs/Test/Ganeti/Runtime.hs
-index b15aa36..7aa75ca 100644
---- a/test/hs/Test/Ganeti/Runtime.hs
-+++ b/test/hs/Test/Ganeti/Runtime.hs
-@@ -75,63 +75,7 @@ case_LogFiles = do
-   mapM_ (uncurry (assertEqual "Different result after encoding/decoding")
-         ) $ zip dfiles decoded
---- | Tests the compatibility between Haskell and Python users.
--case_UsersGroups :: Assertion
--case_UsersGroups = do
--  -- note: we don't have here a programatic way to list all users, so
--  -- we harcode some parts of the two (hs/py) lists
--  let daemons = [minBound..maxBound]::[GanetiDaemon]
--      users = map daemonUser daemons
--      groups = map daemonGroup $
--               map DaemonGroup daemons ++ map ExtraGroup [minBound..maxBound]
--  py_stdout <-
--    runPython "from ganeti import constants\n\
--              \from ganeti import serializer\n\
--              \import sys\n\
--              \users = [constants.MASTERD_USER,\n\
--              \         constants.NODED_USER,\n\
--              \         constants.RAPI_USER,\n\
--              \         constants.CONFD_USER,\n\
--              \         constants.WCONFD_USER,\n\
--              \         constants.KVMD_USER,\n\
--              \         constants.LUXID_USER,\n\
--              \         constants.METAD_USER,\n\
--              \         constants.MOND_USER,\n\
--              \        ]\n\
--              \groups = [constants.MASTERD_GROUP,\n\
--              \          constants.NODED_GROUP,\n\
--              \          constants.RAPI_GROUP,\n\
--              \          constants.CONFD_GROUP,\n\
--              \          constants.WCONFD_GROUP,\n\
--              \          constants.KVMD_GROUP,\n\
--              \          constants.LUXID_GROUP,\n\
--              \          constants.METAD_GROUP,\n\
--              \          constants.MOND_GROUP,\n\
--              \          constants.DAEMONS_GROUP,\n\
--              \          constants.ADMIN_GROUP,\n\
--              \         ]\n\
--              \encoded = (users, groups)\n\
--              \print serializer.Dump(encoded)" ""
--    >>= checkPythonResult
--  let deserialised = J.decode py_stdout::J.Result ([String], [String])
--  (py_users, py_groups) <-
--    case deserialised of
--      J.Ok ops -> return ops
--      J.Error msg ->
--        assertFailure ("Unable to decode users/groups: " ++ msg)
--        -- this already raised an expection, but we need it for proper
--        -- types
--         >> fail "Unable to decode users/groups"
--  assertEqual "Mismatch in number of returned users"
--    (length py_users) (length users)
--  assertEqual "Mismatch in number of returned users"
--    (length py_groups) (length groups)
--  mapM_ (uncurry (assertEqual "Different result for users")
--        ) $ zip users py_users
--  mapM_ (uncurry (assertEqual "Different result for groups")
--        ) $ zip groups py_groups
- testSuite "Runtime"
-           [ 'case_LogFiles
--          , 'case_UsersGroups
-           ]
diff --git a/app-emulation/ganeti/files/ganeti-2.13-regex-pcre-builtin.patch b/app-emulation/ganeti/files/ganeti-2.13-regex-pcre-builtin.patch
deleted file mode 100644 (file)
index ced966f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index e014d7a..024e584 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -672,7 +672,7 @@ AC_GHC_PKG_REQUIRE(hinotify)
- AC_GHC_PKG_REQUIRE(Crypto)
- AC_GHC_PKG_REQUIRE(lifted-base)
- AC_GHC_PKG_REQUIRE(lens)
--AC_GHC_PKG_REQUIRE(regex-pcre)
-+AC_GHC_PKG_REQUIRE(regex-pcre-builtin)
- #extra modules for monitoring daemon functionality; also needed for tests
- MONITORING_PKG=
diff --git a/app-emulation/ganeti/files/ganeti-2.7-fix-tests.patch b/app-emulation/ganeti/files/ganeti-2.7-fix-tests.patch
deleted file mode 100644 (file)
index b3b5ad1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/test/py/ganeti.hooks_unittest.py b/test/py/ganeti.hooks_unittest.py
-index 30e00d8..50f91fc 100755
---- a/test/py/ganeti.hooks_unittest.py
-+++ b/test/py/ganeti.hooks_unittest.py
-@@ -192,7 +192,7 @@ class TestHooksRunner(unittest.TestCase):
-       os.symlink("/usr/bin/env", fname)
-       self.torm.append((fname, False))
-       env_snt = {"PHASE": phase}
--      env_exp = "PHASE=%s" % phase
-+      env_exp = "LD_PRELOAD=libsandbox.so\\nPHASE=%s" % phase
-       self.failUnlessEqual(self.hr.RunHooks(self.hpath, phase, env_snt),
-                            [(self._rname(fname), HKR_SUCCESS, env_exp)])
-diff --git a/test/py/ganeti.utils.process_unittest.py b/test/py/ganeti.utils.process_unittest.py
-index 2e36cfa..e0392b2 100755
---- a/test/py/ganeti.utils.process_unittest.py
-+++ b/test/py/ganeti.utils.process_unittest.py
-@@ -341,10 +341,10 @@ class TestRunCmd(testutils.GanetiTestCase):
-   def testResetEnv(self):
-     """Test environment reset functionality"""
-     self.failUnlessEqual(utils.RunCmd(["env"], reset_env=True).stdout.strip(),
--                         "")
-+                         "LD_PRELOAD=libsandbox.so")
-     self.failUnlessEqual(utils.RunCmd(["env"], reset_env=True,
-                                       env={"FOO": "bar",}).stdout.strip(),
--                         "FOO=bar")
-+                         "LD_PRELOAD=libsandbox.so\nFOO=bar")
-   def testNoFork(self):
-     """Test that nofork raise an error"""