source: projects/specs/trunk/lib/libc/libcgroup/libcgroup-vl.spec @ 12121

Revision 12121, 9.4 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

Line 
1%define soversion 1.0.41
2%define soversion_major 1
3
4Name: libcgroup
5Summary: Tools and libraries to control and monitor control groups
6Summary(ja): CGROUPS を管理・監視するためのツールおよびライブラリ
7Version: 0.41
8Release: 2%{?_dist_release}
9
10License: LGPLv2+
11Group: System Environment/Libraries
12Vendor: Project Vine
13Distribution: Vine Linux
14
15URL: http://libcg.sourceforge.net/
16Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
17
18Patch1: libcgroup-0.37-chmod.patch
19Patch2: libcgroup-0.40.rc1-coverity.patch
20Patch3: libcgroup-0.40.rc1-fread.patch
21Patch4: libcgroup-0.40.rc1-templates-fix.patch
22Patch5: libcgroup-0.41-lex.patch
23Patch6: libcgroup-0.41-api.c-support-for-setting-multiline-values-in-contro.patch
24# resolves #1348874
25Patch7: libcgroup-0.41-api.c-fix-order-of-memory-subsystem-parameters.patch
26# resolves #1384504
27Patch8: libcgroup-0.41-api.c-preserve-dirty-flag.patch
28Patch9: libcgroup-0.41-change-cgroup-of-threads.patch
29Patch10: libcgroup-0.41-fix-infinite-loop.patch
30Patch11: libcgroup-0.41-prevent-buffer-overflow.patch
31Patch12: libcgroup-0.41-tasks-file-warning.patch
32Patch13: libcgroup-0.41-fix-log-level.patch
33Patch14: libcgroup-0.41-size-of-controller-values.patch
34Patch15: libcgroup-0.41-CVE-2018-14348.patch
35
36Patch1000: 0001-modify-configurations.patch
37Patch1001: 0002-fixed-initscripts.patch
38
39BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
40BuildRequires: pam-devel
41BuildRequires: byacc
42BuildRequires: flex
43BuildRequires: coreutils
44Requires(pre): shadow-utils
45Requires(post): chkconfig, /sbin/service
46Requires(preun): /sbin/chkconfig
47
48%description
49Control groups infrastructure. The tools and library help manipulate, control,
50administrate and monitor control groups and the associated controllers.
51
52%package pam
53Summary: A Pluggable Authentication Module for libcgroup
54Summary(ja): Libcgroup の PAM モジュール
55Group: System Environment/Base
56Requires: libcgroup = %{version}-%{release}
57
58%description pam
59Linux-PAM module, which allows administrators to classify the user's login
60processes to pre-configured control group.
61
62%package devel
63Summary: Development files for libcgroup
64Summary(ja): libcgroup の開発用ファイル
65Group: Development/Libraries
66Requires: libcgroup = %{version}-%{release}
67
68%description devel
69It provides API to create/delete and modify cgroup nodes. It will also in the
70future allow creation of persistent configuration for control groups and
71provide scripts to manage that configuration.
72
73%prep
74%autosetup -p1
75
76%build
77%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
78
79make %{?_smp_mflags}
80
81
82%install
83rm -rf $RPM_BUILD_ROOT
84make DESTDIR=$RPM_BUILD_ROOT install
85
86# install config files
87mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
88cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
89cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
90cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
91cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
92cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
93
94# sanitize pam module, we need only pam_cgroup.so
95mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
96rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*
97
98# move the libraries  to /
99mkdir -p $RPM_BUILD_ROOT/%{_lib}
100mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}
101rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major}
102ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major}
103ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
104rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
105
106# pre-create /cgroup directory
107mkdir $RPM_BUILD_ROOT/cgroup
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%pre
113getent group cgred >/dev/null || groupadd -r cgred
114
115%post
116/sbin/ldconfig
117/sbin/chkconfig --add cgred
118/sbin/chkconfig --add cgconfig
119
120%preun
121if [ $1 = 0 ]; then
122    /sbin/service cgred stop > /dev/null 2>&1 || :
123    /sbin/service cgconfig stop > /dev/null 2>&1 || :
124    /sbin/chkconfig --del cgconfig
125    /sbin/chkconfig --del cgred
126fi
127
128%postun -p /sbin/ldconfig
129
130%files
131%defattr(-,root,root,-)
132%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
133%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
134%config(noreplace) %{_sysconfdir}/cgconfig.conf
135%config(noreplace) %{_sysconfdir}/cgrules.conf
136%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
137/%{_lib}/libcgroup.so.*
138%attr(2755, root, cgred) /bin/cgexec
139/bin/cgclassify
140/bin/cgcreate
141/bin/cgget
142/bin/cgset
143/bin/cgdelete
144/bin/lscgroup
145/bin/lssubsys
146/sbin/cgconfigparser
147/sbin/cgrulesengd
148/sbin/cgclear
149/bin/cgsnapshot
150%attr(0644, root, root) %{_mandir}/man1/*
151%attr(0644, root, root) %{_mandir}/man5/*
152%attr(0644, root, root) %{_mandir}/man8/*
153%attr(0755,root,root) %{_initrddir}/cgconfig
154%attr(0755,root,root) %{_initrddir}/cgred
155%license COPYING
156%doc README_daemon
157%attr(0755,root,root) %dir /cgroup
158
159%files pam
160%defattr(-,root,root,-)
161%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
162%license COPYING
163
164%files devel
165%defattr(-,root,root,-)
166%{_includedir}/libcgroup.h
167%{_includedir}/libcgroup/*.h
168%{_libdir}/libcgroup.*
169/%{_libdir}/pkgconfig/libcgroup.pc
170%license COPYING
171
172%changelog
173* Thu May 23 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.41-2
174- updated Patch1000: add line for systemd-container.
175
176* Sat Jan 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.41-1
177- updated and renumbered Patch0 to Patch1000.
178- updated and renumbered Patch1 to Patch1001.
179- imported Patch1-15 from rawhide.
180
181* Sun Oct 12 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.37.1-2
182- moved libcgroup to System Environment/Libraries
183
184* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.37.1-1
185- initial build for Vine Linux
186
187* Thu Mar  3 2011 Jan Safranek <jsafrane@redhat.com> 0.37.1-1
188- Update to 0.37.1
189
190* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-3
191- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
192
193* Mon Jan 17 2011 Jan Safranek <jsafrane@redhat.com> 0.37-2
194- Create the 'cgred' group as system group, not as user
195- Fix cgclassify exit code
196
197* Mon Dec 13 2010 Jan Safranek <jsafrane@redhat.com> 0.37-1
198- Update to 0.37
199- use /sys/fs/cgroup as default directory to mount control groups (and rely on
200  systemd mounting tmpfs there)
201
202* Fri Nov 12 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-3
203- Ignore systemd hierarchy - it's now invisible to libcgroup (#627378)
204
205* Mon Aug  2 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-2
206- Fix initscripts to report stopped cgconfig service as not running
207  (#619091)
208
209* Tue Jun 22 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-1
210- Update to 0.36.2, fixing packaging the libraries (#605434)
211- Remove the dependency on redhat-lsb (#603578)
212
213* Fri May 21 2010 Jan Safranek <jsafrane@redhat.com> 0.36-1
214- Update to 0.36.1
215
216* Tue Mar  9 2010 Jan Safranek <jsafrane@redhat.com> 0.35-1
217- Update to 0.35.1
218- Separate pam module to its own subpackage
219
220* Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
221- Added README.Fedora to describe initscript integration
222
223* Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
224- Change the default configuration to mount everything to /cgroup
225
226* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
227- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
228
229* Tue Jul  7 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
230- Update to 0.34
231* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-3
232- Add a workaround for rt cgroup controller.
233* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-2
234- Change the cgconfig script to start earlier
235- Move the binaries to /bin and /sbin
236* Mon Mar 02 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-1
237- Update to latest upstream
238* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.32.2-4
239- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
240
241* Mon Jan 05 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-3
242- Fix redhat-lsb dependency
243* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-2
244- Fix build dependencies
245* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-1
246- Update to latest upstream
247* Thu Oct 23 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.1-1
248* Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
249- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
250* Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
251- Update to latest upstream
252* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
253- Update to latest upstream
254* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
255- Change release to fix broken upgrade path
256* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
257- Update to latest upstream version
258* Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
259- Add post and postun. Also fix Requires for devel to depend on base n-v-r
260* Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
261- Fix makeinstall, Source0 and URL (review comments from Tom)
262* Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
263- Add a generatable spec file
264* Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
265- Get the spec file to work
266* Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
267- The first version of libcg
Note: See TracBrowser for help on using the repository browser.