From 13df4aa4d6f057f53fb295dce8ae1afffade000e Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Aug 25 2014 08:10:29 +0000 Subject: - Resurrect dependency logging on package build - Resurrect rpmlib() dependencies in src.rpms --- diff --git a/rpm-4.12-beta-print-deps.patch b/rpm-4.12-beta-print-deps.patch new file mode 100644 index 0000000..b7cb29e --- /dev/null +++ b/rpm-4.12-beta-print-deps.patch @@ -0,0 +1,51 @@ +commit 404f053f7829fa859209ded8399243dba851f263 +Author: Panu Matilainen +Date: Mon Aug 25 10:41:27 2014 +0300 + + Resurrect dependency spew during build + + - Since commit a357c99c58a5e1367160dfa692f26d14bd3a3df1 the dependencies + are no longer in the header so there's little to print from there. + As it happens things are much saner this way, we no longer need + to create rpmds'es just to print stuff. + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index e798950..f22053c 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -1110,7 +1110,7 @@ static DepMsg_t DepMsgs = depMsgs; + + /** + */ +-static void printDeps(rpmstrPool pool, Header h) ++static void printDeps(rpmfc fc) + { + DepMsg_t dm; + rpmds ds = NULL; +@@ -1120,8 +1120,7 @@ static void printDeps(rpmstrPool pool, Header h) + + for (dm = DepMsgs; dm->msg != NULL; dm++) { + if (dm->ntag != -1) { +- rpmdsFree(ds); +- ds = rpmdsNewPool(pool, h, dm->ntag, 0); ++ ds = rpmfcDependencies(fc, dm->ntag); + } + if (dm->ftag == 0) + continue; +@@ -1148,7 +1147,6 @@ static void printDeps(rpmstrPool pool, Header h) + if (bingo) + rpmlog(RPMLOG_NOTICE, "\n"); + } +- rpmdsFree(ds); + } + + static rpmRC rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi) +@@ -1333,7 +1331,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) + free(msg); + } + exit: +- printDeps(fc ? fc->pool : NULL, pkg->header); ++ printDeps(fc); + + /* Clean up. */ + free(fmode); diff --git a/rpm-4.12-beta-srpm-deps.patch b/rpm-4.12-beta-srpm-deps.patch new file mode 100644 index 0000000..65cac33 --- /dev/null +++ b/rpm-4.12-beta-srpm-deps.patch @@ -0,0 +1,33 @@ +commit 8b540fbf1bb77320772b87d40518d761f62752b3 +Author: Panu Matilainen +Date: Mon Aug 25 11:03:00 2014 +0300 + + Resurrect rpmlib() dependencies on source rpms + + - Commit 0bda2faa4de368a87f85084856a5fed701774acb caused a regression + where rpmlib() dependencies are no longer added to src.rpm packages + as the header is populated early, whereas rpmlib() dependencies + get added late in the game. So nothing was pushing the rpmlib + stuff to header. Sigh. + +diff --git a/build/pack.c b/build/pack.c +index 71d75f5..4aa4a66 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -708,6 +708,16 @@ rpmRC packageSources(rpmSpec spec, char **cookie) + headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost()); + headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); + ++ for (int i=0; iheader, rpmdsTagN(sourcePkg->dependencies[i])); ++ headerDel(sourcePkg->header, rpmdsTagEVR(sourcePkg->dependencies[i])); ++ headerDel(sourcePkg->header, rpmdsTagF(sourcePkg->dependencies[i])); ++ headerDel(sourcePkg->header, rpmdsTagTi(sourcePkg->dependencies[i])); ++ /* ...and add again, now with automatic dependencies included */ ++ rpmdsPutToHeader(sourcePkg->dependencies[i], sourcePkg->header); ++ } ++ + /* XXX this should be %_srpmdir */ + { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL); + char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL); diff --git a/rpm.spec b/rpm.spec index 112e05f..81a28d7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}5%{?dist} +Release: %{?snapver:0.%{snapver}.}6%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -51,6 +51,8 @@ Patch4: rpm-4.8.1-use-gpg2.patch Patch100: rpm-4.12-beta1-fix-buildrequires.patch Patch101: rpm-4.12-beta1-spec-header-deps.patch Patch102: rpm-4.12-beta-triggerindex.patch +Patch103: rpm-4.12-beta-print-deps.patch +Patch104: rpm-4.12-beta1-srpm-deps.patch # These are not yet upstream # Emergency hack for rpmdeps crash (#1131892) @@ -531,6 +533,10 @@ exit 0 %doc doc/librpm/html/* %changelog +* Mon Aug 25 2014 Panu Matilainen - 4.12.0-0.beta1.6 +- Resurrect dependency logging on package build +- Resurrect rpmlib() dependencies in src.rpms + * Wed Aug 20 2014 Panu Matilainen - 4.12.0-0.beta1.5 - Fix duplicate trigger indexes caused by beta1.3 fix (#1131960)