Ticket #553: bcfg2_rpmbuild.diff
File bcfg2_rpmbuild.diff, 19.0 KB (added by [email protected]…, 15 years ago) |
---|
-
misc/bcfg2.spec
1 %define release 0.1pre12 %define __python python3 %{!?py_ver: %define py_ver %(python -c 'import sys;print(sys.version[0:3])')}4 %define pythonversion %{py_ver}5 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}6 %{!?_initrddir: %define _initrddir %{_sysconfdir}/rc.d/init.d}7 8 # Most rpm-based distributions include the lxml package a 'python-lxml',9 # but some distributions and some people who roll their own lxml packages10 # call it just 'lxml'. We'll try to catch both.11 %define dfl_lxml python-lxml12 %define alt_lxml lxml13 %define lxmldep %(rpm -q %{alt_lxml} 2>&1 > /dev/null && echo %{alt_lxml} || echo %{dfl_lxml})14 15 Name: bcfg216 Version: 0.9.617 Release: %{release}18 Summary: Configuration management system19 20 Group: Applications/System21 License: BSD22 URL: http://trac.mcs.anl.gov/projects/bcfg223 Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-0.9.6pre1.tar.gz24 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)25 26 BuildArch: noarch27 28 BuildRequires: python-devel29 Requires: %{lxmldep} >= 0.930 31 %description32 Bcfg2 helps system administrators produce a consistent, reproducible,33 and verifiable description of their environment, and offers34 visualization and reporting tools to aid in day-to-day administrative35 tasks. It is the fifth generation of configuration management tools36 developed in the Mathematics and Computer Science Division of Argonne37 National Laboratory.38 39 It is based on an operational model in which the specification can be40 used to validate and optionally change the state of clients, but in a41 feature unique to bcfg2 the client's response to the specification can42 also be used to assess the completeness of the specification. Using43 this feature, bcfg2 provides an objective measure of how good a job an44 administrator has done in specifying the configuration of client45 systems. Bcfg2 is therefore built to help administrators construct an46 accurate, comprehensive specification.47 48 Bcfg2 has been designed from the ground up to support gentle49 reconciliation between the specification and current client states. It50 is designed to gracefully cope with manual system modifications.51 52 Finally, due to the rapid pace of updates on modern networks, client53 systems are constantly changing; if required in your environment,54 Bcfg2 can enable the construction of complex change management and55 deployment strategies.56 57 %package -n bcfg2-server58 Version: %{version}59 Summary: Bcfg2 Server60 Group: System Tools61 Requires: bcfg262 Requires: %{lxmldep} >= 1.2.163 %if "%{_vendor}" == "redhat"64 Requires: gamin-python65 %endif66 67 %description -n bcfg2-server68 Bcfg2 helps system administrators produce a consistent, reproducible,69 and verifiable description of their environment, and offers70 visualization and reporting tools to aid in day-to-day administrative71 tasks. It is the fifth generation of configuration management tools72 developed in the Mathematics and Computer Science Division of Argonne73 National Laboratory.74 75 It is based on an operational model in which the specification can be76 used to validate and optionally change the state of clients, but in a77 feature unique to bcfg2 the client's response to the specification can78 also be used to assess the completeness of the specification. Using79 this feature, bcfg2 provides an objective measure of how good a job an80 administrator has done in specifying the configuration of client81 systems. Bcfg2 is therefore built to help administrators construct an82 accurate, comprehensive specification.83 84 Bcfg2 has been designed from the ground up to support gentle85 reconciliation between the specification and current client states. It86 is designed to gracefully cope with manual system modifications.87 88 Finally, due to the rapid pace of updates on modern networks, client89 systems are constantly changing; if required in your environment,90 Bcfg2 can enable the construction of complex change management and91 deployment strategies.92 93 %prep94 %setup -q -n bcfg2-0.9.6pre195 96 %build97 %{__python}%{pythonversion} setup.py build98 99 %install100 %{__python}%{pythonversion} setup.py install --root=%{buildroot} --record=INSTALLED_FILES --prefix=/usr101 %{__install} -d %{buildroot}%{_bindir}102 %{__install} -d %{buildroot}%{_sbindir}103 %{__install} -d %{buildroot}%{_initrddir}104 %{__install} -d %{buildroot}%{_sysconfdir}/default105 %{__install} -d %{buildroot}%{_sysconfdir}/cron.daily106 %{__install} -d %{buildroot}%{_sysconfdir}/cron.hourly107 %{__install} -d %{buildroot}%{_prefix}/lib/bcfg2108 %{__mv} %{buildroot}/usr/bin/bcfg2* %{buildroot}%{_sbindir}109 %{__install} -m 755 debian/buildsys/common/bcfg2.init %{buildroot}%{_initrddir}/bcfg2110 %{__install} -m 755 debian/buildsys/common/bcfg2-server.init %{buildroot}%{_initrddir}/bcfg2-server111 %{__install} -m 755 debian/bcfg2.default %{buildroot}%{_sysconfdir}/default/bcfg2112 %{__install} -m 755 debian/bcfg2.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/bcfg2113 %{__install} -m 755 debian/bcfg2.cron.hourly %{buildroot}%{_sysconfdir}/cron.hourly/bcfg2114 %{__install} -m 755 tools/bcfg2-cron %{buildroot}%{_prefix}/lib/bcfg2/bcfg2-cron115 116 %clean117 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} || exit 2118 119 %files -n bcfg2120 %defattr(-,root,root,-)121 %{_sbindir}/bcfg2122 %{python_sitelib}/Bcfg2/*.py*123 %{python_sitelib}/Bcfg2/tlslite/*124 %{python_sitelib}/Bcfg2/Client/*125 %{_mandir}/man1/*126 %{_mandir}/man5/*127 %{_initrddir}/bcfg2128 %config(noreplace) %{_sysconfdir}/default/bcfg2129 %{_sysconfdir}/cron.hourly/bcfg2130 %{_sysconfdir}/cron.daily/bcfg2131 %{_prefix}/lib/bcfg2/bcfg2-cron132 133 %post -n bcfg2-server134 /sbin/chkconfig --add bcfg2-server135 136 %files -n bcfg2-server137 %defattr(-,root,root,-)138 139 %{_initrddir}/bcfg2-server140 141 %{python_sitelib}/Bcfg2/Server142 143 %if "%{pythonversion}" == "2.5"144 %{python_sitelib}/*egg-info145 %endif146 147 %{_datadir}/bcfg2148 149 %{_sbindir}/bcfg2-admin150 %{_sbindir}/bcfg2-build-reports151 %{_sbindir}/bcfg2-info152 %{_sbindir}/bcfg2-ping-sweep153 %{_sbindir}/bcfg2-repo-validate154 %{_sbindir}/bcfg2-server155 %{_sbindir}/bcfg2-remote156 157 %{_mandir}/man8/*.8*158 %dir %{_prefix}/lib/bcfg2159 160 %changelog161 * Fri Feb 2 2007 Mike Brady <[email protected]> 0.9.1162 - Removed use of _libdir due to Red Hat x86_64 issue.163 164 * Fri Dec 22 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-5165 - Server needs client library files too so put them in main package166 167 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-4168 - Yes, actually we need to require openssl169 170 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-3171 - Don't generate SSL cert in post script, it only needs to be done on172 the server and is handled by the bcfg2-admin tool.173 - Move the /etc/bcfg2.key file to the server package174 - Don't install a sample copy of the config file, just ghost it175 - Require gamin-python for the server package176 - Don't require openssl177 - Make the client a separate package so you don't have to have the178 client if you don't want it179 180 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-2181 - Add more documentation182 183 * Mon Dec 18 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-1184 - First version for Fedora Extras185 186 * Fri Sep 15 2006 Narayan Desai <[email protected]> - 0.8.4-1187 - Initial log188 -
redhat/RELEASE
1 0.1 -
redhat/VERSION
1 0.9.6 -
redhat/PACKAGE
1 bcfg2 -
redhat/bcfg2.spec
1 Name: %{_package} 2 Version: %{_version} 3 Release: %{_release} 4 5 %define __python python 6 %{!?py_ver: %define py_ver %(python -c 'import sys;print(sys.version[0:3])')} 7 %define pythonversion %{py_ver} 8 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 9 %{!?_initrddir: %define _initrddir %{_sysconfdir}/rc.d/init.d} 10 11 # Most rpm-based distributions include the lxml package a 'python-lxml', 12 # but some distributions and some people who roll their own lxml packages 13 # call it just 'lxml'. We'll try to catch both. 14 %define dfl_lxml python-lxml 15 %define alt_lxml lxml 16 %define lxmldep %(rpm -q %{alt_lxml} 2>&1 > /dev/null && echo %{alt_lxml} || echo %{dfl_lxml}) 17 18 Summary: Configuration management system 19 Group: Applications/System 20 License: BSD 21 URL: http://trac.mcs.anl.gov/projects/bcfg2 22 Source0: %{name}-%{version}-%{release}.tar.gz 23 BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 24 25 BuildArch: noarch 26 BuildRequires: python-devel 27 Requires: %{lxmldep} >= 0.9 28 29 %description 30 Bcfg2 helps system administrators produce a consistent, reproducible, 31 and verifiable description of their environment, and offers 32 visualization and reporting tools to aid in day-to-day administrative 33 tasks. It is the fifth generation of configuration management tools 34 developed in the Mathematics and Computer Science Division of Argonne 35 National Laboratory. 36 37 It is based on an operational model in which the specification can be 38 used to validate and optionally change the state of clients, but in a 39 feature unique to bcfg2 the client's response to the specification can 40 also be used to assess the completeness of the specification. Using 41 this feature, bcfg2 provides an objective measure of how good a job an 42 administrator has done in specifying the configuration of client 43 systems. Bcfg2 is therefore built to help administrators construct an 44 accurate, comprehensive specification. 45 46 Bcfg2 has been designed from the ground up to support gentle 47 reconciliation between the specification and current client states. It 48 is designed to gracefully cope with manual system modifications. 49 50 Finally, due to the rapid pace of updates on modern networks, client 51 systems are constantly changing; if required in your environment, 52 Bcfg2 can enable the construction of complex change management and 53 deployment strategies. 54 55 %package -n bcfg2-server 56 Version: %{version} 57 Summary: Bcfg2 Server 58 Group: System Tools 59 Requires: bcfg2 60 Requires: %{lxmldep} >= 1.2.1 61 %if "%{_vendor}" == "redhat" 62 Requires: gamin-python 63 %endif 64 65 %description -n bcfg2-server 66 Bcfg2 helps system administrators produce a consistent, reproducible, 67 and verifiable description of their environment, and offers 68 visualization and reporting tools to aid in day-to-day administrative 69 tasks. It is the fifth generation of configuration management tools 70 developed in the Mathematics and Computer Science Division of Argonne 71 National Laboratory. 72 73 It is based on an operational model in which the specification can be 74 used to validate and optionally change the state of clients, but in a 75 feature unique to bcfg2 the client's response to the specification can 76 also be used to assess the completeness of the specification. Using 77 this feature, bcfg2 provides an objective measure of how good a job an 78 administrator has done in specifying the configuration of client 79 systems. Bcfg2 is therefore built to help administrators construct an 80 accurate, comprehensive specification. 81 82 Bcfg2 has been designed from the ground up to support gentle 83 reconciliation between the specification and current client states. It 84 is designed to gracefully cope with manual system modifications. 85 86 Finally, due to the rapid pace of updates on modern networks, client 87 systems are constantly changing; if required in your environment, 88 Bcfg2 can enable the construction of complex change management and 89 deployment strategies. 90 91 %prep 92 %setup -q -n %{name}-%{version}-%{release} 93 94 %build 95 %{__python}%{pythonversion} setup.py build 96 97 %install 98 %{__python}%{pythonversion} setup.py install --root=%{buildroot} --record=INSTALLED_FILES --prefix=/usr 99 %{__install} -d %{buildroot}%{_bindir} 100 %{__install} -d %{buildroot}%{_sbindir} 101 %{__install} -d %{buildroot}%{_initrddir} 102 %{__install} -d %{buildroot}%{_sysconfdir}/default 103 %{__install} -d %{buildroot}%{_sysconfdir}/cron.daily 104 %{__install} -d %{buildroot}%{_sysconfdir}/cron.hourly 105 %{__install} -d %{buildroot}%{_prefix}/lib/bcfg2 106 %{__mv} %{buildroot}/usr/bin/bcfg2* %{buildroot}%{_sbindir} 107 %{__install} -m 755 debian/buildsys/common/bcfg2.init %{buildroot}%{_initrddir}/bcfg2 108 %{__install} -m 755 debian/buildsys/common/bcfg2-server.init %{buildroot}%{_initrddir}/bcfg2-server 109 %{__install} -m 755 debian/bcfg2.default %{buildroot}%{_sysconfdir}/default/bcfg2 110 %{__install} -m 755 debian/bcfg2.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/bcfg2 111 %{__install} -m 755 debian/bcfg2.cron.hourly %{buildroot}%{_sysconfdir}/cron.hourly/bcfg2 112 %{__install} -m 755 tools/bcfg2-cron %{buildroot}%{_prefix}/lib/bcfg2/bcfg2-cron 113 114 %clean 115 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} || exit 2 116 117 %files -n bcfg2 118 %defattr(-,root,root,-) 119 %{_sbindir}/bcfg2 120 %{python_sitelib}/Bcfg2/*.py* 121 %{python_sitelib}/Bcfg2/tlslite/* 122 %{python_sitelib}/Bcfg2/Client/* 123 %{_mandir}/man1/* 124 %{_mandir}/man5/* 125 %{_initrddir}/bcfg2 126 %config(noreplace) %{_sysconfdir}/default/bcfg2 127 %{_sysconfdir}/cron.hourly/bcfg2 128 %{_sysconfdir}/cron.daily/bcfg2 129 %{_prefix}/lib/bcfg2/bcfg2-cron 130 131 %post -n bcfg2-server 132 /sbin/chkconfig --add bcfg2-server 133 134 %files -n bcfg2-server 135 %defattr(-,root,root,-) 136 137 %{_initrddir}/bcfg2-server 138 139 %{python_sitelib}/Bcfg2/Server 140 141 %if "%{pythonversion}" == "2.5" 142 %{python_sitelib}/*egg-info 143 %endif 144 145 %{_datadir}/bcfg2 146 147 %{_sbindir}/bcfg2-admin 148 %{_sbindir}/bcfg2-build-reports 149 %{_sbindir}/bcfg2-info 150 %{_sbindir}/bcfg2-ping-sweep 151 # %{_sbindir}/bcfg2-query 152 %{_sbindir}/bcfg2-repo-validate 153 %{_sbindir}/bcfg2-server 154 %{_sbindir}/bcfg2-remote 155 156 %{_mandir}/man8/*.8* 157 %dir %{_prefix}/lib/bcfg2 158 159 %changelog 160 * Thu May 08 2008 Robin Bowes <[email protected]> 0.9.6 161 - Revised spec file to build directly from svn checkout using Makefile 162 163 * Fri Feb 2 2007 Mike Brady <[email protected]> 0.9.1 164 - Removed use of _libdir due to Red Hat x86_64 issue. 165 166 * Fri Dec 22 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-5 167 - Server needs client library files too so put them in main package 168 169 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-4 170 - Yes, actually we need to require openssl 171 172 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-3 173 - Don't generate SSL cert in post script, it only needs to be done on 174 the server and is handled by the bcfg2-admin tool. 175 - Move the /etc/bcfg2.key file to the server package 176 - Don't install a sample copy of the config file, just ghost it 177 - Require gamin-python for the server package 178 - Don't require openssl 179 - Make the client a separate package so you don't have to have the 180 client if you don't want it 181 182 * Wed Dec 20 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-2 183 - Add more documentation 184 185 * Mon Dec 18 2006 Jeffrey C. Ollie <[email protected]> - 0.8.7.1-1 186 - First version for Fedora Extras 187 188 * Fri Sep 15 2006 Narayan Desai <[email protected]> - 0.8.4-1 189 - Initial log 190 -
redhat/Makefile
1 # -- generic Makefile for building RPM-based packages out of source 2 # code control systems (git, cvs, svn) 3 # 4 # $Id: Makefile 46 2007-10-24 09:14:12Z robin $ 5 6 SCM_TYPE := svn 7 SCM_PATH := ../ 8 #CVSROOT := $(shell cat 2>/dev/null src/CVS/Root) 9 SVN_PATH := $(shell svn info ${SCM_PATH} 2>/dev/null | awk '/^URL:/{print $$2}') 10 SVN_REV := $(shell svn info ${SVN_PATH} 2>/dev/null | awk '/^Last Changed Rev:/{print $$4}') 11 12 PACKAGE := $(shell cat PACKAGE) 13 VERSION := $(shell cat VERSION) 14 RELEASE := $(shell cat RELEASE)r${SVN_REV} 15 BASE_VER := ${VERSION}-${RELEASE} 16 CURRENT_PACKAGE := $(PACKAGE)-$(BASE_VER) 17 TARBALL := $(CURRENT_PACKAGE).tar 18 19 DIRNAME := $(shell echo $${PWD}) 20 DIRBASE := $(shell basename $${PWD}) 21 22 23 .SUFFIXES: 24 .PHONY: clean mrclean distclean prepclean all default 25 .PHONY: rpm rpmdist buildrpm buildrpmdist 26 .PHONY: buildtarball buildtargz 27 .PHONY: builddir distdir prepbuildtarball 28 .PHONY: cvs-export git-export svn-export test-export 29 .PHONY: cvs-clean git-clean svn-clean test-clean 30 31 default: rpmdist 32 33 # -- the "rpmdist" target will build out of the SCM, but will 34 # use the user's default build settings (which in many cases 35 # is exposed as an RPM repository) 36 # 37 #rpmdist: buildrpmdist distclean 38 rpmdist: buildrpmdist 39 40 buildrpmdist: buildtargz 41 @rpmbuild \ 42 --define "_package ${PACKAGE}" \ 43 --define "_version ${VERSION}" \ 44 --define "_release ${RELEASE}" \ 45 -ta ./build/$(TARBALL).gz 46 47 # -- the "rpm" target will build out of the SCM, but will leave 48 # the resulting package in the relative ./build/ directory 49 # 50 rpm: buildrpm $(SCM_TYPE)-clean 51 52 buildrpm: buildtargz 53 @rpmbuild \ 54 --define "_rpmdir ./build/" \ 55 --define "_sourcedir ./build/" \ 56 --define "_srcrpmdir ./build/" \ 57 --define "_package ${PACKAGE}" \ 58 --define "_version ${VERSION}" \ 59 --define "_release ${RELEASE}" \ 60 -ta ./build/$(TARBALL).gz 61 62 buildtarball: prepbuildtarball 63 @tar \ 64 --create \ 65 --directory ./build/ \ 66 --file ./build/$(TARBALL) \ 67 ${CURRENT_PACKAGE} 68 69 buildtargz: buildtarball 70 @gzip -c < ./build/$(TARBALL) > ./build/$(TARBALL).gz 71 72 prepbuildtarball: $(SCM_TYPE)-export 73 cp ${PACKAGE}.spec ./build/${CURRENT_PACKAGE} \ 74 && echo cp files/* ./build/ 75 76 test-clean: 77 @cd .. \ 78 && rm "$(CURRENT_PACKAGE)" 79 80 test-export: builddir 81 @cd .. \ 82 && ln -snvf $(DIRBASE) $(CURRENT_PACKAGE) \ 83 && tar \ 84 --create \ 85 --dereference \ 86 --to-stdout \ 87 --exclude "*.git*" \ 88 --exclude "*.svn*" \ 89 --exclude "*/CVS/*" \ 90 --exclude "$(CURRENT_PACKAGE)/build/*" \ 91 $(CURRENT_PACKAGE) \ 92 | tar \ 93 --extract \ 94 --directory $(CURRENT_PACKAGE)/build/ \ 95 --file - 96 97 git-export: builddir prepclean 98 @git-tar-tree HEAD $(PACKAGE)-$(VERSION) \ 99 | tar \ 100 --extract \ 101 --directory ./build/ \ 102 --file - 103 104 git-clean: 105 @: 106 107 cvs-export: builddir prepclean 108 @cd ./build/ \ 109 && echo CURRENT_PACKAGE: ${CURRENT_PACKAGE} \ 110 && echo CVSROOT: ${CVSROOT} \ 111 && CVSROOT=${CVSROOT} cvs export -r HEAD -d$(CURRENT_PACKAGE) ${PACKAGE} 112 113 cvs-clean: 114 @: 115 116 svn-export: builddir prepclean 117 @cd ./build/ \ 118 && svn export $(SVN_PATH) $(CURRENT_PACKAGE) 119 120 svn-clean: 121 @: 122 123 builddir: 124 @mkdir -p ./build 125 126 distdir: 127 @mkdir -p ./dist 128 129 prepclean: 130 @rm -rf ./build/$(CURRENT_PACKAGE)* 131 132 clean: 133 @rm -rf ./build/* ./dist/* 2>/dev/null || : 134 135 mrclean: clean 136 137 distclean: clean $(SCM_TYPE)-clean 138 @rmdir ./build/ ./dist/ 2>/dev/null || :