From e91c2dcce4fbbcb44a2c19f2806774c155e75356 Mon Sep 17 00:00:00 2001 From: John Clark Williams Date: Feb 01 2008 21:18:22 +0000 Subject: - redo mock.util.do() to use python subprocess module, which should be much more maintainable than our old homegrown code. - Fix exclude= lines once again. Yum fnmatch parser doesnt understand [!x] notation - add --unpriv and --cwd options to run chroot commands without elevated privs and in a specific working directory (under the root). - mount all filesystems when running chroot commands - remove redundant ccache init since we now source /etc/profile.d/ccache.sh --- diff --git a/mock.spec b/mock.spec index 9edfd66..b70276b 100644 --- a/mock.spec +++ b/mock.spec @@ -1,7 +1,7 @@ # next four lines substituted by autoconf %define major 0 -%define minor 8 -%define sub 19 +%define minor 9 +%define sub 7 %define extralevel %{nil} %define release_name mock %define release_version %{major}.%{minor}.%{sub}%{extralevel} @@ -14,10 +14,12 @@ Version: %{release_version} Release: 1%{?dist} License: GPLv2+ Group: Development/Tools -Source: http://fedoraproject.org/projects/mock/releases/%{name}-%{version}.tar.gz +#Source: https://fedorahosted.org/mock/attachment/wiki/MockTarballs/%{name}-%{version}.tar.gz?format=raw +Source: https://fedorahosted.org/mock/attachment/wiki/MockTarballs/%{name}-%{version}.tar.gz URL: http://fedoraproject.org/wiki/Projects/Mock BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: python >= 2.4, yum >= 2.4, tar, gzip, python-ctypes, python-decoratortools +BuildArch: noarch +Requires: python >= 2.4, yum >= 2.4, tar, gzip, python-ctypes, python-decoratortools, usermode Requires(pre): shadow-utils BuildRequires: python-devel @@ -35,6 +37,18 @@ make rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/var/lib/mock +ln -s consolehelper $RPM_BUILD_ROOT/usr/bin/mock + +# compatibility symlinks +# (probably be nuked in the future) +pushd $RPM_BUILD_ROOT/etc/mock +ln -s epel-4-i386.cfg fedora-4-i386-epel.cfg +ln -s epel-4-ppc.cfg fedora-4-ppc-epel.cfg +ln -s epel-4-x86_64.cfg fedora-4-x86_64-epel.cfg +ln -s epel-5-i386.cfg fedora-5-i386-epel.cfg +ln -s epel-5-ppc.cfg fedora-5-ppc-epel.cfg +ln -s epel-5-x86_64.cfg fedora-5-x86_64-epel.cfg +popd %clean rm -rf $RPM_BUILD_ROOT @@ -46,43 +60,75 @@ fi %files %defattr(-, root, root) -%doc ChangeLog + +# executables +%{_bindir}/mock +%attr(0755, root, root) %{_sbindir}/mock # python stuff -%{_libexecdir}/mock.py -%if "%{el4}" != "1" -%exclude %{_libexecdir}/mock.py[co] -%endif %{python_sitelib}/* # config files %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/*.cfg %config(noreplace) %{_sysconfdir}/%{name}/*.ini +%config(noreplace) %{_sysconfdir}/pam.d/%{name} +%config(noreplace) %{_sysconfdir}/security/console.apps/%{name} -# binary is setuid, but only runnable by group 'mock' -%attr(04770, root, mock) %{_bindir}/%{name} - +# docs %{_mandir}/man1/mock.1* +%doc ChangeLog + +# build dir %attr(02775, root, mock) %dir /var/lib/mock %changelog -* Thu Dec 20 2007 Michael Brown - 0.8.18-1 +* Thu Jan 31 2008 Michael Brown - 0.9.7-1 +- redo mock.util.do() to use python subprocess module, which should be + much more maintainable than our old homegrown code. +- Fix exclude= lines once again. Yum fnmatch parser doesnt understand [!x] + notation +- add --unpriv and --cwd options to run chroot commands without elevated privs + and in a specific working directory (under the root). +- mount all filesystems when running chroot commands +- remove redundant ccache init since we now source /etc/profile.d/ccache.sh + +* Wed Jan 16 2008 Clark Williams - 0.9.6-1 +- renamed configs and put compat symlinks in place +- misc cleanups (whitespace fixes, info messages, etc.) +- tmpfs plugin fix +- split --target and --arch command line arguments +- changed from -l to --login on bash invocations +- create /dev/full in chroot + +* Thu Dec 20 2007 Michael Brown - 0.9.5-1 - really fix file-based BuildRequires + +* Wed Dec 19 2007 Michael Brown - 0.9.4-1 - Result dir was not honoring --uniqueext= - make rpmbuild run under a chroot login shell - mock is now noarch due to drop of all binary components - add tmpfs plugin (disabled by default) - slightly more friendly logs. + +* Fri Dec 14 2007 Clark Williams - 0.9.3-1 - added '--copyin' and '--copyout' modes - added makeChrootPath() method to Root - replaced most ad hock usages of .rootdir with makeChrootPath() - updated man page && added test cases +- added 'help' target to Makefile.am * Thu Dec 13 2007 Michael Brown - 0.9.2-1 - add '--update' mode - fix '--shell' mode +* Tue Dec 11 2007 Michael Brown - 0.9.1-1 +- fix 'mock shell' command when passing more than one arg. +- add --orphanskill mode which only does orphankill +- make 'mock --shell' noninteractive and logged to root.log +- fix for file-based BuildRequires +- add sparcs to constant list for auto-setarch + * Tue Dec 11 2007 Michael Brown - 0.8.17-1 - fix 'mock shell' command when passing more than one arg. - add --orphanskill mode which only does orphankill @@ -90,6 +136,10 @@ fi - fix for file-based BuildRequires - add sparcs to constant list for auto-setarch +* Sun Dec 09 2007 Michael Brown - 0.9.0-1 +- drop suid helper and use consolehelper instead. +- add unshare() call rather than clone(CLONE_NEWNS...) + * Sun Dec 09 2007 Michael Brown - 0.8.16-1 - drop FC6 configs. FC6 no longer supported - add --trace cmdline parameter