siosm / rpms / mock

Forked from rpms/mock 2 years ago
Clone
eb306dd
# next four lines substituted by autoconf
a38a5bb
%define major 0
e91c2dc
%define minor 9
1ec8a8d
%define sub 13
a38a5bb
%define extralevel %{nil}
a38a5bb
%define release_name mock
a38a5bb
%define release_version %{major}.%{minor}.%{sub}%{extralevel}
a38a5bb
a38a5bb
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
a38a5bb
Seth Vidal 32b2475
Summary: Builds packages inside chroots
Seth Vidal 32b2475
Name: mock
a38a5bb
Version: %{release_version}
0c7d649
Release: 1%{?dist}
7acbf69
License: GPLv2+
Seth Vidal 32b2475
Group: Development/Tools
e91c2dc
Source: https://fedorahosted.org/mock/attachment/wiki/MockTarballs/%{name}-%{version}.tar.gz
Seth Vidal 44500a7
URL: http://fedoraproject.org/wiki/Projects/Mock
Seth Vidal 32b2475
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e91c2dc
BuildArch: noarch
e91c2dc
Requires: python >= 2.4, yum >= 2.4, tar, gzip, python-ctypes, python-decoratortools, usermode
Seth Vidal 32b2475
Requires(pre): shadow-utils
a38a5bb
BuildRequires: python-devel
Seth Vidal 32b2475
Seth Vidal 32b2475
%description
Seth Vidal 32b2475
Mock takes a srpm and builds it in a chroot
Seth Vidal 32b2475
Seth Vidal 32b2475
%prep
Seth Vidal 32b2475
%setup -q
0c7d649
%if "%{?dist}" == ".fc8"
d70366e
pushd etc/mock
d70366e
sed -i -e 's/^#exclude=/exclude=/' -e '/^# The above is not/d' \
d70366e
    fedora-9-x86_64.cfg fedora-rawhide-x86_64.cfg
d70366e
popd
0c7d649
%endif
e087a33
Seth Vidal 32b2475
%build
a38a5bb
%configure
a38a5bb
make
Seth Vidal 32b2475
Seth Vidal 32b2475
%install
Seth Vidal 32b2475
rm -rf $RPM_BUILD_ROOT
Seth Vidal 32b2475
make DESTDIR=$RPM_BUILD_ROOT install
a38a5bb
mkdir -p $RPM_BUILD_ROOT/var/lib/mock
e91c2dc
ln -s consolehelper $RPM_BUILD_ROOT/usr/bin/mock
e91c2dc
e91c2dc
# compatibility symlinks
e91c2dc
# (probably be nuked in the future)
e91c2dc
pushd $RPM_BUILD_ROOT/etc/mock
e91c2dc
ln -s epel-4-i386.cfg   fedora-4-i386-epel.cfg
e91c2dc
ln -s epel-4-ppc.cfg    fedora-4-ppc-epel.cfg
e91c2dc
ln -s epel-4-x86_64.cfg fedora-4-x86_64-epel.cfg
e91c2dc
ln -s epel-5-i386.cfg   fedora-5-i386-epel.cfg
e91c2dc
ln -s epel-5-ppc.cfg    fedora-5-ppc-epel.cfg
e91c2dc
ln -s epel-5-x86_64.cfg fedora-5-x86_64-epel.cfg
6576b97
# more compat, from devel/rawhide rename
6576b97
ln -s fedora-rawhide-i386.cfg fedora-devel-i386.cfg
6576b97
ln -s fedora-rawhide-x86_64.cfg fedora-devel-x86_64.cfg
6576b97
ln -s fedora-rawhide-ppc.cfg fedora-devel-ppc.cfg
6576b97
ln -s fedora-rawhide-ppc64.cfg fedora-devel-ppc64.cfg
e91c2dc
popd
Seth Vidal 32b2475
Seth Vidal 32b2475
%clean
Seth Vidal 32b2475
rm -rf $RPM_BUILD_ROOT
Seth Vidal 32b2475
Seth Vidal 32b2475
%pre
Seth Vidal 32b2475
if [ $1 -eq 1 ]; then
Seth Vidal 32b2475
    groupadd -r mock >/dev/null 2>&1 || :
Seth Vidal 32b2475
fi
Seth Vidal 32b2475
Seth Vidal 32b2475
%files
Seth Vidal 32b2475
%defattr(-, root, root)
e91c2dc
e91c2dc
# executables
e91c2dc
%{_bindir}/mock
e91c2dc
%attr(0755, root, root) %{_sbindir}/mock
a38a5bb
a38a5bb
# python stuff
a38a5bb
%{python_sitelib}/*
a38a5bb
a38a5bb
# config files
Seth Vidal 32b2475
%dir  %{_sysconfdir}/%{name}
Seth Vidal 32b2475
%config(noreplace) %{_sysconfdir}/%{name}/*.cfg
a38a5bb
%config(noreplace) %{_sysconfdir}/%{name}/*.ini
e91c2dc
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
e91c2dc
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
a38a5bb
e91c2dc
# docs
ef5fe3f
%{_mandir}/man1/mock.1*
e91c2dc
%doc ChangeLog
e91c2dc
e91c2dc
# build dir
Seth Vidal 32b2475
%attr(02775, root, mock) %dir /var/lib/mock
Seth Vidal 32b2475
Seth Vidal 32b2475
%changelog
1ec8a8d
* Thu Nov 06 2008 Jesse Keating <jkeating@redhat.com> - 0.9.13-1
1ec8a8d
- Add configs for F10 (jkeating)
1ec8a8d
6ed693f
* Tue Oct 14 2008 Clark Williams <williams@redhat.com> - 0.9.12-1
6ed693f
- internal setarch support for s390/s390x (mikem)
6ed693f
- Refer to the .newkey location of current Fedora 8/9 updates. (jkeating)
6ed693f
- [bz458234] Picked up corrected patch (pmatilai)
6ed693f
f84c4e6
* Thu Sep  4 2008 Clark Williams <williams@redhat.com> - 0.9.11-1
f84c4e6
- added workarounds for rawhide rpm (BZ 455387 and 458234)
f84c4e6
- disabled tmpfs plugin on epel-4-x86_64
f84c4e6
- fixed autotools breakage in configure.ac
f84c4e6
0c7d649
* Tue May 20 2008 Jesse Keating <jkeating@redhat.com> - 0.9.10-1
0c7d649
- added fix for building F-8 mock (clark)
0c7d649
- Update epel configs
d70366e
6576b97
* Tue Apr 22 2008 Jesse Keating <jkeating@redhat.com> - 0.9.9-1
6576b97
- Update config files for Fedora 9
6576b97
- Comment out multilib excludes, no longer needed in F9+ with yum multilib changes
6576b97
6576b97
* Mon Mar 31 2008 Jesse Keating <jkeating@redhat.com> - 0.9.8-1
6576b97
- modify rootcache logic to rebuild cache if config files have newer timestamp
6576b97
- For Fedora 8 and higher, use priority failover method
6576b97
- Point to the correct static-repo for rawhide stuff.
6576b97
- Move "devel" to "rawhide" to match current Fedora naming schemes.
6576b97
e91c2dc
* Thu Jan 31 2008 Michael Brown <mebrown@michaels-house.net> - 0.9.7-1
e91c2dc
- redo mock.util.do() to use python subprocess module, which should be
e91c2dc
  much more maintainable than our old homegrown code.
e91c2dc
- Fix exclude= lines once again. Yum fnmatch parser doesnt understand [!x]
e91c2dc
  notation
e91c2dc
- add --unpriv and --cwd options to run chroot commands without elevated privs
e91c2dc
  and in a specific working directory (under the root).
e91c2dc
- mount all filesystems when running chroot commands
e91c2dc
- remove redundant ccache init since we now source /etc/profile.d/ccache.sh
e91c2dc
e91c2dc
* Wed Jan 16 2008 Clark Williams <williams@redhat.com> - 0.9.6-1
e91c2dc
- renamed configs and put compat symlinks in place
e91c2dc
- misc cleanups (whitespace fixes, info messages, etc.)
e91c2dc
- tmpfs plugin fix
e91c2dc
- split --target and --arch command line arguments
e91c2dc
- changed from -l to --login on bash invocations
e91c2dc
- create /dev/full in chroot
e91c2dc
e91c2dc
* Thu Dec 20 2007 Michael Brown <mebrown@michaels-house.net> - 0.9.5-1
04fdbcb
- really fix file-based BuildRequires
e91c2dc
e91c2dc
* Wed Dec 19 2007 Michael Brown <mebrown@michaels-house.net> - 0.9.4-1
04fdbcb
- Result dir was not honoring --uniqueext=
04fdbcb
- make rpmbuild run under a chroot login shell
04fdbcb
- mock is now noarch due to drop of all binary components
04fdbcb
- add tmpfs plugin (disabled by default)
04fdbcb
- slightly more friendly logs.
e91c2dc
e91c2dc
* Fri Dec 14 2007 Clark Williams <williams@redhat.com> - 0.9.3-1
04fdbcb
- added '--copyin' and '--copyout' modes
04fdbcb
- added makeChrootPath() method to Root
04fdbcb
- replaced most ad hock usages of .rootdir with makeChrootPath()
04fdbcb
- updated man page && added test cases
e91c2dc
- added 'help' target to Makefile.am
9e88721
9e88721
* Thu Dec 13 2007 Michael Brown <mebrown@michaels-house.net> - 0.9.2-1
9e88721
- add '--update' mode
9e88721
- fix '--shell' mode
9e88721
e91c2dc
* Tue Dec 11 2007 Michael Brown <mebrown@michaels-house.net> - 0.9.1-1
e91c2dc
- fix 'mock shell' command when passing more than one arg.
e91c2dc
- add --orphanskill mode which only does orphankill
e91c2dc
- make 'mock --shell' noninteractive and logged to root.log
e91c2dc
- fix for file-based BuildRequires
e91c2dc
- add sparcs to constant list for auto-setarch
e91c2dc
10317fe
* Tue Dec 11 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.17-1
10317fe
- fix 'mock shell' command when passing more than one arg.
10317fe
- add --orphanskill mode which only does orphankill
10317fe
- make 'mock --shell' noninteractive and logged to root.log
10317fe
- fix for file-based BuildRequires
10317fe
- add sparcs to constant list for auto-setarch
10317fe
e91c2dc
* Sun Dec 09 2007 Michael Brown <mebrown@michaels-house.net> - 0.9.0-1
e91c2dc
- drop suid helper and use consolehelper instead.
e91c2dc
- add unshare() call rather than clone(CLONE_NEWNS...)
e91c2dc
f396677
* Sun Dec 09 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.16-1
f396677
- drop FC6 configs. FC6 no longer supported
f396677
- add --trace cmdline parameter
f396677
- make logs slightly less verbose
f396677
71a7a35
* Wed Dec 05 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.15-1
71a7a35
- fix traceback when root cache doesnt exist.
71a7a35
- add "--with", "--without", and "--define" cmdline parameters which are passed
71a7a35
  to rpmbuild (courtesy Todd Zullinger)
71a7a35
f5a8a7d
* Tue Dec 04 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.14-1
f5a8a7d
- fix traceback when cache dir was not found
f5a8a7d
f5a8a7d
* Tue Dec 04 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.13-1
f5a8a7d
- brown-paper-bag bug where built rpm didnt work due to lack of path 
f5a8a7d
  substitution in mock.py
f5a8a7d
a3a90ac
* Mon Dec 03 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.12-1
a3a90ac
- fix builds of multiple srpms
a3a90ac
- fix 'mock install'
a3a90ac
- use python-decoratortools for better python 2.3 back compat
a3a90ac
7d3536c
* Thu Nov 29 2007 Clark Williams <williams@redhat.com> - 0.8.11-1
7d3536c
- fixes from mebrown:
04fdbcb
-   added back -q and -v flags
04fdbcb
-   print yum output by default
04fdbcb
-   added --offline option
04fdbcb
-   cleaned up uid handling
7d3536c
9c9c0d0
* Mon Nov 26 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.10-1
9c9c0d0
- fix 'shell' command
9c9c0d0
- fix a couple different selinux avc denial messages (didnt affect functionality)
9c9c0d0
8a75f62
* Tue Nov 20 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.9-1
8a75f62
- Fixes so that mock will run cleanly on RHEL5
8a75f62
- Add glib-devel.i386, glib2-devel.i386 to yum exclude list as it breaks
8a75f62
  builds.
8a75f62
- Add backwards-compatibility code for old-style 'automatically assume rebuild'
8a75f62
  convention
8a75f62
- automake symlink accidentally included in tarball rather than file
8a75f62
  (py-compile)
8a75f62
- update manpage
8a75f62
78f2d7f
* Mon Nov 19 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.8-1
78f2d7f
- make it run correctly when called by the 'root' user
78f2d7f
- internal_setarch: optionally run 'setarch' internally. This
78f2d7f
  eliminates the need to run "setarch i386 mock ..." when building on
78f2d7f
  target_arch != build_arch. This is turned on by default. Limitations:
78f2d7f
  must have 'ctypes' python module available, which is only available
78f2d7f
  by default in python 2.5, or as an extension module in <= 2.4.
78f2d7f
  If the 'ctypes' module is not available, this feature will be
78f2d7f
  disabled and you must manually run 'setarch'.
78f2d7f
- Does not run 'clean' action for 'shell', 'chroot', 'install', or
78f2d7f
  'installdeps' (docs updated)
78f2d7f
- fix build for top_builddir != top_srcdir
78f2d7f
- fix 'installdeps' so that it works with both rpms/srpms
78f2d7f
- missing device file /dev/ptmx was causing 'expect' command to always
78f2d7f
  fail. Affected any SRPM build that used 'expect'.
78f2d7f
- hard spec file dep on python >= 2.4 due to python syntax changes.
78f2d7f
- resultdir can now contain python-string substitutions for any
78f2d7f
  variable in the chroot config.
78f2d7f
  rebuild my.src.rpm
78f2d7f
- add 'dist' variable to all chroot config files so that it is
78f2d7f
  available for resultdir substitutions.
78f2d7f
- give good error message when logging.ini cannot be found.
78f2d7f
- change default logging format to remove verbosity from build.log.
78f2d7f
- make logging format configurable from defaults.cfg or chroot cfg.
78f2d7f
- less verbose state.log format
78f2d7f
7acbf69
* Mon Oct 22 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.4-1
7acbf69
- fix reported 'bad owner/group' from rpm in some configurations.
7acbf69
90d8baf
* Mon Oct 22 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.3-1
90d8baf
- BZ# 336361 -- cannot su - mockbuild
90d8baf
- BZ# 326561 -- update manpage
90d8baf
- BZ# 235141 -- error with immutable bit
90d8baf
a38a5bb
* Fri Oct 20 2007 Michael Brown <mebrown@michaels-house.net> - 0.8.0-1
a38a5bb
- huge number of changes upstream
a38a5bb
- convert to setuid wrapper instead of old setuid helper
a38a5bb
- lots of bugfixes and improvements
a38a5bb
- /var/cache/yum now saved and bind-mounted
a38a5bb
- ccache integration
a38a5bb
- rootcache improvements (formerly called autocache)
a38a5bb
68ca6ab
* Mon Aug 27 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.6-1
68ca6ab
- ensure /etc/hosts is created in chroot properly
68ca6ab
df1e00d
* Mon Aug 13 2007 Clark Williams <williams@redhat.com> - 0.7.5-2
df1e00d
- build fix from Roland McGrath to fix compile of selinux lib
df1e00d
c1be951
* Wed Aug 8 2007 Clark Williams <williams@redhat.com> - 0.7.5-1
c1be951
- orphanskill feature (BZ#221351)
c1be951
c1be951
* Wed Aug 8 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.5-1
c1be951
- add example configs to defaults.cfg
c1be951
- dont rebuild cache if not clean build (BZ#250425)
c1be951
694ab0b
* Wed Jul 18 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.4-1
694ab0b
- return child exit status, so we properly report subcommand failures
694ab0b
4af962c
* Fri Jul  6 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.3-1
4af962c
- remove redundant defaults.cfg entries.
4af962c
4af962c
* Wed Jun 20 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.2-1
4af962c
- fix exclude list
4af962c
- remove legacy configs
4af962c
- disable 'local' repos by default (koji-repos)
4af962c
6363114
* Wed Jun 13 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.1-1
6363114
- Fix problem with autocache where different users couldnt share same cache
6363114
- Fix problem creating resolv.conf in rootfs
6363114
- cleanup perms on rootfs /etc/
6363114
6363114
* Tue Jun 12 2007 Michael Brown <mebrown@michaels-house.net> - 0.7.1-1
6363114
- add EPEL 5 config files
6363114
c118de4
* Mon Jun 11 2007 Clark Williams <williams@redhat.com> - 0.7-1
c118de4
- fixed bind mount problems
c118de4
- added code to allow multiple users to use --no-clean
c118de4
- merged mock-0-6-branch to head and changed version
c118de4
c118de4
* Thu Jun  7 2007 Clark Williams <williams@redhat.com> - 0.6.17-1
c118de4
- added F-7 config files (BZ#242276)
c118de4
- modified epel configs for changed mirrorlist location (BZ#239981)
c118de4
- added bind mount of /dev (BZ#236428)
c118de4
- added copy of /etc/resolv.conf to chroot (BZ#237663 and BZ#238101)
c118de4
c118de4
* Tue May 01 2007 Clark Williams <williams@redhat.com> - 0.6.16-1
c118de4
- timeout code adds new cmdline option that will kill build process after
c118de4
  specified timeout. Useful for automated builds of things that may hang during
c118de4
  build and you just want it to fail.
c118de4
c118de4
* Tue Apr 10 2007 Clark Williams <williams@redhat.com> - 0.6.15-1
c118de4
- Fixed typo in FC4 -epel configs (BZ 235490)
c118de4
c118de4
* Sat Feb 24 2007 Clark Williams <williams@redhat.com> - 0.6.14-1
c118de4
- Ville Skyttä's fix for RPM_OPT_FLAGS (BZ 226673)
c118de4
c118de4
* Tue Feb 20 2007 Clark Williams <williams@redhat.com> - 0.6.13-1
c118de4
- Handle --no-clean option when doing yum.conf symlink (BZ 230824)
c118de4
acb05c0
* Fri Feb 16 2007 Clark Williams <williams@redhat.com> - 0.6.12-1
acb05c0
- added safety symlink for yum.conf
acb05c0
c118de4
* Wed Feb  7 2007 Clark Williams <williams@redhat.com> - 0.6.11-1
bd82605
- added error() calls to print command output on failed commands
c118de4
c118de4
* Tue Feb  6 2007 Clark Williams <williams@redhat.com> - 0.6.11-1
bd82605
- added installdeps command for long-term chroot management
bd82605
3a9c95c
* Mon Jan  8 2007 Clark Williams <williams@redhat.com> - 0.6.10-1
3a9c95c
- Added Josh Boyer's EPEL config files
3a9c95c
3a9c95c
* Tue Nov 21 2006 Clark Williams <williams@redhat.com> - 0.6.9-1
3a9c95c
- applied Eric Work's patch to fix defaults vs. command line option problem
3a9c95c
  (BZ 215168)
3a9c95c
- use /etc/mock/defaults.cfg if --configdir specified and no defaults found
3a9c95c
  in the specified configdir
3a9c95c
  (BZ 209407)
3a9c95c
- applied Jesse Keatings patch for arch specifi config files
3a9c95c
  (BZ 213516)
3a9c95c
5322e06
* Mon Oct 30 2006 Clark Williams <williams@redhat.com> - 0.6.8-1
5322e06
- respun tarballs without buildsys rpms
5322e06
377e791
* Mon Oct 30 2006 Clark Williams <williams@redhat.com> - 0.6.7-1
377e791
- updated for FC6 release
377e791
377e791
* Sat Oct 21 2006 Clark Williams <williams@redhat.com> - 0.6.6-1
377e791
- bumped version to 0.6.6 (fixed tarball problem)
377e791
c118de4
* Mon Sep 11 2006 Clark Williams <williams@redhat.com> - 0.6.5-1
c118de4
- changed version number for patch from Karanbir Singh
c118de4
  (rpm workaround on CentOS 4.4)
e087a33
c118de4
* Tue Aug 29 2006 Clark Williams <williams@redhat.com> - 0.6.3-1
c118de4
- changed version number to indicate fix for bz 204051
4512331
c118de4
* Tue Aug 29 2006 Clark Williams <williams@redhat.com> - 0.6.2-2
c118de4
- bumped revision for bz 204051
4a3346f
c118de4
* Wed Aug 23 2006 Clark Williams <williams@redhat.com> - 0.6.2-1
c118de4
- Updated README
c118de4
- Fixed link problem in etc/Makefile
c118de4
- Bumped version number
10da02d
c118de4
* Wed Aug 16 2006 Clark Williams <williams@redhat.com>
c118de4
- Added buildsys-build specfile to docs
c118de4
- Added disttag
c118de4
- Bumped release number
Seth Vidal d967c7b
c118de4
* Wed Jun  7 2006 Seth Vidal <skvidal at linux.duke.edu>
c118de4
- version update
a898638
c118de4
* Tue Apr 11 2006 Seth Vidal <skvidal at linux.duke.edu>
c118de4
- specfile version iterate
c5cd703
ef5fe3f
* Tue Dec 27 2005 Seth Vidal <skvidal@phy.duke.edu>
ef5fe3f
- add patch from Andreas Thienemann - adds man page
ef5fe3f
ef5fe3f
* Sat Jun 11 2005 Seth Vidal <skvidal@phy.duke.edu>
ef5fe3f
- security fix in mock-helper
ef5fe3f
Seth Vidal 32b2475
* Sun Jun  5 2005 Seth Vidal <skvidal@phy.duke.edu>
Seth Vidal 32b2475
- clean up packaging for fedora extras
Seth Vidal 32b2475
Seth Vidal 32b2475
* Thu May 19 2005 Seth Vidal <skvidal@phy.duke.edu>
Seth Vidal 32b2475
- second packaging and backing down the yum ver req
Seth Vidal 32b2475
Seth Vidal 32b2475
* Sun May 15 2005 Seth Vidal <skvidal@phy.duke.edu>
Seth Vidal 32b2475
- first version/packaging