From 29d6b9e423ab9c980425ac4f98dd1a6c3da1f305b2ad0de14be5f4244e686a9f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 13 Mar 2008 18:04:37 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_krb5?expand=0&rev=13 --- pam_krb5-i18n.dif | 118 +++++++++++++++++++++++++++++++++++++ pam_krb5-init-podir.tar.gz | 3 + pam_krb5.changes | 5 ++ pam_krb5.spec | 12 +++- 4 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 pam_krb5-i18n.dif create mode 100644 pam_krb5-init-podir.tar.gz diff --git a/pam_krb5-i18n.dif b/pam_krb5-i18n.dif new file mode 100644 index 0000000..bf91d76 --- /dev/null +++ b/pam_krb5-i18n.dif @@ -0,0 +1,118 @@ +Index: pam_krb5-2.2.22-1/configure.ac +=================================================================== +--- pam_krb5-2.2.22-1.orig/configure.ac ++++ pam_krb5-2.2.22-1/configure.ac +@@ -444,6 +444,24 @@ AC_SUBST(TESTHOST) + AC_SUBST(default_ccache_dir) + AC_SUBST(default_ccname_template) + ++AC_PATH_PROG(XGETTEXT, xgettext) ++if test -z "$XGETTEXT" ; then ++ AC_MSG_ERROR(xgettext is missing; please install gettext.) ++fi ++ ++AM_GNU_GETTEXT([external]) ++AM_GNU_GETTEXT_VERSION(0.16) ++ ++AH_VERBATIM([_ZZENABLE_NLS], ++ [#ifdef ENABLE_NLS ++ #include ++ #define _(msgid) dgettext(PACKAGE, msgid) ++ #define N_(msgid) msgid ++ #else ++ #define _(msgid) (msgid) ++ #define N_(msgid) msgid ++ #endif /* ENABLE_NLS */]) ++ + AC_CONFIG_HEADER(config.h) + AC_OUTPUT([ + Makefile +@@ -467,4 +485,5 @@ tests/tools/klist_f + tests/tools/klist_c + tests/tools/klist_a + tests/tools/klist_4 ++po/Makefile.in + ]) +Index: pam_krb5-2.2.22-1/Makefile.am +=================================================================== +--- pam_krb5-2.2.22-1.orig/Makefile.am ++++ pam_krb5-2.2.22-1/Makefile.am +@@ -2,7 +2,7 @@ EXTRA_DIST = pam_krb5.spec TODO README R + + CONFIGURE_DEPENDENCIES = $(top_srcdir)/pam_krb5.spec + +-SUBDIRS = src tests ++SUBDIRS = src tests po + + VERSION=$(shell rpm -q --specfile $(top_srcdir)/pam_krb5.spec --qf '%{version}\n' | head -n1) + RELEASE=$(shell rpm -q --specfile $(top_srcdir)/pam_krb5.spec --qf '%{release}\n' | head -n1) +Index: pam_krb5-2.2.22-1/config.h.in +=================================================================== +--- pam_krb5-2.2.22-1.orig/config.h.in ++++ pam_krb5-2.2.22-1/config.h.in +@@ -274,6 +274,19 @@ + #define PAM_KRB5_GNUC_PRINTF(__x,__y) + #endif + ++/* Define to 1 if translation of program messages to the user's native ++ * language is requested. */ ++#undef ENABLE_NLS ++ ++#ifdef ENABLE_NLS ++#include ++#define _(msgid) dgettext(PACKAGE, msgid) ++#define N_(msgid) msgid ++#else ++#define _(msgid) (msgid) ++#define N_(msgid) msgid ++#endif /* ENABLE_NLS */ ++ + + /* Define to the proper qualifier (either const or nothing) for your PAM + implementation. */ +Index: pam_krb5-2.2.22-1/src/auth.c +=================================================================== +--- pam_krb5-2.2.22-1.orig/src/auth.c ++++ pam_krb5-2.2.22-1/src/auth.c +@@ -283,7 +283,7 @@ pam_sm_authenticate(pam_handle_t *pamh, + if ((retval != PAM_SUCCESS) && + (retval != PAM_USER_UNKNOWN) && + options->use_second_pass) { +- i = _pam_krb5_prompt_for(pamh, "Password: ", &second_pass); ++ i = _pam_krb5_prompt_for(pamh, _("Password: "), &second_pass); + if ((i == PAM_SUCCESS) && + (flags & PAM_DISALLOW_NULL_AUTHTOK) && + (second_pass != NULL) && +Index: pam_krb5-2.2.22-1/src/password.c +=================================================================== +--- pam_krb5-2.2.22-1.orig/src/password.c ++++ pam_krb5-2.2.22-1/src/password.c +@@ -257,7 +257,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int + } + if ((password == NULL) && (options->use_second_pass)) { + /* Ask the user for a password. */ +- sprintf(prompt, "%s%sPassword: ", ++ sprintf(prompt, _("%s%sPassword: "), + options->banner, + strlen(options->banner) > 0 ? " " : ""); + i = _pam_krb5_prompt_for(pamh, prompt, &password); +@@ -345,10 +345,10 @@ pam_sm_chauthtok(pam_handle_t *pamh, int + * okay with that, ask for one. */ + if ((password == NULL) && (retval == PAM_AUTHTOK_ERR)) { + /* Ask for the new password twice. */ +- sprintf(prompt, "New %s%sPassword: ", ++ sprintf(prompt, _("New %s%sPassword: "), + options->banner, + strlen(options->banner) > 0 ? " " : ""); +- sprintf(prompt2, "Repeat New %s%sPassword: ", ++ sprintf(prompt2, _("Repeat New %s%sPassword: "), + options->banner, + strlen(options->banner) > 0 ? " " : ""); + i = _pam_krb5_prompt_for_2(pamh, prompt, &password, +Index: pam_krb5-2.2.22-1/po/POTFILES.in +=================================================================== +--- /dev/null ++++ pam_krb5-2.2.22-1/po/POTFILES.in +@@ -0,0 +1,2 @@ ++src/auth.c ++src/password.c diff --git a/pam_krb5-init-podir.tar.gz b/pam_krb5-init-podir.tar.gz new file mode 100644 index 0000000..503993a --- /dev/null +++ b/pam_krb5-init-podir.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dec270f50da659fa6258bbbfa72e95d848ecd9846b76c941a2277337286baaa +size 7308 diff --git a/pam_krb5.changes b/pam_krb5.changes index 4d64ea2..4df53d5 100644 --- a/pam_krb5.changes +++ b/pam_krb5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 13 18:24:31 CET 2008 - mc@suse.de + +- add i18n support + ------------------------------------------------------------------- Mon Feb 11 13:37:46 CET 2008 - mc@suse.de diff --git a/pam_krb5.spec b/pam_krb5.spec index c689ca7..5452e6c 100644 --- a/pam_krb5.spec +++ b/pam_krb5.spec @@ -19,13 +19,15 @@ Group: Productivity/Networking/Security Provides: pam_krb AutoReqProv: on Version: 2.2.22 -Release: 1 +Release: 10 Summary: PAM Module for Kerberos Authentication Url: http://sourceforge.net/projects/pam-krb5/ Source: pam_krb5-%{version}-%{PAM_RELEASE}.tar.bz2 +Source1: pam_krb5-init-podir.tar.gz Patch1: pam_krb5-2.2.0-0.5-configure_ac.dif Patch2: pam_krb5-2.2.11-1-refresh-drop-restore-priv.dif Patch3: pam_krb5-2.2.20-1-debug-log-choice.dif +Patch4: pam_krb5-i18n.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -41,9 +43,11 @@ Authors: %prep %setup -q -n pam_krb5-%{version}-%{PAM_RELEASE} +%setup -a 1 -T -D -n pam_krb5-%{version}-%{PAM_RELEASE} %patch1 %patch2 %patch3 +%patch4 -p1 %build %{suse_update_config -f} @@ -60,11 +64,13 @@ make check make install DESTDIR=$RPM_BUILD_ROOT ln -sf pam_krb5.so $RPM_BUILD_ROOT/%_lib/security/pam_krb5afs.so rm -f $RPM_BUILD_ROOT/%_lib/security/*.la +# Create filelist with translatins +%{find_lang} pam_krb5 %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f pam_krb5.lang %defattr(444,root,root,755) %doc TODO README* COPYING* ChangeLog AUTHORS NEWS %attr(555,root,root) /%{_lib}/security/pam_krb5.so @@ -75,6 +81,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /usr/bin/afs5log %changelog +* Thu Mar 13 2008 mc@suse.de +- add i18n support * Mon Feb 11 2008 mc@suse.de - version 2.2.22 * moved .k5login checks to a subprocess to avoid screwing with the