Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
313e9cc98d
!28 回合chkconfig上游社区补丁解耦对cgroup的依赖
From: @fly_fzc 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-08-12 07:16:44 +00:00
fly_fzc
f59a4d709b fix systemdActive() 2024-08-12 14:34:22 +08:00
openeuler-ci-bot
efdc2fafb6
!24 update to 1.25
From: @dillon_chen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2023-08-04 11:00:56 +00:00
dillon_chen
0e6905f2b9 update to 1.25 2023-08-04 16:53:05 +08:00
openeuler-ci-bot
c5fe1f4315
!23 update version to 1.24
From: @xujing99 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2023-07-26 07:28:00 +00:00
xujing
d1e7f25312 update version to 1.24 2023-07-26 11:49:54 +08:00
openeuler-ci-bot
ef777073f1
!21 enable check
From: @tanyulong2021 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2023-02-20 01:14:37 +00:00
tanyulong2021
418ec90e82 enable check 2023-02-17 16:47:17 +08:00
openeuler-ci-bot
97320d013a
!16 Update to 1.21
From: @fu-shanqing 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-10-13 07:14:47 +00:00
fu-shanqing
5578c23cbf Update to 1.21 2022-10-12 10:16:03 +08:00
5 changed files with 67 additions and 6 deletions

Binary file not shown.

View File

@ -0,0 +1,44 @@
From 5b5268cc2d7fec04365996026f64992db6c45aa9 Mon Sep 17 00:00:00 2001
From: Marcos Mello <marcosfrm@gmail.com>
Date: Sun, 15 Oct 2023 14:35:06 -0300
Subject: [PATCH] leveldb: fix systemdActive()
/sys/fs/cgroup/systemd is long gone:
https://systemd.io/CGROUP_DELEGATION/
Check for /run/systemd/system/ directory existence instead:
https://www.freedesktop.org/software/systemd/man/sd_booted.html
Closes fedora-sysv/chkconfig#116
Reference:https://github.com/fedora-sysv/chkconfig/commit/5b5268cc2d7fec04365996026f64992db6c45aa9
Conflict:NA
---
leveldb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/leveldb.c b/leveldb.c
index 7b8c1bd..564a207 100644
--- a/leveldb.c
+++ b/leveldb.c
@@ -946,13 +946,7 @@ int systemdIsInit() {
}
int systemdActive() {
- struct stat a, b;
-
- if (lstat("/sys/fs/cgroup", &a) < 0)
- return 0;
- if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
- return 0;
- if (a.st_dev == b.st_dev)
+ if (access("/run/systemd/system/", F_OK) < 0)
return 0;
if (!systemdIsInit())
return 0;
--
2.33.0

BIN
chkconfig-1.25.tar.gz Normal file

Binary file not shown.

View File

@ -1,17 +1,19 @@
Summary: A system tool for maintaining the /etc/rc*.d hierarchy
Name: chkconfig
Version: 1.20
Version: 1.25
Release: 2
License: GPLv2
License: GPL-2.0-only
URL: https://github.com/fedora-sysv/chkconfig
Source: https://github.com/fedora-sysv/chkconfig/archive/refs/tags/%{version}.tar.gz
Source: https://github.com/fedora-sysv/chkconfig/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: newt-devel gettext popt-devel libselinux-devel beakerlib gcc systemd-devel make
Conflicts: initscripts <= 5.30-1
Provides: ntsysv = %{version}-%{release}
Obsoletes: ntsysv < %{version}-%{release}
Provides: /sbin/chkconfig
Patch0: fix-coredump-while-parseServiceInfo-return-1.patch
Patch0: fix-coredump-while-parseServiceInfo-return-1.patch
Patch6000: backport-leveldb-fix-systemdActive.patch
%description
Chkconfig is a basic system utility. It updates and queries runlevel
@ -28,7 +30,7 @@ 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_build check
%install
%make_install MANDIR=%{_mandir} SBINDIR=%{_sbindir}
@ -57,6 +59,21 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
%{_mandir}/man8/*
%changelog
* Mon Aug 12 2024 fuanan <fuanan3@h-partners.com> - 1.25-2
- fix systemdActive()
* Fri Aug 4 2023 dillon chen <dillon.chen@gmail.com> - 1.25-1
- update version to 1.25
* Wed Jul 26 2023 xujing <xujing125@huawei.com> - 1.24-1
- update version to 1.24
* Fri Feb 17 2023 tanyulong <tanyulong@kylinos.cn> - 1.21-2
- enable check
* 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

View File

@ -11,7 +11,7 @@ diff --git a/leveldb.c b/leveldb.c
index 7b8c1bd..8a7a81d 100644
--- a/leveldb.c
+++ b/leveldb.c
@@ -377,7 +377,7 @@ int readServiceInfo(char *name, int type, struct service *service,
@@ -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);