From aaca7474d342e7cbc6f47275a9ba4e03e497cd69 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 17 Jan 2012 13:44:33 -0500 Subject: [PATCH] Add patch for regression. --- ...cf4bf26658ebea02cc942ca1c859de8efcc4.patch | 36 +++++++++++++++++++ chkconfig.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch diff --git a/3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch b/3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch new file mode 100644 index 0000000..ab4fdbe --- /dev/null +++ b/3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch @@ -0,0 +1,36 @@ +commit 3c9dcf4bf26658ebea02cc942ca1c859de8efcc4 +Author: Bill Nottingham +Date: Tue Jan 17 11:47:06 2012 -0500 + + If merely passed a service to check enablement, make sure to initialize the current runlevel if it's not specified. (#782152) + +diff --git a/chkconfig.c b/chkconfig.c +index 8a29b89..a01afce 100644 +--- a/chkconfig.c ++++ b/chkconfig.c +@@ -799,8 +799,11 @@ int main(int argc, const char ** argv) { + return !s.levels; + else + return 1; +- } else ++ } else { ++ if (level == -1) ++ level = currentRunlevel(); + return s.currentLevels & (1 << level) ? 0 : 1; ++ } + } else if (!strcmp(state, "on")) { + if (!noRedirectItem) { + forwardSystemd(name, type, "enable"); +diff --git a/po/chkconfig.pot b/po/chkconfig.pot +index 76d8fc1..13f9990 100644 +--- a/po/chkconfig.pot ++++ b/po/chkconfig.pot +@@ -8,7 +8,7 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2012-01-04 14:17-0500\n" ++"POT-Creation-Date: 2012-01-17 11:46-0500\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" diff --git a/chkconfig.spec b/chkconfig.spec index 0e1ba59..7235088 100644 --- a/chkconfig.spec +++ b/chkconfig.spec @@ -1,13 +1,14 @@ Summary: A system tool for maintaining the /etc/rc*.d hierarchy Name: chkconfig Version: 1.3.57 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: http://fedorahosted.org/releases/c/h/chkconfig/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: newt-devel gettext popt-devel Conflicts: initscripts <= 5.30-1 +Patch10: 3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch %description Chkconfig is a basic system utility. It updates and queries runlevel @@ -29,6 +30,7 @@ page), ntsysv configures the current runlevel (5 if you're using X). %prep %setup -q +%patch10 -p1 %build @@ -74,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/ntsysv.8* %changelog +* Tue Jan 17 2012 Bill Nottingham 1.3.57-2 +- fix regression in 'chkconfig ' in 1.3.57 (#782152) + * Wed Jan 04 2012 Bill Nottingham 1.3.57-1 - assorted cleanups to LSB dependency support (#693202 fixed properly, #701573) - fix kill values for LSB-only scripts (#696305, )