Page MenuHome GnuPG
Feed Advanced Search

Jun 4 2021

gniibe added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

Ah, I think that your problem was fixed in rG53bdc6288f9b: scd: Recover the partial match for PORTSTR for PC/SC. (to be 2.3.2).

Jun 4 2021, 2:02 AM · gnupg (gpg23), yubikey
gniibe triaged T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1) as High priority.
Jun 4 2021, 1:58 AM · gnupg (gpg23), yubikey
gniibe claimed T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).
Jun 4 2021, 1:57 AM · gnupg (gpg23), yubikey
gniibe reopened T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1) as "Open".

I see your situation

Jun 4 2021, 1:57 AM · gnupg (gpg23), yubikey
Suertzz added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

If possible, please let us know how you configure the permission to access CCID device with 2.2 (and with 2.3)?

Jun 4 2021, 1:40 AM · gnupg (gpg23), yubikey
gniibe added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

If possible, please let us know how you configure the permission to access CCID device with 2.2 (and with 2.3)?

Jun 4 2021, 1:32 AM · gnupg (gpg23), yubikey

Jun 3 2021

Suertzz added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Please excuse my late reply. I was busy with other things over the last few weeks.

Yes, putting disable-ccid into ~/.gnupg/scdaemon.conf works for me with GnuPG 2.3.1 under macOS Catalina (10.15).

I still don't understand what the problem is/was, so I cannot judge whether it's better to recommend this manual configuration for Mac users or to disable CCID by default on macOS.

Jun 3 2021, 11:20 PM · MacOS, yubikey, Bug Report
KasparEtter added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Please excuse my late reply. I was busy with other things over the last few weeks.

Jun 3 2021, 9:58 AM · MacOS, yubikey, Bug Report

Jun 2 2021

werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from For 1.9 to Backlog on the libgcrypt board.
Jun 2 2021, 12:57 PM · MacOS, libgcrypt, Bug Report
werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from For 1.8 to For 1.9 on the libgcrypt board.
Jun 2 2021, 12:56 PM · MacOS, libgcrypt, Bug Report
werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from Backlog to For 1.8 on the libgcrypt board.
Jun 2 2021, 12:56 PM · MacOS, libgcrypt, Bug Report
gniibe added a comment to T5369: GnuPG build on Apple with Clang.

jitterentropy is also used in Linux kernel, and some people use clang to build it these days. So, I checked the kernel's one. It is simply compiled -O0 by Makefile, and there's no pragma line now (as of v5.13).

Jun 2 2021, 3:16 AM · libgcrypt, MacOS, Bug Report

Jun 1 2021

werner reopened T5369: GnuPG build on Apple with Clang as "Open".

I don't think that it is a good idea to silence this warning. The pragma is esssential for proper random numbers and if clang hijacks a GCC's name space but implements something different it is better to have a warning than to fall into the pit full of dragons.

Jun 1 2021, 8:40 AM · libgcrypt, MacOS, Bug Report
Alan added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

So, has this issue been solved?

Jun 1 2021, 8:40 AM · MacOS, yubikey, Bug Report
gniibe closed T5369: GnuPG build on Apple with Clang as Resolved.

That warning could be silenced by surrounding pragma with #ifdef __OPTIMIZE__ (with should be supported by GCC and Clang).

Jun 1 2021, 4:09 AM · libgcrypt, MacOS, Bug Report

May 28 2021

gniibe triaged T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations as High priority.
May 28 2021, 7:18 AM · gnupg24, yubikey, Bug Report
gniibe claimed T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Thanks. I push the fix of yours.

May 28 2021, 7:17 AM · gnupg24, yubikey, Bug Report
gniibe merged T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1) into T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 28 2021, 3:23 AM · gnupg24, yubikey, Bug Report
gniibe merged task T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1) into T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 28 2021, 3:23 AM · scd, gnupg (gpg23), MacOS, Bug Report

