mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 10:23:04 +00:00
add ROSA patches
This commit is contained in:
parent
73b9003847
commit
e67292466d
4 changed files with 187 additions and 0 deletions
40
rpm-5.3.12.vendor.ROSA.patch
Normal file
40
rpm-5.3.12.vendor.ROSA.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
diff -Nur rpm-5.3.12/macros/macros rpm-5.3.12.new/macros/macros
|
||||
--- rpm-5.3.12/macros/macros 2011-07-12 14:08:41.000000000 +0400
|
||||
+++ rpm-5.3.12.new/macros/macros 2012-04-10 14:42:44.000000000 +0400
|
||||
@@ -835,7 +835,7 @@
|
||||
#
|
||||
%_arch x86_64
|
||||
%_build_arch x86_64
|
||||
-%_vendor mandriva
|
||||
+%_vendor rosa
|
||||
%_os linux
|
||||
%_gnu -gnu
|
||||
|
||||
diff -Nur rpm-5.3.12/macros/mandriva rpm-5.3.12.new/macros/mandriva
|
||||
--- rpm-5.3.12/macros/mandriva 2011-07-12 14:08:41.000000000 +0400
|
||||
+++ rpm-5.3.12.new/macros/mandriva 2012-04-10 14:44:02.000000000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
%distribution Mandriva Linux
|
||||
%vendor Mandriva
|
||||
-%bugurl http://qa.mandriva.com
|
||||
-%disturl http://mandriva.org
|
||||
+%bugurl http://bugs.rosalinux.ru/
|
||||
+%disturl http://www.rosalab.ru/
|
||||
|
||||
# This macro will disable the transaction lock on /var/lib/rpm/__db.*.
|
||||
# This lock is of no use to us and will also result in errors when trying to
|
||||
diff -Nur rpm-5.3.12/macros/mandriva.in rpm-5.3.12.new/macros/mandriva.in
|
||||
--- rpm-5.3.12/macros/mandriva.in 2011-05-04 16:20:06.000000000 +0400
|
||||
+++ rpm-5.3.12.new/macros/mandriva.in 2012-04-10 14:46:12.000000000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
-%distribution Mandriva Linux
|
||||
-%vendor Mandriva
|
||||
-%bugurl http://qa.mandriva.com
|
||||
-%disturl http://mandriva.org
|
||||
+%distribution ROSA Linux
|
||||
+%vendor ROSA
|
||||
+%bugurl http://bugs.rosalinux.ru/
|
||||
+%disturl http://www.rosalab.ru/
|
||||
|
||||
# This macro will disable the transaction lock on /var/lib/rpm/__db.*.
|
||||
# This lock is of no use to us and will also result in errors when trying to
|
13
rpm-5.4.9-package-name.patch
Normal file
13
rpm-5.4.9-package-name.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
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_OPT_FLAGS=\"%{optflags}\"\
|
||||
- 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}}\"\
|
||||
export RPM_BUILD_ROOT}\
|
||||
%{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
|
122
rpm-5.4.9-specspo.patch
Normal file
122
rpm-5.4.9-specspo.patch
Normal file
|
@ -0,0 +1,122 @@
|
|||
--- rpm-5.3.13/rpmdb/hdrfmt.c 2011-03-26 15:57:24.000000000 +0300
|
||||
+++ rpm-5.3.13/rpmdb/hdrfmt.c 2012-04-16 12:32:50.588475008 +0400
|
||||
@@ -2096,102 +2096,34 @@
|
||||
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
|
||||
/*@modifies he, rpmGlobalMacroContext, internalState @*/
|
||||
{
|
||||
- char * dstring = rpmExpand(_macro_i18ndomains, NULL);
|
||||
- int rc = 1; /* assume failure */
|
||||
-
|
||||
+ int rc = headerGet(h, he, HEADERGET_NOEXTENSION);
|
||||
he->t = RPM_STRING_TYPE;
|
||||
- he->p.str = NULL;
|
||||
- he->c = 0;
|
||||
- he->freeData = 0;
|
||||
-
|
||||
- if (dstring && *dstring) {
|
||||
- char *domain, *de;
|
||||
- const char * langval;
|
||||
- const char * msgkey;
|
||||
- const char * msgid;
|
||||
-
|
||||
- { HE_t nhe = (HE_t) memset(alloca(sizeof(*nhe)), 0, sizeof(*nhe));
|
||||
- const char * tn;
|
||||
- char * mk;
|
||||
- size_t nb = sizeof("()");
|
||||
- int xx;
|
||||
-
|
||||
- nhe->tag = RPMTAG_NAME;
|
||||
- xx = headerGet(h, nhe, 0);
|
||||
- /*
|
||||
- * XXX Ick, tagName() is called by headerGet(), and the tagName()
|
||||
- * buffer is valid only until next tagName() call.
|
||||
- * For now, do the tagName() lookup after headerGet().
|
||||
- */
|
||||
- tn = tagName(he->tag);
|
||||
- if (tn) nb += strlen(tn);
|
||||
- if (nhe->p.str) nb += strlen(nhe->p.str);
|
||||
- mk = alloca(nb);
|
||||
- (void) snprintf(mk, nb, "%s(%s)",
|
||||
- (nhe->p.str ? nhe->p.str : ""), (tn ? tn : ""));
|
||||
- mk[nb-1] = '\0';
|
||||
- nhe->p.ptr = _free(nhe->p.ptr);
|
||||
- msgkey = mk;
|
||||
- }
|
||||
-
|
||||
- /* change to en_US for msgkey -> msgid resolution */
|
||||
- langval = getenv(language);
|
||||
- (void) setenv(language, "en_US", 1);
|
||||
-#if defined(ENABLE_NLS)
|
||||
-/*@i@*/ ++_nl_msg_cat_cntr;
|
||||
-#endif
|
||||
-
|
||||
- msgid = NULL;
|
||||
+ if (rc){
|
||||
+ char *de, *domain, *dstring = rpmExpand(_macro_i18ndomains, NULL);
|
||||
+ const char *msgid = he->p.str;
|
||||
+ const char *msg;
|
||||
+
|
||||
for (domain = dstring; domain != NULL; domain = de) {
|
||||
de = strchr(domain, ':');
|
||||
if (de) *de++ = '\0';
|
||||
-/*@-unrecog@*/
|
||||
- msgid = dgettext(domain, msgkey);
|
||||
-/*@=unrecog@*/
|
||||
- if (msgid != msgkey) break;
|
||||
- }
|
||||
-
|
||||
- /* restore previous environment for msgid -> msgstr resolution */
|
||||
- if (langval)
|
||||
- (void) setenv(language, langval, 1);
|
||||
- else
|
||||
- unsetenv(language);
|
||||
-#if defined(ENABLE_NLS)
|
||||
-/*@i@*/ ++_nl_msg_cat_cntr;
|
||||
-#endif
|
||||
-
|
||||
- if (domain && msgid) {
|
||||
-/*@-unrecog@*/
|
||||
- const char * s = dgettext(domain, msgid);
|
||||
-/*@=unrecog@*/
|
||||
- if (s) {
|
||||
- rc = 0;
|
||||
- he->p.str = xstrdup(s);
|
||||
- he->c = 1;
|
||||
- he->freeData = 1;
|
||||
+ msg = dgettext(domain, msgid);
|
||||
+ if (msg != msgid){
|
||||
+ he->p.str = xstrdup(msg);
|
||||
+ he->c = 1;
|
||||
+ he->freeData = 1;
|
||||
+
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ dstring = _free(dstring);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
-/*@-dependenttrans@*/
|
||||
- dstring = _free(dstring);
|
||||
-/*@=dependenttrans@*/
|
||||
- if (!rc)
|
||||
- return rc;
|
||||
-
|
||||
- rc = headerGet(h, he, HEADERGET_NOEXTENSION);
|
||||
- if (rc) {
|
||||
- rc = 0;
|
||||
- he->p.str = xstrtolocale(he->p.str);
|
||||
- he->freeData = 1;
|
||||
- return rc;
|
||||
- }
|
||||
-
|
||||
- he->t = RPM_STRING_TYPE;
|
||||
he->p.str = NULL;
|
||||
he->c = 0;
|
||||
he->freeData = 0;
|
||||
-
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
12
rpm.spec
12
rpm.spec
|
@ -353,6 +353,14 @@ Patch160: rpm-5.4.10-bump-up-to-default-xz-compression-level.patch
|
|||
Patch161: rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch
|
||||
# status: same as for other dep gen patches
|
||||
Patch162: rpm-5.4.10-fix-uninitialized-variable.patch
|
||||
|
||||
# ROSA stuff
|
||||
Patch501: rpm-5.3.12.vendor.ROSA.patch
|
||||
# Restore RPM_PACKAGE_NAME export as it's still used by aot-compile-rpm
|
||||
Patch502: rpm-5.4.9-package-name.patch
|
||||
# for specspo
|
||||
Patch503: rpm-5.4.9-specspo.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.57
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: automake >= 1.8
|
||||
|
@ -710,6 +718,10 @@ This package contains the RPM API documentation generated in HTML format.
|
|||
%patch161 -p1 -b .uclibc_buildroot~
|
||||
%patch162 -p1 -b .uninitialized~
|
||||
|
||||
%patch501 -p1 -b .rosa_vendor~
|
||||
%patch502 -p1 -b .package_name~
|
||||
%patch503 -p1 -b .specspo~
|
||||
|
||||
#required by P55, P80, P81, P94..
|
||||
./autogen.sh
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue