packages: MigrationTools/MigrationTools.spec, MigrationTools/MigrationTools...

baggins baggins at pld-linux.org
Mon Jun 22 14:37:51 CEST 2009


Author: baggins                      Date: Mon Jun 22 12:37:51 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 4
- handle UTF-8 GECOS properly

---- Files affected:
packages/MigrationTools:
   MigrationTools.spec (1.24 -> 1.25) , MigrationTools-utf8.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/MigrationTools/MigrationTools.spec
diff -u packages/MigrationTools/MigrationTools.spec:1.24 packages/MigrationTools/MigrationTools.spec:1.25
--- packages/MigrationTools/MigrationTools.spec:1.24	Wed Dec 26 02:20:29 2007
+++ packages/MigrationTools/MigrationTools.spec	Mon Jun 22 14:37:46 2009
@@ -4,7 +4,7 @@
 Summary(pl.UTF-8):	Narzędzia do migracji do LDAP
 Name:		MigrationTools
 Version:	47
-Release:	3
+Release:	4
 License:	BSD
 Group:		Networking/Admin
 Source0:	http://www.padl.com/download/%{name}-%{version}.tar.gz
@@ -22,6 +22,7 @@
 Patch8:		%{name}-sysconfdir.patch
 Patch9:		%{name}-noproto.patch
 Patch10:	%{name}-minmax-ugid.patch
+Patch11:	%{name}-utf8.patch
 URL:		http://www.padl.com/OSS/MigrationTools.html
 BuildRequires:	rpm-perlprov
 BuildArch:	noarch
@@ -69,6 +70,7 @@
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 install %{SOURCE1} .
 
 perl -pi -e 's|%%CONFDIR%%|%{_sysconfdir}/openldap/|g;\
@@ -98,6 +100,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.25  2009/06/22 12:37:46  baggins
+- rel 4
+- handle UTF-8 GECOS properly
+
 Revision 1.24  2007/12/26 01:20:29  qboosh
 - typo
 

================================================================
Index: packages/MigrationTools/MigrationTools-utf8.patch
diff -u /dev/null packages/MigrationTools/MigrationTools-utf8.patch:1.1
--- /dev/null	Mon Jun 22 14:37:51 2009
+++ packages/MigrationTools/MigrationTools-utf8.patch	Mon Jun 22 14:37:46 2009
@@ -0,0 +1,52 @@
+diff -ur MigrationTools-47/migrate_passwd.pl MigrationTools-47.x/migrate_passwd.pl
+--- MigrationTools-47/migrate_passwd.pl	2009-06-22 14:37:33.091177870 +0200
++++ MigrationTools-47.x/migrate_passwd.pl	2009-06-22 14:27:03.000000000 +0200
+@@ -39,6 +39,9 @@
+ 
+ require '/etc/openldap/migrate_common.ph';
+ 
++use Text::Iconv;
++$converter = Text::Iconv->new("UTF-8", "ASCII//TRANSLIT");
++
+ $PROGRAM = "migrate_passwd.pl";
+ $NAMINGCONTEXT = &getsuffix($PROGRAM);
+ 
+@@ -70,28 +73,6 @@
+ 	next if /^#/;
+ 	next if /^\+/;
+ 
+-	s/Ä/Ae/g;
+-	s/Ë/Ee/g;
+-	s/Ï/Ie/g;
+-	s/Ö/Oe/g;
+-	s/Ü/Ue/g;
+-
+-	s/ä/ae/g;
+-	s/ë/ee/g;
+-	s/ï/ie/g;
+-	s/ö/oe/g;
+-	s/ü/ue/g;
+-	s/ÿ/ye/g;
+-	s/ß/ss/g;
+-	s/é/e/g;
+-
+-	s/Æ/Ae/g;
+-	s/æ/ae/g;
+-	s/Ø/Oe/g;
+-	s/ø/oe/g;
+-	s/Å/Ae/g;
+-	s/å/ae/g;
+-
+ 	local($user, $pwd, $uid, $gid, $gecos, $homedir, $shell) = split(/:/);
+ 	next if (defined($minuid) and ($uid < $minuid));
+ 	next if (defined($maxuid) and ($uid > $maxuid));
+@@ -193,7 +174,8 @@
+ 	}
+ 
+ 	if ($gecos) {
+-		print $HANDLE "gecos: $gecos\n";
++		$cgecos = $converter->convert($gecos);
++		print $HANDLE "gecos: $cgecos\n";
+ 	}
+ 
+ 	print $HANDLE "\n";
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/MigrationTools/MigrationTools.spec?r1=1.24&r2=1.25&f=u



More information about the pld-cvs-commit mailing list