Your message dated Wed, 18 May 2022 08:22:13 +0000
with message-id <e1nrewf-0000jb...@fasolo.debian.org>
and subject line Bug#1011176: fixed in apertium-recursive 1.1.1-1
has caused the Debian Bug report #1011176,
regarding apertium-recursive: fails to detect EOF condition on unsigned char 
archs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1011176: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011176
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: apertium-recursive
Version: 1.1.0-1
Severity: serious
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear maintainers,

The new version of apertium-recursive FTBFS in Ubuntu on most archs because
of incorrect handling of EOF condition from fgetc():

[...]
g++ -DHAVE_CONFIG_H -I.   -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -g -O2 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -flto=auto 
-ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security 
-I/usr/include/lttoolbox-3.6 -I/usr/include/apertium-3.8 
-I/usr/lib/aarch64-linux-gnu/apertium-3.8/include -I/usr/include/libxml2   
-Wall -Wextra -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto 
-ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong 
-Wformat -Werror=format-security -std=c++20 -c -o pattern.o pattern.cc
rtx_comp.cc: In function ‘int main(int, char**)’:
rtx_comp.cc:104:10: warning: comparison is always false due to limited range of 
data type [-Wtype-limits]
  104 |     if(c == EOF)
      |          ^
[...]
======================================================================
FAIL: test_compiles (__main__.NoRules)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/tests/./run_tests.py", line 8, in test_compiles
    with self.assertRaises(subprocess.CalledProcessError):
AssertionError: CalledProcessError not raised

