summaryrefslogtreecommitdiff
path: root/sys-auth
diff options
context:
space:
mode:
authorCtibor Brančík <ctibor@brancik.cz>2016-11-09 20:36:42 +0100
committerCtibor Brančík <ctibor@brancik.cz>2016-11-09 20:36:42 +0100
commit61f68d95ddf333ee2ffc6bc166bf36140cda9898 (patch)
tree2e3471ef6f56544c35c12c7fa50ce5c1a439f6a4 /sys-auth
parent2ad57184c5398137386b09c1f38d85d8b8e9ca26 (diff)
downloadbrancik-overlay-61f68d95ddf333ee2ffc6bc166bf36140cda9898.tar.gz
brancik-overlay-61f68d95ddf333ee2ffc6bc166bf36140cda9898.tar.bz2
Update sys-auth/poldi to live ebuild
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/poldi/Manifest1
-rw-r--r--sys-auth/poldi/files/01-debian-specific-0.4.1.diff288
-rw-r--r--sys-auth/poldi/files/02-ldflags-0.4.1.diff30
-rw-r--r--sys-auth/poldi/files/03-fix-auth-localdb.diff17
-rw-r--r--sys-auth/poldi/files/poldi-9999_fix_maintainer_mode.diff24
-rw-r--r--sys-auth/poldi/files/poldi.conf.example3
-rw-r--r--sys-auth/poldi/metadata.xml5
-rw-r--r--sys-auth/poldi/poldi-9999.ebuild (renamed from sys-auth/poldi/poldi-0.4.1.ebuild)20
8 files changed, 39 insertions, 349 deletions
diff --git a/sys-auth/poldi/Manifest b/sys-auth/poldi/Manifest
deleted file mode 100644
index 3882027..0000000
--- a/sys-auth/poldi/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST poldi-0.4.1.tar.bz2 351972 SHA256 fe692857c33c5f443eb3bce663fecf553a5600f0c6c0ffacecea02c351c2f749 SHA512 0ef276ee1d480416ebab33d590acecf958e707523afd3cee67c019620515a47c825ed42d8ec6427468aa9218f6db9c670f67ea521a8c3fb32d100593814bf51c WHIRLPOOL a3e5639366a1a8b2cc1514d23d64bce3ceabbb9fa13718d37d92842825a0c44a5f1dcafc20939f0c2281d87c66516265cdfeef5691ce3983729ff83508737967
diff --git a/sys-auth/poldi/files/01-debian-specific-0.4.1.diff b/sys-auth/poldi/files/01-debian-specific-0.4.1.diff
deleted file mode 100644
index 7e5b9c7..0000000
--- a/sys-auth/poldi/files/01-debian-specific-0.4.1.diff
+++ /dev/null
@@ -1,288 +0,0 @@
-Description: Debian specific changes
- This patch is generated from revision 0.4.1-2.1 of Debian source.
-Author: Debian poldi maintainers
-Reviewed-By: NIIBE Yutaka
-Last-Update: 2013-07-10
-
-Index: poldi-0.4.1/configure.ac
-===================================================================
---- poldi-0.4.1.orig/configure.ac 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/configure.ac 2013-07-10 12:22:44.384409856 +0000
-@@ -215,7 +215,7 @@
- if test "$have_ksba" = "no"; then
- AC_MSG_NOTICE([[
- ***
--*** libksba not found, building with X.509 authentication support.
-+*** libksba not found, building without X.509 authentication support.
- *** libksba can be retrieved from:
- *** URL FIXME
- *** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
-Index: poldi-0.4.1/conf/Makefile.am
-===================================================================
---- poldi-0.4.1.orig/conf/Makefile.am 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/conf/Makefile.am 2013-07-10 12:22:44.388409858 +0000
-@@ -33,5 +33,11 @@
- install -m 644 -T $(top_srcdir)/conf/poldi.conf.skel \
- $(DESTDIR)$(POLDI_CONF_DIRECTORY)/poldi.conf; \
- fi
-+ if test -e $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; then \
-+ echo "$(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf exists, doing nothing here"; \
-+ else \
-+ install -m 644 -T $(top_srcdir)/conf/scdaemon.conf.skel \
-+ $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; \
-+ fi
-
--EXTRA_DIST = poldi.conf.skel users.skel README.keys
-+EXTRA_DIST = poldi.conf.skel users.skel scdaemon.conf.skel README.keys
-Index: poldi-0.4.1/MIGRATION
-===================================================================
---- poldi-0.4.1.orig/MIGRATION 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/MIGRATION 2013-07-10 12:22:44.372409854 +0000
-@@ -51,3 +51,5 @@
- - "fake-wait-for-card"
- - "require-card-switch"
- - "wait-timeout"
-+ - "try_pin"
-+ - "quiet"
-Index: poldi-0.4.1/TODO
-===================================================================
---- poldi-0.4.1.orig/TODO 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/TODO 2013-07-10 12:22:44.372409854 +0000
-@@ -2,6 +2,9 @@
- * allow for Dirmngr to be started on demand (in pipe mode) (NO <- Why?!)
-
- Low priority:
-+* allow user to skip card authentication without submitting a wrong
-+ PIN to the card, e.g. by entering an empty PIN? Return
-+ PAM_CRED_INSUFFICIENT in that case? PAM_AUTHINFO_UNAVAIL? PAM_AUTH_ERR?
- * figure out what exactly the dependencies on the OpenPGP smartcard are.
- * improve doc
- * work on MIGRATION text
-Index: poldi-0.4.1/src/scd/scd.c
-===================================================================
---- poldi-0.4.1.orig/src/scd/scd.c 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/src/scd/scd.c 2013-07-10 12:22:44.384409856 +0000
-@@ -326,7 +326,7 @@
- fallback: spawn a new scdaemon. */
-
- const char *pgmname;
-- const char *argv[3];
-+ const char *argv[6];
- int no_close_list[3];
- int i;
-
-@@ -352,7 +352,13 @@
-
- argv[0] = pgmname;
- argv[1] = "--server";
-- argv[2] = NULL;
-+ argv[2] = "--options";
-+ argv[3] = "/etc/poldi/scdaemon.conf";
-+ if (flags & SCD_FLAG_VERBOSE)
-+ argv[4] = "-v";
-+ else
-+ argv[4] = NULL;
-+ argv[5] = NULL;
-
- i=0;
-
-@@ -362,7 +368,8 @@
- if (log_get_fd () != -1)
- no_close_list[i++] = log_get_fd ();
- #endif
-- no_close_list[i++] = fileno (stderr);
-+ if (flags & SCD_FLAG_VERBOSE)
-+ no_close_list[i++] = fileno (stderr);
- no_close_list[i] = -1;
-
- /* connect to the agent and perform initial handshaking */
-Index: poldi-0.4.1/src/pam/pam_poldi.c
-===================================================================
---- poldi-0.4.1.orig/src/pam/pam_poldi.c 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/src/pam/pam_poldi.c 2013-07-10 12:22:44.384409856 +0000
-@@ -480,16 +480,16 @@
- {
- if (ctx->debug)
- log_msg_debug (ctx->loghandle, _("Waiting for card for user `%s'..."), pam_username);
-- conv_tell (ctx->conv, _("Waiting for card for user `%s'..."), pam_username);
-+ conv_tell (ctx->conv, _("Insert authentication card for user `%s'"), pam_username);
- }
- else
- {
- if (ctx->debug)
- log_msg_debug (ctx->loghandle, _("Waiting for card..."));
-- conv_tell (ctx->conv, _("Waiting for card..."));
-+ conv_tell (ctx->conv, _("Insert authentication card"));
- }
-
-- err = wait_for_card (ctx->scd, 0);
-+ err = wait_for_card (ctx->scd, 3);
- if (err)
- {
- log_msg_error (ctx->loghandle,
-Index: poldi-0.4.1/src/pam/auth-support/getpin-cb.c
-===================================================================
---- poldi-0.4.1.orig/src/pam/auth-support/getpin-cb.c 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/src/pam/auth-support/getpin-cb.c 2013-07-10 12:22:44.384409856 +0000
-@@ -81,9 +81,15 @@
- Shouldn't they be done in scdaemon itself? -mo */
-
- if (strlen (buffer) < 6) /* FIXME? is it really minimum of 6 bytes? */
-- log_msg_error (ctx->loghandle, _("invalid PIN"));
-- else if (!all_digitsp (buffer))
-- log_msg_error (ctx->loghandle, _("invalid characters in PIN"));
-+ {
-+ log_msg_error (ctx->loghandle, _("PIN too short"));
-+ conv_tell(ctx->conv, "%s", _("PIN too short"));
-+ }
-+/* else if (!all_digitsp (buffer)) */
-+/* { */
-+/* log_msg_error (ctx->loghandle, _("invalid characters in PIN")); */
-+/* conv_tell(ctx->conv, "%s", _("invalid characters in PIN")); */
-+/* } */
- else
- break;
- }
-@@ -235,7 +241,7 @@
- err = query_user (ctx, info_frobbed, buf, maxbuf);
- else
- /* Use string which is more user friendly. */
-- err = query_user (ctx, _("||Please enter the PIN"), buf, maxbuf);
-+ err = query_user (ctx, _("Please enter the PIN: "), buf, maxbuf);
- }
- else
- {
-@@ -254,7 +260,7 @@
- if (info_frobbed)
- err = keypad_mode_enter (ctx, info_frobbed);
- else
-- err = keypad_mode_enter (ctx, _("||Please enter the PIN"));
-+ err = keypad_mode_enter (ctx, _("Please enter the PIN: "));
- }
- else
- err = gpg_error (GPG_ERR_INV_VALUE); /* FIXME: must signal
-Index: poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c
-===================================================================
---- poldi-0.4.1.orig/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:22:44.384409856 +0000
-@@ -117,10 +117,12 @@
- username = username_desired;
-
- if (ctx->debug)
-- log_msg_debug (ctx->conv,
-- _("Trying authentication as user `%s'..."), username);
-- conv_tell (ctx->conv,
-- _("Trying authentication as user `%s'..."), username);
-+ {
-+ log_msg_debug (ctx->conv,
-+ _("Trying authentication as user `%s'..."), username);
-+ conv_tell (ctx->conv,
-+ _("Trying authentication as user `%s'..."), username);
-+ }
-
- /* Verify (again) that the given account is associated with the
- serial number. */
-@@ -128,12 +130,14 @@
- if (err)
- {
- if (ctx->debug)
-- log_msg_debug (ctx->loghandle,
-- _("Serial number %s is not associated with user %s"),
-- ctx->cardinfo.serialno, username);
-- conv_tell (ctx->conv,
-- _("Serial number %s is not associated with user %s"),
-- ctx->cardinfo.serialno, username);
-+ {
-+ log_msg_debug (ctx->loghandle,
-+ _("Serial number %s is not associated with user %s"),
-+ ctx->cardinfo.serialno, username);
-+ conv_tell (ctx->conv,
-+ _("Serial number %s is not associated with user %s"),
-+ ctx->cardinfo.serialno, username);
-+ }
- err = gcry_error (GPG_ERR_INV_NAME);
- goto out;
- }
-Index: poldi-0.4.1/tests/Makefile.in
-===================================================================
---- poldi-0.4.1.orig/tests/Makefile.in 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/tests/Makefile.in 2013-07-10 12:22:44.384409856 +0000
-@@ -220,7 +220,7 @@
- top_srcdir = @top_srcdir@
- parse_test_SOURCES = parse-test.c
- parse_test_CFLAGS = -Wall -I$(top_srcdir)/src/util -I$(top_srcdir)/src
--parse_test_LDADD = $(top_builddir)/src/util/libpoldi-util.a -lgcrypt
-+parse_test_LDADD = $(top_builddir)/src/util/libpoldi-util.a -lgcrypt -lgpg-error
- pam_test_SOURCES = pam-test.c
- pam_test_CFLAGS = -Wall
- pam_test_LDADD = -lpam -lpam_misc
-Index: poldi-0.4.1/conf/scdaemon.conf.skel
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ poldi-0.4.1/conf/scdaemon.conf.skel 2013-07-10 12:22:44.388409858 +0000
-@@ -0,0 +1 @@
-+#
-Index: poldi-0.4.1/conf/Makefile.in
-===================================================================
---- poldi-0.4.1.orig/conf/Makefile.in 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/conf/Makefile.in 2013-07-10 12:22:44.388409858 +0000
-@@ -195,7 +195,7 @@
- target_vendor = @target_vendor@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--EXTRA_DIST = poldi.conf.skel users.skel README.keys
-+EXTRA_DIST = poldi.conf.skel users.skel scdaemon.conf.skel README.keys
- all: all-am
-
- .SUFFIXES:
-@@ -372,6 +372,12 @@
- install -m 644 -T $(top_srcdir)/conf/poldi.conf.skel \
- $(DESTDIR)$(POLDI_CONF_DIRECTORY)/poldi.conf; \
- fi
-+ if test -e $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; then \
-+ echo "$(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf exists, doing nothing here"; \
-+ else \
-+ install -m 644 -T $(top_srcdir)/conf/scdaemon.conf.skel \
-+ $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; \
-+ fi
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
-Index: poldi-0.4.1/conf/poldi.conf.skel
-===================================================================
---- poldi-0.4.1.orig/conf/poldi.conf.skel 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/conf/poldi.conf.skel 2013-07-10 12:22:44.388409858 +0000
-@@ -5,10 +5,10 @@
- auth-method localdb
-
- # Specify the log file:
--log-file /home/moritz/logs/poldi.txt
-+log-file /var/log/poldi
-
- # Enable debugging messages
--debug
-+# debug
-
- # Specify SCDaemon executable
- scdaemon-program /usr/bin/scdaemon
-Index: poldi-0.4.1/configure
-===================================================================
---- poldi-0.4.1.orig/configure 2013-07-10 12:22:44.432409857 +0000
-+++ poldi-0.4.1/configure 2013-07-10 12:22:44.380409854 +0000
-@@ -9869,14 +9869,14 @@
- if test "$have_ksba" = "no"; then
- { echo "$as_me:$LINENO:
- ***
--*** libksba not found, building with X.509 authentication support.
-+*** libksba not found, building without X.509 authentication support.
- *** libksba can be retrieved from:
- *** URL FIXME
- *** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
- ***" >&5
- echo "$as_me:
- ***
--*** libksba not found, building with X.509 authentication support.
-+*** libksba not found, building without X.509 authentication support.
- *** libksba can be retrieved from:
- *** URL FIXME
- *** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
diff --git a/sys-auth/poldi/files/02-ldflags-0.4.1.diff b/sys-auth/poldi/files/02-ldflags-0.4.1.diff
deleted file mode 100644
index e6737c6..0000000
--- a/sys-auth/poldi/files/02-ldflags-0.4.1.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-Description: LDFLAGS should be handled to build PAM module
-Author: NIIBE Yutaka
-Last-Update: 2013-07-10
-
-Index: poldi-0.4.1/src/pam/Makefile.am
-===================================================================
---- poldi-0.4.1.orig/src/pam/Makefile.am 2013-07-10 12:48:56.864526379 +0000
-+++ poldi-0.4.1/src/pam/Makefile.am 2013-07-10 12:48:56.820526375 +0000
-@@ -61,7 +61,7 @@
-
- pam_poldi.so: libpam_poldi.a $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
- ../scd/libscd_shared.a ../util/libpoldi-util_shared.a
-- gcc -shared -o pam_poldi.so -Wl,-u,pam_sm_authenticate \
-+ $(CC) $(LDFLAGS) -shared -o pam_poldi.so -Wl,-u,pam_sm_authenticate \
- libpam_poldi.a \
- $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
- ../scd/libscd_shared.a ../util/libpoldi-util_shared.a ../assuan/libassuan.a \
-Index: poldi-0.4.1/src/pam/Makefile.in
-===================================================================
---- poldi-0.4.1.orig/src/pam/Makefile.in 2013-07-10 12:48:56.864526379 +0000
-+++ poldi-0.4.1/src/pam/Makefile.in 2013-07-10 12:48:56.820526375 +0000
-@@ -592,7 +592,7 @@
-
- pam_poldi.so: libpam_poldi.a $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
- ../scd/libscd_shared.a ../util/libpoldi-util_shared.a
-- gcc -shared -o pam_poldi.so -Wl,-u,pam_sm_authenticate \
-+ $(CC) $(LDFLAGS) -shared -o pam_poldi.so -Wl,-u,pam_sm_authenticate \
- libpam_poldi.a \
- $(AUTH_METHODS_LIBS) auth-support/libpam-poldi-auth-support.a \
- ../scd/libscd_shared.a ../util/libpoldi-util_shared.a ../assuan/libassuan.a \
diff --git a/sys-auth/poldi/files/03-fix-auth-localdb.diff b/sys-auth/poldi/files/03-fix-auth-localdb.diff
deleted file mode 100644
index 96eface..0000000
--- a/sys-auth/poldi/files/03-fix-auth-localdb.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Bug fix calling log_msg_debug
-Author: NIIBE Yutaka
-Last-Update: 2013-07-10
-
-Index: poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c
-===================================================================
---- poldi-0.4.1.orig/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:57:28.896538720 +0000
-+++ poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:57:28.844538737 +0000
-@@ -118,7 +118,7 @@
-
- if (ctx->debug)
- {
-- log_msg_debug (ctx->conv,
-+ log_msg_debug (ctx->loghandle,
- _("Trying authentication as user `%s'..."), username);
- conv_tell (ctx->conv,
- _("Trying authentication as user `%s'..."), username);
diff --git a/sys-auth/poldi/files/poldi-9999_fix_maintainer_mode.diff b/sys-auth/poldi/files/poldi-9999_fix_maintainer_mode.diff
new file mode 100644
index 0000000..614fc52
--- /dev/null
+++ b/sys-auth/poldi/files/poldi-9999_fix_maintainer_mode.diff
@@ -0,0 +1,24 @@
+--- configure.ac 2016-11-09 20:17:10.432418239 +0100
++++ configure.ac.new 2016-11-09 20:20:10.576078868 +0100
+@@ -76,8 +76,6 @@
+ #endif
+ ])
+
+-AM_MAINTAINER_MODE
+-
+ # Checks for programs.
+ AC_PROG_MAKE_SET
+ AM_SANITY_CHECK
+@@ -127,12 +125,7 @@
+ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
+
+ if test "$GCC" = yes; then
+- if test "$USE_MAINTAINER_MODE" = "yes"; then
+- CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
+- CFLAGS="$CFLAGS -Wformat-nonliteral"
+- else
+ CFLAGS="$CFLAGS -Wall"
+- fi
+ fi
+
+ #
diff --git a/sys-auth/poldi/files/poldi.conf.example b/sys-auth/poldi/files/poldi.conf.example
index 3fed157..fa80c57 100644
--- a/sys-auth/poldi/files/poldi.conf.example
+++ b/sys-auth/poldi/files/poldi.conf.example
@@ -9,6 +9,3 @@ log-file /var/log/poldi
# Enable debugging messages
debug
-
-# Specify SCDaemon executable
-scdaemon-program /usr/lib/gnupg2/scdaemon
diff --git a/sys-auth/poldi/metadata.xml b/sys-auth/poldi/metadata.xml
index 5df780e..41f60c3 100644
--- a/sys-auth/poldi/metadata.xml
+++ b/sys-auth/poldi/metadata.xml
@@ -10,8 +10,9 @@
</longdescription>
<upstream>
<maintainer status="active">
- <name>Björn Schießle</name>
+ <name>Moritz Schulte</name>
+ <email>mailto:moritz@g10code.com</email>
</maintainer>
- <doc lang="en">http://www.schiessle.org/howto/poldi.html</doc>
+ <doc lang="en">http://www.g10code.com/p-poldi.html</doc>
</upstream>
</pkgmetadata>
diff --git a/sys-auth/poldi/poldi-0.4.1.ebuild b/sys-auth/poldi/poldi-9999.ebuild
index 7594fe3..ac70c6b 100644
--- a/sys-auth/poldi/poldi-0.4.1.ebuild
+++ b/sys-auth/poldi/poldi-9999.ebuild
@@ -4,15 +4,15 @@
EAPI=5
-inherit pam eutils
+inherit pam eutils git-2 autotools autotools-utils
DESCRIPTION="Poldi is a PAM module implementing authentication via OpenPGP smartcards."
HOMEPAGE="http://www.gnupg.org/"
-SRC_URI="mirror://gnupg/alpha/${PN}/${P}.tar.bz2"
+EGIT_REPO_URI="git://git.gnupg.org/poldi.git"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~x86 ~amd64"
+KEYWORDS=""
IUSE="usb"
DEPEND="dev-libs/libgcrypt:0
@@ -24,15 +24,19 @@ RDEPEND="${DEPEND}"
DOCS=( AUTHORS ChangeLog INSTALL NEWS README THANKS )
-src_prepare() {
- epatch "${FILESDIR}/01-debian-specific-0.4.1.diff"
- epatch "${FILESDIR}/02-ldflags-0.4.1.diff"
- epatch "${FILESDIR}/03-fix-auth-localdb.diff"
+AUTOTOOLS_AUTORECONF=1
+
+PATCHES=( "${FILESDIR}/poldi-9999_fix_maintainer_mode.diff" )
+
+src_configure() {
+ local myeconfargs=(
+ --with-pam-module-directory=/lib64/security
+ )
+ autotools-utils_src_configure
}
src_install() {
default
- dopammod "${S}"/src/pam/pam_poldi.so
insinto /etc/poldi
doins "${FILESDIR}"/poldi.conf.example
}