Accepting request 109763 from Base:System

Fix build with gcc 4.7; rebased DimStar's changes (forwarded request 109293 from vuntz)

OBS-URL: https://build.opensuse.org/request/show/109763
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=174
This commit is contained in:
Stephan Kulow 2012-03-20 11:04:39 +00:00 committed by Git OBS Bridge
commit 69336fa391
9 changed files with 136 additions and 27 deletions

View File

@ -0,0 +1,15 @@
Index: scripts/find-lang.sh
===================================================================
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -139,8 +139,8 @@ s:%lang(C) ::
find $TOP_DIR -type d|sed '
s:'"$TOP_DIR"'::
-'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3/:
-'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3/:
+'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/:
+'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
s:^\([^%].*\)::
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW

28
findlang-new-help.diff Normal file
View File

@ -0,0 +1,28 @@
From 6047ddf6aa984a65e334450e04d272631894b039 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 7 Mar 2012 11:31:15 +0200
Subject: [PATCH] Teach find-lang about the new gnome help layout (RhBug:736523)
---
scripts/find-lang.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Index: scripts/find-lang.sh
===================================================================
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -122,6 +122,14 @@ s:%lang(C) ::
find $TOP_DIR -type d|sed '
s:'"$TOP_DIR"'::
+'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3/:
+'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3/:
+s:^\([^%].*\)::
+s:%lang(C) ::
+/^$/d' >> $MO_NAME_NEW
+
+find $TOP_DIR -type d|sed '
+s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1:
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2:

View File

@ -1,6 +1,8 @@
--- ./macros.in.orig 2011-07-18 17:18:24.000000000 +0000
+++ ./macros.in 2011-07-18 17:18:36.000000000 +0000
@@ -1249,6 +1249,7 @@ EOF
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
@@ -1253,6 +1253,7 @@ EOF
# %files -f %{name}.lang
#
%find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
@ -8,8 +10,10 @@
# Commands + opts to use for retrieving remote files
# Proxy opts can be set through --httpproxy/--httpport popt aliases,
--- ./scripts/find-lang.sh.orig 2011-07-18 17:18:24.000000000 +0000
+++ ./scripts/find-lang.sh 2011-07-18 17:18:36.000000000 +0000
Index: scripts/find-lang.sh
===================================================================
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -62,6 +62,8 @@ MO=
MO_NAME=$NAME.lang
ALL_NAME=#
@ -34,11 +38,20 @@
* )
MO_NAME=${1}
shift
@@ -117,27 +127,32 @@ s:'"$TOP_DIR"'::
@@ -134,6 +144,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
+'"$ONLY_C"'/%lang(C)/!d
+'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -142,27 +154,32 @@ s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/:
'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
s:^\([^%].*\)::
+'"$ONLY_C"'/%lang(C)/!d
+'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@ -71,7 +84,7 @@
/^$/d' >> $MO_NAME_NEW
find $TOP_DIR -type f|sed '
@@ -145,6 +160,8 @@ s:'"$TOP_DIR"'::
@@ -170,6 +187,8 @@ s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1:
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
s:^[^%].*::
@ -80,7 +93,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -157,6 +174,8 @@ s:'"$TOP_DIR"'::
@@ -182,6 +201,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
@ -89,7 +102,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
@@ -170,6 +189,8 @@ s:'"$TOP_DIR"'::
@@ -195,6 +216,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
@ -98,7 +111,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
@@ -182,6 +203,8 @@ s:'"$TOP_DIR"'::
@@ -207,6 +230,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
s:^[^%].*::
@ -107,7 +120,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -190,6 +213,8 @@ s:'"$TOP_DIR"'::
@@ -215,6 +240,8 @@ s:'"$TOP_DIR"'::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\)::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
s:^\([^%].*\)::
@ -116,7 +129,7 @@
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
@@ -197,6 +222,8 @@ find $TOP_DIR -type f -o -type l|sed '
@@ -222,6 +249,8 @@ find $TOP_DIR -type f -o -type l|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
s:^\([^%].*\)::

View File

@ -16,7 +16,6 @@
#
Name: python3-rpm
Version: 4.9.1.2
Release: 0

View File

