Bug 729972

Summary: Review Request: perl-Test-Mojibake - Check your source for encoding misbehavior
Product: [Fedora] Fedora Reporter: Paul Howarth <paul>
Component: Package ReviewAssignee: Iain Arnell <iarnell>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: notting, package-review
Target Milestone: ---Flags: iarnell: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: perl-Test-Mojibake-0.3-2.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-15 08:13:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 728329    

Description Paul Howarth 2011-08-11 12:37:47 UTC
Spec URL:
http://subversion.city-fan.org/repos/cfo-repo/perl-Test-Mojibake/branches/fedora/perl-Test-Mojibake.spec
SRPM URL:
http://www.city-fan.org/~paul/extras/perl-Test-Mojibake/perl-Test-Mojibake-0.3-2.fc17.src.rpm

Description:

Many modern text editors automatically save files using UTF-8 codification.
However, the perl interpreter does not expect it by default. Whilst this does
not represent a big deal on (most) backend-oriented programs, Web framework
(Catalyst, Mojolicious) based applications will suffer so-called Mojibake
(literally: "unintelligible sequence of characters"). Even worse: if an editor
saves BOM (Byte Order Mark, U+FEFF character in Unicode) at the start of a
script with the executable bit set (on Unix systems), it won't execute at all,
due to shebang corruption.

Avoiding codification problems is quite simple:

 * Always use utf8/use common::sense when saving source as UTF-8
 * Always specify =encoding utf8 when saving POD as UTF-8
 * Do neither of above when saving as ISO-8859-1
 * Never save BOM (not that it's wrong; just avoid it as you'll barely
   notice its presence when in trouble)

However, if you find yourself upgrading old code to use UTF-8 or trying to
standardize a big project with many developers, each one using a different
platform/editor, reviewing all files manually can be quite painful, especially
in cases where some files have multiple encodings (note: it all started when I
realized that gedit and derivatives are unable to open files with character
conversion tables).

Enter the Test::Mojibake ;)

Comment 1 Iain Arnell 2011-08-12 04:20:46 UTC
Koji (success) http://koji.fedoraproject.org/koji/taskinfo?taskID=3267315

Comment 2 Iain Arnell 2011-08-12 04:26:12 UTC
A very nicely documented spec. No issues at all. APPROVED.

koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=3267315

Spec looks sane, clean and consistent; license is correct (GPL+ or Artistic);
make test passes cleanly.

Source tarballs match upstream (sha1sum):
96b654a0b0dd15c6ad327e4e59864bfd9c3c5af5 Test-Mojibake-0.3.tar.gz
96b654a0b0dd15c6ad327e4e59864bfd9c3c5af5 Test-Mojibake-0.3.tar.gz.srpm

Final provides / requires are sane:

======> perl-Test-Mojibake-0.3-2.fc17.noarch.rpm <======
====> rpmlint
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US backend -> backed, back end, back-end
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US encodings -> encoding, encoding s, recordings
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US gedit -> edit, geddit, g edit
perl-Test-Mojibake.noarch: E: incorrect-fsf-address /usr/share/doc/perl-Test-Mojibake-0.3/LICENSE
1 packages and 0 specfiles checked; 1 errors, 3 warnings.
====> provides
perl(Test::Mojibake) = 0.3
perl-Test-Mojibake = 0.3-2.fc17
====> requires
perl >= 0:5.008
perl(bytes)  
perl(File::Spec)  
perl(:MODULE_COMPAT_5.14.1)  
perl(strict)  
perl(Test::Builder)  
perl(utf8)  
perl(warnings)  
====> obsoletes
====> conflicts

======> perl-Test-Mojibake-0.3-2.fc17.src.rpm <======
====> rpmlint
perl-Test-Mojibake.src: W: spelling-error %description -l en_US backend -> backed, back end, back-end
perl-Test-Mojibake.src: W: spelling-error %description -l en_US encodings -> encoding, encoding s, recordings
perl-Test-Mojibake.src: W: spelling-error %description -l en_US gedit -> edit, geddit, g edit
perl-Test-Mojibake.src:66: W: mixed-use-of-spaces-and-tabs (spaces: line 66, tab: line 17)
1 packages and 0 specfiles checked; 0 errors, 4 warnings.
====> provides
====> requires
perl(ExtUtils::MakeMaker)  
perl(File::Spec)  
perl(Pod::Coverage::TrustPod)  
perl(Test::Builder)  
perl(Test::Builder::Tester)  
perl(Test::CPAN::Changes)  
perl(Test::CPAN::Meta)  
perl(Test::DistManifest)  
perl(Test::HasVersion)  
perl(Test::Kwalitee)  
perl(Test::MinimumVersion)  
perl(Test::More)  
perl(Test::NoTabs)  
perl(Test::Perl::Critic)  
perl(Test::Pod)  
perl(Test::Pod::Coverage)  
perl(Test::Portability::Files)  
perl(Test::Synopsis)  
perl(Test::Vars)  
====> obsoletes
====> conflicts


====> mock install
INFO: mock.py version 1.1.12 starting...
State Changed: init plugins
INFO: selinux enabled
State Changed: start
Mock Version: 1.1.12
INFO: Mock Version: 1.1.12
State Changed: lock buildroot
INFO: installing package(s): perl-Test-Mojibake-0.3-2.fc17.noarch.rpm
INFO: Ignored option -c (probably due to merging -yc != -y -c)

