Debian Bug report logs - #688798
tmailscanner.c references functions which are removed in ruby1.9

version graph

Package: ruby-tmail; Maintainer for ruby-tmail is Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>; Source for ruby-tmail is src:ruby-tmail.

Reported by: Matthias Klose <doko@ubuntu.com>

Date: Tue, 25 Sep 2012 17:54:01 UTC

Severity: serious

Found in version ruby-tmail/1.2.7.1-2

Fixed in version ruby-tmail/1.2.7.1-3

Done: Cédric Boutillier <boutil@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>:
Bug#688798; Package ruby-tmail. (Tue, 25 Sep 2012 17:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>. (Tue, 25 Sep 2012 17:54:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@ubuntu.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: tmailscanner.c references functions which are removed in ruby1.9
Date: Tue, 25 Sep 2012 19:48:09 +0200
Package: ruby-tmail
Version: 1.2.7.1-2
Severity: serious

from the build log:

compiling tmailscanner.c
tmailscanner.c: In function 'mails_s_new':
tmailscanner.c:105:5: warning: implicit declaration of function 'rb_get_kcode'
[-Wimplicit-function-declaration]
tmailscanner.c:105:9: warning: assignment makes pointer from integer without a
cast [enabled by default]
Function `rb_get_kcode' implicitly converted to pointer at tmailscanner.c:105

however rb_get_kcode was removed from ruby1.9. I assume the package doesn't work
at all with 1.9.

$ fgrep -r rb_get_kcode ../ruby1.9.1-1.9.3.194/
../ruby1.9.1-1.9.3.194/doc/ChangeLog-1.9.3:     * re.c (rb_kcode, rb_get_kcode,
rb_set_kcode): removed.
../ruby1.9.1-1.9.3.194/doc/ChangeLog-1.8.0:     * re.c (rb_get_kcode): can
retrieve $KCODE from C code.
../ruby1.9.1-1.9.3.194/ChangeLog:       * include/ruby/intern.h (rb_set_kcode,
rb_get_kcode): removed



Message sent on to Matthias Klose <doko@ubuntu.com>:
Bug#688798. (Sun, 07 Oct 2012 20:51:05 GMT) Full text and rfc822 format available.

Message #8 received at 688798-submitter@bugs.debian.org (full text, mbox):

From: Cédric Boutillier <boutil@debian.org>
To: 688798-submitter@bugs.debian.org
Subject: Re: tmailscanner.c references functions which are removed in ruby1.9
Date: Sun, 7 Oct 2012 22:45:57 +0200
[Message part 1 (text/plain, inline)]
Package: ruby-tmail
Version: 1.2.7.1-2
Followup-For: Bug #688798

Hi,


It seems to be a known fact [1,2,3] that ruby-tmail is not suited for
the latest versions of Ruby 1.9.

	1: http://isitruby19.com/tmail
	2: https://github.com/mikel/tmail/issues/11
	3: https://github.com/mikel/tmail/blob/master/README.rdoc

There are three main reasons for that:
- the one you mentioned: the C extension for Ruby 1.9 will not work
  because some functions have been removed from ruby1.9 code.
- String#is_binary_data? method used in lib/tmail/quoting.rb has been
  removed from ruby1.9 code
- encoding issues (at least in test files)

It turns out that the is_binary_data? is not properly defined for
Ruby1.8 either, because it is defined in "yaml/rubytypes", but there is
no require statement on "yaml". Moreover, there is also a pure Ruby
implementation of the scanner in scanner_r.rb which should replace the
native C extension when this one is not present.

Here is a proposition to work around this problem:
- do not build the C extension for Ruby 1.9, by setting
  the variable XS-Ruby-Versions to Ruby1.8 in debian/control.so that
  the pure Ruby library scanner_r can play its role 
- add the definition of String#is_binary_data? in lib/tmail/quoting.rb,
  so that it is properly defined for Ruby 1.8 and 1.9.1
- indicate in the description that ruby-tmail should work only with
  Ruby1.8
- run the tests at build time, to track possible regressions

With these modifications, all the tests pass with Ruby1.8 (except one,
which wrongly relies on an order for hashes), and "only" 4 errors and 3
failures due to encoding issues (when proper #encoding: utf-8 headers
are put in the test files). Trying to solve these would probably
imply invasive changes in the code.

With the modifications proposed, the package will work properly with
Ruby 1.8 and some functionalities may work with Ruby 1.9.1.

Attached is the debdiff reflecting the changes described above, already
pushed in the team repository.

Cédric
[ruby-tmail-688798.debdiff (text/plain, attachment)]

Reply sent to Cédric Boutillier <boutil@debian.org>:
You have taken responsibility. (Sun, 28 Oct 2012 06:51:03 GMT) Full text and rfc822 format available.

Notification sent to Matthias Klose <doko@ubuntu.com>:
Bug acknowledged by developer. (Sun, 28 Oct 2012 06:51:04 GMT) Full text and rfc822 format available.

Message #13 received at 688798-close@bugs.debian.org (full text, mbox):

From: Cédric Boutillier <boutil@debian.org>
To: 688798-close@bugs.debian.org
Subject: Bug#688798: fixed in ruby-tmail 1.2.7.1-3
Date: Sun, 28 Oct 2012 06:47:38 +0000
Source: ruby-tmail
Source-Version: 1.2.7.1-3

We believe that the bug you reported is fixed in the latest version of
ruby-tmail, 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 688798@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Cédric Boutillier <boutil@debian.org> (supplier of updated ruby-tmail 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 ftpmaster@debian.org)


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

Format: 1.8
Date: Sat, 27 Oct 2012 00:53:34 +0200
Source: ruby-tmail
Binary: ruby-tmail libtmail-ruby-doc libtmail-ruby1.8
Architecture: source amd64 all
Version: 1.2.7.1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Changed-By: Cédric Boutillier <boutil@debian.org>
Description: 
 libtmail-ruby-doc - Transitional package for ruby-tmail
 libtmail-ruby1.8 - Transitional package for ruby-tmail
 ruby-tmail - Mail class library for Ruby
Closes: 688798
Changes: 
 ruby-tmail (1.2.7.1-3) unstable; urgency=medium
 .
   * Team upload
   * Set urgency to medium, as a RC bug is fixed
   * Build only for Ruby 1.8 (Closes: #688798)
     - debian/control: change XS-Ruby-Versions from all to ruby1.8;
            mention in the description it may not work properly with Ruby 1.9.
     - add debian/README.Debian describing the situation
   * Add debian/patches/0002-include_is_binary_data_definition.patch: include
     the definition of isString#_binary_data? method needed in tmail/quoting.rb.
   * Add debian/patches/0003-deactivate_faulty_test.patch: deactivate test
     relying on ordered hashes, which is a wrong asumption with Ruby 1.8.7.
   * Enable test suite to track possible regressions
     - debian/rules: do not ignore test results anymore
     - debian/ruby-test-files.yaml: restore the list of test files
Checksums-Sha1: 
 fe2f09615fbceeb0ee10db131144a1b18d21de24 2237 ruby-tmail_1.2.7.1-3.dsc
 e1ce57d42c42dcbb1e4d0ab1a1e1f74a2f553b8e 5280 ruby-tmail_1.2.7.1-3.debian.tar.gz
 cbb0ff68378687ba78e56424f60fdc1edc01e0f2 65214 ruby-tmail_1.2.7.1-3_amd64.deb
 6fe09e0b44f9f046147b34abe09c30d572b948f2 6312 libtmail-ruby-doc_1.2.7.1-3_all.deb
 2dea0f6f246ca254eae9e03f86c387e5b0b7c453 6314 libtmail-ruby1.8_1.2.7.1-3_all.deb
Checksums-Sha256: 
 f6027715f32285b9536aaba5025fadbbb7907e1df37d4758dc8a6cb17dcfcd17 2237 ruby-tmail_1.2.7.1-3.dsc
 cf84a1d4404222a837e8f5a2ae310d0c5d495f746e08c85b1b21dbede2b5c5dd 5280 ruby-tmail_1.2.7.1-3.debian.tar.gz
 c1cf374b25486f1ee2c487f45668abf8a867302c5f600ebaf4dc422d1a491f14 65214 ruby-tmail_1.2.7.1-3_amd64.deb
 3c6bd1075c75dc60e0bf68668e7cc875f2dd29f8c0efe8e1364bc0be1210fd34 6312 libtmail-ruby-doc_1.2.7.1-3_all.deb
 998516383469ea52309a344d05812f42eff5ee14c8b2017061077e0d69ac9cd3 6314 libtmail-ruby1.8_1.2.7.1-3_all.deb
Files: 
 7d8233cf6840cc09034c8aeb83353914 2237 ruby optional ruby-tmail_1.2.7.1-3.dsc
 543d42ff84e48379c8900b02bf04e635 5280 ruby optional ruby-tmail_1.2.7.1-3.debian.tar.gz
 f55e6ed6bd24cdf8bb51d9034af51fc1 65214 ruby optional ruby-tmail_1.2.7.1-3_amd64.deb
 5e69a8b4af502d21ffc8dcaa5b7042fe 6312 oldlibs extra libtmail-ruby-doc_1.2.7.1-3_all.deb
 fc7b7c1bba6c3db0efcd9889ac1cac7e 6314 oldlibs extra libtmail-ruby1.8_1.2.7.1-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQjNGoAAoJENpJWPYR4UnpGBMQALJwTNGMAkYKGnG76ebQsIfQ
go/cNDKNqKl9ySD5cTPsB0FExVNVllojqW2cF1IxZZP2VgmUI/PY71OsI1vJ1JaD
TKBOH6ljAaMAakPPpejAXidhP9Sz39hoKXOJJsg6xKbBV2eaD7J6O983q2BfLR16
t2ATViylCLFHNmM/B+q2Vf0CByLGkbzOv89Y3Diq5cxFzzgiVdg7V4rOnsH3gLz1
+xjjPFSYINpy+XGoLXJ2+Sdn7VW0raWtMNcmsu1GEg1X7CvhIdTtNm12vAyTDHV3
JkzHzA0JgWheJBTHMxk/7rOp0IhdnHX9Iv+tFdJkRLp4g8CIGOfBNVNDSPRJufiD
hbAOa0VJTAq8D6ACOWh8CSt6a1pmmKLNRBhKV/A7EKxwr5NPwOMUh8KOCLvEYqP8
CHW3E5r8vLmDDnHbKgUWfJhIHZEEM4HrPIOTuSczCxHd46sjFr8kqspyeedxOrgQ
oDvdB4+5Dvyvj0AZiLmOAKwrDv6zdyfliFwAoPaQFz8cHbeBSQUPF/dHUGu7vvbr
ortcQnPgm0ZGzlHwXuOb5oO/amOHEz/3tfILnYpCqq6BjRrdG8dOKdkLfo5EtjNh
AGEg1M6m0cEo045gr92d4t445/GmYl/gGqRlE3mcZmR3ofqAD58eRbNILFh8RJkE
ZL7IUOQXuTcgcijwBBn/
=/CKO
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 01 Dec 2012 07:30:35 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 16:08:53 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.