Merge some patches from cooker, drop haskell generators (superseeded by separate haskell-macros)

This commit is contained in:
Denis Silakov 2014-02-27 02:55:55 -05:00
parent a4138a265b
commit 1cd79e1c70
13 changed files with 334 additions and 300 deletions

View file

@ -0,0 +1,14 @@
Index: rpm/lib/psm.c
RCS File: /v/rpm/cvs/rpm/lib/psm.c,v
rcsdiff -q -kk '-r2.399.2.5' '-r2.399.2.6' -u '/v/rpm/cvs/rpm/lib/psm.c,v' 2>/dev/null
--- rpm/lib/psm.c 2012/04/19 17:26:06 2.399.2.5
+++ rpm/lib/psm.c 2012/12/03 19:48:55 2.399.2.6
@@ -2755,7 +2755,7 @@
psm->scriptTag = RPMTAG_POSTIN;
psm->progTag = RPMTAG_POSTINPROG;
psm->sense = RPMSENSE_TRIGGERIN;
- psm->countCorrection = 0;
+ psm->countCorrection = 1;
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) {
rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT);

View file

@ -0,0 +1,41 @@
--- rpm-5.4.10/perl/Makefile.PL.in.droprpath~ 2012-03-23 00:45:15.000000000 +0100
+++ rpm-5.4.10/perl/Makefile.PL.in 2013-01-06 23:30:23.640064511 +0100
@@ -6,8 +6,6 @@ use ExtUtils::MakeMaker;
my @libdir = qw(. build lib popt rpmdb rpmio misc rpmconstant);
-# use $ORIGIN relative paths to avoid LD_LIBRARY_PATH nonsense in tree
-my @ldaddr = map { '-Wl,-rpath,\$$\ORIGIN/../../../../../' . $_ . '/.libs' } @libdir;
my @ldaddp = map { '-L@top_builddir@/' . $_ . '/.libs' } @libdir;
my @ldadd = map { '-l' . $_ } qw(rpmmisc rpmio rpmbuild rpm popt rpmdb rpmconstant);
@@ -62,17 +60,16 @@ sub xs_o {
}
WriteMakefile(
- 'NAME' => 'RPM',
- 'OBJECT' => join(' ', @objects),
- 'VERSION' => '@VERSION@',
- 'MAKEFILE'=> 'Makefile.perl',
- 'CCFLAGS' => join(' ', '@CFLAGS@', '-Wno-unused-variable', '-Wno-missing-prototypes', '-Wno-implicit', '-Wno-strict-prototypes'),
- 'dynamic_lib' => {
- OTHERLDFLAGS => join(' ', @ldaddp, @ldadd, @ldlibs, @ldaddr)
- },
- 'OPTIMIZE'=> '-g',
- 'INC' => join(' ', @cppflags, map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@',
- 'INSTALLMAN1DIR' => '@mandir@/man1',
- 'INSTALLMAN3DIR' => '@mandir@/man3',
- @PERL_INSTALLDIRS@
+ 'NAME' => 'RPM',
+ 'OBJECT' => join(' ', @objects),
+ 'VERSION' => '@VERSION@',
+ 'MAKEFILE'=> 'Makefile.perl',
+ 'CCFLAGS' => join(' ', '@CFLAGS@', '-Wno-unused-variable', '-Wno-missing-prototypes', '-Wno-implicit', '-Wno-strict-prototypes'),
+ 'dynamic_lib' => { OTHERLDFLAGS => join(' ', @ldaddp, @ldadd, @ldlibs) },
+ 'OPTIMIZE'=> '-g',
+ 'INC' => join(' ', @cppflags, map { '-I@top_srcdir@/'. $_ } @libdir) . ' @CPPFLAGS@',
+ 'INSTALLMAN1DIR' => '@mandir@/man1',
+ 'INSTALLMAN3DIR' => '@mandir@/man3',
+ @PERL_INSTALLDIRS@
);
+

View file

@ -0,0 +1,12 @@
--- rpm-5.4.10/macros/mandriva.in.ldflags~ 2012-10-30 09:49:34.586248202 +0100
+++ rpm-5.4.10/macros/mandriva.in 2012-10-31 13:12:19.439849728 +0100
@@ -349,7 +349,8 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} -
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
- %(if [ -n '%ldflags' ]; then echo 'LDFLAGS="$LDFLAGS%ldflags"; export LDFLAGS ;'; fi)
+ %{?ldflags:LDFLAGS="${LDFLAGS:-%{ldflags}}"; export LDFLAGS ;} \
+ %{nil}
%before_configure \
%setup_compile_flags \

View file

@ -0,0 +1,13 @@
--- rpm-5.4.10/macros/macros.rpmbuild.in.helper_order~ 2012-10-04 16:36:15.673593212 +0200
+++ rpm-5.4.10/macros/macros.rpmbuild.in 2012-10-30 08:59:38.687200958 +0100
@@ -399,9 +399,9 @@ echo "Patch #%{__patch_number} (%{basena
%{?buildroot:%{__rm} -rf '%{buildroot}'; %{__mkdir_p} '%{buildroot}'}
%__spec_install_body %{___build_body}
%__spec_install_post\
-%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
+%{?__debug_package:%{__debug_install_post}}\
%{nil}
%__spec_install_template #!%{__spec_install_shell}\
%{__spec_install_pre}\

View file

@ -0,0 +1,20 @@
--- rpm-5.4.10/macros/macros.rpmbuild.in.realpath~ 2013-01-04 19:05:11.947714307 +0100
+++ rpm-5.4.10/macros/macros.rpmbuild.in 2013-01-04 19:04:46.741328887 +0100
@@ -326,7 +326,7 @@ echo "Patch #%{__patch_number} (%{basena
%___build_args -e
%___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
%___build_pre \
- RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
+ RPM_BUILD_DIR=\"%{realpath:%{u2p:%{_builddir}}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
export RPM_BUILD_DIR RPM_OPT_FLAGS\
%{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
@@ -345,7 +345,7 @@ echo "Patch #%{__patch_number} (%{basena
\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
umask 022\
- cd "%{u2p:%{_builddir}}"\
+ cd "%{realpath:%{u2p:%{_builddir}}}"\
#%___build_body %{nil}

View file

@ -0,0 +1,53 @@
--- rpm-5.4.10/build/build.c.doc_post~ 2011-01-01 15:39:54.000000000 +0100
+++ rpm-5.4.10/build/build.c 2013-02-25 01:22:28.407418823 +0100
@@ -181,9 +181,9 @@ rpmRC doScript(Spec spec, int what, cons
break;
case RPMBUILD_STRINGBUF:
default:
- mTemplate = "%{___build_template}";
- mPost = "%{___build_post}";
- mCmd = "%{___build_cmd}";
+ mTemplate = "%{__spec_stringbuf_template}";
+ mPost = "%{__spec_stringbuf_post}";
+ mCmd = "%{__spec_stringbuf_cmd}";
break;
}
--- rpm-5.4.10/macros/macros.rpmbuild.in.doc_post~ 2013-02-25 01:22:28.400418746 +0100
+++ rpm-5.4.10/macros/macros.rpmbuild.in 2013-02-25 01:22:28.410418856 +0100
@@ -411,6 +411,22 @@ echo "Patch #%{__patch_number} (%{basena
#%{__spec_install_post}\
#%{nil}
+%__spec_stringbuf_shell %{___build_shell}
+%__spec_stringbuf_args %{___build_args}
+%__spec_stringbuf_cmd %{___build_cmd}
+%__spec_stringbuf_pre %{___build_pre}
+%__spec_stringbuf_body %{___build_body}
+%__spec_stringbuf_post\
+%{?__os_stringbuf_post}\
+%{nil}
+%__spec_stringbuf_template #!%{__spec_stringbuf_shell}\
+%{__spec_stringbuf_pre}\
+%{nil}
+
+#%{__spec_stringbuf_body}\
+#%{__spec_stringbuf_post}\
+#%{nil}
+
%__spec_check_shell %{___build_shell}
%__spec_check_args %{___build_args}
%__spec_check_cmd %{___build_cmd}
--- rpm-5.4.10/macros/mandriva.in.doc_post~ 2013-02-25 01:22:28.395418692 +0100
+++ rpm-5.4.10/macros/mandriva.in 2013-02-25 01:22:45.531606854 +0100
@@ -332,6 +332,10 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} -
%{?__spec_helper_post}%{?!__spec_helper_post:/usr/share/spec-helper/spec-helper} \
%{nil}
+%__os_stringbuf_post \
+ %{?__spec_helper_stringbuf_post} \
+%{nil}
+
#==============================================================================
# ---- specfile macros.
# Macro(s) here can be used reliably for reproducible builds.

View file

