delete cgconfig service

This commit is contained in:
luoyujie 2023-08-28 16:06:07 +08:00
parent 9d7f954492
commit 30a4787758
2 changed files with 8 additions and 39 deletions

View File

@ -1,18 +0,0 @@
[Unit]
Description=Control Group configuration service
# The service should be able to start as soon as possible,
# before any 'normal' services:
DefaultDependencies=no
Conflicts=shutdown.target
Before=basic.target shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
Delegate=yes
ExecStart=/usr/sbin/cgconfigparser -l /etc/cgconfig.conf -s 1664
ExecStop=/usr/sbin/cgclear -l /etc/cgconfig.conf -e
[Install]
WantedBy=sysinit.target

View File

@ -5,11 +5,10 @@
Summary: Libcgroup is a library that abstracts the control group file system in Linux
Name: libcgroup
Version: 3.1.0
Release: 1
Release: 2
License: LGPLv2+
URL: http://libcg.sourceforge.net/
Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: cgconfig.service
Source: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Provides: libcgroup-pam libcgroup-tools
Obsoletes: libcgroup-pam libcgroup-tools
@ -55,7 +54,6 @@ make DESTDIR=$RPM_BUILD_ROOT install
# config
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 samples/config/cgconfig.conf $RPM_BUILD_ROOT%{_sysconfdir}/cgconfig.conf
install -m 644 samples/config/cgsnapshot_denylist.conf $RPM_BUILD_ROOT%{_sysconfdir}/cgsnapshot_denylist.conf
# Only one pam_cgroup.so is needed
@ -72,31 +70,15 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man8/cgrulesengd.8*
# unit and sysconfig
install -d ${RPM_BUILD_ROOT}%{_unitdir}
install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir}/
%pre
getent group cgred >/dev/null || groupadd -r cgred
%post
%systemd_post cgconfig.service
%preun
%systemd_preun cgconfig.service
%postun
%systemd_postun_with_restart cgconfig.service
%triggerun -- libcgroup < 0.38
/usr/bin/systemd-sysv-convert --save cgconfig >/dev/null 2>&1 ||:
/sbin/chkconfig --del cgconfig >/dev/null 2>&1 || :
/bin/systemctl try-restart cgconfig.service >/dev/null 2>&1 || :
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/libcgroup.so.*
%config(noreplace) %{_sysconfdir}/cgsnapshot_denylist.conf
%config(noreplace) %{_sysconfdir}/cgconfig.conf
/usr/bin/cgget
/usr/bin/cgset
/usr/bin/cgcreate
@ -108,7 +90,6 @@ getent group cgred >/dev/null || groupadd -r cgred
%attr(2755, root, cgred) /usr/bin/cgexec
%attr(2755, root, cgred) /usr/bin/cgclassify
%attr(0755, root, root) %{_libdir}/security/pam_cgroup.so
%{_unitdir}/cgconfig.service
%{_bindir}/cgxget
%{_bindir}/cgxset
%{_bindir}/libcgroup_systemd_idle_thread
@ -129,6 +110,12 @@ getent group cgred >/dev/null || groupadd -r cgred
%attr(0644, root, root) %{_mandir}/man8/*
%changelog
* Mon Aug 28 2023 luoyujie <luoyujie5@huawei.com> - 3.1.0-2
- Type: enhancement
- Id:NA
- SUG:NA
- DESC:delete unnecessary cgconfig service support
* Wed Aug 16 2023 luoyujie <luoyujie5@huawei.com> - 3.1.0-1
- Type: upgrade
- Id:NA