May 27 2021

gniibe changed the status of T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from Open to Testing.
May 27 2021, 6:41 AM · MacOS, libgcrypt, Bug Report
gniibe added a comment to T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L".

Done for all (libgcrypt (master, 1.9, and 1.8), libassuan, ntbtls, libksba, gpgme, gnupg (2.2 and 2.3).

May 27 2021, 6:40 AM · MacOS, libgcrypt, Bug Report

May 26 2021

werner added projects to T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1): MacOS, gnupg (gpg23), scd.
May 26 2021, 5:48 PM · scd, gnupg (gpg23), MacOS, Bug Report

May 25 2021

lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@werner @ikloecker Any more thoughts / updates on this?

May 25 2021, 11:40 AM · gnupg24, yubikey, Bug Report

May 21 2021

gniibe claimed T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L".

Thank you for your report.

May 21 2021, 7:04 AM · MacOS, libgcrypt, Bug Report

May 19 2021

werner added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Please read also the report T5442 which is basically the same.

May 19 2021, 9:25 PM · MacOS, yubikey, Bug Report
werner added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

Thanks for the well written report. We had another already, and thus I merged it into T5415.

May 19 2021, 9:24 PM · gnupg (gpg23), yubikey
werner merged T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1) into T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.
May 19 2021, 9:23 PM · MacOS, yubikey, Bug Report
werner merged task T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1) into T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.
May 19 2021, 9:23 PM · gnupg (gpg23), yubikey
Suertzz created T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).
May 19 2021, 9:04 PM · gnupg (gpg23), yubikey

May 18 2021

werner added a project to T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L": MacOS.
May 18 2021, 8:23 AM · MacOS, libgcrypt, Bug Report

May 17 2021

znull added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

It's not clear whether you are talking about PIN caching related to signing operations or decryption operations.

May 17 2021, 10:27 PM · gnupg24, yubikey, Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Just got around to testing this on Linux, and I can confirm the same behavior: decryption PIN caching works on 2.2 and doesn't work on 2.3.

May 17 2021, 1:51 PM · gnupg24, yubikey, Bug Report
lbogdan renamed T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations from gpg-agent 2.3.1: PIN caching not working to gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 17 2021, 11:21 AM · gnupg24, yubikey, Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@znull You can also fix the detection issue by building with ./configure --disable-ccid-driver, in which case you won't need the disable-ccid setting anymore.

May 17 2021, 10:10 AM · gnupg24, yubikey, Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@ikloecker Sorry for not being clear, I was not aware different operations have different behaviors in regard to entering / caching the PIN.

May 17 2021, 9:59 AM · gnupg24, yubikey, Bug Report
ikloecker added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

It's not clear whether you are talking about PIN caching related to signing operations or decryption operations.

May 17 2021, 9:22 AM · gnupg24, yubikey, Bug Report

May 15 2021

znull added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

I just wanted to chime in that I've had exactly the same experience as @lbogdan: gnupg 2.3 stopped recognizing my yubikey entirely on MacOS until the T5415 workaround (disable-ccid). After that, pin caching was broken until I applied his patch to call-scd.c:548, which makes it work as before. Without these two changes the experience with gnupg 2.3 is degraded relative to 2.2.

May 15 2021, 8:17 PM · gnupg24, yubikey, Bug Report

May 14 2021

lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

So I did a bit more reading on smartcard PIN caching, and took a better look at the debug logging of gnupg 2.2, and learned that, indeed, the PIN is cached by the card and not by any one gnupg component.

May 14 2021, 6:44 PM · gnupg24, yubikey, Bug Report

May 12 2021

lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Yes, I already linked to T5415, but that breaks YubiKey completely, and I fixed it with disable-ccid.

May 12 2021, 6:08 PM · gnupg24, yubikey, Bug Report
werner edited projects for T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations, added: gnupg (gpg23), MacOS; removed gpgagent.

