Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (1322dbfc408b690678b1deb944eb935e5340d17c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (1322dbfc408b690678b1deb944eb935e5340d17c)
  • Date: Wed, 24 Jul 2024 18:12:12 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

crypto/openct/DETAILS | 6
crypto/openct/HISTORY | 5
crypto/openct/PRE_BUILD | 4
crypto/openct/patches/0001-Fix-usage-of-poll.h-header.patch | 296
++++++++++++
crypto/openct/patches/0002-Fix-type-mismatches.patch | 64 ++
5 files changed, 371 insertions(+), 4 deletions(-)

New commits:
commit 1322dbfc408b690678b1deb944eb935e5340d17c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

openct: Fix build on recent systems

commit 4e2714a5f6d152607cfd7ff65b8415cdbb4bd3d7
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

openct: Download from sourceforge (the website is gone)

commit 3a91d02bae3d5342a1d2b594137649df6b58c33c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

openct: Add Watch line

diff --git a/crypto/openct/DETAILS b/crypto/openct/DETAILS
index 17c4f45..025c7b3 100755
--- a/crypto/openct/DETAILS
+++ b/crypto/openct/DETAILS
@@ -1,12 +1,10 @@
+# Watch: https://github.com/OpenSC/openct/tags /openct-([0-9.]+)\.tar
SPELL=openct
VERSION=0.6.20
SOURCE=${SPELL}-${VERSION}.tar.gz
SOURCE_DIRECTORY=${BUILD_DIRECTORY}/${SPELL}-${VERSION}
- SOURCE_URL[0]=http://www.opensc-project.org/files/${SPELL}/${SOURCE}
-
+ SOURCE_URL[0]=https://downloads.sourceforge.net/opensc/openct/$SOURCE

SOURCE_HASH=sha512:5175b418847200dbd4af0d8ab09546d94568639c67db67bdea93c68cb042c7ef901bb356784d6b1d9f4de914535eee5a450b39a15d1ab9a676ffce790a408a3e
-# SOURCE_GPG="gurus.gpg:${SOURCE}.sig"
-
LICENSE[0]=BSD
WEB_SITE=http://www.opensc-project.org
ENTERED=20050426
diff --git a/crypto/openct/HISTORY b/crypto/openct/HISTORY
index 52a2b9a..4b88fad 100644
--- a/crypto/openct/HISTORY
+++ b/crypto/openct/HISTORY
@@ -1,3 +1,8 @@
+2024-07-24 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: Fixed SOURCE_URL[0]
+ * PRE_BUILD, patches/0001-Fix-usage-of-poll.h-header.patch,
+ patches/0002-Fix-type-mismatches.patch: fixed build on recent
systems
+
2012-05-09 Treeve Jelbert <treeve AT sourcemage.org>
* DEPENDS: libusb => LIBUSB

diff --git a/crypto/openct/PRE_BUILD b/crypto/openct/PRE_BUILD
new file mode 100755
index 0000000..49ddb90
--- /dev/null
+++ b/crypto/openct/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
+sedit 's!maybe_os in$!& linux-musl*|\\!' config.sub
diff --git a/crypto/openct/patches/0001-Fix-usage-of-poll.h-header.patch
b/crypto/openct/patches/0001-Fix-usage-of-poll.h-header.patch
new file mode 100644
index 0000000..3d0a750
--- /dev/null
+++ b/crypto/openct/patches/0001-Fix-usage-of-poll.h-header.patch
@@ -0,0 +1,296 @@
+From fa512303c7795667dbb28a87bdd7c225a2de341e Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Wed, 24 Jul 2024 19:44:08 +0200
+Subject: [PATCH 1/2] Fix usage of poll.h header
+
+Change the legacy <sys/poll.h> to <poll.h> (POSIX.1-2001).
+
+Upstream-Status: Pending
+Origin: Source Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/ct/mainloop.c | 2 +-
+ src/ct/socket.c | 2 +-
+ src/ifd/ifd-kaan.c | 2 +-
+ src/ifd/ifd-smph.c | 2 +-
+ src/ifd/ifdhandler.c | 2 +-
+ src/ifd/ifdproxy.c | 2 +-
+ src/ifd/pcmcia-block.c | 2 +-
+ src/ifd/pcmcia.c | 2 +-
+ src/ifd/proto-gbp.c | 2 +-
+ src/ifd/proto-sync.c | 2 +-
+ src/ifd/proto-t0.c | 2 +-
+ src/ifd/proto-t1.c | 2 +-
+ src/ifd/ria-device.c | 2 +-
+ src/ifd/ria-server.c | 2 +-
+ src/ifd/serial.c | 2 +-
+ src/ifd/sys-bsd.c | 2 +-
+ src/ifd/sys-linux.c | 2 +-
+ src/ifd/sys-sunray.c | 2 +-
+ src/ifd/usb.c | 2 +-
+ src/include/openct/server.h | 2 +-
+ 20 files changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/src/ct/mainloop.c b/src/ct/mainloop.c
+index 533fc74f120b..6cfffb19bd83 100644
+--- a/src/ct/mainloop.c
++++ b/src/ct/mainloop.c
+@@ -9,7 +9,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/ct/socket.c b/src/ct/socket.c
+index ff0f410a3764..c9fdddac80f2 100644
+--- a/src/ct/socket.c
++++ b/src/ct/socket.c
+@@ -11,7 +11,7 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <unistd.h>
+ #include <errno.h>
+diff --git a/src/ifd/ifd-kaan.c b/src/ifd/ifd-kaan.c
+index 08a2e3709603..92c2b941c303 100644
+--- a/src/ifd/ifd-kaan.c
++++ b/src/ifd/ifd-kaan.c
+@@ -6,7 +6,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <time.h>
+diff --git a/src/ifd/ifd-smph.c b/src/ifd/ifd-smph.c
+index 4d99cecbc59d..03eba8463a72 100644
+--- a/src/ifd/ifd-smph.c
++++ b/src/ifd/ifd-smph.c
+@@ -16,7 +16,7 @@
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+ #include <termios.h>
+-#include <sys/poll.h>
++#include <poll.h>
+
+ #define PHS_CONV_DIRECT 0
+ #define PHS_CONV_INDIRECT 1
+diff --git a/src/ifd/ifdhandler.c b/src/ifd/ifdhandler.c
+index 12686c95f880..d2f705953ef1 100644
+--- a/src/ifd/ifdhandler.c
++++ b/src/ifd/ifdhandler.c
+@@ -7,7 +7,7 @@
+ #include "internal.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+ #endif
+diff --git a/src/ifd/ifdproxy.c b/src/ifd/ifdproxy.c
+index b84f54f43e12..e1156d04588a 100644
+--- a/src/ifd/ifdproxy.c
++++ b/src/ifd/ifdproxy.c
+@@ -10,7 +10,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #ifdef HAVE_GETOPT_H
+diff --git a/src/ifd/pcmcia-block.c b/src/ifd/pcmcia-block.c
+index 3c8715d8170a..a6afccb8cad1 100644
+--- a/src/ifd/pcmcia-block.c
++++ b/src/ifd/pcmcia-block.c
+@@ -8,7 +8,7 @@
+ #include "internal.h"
+ #include <sys/types.h>
+ #include <sys/select.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <errno.h>
+diff --git a/src/ifd/pcmcia.c b/src/ifd/pcmcia.c
+index b271d947fcb6..0590bc8cb905 100644
+--- a/src/ifd/pcmcia.c
++++ b/src/ifd/pcmcia.c
+@@ -8,7 +8,7 @@
+ #include "internal.h"
+ #include <sys/types.h>
+ #include <sys/select.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <errno.h>
+diff --git a/src/ifd/proto-gbp.c b/src/ifd/proto-gbp.c
+index 8de0554cbe5f..9581090aa31a 100644
+--- a/src/ifd/proto-gbp.c
++++ b/src/ifd/proto-gbp.c
+@@ -11,7 +11,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/ifd/proto-sync.c b/src/ifd/proto-sync.c
+index 37a74fb2ac69..c50920c32b7a 100644
+--- a/src/ifd/proto-sync.c
++++ b/src/ifd/proto-sync.c
+@@ -5,7 +5,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/ifd/proto-t0.c b/src/ifd/proto-t0.c
+index f5017297c4a4..8a51834f17e4 100644
+--- a/src/ifd/proto-t0.c
++++ b/src/ifd/proto-t0.c
+@@ -5,7 +5,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/ifd/proto-t1.c b/src/ifd/proto-t1.c
+index 886f03b8ec4f..4e406e140677 100644
+--- a/src/ifd/proto-t1.c
++++ b/src/ifd/proto-t1.c
+@@ -8,7 +8,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/ifd/ria-device.c b/src/ifd/ria-device.c
+index 46b14229be36..b2ed7e874030 100644
+--- a/src/ifd/ria-device.c
++++ b/src/ifd/ria-device.c
+@@ -10,7 +10,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+diff --git a/src/ifd/ria-server.c b/src/ifd/ria-server.c
+index a5a5f131574c..de2235868a5e 100644
+--- a/src/ifd/ria-server.c
++++ b/src/ifd/ria-server.c
+@@ -10,7 +10,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+diff --git a/src/ifd/serial.c b/src/ifd/serial.c
+index 985b815087bc..b1743fddef12 100644
+--- a/src/ifd/serial.c
++++ b/src/ifd/serial.c
+@@ -7,7 +7,7 @@
+ #include "internal.h"
+ #include <sys/types.h>
+ #include <sys/select.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+diff --git a/src/ifd/sys-bsd.c b/src/ifd/sys-bsd.c
+index 75355f8a6ef5..c8e6d2e66f19 100644
+--- a/src/ifd/sys-bsd.c
++++ b/src/ifd/sys-bsd.c
+@@ -22,7 +22,7 @@
+ #endif /* !ENABLE_LIBUSB */
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/file.h>
+ #include <string.h>
+ #include <stdio.h>
+diff --git a/src/ifd/sys-linux.c b/src/ifd/sys-linux.c
+index c8bdea2fa36c..7277f8ec5e5f 100644
+--- a/src/ifd/sys-linux.c
++++ b/src/ifd/sys-linux.c
+@@ -13,7 +13,7 @@
+ #include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+diff --git a/src/ifd/sys-sunray.c b/src/ifd/sys-sunray.c
+index 03b590c32fbe..890124fe3de6 100644
+--- a/src/ifd/sys-sunray.c
++++ b/src/ifd/sys-sunray.c
+@@ -13,7 +13,7 @@
+ #include <usb.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <signal.h>
+diff --git a/src/ifd/usb.c b/src/ifd/usb.c
+index 9977b51fbb40..360aebc40ea8 100644
+--- a/src/ifd/usb.c
++++ b/src/ifd/usb.c
+@@ -5,7 +5,7 @@
+ */
+
+ #include "internal.h"
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
+diff --git a/src/include/openct/server.h b/src/include/openct/server.h
+index be0a28dc75fb..2201a7d52739 100644
+--- a/src/include/openct/server.h
++++ b/src/include/openct/server.h
+@@ -11,7 +11,7 @@
+ extern "C" {
+ #endif
+
+-#include <sys/poll.h>
++#include <poll.h>
+
+ extern void ct_mainloop_add_socket(ct_socket_t *);
+ extern void ct_mainloop(void);
+--
+2.44.0
+
diff --git a/crypto/openct/patches/0002-Fix-type-mismatches.patch
b/crypto/openct/patches/0002-Fix-type-mismatches.patch
new file mode 100644
index 0000000..887a4ac
--- /dev/null
+++ b/crypto/openct/patches/0002-Fix-type-mismatches.patch
@@ -0,0 +1,64 @@
+From a60acb970b6b10d60135bb89fe67e87f192c9e2a Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Wed, 24 Jul 2024 19:56:01 +0200
+Subject: [PATCH 2/2] Fix type mismatches
+
+ifdhandler.c: In function 'ifdhandler_run':
+ifdhandler.c:239:52: error: passing argument 2 of 'ifd_get_eventfd' from
incompatible pointer type [-Wincompatible-pointer-types]
+ 239 | sock->fd = ifd_get_eventfd(reader, &sock->events);
+ | ^~~~~~~~~~~~~
+ | |
+ | int *
+In file included from internal.h:17,
+ from ifdhandler.c:7:
+../../src/include/openct/ifd.h:182:65: note: expected 'short int *' but
argument is of type 'int *'
+ 182 | extern int ifd_get_eventfd(ifd_reader_t *,
short *);
+ |
^~~~~~~
+process.c: In function 'do_memory_write':
+process.c:461:61: error: passing argument 4 of 'ct_tlv_get_opaque' from
incompatible pointer type [-Wincompatible-pointer-types]
+ 461 | || !ct_tlv_get_opaque(args, CT_TAG_DATA, &data,
&data_len))
+ | ^~~~~~~~~
+ | |
+ | unsigned
int *
+In file included from process.c:20:
+../../src/include/openct/tlv.h:40:62: note: expected 'size_t *' {aka 'long
unsigned int *'} but argument is of type 'unsigned int *'
+ 40 | ifd_tag_t, unsigned char **, size_t
*);
+ | ^~~~~~~~
+
+Upstream-Status: Pending
+Origin: Source Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/ifd/process.c | 2 +-
+ src/include/openct/socket.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ifd/process.c b/src/ifd/process.c
+index 4563bdf8cfe0..fe967dfb44e6 100644
+--- a/src/ifd/process.c
++++ b/src/ifd/process.c
+@@ -450,7 +450,7 @@ static int do_memory_write(ifd_reader_t * reader, int
unit,
+ ct_tlv_parser_t * args, ct_tlv_builder_t * resp)
+ {
+ unsigned char *data;
+- unsigned int data_len;
++ size_t data_len;
+ unsigned int address;
+ int rc;
+
+diff --git a/src/include/openct/socket.h b/src/include/openct/socket.h
+index b1064e9206db..a3d3c7f05118 100644
+--- a/src/include/openct/socket.h
++++ b/src/include/openct/socket.h
+@@ -37,7 +37,7 @@ typedef struct ct_socket {
+ listener : 1;
+
+ /* events to poll for */
+- int events;
++ short events;
+
+ void * user_data;
+ int (*poll)(struct ct_socket *, struct pollfd *);
+--
+2.44.0
+


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (1322dbfc408b690678b1deb944eb935e5340d17c), Ismael Luceno, 07/24/2024

Archive powered by MHonArc 2.6.24.

Top of Page