Compare commits

..

No commits in common. "45bc4c962d42c489d7b85a23dce9a9141ec61e32" and "a1e80d2fcd1fbd0905eb372cdfbd06a333e308f7" have entirely different histories.

4 changed files with 19 additions and 60 deletions

BIN
chkconfig-1.14.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,23 +1,21 @@
Summary: A system tool for maintaining the /etc/rc*.d hierarchy
Name: chkconfig
Version: 1.21
Version: 1.14
Release: 1
Summary: chkconfig updates and queries runlevel information for system services
License: GPLv2
URL: https://github.com/fedora-sysv/chkconfig
Source: https://github.com/fedora-sysv/chkconfig/archive/refs/tags/%{name}-%{version}.tar.gz
BuildRequires: newt-devel gettext popt-devel libselinux-devel beakerlib gcc systemd-devel make
Source0: https://github.com/fedora-sysv/chkconfig/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: gcc newt-devel gettext popt-devel libselinux-devel
Conflicts: initscripts <= 5.30-1
Provides: ntsysv = %{version}-%{release}
Obsoletes: ntsysv < %{version}-%{release}
Provides: /sbin/chkconfig
Patch0: fix-coredump-while-parseServiceInfo-return-1.patch
%description
Chkconfig is a basic system utility. It updates and queries runlevel
information for system services. Chkconfig manipulates the numerous
symbolic links in /etc/rc.d, to relieve system administrators of some
of the drudgery of manually editing the symbolic links.
chkconfig provides a simple command-line tool for maintaining
the /etc/rc[0-6].d directory hierarchy by relieving system
administrators of the task of directly manipulating the numerous
symbolic links in those directories.
%package_help
@ -28,18 +26,20 @@ of the drudgery of manually editing the symbolic links.
%make_build RPM_OPT_FLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%check
make check
#make check
%install
%make_install MANDIR=%{_mandir} SBINDIR=%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
ln -s rc.d/init.d $RPM_BUILD_ROOT/etc/init.d
for n in 0 1 2 3 4 5 6; do
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc${n}.d
ln -s rc.d/rc${n}.d $RPM_BUILD_ROOT/etc/rc${n}.d
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
for i in {0..6};do
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc${i}.d
done
mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
ln -s rc.d/init.d %{buildroot}%{_sysconfdir}/init.d
for i in {0..6};do
ln -s rc.d/rc${i}.d %{buildroot}%{_sysconfdir}/rc${i}.d
done
mkdir -p %{buildroot}%{_sysconfdir}/chkconfig.d
%files
%dir %{_sysconfdir}/alternatives
@ -48,7 +48,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
%{_sysconfdir}/rc.d/{inid.d,rc[0-6].d}
%{_sysconfdir}/chkconfig.d
%{_sbindir}/{*alternatives,ntsysv}
%{_sbindir}/chkconfig
/sbin/chkconfig
%{_prefix}/lib/systemd/systemd-sysv-install
%license COPYING
%{_datadir}/locale/*/LC_MESSAGES/chkconfig.mo
@ -57,21 +57,6 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
%{_mandir}/man8/*
%changelog
* Wed Oct 12 2022 fushanqing <fushanqing@kylinos.cn> - 1.21-1
- Update to 1.21
* Sat Aug 27 2022 yixiangzhike <yixiangzhike007@163.com> - 1.20-2
- fix coredump while parseServiceInfo return non-zero
* Sat Nov 27 2021 wangchen <wangchen137@huawei.com> - 1.20-1
- Update to 1.20
* Thu Jul 8 2021 duyiwei <duyiwei@kylinos.cn> - 1.15-1
- Update to 1.15
* Mon Aug 31 2020 wangchen <wangchen137@huawei.com> - 1.14-2
- Open make check because beakerlib exist
* Fri Jul 31 2020 wangchen <wangchen137@huawei.com> - 1.14-1
- Update to 1.14
@ -80,4 +65,3 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
* Fri Aug 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10-7
- Package Init

View File

@ -1,25 +0,0 @@
From 05f7ea8fa198a6b98dd98cb1a8b1774da701e917 Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Fri, 12 Aug 2022 10:01:32 +0800
Subject: [PATCH] fix coredump while parseServiceInfo return 1
---
leveldb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/leveldb.c b/leveldb.c
index 7b8c1bd..8a7a81d 100644
--- a/leveldb.c
+++ b/leveldb.c
@@ -380,7 +380,7 @@ int readServiceInfo(char *name, int type, struct service *service,
asprintf(&filename, RUNLEVELS "/chkconfig.d/%s", name);
if ((fd = open(filename, O_RDONLY)) >= 0) {
parseret = parseServiceInfo(fd, name, &serv_overrides, honorHide, 1);
- if (parseret >= 0) {
+ if (parseret == 0) {
if (serv_overrides.name)
serv.name = serv_overrides.name;
if (serv_overrides.levels != -1)
--
2.27.0