pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [pkgsrc-2023Q2] pkgsrc/security/opensc



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Thu Aug 17 20:06:53 UTC 2023

Modified Files:
        pkgsrc/security/opensc [pkgsrc-2023Q2]: Makefile PLIST options.mk

Log Message:
Pullup ticket #6791 - requested by manu
security/opensc: fix regression

Revisions pulled up:
- security/opensc/Makefile                                      1.41
- security/opensc/PLIST                                         1.15
- security/opensc/options.mk                                    1.7

---
   Module Name:    pkgsrc
   Committed By:   manu
   Date:           Mon Aug 14 16:08:32 UTC 2023

   Modified Files:
           pkgsrc/security/opensc: Makefile PLIST options.mk

   Log Message:
   Fix for security/opensc regression

   When security/opensc was updated to 0.23.0, it gained a
   --enable-notify configure flag.

   The feature adds a libopensc dependency on libglib, which in turns
   brings libpthread into the game.

   When using the opensc-pkcs11.so module with a non threaded program
   such as ssh(1), libopensc will load some thread-enabled glib function
   that attemps to initialize pthread stuff. That would require libpthread
   to be linked in, and if it is not the case, module load aborts.
   Here is the crash in action:

   Program received signal SIGABRT, Aborted.
   0x000072403899c46a in _lwp_kill () from /lib/libc.so.12
   (gdb) bt
   #0  0x000072403899c46a in _lwp_kill () from /lib/libc.so.12
   #1  0x0000724038849223 in __libc_thr_create_stub () from /lib/libc.so.12
   #2  0x0000724036a9c3ee in ?? ()
   #3  0x0000000000000000 in ?? ()

   This change turns the notify feature into a disabled by default
   option so that opensc-pkcs11.so can work agan with ssh(1).


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.2.1 pkgsrc/security/opensc/Makefile
cvs rdiff -u -r1.14 -r1.14.4.1 pkgsrc/security/opensc/PLIST
cvs rdiff -u -r1.6 -r1.6.4.1 pkgsrc/security/opensc/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/opensc/Makefile
diff -u pkgsrc/security/opensc/Makefile:1.40 pkgsrc/security/opensc/Makefile:1.40.2.1
--- pkgsrc/security/opensc/Makefile:1.40        Tue Jun  6 12:42:14 2023
+++ pkgsrc/security/opensc/Makefile     Thu Aug 17 20:06:53 2023
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.40 2023/06/06 12:42:14 riastradh Exp $
+# $NetBSD: Makefile,v 1.40.2.1 2023/08/17 20:06:53 bsiegert Exp $
 
 DISTNAME=      opensc-0.23.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=OpenSC/}
 
@@ -20,7 +20,6 @@ GNU_CONFIGURE=                yes
 CONFIGURE_ARGS+=       --disable-autostart-items
 CONFIGURE_ARGS+=       --disable-cmocka
 CONFIGURE_ARGS+=       --disable-strict  # avoid -Werror
-CONFIGURE_ARGS+=       --enable-notify
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 # The stylesheets are not found without this.
 CONFIGURE_ARGS+=       --with-xsl-stylesheetsdir=${PREFIX}/share/xsl/docbook
@@ -37,7 +36,6 @@ INSTALLATION_DIRS=    ${EGDIR}
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf.example ${DESTDIR}${EGDIR}/opensc.conf
 
-.include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 # build tools for doc; should be TOOLS

Index: pkgsrc/security/opensc/PLIST
diff -u pkgsrc/security/opensc/PLIST:1.14 pkgsrc/security/opensc/PLIST:1.14.4.1
--- pkgsrc/security/opensc/PLIST:1.14   Tue Feb 21 17:23:07 2023
+++ pkgsrc/security/opensc/PLIST        Thu Aug 17 20:06:53 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.14 2023/02/21 17:23:07 adam Exp $
+@comment $NetBSD: PLIST,v 1.14.4.1 2023/08/17 20:06:53 bsiegert Exp $
 bin/cardos-tool
 bin/cryptoflex-tool
 bin/dnie-tool
@@ -11,7 +11,7 @@ bin/netkey-tool
 bin/openpgp-tool
 bin/opensc-asn1
 bin/opensc-explorer
-bin/opensc-notify
+${NOTIFY}bin/opensc-notify
 bin/opensc-tool
 bin/piv-tool
 bin/pkcs11-register

Index: pkgsrc/security/opensc/options.mk
diff -u pkgsrc/security/opensc/options.mk:1.6 pkgsrc/security/opensc/options.mk:1.6.4.1
--- pkgsrc/security/opensc/options.mk:1.6       Tue Feb 21 17:23:07 2023
+++ pkgsrc/security/opensc/options.mk   Thu Aug 17 20:06:53 2023
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.6 2023/02/21 17:23:07 adam Exp $
+# $NetBSD: options.mk,v 1.6.4.1 2023/08/17 20:06:53 bsiegert Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.opensc
 
@@ -6,6 +6,11 @@ PKG_OPTIONS_VAR=       PKG_OPTIONS.opensc
 # that exactly one be chosen.
 PKG_OPTIONS_REQUIRED_GROUPS=   cardreader
 PKG_OPTIONS_GROUP.cardreader=  pcsc-lite openct
+
+# The notify option will cause programs not linked with libpthread
+# to abort when loading the opensc-pkcs11.so module. The most notable
+# example of such a program is ssh(1).
+PKG_SUPPORTED_OPTIONS=         notify
 PKG_SUGGESTED_OPTIONS=         pcsc-lite
 
 .include "../../mk/bsd.options.mk"
@@ -38,3 +43,12 @@ CONFIGURE_ARGS+=     --enable-openct
 .else
 CONFIGURE_ARGS+=       --disable-openct
 .endif
+
+.if !empty(PKG_OPTIONS:Mnotify)
+.include "../../devel/glib2/buildlink3.mk"
+CONFIGURE_ARGS+=       --enable-notify
+PLIST_SUBST+=          NOTIFY=""
+.else
+CONFIGURE_ARGS+=       --disable-notify
+PLIST_SUBST+=          NOTIFY="@comment "
+.endif



Home | Main Index | Thread Index | Old Index