================================================================================
 Package                 Arch   Version           Repository               Size
================================================================================
Installing:
 perl-Test-Mojibake      noarch 0.3-2.fc17        /perl-Test-Mojibake-0.3-2.fc17.noarch
                                                                           43 k
Installing for dependencies:
 perl-CPAN               noarch 1.9600-185.fc17   fedora                  259 k
 perl-Digest-SHA         x86_64 1:5.61-185.fc17   fedora                   67 k
 perl-ExtUtils-MakeMaker noarch 6.57.5-185.fc17   fedora                  303 k
 perl-ExtUtils-ParseXS   noarch 1:2.2210-185.fc17 fedora                   52 k
 perl-HTTP-Tiny          noarch 0.012-185.fc17    fedora                   40 k
 perl-Test-Harness       noarch 3.23-185.fc17     fedora                  287 k
 perl-Test-Simple        noarch 0.98-185.fc17     fedora                  118 k
 perl-devel              x86_64 4:5.14.1-185.fc17 fedora                  450 k
 python                  x86_64 2.7.2-4.fc16      fedora                   74 k
 systemtap-sdt-devel     x86_64 1.6-1.fc16        fedora                   46 k

Transaction Summary
================================================================================
Install      11 Package(s)

Total size: 1.7 M
Total download size: 1.7 M
Installed size: 4.3 M

Installed:
  perl-Test-Mojibake.noarch 0:0.3-2.fc17                                        

Dependency Installed:
  perl-CPAN.noarch 0:1.9600-185.fc17                                            
  perl-Digest-SHA.x86_64 1:5.61-185.fc17                                        
  perl-ExtUtils-MakeMaker.noarch 0:6.57.5-185.fc17                              
  perl-ExtUtils-ParseXS.noarch 1:2.2210-185.fc17                                
  perl-HTTP-Tiny.noarch 0:0.012-185.fc17                                        
  perl-Test-Harness.noarch 0:3.23-185.fc17                                      
  perl-Test-Simple.noarch 0:0.98-185.fc17                                       
  perl-devel.x86_64 4:5.14.1-185.fc17                                           
  python.x86_64 0:2.7.2-4.fc16                                                  
  systemtap-sdt-devel.x86_64 0:1.6-1.fc16                                       


State Changed: unlock buildroot
State Changed: end

Comment 3 Paul Howarth 2011-08-12 08:52:17 UTC
New Package SCM Request
=======================
Package Name: perl-Test-Mojibake
Short Description: Check your source for encoding misbehavior
Owners: pghmcfc
Branches: EL-4 EL-5 EL-6 F-14 F-15 F-16
InitialCC: perl-sig

Thanks for the review Iain. I'll fix the mixed-use-of-spaces-and-tabs on import.

Comment 4 Iain Arnell 2011-08-12 09:01:42 UTC
> Thanks for the review Iain. I'll fix the mixed-use-of-spaces-and-tabs on
> import.

Well spotted - I lost that in all the "spelling errors". Must remember to tweak my script to make real warnings more obvious.

Comment 5 Gwyn Ciesla 2011-08-12 12:41:28 UTC
Git done (by process-git-requests).

Comment 6 Fedora Update System 2011-08-12 14:53:36 UTC
perl-Test-Mojibake-0.3-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.fc16

Comment 7 Paul Howarth 2011-08-12 19:20:20 UTC
Rawhide and F-16 builds done. Others are waiting on perl-Test-DistManifest, which I can't do buildroot overrides for (Bug #672543).

Comment 8 Fedora Update System 2011-08-20 08:12:19 UTC
perl-Test-Mojibake-0.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.fc14

Comment 9 Fedora Update System 2011-08-20 08:12:27 UTC
perl-Test-Mojibake-0.3-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.fc15

Comment 10 Fedora Update System 2011-08-23 20:27:06 UTC
perl-Test-Mojibake-0.3-2.fc16 has been pushed to the Fedora 16 stable repository.

Comment 11 Fedora Update System 2011-08-26 22:43:34 UTC
perl-Test-Mojibake-0.3-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.el5

Comment 12 Fedora Update System 2011-08-26 22:43:42 UTC
perl-Test-Mojibake-0.3-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.el6

Comment 13 Fedora Update System 2011-08-26 22:43:51 UTC
perl-Test-Mojibake-0.3-2.el4 has been submitted as an update for Fedora EPEL 4.
https://admin.fedoraproject.org/updates/perl-Test-Mojibake-0.3-2.el4

Comment 14 Fedora Update System 2011-09-07 00:02:30 UTC
perl-Test-Mojibake-0.3-2.fc15 has been pushed to the Fedora 15 stable repository.

Comment 15 Fedora Update System 2011-09-07 00:24:40 UTC
perl-Test-Mojibake-0.3-2.fc14 has been pushed to the Fedora 14 stable repository.

Comment 16 Fedora Update System 2011-09-14 00:26:55 UTC
perl-Test-Mojibake-0.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository.

Comment 17 Fedora Update System 2011-09-14 00:27:56 UTC
perl-Test-Mojibake-0.3-2.el4 has been pushed to the Fedora EPEL 4 stable repository.

Comment 18 Fedora Update System 2011-09-14 00:28:39 UTC
perl-Test-Mojibake-0.3-2.el5 has been pushed to the Fedora EPEL 5 stable repository.