From a58895db0f037bf3a28e33e950a3cfc3d22f45ff Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 15 Nov 2010 17:05:31 -0600 Subject: redhat: Sync some upstream changes for the spec file Signed-off-by: Sol Jerome --- redhat/bcfg2.spec.in | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'redhat') diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 40f2d6df2..9378e9267 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -1,4 +1,6 @@ -# This file is licensed under the GPL +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%endif Name: @PACKAGE@ Version: @VERSION@ @@ -7,23 +9,15 @@ Release: @RELEASE@ %define __python python %{!?py_ver: %define py_ver %(%{__python} -c 'import sys;print(sys.version[0:3])')} %define pythonversion %{py_ver} -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?_initrddir: %define _initrddir %{_sysconfdir}/rc.d/init.d} -# Most rpm-based distributions include the lxml package a 'python-lxml', -# but some distributions and some people who roll their own lxml packages -# call it just 'lxml'. We'll try to catch both. -%define dfl_lxml python-lxml -%define alt_lxml lxml -%define lxmldep %(rpm -q %{alt_lxml} 2>&1 > /dev/null && echo %{alt_lxml} || echo %{dfl_lxml}) - Summary: Configuration management system + Group: Applications/System License: BSD URL: http://trac.mcs.anl.gov/projects/bcfg2 Source0: %{name}-%{version}-%{release}.tar.gz -BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if 0%{?fedora} >= 8 @@ -35,7 +29,7 @@ BuildRequires: python-setuptools %if "%{py_ver}" == "2.4" Requires: python-elementtree %else if "%{py_ver}" < "2.5" -Requires: %{lxmldep} >= 0.9 +Requires: python-lxml %endif Requires: initscripts Requires(post): /sbin/chkconfig @@ -43,7 +37,6 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service - %description Bcfg2 helps system administrators produce a consistent, reproducible, and verifiable description of their environment, and offers @@ -77,7 +70,7 @@ Requires: bcfg2 = %{version}-%{release} %if "%{py_ver}" < "2.6" Requires: python-ssl %endif -Requires: %{lxmldep} >= 0.9 +Requires: python-lxml >= 0.9 Requires: /usr/bin/openssl Requires: gamin-python Requires(post): /sbin/chkconfig @@ -93,6 +86,7 @@ Configuration management server # fixup some paths %{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' debian/bcfg2.init +%{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' debian/bcfg2-server.init %{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' tools/bcfg2-cron %{__perl} -pi -e 's@/usr/lib/bcfg2@%{_libexecdir}@g' debian/bcfg2.cron.daily @@ -111,10 +105,9 @@ done %build %{__python} -c 'import setuptools; execfile("setup.py")' build - %install rm -rf %{buildroot} -%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} --prefix=/usr +%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_initrddir} @@ -200,7 +193,6 @@ fi %dir %{_var}/cache/bcfg2 - %files server %defattr(-,root,root,-) @@ -220,11 +212,7 @@ fi %{_sbindir}/bcfg2-reports %{_sbindir}/bcfg2-server -%{_mandir}/man8/bcfg2-admin.8* -%{_mandir}/man8/bcfg2-build-reports.8* -%{_mandir}/man8/bcfg2-info.8* -%{_mandir}/man8/bcfg2-repo-validate.8* -%{_mandir}/man8/bcfg2-server.8* +%{_mandir}/man8/*.8* %dir %{_var}/lib/bcfg2 -- cgit v1.2.3-1-g7c22 From 3cc5a7e114a5e38b22776993271a8f0a2f54a8e8 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 15 Nov 2010 19:42:04 -0600 Subject: redhat: Fix Makefile so that building from git works Signed-off-by: Sol Jerome --- redhat/Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'redhat') diff --git a/redhat/Makefile b/redhat/Makefile index bf7c69591..7533b98da 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -11,15 +11,15 @@ .PHONY: cvs-export git-export svn-export test-export .PHONY: cvs-clean git-clean svn-clean test-clean -SCM_TYPE := svn +SCM_TYPE := git SCM_PATH := ../ #CVSROOT := $(shell cat 2>/dev/null src/CVS/Root) -SVN_PATH := $(shell svn info ${SCM_PATH} 2>/dev/null | awk '/^URL:/{print $$2}') -SVN_REV := $(shell svn info ${SVN_PATH} 2>/dev/null | awk '/^Last Changed Rev:/{print $$4}') +#SVN_PATH := $(shell svn info ${SCM_PATH} 2>/dev/null | awk '/^URL:/{print $$2}') +#SVN_REV := $(shell svn info ${SVN_PATH} 2>/dev/null | awk '/^Last Changed Rev:/{print $$4}') PACKAGE := $(shell cat PACKAGE) VERSION := $(shell cat VERSION) -RELEASE := $(shell cat RELEASE)r${SVN_REV} +RELEASE := $(shell cat RELEASE) BASE_VER := ${VERSION}-${RELEASE} CURRENT_PACKAGE := $(PACKAGE)-$(BASE_VER) TARBALL := $(CURRENT_PACKAGE).tar @@ -80,8 +80,8 @@ buildtargz: buildtarball # This target copies files that are not in svn into the build tree prepbuildtarball: $(SCM_TYPE)-export - @cp ${PACKAGE}.spec ./build/${CURRENT_PACKAGE}/redhat && \ - cp -R scripts ./build/${CURRENT_PACKAGE}/redhat + @cp ${PACKAGE}.spec ./build/${CURRENT_PACKAGE}/redhat/ && \ + cp -R scripts ./build/${CURRENT_PACKAGE}/redhat/ specfile: $(PACKAGE).spec @@ -113,11 +113,8 @@ test-export: builddir --file - git-export: builddir prepclean - @git-tar-tree HEAD $(PACKAGE)-$(VERSION) \ - | tar \ - --extract \ - --directory ./build/ \ - --file - + @cd ../ && git archive --format=tar --prefix=$(CURRENT_PACKAGE)/ HEAD \ + | (cd redhat/build && tar xf -) git-clean: @: -- cgit v1.2.3-1-g7c22