From 23f967353eee4f0167915841ff00f7b93e7b0745 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Dec 14 2010 03:28:46 +0000 Subject: - add 'legal_host_arches' config option to configs (BZ# 622792) - add root check and group check (BZ# 662223) - from Ville Skyttä : - Try to set up an appropriate default.cfg symlink at post install time - Clean up disttag usage - Drop obsolete and nonfunctional F-8 bits from specfile - Drop no longer used requiresTextFromHdr() and uniqReqs() - Install build deps with yum-builddep - Add comment why binary packages are built with --nodeps --- diff --git a/.gitignore b/.gitignore index 32bc312..1ec66bc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ mock-1.1.3.tar.gz mock-1.1.4.tar.gz /mock-1.1.5.tar.gz /mock-1.1.6.tar.gz +/mock-1.1.7.tar.gz diff --git a/mock.spec b/mock.spec index ac7e80d..2f88af3 100644 --- a/mock.spec +++ b/mock.spec @@ -1,7 +1,7 @@ # next four lines substituted by autoconf %define major 1 %define minor 1 -%define sub 6 +%define sub 7 %define extralevel %{nil} %define release_name mock %define release_version %{major}.%{minor}.%{sub}%{extralevel} @@ -18,11 +18,12 @@ Source: https://fedorahosted.org/mock/attachment/wiki/MockTarballs/%{name}-%{ver URL: http://fedoraproject.org/wiki/Projects/Mock BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4, yum >= 2.4, tar, pigz, python-ctypes, python-decoratortools, usermode +Requires: python >= 2.4, yum >= 2.4, yum-utils >= 1.1.9, tar, pigz, python-ctypes, python-decoratortools, usermode Requires: createrepo Requires(pre): shadow-utils +Requires(post): coreutils BuildRequires: python-devel -%if "%{?dist}" == ".el5" +%if 0%{?el5} Requires: python-hashlib %endif @@ -31,12 +32,6 @@ Mock takes an SRPM and builds it in a chroot %prep %setup -q -%if "%{?dist}" == ".fc8" -pushd etc/mock -sed -i -e 's/^#exclude=/exclude=/' -e '/^# The above is not/d' \ - fedora-9-x86_64.cfg fedora-rawhide-x86_64.cfg -popd -%endif %build %configure @@ -64,6 +59,10 @@ ln -s fedora-rawhide-x86_64.cfg fedora-devel-x86_64.cfg ln -s fedora-rawhide-ppc.cfg fedora-devel-ppc.cfg ln -s fedora-rawhide-ppc64.cfg fedora-devel-ppc64.cfg popd +find $RPM_BUILD_ROOT%{_sysconfdir}/mock -name "*.cfg" \ + | sed -e "s|^$RPM_BUILD_ROOT|%%config(noreplace) |" > %{name}.cfgs +# just for %%ghosting purposes +ln -s fedora-rawhide-x86_64.cfg $RPM_BUILD_ROOT%{_sysconfdir}/mock/default.cfg %clean rm -rf $RPM_BUILD_ROOT @@ -73,7 +72,21 @@ if [ $1 -eq 1 ]; then groupadd -r mock >/dev/null 2>&1 || : fi -%files +%post +# TODO: use dist and version of install system, not build one +if [ ! -e %{_sysconfdir}/%{name}/default.cfg ] ; then + arch=$(uname -i) + for ver in %{?fedora}%{?rhel} rawhide ; do + cfg=%{?fedora:fedora}%{?rhel:epel}-$ver-$arch.cfg + if [ -e %{_sysconfdir}/%{name}/$cfg ] ; then + ln -s $cfg %{_sysconfdir}/%{name}/default.cfg + exit 0 + fi + done +fi +: + +%files -f %{name}.cfgs %defattr(-, root, root) # executables @@ -85,7 +98,7 @@ fi # config files %dir %{_sysconfdir}/%{name} -%config(noreplace) %{_sysconfdir}/%{name}/*.cfg +%ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/default.cfg %config(noreplace) %{_sysconfdir}/%{name}/*.ini %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/security/console.apps/%{name} @@ -102,6 +115,17 @@ fi %attr(02775, root, mock) %dir /var/cache/mock %changelog +* Mon Dec 13 2010 Clark Williams - 1.1.7-1 +- add 'legal_host_arches' config option to configs (BZ# 622792) +- add root check and group check (BZ# 662223) +- from Ville Skyttä : + - Try to set up an appropriate default.cfg symlink at post install time + - Clean up disttag usage + - Drop obsolete and nonfunctional F-8 bits from specfile + - Drop no longer used requiresTextFromHdr() and uniqReqs() + - Install build deps with yum-builddep + - Add comment why binary packages are built with --nodeps + * Thu Oct 14 2010 Clark Williams - 1.1.6-1 - replace call to perl with native python edit function - change permissions of selinux plugin 'filesystems' file diff --git a/sources b/sources index b5f8e59..91b11d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8f0a1a5a0d720ac1c382ebdc18b82a3c mock-1.1.6.tar.gz +4e898371a2aeba1bb1e27f694ddc6600 mock-1.1.7.tar.gz