The pincache is actually not what you think it is. It is only used to allow switching between different application on a Yubikey which reqieres a new VERIFY command after switching back to the first application the card. What you feel as caching is the state of the card, which usually keeps its verification state until the card is powered down.

May 12 2021, 5:52 PM · gnupg24, yubikey, Bug Report

May 10 2021

werner reopened T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7 as "Open".

(I disabled this boor and restored the state)

May 10 2021, 6:41 PM · MacOS, yubikey, Bug Report
gillcovid19 closed T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7 as Resolved.
May 10 2021, 12:41 PM · MacOS, yubikey, Bug Report

May 6 2021

brianacton added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

I am also a MacOS Big Sur user who recently upgraded to 2.3.1 and had problems after upgrading. In my use case, I use the yubikey as the authentication for pass password manager which uses gpg under the hood.

May 6 2021, 10:15 PM · MacOS, Support, scd
werner added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

That would required that we also add an option --enable-ccid-driver - better tell the macOS folks to put diable-ccid-driver into /etc/gnupg/scdaemon.conf

May 6 2021, 9:06 AM · MacOS, yubikey, Bug Report
gniibe added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Or... we could add --disable-ccid-driver as default for macOS.

May 6 2021, 3:56 AM · MacOS, yubikey, Bug Report
gniibe claimed T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.
May 6 2021, 3:55 AM · MacOS, yubikey, Bug Report
gniibe added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

If it is built with LIBUSB enabled, please try adding the following to your scdaemon.conf:

disable-ccid
May 6 2021, 3:54 AM · MacOS, yubikey, Bug Report

May 3 2021

colemickens added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

I'm referring to this: https://www.gnupg.org/howtos/card-howto/en/ch02s03.html

May 3 2021, 6:56 AM · MacOS, Support, scd
gniibe added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

@colemickens We don't maintain any ccid udev rules in GnuPG. What do you refer?

May 3 2021, 6:29 AM · MacOS, Support, scd

Apr 30 2021

KasparEtter added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Also let me know if there are any daemons I have to kill/restart when switching between GnuPG versions by changing the $PATH. Whenever I have problems with my YubiKey, I run gpgconf --kill gpg-agent, which I also executed when I switched from version 2.2.27 back to 2.3.1 but I have no idea whether this is required or sufficient.

Apr 30 2021, 11:03 AM · MacOS, yubikey, Bug Report
KasparEtter added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.
$ gpg --version
gpg (GnuPG) 2.3.1
libgcrypt 1.9.3
$ gpg --debug ipc --card-status
gpg: reading options from '/Users/user/.gnupg/gpg.conf'
gpg: reading options from '[cmdline]'
gpg: enabled debug flags: ipc
gpg: DBG: chan_3 <- OK Pleased to meet you, process 15218
gpg: DBG: connection to the gpg-agent established
gpg: DBG: chan_3 -> RESET
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION ttyname=/dev/ttys007
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION ttytype=xterm-256color
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION lc-ctype=en_US.UTF-8
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION lc-messages=en_US.UTF-8
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.3.1
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION allow-pinentry-notify
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION agent-awareness=2.1.0
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> SCD GETINFO version
gpg: DBG: chan_3 <- D 2.3.1
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> SCD SERIALNO
gpg: DBG: chan_3 <- ERR 100696144 Operation not supported by device <SCD>
gpg: selecting card failed: Operation not supported by device
gpg: OpenPGP card not available: Operation not supported by device
gpg: secmem usage: 0/32768 bytes in 0 blocks
Apr 30 2021, 10:58 AM · MacOS, yubikey, Bug Report
werner added a project to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7: MacOS.

Run gpg --debug ipc --card-status to quickly see the communication with the scdaemon.

Apr 30 2021, 10:47 AM · MacOS, yubikey, Bug Report

Apr 28 2021

colemickens added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

