Merge
authorRichard W.M. Jones <rjones@redhat.com>
Sun, 21 Sep 2008 10:40:42 +0000 (11:40 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 21 Sep 2008 10:40:42 +0000 (11:40 +0100)
13 files changed:
atk/compare.supp [new file with mode: 0644]
binutils/compare.supp [new file with mode: 0644]
compare/README [new file with mode: 0644]
compare/compare.py [new file with mode: 0644]
compare/compare.sh [new file with mode: 0644]
gdb/compare.supp [new file with mode: 0644]
gdb/mingw-gdb.spec
glib2/compare.supp [new file with mode: 0644]
gnutls/compare.supp [new file with mode: 0644]
gtk2/compare.supp [new file with mode: 0644]
jasper/compare.supp [new file with mode: 0644]
libjpeg/compare.supp [new file with mode: 0644]
zlib/compare.supp [new file with mode: 0644]

diff --git a/atk/compare.supp b/atk/compare.supp
new file mode 100644 (file)
index 0000000..91efa7d
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'atk-1.23.5-mingw.patch'
diff --git a/binutils/compare.supp b/binutils/compare.supp
new file mode 100644 (file)
index 0000000..ea6bd56
--- /dev/null
@@ -0,0 +1,4 @@
+different version: 'binutils': '2.18.50.0.9' != 'mingw-binutils': '2.18.50_20080109_2'
+different URL: 'binutils': 'http://sources.redhat.com/binutils' != 'mingw-binutils': 'http://www.mingw.org/'
+missing source: 'binutils-2.18.50.0.9.tar.bz2'
+extra source: 'binutils-2.18.50-20080109-2-src.tar.gz'
diff --git a/compare/README b/compare/README
new file mode 100644 (file)
index 0000000..ea923db
--- /dev/null
@@ -0,0 +1,17 @@
+
+
+A tool to compare mingw specfiles against the native specfiles
+and report on meaningful details that we should fix to keep
+mingw in sync with native builds.
+
+It expects that $HOME/src/fedora/ contains a checkout of all
+matching Fedora modules
+
+There are some bogus warnings due to mingw specific things
+but need to be filtered / surpressed on a case by case basis
+cf valgrind's  --suppression arg
+
+NB, this requires a patched rpm-python
+
+https://bugzilla.redhat.com/show_bug.cgi?id=462726
+
diff --git a/compare/compare.py b/compare/compare.py
new file mode 100644 (file)
index 0000000..265a639
--- /dev/null
@@ -0,0 +1,170 @@
+#!/usr/bin/python
+
+import sys
+from tempfile import mkdtemp
+from os import mkdir, system
+import os.path
+import rpm
+
+
+def compare_header(refspec, altspec):
+    warnings = []
+
+    refhdr = refspec.packages()[0].header()
+    althdr = altspec.packages()[0].header()
+
+    refname = refhdr[rpm.RPMTAG_NAME]
+    altname = althdr[rpm.RPMTAG_NAME]
+
+    refver = refhdr[rpm.RPMTAG_VERSION]
+    altver = althdr[rpm.RPMTAG_VERSION]
+
+    reflic = refhdr[rpm.RPMTAG_LICENSE]
+    altlic = althdr[rpm.RPMTAG_LICENSE]
+
+    refurl = refhdr[rpm.RPMTAG_URL]
+    alturl = althdr[rpm.RPMTAG_URL]
+
+    if refver != altver:
+        warnings.append("different version: '%s': '%s' != '%s': '%s'" % (refname, refver, altname, altver))
+
+    if refver != altver:
+        warnings.append("different license: '%s': '%s' != '%s': '%s'" % (refname, reflic, altname, altlic))
+
+    if refver != altver:
+        warnings.append("different URL: '%s': '%s' != '%s': '%s'" % (refname, refurl, altname, alturl))
+
+    return warnings
+
+def compare_sources(refspec, altspec):
+    warnings = []
+    refsrc = []
+    altsrc = []
+    refsrcname = []
+    altsrcname = []
+    for src in refspec.sources():
+        if src[2] == rpm.RPMBUILD_ISSOURCE:
+            uri = src[0]
+            offset = uri.rfind("/")
+            if offset != -1:
+                baseuri = uri[0:offset]
+                srcname = uri[offset+1:]
+            else:
+                baseuri = ""
+                srcname = uri
+            refsrc.append([baseuri, srcname])
+            refsrcname.append(srcname)
+
+    for src in altspec.sources():
+        if src[2] == rpm.RPMBUILD_ISSOURCE:
+            uri = src[0]
+            offset = uri.rfind("/")
+            if offset != -1:
+                baseuri = uri[0:offset]
+                srcname = uri[offset+1:]
+            else:
+                baseuri = ""
+                srcname = uri
+            altsrc.append([baseuri, srcname])
+            altsrcname.append(srcname)
+
+
+    for s in refsrc:
+        if not s[1] in altsrcname:
+            warnings.append("missing source: '%s'" % s[1])
+    for s in altsrc:
+        if not s[1] in refsrcname:
+            warnings.append("extra source: '%s'" % s[1])
+
+    for s1 in refsrc:
+        for s2 in altsrc:
+            if s1[1] != s2[1]:
+                continue
+            if s1[0] != s2[0]:
+                warnings.append("different base URI for source '%s': '%s' != '%s'" % (s1[1], s1[0], s2[0]))
+
+    return warnings
+
+
+def compare_patches(refspec, altspec):
+    warnings = []
+    refpatch = []
+    altpatch = []
+    for src in refspec.sources():
+        if src[2] == rpm.RPMBUILD_ISPATCH:
+            refpatch.append(src[0])
+    for src in altspec.sources():
+        if src[2] == rpm.RPMBUILD_ISPATCH:
+            altpatch.append(src[0])
+
+    for p in refpatch:
+        if not p in altpatch:
+            warnings.append("missing patch '%s'" % p)
+
+    for p in altpatch:
+        if not p in refpatch:
+            warnings.append("extra patch '%s'" % p)
+
+    return warnings
+
+
+def compare_specs(refspec, altspec):
+    warnings = []
+
+    for w in compare_header(refspec, altspec):
+        warnings.append(w)
+    for w in compare_sources(refspec, altspec):
+        warnings.append(w)
+    for w in compare_patches(refspec, altspec):
+        warnings.append(w)
+
+    return warnings
+
+def load_suppressions(file):
+    if not os.path.exists(file):
+        return []
+
+    supp = []
+    s = open(suppressionfile)
+    try:
+        while 1:
+            line = s.readline()
+            if not line:
+                break;
+
+            line = line[0:-1]
+            supp.append(line)
+    finally:
+        s.close()
+
+    return supp
+
+
+
+scratchdir = mkdtemp("rpm-source-compare")
+
+if len(sys.argv) != 4:
+    print "syntax: %s REFERENCE-SPEC ALTERNATE-SPEC SUPPRESSIONS" % sys.argv[0]
+    sys.exit(1)
+
+refspecfile = sys.argv[1]
+altspecfile = sys.argv[2]
+suppressionfile = sys.argv[3]
+
+ts = rpm.ts()
+
+refspec = ts.parseSpec(refspecfile)
+altspec = ts.parseSpec(altspecfile)
+suppressions = load_suppressions(suppressionfile)
+
+
+warnings = []
+for w in compare_specs(refspec, altspec):
+    if not w in suppressions:
+        warnings.append(w)
+
+if len(warnings) == 0:
+    print "PASS"
+else:
+    for w in warnings:
+        print "WARNING %s" % w
diff --git a/compare/compare.sh b/compare/compare.sh
new file mode 100644 (file)
index 0000000..78aa023
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+for i in */*.spec
+do
+  module=`dirname $i`
+
+  if [ "$module" == "portablexdr" ]; then continue ; fi
+  if [ "$module" == "example" ]; then continue ; fi
+  if [ "$module" == "filesystem" ]; then continue ; fi
+  if [ "$module" == "iconv" ]; then continue ; fi
+  if [ "$module" == "nsis" ]; then continue ; fi
+  if [ "$module" == "runtime" ]; then continue ; fi
+  if [ "$module" == "runtime-bootstrap" ]; then continue ; fi
+  if [ "$module" == "w32api" ]; then continue ; fi
+  if [ "$module" == "w32api-bootstrap" ]; then continue ; fi
+  
+
+  echo "------------------------------------------------------"
+  echo "Compare $module"
+
+  if [ "$module" == "gcc" ]; then
+    reference=$HOME/src/fedora/$module/devel/gcc43.spec
+  else
+    reference=$HOME/src/fedora/$module/devel/$module.spec
+  fi
+  suppression=$module/compare.supp
+  if [ ! -f $reference ]
+  then
+      echo "Missing reference module $reference"
+  else
+      python compare/compare.py $reference $i $suppression
+  fi
+  echo
+done
diff --git a/gdb/compare.supp b/gdb/compare.supp
new file mode 100644 (file)
index 0000000..7aa7d56
--- /dev/null
@@ -0,0 +1,128 @@
+missing source: 'gdb-gstack.man'
+missing source: 'gdb-orphanripper.c'
+different base URI for source 'gdb-6.8.tar.bz2': 'ftp://sourceware.org/pub/gdb/releases' != 'http://dl.sourceforge.net/sourceforge/mingw'
+missing patch 'gdb-6.8-breakpoint-gone.patch'
+missing patch 'gdb-6.8-attach-signalled-detach-stopped.patch'
+missing patch 'gdb-6.8-attach-signalled-upstream.patch'
+missing patch 'gdb-6.8-ctors-dtors-unique.patch'
+missing patch 'gdb-6.8-fortran-module-ignore.patch'
+missing patch 'gdb-6.8-fortran-tag-constant.patch'
+missing patch 'gdb-6.8-quit-never-aborts.patch'
+missing patch 'gdb-6.8-bz436037-reg-no-longer-active.patch'
+missing patch 'gdb-6.8-bz254229-gcore-prpsinfo.patch'
+missing patch 'gdb-6.8-inlining-by-name.patch'
+missing patch 'gdb-6.8-inlining.patch'
+missing patch 'gdb-6.8-tui-singlebinary.patch'
+missing patch 'gdb-6.8-forced-enable-tui.patch'
+missing patch 'gdb-6.8-glibc-headers-compat.patch'
+missing patch 'gdb-6.8-disable-randomization.patch'
+missing patch 'gdb-6.8-constant-watchpoints.patch'
+missing patch 'gdb-6.8-auto-dependencies.patch'
+missing patch 'gdb-6.5-section-num-fixup-test.patch'
+missing patch 'gdb-6.8-gcc35998-ada-memory-trash.patch'
+missing patch 'gdb-6.8-sparc64-silence-memcpy-check.patch'
+missing patch 'gdb-6.8-sparc-fix.patch'
+missing patch 'gdb-6.8-bz442765-threaded-exec-test.patch'
+missing patch 'gdb-6.3-watchpoint-cond-gone-test.patch'
+missing patch 'gdb-6.3-focus-cmd-prev-test.patch'
+missing patch 'gdb-6.3-mapping-zero-inode-test.patch'
+missing patch 'gdb-6.8-watchpoint-inaccessible-memory.patch'
+missing patch 'gdb-6.8-bz377541-fortran-dynamic-arrays.patch'
+missing patch 'gdb-6.7-kernel-headers-compat.patch'
+missing patch 'gdb-6.6-buildid-readnever-silent.patch'
+missing patch 'gdb-6.6-threads-static-test.patch'
+missing patch 'gdb-6.5-gcore-buffer-limit-test.patch'
+missing patch 'gdb-6.7-bz426600-DW_TAG_interface_type-test.patch'
+missing patch 'gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch'
+missing patch 'gdb-6.5-missed-trap-on-step-test.patch'
+missing patch 'gdb-6.5-ia64-libunwind-leak-test.patch'
+missing patch 'gdb-6.7-testsuite-stable-results.patch'
+missing patch 'gdb-6.7-ppc-clobbered-registers-O2-test.patch'
+missing patch 'gdb-6.7-reread-exec_bfd.patch'
+missing patch 'gdb-6.7-charsign-test.patch'
+missing patch 'gdb-6.6-multifork-debugreg.patch'
+missing patch 'gdb-6.6-vdso-i386-on-amd64-warning.patch'
+missing patch 'gdb-6.6-buildid-locate.patch'
+missing patch 'gdb-6.5-bz243845-stale-testing-zombie-test.patch'
+missing patch 'gdb-6.6-bz247354-leader-exit-test.patch'
+missing patch 'gdb-6.6-bz247354-leader-exit-fix.patch'
+missing patch 'gdb-6.3-attach-see-vdso-test.patch'
+missing patch 'gdb-6.6-readline-system.patch'
+missing patch 'gdb-6.6-bz237572-ppc-atomic-sequence-test.patch'
+missing patch 'gdb-6.6-testsuite-timeouts.patch'
+missing patch 'gdb-6.6-gcore32-test.patch'
+missing patch 'gdb-6.6-bz235197-fork-detach-info.patch'
+missing patch 'gdb-6.6-bz229517-gcore-without-terminal.patch'
+missing patch 'gdb-6.6-bz225783-gdb-debuginfo-paths.patch'
+missing patch 'gdb-6.6-bz225783-prelink-path.patch'
+missing patch 'gdb-6.3-bz231832-obstack-2gb.patch'
+missing patch 'gdb-6.6-bz230000-power6-disassembly-test.patch'
+missing patch 'gdb-6.8-upstream.patch'
+missing patch 'gdb-6.3-bz202689-exec-from-pthread-test.patch'
+missing patch 'gdb-6.3-bz140532-ppc-unwinding-test.patch'
+missing patch 'gdb-6.5-bz109921-DW_AT_decl_file-test.patch'
+missing patch 'gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch'
+missing patch 'gdb-6.5-bz218379-ppc-solib-trampoline-test.patch'
+missing patch 'gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch'
+missing patch 'gdb-6.5-bz216711-clone-is-outermost.patch'
+missing patch 'gdb-6.5-readline-long-line-crash-test.patch'
+missing patch 'gdb-6.5-readline-long-line-crash.patch'
+missing patch 'gdb-6.5-BEA-testsuite.patch'
+missing patch 'gdb-6.5-last-address-space-byte-test.patch'
+missing patch 'gdb-6.5-gcore-i386-on-amd64.patch'
+missing patch 'gdb-6.5-bz181390-memory-address-width.patch'
+missing patch 'gdb-6.5-bz190810-gdbserver-arch-advice.patch'
+missing patch 'gdb-6.5-sharedlibrary-path.patch'
+missing patch 'gdb-6.5-tls-of-separate-debuginfo.patch'
+missing patch 'gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch'
+missing patch 'gdb-6.5-dwarf-stack-overflow.patch'
+missing patch 'gdb-6.5-bz203661-emit-relocs.patch'
+missing patch 'gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch'
+missing patch 'gdb-6.3-ia32el-fix-waitpid-20060615.patch'
+missing patch 'gdb-6.3-catch-debug-registers-error-20060527.patch'
+missing patch 'gdb-6.3-gstack-without-path-20060414.patch'
+missing patch 'gdb-6.3-large-core-20051206.patch'
+missing patch 'gdb-6.3-bt-past-zero-20051201.patch'
+missing patch 'gdb-6.3-ia64-sigill-20051115.patch'
+missing patch 'gdb-6.3-ia64-sigtramp-fp-20050926.patch'
+missing patch 'gdb-6.3-readnever-20050907.patch'
+missing patch 'gdb-6.3-inheritancetest-20050726.patch'
+missing patch 'gdb-6.3-ia64-info-frame-fix-20050725.patch'
+missing patch 'gdb-6.3-inferior-notification-20050721.patch'
+missing patch 'gdb-6.3-ia64-gcore-speedup-20050714.patch'
+missing patch 'gdb-6.3-ia64-sigtramp-frame-20050708.patch'
+missing patch 'gdb-6.3-security-errata-20050610.patch'
+missing patch 'gdb-6.3-ia64-gcore-page0-20050421.patch'
+missing patch 'gdb-6.3-sepcrc-20050402.patch'
+missing patch 'gdb-6.3-test-sepcrc-20050402.patch'
+missing patch 'gdb-6.3-inheritance-20050324.patch'
+missing patch 'gdb-6.3-warnings-20050317.patch'
+missing patch 'gdb-6.3-threaded-watchpoints2-20050225.patch'
+missing patch 'gdb-6.3-terminal-fix-20050214.patch'
+missing patch 'gdb-6.3-step-thread-exit-20050211-test.patch'
+missing patch 'gdb-6.6-step-thread-exit.patch'
+missing patch 'gdb-6.3-gcore-thread-20050204.patch'
+missing patch 'gdb-6.3-dwattype0-20050201.patch'
+missing patch 'gdb-6.3-test-movedir-20050125.patch'
+missing patch 'gdb-6.3-dtorfix-20050121.patch'
+missing patch 'gdb-6.3-test-dtorfix-20050121.patch'
+missing patch 'gdb-6.3-nonthreaded-wp-20050117.patch'
+missing patch 'gdb-6.3-test-self-20050110.patch'
+missing patch 'gdb-6.3-pie-20050110.patch'
+missing patch 'gdb-6.3-test-pie-20050107.patch'
+missing patch 'gdb-6.3-type-fix-20041213.patch'
+missing patch 'gdb-6.3-gstack-20050411.patch'
+missing patch 'gdb-6.3-removebp-20041130.patch'
+missing patch 'gdb-6.3-linespec-20041213.patch'
+missing patch 'gdb-6.6-scheduler_locking-step-is-default.patch'
+missing patch 'gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch'
+missing patch 'gdb-6.3-ppc64displaysymbol-20041124.patch'
+missing patch 'gdb-6.3-framepczero-20040927.patch'
+missing patch 'gdb-6.3-ppc64syscall-20040622.patch'
+missing patch 'gdb-6.3-ppcdotsolib-20041022.patch'
+missing patch 'gdb-6.3-sigx86-20040621.patch'
+missing patch 'gdb-6.3-rh-testlibunwind1fix-20041202.patch'
+missing patch 'gdb-6.3-rh-testlibunwind-20041202.patch'
+missing patch 'gdb-6.3-rh-testversion-20041202.patch'
+missing patch 'gdb-6.3-rh-dummykfail-20041202.patch'
+extra patch 'mingw-gdb-6.8-no-getcwd-error.patch'
index a73897d..b5b547d 100644 (file)
@@ -12,7 +12,7 @@ Summary:        MinGW port of the GNU debugger (gdb)
 License:        GPLv2+
 Group:          Development/Libraries
 URL:            http://www.mingw.org/MinGWiki/index.php/gdb
-Source0:        http://dl.sourceforge.net/sourceforge/mingw/gdb-%{version}-mingw-src.tar.gz
+Source0:        http://dl.sourceforge.net/sourceforge/mingw/gdb-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Patch0:         mingw-gdb-6.8-no-getcwd-error.patch
diff --git a/glib2/compare.supp b/glib2/compare.supp
new file mode 100644 (file)
index 0000000..03314ee
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'glib2.csh'
+missing source: 'glib2.sh'
diff --git a/gnutls/compare.supp b/gnutls/compare.supp
new file mode 100644 (file)
index 0000000..44160e7
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'libgnutls-config'
+extra patch 'gnutls-certtool-build.patch'
diff --git a/gtk2/compare.supp b/gtk2/compare.supp
new file mode 100644 (file)
index 0000000..22255eb
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'update-gtk-immodules'
+missing source: 'update-gdk-pixbuf-loaders'
diff --git a/jasper/compare.supp b/jasper/compare.supp
new file mode 100644 (file)
index 0000000..aaa49e1
--- /dev/null
@@ -0,0 +1,3 @@
+extra patch 'jasper-1.900.1-enable-shared.patch'
+extra patch 'jasper-1.900.1-mingw.patch'
+extra patch 'jasper-1.900.1-sleep.patch'
diff --git a/libjpeg/compare.supp b/libjpeg/compare.supp
new file mode 100644 (file)
index 0000000..26c9432
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'jpeg-mingw.patch'
diff --git a/zlib/compare.supp b/zlib/compare.supp
new file mode 100644 (file)
index 0000000..a2b588c
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'zlib-win32.patch'