From f8e05fc8c129a13fed256b03a23537ef94c77152 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 13 Mar 2009 15:16:19 +0100 Subject: Distribute files to various subdirectories Signed-off-by: Jan Safranek --- dist/libcgroup.spec.in | 116 +++++++++++++++++++++++++++++++++++++++++++++++++ dist/mktarball-trunk | 36 +++++++++++++++ dist/mktarball.in | 36 +++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 dist/libcgroup.spec.in create mode 100644 dist/mktarball-trunk create mode 100755 dist/mktarball.in (limited to 'dist') diff --git a/dist/libcgroup.spec.in b/dist/libcgroup.spec.in new file mode 100644 index 0000000..e3cc114 --- /dev/null +++ b/dist/libcgroup.spec.in @@ -0,0 +1,116 @@ +Name: libcgroup +Summary: Tools and libraries to control and monitor control groups +Group: Development/Libraries +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} +License: LGPLv2+ +URL: http://libcg.sourceforge.net/ +Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: pam-devel +BuildRequires: byacc +BuildRequires: flex +BuildRequires: coreutils +Requires(post): chkconfig, /sbin/service +Requires(preun): /sbin/chkconfig + +%description +Control groups infrastructure. The tools and library help manipulate, control, +administrate and monitor control groups and the associated controllers. + +%package devel +Summary: Development libraries to develop applications that utilize control groups +Group: Development/Libraries +Requires: libcgroup = %{version}-%{release} + +%description devel +It provides API to create/delete and modify cgroup nodes. It will also in the +future allow creation of persistent configuration for control groups and +provide scripts to manage that configuration. + +%prep +%setup -q + +%build +%configure --bindir=/bin --sbindir=/sbin --libdir=/%{_lib} + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +mkdir -p $RPM_BUILD_ROOT/%{_initrddir} +cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/%{_initrddir}/cgconfig +cp scripts/init.d/cgred $RPM_BUILD_ROOT/%{_initrddir}/cgred +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig +cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf +cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf +cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig +/sbin/chkconfig --add cgred +/sbin/chkconfig --add cgconfig + +%preun +if [ $1 = 0 ]; then + /sbin/service cgred stop > /dev/null 2>&1 || : + /sbin/service cgconfig stop > /dev/null 2>&1 || : + /sbin/chkconfig --del cgconfig + /sbin/chkconfig --del cgred +fi + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf +%config(noreplace) %{_sysconfdir}/cgconfig.conf +%config(noreplace) %{_sysconfdir}/cgrules.conf +/%{_lib}/libcgroup-%{version}.so +/%{_lib}/libcgroup.so.* +/bin/cgexec +/bin/cgclassify +/sbin/cgconfigparser +/bin/cgrulesengd +%attr(0644, root, root) %{_mandir}/man1/* +%attr(0644, root, root) %{_mandir}/man5/* +%attr(0644, root, root) %{_mandir}/man8/* +%attr(0755,root,root) %{_initrddir}/cgconfig +%attr(0755,root,root) %{_initrddir}/cgred +%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so + +%doc COPYING INSTALL README_daemon + +%files devel +%defattr(-,root,root,-) +%{_includedir}/libcgroup.h +/%{_lib}/libcgroup.so +%doc COPYING INSTALL + + +%changelog +* Tue Feb 24 2009 Balbir Singh 0.33-1 +- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module +* Fri Oct 10 2008 Dhaval Giani 0.32-1 +- Update to latest upstream +* Thu Sep 11 2008 Dhaval Giani 0.31-1 +- Update to latest upstream +* Sat Aug 2 2008 Dhaval Giani 0.1c-3 +- Change release to fix broken upgrade path +* Wed Jun 11 2008 Dhaval Giani 0.1c-1 +- Update to latest upstream version +* Tue Jun 3 2008 Balbir Singh 0.1b-3 +- Add post and postun. Also fix Requires for devel to depend on base n-v-r +* Sat May 31 2008 Balbir Singh 0.1b-2 +- Fix makeinstall, Source0 and URL (review comments from Tom) +* Mon May 26 2008 Balbir Singh 0.1b-1 +- Add a generatable spec file +* Tue May 20 2008 Balbir Singh 0.1-1 +- Get the spec file to work +* Tue May 20 2008 Dhaval Giani 0.01-1 +- The first version of libcg diff --git a/dist/mktarball-trunk b/dist/mktarball-trunk new file mode 100644 index 0000000..c181d95 --- /dev/null +++ b/dist/mktarball-trunk @@ -0,0 +1,36 @@ +#!/bin/sh + +srcd=$PWD +package_version=0.2 +case $# in + 0) + ;; + *) echo "usage is $0" + exit 1 + ;; +esac + +svn info 2>&1 > /dev/null + +if [ $? -eq 1 ] +then + issvn=0 +else + issvn=1 +fi + +if [[ $issvn -eq 1 ]] +then + svn export --force http://libcg.svn.sf.net/svnroot/libcg/trunk/ /tmp/libcgroup-trunk + if [[ $? -ne 0 ]] + then + echo "Trunk missing" + fi +else + cp -a . /tmp/libcgroup-trunk +fi + +pushd /tmp 2>&1 > /dev/null +tar jcf $srcd/libcgroup-trunk.tar.bz2 libcgroup-trunk +popd 2>&1 > /dev/null + diff --git a/dist/mktarball.in b/dist/mktarball.in new file mode 100755 index 0000000..2170a12 --- /dev/null +++ b/dist/mktarball.in @@ -0,0 +1,36 @@ +#!/bin/sh + +srcd=$PWD +package_version=@PACKAGE_VERSION@ +case $# in + 0) + ;; + *) echo "usage is $0" + exit 1 + ;; +esac + +svn info 2>&1 > /dev/null + +if [ $? -eq 1 ] +then + issvn=0 +else + issvn=1 +fi + +if [[ $issvn -eq 1 ]] +then + svn export --force http://libcg.svn.sf.net/svnroot/libcg/tags/v$package_version /tmp/libcgroup-$package_version + if [[ $? -ne 0 ]] + then + echo "Tag v$package_version missing" + fi +else + cp -a . /tmp/libcgroup-$package_version +fi + +pushd /tmp 2>&1 > /dev/null +tar jcf $srcd/libcgroup-$package_version.tar.bz2 libcgroup-$package_version +popd 2>&1 > /dev/null + -- cgit From d857efce25ef684526dea6c8610c72b164627cfc Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 13 Mar 2009 15:16:20 +0100 Subject: Remove mktarball The mktarball script is not needed anymore use 'make dist' instead. Signed-off-by: Jan Safranek --- dist/mktarball-trunk | 36 ------------------------------------ dist/mktarball.in | 36 ------------------------------------ 2 files changed, 72 deletions(-) delete mode 100644 dist/mktarball-trunk delete mode 100755 dist/mktarball.in (limited to 'dist') diff --git a/dist/mktarball-trunk b/dist/mktarball-trunk deleted file mode 100644 index c181d95..0000000 --- a/dist/mktarball-trunk +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -srcd=$PWD -package_version=0.2 -case $# in - 0) - ;; - *) echo "usage is $0" - exit 1 - ;; -esac - -svn info 2>&1 > /dev/null - -if [ $? -eq 1 ] -then - issvn=0 -else - issvn=1 -fi - -if [[ $issvn -eq 1 ]] -then - svn export --force http://libcg.svn.sf.net/svnroot/libcg/trunk/ /tmp/libcgroup-trunk - if [[ $? -ne 0 ]] - then - echo "Trunk missing" - fi -else - cp -a . /tmp/libcgroup-trunk -fi - -pushd /tmp 2>&1 > /dev/null -tar jcf $srcd/libcgroup-trunk.tar.bz2 libcgroup-trunk -popd 2>&1 > /dev/null - diff --git a/dist/mktarball.in b/dist/mktarball.in deleted file mode 100755 index 2170a12..0000000 --- a/dist/mktarball.in +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -srcd=$PWD -package_version=@PACKAGE_VERSION@ -case $# in - 0) - ;; - *) echo "usage is $0" - exit 1 - ;; -esac - -svn info 2>&1 > /dev/null - -if [ $? -eq 1 ] -then - issvn=0 -else - issvn=1 -fi - -if [[ $issvn -eq 1 ]] -then - svn export --force http://libcg.svn.sf.net/svnroot/libcg/tags/v$package_version /tmp/libcgroup-$package_version - if [[ $? -ne 0 ]] - then - echo "Tag v$package_version missing" - fi -else - cp -a . /tmp/libcgroup-$package_version -fi - -pushd /tmp 2>&1 > /dev/null -tar jcf $srcd/libcgroup-$package_version.tar.bz2 libcgroup-$package_version -popd 2>&1 > /dev/null - -- cgit From 07ff50e0856fecd937fb6a5ce87871f19f20f004 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 13 Mar 2009 15:16:20 +0100 Subject: Add automake makefiles Add automake makefiles and prepare everything to run, but don't actually run the automake - it would generate lot of noise, where my manual changes would get lots. Signed-off-by: Jan Safranek --- dist/Makefile.am | 1 + 1 file changed, 1 insertion(+) create mode 100644 dist/Makefile.am (limited to 'dist') diff --git a/dist/Makefile.am b/dist/Makefile.am new file mode 100644 index 0000000..346b8b8 --- /dev/null +++ b/dist/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = libcgroup.spec -- cgit From de11c7f7bb8a79c86e680d169ed414471e5ef7d2 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 26 Mar 2009 15:04:43 +0100 Subject: Generate everything Finally run autoreconf -f -i to generate all the stuff that should be generated Signed-off-by: Jan Safranek --- dist/Makefile.in | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 dist/Makefile.in (limited to 'dist') diff --git a/dist/Makefile.in b/dist/Makefile.in new file mode 100644 index 0000000..a8ec4c4 --- /dev/null +++ b/dist/Makefile.in @@ -0,0 +1,330 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = dist +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/libcgroup.spec.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = libcgroup.spec +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBRARY_VERSION = @LIBRARY_VERSION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = libcgroup.spec +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dist/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu dist/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +libcgroup.spec: $(top_builddir)/config.status $(srcdir)/libcgroup.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -- cgit