@gniibe can you provide any commentary on why the gnupg ccid udev rule is so much smaller than the one debian maintains? Is the debian one considered authoritative these days?

Apr 28 2021, 11:23 PM · MacOS, Support, scd
colemickens added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

Thanks @gniibe, that's very helpful advice and pointers. Very appreciated, cheers.

Apr 28 2021, 5:03 AM · MacOS, Support, scd
gniibe added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

Perhaps, if a distro haven't offered setting of USB, it would be better to configure GnuPG build with --disable-ccid-driver and only support scdaemon with PC/SC. GPG for Windows does so.

Apr 28 2021, 4:05 AM · MacOS, Support, scd
gniibe added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.
  1. It's a breaking change for system with both of PC/SC and CCID. T4673 due to T3300
    • If you configure with no libusb, users don't need 'disable-ccid' option.
  2. I don't know how "wide".
  3. In Debian, it is maintained here: https://salsa.debian.org/debian/gnupg2/-/blob/debian/main/debian/scdaemon.udev
  4. Yes.
Apr 28 2021, 3:59 AM · MacOS, Support, scd

Apr 26 2021

colemickens added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

Hi, as a contributor to NixOS I'd also like some guidance. I'm testing the 2.3 upgrade ahead of 2.4, and it "breaks" Yubikey UX that I know many of us use. This might be because we appear to not yet install gnupg's CCID udev rules installed. A few questions:

Apr 26 2021, 11:12 PM · MacOS, Support, scd

Apr 25 2021

cristianrivera added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

Thank you for the suggestion of disable-ccid that seems to have solved the problem.

Apr 25 2021, 9:08 PM · MacOS, Support, scd

Apr 23 2021

FrederickZh added a comment to T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1.

I can confirm disable-ccid works, thank you!

Apr 23 2021, 9:25 AM · MacOS, Support, scd
werner closed T5409: scdaemon: 'Operation not supported by device' error under macOS after upgrading to 2.3.1 as Resolved.

Please have a look at the log:

Apr 23 2021, 9:08 AM · MacOS, Support, scd

Apr 20 2021

gniibe added a comment to T4900: OS X 10.12 and dyld: Library not loaded: /usr/local/lib/libgcrypt.20.dylib.

IIUC, with libgcrypt in LIBGCRYPT-1.8-BRANCH (not yet released) and libgcrypt 1.9.3, the build process works well (the problem with SIP has been handled).

Apr 20 2021, 2:27 AM · MacOS, libgcrypt, Bug Report
gniibe closed T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt as Resolved.
Apr 20 2021, 2:12 AM · MacOS, libgcrypt

Apr 19 2021

werner moved T5268: macOS getentropy from For 1.9 to Backlog on the libgcrypt board.
Apr 19 2021, 6:12 PM · libgcrypt, MacOS

Apr 15 2021

xandox added a comment to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.

Ok, thank you. I think task can be closed.

Apr 15 2021, 5:14 PM · MacOS, Bug Report
gniibe closed T5380: Tools needed during a build lack of CFLAGS was passed durring configure time as Resolved.

mkheader has CFLAGS_FOR_BUILD since libassuan 2.5.4.
gost-s-box has so since libgcrypt 1.9.0.

Apr 15 2021, 8:41 AM · MacOS, Bug Report

Apr 13 2021

xandox added a comment to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.

Ok.
But`CFLAGS_FOR_BUILD` not mentioned in build rule for mkheader

Apr 13 2021, 1:15 PM · MacOS, Bug Report
saurik added a comment to T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt.

I'm sorry I disappeared on this issue for two weeks; I just got reminded of it by seeing the e-mail with the status change. I've updated to the latest gcrypt (which is the commit with the patch, now pushed to the repository) and was able to upload this to Apple without it being flagged; thanks!

Apr 13 2021, 4:49 AM · MacOS, libgcrypt
gniibe changed the status of T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt from Open to Testing.
Apr 13 2021, 3:16 AM · MacOS, libgcrypt

