Hello community,
here is the log from the commit of package convmv
checked in at Fri Feb 1 20:01:31 CET 2008.
--------
--- convmv/convmv.changes 2006-07-11 13:04:07.000000000 +0200
+++ convmv/convmv.changes 2008-01-31 23:50:07.258833000 +0100
@@ -1,0 +2,7 @@
+Thu Jan 31 19:32:02 CET 2008 - crrodriguez@suse.de
+
+- update to version 1.12 and fix build
+- now work with Perl 5.10 using an eval block
+- GPL v2 and v3 now
+
+-------------------------------------------------------------------
Old:
----
convmv-1.10.tar.bz2
fix-test-suite.patch
New:
----
convmv-1.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ convmv.spec ++++++
--- /var/tmp/diff_new_pack.Dk3959/_old 2008-02-01 20:00:10.000000000 +0100
+++ /var/tmp/diff_new_pack.Dk3959/_new 2008-02-01 20:00:10.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package convmv (Version 1.10)
+# spec file for package convmv (Version 1.12)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,17 +11,15 @@
# norootforbuild
Name: convmv
-License: GPL
+License: GPL v2 or later
Group: Productivity/File utilities
-Requires: perl
-Autoreqprov: on
-Version: 1.10
+AutoReqProv: on
+Version: 1.12
Release: 1
-URL: http://j3e.de/linux/convmv/
-Source0: http://j3e.de/linux/convmv/convmv-1.10.tar.bz2
-Patch0: fix-test-suite.patch
+Url: http://j3e.de/linux/convmv/
+Source: http://j3e.de/linux/convmv/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildArchitectures: noarch
+BuildArch: noarch
Summary: Converts File Names from One Encoding to Another
%description
@@ -52,21 +50,21 @@
Bjoern Jacke
%prep
-%setup0
-tar xf testsuite.tar
-%patch0 -p 1
+%setup -q
+%{__tar} xf testsuite.tar
%build
make PREFIX=/usr
%install
-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_mandir}/man1
make DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr install
+
+%check
make test
%clean
-#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
+rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
@@ -74,8 +72,12 @@
%{_bindir}/*
%{_mandir}/man1/*
-%changelog -n convmv
-* Tue Jul 11 2006 - mfabian@suse.de
+%changelog
+* Thu Jan 31 2008 crrodriguez@suse.de
+- update to version 1.12 and fix build
+- now work with Perl 5.10 using an eval block
+- GPL v2 and v3 now
+* Tue Jul 11 2006 mfabian@suse.de
- update to 1.10:
+ now use from_to instead of utf8::decode (which is experimental
and might vanish in the future) to check for valid UTF-8
@@ -83,17 +85,17 @@
+ fix "0" filename bugs
+ take into account that charset name "utf-8" resolves to
"utf-8-strict" in recent Perl versions
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Fri Dec 09 2005 - mfabian@suse.de
+* Fri Dec 09 2005 mfabian@suse.de
- Bugzilla #135497: fixed by updating to 1.09.
-* Wed Aug 25 2004 - mfabian@suse.de
+* Wed Aug 25 2004 mfabian@suse.de
- update to 1.08.
-* Thu Mar 25 2004 - mfabian@suse.de
+* Fri Mar 26 2004 mfabian@suse.de
- add patch from author Bjoern Jacke:
do not complain about wrong from_enc if to_enc is utf8 and
files are, too. Thanks to Kuang-che Wu.
-* Wed Jan 14 2004 - mfabian@suse.de
+* Thu Jan 15 2004 mfabian@suse.de
- don't build as root.
- update to 1.07.
New since 1.05:
@@ -105,10 +107,10 @@
(just in case someone wants to try to convert to UTF-16)
* rewrote checkenc(), no more false alarms now with "encodings"
like MIME-Q, which can look quite different.
-* Thu Aug 14 2003 - mfabian@suse.de
+* Thu Aug 14 2003 mfabian@suse.de
- small update from author:
* add file length check
-* Fri Jul 25 2003 - mfabian@suse.de
+* Fri Jul 25 2003 mfabian@suse.de
- update to 1.05.
From the Changes file:
* --qfrom/to also mask cntrl characters now
@@ -116,7 +118,7 @@
* missing $arg in symlink fixed (bug introduced in 1.02)
* add NFS4 issues to documentation
* add test suite
-* Wed Jul 16 2003 - mfabian@suse.de
+* Wed Jul 16 2003 mfabian@suse.de
- update to 1.04.
From the Changes file:
* add --exec option to allow arbitrary operations
@@ -126,7 +128,7 @@
* add Samba issues to documentation
* suppress normalization error messages in cases of invalid
UTF-8 in checkenc()
-* Mon Jun 30 2003 - mfabian@suse.de
+* Mon Jun 30 2003 mfabian@suse.de
- update to 1.02.
From the Changes file:
* make default behaviour to not work recursively so we can
@@ -136,14 +138,14 @@
from @ARGV
* die on unknown option
* check if files exist and die otherwise
-* Mon May 12 2003 - mfabian@suse.de
+* Mon May 12 2003 mfabian@suse.de
- update to 1.01
- remove patch which requires Encode::HanExtra and Encode::JIS2K
because these two packages use "enc2xs -C" in %%post and %%postun
now which makes on demand loading of these encodings possible
without a "require" in convmv.
-* Fri May 09 2003 - mfabian@suse.de
+* Fri May 09 2003 mfabian@suse.de
- add patch to require Encode::HanExtra and Encode::JIS2K
if available
-* Fri May 09 2003 - mfabian@suse.de
+* Fri May 09 2003 mfabian@suse.de
- new package: convmv 1.0.
++++++ convmv-1.10.tar.bz2 -> convmv-1.12.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/Changes new/convmv-1.12/Changes
--- old/convmv-1.10/Changes 2006-06-26 03:03:26.000000000 +0200
+++ new/convmv-1.12/Changes 2008-01-23 18:55:56.000000000 +0100
@@ -1,3 +1,13 @@
+1.12
+- now work with Perl 5.10 using an eval block
+- GPL v2 and v3 now
+
+1.11
+- test suite compares sorted results of find to fix false alarms on some systems
+- test suite now uses tar instead of cp for copying.
+- fix a y/n mixup
+- at startup we check if Perl::Encode is not too broken (bugs 37757 and 49830 for now). Recent Perl releases are terribly broken. If this won't improve, I'll have to rewrite convmv in a language with more stable core functionality :-|. If you are distributor of convmv, please run make test before packaging to make sure you don't ship convmv with a broken Perl release.
+
1.10
- now use from_to instead of utf8::decode (which is experimental and might vanish in the future) to check for valid UTF-8
- updates and cleanups of testsuite and include "0" filename
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/convmv new/convmv-1.12/convmv
--- old/convmv-1.10/convmv 2006-06-25 20:46:50.000000000 +0200
+++ new/convmv-1.12/convmv 2008-01-23 18:55:19.000000000 +0100
@@ -1,10 +1,10 @@
#!/usr/bin/perl
-# convmv 1.10 - converts filenames from one encoding to another
-# Copyright © 2003-2006 Bjoern JACKE
+# convmv 1.12 - converts filenames from one encoding to another
+# Copyright © 2003-2008 Bjoern JACKE
#
# This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
-# under the terms of the GNU General Public License version 2 as published by
-# the Free Software Foundation.
+# under the terms of the GNU General Public License version 2 or 3 as
+# published by the Free Software Foundation.
# to get a man page:
# pod2man --section 1 --center=" " convmv | gzip > convmv.1.gz
@@ -88,6 +88,9 @@
Needed to actually rename the files. By default convmv will just print what it
wants to do.
+=item B<--parsable>
+This is not implemented yet.
+
=item B<--replace>
if the file to which shall be renamed already exists, it will be overwritten if
@@ -149,16 +152,17 @@
(NFD), where a few characters are encoded in a different way. On OS X it's not
possible to create NFC UTF-8 filenames because this is prevented at filesystem
layer. On HFS+ filenames are internally stored in UTF-16 and when converted
-back to UTF-8, for the underlying BSD system to be handable, NFD is created. If
-someone knows why Apple chose to do this, please let me know. I think it was a
-very bad idea and breaks many things under OS X which expect a normal POSIX
-conforming system. Anywhere else convmv is able to convert files from NFC to
-NFD or vice versa which makes interoperability with such systems a lot easier.
+back to UTF-8, for the underlying BSD system to be handable, NFD is created.
+See http://developer.apple.com/qa/qa2001/qa1173.html for defails. I think it
+was a very bad idea and breaks many things under OS X which expect a normal
+POSIX conforming system. Anywhere else convmv is able to convert files from NFC
+to NFD or vice versa which makes interoperability with such systems a lot
+easier.
=head3 JFS
If people mount JFS partitions with iocharset=utf8, there is a similar problem,
-because JFS is designed to store finenames internally in UTF-16, too; that is
+because JFS is designed to store filenames internally in UTF-16, too; that is
because Linux' JFS is really JFS2, which was a rewrite of JFS for OS/2. JFS
partitions should always be mounted with iocharset=iso8859-1, which is also the
default with recent 2.6.6 kernels. If this is not done, JFS does not behave
@@ -210,6 +214,13 @@
By the way: Samba 3.x finally maps to UTF-8 filenames by default, so also when
you migrate from Samba 2 to Samba 3 you might have to convert your file names.
+=head2 Netatalk interoperability issues
+
+When Netatalk is being switched to UTF-8 which is supported in version 2 then
+it is NOT sufficient to rename the file names. There needs to be done more. See
+http://netatalk.sourceforge.net/2.0/htmldocs/upgrade.html#volumes-and-filena...
+and the uniconv utility of Netatalk for details.
+
=head1 SEE ALSO
L L L
@@ -260,6 +271,7 @@
'upper'=>\$opt_upper,
'lower'=>\$opt_lower,
'dotlessi'=>\$opt_dotlessi,
+ 'parsable'=>\$opt_parsable,
) or exit 1;
use File::Compare;
$errors_occurred=0;
@@ -270,13 +282,18 @@
&listvalidencodings and exit 0 if ($opt_list);
&printusage and exit 1 if (!@ARGV or $opt_help);
+&check_for_broken_perl_release();
+
+if ($opt_parsable and ($opt_notest or $opt_exec or $opt_i)) {
+ die "--parsable mode cannot be used with --notest, --exec or -i\n";
+}
if ($opt_unescape) {
die "No charset conversion when unescaping!\n" if ($opt_f or $opt_t);
$checkenc=\&unescape_checkenc;
$get_newname=\&unescape_get_newname;
} elsif ($opt_upper or $opt_lower) {
die "No charset conversion when uppering/lowering!\n" if ($opt_t);
- die "Not possible to --upper and --lower at once!\n" if ($opt_upper and $opt_lower);
+ die "Not possible to --upper and --lower at the same time!\n" if ($opt_upper and $opt_lower);
$checkenc=\&upperlower_checkenc;
$get_newname=\&upperlower_get_newname;
$opt_f="ascii" unless ($opt_f);
@@ -327,15 +344,15 @@
if ($opt_r) {
find({wanted=>\&scan,bydepth=>1,no_chdir=>1}, @args);
if (not $errors_occurred and $warnings_occurred) {
- $errors_occurred=1 if (&print_ask ("WARNINGS occurred. Do you really want to continue?",1));
+ $errors_occurred=1 if (not &print_ask ("WARNINGS occurred. Do you really want to continue?",1));
}
die "To prevent damage to your files, we won't continue.\nFirst fix this or correct options!\n" if ($errors_occurred);
- find({wanted=>\&process_symlink_targets,bydepth=>1,no_chdir=>1}, @args) unless ($opt_exec);
+ unless ($opt_exec) { find({wanted=>\&process_symlink_targets,bydepth=>1,no_chdir=>1}, @args); }
find({wanted=>\&process_main,bydepth=>1,no_chdir=>1}, @args);
} else {
for (@args) { &scan; }
if (not $errors_occurred and $warnings_occurred) {
- $errors_occurred=1 if (&print_ask ("WARNINGS occurred. Do you really want to continue?",1));
+ $errors_occurred=1 if (not &print_ask ("WARNINGS occurred. Do you really want to continue?",1));
}
die "To prevent damage to your files, we won't continue.\nFirst fix errors or correct options!\n" if ($errors_occurred);
unless ($opt_exec) { for (@args) { &process_symlink_targets; } }
@@ -534,12 +551,12 @@
sub printusage {
print <
+convmv 1.12 - converts filenames from one encoding to another
+Copyright (C) 2003-2008 Bjoern JACKE
This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
-under the terms of the GNU General Public License version 2 as published by
-the Free Software Foundation.
+under the terms of the GNU General Public License version 2 or 3 as published
+by the Free Software Foundation.
USAGE: convmv [options] FILE(S)
-f enc encoding *from* which should be converted
@@ -559,6 +576,7 @@
--unescape convert%20ugly%20escape%20sequences
--upper turn to upper case
--lower turn to lower case
+--parsable write a parsable todo list (see man page)
--help print this help
END
#--dotlessi care about the dotless i issue of certain locales (use with care)
@@ -575,14 +593,25 @@
sub this_is_valid_utf8() {
my $string = shift;
- # until 1.08 I used to used decode_utf8() but see perl bug #37757 (perl 5.8.7/8)
+ # until 1.08 I used to use decode_utf8() but see perl bug #37757 (perl 5.8.7/8)
+ #if (not defined(decode_utf8($string)) ) {
+ #
# let's look for a different way to find valid utf-8 ...:
- #utf8::decode() is experimental and might disappear says utf8(3pm):
+ # utf8::decode() is experimental and might disappear says utf8(3pm):
#if (utf8::decode($string) != undef) {
+ #
# Encode::decode does not work as one might expect:
#if (Encode::decode(utf8,$string,Encode::FB_QUIET) == undef) {
+ #
# from_to() works for all Perl versions (at the moment ;)
- if (from_to($string,utf8,utf8,Encode::FB_QUIET) == undef) {
+ # ... and here we go: with Perl 5.10 from_to(utf8..utf8) doen't work either,
+ # see perl bug #49830. convmv 1.10 and Perl 5.10 will again only work with
+ # --nosmart.
+ #
+ #okay now perluniintro suggests to do this:
+
+ eval { decode_utf8($string, Encode::FB_CROAK); };
+ if ($@) {
return undef;
} else {
return 1;
@@ -606,7 +635,7 @@
my $ask = shift;
while ($ask and not $a =~ m/^[yn]$/i) {
print " (y/n) ";
- $a=<>;
+ $a=<STDIN>;
}
print "\n";
if ($a =~ m/^n$/i) {
@@ -691,3 +720,35 @@
$warnings_occurred=1;
}
}
+
+# still unused, but might be used for Netatalk CAP encoding:
+sub cap2utf8() {
+ my $oldname = shift;
+ if (($oldname !~ m/^:2eDS_Store/) and ($oldname =~ /:/)) {
+ $oldname =~ s/(:([0-9a-f][0-9a-f]))/chr(hex($2))/eg;
+ }
+ return $oldname;
+}
+
+sub check_for_broken_perl_release() {
+ # until 1.08 I used to use decode_utf8() but see perl bug #37757 (perl 5.8.7/8)
+ #if (not defined(decode_utf8($string)) )
+ my $bugs = "";
+ my $test = "\366";
+ if (decode_utf8($test)) {
+ $bugs .= "#37757 ";
+ # Convmv 1.08 and below would not work here!
+ # Perl documentation up to 5.8.8 said that
+ # decode_utf8($data_that_is_not_utf_8) should return undef
+ }
+ if (! from_to($test,utf8,utf8,Encode::FB_QUIET) == undef) {
+ $bugs .= "#49830 ";
+ # convmv 1.10-1.11 would not work here!
+ # broken UTF-8 is silently being converted to sane UTF-8 without throwing
+ # an error.
+ }
+ if ($bugs) {
+ print "Your Perl version has fleas $bugs\n";
+ }
+
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/Makefile new/convmv-1.12/Makefile
--- old/convmv-1.10/Makefile 2005-12-09 17:20:48.000000000 +0100
+++ new/convmv-1.12/Makefile 2006-06-27 16:38:01.000000000 +0200
@@ -18,7 +18,7 @@
rm -rf suite
test:
- test -d suite || tar xf testsuite.tar
+ test -d suite || tar -xf testsuite.tar
cd suite ; ./dotests.sh
dist: clean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/MD5sums new/convmv-1.12/MD5sums
--- old/convmv-1.10/MD5sums 2006-06-26 03:03:43.000000000 +0200
+++ new/convmv-1.12/MD5sums 2008-01-23 18:58:13.000000000 +0100
@@ -1,18 +1,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: RIPEMD160
+Hash: SHA1
-e0dc2bf8cde8e56d69cef5d30c702da3 ./GPL2
-7ef7c40c910edc39fa1c0703f51d3317 ./TODO
-f38e3517eb6eab6173d2b0bffeacb555 ./Makefile
-18e527fbba66160e3159dcf57d8b81ce ./testsuite.tar
-20b03ca7b386a631c79f7d3478ece195 ./Changes
-1a631929afcf2b475435f6683f074c7b ./convmv
-22860c4e541860ca2bb02979228c4a33 ./VERSION
+2559b77cb012f1a3b7bcae81eddf0f31 ./Changes
+e7335cf8e03119c353aa45efdc49b94b ./convmv
8bed1a74d53b68c1bce15d32309bdb52 ./CREDITS
+e0dc2bf8cde8e56d69cef5d30c702da3 ./GPL2
+0a83f741ea9a5492a403b0287cea7375 ./Makefile
+7d862266a4794aee21f731946a82d4bb ./testsuite.tar
+2001efa90039013edb43ba1b6b784bd5 ./TODO
+81d99f84fe599419c14b271f7dfc262e ./VERSION
+d41d8cd98f00b204e9800998ecf8427e ./.MD5sums
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
+Version: GnuPG v2.0.8 (GNU/Linux)
-iD8DBQFEnzJvdoo0s+hIejkRA64iAJ9x244ml61zjpmPHCOtgawxqOw2ewCdFg8/
-aW3VNZIvicDT8OjG8F2iGCw=
-=jOPt
+iEYEARECAAYFAkeXgDUACgkQdoo0s+hIejmofgCg7X8B4pwlHtuGqAfeKX1m4BhX
+pN4An2YK1L9tfOaIUeJThQAi60jlBwDZ
+=AtEk
-----END PGP SIGNATURE-----
Files old/convmv-1.10/testsuite.tar and new/convmv-1.12/testsuite.tar differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/TODO new/convmv-1.12/TODO
--- old/convmv-1.10/TODO 2006-06-26 02:54:28.000000000 +0200
+++ new/convmv-1.12/TODO 2008-01-22 13:54:03.000000000 +0100
@@ -11,5 +11,7 @@
- keep/restore old ctime - difficult to do! No Perl module, not
even a ctime option in standard "touch" command :-|
+- add option for a parsable mode, writing in null byte separated columns what to do with which files. This is to allow people more easily to write gui frontends for convmv. Feedback for this option is very welcome
+
any other suggestions?
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/convmv-1.10/VERSION new/convmv-1.12/VERSION
--- old/convmv-1.10/VERSION 2006-06-26 03:03:40.000000000 +0200
+++ new/convmv-1.12/VERSION 2008-01-23 18:58:11.000000000 +0100
@@ -1 +1 @@
-1.10
+1.12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org