@ -0,0 +1,16 @@
--- rpm-5.4.10/macros/ruby.in.ruby_utf8~ 2012-12-27 22:56:04.080134683 +0100
+++ rpm-5.4.10/macros/ruby.in 2012-12-27 22:55:11.132459560 +0100
@@ -27,11 +27,13 @@
%__gem_helper %{_usrlibrpm}/gem_helper.rb
%gem_build(f:j:) \
+ export LC_CTYPE=UTF-8 \
%__gem_helper build \\\
%{-f:-f%{-f*}} \\\
%{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
%gem_install(i:n:C) \
+ export LC_CTYPE=UTF-8 \
DESTDIR=${DESTDIR:-%{buildroot}} \\\
%__gem_helper install \\\
--env-shebang --rdoc --ri --force --ignore-dependencies \\\

View file

@ -1,37 +1,34 @@
--- rpm-5.4.10/build/parseReqs.c.trigtrans~ 2012-07-17 15:13:13.100370300 +0200
+++ rpm-5.4.10/build/parseReqs.c 2012-07-17 15:13:13.224368749 +0200
@@ -66,6 +66,24 @@ rpmRC parseRCPOT(Spec spec, Package pkg,
--- rpm-5.4.10/build/parseReqs.c.trigtrans~ 2013-01-07 02:59:01.512080713 +0100
+++ rpm-5.4.10/build/parseReqs.c 2013-01-07 07:49:52.870600098 +0100
@@ -66,6 +66,22 @@ rpmRC parseRCPOT(Spec spec, Package pkg,
tagflags |= RPMSENSE_TRIGGERUN;
h = pkg->header;
break;
+#ifdef NOT_YET
+ case RPMTAG_TRIGGERPRETRANSIN:
+ tagflags |= RPMSENSE_TRIGGERPRETRANSIN;
+ tagflags |= (RPMSENSE_TRIGGERTRANS | RPMSENSE_TRIGGERPREIN);
+ h = pkg->header;
+ break;
+ case RPMTAG_TRIGGERPRETRANSUN:
+ tagflags |= RPMSENSE_TRIGGERPRETRANSUN;
+ tagflags |= (RPMSENSE_TRIGGERTRANS | RPMSENSE_TRIGGERUN);
+ h = pkg->header;
+ break;
+#endif
+ case RPMTAG_TRIGGERPOSTTRANSIN:
+ tagflags |= RPMSENSE_TRIGGERPOSTTRANSIN;
+ tagflags |= (RPMSENSE_TRIGGERTRANS | RPMSENSE_TRIGGERIN);
+ h = pkg->header;
+ break;
+ case RPMTAG_TRIGGERPOSTTRANSUN:
+ tagflags |= RPMSENSE_TRIGGERPOSTTRANSUN;
+ tagflags |= (RPMSENSE_TRIGGERTRANS | RPMSENSE_TRIGGERPOSTUN);
+ h = pkg->header;
+ break;
case RPMTAG_BUILDSUGGESTS:
case RPMTAG_BUILDENHANCES:
tagflags |= RPMSENSE_MISSINGOK;
--- rpm-5.4.10/build/parseScript.c.trigtrans~ 2012-07-17 15:13:13.110370175 +0200
+++ rpm-5.4.10/build/parseScript.c 2012-07-17 15:13:13.225368736 +0200
@@ -181,6 +181,36 @@ int parseScript(Spec spec, int parsePart
--- rpm-5.4.10/build/parseScript.c.trigtrans~ 2013-01-07 02:59:01.646083225 +0100
+++ rpm-5.4.10/build/parseScript.c 2013-01-07 04:52:54.973145392 +0100
@@ -181,6 +181,34 @@ int parseScript(Spec spec, int parsePart
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerpostun";
break;
+#ifdef NOT_YET
+ case PART_TRIGGERPRETRANSIN:
+ tag = RPMTAG_TRIGGERSCRIPTS;
+ tagflags = 0;
@ -46,7 +43,6 @@
+ progtag = RPMTAG_TRIGGERSCRIPTPROG;
+ partname = "%triggerpretransun";
+ break;
+#endif
+ case PART_TRIGGERPOSTTRANSIN:
+ tag = RPMTAG_TRIGGERSCRIPTS;
+ tagflags = 0;
@ -64,54 +60,52 @@
/* support "%sanitycheck" script/section */
case PART_SANITYCHECK:
tag = RPMTAG_SANITYCHECK;
--- rpm-5.4.10/build/parseSpec.c.trigtrans~ 2012-07-17 15:13:12.764374501 +0200
+++ rpm-5.4.10/build/parseSpec.c 2012-07-17 15:13:13.225368736 +0200
@@ -47,6 +47,12 @@ static struct PartRec {
--- rpm-5.4.10/build/parseSpec.c.trigtrans~ 2013-01-07 02:59:00.819067748 +0100
+++ rpm-5.4.10/build/parseSpec.c 2013-01-07 04:52:34.677862505 +0100
@@ -47,6 +47,10 @@ static struct PartRec {
{ PART_TRIGGERUN, 0, "%triggerun"},
{ PART_TRIGGERIN, 0, "%triggerin"},
{ PART_TRIGGERIN, 0, "%trigger"},
+#ifdef NOT_YET
+ { PART_TRIGGERPRETRANSIN,0, "%triggerpretransin"},
+ { PART_TRIGGERPRETRANSUN,0, "%triggerpretransun"},
+#endif
+ { PART_TRIGGERPOSTTRANSIN,0, "%triggerposttransin"},
+ { PART_TRIGGERPOSTTRANSUN,0, "%triggerposttransun"},
{ PART_VERIFYSCRIPT, 0, "%verifyscript"},
{ PART_SANITYCHECK, 0, "%sanitycheck"}, /* support "%sanitycheck" scriptlet */
{0, 0, NULL}
@@ -608,6 +614,12 @@ int parseSpec(rpmts ts, const char *spec
@@ -608,6 +612,10 @@ int parseSpec(rpmts ts, const char *spec
case PART_TRIGGERIN:
case PART_TRIGGERUN:
case PART_TRIGGERPOSTUN:
+#ifdef NOT_YET
+ case PART_TRIGGERPRETRANSIN:
+ case PART_TRIGGERPRETRANSUN:
+#endif
+ case PART_TRIGGERPOSTTRANSIN:
+ case PART_TRIGGERPOSTTRANSUN:
parsePart = parseScript(spec, parsePart);
/*@switchbreak@*/ break;
--- rpm-5.4.10/build/rpmbuild.h.trigtrans~ 2010-02-10 19:36:17.000000000 +0100
+++ rpm-5.4.10/build/rpmbuild.h 2012-07-17 15:13:13.226368724 +0200
@@ -76,10 +76,12 @@ typedef enum rpmParseState_e {
+++ rpm-5.4.10/build/rpmbuild.h 2013-01-07 04:51:33.888016904 +0100
@@ -76,10 +76,14 @@ typedef enum rpmParseState_e {
PART_BUILDARCHITECTURES= 29+PART_BASE,/*!< */
PART_TRIGGERPOSTUN = 30+PART_BASE, /*!< */
PART_TRIGGERPREIN = 31+PART_BASE, /*!< */
+ PART_TRIGGERPOSTTRANSIN= 32+PART_BASE, /*!< */
+ PART_TRIGGERPOSTTRANSUN= 33+PART_BASE, /*!< */
+ PART_TRIGGERPRETRANSIN= 32+PART_BASE, /*!< */
+ PART_TRIGGERPRETRANSUN= 33+PART_BASE, /*!< */
+ PART_TRIGGERPOSTTRANSIN= 34+PART_BASE, /*!< */
+ PART_TRIGGERPOSTTRANSUN= 35+PART_BASE, /*!< */
/* support "%sanitycheck" script */
- PART_SANITYCHECK = 32+PART_BASE, /*!< */
- PART_ARBITRARY = 33+PART_BASE, /*!< */
- PART_LAST = 34+PART_BASE /*!< */
+ PART_SANITYCHECK = 34+PART_BASE, /*!< */
+ PART_ARBITRARY = 35+PART_BASE, /*!< */
+ PART_LAST = 36+PART_BASE /*!< */
+ PART_SANITYCHECK = 36+PART_BASE, /*!< */
+ PART_ARBITRARY = 37+PART_BASE, /*!< */
+ PART_LAST = 38+PART_BASE /*!< */
} rpmParseState;
/** \ingroup rpmbuild
--- rpm-5.4.10/lib/psm.c.trigtrans~ 2012-07-17 15:13:13.144369749 +0200
+++ rpm-5.4.10/lib/psm.c 2012-07-17 15:14:30.017408705 +0200
--- rpm-5.4.10/lib/psm.c.trigtrans~ 2013-01-07 02:59:02.334095999 +0100
+++ rpm-5.4.10/lib/psm.c 2013-01-07 07:34:26.115236562 +0100
@@ -53,6 +53,7 @@
(*((unsigned *)&(_psm)->flags) &= ~(RPMPSM_FLAGS_##_FLAG))
@ -263,7 +257,7 @@
+ int bingo;
+
+ /* Skip triggers that are not in this context. */
+ if (!(Flags & psm->sense))
+ if (!((Flags & psm->sense) & RPMSENSE_TRIGGERTRANS))
+ continue;
+
+ bingo = 0; /* no trigger to fire. */
@ -530,23 +524,19 @@
case PSM_TRIGGERS: return "triggers";
case PSM_IMMED_TRIGGERS: return "immedtriggers";
@@ -1785,8 +2135,24 @@ assert(psm != NULL);
@@ -1785,8 +2135,20 @@ assert(psm != NULL);
case RPMTAG_VERIFYSCRIPT: psm->stepName = "verify"; break;
case RPMTAG_PRETRANS: psm->stepName = "pretrans"; break;
case RPMTAG_POSTTRANS: psm->stepName = "posttrans"; break;
+#ifdef NOT_YET
+ case RPMTAG_TRIGGERPRETRANSIN: psm->stepName = "triggerpretransin"; break;
+ case RPMTAG_TRIGGERPRETRANSUN: psm->stepName = "triggerpretransun"; break;
+#endif
+ case RPMTAG_TRIGGERPOSTTRANSIN: psm->stepName = "triggerposttransin"; break;
+ case RPMTAG_TRIGGERPOSTTRANSUN: psm->stepName = "triggerposttransun"; break;
+ }
+ switch (scriptTag) {
+ default: psm->stage = PSM_SCRIPT; break;
+#ifdef NOT_YET
+ case RPMTAG_TRIGGERPRETRANSIN:
+ case RPMTAG_TRIGGERPRETRANSUN: psm->stage = PSM_PRETRANS; break;
+#endif
+ case RPMTAG_TRIGGERPOSTTRANSIN:
+ case RPMTAG_TRIGGERPOSTTRANSUN: psm->stage = PSM_POSTTRANS; break;
}
@ -556,7 +546,7 @@
}
/*@-mustmod@*/
@@ -2223,7 +2589,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
@@ -2223,7 +2585,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
/* XXX hackery to assert(!scareMem) in rpmfiNew. */
/*@-castexpose@*/
@ -565,20 +555,19 @@
/*@=castexpose@*/
switch (stage) {
@@ -3007,6 +3373,36 @@ assert(psm->te != NULL);
@@ -3007,6 +3369,34 @@ assert(psm->te != NULL);
if (rc)
xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn);
else
+ xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+ rpmtsGetRdb(ts)->db_txn = NULL;
+ } break;
+#ifdef NOT_YET
+ case PSM_PRETRANS:
+ { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
+ xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
+ psm->scriptTag = RPMTAG_PRETRANS;
+ psm->progTag = RPMTAG_PRETRANSPROG;
+ psm->sense = psm->goal == PSM_PKGINSTALL ? RPMSENSE_TRIGGERPRETRANSIN : RPMSENSE_TRIGGERPRETRANSUN;
+ psm->sense = psm->goal == PSM_PKGINSTALL ? (RPMSENSE_TRIGGERTRANS|RPMSENSE_TRIGGERPREIN) : (RPMSENSE_TRIGGERTRANS|RPMSENSE_TRIGGERUN);
+ psm->countCorrection = 0;
+ rc = runScriptTriggers(psm);
+ if (rc)
@ -587,13 +576,12 @@
+ xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+ rpmtsGetRdb(ts)->db_txn = NULL;
+ } break;
+#endif
+ case PSM_POSTTRANS:
+ { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
+ xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
+ psm->scriptTag = RPMTAG_POSTTRANS;
+ psm->progTag = RPMTAG_POSTTRANSPROG;
+ psm->sense = psm->goal == PSM_PKGINSTALL ? RPMSENSE_TRIGGERPOSTTRANSIN : RPMSENSE_TRIGGERPOSTTRANSUN;
+ psm->sense = psm->goal == PSM_PKGINSTALL ? (RPMSENSE_TRIGGERTRANS|RPMSENSE_TRIGGERIN) : (RPMSENSE_TRIGGERTRANS|RPMSENSE_TRIGGERPOSTUN);
+ psm->countCorrection = 0;
+ rc = runScriptTriggers(psm);
+ if (rc)
@ -603,7 +591,7 @@
rpmtsGetRdb(ts)->db_txn = NULL;
} break;
--- rpm-5.4.10/lib/psm.h.trigtrans~ 2010-03-06 16:31:29.000000000 +0100
+++ rpm-5.4.10/lib/psm.h 2012-07-17 15:13:13.228368700 +0200
+++ rpm-5.4.10/lib/psm.h 2013-01-07 02:59:02.525099560 +0100
@@ -52,9 +52,11 @@ typedef enum pkgStage_e {
PSM_CHROOT_IN = 51,
PSM_CHROOT_OUT = 52,
@ -619,20 +607,9 @@
PSM_RPMDB_LOAD = 97,
PSM_RPMDB_ADD = 98,
--- rpm-5.4.10/lib/transaction.c.trigtrans~ 2012-07-17 15:13:12.814373876 +0200
+++ rpm-5.4.10/lib/transaction.c 2012-07-17 15:13:13.229368688 +0200
@@ -1328,8 +1328,9 @@ assert(0);
continue; /* XXX can't happen */
/* If no prre/post transaction script, then don't bother. */
- if (!rpmteHaveTransScript(p, stag))
+ if (!rpmteHaveTransScript(p, stag)) {
continue;
+ }
if (rpmteOpen(p, ts, 0)) {
if (p->fi != NULL) /* XXX can't happen */
@@ -1349,6 +1350,43 @@ assert(0);
--- rpm-5.4.10/lib/transaction.c.trigtrans~ 2013-01-07 02:59:00.872068746 +0100
+++ rpm-5.4.10/lib/transaction.c 2013-01-07 07:48:52.289324980 +0100
@@ -1349,6 +1349,41 @@ assert(0);
return 0;
}
@ -658,16 +635,14 @@
+ default:
+assert(0);
+ /*@notreached@*/ break;
+#ifdef NOT_YET
+ case RPMTAG_TRIGGERPRETRANSIN:
+ case RPMTAG_TRIGGERPRETRANSUN: ptag = RPMTAG_PRETRANSPROG; break;
+#endif
+ case RPMTAG_TRIGGERPOSTTRANSIN:
+ case RPMTAG_TRIGGERPOSTTRANSUN: ptag = RPMTAG_POSTTRANSPROG; break;
+ }
+
+ psm = rpmpsmNew(ts, NULL, NULL);
+ psm->goal = (stag == RPMTAG_TRIGGERPOSTTRANSIN) ? PSM_PKGINSTALL : PSM_PKGERASE;
+ psm->goal = (stag == RPMTAG_TRIGGERPRETRANSIN || stag == RPMTAG_TRIGGERPOSTTRANSIN) ? PSM_PKGINSTALL : PSM_PKGERASE;
+ xx = rpmpsmScriptStage(psm, stag, ptag);
+ psm = rpmpsmFree(psm, __FUNCTION__);
+
@ -676,7 +651,21 @@
/* Add fingerprint for each file not skipped. */
static void rpmtsAddFingerprints(rpmts ts, uint32_t fileCount, hashTable ht,
fingerPrintCache fpc)
@@ -2319,6 +2357,10 @@ fprintf(stderr, "--> %s(%p,%p,0x%x) tsfl
@@ -2264,6 +2299,13 @@ fprintf(stderr, "--> %s(%p,%p,0x%x) tsfl
{
rpmlog(RPMLOG_DEBUG, D_("running pre-transaction scripts\n"));
xx = rpmtsRunScript(ts, RPMTAG_PRETRANS);
+
+ /* Run *after* pre-transaction scripts so that they may perform
+ * any changes affecting pre-transaction triggers first if necessary.
+ */
+ rpmlog(RPMLOG_DEBUG, D_("running pre-transaction triggers\n"));
+ xx = rpmtsRunScriptTriggers(ts, RPMTAG_TRIGGERPRETRANSIN);
+ xx = rpmtsRunScriptTriggers(ts, RPMTAG_TRIGGERPRETRANSUN);
}
/* ===============================================
@@ -2319,6 +2361,10 @@ fprintf(stderr, "--> %s(%p,%p,0x%x) tsfl
rpmlog(RPMLOG_DEBUG, D_("running post-transaction scripts\n"));
xx = rpmtsRunScript(ts, RPMTAG_POSTTRANS);
@ -688,8 +677,8 @@
exit:
--- rpm-5.4.10/rpmconstant/rpmconstanttbl.c.trigtrans~ 2012-07-06 19:12:41.000000000 +0200
+++ rpm-5.4.10/rpmconstant/rpmconstanttbl.c 2012-07-17 15:13:13.230368675 +0200
@@ -664,6 +662,8 @@ static const struct rpmconstant_s rpmPar
+++ rpm-5.4.10/rpmconstant/rpmconstanttbl.c 2013-01-07 06:50:31.964918366 +0100
@@ -664,6 +664,8 @@ static const struct rpmconstant_s rpmPar
{ "PART_BUILDARCHITECTURES", PART_BUILDARCHITECTURES }, /*!< */
{ "PART_TRIGGERPOSTUN", PART_TRIGGERPOSTUN }, /*!< */
{ "PART_TRIGGERPREIN", PART_TRIGGERPREIN }, /*!< */
@ -698,25 +687,16 @@
{ "PART_SANITYCHECK", PART_SANITYCHECK }, /*!< */
{ "PART_ARBITRARY", PART_ARBITRARY }, /*!< */
{ "PART_LAST", PART_LAST }, /*!< */
@@ -680,7 +680,7 @@ const struct rpmconstant_s * rpmParseSta
@@ -680,7 +682,7 @@ const struct rpmconstant_s * rpmParseSta
static const struct rpmconstant_s rpmsenseflagsctbl[] = {
#ifdef H_RPMEVR
{ "RPMSENSE_ANY", RPMSENSE_ANY },
- { "RPMSENSE_SERIAL", RPMSENSE_SERIAL },
+ { "RPMSENSE_TRIGGERPOSTTRANSIN", RPMSENSE_TRIGGERPOSTTRANSIN },
+ { "RPMSENSE_TRIGGERTRANS", RPMSENSE_TRIGGERTRANS },
{ "RPMSENSE_LESS", RPMSENSE_LESS },
{ "RPMSENSE_GREATER", RPMSENSE_GREATER },
{ "RPMSENSE_EQUAL", RPMSENSE_EQUAL },
@@ -707,7 +707,7 @@ static const struct rpmconstant_s rpmsen
{ "RPMSENSE_RPMLIB", RPMSENSE_RPMLIB },
{ "RPMSENSE_TRIGGERPREIN", RPMSENSE_TRIGGERPREIN },
{ "RPMSENSE_KEYRING", RPMSENSE_KEYRING },
- { "RPMSENSE_STRONG", RPMSENSE_STRONG },
+ { "RPMSENSE_TRIGGERPOSTTRANSUN", RPMSENSE_TRIGGERPOSTTRANSUN },
{ "RPMSENSE_CONFIG", RPMSENSE_CONFIG },
{ "RPMSENSE_PROBE", RPMSENSE_PROBE },
{ "RPMSENSE_PACKAGE", RPMSENSE_PACKAGE },
@@ -1085,6 +1085,10 @@ static const struct rpmconstant_s rpmTag
@@ -1085,6 +1087,10 @@ static const struct rpmconstant_s rpmTag
{ "RPMTAG_OBSOLETEYAMLENTRY", RPMTAG_OBSOLETEYAMLENTRY }, /* s[] */
{ "RPMTAG_PROVIDEYAMLENTRY", RPMTAG_PROVIDEYAMLENTRY }, /* s[] */
{ "RPMTAG_REQUIREYAMLENTRY", RPMTAG_REQUIREYAMLENTRY }, /* s[] */
@ -727,74 +707,121 @@
{ "RPMTAG_FILEDIGESTALGO", RPMTAG_FILEDIGESTALGO }, /* i file checksum algorithm */
{ "RPMTAG_BUGURL", RPMTAG_BUGURL }, /* s */
{ "RPMTAG_FIRSTFREE_TAG", RPMTAG_FIRSTFREE_TAG }, /*!< internal */
--- rpm-5.4.10/rpmdb/hdrfmt.c.trigtrans~ 2012-07-17 15:13:13.079370562 +0200
+++ rpm-5.4.10/rpmdb/hdrfmt.c 2012-07-17 15:13:13.232368649 +0200
@@ -671,6 +671,16 @@ assert(ix == 0);
val = xstrdup("un");
else if (anint & RPMSENSE_TRIGGERPOSTUN)
val = xstrdup("postun");
+#ifdef NOT_YET
+ else if (anint & RPMSENSE_TRIGGERPRETRANSIN)
+ val = xstrdup("pretransin");
+ else if (anint & RPMSENSE_TRIGGERPRETRANSUN)
+ val = xstrdup("pretransun");
+#endif
+ else if (anint & RPMSENSE_TRIGGERPOSTTRANSIN)
+ val = xstrdup("posttransin");
+ else if (anint & RPMSENSE_TRIGGERPOSTTRANSUN)
+ val = xstrdup("posttransun");
else
val = xstrdup("");
@@ -1165,6 +1171,10 @@ static const struct rpmconstant_s rpmScr
{ "RPMSCRIPT_PREUN", RPMSCRIPT_PREUN }, /*!< %preun scriptlet */
{ "RPMSCRIPT_POSTUN", RPMSCRIPT_POSTUN }, /*!< %postun scriptlet */
{ "RPMSCRIPT_POSTTRANS", RPMSCRIPT_POSTTRANS }, /*!< %posttrans scriptlet */
+ { "RPMSCRIPT_TRIGGERPRETRANSIN", RPMSCRIPT_TRIGGERPRETRANSIN }, /*!< %triggerpretransin scriptlet */
+ { "RPMSCRIPT_TRIGGERPRETRANSUN", RPMSCRIPT_TRIGGERPRETRANSUN }, /*!< %triggerpretransun scriptlet */
+ { "RPMSCRIPT_TRIGGERPOSTTRANSIN", RPMSCRIPT_TRIGGERPOSTTRANSIN }, /*!< %triggerposttransin scriptlet */
+ { "RPMSCRIPT_TRIGGERPOSTTRANSUN", RPMSCRIPT_TRIGGERPOSTTRANSUN }, /*!< %triggerposttransun scriptlet */
{ "RPMSCRIPT_VERIFY", RPMSCRIPT_VERIFY }, /*!< %verify scriptlet */
{ "RPMSCRIPT_PREP", RPMSCRIPT_PREP }, /*!< %prep build scriptlet */
{ "RPMSCRIPT_BUILD", RPMSCRIPT_BUILD }, /*!< %build build scriptlet */
--- rpm-5.4.10/rpmdb/hdrfmt.c.trigtrans~ 2013-01-07 02:59:01.499080468 +0100
+++ rpm-5.4.10/rpmdb/hdrfmt.c 2013-01-07 06:59:08.841536496 +0100
@@ -663,16 +663,29 @@ assert(ix == 0);
val = xstrdup(_("(invalid type)"));
else {
rpmuint64_t anint = he->p.ui64p[ix];
- if (anint & RPMSENSE_TRIGGERPREIN)
- val = xstrdup("prein");
- else if (anint & RPMSENSE_TRIGGERIN)
- val = xstrdup("in");
- else if (anint & RPMSENSE_TRIGGERUN)
- val = xstrdup("un");
- else if (anint & RPMSENSE_TRIGGERPOSTUN)
- val = xstrdup("postun");
- else
- val = xstrdup("");
+ if (anint & RPMSENSE_TRIGGERTRANS) {
+ if (anint & RPMSENSE_TRIGGERPREIN)
+ val = xstrdup("pretransin");
+ else if (anint & RPMSENSE_TRIGGERIN)
+ val = xstrdup("posttransin");
+ else if (anint & RPMSENSE_TRIGGERUN)
+ val = xstrdup("pretransun");
+ else if (anint & RPMSENSE_TRIGGERPOSTUN)
+ val = xstrdup("posttransun");
+ else /* shouldn't be reached... */
+ val = xstrdup("");
+ } else {
+ if (anint & RPMSENSE_TRIGGERPREIN)
+ val = xstrdup("prein");
+ else if (anint & RPMSENSE_TRIGGERIN)
+ val = xstrdup("in");
+ else if (anint & RPMSENSE_TRIGGERUN)
+ val = xstrdup("un");
+ else if (anint & RPMSENSE_TRIGGERPOSTUN)
+ val = xstrdup("postun");
+ else
+ val = xstrdup("");
+ }
}
@@ -2122,6 +2132,16 @@ static int triggertypeTag(Header h, HE_t
he->p.argv[i] = xstrdup("un");
else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN)
he->p.argv[i] = xstrdup("postun");
+#ifdef NOT_YET
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPRETRANSIN)
+ he->p.argv[i] = xstrdup("pretransin");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPRETRANSUN)
+ he->p.argv[i] = xstrdup("pretransun");
+#endif
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTTRANSIN)
+ he->p.argv[i] = xstrdup("posttransin");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTTRANSUN)
+ he->p.argv[i] = xstrdup("posttransun");
else
he->p.argv[i] = xstrdup("");
return val;
}
@@ -2114,16 +2127,29 @@ static int triggertypeTag(Header h, HE_t
}
/* XXX FIXME: there's memory leaks here. */
- if (flags.ui32p[j] & RPMSENSE_TRIGGERPREIN)
- he->p.argv[i] = xstrdup("prein");
- else if (flags.ui32p[j] & RPMSENSE_TRIGGERIN)
- he->p.argv[i] = xstrdup("in");
- else if (flags.ui32p[j] & RPMSENSE_TRIGGERUN)
- he->p.argv[i] = xstrdup("un");
- else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN)
- he->p.argv[i] = xstrdup("postun");
- else
- he->p.argv[i] = xstrdup("");
+ if (flags.ui32p[j] & RPMSENSE_TRIGGERTRANS) {
+ if (flags.ui32p[j] & RPMSENSE_TRIGGERPREIN)
+ he->p.argv[i] = xstrdup("pretransin");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERIN)
+ he->p.argv[i] = xstrdup("posttransin");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERUN)
+ he->p.argv[i] = xstrdup("pretransun");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN)
+ he->p.argv[i] = xstrdup("posttransun");
+ else /* shouldn't be reached... */
+ he->p.argv[i] = xstrdup("");
+ } else {
+ if (flags.ui32p[j] & RPMSENSE_TRIGGERPREIN)
+ he->p.argv[i] = xstrdup("prein");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERIN)
+ he->p.argv[i] = xstrdup("in");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERUN)
+ he->p.argv[i] = xstrdup("un");
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN)
+ he->p.argv[i] = xstrdup("postun");
+ else
+ he->p.argv[i] = xstrdup("");
+ }
/*@innerbreak@*/ break;
}
}
--- rpm-5.4.10/rpmdb/rpmevr.h.trigtrans~ 2012-06-01 15:20:21.000000000 +0200
+++ rpm-5.4.10/rpmdb/rpmevr.h 2012-07-17 15:13:13.233368636 +0200
+++ rpm-5.4.10/rpmdb/rpmevr.h 2013-01-07 07:09:39.568886836 +0100
@@ -27,7 +27,7 @@ typedef enum evrFlags_e {
#if defined(_RPMEVR_INTERNAL)
RPMSENSE_ANY = 0,
/*@-enummemuse@*/
- RPMSENSE_SERIAL = (1 << 0), /*!< (obsolete). */
+ RPMSENSE_TRIGGERPOSTTRANSIN = (1 << 0), /*!< (obsolete). */
+ RPMSENSE_TRIGGERTRANS = (1 << 0), /*!< modifies %triggerfoo to %triggerfootrans. */
/*@=enummemuse@*/
#endif
RPMSENSE_LESS = (1 << 1),
@@ -60,7 +60,7 @@ typedef enum evrFlags_e {
RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */
RPMSENSE_KEYRING = (1 << 26),
- RPMSENSE_STRONG = (1 << 27), /*!< placeholder SuSE */
+ RPMSENSE_TRIGGERPOSTTRANSUN = (1 << 27), /*!< placeholder SuSE */
RPMSENSE_CONFIG = (1 << 28),
RPMSENSE_PROBE = (1 << 29),
RPMSENSE_PACKAGE = (1 << 30),
@@ -96,7 +96,8 @@ struct EVR_s {
@@ -96,7 +96,7 @@ struct EVR_s {
};
#define RPMSENSE_TRIGGER \
- (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
+ (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN | \
+ RPMSENSE_TRIGGERPOSTTRANSIN | RPMSENSE_TRIGGERPOSTTRANSUN)
+ (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN | RPMSENSE_TRIGGERTRANS)
#define _ALL_REQUIRES_MASK (\
RPMSENSE_INTERP | \
--- rpm-5.4.10/rpmdb/rpmtag.h.trigtrans~ 2012-07-17 15:13:13.179369312 +0200
+++ rpm-5.4.10/rpmdb/rpmtag.h 2012-07-17 15:13:13.233368636 +0200
--- rpm-5.4.10/rpmdb/rpmtag.h.trigtrans~ 2013-01-07 02:59:02.379096848 +0100
+++ rpm-5.4.10/rpmdb/rpmtag.h 2013-01-07 02:59:02.533099710 +0100
@@ -415,6 +415,10 @@ enum rpmTag_e {
RPMTAG_OBSOLETEYAMLENTRY = 1220, /* s[] */
RPMTAG_PROVIDEYAMLENTRY = 1221, /* s[] */
@ -807,7 +834,7 @@
RPMTAG_FILEDIGESTALGO = 5011, /* i file checksum algorithm */
RPMTAG_BUGURL = 5012, /* s */
--- rpm-5.4.10/rpmdb/rpmtypes.h.trigtrans~ 2011-05-03 17:58:19.000000000 +0200
+++ rpm-5.4.10/rpmdb/rpmtypes.h 2012-07-17 15:13:13.234368624 +0200
+++ rpm-5.4.10/rpmdb/rpmtypes.h 2013-01-07 02:59:02.533099710 +0100
@@ -70,7 +70,11 @@ typedef enum rpmScriptID_e {
RPMSCRIPT_POSTUN = 7, /*!< %postun scriptlet */
RPMSCRIPT_TRIGGERPOSTUN = 8, /*!< %triggerpostun scriptlet */

View file

@ -54,7 +54,7 @@
--- rpm-5.4.7/macros/macros.in.kmod~ 2012-03-16 16:34:04.614654786 +0100
+++ rpm-5.4.7/macros/macros.in 2012-03-16 16:34:04.645654836 +0100
@@ -981,6 +981,10 @@ $_arbitrary_tags_tests Foo:Bar
%{load:%{_usrlibrpm}/macros.d/haskell}
# % {load:%{_usrlibrpm}/macros.d/haskell} # provided by haskell-macros for now
#------------------------------------------------------------------------
+# kmod(...) configuration.

View file

@ -42,8 +42,8 @@
cpanflute cpanflute2 Specfile.pm \
find-provides.perl find-requires.perl \
find-provides.php find-requires.php \
- freshen.sh gendiff getpo.sh haskelldeps.sh http.req \
+ freshen.sh fontconfig.prov gendiff getpo.sh haskelldeps.sh http.req \
- freshen.sh gendiff getpo.sh http.req \
+ freshen.sh fontconfig.prov gendiff getpo.sh http.req \
check-java-closure.sh java.prov.sh java.req.sh \
gstreamer.sh javadeps.sh libtooldeps.sh mgo \
mono-find-provides mono-find-requires \
@ -52,9 +52,9 @@
check-files cross-build dbconvert.sh executabledeps.sh \
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
- find-provides.perl \
- find-requires.perl gem_helper.rb getpo.sh haskelldeps.sh http.req \
- find-requires.perl gem_helper.rb getpo.sh http.req \
+ find-provides.perl find-requires.perl \
+ fontconfig.prov gem_helper.rb getpo.sh haskelldeps.sh http.req \
+ fontconfig.prov gem_helper.rb getpo.sh http.req \
kmod-deps.sh gstreamer.sh javadeps.sh libtooldeps.sh \
mono-find-provides mono-find-requires \
check-multiarch-files mkmultiarch \

View file

@ -1,161 +0,0 @@
--- rpm-5.4.9/configure.ac.haskell~ 2012-05-15 02:51:07.328499989 +0200
+++ rpm-5.4.9/configure.ac 2012-05-15 02:51:07.393500340 +0200
@@ -2513,7 +2513,7 @@ AC_CONFIG_FILES([ po/Makefile.in
scripts/Makefile
rpmdb/DB_CONFIG
macros/macros macros/macros.rpmbuild
- macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool
+ macros/cmake macros/gstreamer macros/haskell macros/java macros/kernel macros/libtool
macros/mandriva macros/suse macros/fedora macros/mono macros/perl macros/pkgconfig macros/php
macros/python macros/ruby macros/selinux macros/tcl
doc/Makefile
--- rpm-5.4.9/macros/haskell.in.haskell~ 2012-05-15 02:51:07.395500350 +0200
+++ rpm-5.4.9/macros/haskell.in 2012-05-15 02:51:07.395500350 +0200
@@ -0,0 +1,69 @@
+# Ruby specific macro definitions.
+# To make use of these macros insert the following line into your spec file:
+# %{load:%{_usrlibrpm}/macros.d/haskell}
+
+# Path to scripts to autogenerate haskell package dependencies,
+#
+# Note: Used iff _use_internal_dependency_generator is non-zero. The
+# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+%__haskell_provides %{_rpmhome}/haskelldeps.sh --provides
+%__haskell_requires %{_rpmhome}/haskelldeps.sh --requires
+
+# How is named the Setup.?hs
+%_cabal_setup %{?cabal_setup}%{?!cabal_setup:Setup.hs}
+
+# which compiler (default ghc)
+%_haskell_compiler %{?haskell_compiler}%{?!haskell_compiler:runhaskell}
+
+# The compilation step
+%_cabal_compil \
+ %{_haskell_compiler} %{_cabal_setup} configure --prefix=%{_prefix} \
+ %{_haskell_compiler} %{_cabal_setup} build \
+ %{?!_no_haddock:%{_haskell_compiler} %{_cabal_setup} haddock}
+
+# Script need to register module on the system
+%_cabal_genscripts \
+ %{_haskell_compiler} %{_cabal_setup} register --gen-script || : \
+ sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' register.sh \
+ %{_haskell_compiler} %{_cabal_setup} unregister --gen-script || : \
+ sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' unregister.sh
+
+# post/pre scriptlet
+%_cabal_in %posttrans -f register.sh
+
+%_cabal_un %preun -f unregister.sh
+
+# Using script to register module during install
+%_cabal_scriptlets \
+%_cabal_in \
+\
+%_cabal_un \
+
+# The "full" %build step
+%_cabal_build \
+ %_cabal_compil \
+ %_cabal_genscripts
+
+# The "full" %install step
+%_cabal_install \
+ %{_haskell_compiler} %{_cabal_setup} copy --destdir=%{buildroot} \
+
+# The "full" %check step
+%_cabal_check \
+ %{_haskell_compiler} %{_cabal_setup} test
+
+%_cabal_rpm_deps_dir %_datadir/haskell-deps
+
+%_cabal_pkg_deps_dir %_cabal_rpm_deps_dir/%name-%version-%release
+
+%_cabal_rpm_gen_deps \
+mkdir -p %{buildroot}%{_cabal_pkg_deps_dir} \
+touch %{buildroot}%{_cabal_pkg_deps_dir}/{provides,requires} \
+find . -name "*.cabal" | xargs cabalrpmprov > %{buildroot}%{_cabal_pkg_deps_dir}/provides \
+cabalrpmreq > %{buildroot}%{_cabal_pkg_deps_dir}/requires \
+
+%_cabal_rpm_files \
+%_cabal_pkg_deps_dir
+
+%_cabal_haddoc_files \
+%{?!_no_haddock:%doc dist/doc/html}
--- rpm-5.4.9/Makefile.am.haskell~ 2012-03-17 01:24:19.000000000 +0100
+++ rpm-5.4.9/Makefile.am 2012-05-15 02:51:09.049509318 +0200
@@ -116,9 +116,9 @@ pkgbin_SCRIPTS = install-sh mkinstalldir
pkgcfgdir = $(pkgdatadir)/macros.d
pkgcfg_DATA = \
- macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \
- macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php \
- macros/python macros/ruby macros/selinux macros/tcl
+ macros/cmake macros/haskell macros/gstreamer macros/java macros/kernel \
+ macros/libtool macros/mandriva macros/mono macros/perl macros/pkgconfig \
+ macros/php macros/python macros/ruby macros/selinux macros/tcl
noinst_HEADERS = build.h debug.h system.h
--- rpm-5.4.9/scripts/haskelldeps.sh.haskell~ 2012-05-15 02:51:09.050509324 +0200
+++ rpm-5.4.9/scripts/haskelldeps.sh 2012-05-15 02:51:09.050509324 +0200
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# Haskell dependency extractor.
+#
+# Author(s): Olivier Thauvin <nanardon@mandriva.org>
+# Per Øyvind Karlsen <peroyvind@mandriva.org>
+#
+
+provides=0
+requires=0
+
+while [ "$#" -ne 0 ]; do
+ case $1 in
+ -P|--provides)
+ provides=1
+ ;;
+ -R|--requires)
+ requires=1
+ ;;
+ esac
+ shift
+done
+
+finddeps () {
+ while read file; do
+ case "$file" in
+ */usr/share/haskell-deps/*/$1)
+ cat "$file" | grep -v '^\s*$'
+ ;;
+ esac
+ done
+}
+
+if [ $provides -eq 1 ]; then
+ finddeps provides
+fi
+
+if [ $requires -eq 1 ]; then
+ finddeps requires
+fi
--- rpm-5.4.9/scripts/Makefile.am.haskell~ 2012-05-04 10:38:44.000000000 +0200
+++ rpm-5.4.9/scripts/Makefile.am 2012-05-15 02:51:09.050509324 +0200
@@ -19,7 +19,7 @@ EXTRA_DIST = api-sanity-autotest.pl api-
cpanflute cpanflute2 Specfile.pm \
find-provides.perl find-requires.perl \
find-provides.php find-requires.php \
- freshen.sh gendiff getpo.sh http.req \
+ freshen.sh gendiff getpo.sh haskelldeps.sh http.req \
check-java-closure.sh java.prov.sh java.req.sh \
gstreamer.sh javadeps.sh libtooldeps.sh mgo \
mono-find-provides mono-find-requires \
@@ -56,7 +56,7 @@ pkgdata_SCRIPTS = \
check-files cross-build dbconvert.sh executabledeps.sh \
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
find-provides.perl \
- find-requires.perl gem_helper.rb getpo.sh http.req \
+ find-requires.perl gem_helper.rb getpo.sh haskelldeps.sh http.req \
kmod-deps.sh gstreamer.sh javadeps.sh libtooldeps.sh \
mono-find-provides mono-find-requires \
check-multiarch-files mkmultiarch \

View file

@ -25,7 +25,7 @@
#------------------------------------------------------------------------
# haskell(...) configuration.
-#%%{load:%{_usrlibrpm}/macros.d/haskell}
+%{load:%{_usrlibrpm}/macros.d/haskell}
+# % {load:%{_usrlibrpm}/macros.d/haskell} # provided by haskell-macros for now
#------------------------------------------------------------------------
# perl(...) configuration

View file

@ -1,11 +1,10 @@
diff -urN rpm-5.4.9/macros/macros.rpmbuild.in rpm-5.4.9-patched/macros/macros.rpmbuild.in
--- rpm-5.4.9/macros/macros.rpmbuild.in 2012-08-25 12:37:14.939808237 +1100
+++ rpm-5.4.9-patched/macros/macros.rpmbuild.in 2012-08-25 12:36:37.302808636 +1100
@@ -303,7 +303,8 @@
%___build_pre \
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
--- rpm-5.4.9/macros/macros.rpmbuild.in 2012-08-25 12:37:14.939808237 +1100
+++ rpm-5.4.9-patched/macros/macros.rpmbuild.in 2012-08-25 12:36:37.302808636 +1100
@@ -329,6 +329,8 @@
RPM_BUILD_DIR=\"%{realpath:%{u2p:%{_builddir}}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
- export RPM_BUILD_DIR RPM_OPT_FLAGS\
export RPM_BUILD_DIR RPM_OPT_FLAGS\
+ RPM_PACKAGE_NAME=\"%{name}\"\
+ export RPM_BUILD_DIR RPM_OPT_FLAGS RPM_PACKAGE_NAME\
%{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\