Apr 12 2021

gniibe claimed T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.
Apr 12 2021, 7:51 AM · MacOS, Bug Report
gniibe changed the status of T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection from Open to Testing.
Apr 12 2021, 6:13 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt

Apr 8 2021

gniibe added a comment to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.

CC_FOR_BUILD is used for building executables for the build machine.
CC_FOR_BUILD may be different to CC (for target).

Apr 8 2021, 6:09 AM · MacOS, Bug Report

Apr 7 2021

xandox added a comment to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.

Referencing external patches is not sufficient

Apr 7 2021, 1:06 PM · MacOS, Bug Report
xandox added a comment to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time.

What is vcpkg?

Apr 7 2021, 1:03 PM · MacOS, Bug Report
werner added a project to T5380: Tools needed during a build lack of CFLAGS was passed durring configure time: MacOS.

Sorry, I can't parse your message. Please describe the problem or feature requests. Referencing external patches is not sufficient. What is vcpkg?

Apr 7 2021, 12:23 PM · MacOS, Bug Report

Apr 6 2021

jukivili added a comment to T5369: GnuPG build on Apple with Clang.

Note that rndjent.c is already build with -O0 as can be seen in example above. That warning could be silenced by surrounding pragma with #ifdef __OPTIMIZE__ (with should be supported by GCC and Clang).

Apr 6 2021, 10:20 PM · libgcrypt, MacOS, Bug Report
werner triaged T5369: GnuPG build on Apple with Clang as Low priority.
Apr 6 2021, 12:10 PM · libgcrypt, MacOS, Bug Report

Apr 1 2021

werner added a project to T5370: Apple M1 and Symbol not found: __gcry_mpih_mul_1: arm.
Apr 1 2021, 11:07 AM · arm, MacOS, gnupg, Bug Report
werner triaged T5370: Apple M1 and Symbol not found: __gcry_mpih_mul_1 as Normal priority.
Apr 1 2021, 11:02 AM · arm, MacOS, gnupg, Bug Report
gniibe triaged T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt as Normal priority.
Apr 1 2021, 6:39 AM · MacOS, libgcrypt
gniibe added a comment to T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt.

IIUC... Could you please try this patch?

diff --git a/random/rndlinux.c b/random/rndlinux.c
index a7a78906..c20c5d4c 100644
--- a/random/rndlinux.c
+++ b/random/rndlinux.c
@@ -35,10 +35,13 @@
 #if defined(__APPLE__) && defined(__MACH__)
 #include <Availability.h>
 #ifdef __MAC_10_11
+#include <TargetConditionals.h>
+#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
 extern int getentropy (void *buf, size_t buflen) __attribute__ ((weak_import));
 #define HAVE_GETENTROPY
 #endif
 #endif
+#endif
 #if defined(__linux__) || !defined(HAVE_GETENTROPY)
 #ifdef HAVE_SYSCALL
 # include <sys/syscall.h>
Apr 1 2021, 6:36 AM · MacOS, libgcrypt
gniibe claimed T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt.
Apr 1 2021, 5:58 AM · MacOS, libgcrypt
gniibe closed T5289: gen-lock-obj.sh uses echo -n from /bin/sh, which echos "-n" as Resolved.

Fixed in 1.42.

Apr 1 2021, 5:58 AM · MacOS, gpgrt, Bug Report

Mar 31 2021

gniibe added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

I was wrong in my last comment. Escaping by another \ is needed.

Mar 31 2021, 4:09 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt

Mar 30 2021

werner added a project to T5375: getentropy usage is forbidden by Apple, but is now being forced by libgcrypt: MacOS.
Mar 30 2021, 5:44 PM · MacOS, libgcrypt
werner added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

A PATH with spaces is too Windowish (or macOS). IIRC, we had once checks that the used directories have proper names; we can expect this for build environment. Spaces in file names are horrible from a security POV it is just to easy to get things wrong (hello ssh).