----------------------------------------------------------------------
Ran 66 tests in 2.751s
[...]

  
(https://launchpad.net/ubuntu/+source/apertium-recursive/1.1.0-1/+build/23586338)

I have no idea why the tests passed at build time in Debian!  But the logic
error in the C code is clear: fgetc() returns an int, not a char, and on
many archs (but not x86), a bare 'char' is unsigned, so can never == EOF.

The attached patch has been uploaded to Ubuntu to fix the build failure
there, and complete the libapertium3-3.8-1 transition.

Please consider applying it in Debian as well (and forwarding upstream).

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru apertium-recursive-1.1.0/debian/patches/series 
apertium-recursive-1.1.0/debian/patches/series
--- apertium-recursive-1.1.0/debian/patches/series      1969-12-31 
16:00:00.000000000 -0800
+++ apertium-recursive-1.1.0/debian/patches/series      2022-05-17 
13:49:42.000000000 -0700
@@ -0,0 +1 @@
+unsigned-char.patch
diff -Nru apertium-recursive-1.1.0/debian/patches/unsigned-char.patch 
apertium-recursive-1.1.0/debian/patches/unsigned-char.patch
--- apertium-recursive-1.1.0/debian/patches/unsigned-char.patch 1969-12-31 
16:00:00.000000000 -0800
+++ apertium-recursive-1.1.0/debian/patches/unsigned-char.patch 2022-05-17 
13:52:04.000000000 -0700
@@ -0,0 +1,29 @@
+Description: fgetc() returns an int, not a (unsigned) char
+ The code is wrongly assigning fgetc()'s return value to a char instead of an
+ int.  On some architectures, this is doubly wrong because 'char' is
+ unsigned, meaning it can never hold the EOF value:
+ .
+ rtx_comp.cc: In function ‘int main(int, char**)’:
+ rtx_comp.cc:104:10: warning: comparison is always false due to limited range 
of data type [-Wtype-limits]
+   104 |     if(c == EOF)
+       |          ^
+ .
+ Fix the type, which removes the warning and also fixes build failures on
+ these unsigned char archs in Ubuntu.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2022-05-17
+Forwarded: no
+
+Index: apertium-recursive-1.1.0/src/rtx_comp.cc
+===================================================================
+--- apertium-recursive-1.1.0.orig/src/rtx_comp.cc
++++ apertium-recursive-1.1.0/src/rtx_comp.cc
+@@ -98,7 +98,7 @@
+     cout << "Unable to open " << argv[optind] << " for reading." << endl;
+     exit(EXIT_FAILURE);
+   }
+-  char c;
++  int c;
+   while((c = fgetc(check)) != '<')
+   {
+     if(c == EOF)

--- End Message ---
--- Begin Message ---
Source: apertium-recursive
Source-Version: 1.1.1-1
Done: Kartik Mistry <kar...@debian.org>

We believe that the bug you reported is fixed in the latest version of
apertium-recursive, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1011...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kartik Mistry <kar...@debian.org> (supplier of updated apertium-recursive 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 18 May 2022 13:00:10 +0530
Source: apertium-recursive
Architecture: source
Version: 1.1.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team 
<debian-science-maintain...@alioth-lists.debian.net>
Changed-By: Kartik Mistry <kar...@debian.org>
Closes: 1011176
Changes:
 apertium-recursive (1.1.1-1) unstable; urgency=medium
 .
   [ Tino Didriksen ]
   * Update to latest upstream release (Closes: #1011176).
   * debian/control:
     + Updated Standards-Version to 4.6.0.1
Checksums-Sha1:
 9208cb5c3d429cc45f76e95eaf02e155349ff7a3 2152 apertium-recursive_1.1.1-1.dsc
 3aa2dd13152d897781d2058ae54360f08c636bba 81050 
apertium-recursive_1.1.1.orig.tar.bz2
 5a2e90d180371d21f03682ed724168081f2f0189 2136 
apertium-recursive_1.1.1-1.debian.tar.xz
Checksums-Sha256:
 1a9185d0c98a14ddaf891d514ec6b5279988cd07c16638de3e6e3116bd184bb9 2152 
apertium-recursive_1.1.1-1.dsc
 24935919a75bf6b41b08ac04b2cf8d72ac1e4645412cdda0470718b30ed5716a 81050 
apertium-recursive_1.1.1.orig.tar.bz2
 e3ddc88de63f95e967b33c202107b8d0929557fee699c3184b353b534a0806cd 2136 
apertium-recursive_1.1.1-1.debian.tar.xz
Files:
 3201e63f263c8d6bf951f90b5a45e05d 2152 science optional 
apertium-recursive_1.1.1-1.dsc
 04c38c04e02eaf01be393de569788304 81050 science optional 
apertium-recursive_1.1.1.orig.tar.bz2
 8483054cdf64dc1a6560b644210f92b7 2136 science optional 
apertium-recursive_1.1.1-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa2MbXvVUr2sRlmKSAsHT8ng6pN4FAmKEo/EACgkQAsHT8ng6
pN7V1RAAy8ATrOyGS982HxfThwsLAbSAbSyW+aooolBdfBUjCJkhyZ/QsJM64N0D
ncfoCT6I3HewD9dgLnXaCHozrnidKADVOuvkXvGnvvWW3qlBZ+Cyysb+Bf/UI9VE
G6wuwxHY93epwj3TAmoAqoUyEDYfjysns8jkd0tCcsSV27bs55MzBAp0YNvG+JHf
IXQWAi/c/bSC2MTQMAA8x5zT/InXYXf0LaPoJ/J8hkjag02A4aK3TQe2Wq7SAtmY
nopxrLoQhM6gcpMuCoToAw/sshErn+9kN+IFwfvYKeuYoTigD9MiwS6arFmEkzAW
ETvDj8kXh51tqg95Rhj0VInxkt/e71SaSnW424Zj/hrOMfi0xtW1e0U4JUKGA6ur
hT7F4DKKGGGh6moc9nRiy/xtBAqDbIamMzicJxx3i6D0wPqlDtmi+1SJfRU8Dsxa
U+kd1bfPwKZdsKMRLUrLsKXVtMHGdVu8rk1peWa+OsRa/Qi/sAyavI4+Y6d0iHlj
yZtwiNbtubwQ+MJDu8cDaVu5lFvEsy3NU1e3rsrH2zREVveRlB7S02N+yARv7D5O
7hvoa3MdD0wq88Pf+KKMnjTN91+7EDTNB6bmXffSyqVshaFXKQ45XM2pEAimwzuh
sx77xQxfexphaL/59uCa9fkKDTYWV60oMKEZkWNsV0Y63jnFGCE=
=10em
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to