]> git.pld-linux.org Git - packages/chkconfig.git/commitdiff
up to 1.4 auto/th/chkconfig-1.4-1
authorElan Ruusamäe <glen@delfi.ee>
Sat, 25 Apr 2015 09:18:21 +0000 (12:18 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 25 Apr 2015 09:30:24 +0000 (12:30 +0300)
it's not major change, just "lets simplify version"

chkconfig-add.patch
chkconfig-noxinet.patch
chkconfig-optflags.patch
chkconfig.spec

index 6105620db41ccbe83a8c6ff9c3f5f1dbadb19f8f..cedbb047352b522e358a6383e269b2b121b731dc 100644 (file)
      int type = TYPE_ANY;
      int rc, i, x;
      char * levels = NULL;
-diff -urN chkconfig-1.3.37.org/leveldb.c chkconfig-1.3.37/leveldb.c
---- chkconfig-1.3.37.org/leveldb.c     2007-08-03 19:57:56.000000000 +0200
-+++ chkconfig-1.3.37/leveldb.c 2008-04-24 09:27:34.124665839 +0200
-@@ -26,6 +26,10 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
+--- chkconfig-1.4/leveldb.c~   2015-04-25 12:18:41.000000000 +0300
++++ chkconfig-1.4/leveldb.c    2015-04-25 12:19:52.959858162 +0300
+@@ -22,6 +22,7 @@
+ #include <libintl.h>
+ #include <locale.h>
+ #include <sys/mman.h>
 +#include <sys/types.h>
-+#include <dirent.h>
-+
-+int addItem = 0;
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -41,6 +42,8 @@
+ #include "leveldb.h"
  
- /* Changes
-    1998-09-22 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
++int addItem = 0;
++
+ int selinux_restore(const char *name) {
+         struct selabel_handle *hnd = NULL;
+         struct stat buf;
 @@ -563,6 +567,25 @@
            serv.provides[1] = NULL;
      }
index 07110de0ea543018dbc80fb5308af01c9c01733d..b6a4fe07fd6e244ab6da6fb22c7abf6d67765f76 100644 (file)
@@ -17,8 +17,8 @@
  .SH OPTIONS
  .TP
  \fB-\-level \fIlevels\fR
---- chkconfig-1.3.63/chkconfig.c       2014-11-30 14:57:06.299908151 +0200
-+++ chkconfig-1.3.63.no-xinetd/chkconfig.c     2014-11-30 14:55:40.542232924 +0200
+--- chkconfig-1.4/chkconfig.c~ 2015-04-25 12:27:57.000000000 +0300
++++ chkconfig-1.4/chkconfig.c  2015-04-25 12:29:08.685346749 +0300
 @@ -102,7 +102,6 @@
        readServiceError(rc, name);
        return 1;
  
      for (i = 0; i < 7; i++) {
        printf("\t%d:%s", i, isOn(s.name, i) ? _("on") : _("off"));
+@@ -425,7 +425,7 @@
+     int rc;
+     struct service s;
+-    if (systemdActive() && isOverriddenBySystemd(name) && !(type & TYPE_XINETD)) {
++    if (systemdActive() && isOverriddenBySystemd(name)) {
+         return forgiving ? 0 : 1;
+     }
 @@ -448,33 +440,10 @@
      return showServiceInfo(s, forgiving);
  }
        } else if (!strcmp(state, "on")) {
            if (!noRedirectItem) {
                forwardSystemd(name, type, "enable");
---- chkconfig-1.3.63/leveldb.c 2014-11-30 14:57:06.299908151 +0200
-+++ chkconfig-1.3.63.no-xinetd/leveldb.c       2014-11-30 14:56:00.846594263 +0200
+--- chkconfig-1.4/leveldb.c~   2015-04-25 12:20:58.000000000 +0300
++++ chkconfig-1.4/leveldb.c    2015-04-25 12:21:39.535385553 +0300
 @@ -154,107 +154,6 @@
        return 0;
  }
  }
  
  static struct dep *parseDeps(char *pos, char *end) {
-@@ -760,62 +650,6 @@
+@@ -682,67 +682,6 @@
      return ret;
  }
  
 -      char *buf, *ptr, *tmp;
 -      struct stat sb;
 -        mode_t mode;
+-        int r;
 -
 -      if (on == -1) {
 -              on = s.enabled ? 1 : 0;
 -      }
 -      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) {
      int priority = on ? s.sPriority : s.kPriority;
      char linkname[200];
---- chkconfig-1.3.63/leveldb.h 2014-11-05 18:39:09.000000000 +0200
-+++ chkconfig-1.3.63.no-xinetd/leveldb.h       2014-11-30 14:54:29.775316676 +0200
-@@ -17,13 +17,11 @@
+--- chkconfig-1.4/leveldb.h~   2015-04-25 12:20:58.000000000 +0300
++++ chkconfig-1.4/leveldb.h    2015-04-25 12:22:49.345672830 +0300
+@@ -17,14 +17,12 @@
  #define H_LEVELDB
  
  #define RUNLEVELS "/etc"
  
  #define TYPE_INIT_D   0x1
 -#define TYPE_XINETD   0x2
--#define TYPE_ANY      (TYPE_INIT_D | TYPE_XINETD)
-+#define TYPE_ANY      (TYPE_INIT_D)
+ #define TYPE_SYSTEMD  0x4
+-#define TYPE_ANY      (TYPE_INIT_D | TYPE_XINETD | TYPE_SYSTEMD)
++#define TYPE_ANY      (TYPE_INIT_D | TYPE_SYSTEMD)
  
  #ifndef SYSTEMD_SERVICE_PATH
  #define SYSTEMD_SERVICE_PATH "/lib/systemd/system"
  int systemdIsInit();
  int systemdActive();
  int isOverriddenBySystemd(const char *service);
---- chkconfig-1.3.63/ntsysv.c  2014-11-05 18:39:09.000000000 +0200
-+++ chkconfig-1.3.63.no-xinetd/ntsysv.c        2014-11-30 14:54:29.775316676 +0200
-@@ -61,15 +61,9 @@
-     states = alloca(sizeof(*states) * numServices);
-     for (i = 0; i < numServices; i++) {
+--- chkconfig-1.4/ntsysv.c~    2015-03-26 15:14:53.000000000 +0200
++++ chkconfig-1.4/ntsysv.c     2015-04-25 12:25:27.840559610 +0300
+@@ -67,17 +67,12 @@
+         if (last != services[i].type) {
+               newtFormAddComponent(subform, newtCompactButton(-1, count,
+                                         services[i].type == TYPE_INIT_D ? "SysV initscripts":
+-                                        services[i].type == TYPE_XINETD ? "xinetd services":
+                                         services[i].type == TYPE_SYSTEMD ? "systemd services":
+                                         "Unknown"));
+                 count++;
+                 last = services[i].type;
+         }
 -      if (services[i].type == TYPE_XINETD) {
--              checkboxes[i] = newtCheckbox(-1, i, services[i].name,
+-              checkboxes[i] = newtCheckbox(-1, count, services[i].name,
 -                                   services[i].levels ? '*' : ' ', NULL,
 -                                   states + i);
--      } else {
-               checkboxes[i] = newtCheckbox(-1, i, services[i].name,
-                                            (services[i].currentLevels & levels) ? '*' : ' ', NULL,
-                                            states + i);
--      }
-       newtFormAddComponent(subform, checkboxes[i]);
-     }
-@@ -126,16 +120,10 @@
+-      } else if (services[i].type == TYPE_SYSTEMD) {
++      if (services[i].type == TYPE_SYSTEMD) {
+               checkboxes[i] = newtCheckbox(-1, count, services[i].name,
+                                    services[i].enabled ? '*' : ' ', NULL,
+                                    states + i);
+@@ -142,11 +137,7 @@
      if (!update) return 1;
  
      for (i = 0; i < numServices; i++) {
 -        if ((services[i].enabled && states[i] != '*') ||
 -          (!services[i].enabled && states[i] == '*'))
 -            setXinetdService(services[i], states[i] == '*');
--      } else {
-             for (j = 0; j < 7; j++) {
-                     if (levels & (1 << j))
-                       doSetService(services[i], j, states[i] == '*');
-             }
--      }
-     }
-     return 0;
-@@ -214,49 +202,6 @@
+-      } else if (services[i].type == TYPE_SYSTEMD) {
++        if (services[i].type == TYPE_SYSTEMD) {
+               char *cmd = NULL;
+               int en = 0;
+               if (services[i].enabled && states[i] != '*')
+@@ -347,49 +338,6 @@
  
      closedir(dir);
  
 -    }
 -    }
 -
-     qsort(services, numServices, sizeof(*services), serviceNameCmp);
+     getSystemdServices(&services, &numServices);
  
-     *servicesPtr = services;
+     qsort(services, numServices, sizeof(*services), serviceNameCmp);
index 95807eda63113a1f250118c6b55a905d3a3a56ca..4a77ab0dc32f3163c7e17d8db9303f051d8130cd 100644 (file)
@@ -1,13 +1,13 @@
---- chkconfig-1.3.63/Makefile~ 2014-11-05 18:39:09.000000000 +0200
-+++ chkconfig-1.3.63/Makefile  2014-11-30 15:00:11.219270582 +0200
+--- chkconfig-1.4/Makefile~    2015-03-26 15:14:53.000000000 +0200
++++ chkconfig-1.4/Makefile     2015-04-25 12:27:11.812618643 +0300
 @@ -1,8 +1,8 @@
  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
 +CFLAGS=$(OPTFLAGS) -Wall -D_GNU_SOURCE
-+LDFLAGS+=
++LDFLAGS+=-lselinux -lsepol
  MAN=chkconfig.8 ntsysv.8 alternatives.8
  PROG=chkconfig
  BINDIR = /sbin
index 62357df93d1f740c2ce03a59007700a083f7a047..59b664e92a0a91f9db940ba8639b5949ae97febb 100644 (file)
@@ -9,19 +9,21 @@ Summary(ru.UTF-8):    Системная утилита для управления
 Summary(tr.UTF-8):     Sistem servis bilgilerini sorgular ve yeniler
 Summary(uk.UTF-8):     Системна утиліта для керування ієрархією /etc/rc.d
 Name:          chkconfig
-Version:       1.3.63
-Release:       2
+Version:       1.4
+Release:       1
 Epoch:         2
 License:       GPL v2
 Group:         Applications/System
 Source0:       https://fedorahosted.org/releases/c/h/chkconfig/%{name}-%{version}.tar.bz2
-# Source0-md5: 7a9d030aa0915b8e9341a930e95d68e6
+# Source0-md5: 487dd7b760d6d2154f045797b3eecc00
 Patch0:                %{name}-add.patch
 Patch1:                %{name}-noxinet.patch
 Patch2:                %{name}-rc.d.patch
 Patch3:                %{name}-optflags.patch
 Patch4:                %{name}-pl.patch
+URL:           https://git.fedorahosted.org/git/chkconfig.git
 BuildRequires: gettext-tools
+BuildRequires: libselinux-devel
 BuildRequires: newt-devel
 BuildRequires: popt-devel
 Requires:      rc-scripts
This page took 0.153331 seconds and 4 git commands to generate.