@ -1,8 +1,8 @@
Index: scripts/find-lang.sh
===================================================================
--- scripts/find-lang.sh.orig 2011-12-09 14:46:32.443023115 +0100
+++ scripts/find-lang.sh 2011-12-09 14:46:52.086092200 +0100
@@ -122,6 +122,17 @@ fi
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -112,6 +112,23 @@ fi
MO_NAME_NEW=$MO_NAME.tmp.$$
rm -f $MO_NAME_NEW
@ -16,6 +16,12 @@ Index: scripts/find-lang.sh
+ rm -rf $TOP_DIR/usr/share/locale/$dir
+ fi
+done
+find $TOP_DIR/usr/share/help/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/help/'::; /^$/d' | while read dir; do
+ if ! rpm -ql filesystem | egrep -q "/usr/share/help/$dir"$; then
+ echo -n "removing help translation /usr/share/help/$dir"
+ rm -rf $TOP_DIR/usr/share/help/$dir
+ fi
+done
+
find $TOP_DIR -type f -o -type l|sed '
s:'"$TOP_DIR"'::

27
rpm-gcc47.patch Normal file
View File

@ -0,0 +1,27 @@
Index: rpmio/rpmio.c
===================================================================
--- rpmio/rpmio.c.orig
+++ rpmio/rpmio.c
@@ -1576,8 +1576,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n"
if (stdio[0] == '\0')
return NULL;
zstdio[0] = '\0';
- strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio));
- strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio));
+ strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio) - 1);
+ strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio) - 1);
if (end == NULL && other[0] == '\0')
return fd;
Index: lib/signature.c
===================================================================
--- lib/signature.c.orig
+++ lib/signature.c
@@ -5,6 +5,7 @@
#include "system.h"
#include <inttypes.h>
+#include <arpa/inet.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmstring.h>

View File

@ -16,7 +16,6 @@
#
Name: rpm-python
Version: 4.9.1.2
Release: 0

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Tue Mar 13 21:53:12 UTC 2012 - dimstar@opensuse.org
- Add rpm-gcc47.patch: Fix build with gcc 4.7 by correcting a
strncat call and including missing headers.
-------------------------------------------------------------------
Tue Mar 13 14:40:47 UTC 2012 - vuntz@opensuse.org
- Add findlang-new-help.diff: patch based on git commit 6047ddf6 to
make find-lang know about the new gnome help layout.
- Add findlang-new-help-fix.diff: additional fix to above patch, so
that locales with a territory work too (for instance, fr_FR).
- Rebase langnoc.diff on top of findlang-new-help.diff, so that we
won't need to rebase it with a future release containing
findlang-new-help.diff.
- Update remove-translations.diff to also remove help translations
for languages that are not supported by the filesystem package.
-------------------------------------------------------------------
Tue Jan 31 11:06:52 UTC 2012 - lnussel@suse.de

View File

@ -16,7 +16,6 @@
#
Name: rpm
BuildRequires: binutils
BuildRequires: bzip2
@ -118,7 +117,7 @@ Patch61: noprereqdeprec.diff
Patch62: pythondeps.diff
Patch63: fontprovides.diff
Patch64: rpm-gst-provides.patch
Patch65: langnoc.diff
Patch65: findlang-new-help.diff
Patch66: initscriptsprov.diff
Patch67: remove-translations.diff
Patch68: no_rep_autop.diff
@ -136,6 +135,9 @@ Patch79: headerchk.diff
Patch80: rpm-deptracking.patch
Patch81: python3-abi-kind.diff
Patch82: perl-python-attr.patch
Patch83: findlang-new-help-fix.diff
Patch84: langnoc.diff
Patch85: rpm-gcc47.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -169,19 +171,20 @@ need an intimate knowledge of RPM packages in order to function.
Summary: Tools and Scripts to create rpm packages
Group: System/Packages
Requires: rpm = %{version}
Provides: rpmbuild rpm:%_bindir/rpmbuild
Provides: rpm:%_bindir/rpmbuild
Provides: rpmbuild
# SUSE's build essentials
Requires: bzip2
Requires: xz
Requires: gzip
Requires: binutils
Requires: make
Requires: bzip2
Requires: findutils
Requires: gcc
Requires: gettext-tools
Requires: findutils
Requires: patch
Requires: glibc-devel
Requires: gzip
Requires: make
Requires: patch
Requires: perl-base
Requires: xz
%description build
If you want to build a rpm, you need this package. It provides rpmbuild
@ -208,7 +211,7 @@ rm -f rpmdb/db.h
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81 -P 82
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov