diff options
author | Saul Wold <sgw@linux.intel.com> | 2014-09-30 10:16:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-30 21:36:13 +0100 |
commit | 58d9c4e4babbefecc187be2d7f1b812b76d6efc9 (patch) | |
tree | 4f6ee75962b5c79fa754730f3e6847751fabc42a /meta/recipes-devtools | |
parent | 6be3386e78ec8aac1fd1631047ddf967f4843f3d (diff) | |
download | poky-58d9c4e4babbefecc187be2d7f1b812b76d6efc9.tar.gz |
rpm: add version 4.11.2
add patch to remove db3 from configure.ac
add inherit pkgconfig
(From OE-Core rev: 9a17f938e738a16a1ef9a00be6a8317d71f92573)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
10 files changed, 876 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch new file mode 100644 index 0000000000..b877870411 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
5 | |||
6 | diff --git a/python/rpmmodule.c b/python/rpmmodule.c | ||
7 | index a4fe217..728c66c 100644 | ||
8 | --- a/python/rpmmodule.c | ||
9 | +++ b/python/rpmmodule.c | ||
10 | @@ -396,6 +396,10 @@ static int initModule(PyObject *m) | ||
11 | REGISTER_ENUM(RPMSENSE_STRONG); | ||
12 | REGISTER_ENUM(RPMSENSE_CONFIG); | ||
13 | |||
14 | +#if defined(RPM_VENDOR_OE) | ||
15 | + REGISTER_ENUM(RPMSENSE_MISSINGOK); | ||
16 | +#endif | ||
17 | + | ||
18 | REGISTER_ENUM(RPMTRANS_FLAG_TEST); | ||
19 | REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS); | ||
20 | REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS); | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch new file mode 100644 index 0000000000..7a646de373 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
5 | |||
6 | |||
7 | Index: rpm-4.11.2/build/pack.c | ||
8 | =================================================================== | ||
9 | --- rpm-4.11.2.orig/build/pack.c | ||
10 | +++ rpm-4.11.2/build/pack.c | ||
11 | @@ -571,9 +571,9 @@ rpmRC packageBinaries(rpmSpec spec, cons | ||
12 | headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); | ||
13 | } | ||
14 | |||
15 | - if (cheating) { | ||
16 | - (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); | ||
17 | - } | ||
18 | +// if (cheating) { | ||
19 | +// (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); | ||
20 | +// } | ||
21 | |||
22 | { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); | ||
23 | char *binRpm, *binDir; | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch new file mode 100644 index 0000000000..be0626c8b3 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Core specific] | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
5 | |||
6 | |||
7 | diff --git a/installplatform b/installplatform | ||
8 | index 8c3eba0..fa15e91 100755 | ||
9 | --- a/installplatform | ||
10 | +++ b/installplatform | ||
11 | @@ -112,7 +112,7 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do | ||
12 | [ -z "$CANONARCH" ] && continue | ||
13 | |||
14 | if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then | ||
15 | - LIB=${LIB}64 | ||
16 | + LIB=${LIB} | ||
17 | fi | ||
18 | |||
19 | PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}" | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh new file mode 100755 index 0000000000..083b174f17 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | [ $# -ge 1 ] || { | ||
4 | cat > /dev/null | ||
5 | exit 0 | ||
6 | } | ||
7 | |||
8 | case $1 in | ||
9 | -R|--requires) | ||
10 | shift | ||
11 | grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python" | ||
12 | exit 0 | ||
13 | ;; | ||
14 | esac | ||
15 | |||
16 | exit 0 | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch new file mode 100644 index 0000000000..2640e54b5b --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | Disable configuring the db3 directory since we will be using the | ||
3 | external DB provided as part of OE-Core already, no need to have | ||
4 | duplicate database code. | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE-Core Specific] | ||
7 | |||
8 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
9 | |||
10 | Index: rpm-4.11.2/configure.ac | ||
11 | =================================================================== | ||
12 | --- rpm-4.11.2.orig/configure.ac | ||
13 | +++ rpm-4.11.2/configure.ac | ||
14 | @@ -825,9 +825,9 @@ AC_SUBST(RPMCONFIGDIR) | ||
15 | |||
16 | AC_SUBST(OBJDUMP) | ||
17 | |||
18 | -if test "$with_external_db" = no; then | ||
19 | - AC_CONFIG_SUBDIRS(db3) | ||
20 | -fi | ||
21 | +#if test "$with_external_db" = no; then | ||
22 | +# AC_CONFIG_SUBDIRS(db3) | ||
23 | +#fi | ||
24 | |||
25 | AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no]) | ||
26 | AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no]) | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch new file mode 100644 index 0000000000..f1ecab7b0e --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
5 | |||
6 | |||
7 | Index: rpm-4.11.2/build/files.c | ||
8 | =================================================================== | ||
9 | --- rpm-4.11.2.orig/build/files.c | ||
10 | +++ rpm-4.11.2/build/files.c | ||
11 | @@ -1321,12 +1321,6 @@ static rpmRC addFile(FileList fl, const | ||
12 | } | ||
13 | } | ||
14 | |||
15 | - /* Error out when a non-directory is specified as one in spec */ | ||
16 | - if (fl->cur.isDir && (statp == &statbuf) && !S_ISDIR(statp->st_mode)) { | ||
17 | - rpmlog(RPMLOG_ERR, _("Not a directory: %s\n"), diskPath); | ||
18 | - goto exit; | ||
19 | - } | ||
20 | - | ||
21 | /* Don't recurse into explicit %dir, don't double-recurse from fts */ | ||
22 | if ((fl->cur.isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) { | ||
23 | return recurseDir(fl, diskPath); | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch new file mode 100644 index 0000000000..9333dea441 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch | |||
@@ -0,0 +1,194 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Core] | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
5 | |||
6 | |||
7 | Index: rpm-4.11.2/lib/psm.c | ||
8 | =================================================================== | ||
9 | --- rpm-4.11.2.orig/lib/psm.c | ||
10 | +++ rpm-4.11.2/lib/psm.c | ||
11 | @@ -421,7 +421,8 @@ static rpmRC runScript(rpmpsm psm, ARGV_ | ||
12 | |||
13 | rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); | ||
14 | rc = rpmScriptRun(script, arg1, arg2, sfd, | ||
15 | - prefixes, warn_only, selinux); | ||
16 | + prefixes, warn_only, selinux, rpmtsRootDir(psm->ts) ); | ||
17 | + | ||
18 | rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); | ||
19 | |||
20 | /* Map warn-only errors to "notfound" for script stop callback */ | ||
21 | @@ -958,15 +959,49 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg | ||
22 | case PSM_DESTROY: | ||
23 | break; | ||
24 | case PSM_SCRIPT: /* Run current package scriptlets. */ | ||
25 | +#ifdef RPM_VENDOR_OE | ||
26 | + { | ||
27 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
28 | + if (scriptletWrapper && *scriptletWrapper) | ||
29 | + (void) rpmChrootOut(); | ||
30 | +#endif | ||
31 | + | ||
32 | rc = runInstScript(psm); | ||
33 | +#ifdef RPM_VENDOR_OE | ||
34 | + if (scriptletWrapper && *scriptletWrapper) | ||
35 | + (void) rpmChrootIn(); | ||
36 | + } | ||
37 | +#endif | ||
38 | break; | ||
39 | case PSM_TRIGGERS: | ||
40 | /* Run triggers in other package(s) this package sets off. */ | ||
41 | +#ifdef RPM_VENDOR_OE | ||
42 | + { | ||
43 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
44 | + if (scriptletWrapper && *scriptletWrapper) | ||
45 | + (void) rpmChrootOut(); | ||
46 | +#endif | ||
47 | rc = runTriggers(psm); | ||
48 | +#ifdef RPM_VENDOR_OE | ||
49 | + if (scriptletWrapper && *scriptletWrapper) | ||
50 | + (void) rpmChrootIn(); | ||
51 | + } | ||
52 | +#endif | ||
53 | break; | ||
54 | case PSM_IMMED_TRIGGERS: | ||
55 | /* Run triggers in this package other package(s) set off. */ | ||
56 | +#ifdef RPM_VENDOR_OE | ||
57 | + { | ||
58 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
59 | + if (scriptletWrapper && *scriptletWrapper) | ||
60 | + (void) rpmChrootOut(); | ||
61 | +#endif | ||
62 | rc = runImmedTriggers(psm); | ||
63 | +#ifdef RPM_VENDOR_OE | ||
64 | + if (scriptletWrapper && *scriptletWrapper) | ||
65 | + (void) rpmChrootIn(); | ||
66 | + } | ||
67 | +#endif | ||
68 | break; | ||
69 | |||
70 | case PSM_RPMDB_ADD: { | ||
71 | Index: rpm-4.11.2/lib/rpmscript.c | ||
72 | =================================================================== | ||
73 | --- rpm-4.11.2.orig/lib/rpmscript.c | ||
74 | +++ rpm-4.11.2/lib/rpmscript.c | ||
75 | @@ -92,7 +92,7 @@ static rpmRC runLuaScript(int selinux, A | ||
76 | static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"; | ||
77 | |||
78 | static void doScriptExec(int selinux, ARGV_const_t argv, ARGV_const_t prefixes, | ||
79 | - FD_t scriptFd, FD_t out) | ||
80 | + FD_t scriptFd, FD_t out, char * rootDir ) | ||
81 | { | ||
82 | int pipes[2]; | ||
83 | int flag; | ||
84 | @@ -158,13 +158,12 @@ static void doScriptExec(int selinux, AR | ||
85 | setenv("RPM_INSTALL_PREFIX", *pf, 1); | ||
86 | } | ||
87 | } | ||
88 | - | ||
89 | - if (chdir("/") == 0) { | ||
90 | + if (chdir(rootDir) == 0) { | ||
91 | /* XXX Don't mtrace into children. */ | ||
92 | unsetenv("MALLOC_CHECK_"); | ||
93 | |||
94 | /* Permit libselinux to do the scriptlet exec. */ | ||
95 | - if (selinux == 1) { | ||
96 | + if (selinux == 1) { | ||
97 | xx = rpm_execcon(0, argv[0], argv, environ); | ||
98 | } | ||
99 | |||
100 | @@ -175,12 +174,12 @@ static void doScriptExec(int selinux, AR | ||
101 | _exit(127); /* exit 127 for compatibility with bash(1) */ | ||
102 | } | ||
103 | |||
104 | -static char * writeScript(const char *cmd, const char *script) | ||
105 | +static char * writeScript(const char *cmd, const char *script, char * rootDir) | ||
106 | { | ||
107 | char *fn = NULL; | ||
108 | size_t slen = strlen(script); | ||
109 | int ok = 0; | ||
110 | - FD_t fd = rpmMkTempFile("/", &fn); | ||
111 | + FD_t fd = rpmMkTempFile(rootDir, &fn); | ||
112 | |||
113 | if (Ferror(fd)) | ||
114 | goto exit; | ||
115 | @@ -204,7 +203,7 @@ exit: | ||
116 | */ | ||
117 | static rpmRC runExtScript(int selinux, ARGV_const_t prefixes, | ||
118 | const char *sname, rpmlogLvl lvl, FD_t scriptFd, | ||
119 | - ARGV_t * argvp, const char *script, int arg1, int arg2) | ||
120 | + ARGV_t * argvp, const char *script, int arg1, int arg2,char * rootDir) | ||
121 | { | ||
122 | FD_t out = NULL; | ||
123 | char * fn = NULL; | ||
124 | @@ -215,7 +214,7 @@ static rpmRC runExtScript(int selinux, A | ||
125 | rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname); | ||
126 | |||
127 | if (script) { | ||
128 | - fn = writeScript(*argvp[0], script); | ||
129 | + fn = writeScript(*argvp[0], script, rootDir); | ||
130 | if (fn == NULL) { | ||
131 | rpmlog(RPMLOG_ERR, | ||
132 | _("Couldn't create temporary file for %s: %s\n"), | ||
133 | @@ -258,7 +257,7 @@ static rpmRC runExtScript(int selinux, A | ||
134 | } else if (pid == 0) {/* Child */ | ||
135 | rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n", | ||
136 | sname, *argvp[0], (unsigned)getpid()); | ||
137 | - doScriptExec(selinux, *argvp, prefixes, scriptFd, out); | ||
138 | + doScriptExec(selinux, *argvp, prefixes, scriptFd, out, rootDir); | ||
139 | } | ||
140 | |||
141 | do { | ||
142 | @@ -297,13 +296,27 @@ exit: | ||
143 | } | ||
144 | |||
145 | rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, | ||
146 | - ARGV_const_t prefixes, int warn_only, int selinux) | ||
147 | + ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir) | ||
148 | { | ||
149 | ARGV_t args = NULL; | ||
150 | rpmlogLvl lvl = warn_only ? RPMLOG_WARNING : RPMLOG_ERR; | ||
151 | rpmRC rc; | ||
152 | - | ||
153 | - if (script == NULL) return RPMRC_OK; | ||
154 | +#ifdef RPM_VENDOR_OE | ||
155 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
156 | +#endif | ||
157 | + | ||
158 | + if (script == NULL) return RPMRC_OK; | ||
159 | +#ifdef RPM_VENDOR_OE | ||
160 | + if (scriptletWrapper && *scriptletWrapper) { | ||
161 | + argvAdd(&args, scriptletWrapper); | ||
162 | + | ||
163 | + if ( rootDir ) { | ||
164 | + argvAdd(&args, rootDir); | ||
165 | + } else { | ||
166 | + argvAdd(&args, "/"); | ||
167 | + } | ||
168 | + } | ||
169 | +#endif | ||
170 | |||
171 | /* construct a new argv as we can't modify the one from header */ | ||
172 | if (script->args) { | ||
173 | @@ -315,7 +328,7 @@ rpmRC rpmScriptRun(rpmScript script, int | ||
174 | if (rstreq(args[0], "<lua>")) { | ||
175 | rc = runLuaScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2); | ||
176 | } else { | ||
177 | - rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2); | ||
178 | + rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, rootDir); | ||
179 | } | ||
180 | argvFree(args); | ||
181 | |||
182 | Index: rpm-4.11.2/lib/rpmscript.h | ||
183 | =================================================================== | ||
184 | --- rpm-4.11.2.orig/lib/rpmscript.h | ||
185 | +++ rpm-4.11.2/lib/rpmscript.h | ||
186 | @@ -29,7 +29,7 @@ rpmScript rpmScriptFree(rpmScript script | ||
187 | |||
188 | RPM_GNUC_INTERNAL | ||
189 | rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, | ||
190 | - ARGV_const_t prefixes, int warn_only, int selinux); | ||
191 | + ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir); | ||
192 | |||
193 | RPM_GNUC_INTERNAL | ||
194 | rpmTagVal rpmScriptTag(rpmScript script); | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch new file mode 100644 index 0000000000..3da608573a --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch | |||
@@ -0,0 +1,384 @@ | |||
1 | |||
2 | Upstream-Status: Pending | ||
3 | |||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
6 | |||
7 | diff --git a/build/pack.c b/build/pack.c | ||
8 | index b6b2bea..5c3d8df 100644 | ||
9 | --- a/build/pack.c | ||
10 | +++ b/build/pack.c | ||
11 | @@ -273,8 +273,10 @@ static rpmTagVal depevrtags[] = { | ||
12 | RPMTAG_CONFLICTVERSION, | ||
13 | RPMTAG_ORDERVERSION, | ||
14 | RPMTAG_TRIGGERVERSION, | ||
15 | - RPMTAG_SUGGESTSVERSION, | ||
16 | - RPMTAG_ENHANCESVERSION, | ||
17 | + RPMTAG_SUGGESTVERSION, | ||
18 | + RPMTAG_ENHANCEVERSION, | ||
19 | + RPMTAG_RECOMMENDVERSION, | ||
20 | + RPMTAG_SUPPLEMENTVERSION, | ||
21 | 0 | ||
22 | }; | ||
23 | |||
24 | diff --git a/build/parsePreamble.c b/build/parsePreamble.c | ||
25 | index 5772bef..cbbbee3 100644 | ||
26 | --- a/build/parsePreamble.c | ||
27 | +++ b/build/parsePreamble.c | ||
28 | @@ -821,6 +821,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, | ||
29 | } | ||
30 | /* fallthrough */ | ||
31 | case RPMTAG_PREREQ: | ||
32 | + case RPMTAG_RECOMMENDFLAGS: | ||
33 | + case RPMTAG_SUGGESTFLAGS: | ||
34 | + case RPMTAG_SUPPLEMENTFLAGS: | ||
35 | + case RPMTAG_ENHANCEFLAGS: | ||
36 | case RPMTAG_CONFLICTFLAGS: | ||
37 | case RPMTAG_OBSOLETEFLAGS: | ||
38 | case RPMTAG_PROVIDEFLAGS: | ||
39 | @@ -922,6 +926,10 @@ static struct PreambleRec_s const preambleList[] = { | ||
40 | {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")}, | ||
41 | {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")}, | ||
42 | {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")}, | ||
43 | + {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")}, | ||
44 | + {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")}, | ||
45 | + {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")}, | ||
46 | + {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")}, | ||
47 | {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")}, | ||
48 | {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")}, | ||
49 | {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")}, | ||
50 | diff --git a/build/parseReqs.c b/build/parseReqs.c | ||
51 | index ba080a1..1427111 100644 | ||
52 | --- a/build/parseReqs.c | ||
53 | +++ b/build/parseReqs.c | ||
54 | @@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, | ||
55 | nametag = RPMTAG_REQUIRENAME; | ||
56 | tagflags |= RPMSENSE_ANY; | ||
57 | break; | ||
58 | + case RPMTAG_RECOMMENDFLAGS: | ||
59 | + nametag = RPMTAG_RECOMMENDNAME; | ||
60 | + break; | ||
61 | + case RPMTAG_SUGGESTFLAGS: | ||
62 | + nametag = RPMTAG_SUGGESTNAME; | ||
63 | + break; | ||
64 | + case RPMTAG_SUPPLEMENTFLAGS: | ||
65 | + nametag = RPMTAG_SUPPLEMENTNAME; | ||
66 | + break; | ||
67 | + case RPMTAG_ENHANCEFLAGS: | ||
68 | + nametag = RPMTAG_ENHANCENAME; | ||
69 | + break; | ||
70 | case RPMTAG_PROVIDEFLAGS: | ||
71 | nametag = RPMTAG_PROVIDENAME; | ||
72 | break; | ||
73 | diff --git a/build/reqprov.c b/build/reqprov.c | ||
74 | index a368f42..c270af6 100644 | ||
75 | --- a/build/reqprov.c | ||
76 | +++ b/build/reqprov.c | ||
77 | @@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal tagN, | ||
78 | extra = Flags & RPMSENSE_TRIGGER; | ||
79 | dsp = &pkg->triggers; | ||
80 | break; | ||
81 | + case RPMTAG_RECOMMENDNAME: | ||
82 | + versiontag = RPMTAG_RECOMMENDVERSION; | ||
83 | + flagtag = RPMTAG_RECOMMENDFLAGS; | ||
84 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
85 | + dsp = &pkg->recommends; | ||
86 | + break; | ||
87 | + case RPMTAG_SUGGESTNAME: | ||
88 | + versiontag = RPMTAG_SUGGESTVERSION; | ||
89 | + flagtag = RPMTAG_SUGGESTFLAGS; | ||
90 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
91 | + dsp = &pkg->suggests; | ||
92 | + break; | ||
93 | + case RPMTAG_SUPPLEMENTNAME: | ||
94 | + versiontag = RPMTAG_SUPPLEMENTVERSION; | ||
95 | + flagtag = RPMTAG_SUPPLEMENTFLAGS; | ||
96 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
97 | + dsp = &pkg->supplements; | ||
98 | + break; | ||
99 | + case RPMTAG_ENHANCENAME: | ||
100 | + versiontag = RPMTAG_ENHANCEVERSION; | ||
101 | + flagtag = RPMTAG_ENHANCEFLAGS; | ||
102 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
103 | + dsp = &pkg->enhances; | ||
104 | + break; | ||
105 | case RPMTAG_REQUIRENAME: | ||
106 | default: | ||
107 | tagN = RPMTAG_REQUIRENAME; | ||
108 | diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h | ||
109 | index a9e4c7c..0a1977f 100644 | ||
110 | --- a/build/rpmbuild_internal.h | ||
111 | +++ b/build/rpmbuild_internal.h | ||
112 | @@ -93,6 +93,10 @@ struct Package_s { | ||
113 | rpmds ds; /*!< Requires: N = EVR */ | ||
114 | rpmds requires; | ||
115 | rpmds provides; | ||
116 | + rpmds recommends; | ||
117 | + rpmds suggests; | ||
118 | + rpmds supplements; | ||
119 | + rpmds enhances; | ||
120 | rpmds conflicts; | ||
121 | rpmds obsoletes; | ||
122 | rpmds triggers; | ||
123 | diff --git a/build/spec.c b/build/spec.c | ||
124 | index 703ec78..7ae2120 100644 | ||
125 | --- a/build/spec.c | ||
126 | +++ b/build/spec.c | ||
127 | @@ -139,6 +139,11 @@ static Package freePackage(Package pkg) | ||
128 | pkg->ds = rpmdsFree(pkg->ds); | ||
129 | pkg->requires = rpmdsFree(pkg->requires); | ||
130 | pkg->provides = rpmdsFree(pkg->provides); | ||
131 | + pkg->recommends = rpmdsFree(pkg->recommends); | ||
132 | + pkg->suggests = rpmdsFree(pkg->suggests); | ||
133 | + pkg->supplements = rpmdsFree(pkg->supplements); | ||
134 | + pkg->enhances = rpmdsFree(pkg->enhances); | ||
135 | + | ||
136 | pkg->conflicts = rpmdsFree(pkg->conflicts); | ||
137 | pkg->obsoletes = rpmdsFree(pkg->obsoletes); | ||
138 | pkg->triggers = rpmdsFree(pkg->triggers); | ||
139 | diff --git a/lib/rpmds.c b/lib/rpmds.c | ||
140 | index 7a51167..1e5dda0 100644 | ||
141 | --- a/lib/rpmds.c | ||
142 | +++ b/lib/rpmds.c | ||
143 | @@ -52,6 +52,22 @@ static int dsType(rpmTagVal tag, | ||
144 | t = "Requires"; | ||
145 | evr = RPMTAG_REQUIREVERSION; | ||
146 | f = RPMTAG_REQUIREFLAGS; | ||
147 | + } else if (tag == RPMTAG_SUPPLEMENTNAME) { | ||
148 | + t = "Supplements"; | ||
149 | + evr = RPMTAG_SUPPLEMENTVERSION; | ||
150 | + f = RPMTAG_SUPPLEMENTFLAGS; | ||
151 | + } else if (tag == RPMTAG_ENHANCENAME) { | ||
152 | + t = "Enhances"; | ||
153 | + evr = RPMTAG_ENHANCEVERSION; | ||
154 | + f = RPMTAG_ENHANCEFLAGS; | ||
155 | + } else if (tag == RPMTAG_RECOMMENDNAME) { | ||
156 | + t = "Recommends"; | ||
157 | + evr = RPMTAG_RECOMMENDVERSION; | ||
158 | + f = RPMTAG_RECOMMENDFLAGS; | ||
159 | + } else if (tag == RPMTAG_SUGGESTNAME) { | ||
160 | + t = "Suggests"; | ||
161 | + evr = RPMTAG_SUGGESTVERSION; | ||
162 | + f = RPMTAG_SUGGESTFLAGS; | ||
163 | } else if (tag == RPMTAG_CONFLICTNAME) { | ||
164 | t = "Conflicts"; | ||
165 | evr = RPMTAG_CONFLICTVERSION; | ||
166 | diff --git a/lib/rpmtag.h b/lib/rpmtag.h | ||
167 | index 64b03f1..b943229 100644 | ||
168 | --- a/lib/rpmtag.h | ||
169 | +++ b/lib/rpmtag.h | ||
170 | @@ -217,14 +217,14 @@ typedef enum rpmTag_e { | ||
171 | RPMTAG_PRETRANSPROG = 1153, /* s[] */ | ||
172 | RPMTAG_POSTTRANSPROG = 1154, /* s[] */ | ||
173 | RPMTAG_DISTTAG = 1155, /* s */ | ||
174 | - RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */ | ||
175 | -#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */ | ||
176 | - RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ | ||
177 | - RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ | ||
178 | - RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */ | ||
179 | -#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */ | ||
180 | - RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */ | ||
181 | - RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */ | ||
182 | + RPMTAG_OLDSUGGESTSNAME = 1156, /* s[] (unimplemented) */ | ||
183 | +#define RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */ | ||
184 | + RPMTAG_OLDSUGGESTSVERSION = 1157, /* s[] (unimplemented) */ | ||
185 | + RPMTAG_OLDSUGGESTSFLAGS = 1158, /* i[] (unimplemented) */ | ||
186 | + RPMTAG_OLDENHANCESNAME = 1159, /* s[] (unimplemented) */ | ||
187 | +#define RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */ | ||
188 | + RPMTAG_OLDENHANCESVERSION = 1160, /* s[] (unimplemented) */ | ||
189 | + RPMTAG_OLDENHANCESFLAGS = 1161, /* i[] (unimplemented) */ | ||
190 | RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ | ||
191 | RPMTAG_CVSID = 1163, /* s (unimplemented) */ | ||
192 | #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ | ||
193 | @@ -261,6 +261,7 @@ typedef enum rpmTag_e { | ||
194 | RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */ | ||
195 | RPMTAG_DBINSTANCE = 1195, /* i extension */ | ||
196 | RPMTAG_NVRA = 1196, /* s extension */ | ||
197 | + | ||
198 | /* tags 1997-4999 reserved */ | ||
199 | RPMTAG_FILENAMES = 5000, /* s[] extension */ | ||
200 | RPMTAG_FILEPROVIDE = 5001, /* s[] extension */ | ||
201 | @@ -307,6 +308,26 @@ typedef enum rpmTag_e { | ||
202 | RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */ | ||
203 | RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */ | ||
204 | RPMTAG_FILENLINKS = 5045, /* i[] extension */ | ||
205 | + RPMTAG_RECOMMENDNAME = 5046, /* s[] */ | ||
206 | +#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */ | ||
207 | + RPMTAG_RECOMMENDVERSION = 5047, /* s[] */ | ||
208 | + RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */ | ||
209 | + RPMTAG_SUGGESTNAME = 5049, /* s[] */ | ||
210 | +#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */ | ||
211 | + RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */ | ||
212 | + RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */ | ||
213 | + RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */ | ||
214 | +#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */ | ||
215 | + RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */ | ||
216 | + RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */ | ||
217 | + RPMTAG_ENHANCENAME = 5055, /* s[] */ | ||
218 | +#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */ | ||
219 | + RPMTAG_ENHANCEVERSION = 5056, /* s[] */ | ||
220 | + RPMTAG_ENHANCEFLAGS = 5057, /* i[] */ | ||
221 | + RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */ | ||
222 | + RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */ | ||
223 | + RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */ | ||
224 | + RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */ | ||
225 | |||
226 | RPMTAG_FIRSTFREE_TAG /*!< internal */ | ||
227 | } rpmTag; | ||
228 | diff --git a/lib/tagexts.c b/lib/tagexts.c | ||
229 | index 29b2bae..e940310 100644 | ||
230 | --- a/lib/tagexts.c | ||
231 | +++ b/lib/tagexts.c | ||
232 | @@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
233 | return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME); | ||
234 | } | ||
235 | |||
236 | +static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
237 | +{ | ||
238 | + return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME); | ||
239 | +} | ||
240 | + | ||
241 | +static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
242 | +{ | ||
243 | + return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME); | ||
244 | +} | ||
245 | + | ||
246 | +static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
247 | +{ | ||
248 | + return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME); | ||
249 | +} | ||
250 | + | ||
251 | +static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
252 | +{ | ||
253 | + return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME); | ||
254 | +} | ||
255 | + | ||
256 | static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) | ||
257 | { | ||
258 | return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME); | ||
259 | @@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = { | ||
260 | { RPMTAG_EPOCHNUM, epochnumTag }, | ||
261 | { RPMTAG_INSTFILENAMES, instfilenamesTag }, | ||
262 | { RPMTAG_REQUIRENEVRS, requirenevrsTag }, | ||
263 | + { RPMTAG_RECOMMENDNEVRS, recommendnevrsTag}, | ||
264 | + { RPMTAG_SUGGESTNEVRS, suggestnevrsTag}, | ||
265 | + { RPMTAG_SUPPLEMENTNEVRS, supplementnevrsTag}, | ||
266 | + { RPMTAG_ENHANCENEVRS, enhancenevrsTag}, | ||
267 | { RPMTAG_PROVIDENEVRS, providenevrsTag }, | ||
268 | { RPMTAG_OBSOLETENEVRS, obsoletenevrsTag }, | ||
269 | { RPMTAG_CONFLICTNEVRS, conflictnevrsTag }, | ||
270 | diff --git a/rpmpopt.in b/rpmpopt.in | ||
271 | index 805599e..036ab4e 100644 | ||
272 | --- a/rpmpopt.in | ||
273 | +++ b/rpmpopt.in | ||
274 | @@ -67,6 +67,19 @@ rpm alias --requires --qf \ | ||
275 | --POPTdesc=$"list capabilities required by package(s)" | ||
276 | rpm alias -R --requires | ||
277 | |||
278 | +rpm alias --recommends --qf \ | ||
279 | + "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \ | ||
280 | + --POPTdesc=$"list capabilities recommended by package(s)" | ||
281 | +rpm alias --suggests --qf \ | ||
282 | + "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \ | ||
283 | + --POPTdesc=$"list capabilities suggested by package(s)" | ||
284 | +rpm alias --supplements --qf \ | ||
285 | + "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \ | ||
286 | + --POPTdesc=$"list capabilities supplemented by package(s)" | ||
287 | +rpm alias --enhances --qf \ | ||
288 | + "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \ | ||
289 | + --POPTdesc=$"list capabilities enhanced by package(s)" | ||
290 | + | ||
291 | rpm alias --info --qf '\ | ||
292 | Name : %{NAME}\n\ | ||
293 | %|EPOCH?{Epoch : %{EPOCH}\n}|\ | ||
294 | diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec | ||
295 | index cb4cbbd..7c47f6d 100644 | ||
296 | --- a/tests/data/SPECS/deptest.spec | ||
297 | +++ b/tests/data/SPECS/deptest.spec | ||
298 | @@ -10,6 +10,10 @@ BuildArch: noarch | ||
299 | %{?provs:Provides: %{provs}} | ||
300 | %{?cfls:Conflicts: %{cfls}} | ||
301 | %{?obs:Obsoletes: %{obs}} | ||
302 | +%{?recs:Recommends: %{recs}} | ||
303 | +%{?sugs:Suggests: %{sugs}} | ||
304 | +%{?sups:Supplements: %{sups}} | ||
305 | +%{?ens:Enhances: %{ens}} | ||
306 | |||
307 | %description | ||
308 | %{summary} | ||
309 | diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at | ||
310 | index 6230903..c4c954c 100644 | ||
311 | --- a/tests/rpmbuild.at | ||
312 | +++ b/tests/rpmbuild.at | ||
313 | @@ -185,3 +185,25 @@ lrwxrwxrwx /opt/globtest/linkgood | ||
314 | ], | ||
315 | []) | ||
316 | AT_CLEANUP | ||
317 | + | ||
318 | +# ------------------------------ | ||
319 | +# Check if weak and reverse requires can be built | ||
320 | +AT_SETUP([Weak and reverse requires]) | ||
321 | +AT_KEYWORDS([build]) | ||
322 | +AT_CHECK([ | ||
323 | + | ||
324 | +runroot rpmbuild -bb --quiet \ | ||
325 | + --define "pkg weakdeps" \ | ||
326 | + --define "recs foo > 1.2.3" \ | ||
327 | + --define "sugs bar >= 0.1.2" \ | ||
328 | + --define "sups baz" \ | ||
329 | + --define "ens zap = 3" \ | ||
330 | + /data/SPECS/deptest.spec | ||
331 | + | ||
332 | +runroot rpm -qp --qf "[%{supplementname}\n]" /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm | ||
333 | +], | ||
334 | +[0], | ||
335 | +[baz | ||
336 | +], | ||
337 | +[ignore]) | ||
338 | +AT_CLEANUP | ||
339 | diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at | ||
340 | index 13131e2..80cca63 100644 | ||
341 | --- a/tests/rpmgeneral.at | ||
342 | +++ b/tests/rpmgeneral.at | ||
343 | @@ -79,6 +79,11 @@ DISTTAG | ||
344 | DISTURL | ||
345 | DSAHEADER | ||
346 | E | ||
347 | +ENHANCEFLAGS | ||
348 | +ENHANCENAME | ||
349 | +ENHANCENEVRS | ||
350 | +ENHANCES | ||
351 | +ENHANCEVERSION | ||
352 | EPOCH | ||
353 | EPOCHNUM | ||
354 | EVR | ||
355 | @@ -199,6 +204,11 @@ PROVIDES | ||
356 | PROVIDEVERSION | ||
357 | PUBKEYS | ||
358 | R | ||
359 | +RECOMMENDFLAGS | ||
360 | +RECOMMENDNAME | ||
361 | +RECOMMENDNEVRS | ||
362 | +RECOMMENDS | ||
363 | +RECOMMENDVERSION | ||
364 | RECONTEXTS | ||
365 | RELEASE | ||
366 | REMOVETID | ||
367 | @@ -219,7 +229,17 @@ SOURCE | ||
368 | SOURCEPACKAGE | ||
369 | SOURCEPKGID | ||
370 | SOURCERPM | ||
371 | +SUGGESTFLAGS | ||
372 | +SUGGESTNAME | ||
373 | +SUGGESTNEVRS | ||
374 | +SUGGESTS | ||
375 | +SUGGESTVERSION | ||
376 | SUMMARY | ||
377 | +SUPPLEMENTFLAGS | ||
378 | +SUPPLEMENTNAME | ||
379 | +SUPPLEMENTNEVRS | ||
380 | +SUPPLEMENTS | ||
381 | +SUPPLEMENTVERSION | ||
382 | TRIGGERCONDS | ||
383 | TRIGGERFLAGS | ||
384 | TRIGGERINDEX | ||
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch new file mode 100644 index 0000000000..8d84cf8a11 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | |||
2 | Use pkgconfig to get the correct include paths | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> | ||
8 | |||
9 | diff --git a/configure.ac b/configure.ac | ||
10 | index e97f727..8179f44 100644 | ||
11 | --- a/configure.ac | ||
12 | +++ b/configure.ac | ||
13 | @@ -540,10 +540,10 @@ esac], | ||
14 | |||
15 | AS_IF([test "$enable_python" = yes],[ | ||
16 | AM_PATH_PYTHON([2.6],[ | ||
17 | - WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'` | ||
18 | + WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I python) | ||
19 | WITH_PYTHON_SUBPACKAGE=1 | ||
20 | save_CPPFLAGS="$CPPFLAGS" | ||
21 | - CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE" | ||
22 | + CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE" | ||
23 | AC_CHECK_HEADER([Python.h],[], | ||
24 | [AC_MSG_ERROR([missing Python.h]) | ||
25 | ]) | ||
26 | diff --git a/python/Makefile.am b/python/Makefile.am | ||
27 | index fff51ae..f37cb9d 100644 | ||
28 | --- a/python/Makefile.am | ||
29 | +++ b/python/Makefile.am | ||
30 | @@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py | ||
31 | |||
32 | AM_CPPFLAGS = -I$(top_builddir)/include/ | ||
33 | AM_CPPFLAGS += -I$(top_srcdir)/python | ||
34 | -AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@ | ||
35 | +AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@ | ||
36 | |||
37 | pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la | ||
38 | pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py | ||
diff --git a/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/meta/recipes-devtools/rpm/rpm_4.11.2.bb new file mode 100644 index 0000000000..86a14fae50 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.11.2.bb | |||
@@ -0,0 +1,133 @@ | |||
1 | SUMMARY = "The RPM package management system" | ||
2 | DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ | ||
3 | package management system capable of installing, uninstalling, \ | ||
4 | verifying, querying, and updating software packages. Each software \ | ||
5 | package consists of an archive of files along with information about \ | ||
6 | the package like its version, a description, etc." | ||
7 | |||
8 | SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" | ||
9 | DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ | ||
10 | development files will simplify the process of writing programs that \ | ||
11 | manipulate RPM packages and databases. These files are intended to \ | ||
12 | simplify the process of creating graphical package managers or any \ | ||
13 | other tools that need an intimate knowledge of RPM packages in order \ | ||
14 | to function." | ||
15 | |||
16 | SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" | ||
17 | DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ | ||
18 | written in the Python programming language to use the interface \ | ||
19 | supplied by the RPM Package Manager libraries." | ||
20 | |||
21 | HOMEPAGE = "http://www.rpm.org" | ||
22 | LICENSE = "GPL-2.0+" | ||
23 | LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
24 | |||
25 | DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python" | ||
26 | |||
27 | SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \ | ||
28 | file://use-pkgconfig-for-python.patch \ | ||
29 | file://remove-db3-from-configure.patch \ | ||
30 | file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \ | ||
31 | file://support-suggests-tag.patch \ | ||
32 | file://remove-dir-check.patch \ | ||
33 | file://disable_shortcircuited.patch \ | ||
34 | file://fix_libdir.patch \ | ||
35 | file://rpm-scriptetexechelp.patch \ | ||
36 | file://pythondeps.sh \ | ||
37 | " | ||
38 | |||
39 | SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173" | ||
40 | SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4" | ||
41 | |||
42 | inherit autotools-brokensep | ||
43 | inherit pythonnative | ||
44 | inherit pkgconfig | ||
45 | inherit gettext | ||
46 | |||
47 | EXTRA_OECONF += "--host=${HOST_SYS} \ | ||
48 | --program-prefix= \ | ||
49 | --prefix=${prefix} \ | ||
50 | --exec-prefix=${prefix} \ | ||
51 | --bindir=${prefix}/bin \ | ||
52 | --sbindir=${prefix}/sbin \ | ||
53 | --sysconfdir=${sysconfdir} \ | ||
54 | --datadir=${prefix}/share \ | ||
55 | --includedir=${prefix}/include \ | ||
56 | --libdir=${prefix}/lib \ | ||
57 | --libexecdir=${prefix}/libexec \ | ||
58 | --localstatedir=${localstatedir} \ | ||
59 | --sharedstatedir=${prefix}/com \ | ||
60 | --mandir=${mandir} \ | ||
61 | --infodir=${infodir} \ | ||
62 | --disable-dependency-tracking \ | ||
63 | --with-acl \ | ||
64 | --without-lua \ | ||
65 | --without-cap \ | ||
66 | --enable-shared \ | ||
67 | --enable-python \ | ||
68 | --with-external-db \ | ||
69 | " | ||
70 | |||
71 | CPPFLAGS_append = " `pkg-config --cflags nss`" | ||
72 | LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections" | ||
73 | CCFLAGS_append = " -fPIC " | ||
74 | CXXFLAGS_append = " -fPIC " | ||
75 | CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE " | ||
76 | |||
77 | do_configure_prepend() { | ||
78 | rm -rf sqlite | ||
79 | rm -f m4/libtool.m4 | ||
80 | rm -f m4/lt*.m4 | ||
81 | rm -rf db3/configure* | ||
82 | } | ||
83 | |||
84 | do_install_append() { | ||
85 | mv ${D}/${base_bindir}/rpm ${D}/${bindir}/ | ||
86 | rmdir ${D}/${base_bindir} | ||
87 | rm -f ${D}${prefix}/lib/*.la | ||
88 | rm -f ${D}${prefix}/lib/rpm-plugins/*.la | ||
89 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} | ||
90 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} | ||
91 | rm -fr ${D}/var | ||
92 | install -d ${D}${prefix}/lib/rpm/bin | ||
93 | ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit | ||
94 | ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore | ||
95 | install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh | ||
96 | } | ||
97 | |||
98 | pkg_postinst_${PN}() { | ||
99 | |||
100 | [ "x\$D" == "x" ] && ldconfig | ||
101 | test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb | ||
102 | rm -f ${localstatedir}/lib/rpm/Filemd5s \ | ||
103 | ${localstatedir}/lib/rpm/Filedigests \ | ||
104 | ${localstatedir}/lib/rpm/Requireversion \ | ||
105 | ${localstatedir}/lib/rpm/Provideversion | ||
106 | |||
107 | } | ||
108 | |||
109 | pkg_postrm_${PN}() { | ||
110 | [ "x\$D" == "x" ] && ldconfig | ||
111 | |||
112 | } | ||
113 | |||
114 | PACKAGES += "python-${PN}" | ||
115 | PROVIDES += "python-rpm" | ||
116 | |||
117 | FILES_${PN} += "${libdir}/rpm \ | ||
118 | ${libdir}/rpm-plugins/exec.so \ | ||
119 | " | ||
120 | RDEPENDS_${PN} = "base-files run-postinsts" | ||
121 | RDEPENDS_${PN}_class-native = "base-files run-postinsts" | ||
122 | |||
123 | FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \ | ||
124 | ${libdir}/rpm-plugins/.debug/* \ | ||
125 | ${libdir}/python2.7/site-packages/rpm/.debug/* \ | ||
126 | " | ||
127 | |||
128 | FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la" | ||
129 | |||
130 | FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*" | ||
131 | RDEPENDS_python-${PN} = "${PN} python" | ||
132 | |||
133 | BBCLASSEXTEND = "native" | ||