[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 1.24.3-4-g7eff5ba



The following commit has been merged in the master branch:
commit 7eff5baf2ce3773c3461ab16cb34dc739658a1b5
Author: Frank Lichtenheld <djpig@debian.org>
Date:   Sat Aug 9 14:47:10 2008 -0300

    checks/cruft: Add new tag ancient-libtool
    
    This will detect old ltconfig and ltmain.sh scripts in
    source packages.  (Closes: #293296)

diff --git a/checks/cruft b/checks/cruft
index 1738f5d..f686ef1 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -223,6 +223,26 @@ sub find_cruft {
             }
         }
         close F;
+    } elsif ($name =~ m,^(.+/)?ltconfig$,) {
+        tag "ancient-libtool", $name;
+    } elsif ($name =~ m,^(.+/)?ltmain\.sh$,) {
+        my $b = basename $name;
+        open (F, '<', $b) or die "can't open $name: $!";
+        while (<F>) {
+            if (/^VERSION=["']?(1\.(\d)\.(\d+)(?:-(\d))?)/) {
+                my ($version, $major, $minor, $debian) = ($1, $2, $3, $4);
+                if ($major < 5 or ($major == 5 and $minor < 2)) {
+                    tag "ancient-libtool", $name, $version;
+                } elsif ($minor == 2 and (!$debian or $debian < 2)) {
+                    tag "ancient-libtool", $name, $version;
+                } elsif ($minor < 24) {
+                    # not entirely sure whether that would be good idea
+#                    tag "outdated-libtool", $name, $version;
+                }
+                last;
+            }
+        }
+        close F;
     }
 }
 1;
diff --git a/checks/cruft.desc b/checks/cruft.desc
index 353a58e..3e9a2af 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -251,6 +251,21 @@ Info: The referenced file has a time stamp older than year 2004 and the
  Read /usr/share/doc/autotools-dev/README.Debian.gz (from the
  autotools-dev package) for information on how to fix this problem.
 
+Tag: ancient-libtool
+Type: warning
+Info: The referenced file seems to be from a libtool version
+ older than 1.5.2-2.  This might lead to build errors on some
+ newer architectures not known to this libtool.
+ .
+ Please ask your upstream maintainer to re-libtoolize the
+ package or do it yourself in case there is no active upstream
+ anymore.  Beware that might mean you need to update autoconf, too,
+ if you use a very old version there as well.
+ .
+ If you have not updated the file but fixed architecture-specific
+ issues with minimal patches and verified that it builds correctly
+ please override this tag.  lintian will not be able to verify that.
+
 Tag: diff-contains-bts-control-dir
 Type: warning
 Info: The Debian diff or native package contains files in a directory
diff --git a/debian/changelog b/debian/changelog
index ff660c0..1487055 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 lintian (1.24.4) UNRELEASED; urgency=low
 
+  * checks/cruft{,.desc}:
+    + [FL] Add new check for outdated libtool files.
+      (Closes: #293296)
   * checks/scripts:
     + [ADB] Split the "read without variable or with invalid options" bashism
       test in two, thus enabling the checks to be more accurate and avoiding
diff --git a/t/tests/6000_cruft-ancient-libtool-2.desc b/t/tests/6000_cruft-ancient-libtool-2.desc
new file mode 100644
index 0000000..4a436bd
--- /dev/null
+++ b/t/tests/6000_cruft-ancient-libtool-2.desc
@@ -0,0 +1,5 @@
+Testname: cruft-ancient-libtool-2
+Version: 1.0
+Description: Test that an old (1.5.2) ltmain.sh is detected correctly
+Test-For: ancient-libtool
+References: Debian Bug#293296
diff --git a/t/tests/6000_cruft-ancient-libtool.desc b/t/tests/6000_cruft-ancient-libtool.desc
new file mode 100644
index 0000000..4b4f850
--- /dev/null
+++ b/t/tests/6000_cruft-ancient-libtool.desc
@@ -0,0 +1,5 @@
+Testname: cruft-ancient-libtool
+Version: 1.0
+Description: Test that an very old ltmain.sh/ltconfig is detected correctly
+Test-For: ancient-libtool
+References: Debian Bug#293296
diff --git a/t/tests/6000_cruft-current-libtool.desc b/t/tests/6000_cruft-current-libtool.desc
new file mode 100644
index 0000000..ab4dc91
--- /dev/null
+++ b/t/tests/6000_cruft-current-libtool.desc
@@ -0,0 +1,5 @@
+Testname: cruft-current-libtool
+Version: 1.0
+Description: Test that a current ltmain.sh is detected correctly
+Test-Against: ancient-libtool
+References: Debian Bug#293296
diff --git a/t/tests/cruft-ancient-libtool-2/debian/ltmain.sh b/t/tests/cruft-ancient-libtool-2/debian/ltmain.sh
new file mode 100644
index 0000000..662c6f0
--- /dev/null
+++ b/t/tests/cruft-ancient-libtool-2/debian/ltmain.sh
@@ -0,0 +1,62 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
+# The name of this program.
+progname=`$echo "$0" | ${SED} 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.2
+TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08)"
diff --git a/t/tests/cruft-ancient-libtool-2/tags b/t/tests/cruft-ancient-libtool-2/tags
new file mode 100644
index 0000000..6ec0a07
--- /dev/null
+++ b/t/tests/cruft-ancient-libtool-2/tags
@@ -0,0 +1 @@
+W: cruft-ancient-libtool-2 source: ancient-libtool ltmain.sh 1.5.2
diff --git a/reporting/lintian-dummy.cfg b/t/tests/cruft-ancient-libtool/debian/ltconfig
similarity index 100%
copy from reporting/lintian-dummy.cfg
copy to t/tests/cruft-ancient-libtool/debian/ltconfig
diff --git a/t/tests/cruft-ancient-libtool/debian/ltmain.sh b/t/tests/cruft-ancient-libtool/debian/ltmain.sh
new file mode 100644
index 0000000..c7b800b
--- /dev/null
+++ b/t/tests/cruft-ancient-libtool/debian/ltmain.sh
@@ -0,0 +1,59 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.3.5
+TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
+
diff --git a/t/tests/cruft-ancient-libtool/tags b/t/tests/cruft-ancient-libtool/tags
new file mode 100644
index 0000000..d305208
--- /dev/null
+++ b/t/tests/cruft-ancient-libtool/tags
@@ -0,0 +1,2 @@
+W: cruft-ancient-libtool source: ancient-libtool ltconfig
+W: cruft-ancient-libtool source: ancient-libtool ltmain.sh 1.3.5
diff --git a/t/tests/cruft-current-libtool/debian/ltmain.sh b/t/tests/cruft-current-libtool/debian/ltmain.sh
new file mode 100644
index 0000000..c5f7e11
--- /dev/null
+++ b/t/tests/cruft-current-libtool/debian/ltmain.sh
@@ -0,0 +1,48 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007  Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+
diff --git a/t/tests/basic-non-native/tags b/t/tests/cruft-current-libtool/tags
similarity index 100%
copy from t/tests/basic-non-native/tags
copy to t/tests/cruft-current-libtool/tags

-- 
Debian package checker


Reply to: