From 9a32023e558fec779457c500cc5c1c738a8195cd Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 14 Dec 2009 17:48:16 +0000 Subject: [PATCH] initial --- Makefile | 100 ++++++++++++++ rpmmacros.in | 7 + rpmmacros.sh | 1 + sources | 1 + yum.spec | 377 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 486 insertions(+) create mode 100644 Makefile create mode 100644 rpmmacros.in create mode 100755 rpmmacros.sh create mode 100644 sources create mode 100644 yum.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d5bc79d --- /dev/null +++ b/Makefile @@ -0,0 +1,100 @@ +# +# $Id: Makefile 16118 2009-12-14 11:43:31Z thierry $ +# $URL: svn+ssh://thierry@svn.planet-lab.org/svn/linux-2.6/branches/f12/Makefile $ +# +CURL ?= $(shell if test -f /usr/bin/curl ; then echo "curl -H Pragma: -O -R -S --fail --show-error" ; fi) +WGET ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi) +CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET))) +AWK = awk +SHA1SUM = sha1sum +SED = sed + +# this is passed on the command line as the full path to /SPECS/kernel.spec +SPECFILE = kernel.spec + +# Thierry - when called from within the build, PWD is /build +PWD=$(shell pwd) + +# get nevr from specfile. +ifndef NAME +NAME := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{NAME}\n" --specfile $(SPECFILE) | head -1) +endif +ifndef EPOCH +EPOCH := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{EPOCH}\n" --specfile $(SPECFILE) | head -1 | sed 's/(none)//') +endif +ifeq ($(EPOCH),(none)) +override EPOCH := "" +endif +ifndef VERSION +VERSION := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{VERSION}\n" --specfile $(SPECFILE)| head -1) +endif +ifndef RELEASE +RELEASE := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{RELEASE}\n" --specfile $(SPECFILE)| head -1) +endif + +define get_sources_sha1 +$(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$1; exit; }') +endef +define get_sources_url +$(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$2; exit; }') +endef +SOURCEFILES := $(shell cat sources 2>/dev/null | awk '{ print gensub("^.*/", "", 1, $$2) }') +SOURCE_RPM := $(firstword $(SOURCEFILES)) + +sources: $(SOURCEFILES) $(TARGETS) + +$(SOURCEFILES): #FORCE + @if [ ! -e "$@" ] ; then echo "$(CLIENT) $(get_sources_url)" ; $(CLIENT) $(get_sources_url) ; fi + @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi + @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(get_sources_sha1)" ; then \ + echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \ + echo "Local copy: $$(sha1sum $@)" ; \ + echo "In sources: $$(grep $@ sources)" ; \ + exit 1 ; \ + else \ + ls -l $@ ; \ + fi + +download-sources: + @for i in $(SOURCES); do \ + if [ ! -e "$${i##*/}" ]; then \ + echo "$(CLIENT) $$i"; \ + $(CLIENT) $$i; \ + fi; \ + done + +replace-sources: + rm -f sources + @$(MAKE) new-sources + +new-sources: download-sources + @for i in $(SOURCES); do \ + echo "$(SHA1SUM) $$i >> sources"; \ + $(SHA1SUM) $${i##*/} | $(AWK) '{ printf "%s %s\n", $$1, "'"$$i"'" }' >> sources; \ + done + +PREPARCH ?= noarch +RPMDIRDEFS = --define "_sourcedir $(PWD)/SOURCES" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)" +trees: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE) + +# use the stock source rpm, unwrap it, +# copy the downloaded material +# install our own specfile and patched patches +# and patch configs for IPV6 +# then rewrap with rpm +srpm: sources + mkdir -p SOURCES SRPMS + (cd SOURCES; rpm2cpio ../$(SOURCE_RPM) | cpio -diu; \ + cp ../$(notdir $(SPECFILE)) . ; cp ../yum*.patch . ; \ + for downloaded in $(SOURCEFILES) ; do cp ../$$downloaded . ; done ) + ./rpmmacros.sh + export HOME=$(shell pwd) ; rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE) + +TARGET ?= $(shell uname -m) +rpm: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE) + +clean: + rm -f *.rpm + diff --git a/rpmmacros.in b/rpmmacros.in new file mode 100644 index 0000000..7455590 --- /dev/null +++ b/rpmmacros.in @@ -0,0 +1,7 @@ +%_topdir PWD +%_tmppath PWD/tmp +%__spec_install_pre %{___build_pre} +%_install_langs C:en_US:en +%_netsharedpath /proc:/dev/pts:/usr/share/info +%_excludedocs 1 +%__file_context_path /dev/null diff --git a/rpmmacros.sh b/rpmmacros.sh new file mode 100755 index 0000000..a87f785 --- /dev/null +++ b/rpmmacros.sh @@ -0,0 +1 @@ +sed -e "s,PWD,$(pwd),g" rpmmacros.in > .rpmmacros diff --git a/sources b/sources new file mode 100644 index 0000000..a39c692 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +5dc5dba773a4c0e685036ec56b43dffc042b8134 http://build.onelab.eu/third-party/f12/yum-3.2.25-2.fc12.src.rpm diff --git a/yum.spec b/yum.spec new file mode 100644 index 0000000..888dcce --- /dev/null +++ b/yum.spec @@ -0,0 +1,377 @@ +%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%global release 2-chroot + +Summary: RPM installer/updater +Name: yum +Version: 3.2.25 +Release: %release +License: GPLv2+ +Group: System Environment/Base +Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz +Source1: yum.conf.fedora +Source2: yum-updatesd.conf.fedora +Patch0: installonlyn-enable.patch +Patch1: yum-mirror-priority.patch +Patch2: yum-manpage-files.patch +Patch3: yum-multilib-policy-best.patch +Patch4: no-more-exactarchlist.patch +Patch5: geode-arch.patch +Patch10: yum-3.2.25-chroot.patch + +URL: http://yum.baseurl.org/ +BuildArch: noarch +BuildRequires: python +BuildRequires: gettext +BuildRequires: intltool +Conflicts: pirut < 1.1.4 +Requires: python >= 2.4, rpm-python, rpm >= 0:4.4.2 +Requires: python-iniparse +Requires: python-sqlite +Requires: python-urlgrabber >= 3.9.0-8 +Requires: yum-metadata-parser >= 1.1.0 +Requires: pygpgme +Obsoletes: yum-skip-broken, yum-basearchonly +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Yum is a utility that can check for and automatically download and +install updated RPM packages. Dependencies are obtained and downloaded +automatically prompting the user as necessary. + +%package updatesd +Summary: Update notification daemon +Group: Applications/System +Requires: yum = %{version}-%{release} +Requires: dbus-python +Requires: pygobject2 +Requires(preun): /sbin/chkconfig +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(post): /sbin/service + +%description updatesd +yum-updatesd provides a daemon which checks for available updates and +can notify you when they are available via email, syslog or dbus. + +%prep +%setup -q +%patch1 -p0 +#%%%patch2 -p0 +%patch3 -p0 +%patch4 -p0 +%patch5 -p1 +%patch10 -p1 + +%build +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/yum.conf +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d $RPM_BUILD_ROOT/usr/lib/yum-plugins + +# for now, move repodir/yum.conf back +mv $RPM_BUILD_ROOT/%{_sysconfdir}/yum/repos.d $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d +rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/yum/yum.conf + +# yum-updatesd has moved to the separate source version +rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/yum/yum-updatesd.conf +rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/yum-updatesd +rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/dbus-1/system.d/yum-updatesd.conf +rm -f $RPM_BUILD_ROOT/%{_sbindir}/yum-updatesd +rm -f $RPM_BUILD_ROOT/%{_mandir}/man*/yum-updatesd* +rm -f $RPM_BUILD_ROOT/%{_datadir}/yum-cli/yumupd.py* + +%find_lang %name + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f %{name}.lang +%defattr(-, root, root, -) +%doc README AUTHORS COPYING TODO INSTALL ChangeLog +%config(noreplace) %{_sysconfdir}/yum.conf +%dir %{_sysconfdir}/yum +%config(noreplace) %{_sysconfdir}/yum/version-groups.conf +%dir %{_sysconfdir}/yum.repos.d +%config(noreplace) %{_sysconfdir}/logrotate.d/yum +%dir %{_datadir}/yum-cli +%{_datadir}/yum-cli/* +%{_bindir}/yum +%{python_sitelib}/yum +%{python_sitelib}/rpmUtils +%dir /var/cache/yum +%dir /var/lib/yum +%{_mandir}/man*/yum.* +%{_mandir}/man*/yum-shell* +# plugin stuff +%dir %{_sysconfdir}/yum/pluginconf.d +%dir /usr/lib/yum-plugins + +%changelog +* Wed Oct 14 2009 Seth Vidal - 3.2.25-1 +- 3.2.25 + +* Wed Sep 30 2009 Seth Vidal - 3.2.24-9 +- revert yum. import patch b/c it breaks a bunch of things + +* Wed Sep 30 2009 Seth Vidal - 3.2.24-8 +- fix up broken build b/c of version-groups.conf file + +* Tue Sep 29 2009 Seth Vidal - 3.2.24-7 +- fixes for odd outputs from ts.run and logs for what we store in history + +* Wed Sep 23 2009 Seth Vidal - 3.2.24-6 +- new head patch - fixes some issues with history and chroots + +* Mon Sep 21 2009 Seth Vidal - 3.2.24-5 +- latest head patch - includes yum history feature. + +* Tue Sep 15 2009 Seth Vidal - 3.2.24-4 +- new head patch - translation updates and a few bug fixes + +* Wed Sep 9 2009 Seth Vidal - 3.2.24-3 +- add geode arch patch for https://bugzilla.redhat.com/show_bug.cgi?id=518415 + + +* Thu Sep 3 2009 Seth Vidal - 3.2.24-2 +- modify cachedir to include variables + +* Thu Sep 3 2009 Seth Vidal - 3.2.24-1 +- 3.2.24 + +* Wed Sep 2 2009 Seth Vidal - 3.2.23-16 +- fix globbing issue 520810 + +* Mon Aug 31 2009 Seth Vidal - 3.2.23-15 +- one more head update - fixes some fairly ugly but kind of minor bugs + +* Tue Aug 18 2009 Seth Vidal - 3.2.23-14 +- update to latest head pre 3.2.24 +- add requirement on python-urlgrabber 3.9.0 and up + +* Wed Aug 5 2009 Seth Vidal - 3.2.23-13 +- latest head - right after freeze + +* Tue Aug 4 2009 Seth Vidal - 3.2.23-12 +- latest head - right before freeze :) + +* Mon Jul 27 2009 Fedora Release Engineering - 3.2.23-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 22 2009 Seth Vidal - 3.2.23-10 +- remove exactarchlist by request for rawhide + +* Thu Jul 2 2009 Seth Vidal - 3.2.23-9 +- update to latest head - make livecd creation work again in rawhide +- disable one of the man page patches until after 3.2.24 is released b/c + of the changes to the man page in the head patch + + +* Mon Jun 22 2009 James Antill - 3.2.23-8 +- Update to latest head: +- Fix old recursion bug, found by new code. +- Resolves: bug#507220 + +* Sun Jun 21 2009 James Antill - 3.2.23-6 +- Update to latest head: +- Unbreak delPackage() excludes. +- Other fixes/etc. + +* Fri Jun 19 2009 James Antill - 3.2.23-5 +- Actually apply the HEAD patch included yesterday :). + +* Thu Jun 18 2009 Seth Vidal - 3.2.23-4 +- update to latest head + +* Mon Jun 8 2009 Seth Vidal +- truncate changelog + +* Wed May 20 2009 Seth Vidal - 3.2.23-2 +- add patch to close rpmdb completely + +* Tue May 19 2009 Seth Vidal - 3.2.23-1 +- 3.2.23 + +* Mon May 11 2009 Seth Vidal - 3.2.22-5 +- jump up to almost 3.2.23. +- had to move patch0 around a bit until we rebase to 3.2.23 + +* Thu Apr 9 2009 James Antill - 3.2.22-4 +- fix typo for yum-complete-transaction message. + +* Wed Apr 8 2009 Seth Vidal - 3.2.22-3 +- fix for file:// urls which makes things in pungi/mash work + +* Tue Apr 7 2009 Seth Vidal - 3.2.22-2 +- yum-HEAD minus the yumdb patches + +* Tue Mar 24 2009 Seth Vidal - 3.2.22-1 +- 3.2.22 - 3 patches beyond 3.2.21-16 + +* Mon Mar 16 2009 Seth Vidal - 3.2.21-16 +- fix for 490490 + +* Fri Mar 13 2009 Seth Vidal - 3.2.21-15 +- update to upstream git to fix conditionals problem on anaconda installs + +* Thu Mar 12 2009 Seth Vidal - 3.2.21-14 +- latest HEAD + +* Tue Mar 10 2009 Seth Vidal - 3.2.21-13 +- f11beta build + +* Wed Mar 4 2009 Seth Vidal - 3.2.21-12 +- second verse, same as the first + +* Fri Feb 27 2009 Seth Vidal - 3.2.21-10 +- merge up a lot of fixes from latest HEAD + +* Wed Feb 25 2009 Fedora Release Engineering - 3.2.21-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Feb 10 2009 Seth Vidal - 3.2.21-9 +- merge up to latest yum head - sort of a pre 3.2.22 + +* Wed Feb 4 2009 Seth Vidal - 3.2.21-8 +- fix for YumHeaderPackages so it plays nicely w/createrepo and mergerepo, etc + +* Thu Jan 29 2009 Seth Vidal - 3.2.21-7 +- update HEAD patch to fix repodiff (and EVR comparisons in certain cases) + +* Tue Jan 27 2009 Seth Vidal - 3.2.21-6 +- patch to keep anaconda (and other callers) happy +- remove old 6hr patch which is now upstream + +* Mon Jan 26 2009 Seth Vidal - 3.2.21-4 +- patch to latest HEAD to test a number of fixes for alpha + +* Tue Jan 20 2009 Seth Vidal - 3.2.21-3 +- add a small patch to make things play a bit nicer with the logging module + in 2.6 + + +* Wed Jan 7 2009 Seth Vidal - 3.2.21-1 +- bump to 3.2.21 + +* Thu Dec 18 2008 James Antill - 3.2.20-8 +- merge latest from upstream +- move to 6hr metadata + +* Mon Dec 8 2008 Seth Vidal - 3.2.20-7 +- merge patch from upstream and remove now old obsoletes patch + +* Thu Dec 04 2008 Jesse Keating - 3.2.20-6 +- Add patch from upstream to fix cases where obsoletes are disabled. (jantill) + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 3.2.20-5 +- Rebuild for Python 2.6 + +* Wed Nov 26 2008 Seth Vidal - 3.2.20-4 +- update head patch + +* Wed Oct 29 2008 Seth Vidal - 3.2.20-3 +- full patch against HEAD for skipbroken fixes (among others) + +* Mon Oct 27 2008 James Antill - 3.2.20-2 +- Fix listTransaction for skipped packages. + +* Mon Oct 27 2008 Seth Vidal - 3.2.20-1 +- 3.2.20 + +* Thu Oct 23 2008 Seth Vidal - 3.2.19-6 +- update HEAD patch + +* Wed Oct 15 2008 Seth Vidal - 3.2.19-5 +- rebase against 3.2.X HEAD + +* Tue Oct 14 2008 Seth Vidal - 3.2.19-4 +- pull patch from git to bring us up to current(ish) + +* Wed Sep 3 2008 Seth Vidal - 3.2.19-3 +- add patch to fix yum install name.arch matching + +* Thu Aug 28 2008 Seth Vidal - 3.2.19-2 +- add patch to fix mash's parser use. + +* Wed Aug 27 2008 Seth Vidal - 3.2.19-1 +- 3.2.19 + +* Thu Aug 7 2008 Seth Vidal - 3.2.18-1 +- 3.2.18 + +* Wed Jul 10 2008 Seth Vidal - 3.2.17-2 +- add patch from upstream for bug in compare_providers + +* Wed Jul 9 2008 Seth Vidal - 3.2.17-1 +- 3.2.17 + +* Tue Jun 24 2008 Jesse Keating - 3.2.16-4 +- Add a couple more upstream patches for even more multilib fixes + +* Tue Jun 24 2008 Jesse Keating - 3.2.16-3 +- Add another patch from upstream for multilib policy and noarch + +* Sun May 18 2008 Seth Vidal 3.2.16-2 +- stupid, stupid, stupid + + +* Fri May 16 2008 Seth Vidal 3.2.16-1 +- 3.2.16 + +* Tue Apr 15 2008 Seth Vidal 3.2.14-9 +- nine is the luckiest number that there will ever be + +* Tue Apr 15 2008 Seth Vidal 3.2.14-8 +- after many tries - this one fixes translations AND pungi + +* Thu Apr 10 2008 Seth Vidal 3.2.14-5 +- once more, with feeling + +* Thu Apr 10 2008 Seth Vidal 3.2.14-4 +- another big-head-patch + +* Wed Apr 9 2008 Seth Vidal 3.2.14-3 +- apply patch to bring this up to where HEAD is now. + +* Tue Apr 8 2008 Seth Vidal 3.2.14-1 +- remove committed patch +- obsoletes yum-basearchonly + +* Tue Apr 1 2008 Seth Vidal 3.2.13-2 +- fix minor typo in comps.py for jkeating + +* Thu Mar 20 2008 Seth Vidal 3.2.13-1 +- 3.2.13 + +* Mon Mar 17 2008 Seth Vidal 3.2.12-5 +- update manpage patch to close bug 437703. Thakns to Kulbir Saini for the patch + + +* Fri Mar 14 2008 Seth Vidal 3.2.12-4 +- multilib_policy=best is now the default + +* Thu Mar 13 2008 Seth Vidal +- add jeff sheltren's patch to close rh bug 428825 + +* Tue Mar 4 2008 Seth Vidal 3.2.12-3 +- set failovermethod to 'priority' to make jkeating happy + +* Tue Mar 4 2008 Seth Vidal 3.2.12-2 +- fix mutually obsoleting providers (like glibc!) + +* Mon Mar 3 2008 Seth Vidal - 3.2.12-1 +- 3.2.12 + +* Fri Feb 8 2008 Seth Vidal - 3.2.11-1 +- 3.2.11 + +* Sun Jan 27 2008 James Bowes 3.2.10-3 +- Remove yumupd.py + +* Fri Jan 25 2008 Seth Vidal - 3.2.10-1 +- 3.2.10 +- add pygpgme dep + -- 2.43.0