Mar 30 2021, 5:15 PM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5268: macOS getentropy.

So, I actually just filed an issue about this work: T5375, and then found this opposing task while following through on the various commits ;P... Apple actually forbids usage of getentropy in applications they publish to their App Store (citing ITMS-90338: Non-public API usage), and so there needs to be a way to disable this weak_import. FWIW, I'm not sure if this is only on iOS or on macOS as well (I haven't gotten around to trying to publish a macOS build with the new libgcrypt yet).

Mar 30 2021, 12:34 PM · libgcrypt, MacOS
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

@gniibe Note that you also need to at least add the semicolons, as BSD sed is trying to parse "gp}" as substitution flags (which, honestly, makes more forward-compatible sense than GNU sed's behavior...).

Mar 30 2021, 10:35 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

Or, if we keep the code of newline (so that it will eventually support path with a space in future):

Mar 30 2021, 9:55 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

Thank you. Sorry for the use of GNU sed extension. It could be just a whitespace, if it's OK not to support path having a space.
sed -n -e "/^libraries/{s/libraries: =//;s/:/ /gp}") should work.

Mar 30 2021, 9:42 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

@gniibe OK, so... "worst case": I guess this worked? ;P

Mar 30 2021, 8:23 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

@gniibe Actually, I just realized that neither of the commands I provided work, as I failed to notice you were trying to also replace :'s with newlines (as I guess libraries from clang can return multiple paths). I'd momentarily edited my comment to just try to add back your colon replacement, before remembering you can't do that either: \n is a GNU sed extension. Hilariously, I'm always in contexts where I can assume I'm using bash (which isn't ok for configure), so I've never bothered to learn a technique that doesn't involve $'\n'... do you have a strategy for doing this replacement? :(

Mar 30 2021, 8:19 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik updated the task description for T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.
Mar 30 2021, 8:14 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

@gniibe Ah yeah, that was the commit I meant to reference when I said "--maybe caused by --", but then forgot to go back and fill in the commit hash ;P.

Mar 30 2021, 8:10 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

I wonder if this works in your use case:

diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4
index d910754e..aeedaf10 100644
--- a/m4/gpg-error.m4
+++ b/m4/gpg-error.m4
@@ -65,7 +65,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   min_gpg_error_version=ifelse([$1], ,1.33,$1)
   ok=no
Mar 30 2021, 7:36 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

If it is new, it may be the change of this commit rC8e3cd4c4677c: build: Update gpg-error.m4.

Mar 30 2021, 7:22 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

(To be clear, I also know enough about autoconf to not have been like, blocked from upgrading by this: overriding ac_cv_path_GPGRT_CONFIG worked, but I can't believe that's the intended way for someone to ensure they get the correct path for gpgrt-config ;P.)

Mar 30 2021, 6:53 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
saurik added a comment to T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection.

@gniibe The problem is that the check seems to just find gpgrt-config from the path; like, I'm already passing --prefix and --host, but it is deciding to just arbitrarily pick up my system-wide copy of /usr/local/bin/gpgrt-config. Here's my entire configure invocation from that earlier failed build: note that the --prefix is the same as --with-gpg-error-prefix.

Mar 30 2021, 6:43 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe triaged T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection as Normal priority.

We are in transition from old gpg-error-config to new gpgrt-config. <-- This is the cause, while I tried to cover most use cases.

Mar 30 2021, 4:19 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt

Mar 29 2021

JW added a comment to T5159: make check fails for libgcrypt on Apple Silicon / ARM Mac.

Sorry to dig up an old report...

Mar 29 2021, 2:23 AM · Restricted Project, MacOS, libgcrypt, Bug Report
JW added a comment to T5157: libgcrypt: ARM64 Builds on macOS fail.

Sorry to dig up an old thread...

Mar 29 2021, 2:11 AM · toolchain, MacOS, libgcrypt, Bug Report