diff --git a/.chkconfig.metadata b/.chkconfig.metadata
index 03760aa..40f487a 100644
--- a/.chkconfig.metadata
+++ b/.chkconfig.metadata
@@ -1 +1 @@
-5c96e09a612a60534970a120a58aaaf504311cdb SOURCES/chkconfig-1.3.61.tar.bz2
+4dac4faef46a1b04125483ac56befb7de97d60f6 SOURCES/chkconfig-1.7.2.tar.bz2
diff --git a/.gitignore b/.gitignore
index ae82a06..a65e4f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/chkconfig-1.3.61.tar.bz2
+SOURCES/chkconfig-1.7.2.tar.bz2
diff --git a/SOURCES/0001-chkconfig-use-isXinetdEnabled-instead-of-isOn.patch b/SOURCES/0001-chkconfig-use-isXinetdEnabled-instead-of-isOn.patch
deleted file mode 100644
index 479e892..0000000
--- a/SOURCES/0001-chkconfig-use-isXinetdEnabled-instead-of-isOn.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From a10b9542afeacb6c6bd8dcf2ad82cca005d28aa9 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Thu, 28 Apr 2016 15:03:19 +0200
-Subject: [PATCH] chkconfig: use isXinetdEnabled instead of isOn
-
----
- chkconfig.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chkconfig.c b/chkconfig.c
-index d334bf2..30e110a 100644
---- a/chkconfig.c
-+++ b/chkconfig.c
-@@ -817,7 +817,7 @@ int main(int argc, const char ** argv) {
- 	    if (rc)
- 	       return 1;
- 	    if (s.type == TYPE_XINETD) {
--	       if (isOn("xinetd",level))
-+	       if (isXinetdEnabled())
- 		       return !s.levels;
- 	       else
- 		       return 1;
--- 
-2.4.3
-
diff --git a/SOURCES/0001-partly-support-socket-activated-services.patch b/SOURCES/0001-partly-support-socket-activated-services.patch
deleted file mode 100644
index 35ba5bb..0000000
--- a/SOURCES/0001-partly-support-socket-activated-services.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 61b0f62df33fa9ac828f566c8b20589524c0e8c4 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Thu, 15 Aug 2013 09:54:31 +0200
-Subject: [PATCH 1/6] partly support socket activated services
-
----
- chkconfig.c      |  9 ++++++---
- leveldb.c        | 26 ++++++++++++++++++++++++++
- leveldb.h        |  1 +
- po/chkconfig.pot | 24 ++++++++++++------------
- 4 files changed, 45 insertions(+), 15 deletions(-)
-
-diff --git a/chkconfig.c b/chkconfig.c
-index ccdb225..6a1fc61 100644
---- a/chkconfig.c
-+++ b/chkconfig.c
-@@ -622,17 +622,20 @@ int setService(char * name, int type, int where, int state) {
- }
- 
- void forwardSystemd(const char *name, int type, const char *verb) {
--
-+    int socket = 0;
-     if (type == TYPE_XINETD)
-         return;
- 
-     if (!systemdIsInit())
- 	return;
- 
--    if (isOverriddenBySystemd(name)) {
-+    if (isOverriddenBySystemd(name) || (socket = isSocketActivatedBySystemd(name))) {
-         char *p;
- 
--        asprintf(&p, "%s.service", name);
-+        if(!socket)
-+                asprintf(&p, "%s.service", name);
-+        else
-+                asprintf(&p, "%s.socket", name);
- 
-         fprintf(stderr, _("Note: Forwarding request to 'systemctl %s %s'.\n"),
-                 verb, p);
-diff --git a/leveldb.c b/leveldb.c
-index 77a1396..352076c 100644
---- a/leveldb.c
-+++ b/leveldb.c
-@@ -869,6 +869,32 @@ out:
-     return rc;
- }
- 
-+int isSocketActivatedBySystemd(const char *service) {
-+    char *p;
-+    char *s;
-+    int rc = 0;
-+
-+    asprintf(&p, SYSTEMD_SERVICE_PATH "/%s@.service", service);
-+    asprintf(&s, SYSTEMD_SERVICE_PATH "/%s.socket", service);
-+
-+    if (access(p, F_OK) >= 0 && access(s, F_OK) >= 0) {
-+        rc = 1;
-+        goto out;
-+    }
-+    free(p);
-+    free(s);
-+
-+    asprintf(&p, SYSTEMD_LOCAL_SERVICE_PATH "/%s@.service", service);
-+    asprintf(&s, SYSTEMD_LOCAL_SERVICE_PATH "/%s.socket", service);
-+    if (access(p, F_OK) >= 0 && access(s, F_OK) >= 0) {
-+        rc = 1;
-+    }
-+out:
-+    free(p);
-+    free(s);
-+    return rc;
-+}
-+
- int isEnabledInSystemd(const char *service) {
-         char *c = NULL;
-         int r;
-diff --git a/leveldb.h b/leveldb.h
-index bfa281a..63ab99e 100644
---- a/leveldb.h
-+++ b/leveldb.h
-@@ -73,6 +73,7 @@ int systemdIsInit();
- int systemdActive();
- int isOverriddenBySystemd(const char *service);
- int isEnabledInSystemd(const char *service);
-+int isSocketActivatedBySystemd(const char *service);
- 
- void checkSystemdDependencies(struct service *s);
- #endif
-diff --git a/po/chkconfig.pot b/po/chkconfig.pot
-index 7acfe8d..d174fdd 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: 2013-07-31 17:00+0200\n"
-+"POT-Creation-Date: 2013-08-08 17:07+0200\n"
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
- "Language-Team: LANGUAGE <LL@li.org>\n"
-@@ -100,50 +100,50 @@ msgstr ""
- msgid "You do not have enough privileges to perform this operation.\n"
- msgstr ""
- 
--#: ../chkconfig.c:422 ../chkconfig.c:427 ../chkconfig.c:550
-+#: ../chkconfig.c:421 ../chkconfig.c:426 ../chkconfig.c:549
- msgid "on"
- msgstr ""
- 
--#: ../chkconfig.c:422 ../chkconfig.c:427 ../chkconfig.c:550
-+#: ../chkconfig.c:421 ../chkconfig.c:426 ../chkconfig.c:549
- msgid "off"
- msgstr ""
- 
--#: ../chkconfig.c:512
-+#: ../chkconfig.c:511
- #, c-format
- msgid "xinetd based services:\n"
- msgstr ""
- 
--#: ../chkconfig.c:514
-+#: ../chkconfig.c:513
- #, c-format
- msgid "failed to open directory %s: %s\n"
- msgstr ""
- 
--#: ../chkconfig.c:638
-+#: ../chkconfig.c:640
- #, c-format
- msgid "Note: Forwarding request to 'systemctl %s %s'.\n"
- msgstr ""
- 
--#: ../chkconfig.c:643
-+#: ../chkconfig.c:645
- #, c-format
- msgid "Failed to forward service request to systemctl: %m\n"
- msgstr ""
- 
--#: ../chkconfig.c:699
-+#: ../chkconfig.c:701
- #, c-format
- msgid "%s version %s\n"
- msgstr ""
- 
--#: ../chkconfig.c:711
-+#: ../chkconfig.c:713
- #, c-format
- msgid "--type must be 'sysv' or 'xinetd'\n"
- msgstr ""
- 
--#: ../chkconfig.c:718
-+#: ../chkconfig.c:720
- #, c-format
- msgid "only one of --list, --add, --del, or --override may be specified\n"
- msgstr ""
- 
--#: ../chkconfig.c:803
-+#: ../chkconfig.c:805
- #, c-format
- msgid "only one runlevel may be specified for a chkconfig query\n"
- msgstr ""
-@@ -212,7 +212,7 @@ msgstr ""
- msgid "cannot determine current run level\n"
- msgstr ""
- 
--#: ../leveldb.c:813
-+#: ../leveldb.c:815
- #, c-format
- msgid "failed to make symlink %s: %s\n"
- msgstr ""
--- 
-1.8.3.1
-
diff --git a/SOURCES/0002-leveldb-restore-selinux-context-for-xinetd-conf-file.patch b/SOURCES/0002-leveldb-restore-selinux-context-for-xinetd-conf-file.patch
deleted file mode 100644
index 91e5d2b..0000000
--- a/SOURCES/0002-leveldb-restore-selinux-context-for-xinetd-conf-file.patch
+++ /dev/null
@@ -1,340 +0,0 @@
-From 27d9eb3aa202772f57136bc67b30329fb4839b55 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Mon, 16 Feb 2015 17:36:13 +0100
-Subject: [PATCH 2/6] leveldb: restore selinux context for xinetd conf files
-
----
- Makefile         |  2 +-
- leveldb.c        | 49 +++++++++++++++++++++++++++++++++----
- po/chkconfig.pot | 74 ++++++++++++++++++++++++++++++++------------------------
- 3 files changed, 87 insertions(+), 38 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 79e02da..cde8811 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,7 +2,7 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' chkconfig.spec)
- TAG = chkconfig-$(VERSION)
- 
- CFLAGS=-g -Wall $(RPM_OPT_FLAGS) -D_GNU_SOURCE
--LDFLAGS+=-g
-+LDFLAGS+=-g -lselinux -lsepol
- MAN=chkconfig.8 ntsysv.8 alternatives.8
- PROG=chkconfig
- BINDIR = /sbin
-diff --git a/leveldb.c b/leveldb.c
-index 352076c..1af3a6f 100644
---- a/leveldb.c
-+++ b/leveldb.c
-@@ -27,6 +27,9 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
-+#include <selinux/selinux.h>
-+#include <selinux/label.h>
-+#include <libgen.h>
- 
- /* Changes
-    1998-09-22 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
-@@ -38,6 +41,36 @@
- 
- #include "leveldb.h"
- 
-+int selinux_restore(const char *name) {
-+        struct selabel_handle *hnd = NULL;
-+        struct stat buf;
-+        security_context_t newcon = NULL;
-+        int r = -1;
-+
-+        hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
-+        if (hnd == NULL)
-+                goto out;
-+
-+        r = stat(name, &buf);
-+        if (r < 0)
-+                goto out;
-+
-+        r = selabel_lookup_raw(hnd, &newcon, name, buf.st_mode);
-+        if (r < 0)
-+                goto out;
-+
-+        r = setfilecon_raw(name, newcon);
-+        if (r < 0)
-+                goto out;
-+
-+        r = 0;
-+
-+ out:
-+        selabel_close(hnd);
-+        freecon(newcon);
-+        return r;
-+}
-+
- int parseLevels(char * str, int emptyOk) {
-     char * chptr = str;
-     int rc = 0;
-@@ -744,6 +777,7 @@ int setXinetdService(struct service s, int on) {
- 	char *buf, *ptr, *tmp;
- 	struct stat sb;
-         mode_t mode;
-+        int r;
- 
- 	if (on == -1) {
- 		on = s.enabled ? 1 : 0;
-@@ -790,7 +824,11 @@ int setXinetdService(struct service s, int on) {
- 	}
- 	close(newfd);
- 	unlink(oldfname);
--	return(rename(newfname,oldfname));
-+        r = rename(newfname,oldfname);
-+        if (selinux_restore(oldfname) != 0)
-+                fprintf(stderr, _("Unable to set selinux context for %s: %s\n"), oldfname,
-+		strerror(errno));
-+	return(r);
- }
- 
- int doSetService(struct service s, int level, int on) {
-@@ -822,11 +860,12 @@ int doSetService(struct service s, int level, int on) {
- 
- int systemdIsInit() {
-     char *path = realpath("/sbin/init", NULL);
--    char *base;
-+    char *base = NULL;
- 
-     if (!path)
-         return 0;
-     base = basename(path);
-+    puts(base);
-     if (!base)
-         return 0;
-     if (strcmp(base,"systemd"))
-@@ -1218,10 +1257,10 @@ void checkSystemdDependencies(struct service *s) {
-                         }
-                 }
-         }
--        
--       
-+
-+
- finish:
--                
-+
-         if(star) {
-                 for (i = 0; i < n_star; i++)
-                         free(star[i]);
-diff --git a/po/chkconfig.pot b/po/chkconfig.pot
-index d174fdd..2d44f2b 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: 2013-08-08 17:07+0200\n"
-+"POT-Creation-Date: 2015-02-16 17:34+0100\n"
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
- "Language-Team: LANGUAGE <LL@li.org>\n"
-@@ -197,22 +197,27 @@ msgstr ""
- msgid "No services may be managed by ntsysv!\n"
- msgstr ""
- 
--#: ../leveldb.c:263
-+#: ../leveldb.c:296
- #, c-format
- msgid "failed to open %s/init.d: %s\n"
- msgstr ""
- 
--#: ../leveldb.c:673
-+#: ../leveldb.c:706
- #, c-format
- msgid "failed to glob pattern %s: %s\n"
- msgstr ""
- 
--#: ../leveldb.c:716
-+#: ../leveldb.c:749
- #, c-format
- msgid "cannot determine current run level\n"
- msgstr ""
- 
--#: ../leveldb.c:815
-+#: ../leveldb.c:829
-+#, c-format
-+msgid "Unable to set selinux context for %s: %s\n"
-+msgstr ""
-+
-+#: ../leveldb.c:853
- #, c-format
- msgid "failed to make symlink %s: %s\n"
- msgstr ""
-@@ -375,135 +380,140 @@ msgstr ""
- msgid "would remove %s\n"
- msgstr ""
- 
--#: ../alternatives.c:383 ../alternatives.c:390 ../alternatives.c:422
-+#: ../alternatives.c:383 ../alternatives.c:390 ../alternatives.c:423
- #, c-format
- msgid "failed to remove link %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:406 ../alternatives.c:419
-+#: ../alternatives.c:405 ../alternatives.c:420
- #, c-format
- msgid "would link %s -> %s\n"
- msgstr ""
- 
--#: ../alternatives.c:411 ../alternatives.c:428
-+#: ../alternatives.c:410 ../alternatives.c:429
- #, c-format
- msgid "failed to link %s -> %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:460
-+#: ../alternatives.c:416
-+#, c-format
-+msgid "failed to link %s -> %s: %s exists and it is not a symlink\n"
-+msgstr ""
-+
-+#: ../alternatives.c:461
- #, c-format
- msgid "%s already exists\n"
- msgstr ""
- 
--#: ../alternatives.c:462
-+#: ../alternatives.c:463
- #, c-format
- msgid "failed to create %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:493
-+#: ../alternatives.c:494
- #, c-format
- msgid "failed to replace %s with %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:519 ../alternatives.c:525 ../alternatives.c:536
--#: ../alternatives.c:542
-+#: ../alternatives.c:520 ../alternatives.c:526 ../alternatives.c:537
-+#: ../alternatives.c:543
- #, c-format
- msgid "running %s\n"
- msgstr ""
- 
--#: ../alternatives.c:571
-+#: ../alternatives.c:572
- #, c-format
- msgid "the primary link for %s must be %s\n"
- msgstr ""
- 
--#: ../alternatives.c:651
-+#: ../alternatives.c:652
- #, c-format
- msgid "link %s incorrect for slave %s (%s %s)\n"
- msgstr ""
- 
--#: ../alternatives.c:692
-+#: ../alternatives.c:693
- #, c-format
- msgid "%s - status is auto.\n"
- msgstr ""
- 
--#: ../alternatives.c:694
-+#: ../alternatives.c:695
- #, c-format
- msgid "%s - status is manual.\n"
- msgstr ""
- 
--#: ../alternatives.c:696
-+#: ../alternatives.c:697
- #, c-format
- msgid " link currently points to %s\n"
- msgstr ""
- 
--#: ../alternatives.c:699
-+#: ../alternatives.c:700
- #, c-format
- msgid "%s - priority %d\n"
- msgstr ""
- 
--#: ../alternatives.c:702
-+#: ../alternatives.c:703
- #, c-format
- msgid " slave %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:707
-+#: ../alternatives.c:708
- #, c-format
- msgid "Current `best' version is %s.\n"
- msgstr ""
- 
--#: ../alternatives.c:737
-+#: ../alternatives.c:738
- #, c-format
- msgid "There is %d program that provides '%s'.\n"
- msgstr ""
- 
--#: ../alternatives.c:737
-+#: ../alternatives.c:738
- #, c-format
- msgid "There are %d programs which provide '%s'.\n"
- msgstr ""
- 
--#: ../alternatives.c:739
-+#: ../alternatives.c:740
- #, c-format
- msgid "  Selection    Command\n"
- msgstr ""
- 
--#: ../alternatives.c:748
-+#: ../alternatives.c:749
- #, c-format
- msgid "Enter to keep the current selection[+], or type selection number: "
- msgstr ""
- 
--#: ../alternatives.c:751
-+#: ../alternatives.c:752
- #, c-format
- msgid ""
- "\n"
- "error reading choice\n"
- msgstr ""
- 
--#: ../alternatives.c:778 ../alternatives.c:804
-+#: ../alternatives.c:779 ../alternatives.c:805
- #, c-format
- msgid "%s has not been configured as an alternative for %s\n"
- msgstr ""
- 
--#: ../alternatives.c:820
-+#: ../alternatives.c:821
- #, c-format
- msgid "(would remove %s\n"
- msgstr ""
- 
--#: ../alternatives.c:822
-+#: ../alternatives.c:823
- #, c-format
- msgid "failed to remove %s: %s\n"
- msgstr ""
- 
--#: ../alternatives.c:973
-+#: ../alternatives.c:974
- #, c-format
- msgid "altdir %s invalid\n"
- msgstr ""
- 
--#: ../alternatives.c:979
-+#: ../alternatives.c:980
- #, c-format
- msgid "admindir %s invalid\n"
- msgstr ""
- 
--#: ../alternatives.c:989
-+#: ../alternatives.c:990
- #, c-format
- msgid "alternatives version %s\n"
- msgstr ""
--- 
-1.8.3.1
-
diff --git a/SOURCES/0003-leveldb-remove-debug-output.patch b/SOURCES/0003-leveldb-remove-debug-output.patch
deleted file mode 100644
index 4a4ad46..0000000
--- a/SOURCES/0003-leveldb-remove-debug-output.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From c561ccf5aeff1c5bff59647d6cba919f0aa67824 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Mon, 16 Feb 2015 18:27:15 +0100
-Subject: [PATCH 3/6] leveldb: remove debug output
-
----
- leveldb.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/leveldb.c b/leveldb.c
-index 1af3a6f..f4e0f8f 100644
---- a/leveldb.c
-+++ b/leveldb.c
-@@ -865,7 +865,6 @@ int systemdIsInit() {
-     if (!path)
-         return 0;
-     base = basename(path);
--    puts(base);
-     if (!base)
-         return 0;
-     if (strcmp(base,"systemd"))
--- 
-1.8.3.1
-
diff --git a/SOURCES/0004-fix-combination-type-xinetd-list-service.patch b/SOURCES/0004-fix-combination-type-xinetd-list-service.patch
deleted file mode 100644
index d348165..0000000
--- a/SOURCES/0004-fix-combination-type-xinetd-list-service.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 793905c0ec22cf4ef19dfa3c6b3b692e5feab698 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Wed, 18 Feb 2015 12:23:22 +0100
-Subject: [PATCH 4/6] fix combination --type xinetd --list service
-
----
- chkconfig.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chkconfig.c b/chkconfig.c
-index 6a1fc61..596ef8f 100644
---- a/chkconfig.c
-+++ b/chkconfig.c
-@@ -434,7 +434,7 @@ static int showServiceInfoByName(char * name, int type, int forgiving) {
-     int rc;
-     struct service s;
- 
--    if (systemdActive() && isOverriddenBySystemd(name)) {
-+    if (systemdActive() && isOverriddenBySystemd(name) && !(type & TYPE_XINETD)) {
-         return forgiving ? 0 : 1;
-     }
- 
--- 
-1.8.3.1
-
diff --git a/SOURCES/0005-Makefile-fix-wrongly-behaving-LDFLAGS.patch b/SOURCES/0005-Makefile-fix-wrongly-behaving-LDFLAGS.patch
deleted file mode 100644
index 05150c8..0000000
--- a/SOURCES/0005-Makefile-fix-wrongly-behaving-LDFLAGS.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9d2f4392e0b50bae5d3883d4052b103e33598769 Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Thu, 26 Mar 2015 14:46:56 +0100
-Subject: [PATCH 5/6] Makefile: fix wrongly behaving LDFLAGS
-
----
- Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index cde8811..7603ce4 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,7 +2,7 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' chkconfig.spec)
- TAG = chkconfig-$(VERSION)
- 
- CFLAGS=-g -Wall $(RPM_OPT_FLAGS) -D_GNU_SOURCE
--LDFLAGS+=-g -lselinux -lsepol
-+LDFLAGS+=-g
- MAN=chkconfig.8 ntsysv.8 alternatives.8
- PROG=chkconfig
- BINDIR = /sbin
-@@ -24,12 +24,12 @@ subdirs:
- 	done && test -z "$$fail"
- 
- chkconfig: $(OBJS)
--	$(CC) $(LDFLAGS) -o chkconfig $(OBJS) -lpopt
-+	$(CC) $(LDFLAGS) -lselinux -lsepol -o chkconfig $(OBJS) -lpopt
- 
- alternatives: alternatives.o
- 
- ntsysv: $(NTOBJS)
--	$(CC) $(LDFLAGS) -o ntsysv $(NTOBJS) -lnewt -lpopt $(LIBMHACK)
-+	$(CC) $(LDFLAGS) -lselinux -lsepol -o ntsysv $(NTOBJS) -lnewt -lpopt $(LIBMHACK)
- 
- chkconfig.o: chkconfig.c leveldb.h
- 	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c chkconfig.c
--- 
-1.8.3.1
-
diff --git a/SOURCES/0006-chkconfig-don-t-create-symlinks-if-they-already-exis.patch b/SOURCES/0006-chkconfig-don-t-create-symlinks-if-they-already-exis.patch
deleted file mode 100644
index 69a8f2f..0000000
--- a/SOURCES/0006-chkconfig-don-t-create-symlinks-if-they-already-exis.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a91b4d79c1890d19e0deff0a9e33dde5c45bdd9d Mon Sep 17 00:00:00 2001
-From: Lukas Nykryn <lnykryn@redhat.com>
-Date: Wed, 29 Apr 2015 14:41:00 +0200
-Subject: [PATCH 6/6] chkconfig: don't create symlinks if they already exist
-
----
- chkconfig.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/chkconfig.c b/chkconfig.c
-index 596ef8f..d334bf2 100644
---- a/chkconfig.c
-+++ b/chkconfig.c
-@@ -239,10 +239,16 @@ static int frobOneDependencies(struct service *s, struct service *servs, int num
- 
- 	if (target || ((s0 != s->sPriority) || (k0 != s->kPriority))) {
- 		for (i = 0; i < 7; i++) {
--			if (isConfigured(s->name, i, NULL, NULL)) {
-+                        int priority;
-+                        char type;
-+			if (isConfigured(s->name, i, &priority, &type)) {
- 				int on = isOn(s->name, i);
--				delService(s->name, TYPE_INIT_D, i);
--				doSetService(*s, i, on);
-+                                int new_priority = on ? s->sPriority : s->kPriority;
-+
-+                                if (new_priority != priority || (on ? 'S' : 'K') != type) {
-+                                        delService(s->name, TYPE_INIT_D, i);
-+                                        doSetService(*s, i, on);
-+                                }
- 			} else if (target) {
- 				delService(s->name, TYPE_INIT_D, i);
- 				doSetService(*s, i, ((1<<i) & s->levels));
--- 
-1.8.3.1
-
diff --git a/SPECS/chkconfig.spec b/SPECS/chkconfig.spec
index c45e321..4e08ff4 100644
--- a/SPECS/chkconfig.spec
+++ b/SPECS/chkconfig.spec
@@ -1,20 +1,14 @@
 Summary: A system tool for maintaining the /etc/rc*.d hierarchy
 Name: chkconfig
-Version: 1.3.61
-Release: 5%{?dist}.1
+Version: 1.7.2
+Release: 1%{?dist}
 License: GPLv2
 Group: System Environment/Base
+URL: https://git.fedorahosted.org/git/chkconfig.git
 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 libselinux-devel
 Conflicts: initscripts <= 5.30-1
-Patch0: 0001-partly-support-socket-activated-services.patch
-Patch1: 0002-leveldb-restore-selinux-context-for-xinetd-conf-file.patch
-Patch2: 0003-leveldb-remove-debug-output.patch
-Patch3: 0004-fix-combination-type-xinetd-list-service.patch
-Patch4: 0005-Makefile-fix-wrongly-behaving-LDFLAGS.patch
-Patch5: 0006-chkconfig-don-t-create-symlinks-if-they-already-exis.patch
-Patch6: 0001-chkconfig-use-isXinetdEnabled-instead-of-isOn.patch
 
 %description
 Chkconfig is a basic system utility.  It updates and queries runlevel
@@ -37,18 +31,12 @@ page), ntsysv configures the current runlevel (5 if you're using X).
 %prep
 %setup -q
 
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-
 %build
-
 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %{?_smp_mflags}
 
+%check
+make check
+
 %install
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} SBINDIR=%{_sbindir} install
@@ -68,7 +56,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(-,root,root)
-%doc COPYING
+%{!?_licensedir:%global license %%doc}
+%license COPYING
 %dir /etc/alternatives
 /sbin/chkconfig
 %{_sbindir}/update-alternatives
@@ -83,6 +72,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/*/chkconfig*
 %{_mandir}/*/update-alternatives*
 %{_mandir}/*/alternatives*
+%{_prefix}/lib/systemd/systemd-sysv-install
 
 %files -n ntsysv
 %defattr(-,root,root)
@@ -90,22 +80,45 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/*/ntsysv.8*
 
 %changelog
-* Fri Apr 29 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 1.3.61-5.1
-- chkconfig: use isXinetdEnabled instead of isOn
-
-* Thu Apr 30 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 1.3.61-5
-- chkconfig: don't create symlinks if they already exist
+* Wed Jun 29 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 1.7.2-1
+- alternatives: introduce --keep-missing
+- alternatives: allow family in --set and display it in --config
+
+* Fri Jun 17 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 1.7.1-1
+- merge the upstream with rhel branch
+- remove the preset change
+
+* Tue Nov 24 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 1.7-1
+- leveldb: fix segfault when selinux policy is not present
+- alternatives: add family option
+
+* Fri Oct 02 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 1.6-1
+- systemd-sysv-install: don't play ping-pong with systemctl
+- ntsysv: add description to systemd services
+- ntsysv: skip templates
+- Makefile: fix typo
+
+* Mon Jun 01 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 1.5-1
+- add systemd-sysv-install alias
+- don't create symlinks if they already exist
+- fix wrongly behaving LDFLAGS
+
+* Thu Mar 26 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 1.4-1
+- ntsysv: show systemd services and sockets
 - fix combination --type xinetd --list service
 - leveldb: restore selinux context for xinetd conf files
-
-* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.3.61-4
-- Mass rebuild 2014-01-24
-
-* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.3.61-3
-- Mass rebuild 2013-12-27
-
-* Mon Aug 26 2013 Lukas Nykryn <lnykryn@redhat.com> - 1.3.61-2
-- partly support socket activated services (#908683)
+- alternatives: remove unused variable
+- alternatives: warn if the target is not a symlink
+- spec: add link to git
+- lets simplify version
+
+* Wed Nov 05 2014 Lukáš Nykrýn <lnykryn@redhat.com> - 1.3.63-1
+- alternatives: during install don't call preset on enabled services
+
+* Tue Aug 12 2014 Lukáš Nykrýn <lnykryn@redhat.com> - 1.3.62-1
+- use systemctl preset, not systemctl enable
+- fix typo in manpage
+- partly support socket activated services
 
 * Wed Jul 31 2013 Lukáš Nykrýn <lnykryn@redhat.com> - 1.3.61-1
 - try to make install_initd work