]> git.pld-linux.org Git - packages/MigrationTools.git/commitdiff
- rel 4 auto/th/MigrationTools-47-4
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 22 Jun 2009 12:37:46 +0000 (12:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- handle UTF-8 GECOS properly

Changed files:
    MigrationTools-utf8.patch -> 1.1
    MigrationTools.spec -> 1.25

MigrationTools-utf8.patch [new file with mode: 0644]
MigrationTools.spec

diff --git a/MigrationTools-utf8.patch b/MigrationTools-utf8.patch
new file mode 100644 (file)
index 0000000..c216ac4
--- /dev/null
@@ -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";
index 604d1f7bdd00a160164ad948e7345f15777afdbd..23c7f17ae804c6a9cf820f84d4b2d3dcc71ced87 100644 (file)
@@ -1,10 +1,10 @@
-# $Revision: 1.24 $Date: 2007-12-26 01:20:29 $
+# $Revision: 1.25 $Date: 2009-06-22 12:37:46 $
 %include        /usr/lib/rpm/macros.perl
 Summary:       LDAP Migration Tools
 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 @@ Patch7:               %{name}-unique-hosts.patch
 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 @@ istniejących serwisów nazw (zwykłych plików, NIS, NetInfo) do LDAP.
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 install %{SOURCE1} .
 
 perl -pi -e 's|%%CONFDIR%%|%{_sysconfdir}/openldap/|g;\
This page took 0.073252 seconds and 4 git commands to generate.