From mas at scsy.de Tue Jun 3 11:00:17 2025 From: mas at scsy.de (Martin Schmitt) Date: Tue, 03 Jun 2025 12:00:17 +0200 Subject: [pkg-opensc-maint] Bug#1107224: Incorrect invocation of /usr/bin/pkcs11-register in /etc/xdg/autostart/pkcs11-register.desktop Message-ID: <0becc050358ca5d155040efe1d2e71b0@scsy.de> Package: opensc Version: 0.26.1-1 Severity: normal Tags: upstream I see this in upstream OpenSC master branch as well, so I'm reporting in parallel. $ cat /etc/xdg/autostart/pkcs11-register.desktop [Desktop Entry] Name=Install OpenSC PKCS#11 module Type=Application Exec=/usr/bin/pkcs11-register --skip-chrome=off --skip-firefox=off Categories=Security;System; X-GNOME-AutoRestart=true X-GNOME-Autostart-Phase=Initialization NoDisplay=true $ /usr/bin/pkcs11-register --skip-chrome=off --skip-firefox=off /usr/bin/pkcs11-register: option '--skip-chrome' doesn't allow an argument $ echo $? 1 $ /usr/bin/pkcs11-register --skip-chrome off --skip-firefox off $ echo $? 0 -- System Information: Debian Release: 13.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.12.27-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages opensc depends on: ii libc6 2.41-8 ii libeac3 1.1.2+ds+git20220117+453c3d6b03a0-1.1+b3 ii libreadline8t64 8.2-6 ii libssl3t64 3.5.0-1 ii opensc-pkcs11 0.26.1-1 ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1 Versions of packages opensc recommends: ii pcscd 2.3.3-1 opensc suggests no packages. -- no debconf information From mas at scsy.de Fri Jun 6 09:08:52 2025 From: mas at scsy.de (Martin Schmitt) Date: Fri, 06 Jun 2025 10:08:52 +0200 Subject: [pkg-opensc-maint] Bug#1107224: (no subject) References: <0becc050358ca5d155040efe1d2e71b0@scsy.de> Message-ID: <5495efb9d9f93a0586c73a448aafc1d1@scsy.de> Link to related upstream issue: https://github.com/OpenSC/OpenSC/issues/3433 Upstream silently fixed the bug, not from the invocation end, but from the end of the tool being invoked, in this commit 2 weeks ago, without tagging a release yet: https://github.com/OpenSC/OpenSC/pull/3426/commits/a2af26974bd33f1556b109f27932f02780b934df For our corporate users, we've been packaging a wrapper around /usr/bin/pkcs11-register for a while already, which I've extended to just attempt both invocation flavors, whichever works. Note this is an obscure but severe issue for smartcard NSS integration. From owner at bugs.debian.org Fri Jun 6 11:05:03 2025 From: owner at bugs.debian.org (Debian Bug Tracking System) Date: Fri, 06 Jun 2025 10:05:03 +0000 Subject: [pkg-opensc-maint] Processed: severity References: Message-ID: Processing commands for control at bugs.debian.org: > severity 1107224 important Bug #1107224 [opensc] Incorrect invocation of /usr/bin/pkcs11-register in /etc/xdg/autostart/pkcs11-register.desktop Severity set to 'important' from 'normal' > End of message, stopping processing here. Please contact me if you need assistance. -- 1107224: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1107224 Debian Bug Tracking System Contact owner at bugs.debian.org with problems From ftpmaster at ftp-master.debian.org Fri Jun 6 11:21:52 2025 From: ftpmaster at ftp-master.debian.org (Debian FTP Masters) Date: Fri, 06 Jun 2025 10:21:52 +0000 Subject: [pkg-opensc-maint] Processing of opensc_0.26.1-2_source.changes Message-ID: opensc_0.26.1-2_source.changes uploaded successfully to localhost along with the files: opensc_0.26.1-2.dsc opensc_0.26.1-2.debian.tar.xz opensc_0.26.1-2_source.buildinfo Greetings, Your Debian queue daemon (running on host usper.debian.org) From ftpmaster at ftp-master.debian.org Fri Jun 6 11:34:39 2025 From: ftpmaster at ftp-master.debian.org (Debian FTP Masters) Date: Fri, 06 Jun 2025 10:34:39 +0000 Subject: [pkg-opensc-maint] opensc_0.26.1-2_source.changes ACCEPTED into unstable Message-ID: Thank you for your contribution to Debian. Accepted: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Fri, 06 Jun 2025 12:10:29 +0200 Source: opensc Architecture: source Version: 0.26.1-2 Distribution: unstable Urgency: medium Maintainer: Debian OpenSC Maintainers Changed-By: Bastian Germann Closes: 1107224 Changes: opensc (0.26.1-2) unstable; urgency=medium . * Team upload * pkcs11-register: allow explicitly specifying an app to configure (Closes: #1107224) Checksums-Sha1: 112b2d81bb6ebe259eba3cb53262923460587348 2012 opensc_0.26.1-2.dsc 11151f418cc290bb73d9f6316c52b65c720596e8 18124 opensc_0.26.1-2.debian.tar.xz 2bac0ee3699a0cbc3f7f525894a18e2bf1157422 5591 opensc_0.26.1-2_source.buildinfo Checksums-Sha256: 9ae7ae95d49c45779d91e39214ad12f1b848baeb7a449cc55d67a576c564eb13 2012 opensc_0.26.1-2.dsc c5573306a17a76b9c82055043a1b35a84b73881cacbe80c3153df05f34e97617 18124 opensc_0.26.1-2.debian.tar.xz 3e36302b1376d87758146faf4cc32c8053d6dfac1520cab4739ee75dc713894b 5591 opensc_0.26.1-2_source.buildinfo Files: a35f4c9974dc9680c1b88438cedca84e 2012 utils optional opensc_0.26.1-2.dsc 4ba368c88d2461f62b39bd66700f51e5 18124 utils optional opensc_0.26.1-2.debian.tar.xz ed3279eb1538db5052c577c7973845d5 5591 utils optional opensc_0.26.1-2_source.buildinfo -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmhCvtoQHGJhZ2VAZGVi aWFuLm9yZwAKCRAfXHqLRVZDFC07DACv6pFEDDMxWLkSNRRBFqey9OL94ajqeaBB vAfcUe3WOQy/ip8eK5NHN0fBXW12hwmy4Kg0UR0iTzAKLCGlaiwbh9EOV0NMTAdi 7DROobDgHJJJ8P2A80NStYVbXXpvVaiG1gif20Ij64T/BT+7OdxQLNN3ztR4X1rd Pl38nC4og7yhTbhcTBTheDlFEi1Aj8XBBXhVRnevWxHI/FeMPDeHm07nTj7x0vRO 28OPQ+8OQTBfH5nQKLwwvX037Oqa33eji89VWXBQ45Lqp9cfo/L4Rvo8pvNK/OQi +10zn8rdmQLjxuOlmwqEBOvLb0LBfXS6R9784Bmb4obaRTzoNWNJ6OJQesfH54f3 9gqhuy5SMKDu4245LxlJ309xbSn6VGIGwsOwqR2GTBdeBYiZnNz1kk1pbjKRPMa2 QJTAHaLaZ/f6ADiMPhrpQP58G4Li5HWSn9KDppG+w5dRB68wupUqpn3EyP75ZeoO 9e854agHtrPrrxROtSzd81aQfBa3E0A= =CbkF -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available URL: From owner at bugs.debian.org Fri Jun 6 11:37:02 2025 From: owner at bugs.debian.org (Debian Bug Tracking System) Date: Fri, 06 Jun 2025 10:37:02 +0000 Subject: [pkg-opensc-maint] Bug#1107224: marked as done (Incorrect invocation of /usr/bin/pkcs11-register in /etc/xdg/autostart/pkcs11-register.desktop) References: <0becc050358ca5d155040efe1d2e71b0@scsy.de> Message-ID: Your message dated Fri, 06 Jun 2025 10:34:39 +0000 with message-id and subject line Bug#1107224: fixed in opensc 0.26.1-2 has caused the Debian Bug report #1107224, regarding Incorrect invocation of /usr/bin/pkcs11-register in /etc/xdg/autostart/pkcs11-register.desktop to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 1107224: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1107224 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Martin Schmitt Subject: Incorrect invocation of /usr/bin/pkcs11-register in /etc/xdg/autostart/pkcs11-register.desktop Date: Tue, 03 Jun 2025 12:00:17 +0200 Size: 4154 URL: -------------- next part -------------- An embedded message was scrubbed... From: Debian FTP Masters Subject: Bug#1107224: fixed in opensc 0.26.1-2 Date: Fri, 06 Jun 2025 10:34:39 +0000 Size: 6630 URL: From bage at debian.org Fri Jun 6 14:37:45 2025 From: bage at debian.org (Bastian Germann) Date: Fri, 06 Jun 2025 15:37:45 +0200 Subject: [pkg-opensc-maint] Bug#1107371: unblock: opensc/0.26.1-2 Message-ID: <174921706570.212141.8178370540700747912.reportbug@duagon-BXN3S64.> Package: release.debian.org Severity: normal X-Debbugs-Cc: opensc at packages.debian.org Control: affects -1 + src:opensc User: release.debian.org at packages.debian.org Usertags: unblock Please unblock package opensc This backports an upstream change that fixes a CLI option parsing problem which fixes a CLI parser to be more flexible. This is required for the .desktop's Exec invocation to be correct. [ Reason ] CLI argument mismatch explained in #1107224. [ Impact ] Cannot run the appliction /etc/xdg/autostart/pkcs11-register.desktop [ Tests ] Running pkcs11-register the same way as in the .desktop app results in program returning error 1. [ Risks ] New CLI parsing options allow option arguments to be of `--foo bar` or `--foo=bar` flavour, so it should not break any caller. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing unblock opensc/0.26.1-2 -------------- next part -------------- diff -Nru opensc-0.26.1/debian/changelog opensc-0.26.1/debian/changelog --- opensc-0.26.1/debian/changelog 2025-03-22 16:23:26.000000000 +0100 +++ opensc-0.26.1/debian/changelog 2025-06-06 12:10:29.000000000 +0200 @@ -1,3 +1,10 @@ +opensc (0.26.1-2) unstable; urgency=medium + + * Team upload + * pkcs11-register: allow explicitly specifying an app to configure (Closes: #1107224) + + -- Bastian Germann Fri, 06 Jun 2025 12:10:29 +0200 + opensc (0.26.1-1) unstable; urgency=medium * Team upload diff -Nru opensc-0.26.1/debian/patches/0003-pkcs11-register-app-config.patch opensc-0.26.1/debian/patches/0003-pkcs11-register-app-config.patch --- opensc-0.26.1/debian/patches/0003-pkcs11-register-app-config.patch 1970-01-01 01:00:00.000000000 +0100 +++ opensc-0.26.1/debian/patches/0003-pkcs11-register-app-config.patch 2025-06-06 12:07:55.000000000 +0200 @@ -0,0 +1,366 @@ +Origin: upstream, a2af26974bd33f1556b109f27932f02780b934df +From: Frank Morgner +Date: Thu, 22 May 2025 15:41:53 +0200 +Subject: pkcs11-register: allow explicitly specifying an app to configure + +fixes https://github.com/OpenSC/OpenSC/issues/3404 +--- +--- a/src/tools/pkcs11-register-cmdline.c ++++ b/src/tools/pkcs11-register-cmdline.c +@@ -34,20 +34,20 @@ const char *gengetopt_args_info_versiontext = ""; + const char *gengetopt_args_info_description = "Install a PKCS#11 module to known applications."; + + const char *gengetopt_args_info_help[] = { +- " -h, --help Print help and exit", +- " -V, --version Print version and exit", +- " -m, --module=FILENAME Specify the module to load (default=`OpenSC's\n PKCS#11 module')", +- " --skip-chrome Don't install module to Chrome (default=on)", +- " --skip-firefox Don't install module to Firefox (default=on)", +- " --skip-thunderbird Don't install module to Thunderbird (default=off)", +- " --skip-seamonkey Don't install module to SeaMonkey (default=off)", ++ " -h, --help Print help and exit", ++ " -V, --version Print version and exit", ++ " -m, --module=FILENAME Specify the module to load (default=`OpenSC's\n PKCS#11 module')", ++ " --skip-chrome=ENUM Don't install module to Chrome (possible\n values=\"on\", \"off\" default=`on')", ++ " --skip-firefox=ENUM Don't install module to Firefox (possible\n values=\"on\", \"off\" default=`on')", ++ " --skip-thunderbird=ENUM Don't install module to Thunderbird (possible\n values=\"on\", \"off\" default=`off')", ++ " --skip-seamonkey=ENUM Don't install module to SeaMonkey (possible\n values=\"on\", \"off\" default=`off')", + "\nReport bugs to https://github.com/OpenSC/OpenSC/issues\n\nWritten by Frank Morgner ", + 0 + }; + + typedef enum {ARG_NO +- , ARG_FLAG + , ARG_STRING ++ , ARG_ENUM + } cmdline_parser_arg_type; + + static +@@ -60,6 +60,11 @@ cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args + struct cmdline_parser_params *params, const char *additional_error); + + ++const char *cmdline_parser_skip_chrome_values[] = {"on", "off", 0}; /*< Possible values for skip-chrome. */ ++const char *cmdline_parser_skip_firefox_values[] = {"on", "off", 0}; /*< Possible values for skip-firefox. */ ++const char *cmdline_parser_skip_thunderbird_values[] = {"on", "off", 0}; /*< Possible values for skip-thunderbird. */ ++const char *cmdline_parser_skip_seamonkey_values[] = {"on", "off", 0}; /*< Possible values for skip-seamonkey. */ ++ + static char * + gengetopt_strdup (const char *s); + +@@ -81,10 +86,14 @@ void clear_args (struct gengetopt_args_info *args_info) + FIX_UNUSED (args_info); + args_info->module_arg = gengetopt_strdup ("OpenSC's PKCS#11 module"); + args_info->module_orig = NULL; +- args_info->skip_chrome_flag = 1; +- args_info->skip_firefox_flag = 1; +- args_info->skip_thunderbird_flag = 0; +- args_info->skip_seamonkey_flag = 0; ++ args_info->skip_chrome_arg = skip_chrome_arg_on; ++ args_info->skip_chrome_orig = NULL; ++ args_info->skip_firefox_arg = skip_firefox_arg_on; ++ args_info->skip_firefox_orig = NULL; ++ args_info->skip_thunderbird_arg = skip_thunderbird_arg_off; ++ args_info->skip_thunderbird_orig = NULL; ++ args_info->skip_seamonkey_arg = skip_seamonkey_arg_off; ++ args_info->skip_seamonkey_orig = NULL; + + } + +@@ -191,19 +200,64 @@ cmdline_parser_release (struct gengetopt_args_info *args_info) + + free_string_field (&(args_info->module_arg)); + free_string_field (&(args_info->module_orig)); ++ free_string_field (&(args_info->skip_chrome_orig)); ++ free_string_field (&(args_info->skip_firefox_orig)); ++ free_string_field (&(args_info->skip_thunderbird_orig)); ++ free_string_field (&(args_info->skip_seamonkey_orig)); + + + + clear_given (args_info); + } + ++/** ++ * @param val the value to check ++ * @param values the possible values ++ * @return the index of the matched value: ++ * -1 if no value matched, ++ * -2 if more than one value has matched ++ */ ++static int ++check_possible_values(const char *val, const char *values[]) ++{ ++ int i, found, last; ++ size_t len; ++ ++ if (!val) /* otherwise strlen() crashes below */ ++ return -1; /* -1 means no argument for the option */ ++ ++ found = last = 0; ++ ++ for (i = 0, len = strlen(val); values[i]; ++i) ++ { ++ if (strncmp(val, values[i], len) == 0) ++ { ++ ++found; ++ last = i; ++ if (strlen(values[i]) == len) ++ return i; /* exact macth no need to check more */ ++ } ++ } ++ ++ if (found == 1) /* one match: OK */ ++ return last; ++ ++ return (found ? -2 : -1); /* return many values or none matched */ ++} ++ + + static void + write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) + { +- FIX_UNUSED (values); ++ int found = -1; + if (arg) { +- fprintf(outfile, "%s=\"%s\"\n", opt, arg); ++ if (values) { ++ found = check_possible_values(arg, values); ++ } ++ if (found >= 0) ++ fprintf(outfile, "%s=\"%s\" # %s\n", opt, arg, values[found]); ++ else ++ fprintf(outfile, "%s=\"%s\"\n", opt, arg); + } else { + fprintf(outfile, "%s\n", opt); + } +@@ -228,13 +282,13 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) + if (args_info->module_given) + write_into_file(outfile, "module", args_info->module_orig, 0); + if (args_info->skip_chrome_given) +- write_into_file(outfile, "skip-chrome", 0, 0 ); ++ write_into_file(outfile, "skip-chrome", args_info->skip_chrome_orig, cmdline_parser_skip_chrome_values); + if (args_info->skip_firefox_given) +- write_into_file(outfile, "skip-firefox", 0, 0 ); ++ write_into_file(outfile, "skip-firefox", args_info->skip_firefox_orig, cmdline_parser_skip_firefox_values); + if (args_info->skip_thunderbird_given) +- write_into_file(outfile, "skip-thunderbird", 0, 0 ); ++ write_into_file(outfile, "skip-thunderbird", args_info->skip_thunderbird_orig, cmdline_parser_skip_thunderbird_values); + if (args_info->skip_seamonkey_given) +- write_into_file(outfile, "skip-seamonkey", 0, 0 ); ++ write_into_file(outfile, "skip-seamonkey", args_info->skip_seamonkey_orig, cmdline_parser_skip_seamonkey_values); + + + i = EXIT_SUCCESS; +@@ -389,7 +443,18 @@ int update_arg(void *field, char **orig_field, + return 1; /* failure */ + } + +- FIX_UNUSED (default_value); ++ if (possible_values && (found = check_possible_values((value ? value : default_value), possible_values)) < 0) ++ { ++ if (short_opt != '-') ++ fprintf (stderr, "%s: %s argument, \"%s\", for option `--%s' (`-%c')%s\n", ++ package_name, (found == -2) ? "ambiguous" : "invalid", value, long_opt, short_opt, ++ (additional_error ? additional_error : "")); ++ else ++ fprintf (stderr, "%s: %s argument, \"%s\", for option `--%s'%s\n", ++ package_name, (found == -2) ? "ambiguous" : "invalid", value, long_opt, ++ (additional_error ? additional_error : "")); ++ return 1; /* failure */ ++ } + + if (field_given && *field_given && ! override) + return 0; +@@ -401,8 +466,8 @@ int update_arg(void *field, char **orig_field, + val = possible_values[found]; + + switch(arg_type) { +- case ARG_FLAG: +- *((int *)field) = !*((int *)field); ++ case ARG_ENUM: ++ if (val) *((int *)field) = found; + break; + case ARG_STRING: + if (val) { +@@ -421,7 +486,6 @@ int update_arg(void *field, char **orig_field, + /* store the original value */ + switch(arg_type) { + case ARG_NO: +- case ARG_FLAG: + break; + default: + if (value && orig_field) { +@@ -485,10 +549,10 @@ cmdline_parser_internal ( + { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, + { "module", 1, NULL, 'm' }, +- { "skip-chrome", 0, NULL, 0 }, +- { "skip-firefox", 0, NULL, 0 }, +- { "skip-thunderbird", 0, NULL, 0 }, +- { "skip-seamonkey", 0, NULL, 0 }, ++ { "skip-chrome", 1, NULL, 0 }, ++ { "skip-firefox", 1, NULL, 0 }, ++ { "skip-thunderbird", 1, NULL, 0 }, ++ { "skip-seamonkey", 1, NULL, 0 }, + { 0, 0, 0, 0 } + }; + +@@ -527,9 +591,11 @@ cmdline_parser_internal ( + { + + +- if (update_arg((void *)&(args_info->skip_chrome_flag), 0, &(args_info->skip_chrome_given), +- &(local_args_info.skip_chrome_given), optarg, 0, 0, ARG_FLAG, +- check_ambiguity, override, 1, 0, "skip-chrome", '-', ++ if (update_arg( (void *)&(args_info->skip_chrome_arg), ++ &(args_info->skip_chrome_orig), &(args_info->skip_chrome_given), ++ &(local_args_info.skip_chrome_given), optarg, cmdline_parser_skip_chrome_values, "on", ARG_ENUM, ++ check_ambiguity, override, 0, 0, ++ "skip-chrome", '-', + additional_error)) + goto failure; + +@@ -539,9 +605,11 @@ cmdline_parser_internal ( + { + + +- if (update_arg((void *)&(args_info->skip_firefox_flag), 0, &(args_info->skip_firefox_given), +- &(local_args_info.skip_firefox_given), optarg, 0, 0, ARG_FLAG, +- check_ambiguity, override, 1, 0, "skip-firefox", '-', ++ if (update_arg( (void *)&(args_info->skip_firefox_arg), ++ &(args_info->skip_firefox_orig), &(args_info->skip_firefox_given), ++ &(local_args_info.skip_firefox_given), optarg, cmdline_parser_skip_firefox_values, "on", ARG_ENUM, ++ check_ambiguity, override, 0, 0, ++ "skip-firefox", '-', + additional_error)) + goto failure; + +@@ -551,9 +619,11 @@ cmdline_parser_internal ( + { + + +- if (update_arg((void *)&(args_info->skip_thunderbird_flag), 0, &(args_info->skip_thunderbird_given), +- &(local_args_info.skip_thunderbird_given), optarg, 0, 0, ARG_FLAG, +- check_ambiguity, override, 1, 0, "skip-thunderbird", '-', ++ if (update_arg( (void *)&(args_info->skip_thunderbird_arg), ++ &(args_info->skip_thunderbird_orig), &(args_info->skip_thunderbird_given), ++ &(local_args_info.skip_thunderbird_given), optarg, cmdline_parser_skip_thunderbird_values, "off", ARG_ENUM, ++ check_ambiguity, override, 0, 0, ++ "skip-thunderbird", '-', + additional_error)) + goto failure; + +@@ -563,9 +633,11 @@ cmdline_parser_internal ( + { + + +- if (update_arg((void *)&(args_info->skip_seamonkey_flag), 0, &(args_info->skip_seamonkey_given), +- &(local_args_info.skip_seamonkey_given), optarg, 0, 0, ARG_FLAG, +- check_ambiguity, override, 1, 0, "skip-seamonkey", '-', ++ if (update_arg( (void *)&(args_info->skip_seamonkey_arg), ++ &(args_info->skip_seamonkey_orig), &(args_info->skip_seamonkey_given), ++ &(local_args_info.skip_seamonkey_given), optarg, cmdline_parser_skip_seamonkey_values, "off", ARG_ENUM, ++ check_ambiguity, override, 0, 0, ++ "skip-seamonkey", '-', + additional_error)) + goto failure; + +--- a/src/tools/pkcs11-register-cmdline.h ++++ b/src/tools/pkcs11-register-cmdline.h +@@ -34,6 +34,11 @@ extern "C" { + #define CMDLINE_PARSER_VERSION VERSION + #endif + ++enum enum_skip_chrome { skip_chrome__NULL = -1, skip_chrome_arg_on = 0, skip_chrome_arg_off }; ++enum enum_skip_firefox { skip_firefox__NULL = -1, skip_firefox_arg_on = 0, skip_firefox_arg_off }; ++enum enum_skip_thunderbird { skip_thunderbird__NULL = -1, skip_thunderbird_arg_on = 0, skip_thunderbird_arg_off }; ++enum enum_skip_seamonkey { skip_seamonkey__NULL = -1, skip_seamonkey_arg_on = 0, skip_seamonkey_arg_off }; ++ + /** @brief Where the command line options are stored */ + struct gengetopt_args_info + { +@@ -42,13 +47,17 @@ struct gengetopt_args_info + char * module_arg; /**< @brief Specify the module to load (default='OpenSC's PKCS#11 module'). */ + char * module_orig; /**< @brief Specify the module to load original value given at command line. */ + const char *module_help; /**< @brief Specify the module to load help description. */ +- int skip_chrome_flag; /**< @brief Don't install module to Chrome (default=on). */ ++ enum enum_skip_chrome skip_chrome_arg; /**< @brief Don't install module to Chrome (default='on'). */ ++ char * skip_chrome_orig; /**< @brief Don't install module to Chrome original value given at command line. */ + const char *skip_chrome_help; /**< @brief Don't install module to Chrome help description. */ +- int skip_firefox_flag; /**< @brief Don't install module to Firefox (default=on). */ ++ enum enum_skip_firefox skip_firefox_arg; /**< @brief Don't install module to Firefox (default='on'). */ ++ char * skip_firefox_orig; /**< @brief Don't install module to Firefox original value given at command line. */ + const char *skip_firefox_help; /**< @brief Don't install module to Firefox help description. */ +- int skip_thunderbird_flag; /**< @brief Don't install module to Thunderbird (default=off). */ ++ enum enum_skip_thunderbird skip_thunderbird_arg; /**< @brief Don't install module to Thunderbird (default='off'). */ ++ char * skip_thunderbird_orig; /**< @brief Don't install module to Thunderbird original value given at command line. */ + const char *skip_thunderbird_help; /**< @brief Don't install module to Thunderbird help description. */ +- int skip_seamonkey_flag; /**< @brief Don't install module to SeaMonkey (default=off). */ ++ enum enum_skip_seamonkey skip_seamonkey_arg; /**< @brief Don't install module to SeaMonkey (default='off'). */ ++ char * skip_seamonkey_orig; /**< @brief Don't install module to SeaMonkey original value given at command line. */ + const char *skip_seamonkey_help; /**< @brief Don't install module to SeaMonkey help description. */ + + unsigned int help_given ; /**< @brief Whether help was given. */ +@@ -182,6 +191,11 @@ void cmdline_parser_free (struct gengetopt_args_info *args_info); + int cmdline_parser_required (struct gengetopt_args_info *args_info, + const char *prog_name); + ++extern const char *cmdline_parser_skip_chrome_values[]; /**< @brief Possible values for skip-chrome. */ ++extern const char *cmdline_parser_skip_firefox_values[]; /**< @brief Possible values for skip-firefox. */ ++extern const char *cmdline_parser_skip_thunderbird_values[]; /**< @brief Possible values for skip-thunderbird. */ ++extern const char *cmdline_parser_skip_seamonkey_values[]; /**< @brief Possible values for skip-seamonkey. */ ++ + + #ifdef __cplusplus + } +--- a/src/tools/pkcs11-register.c ++++ b/src/tools/pkcs11-register.c +@@ -332,13 +332,13 @@ main(int argc, char **argv) + return 1; + } + +- if (!cmdline.skip_chrome_flag) ++ if (cmdline.skip_chrome_arg != skip_chrome_arg_on) + add_module_chrome(module_path, module_name, exclude_module_path); +- if (!cmdline.skip_firefox_flag) ++ if (cmdline.skip_firefox_arg != skip_firefox_arg_on) + add_module_firefox(module_path, module_name, exclude_module_path); +- if (!cmdline.skip_thunderbird_flag) ++ if (cmdline.skip_thunderbird_arg != skip_thunderbird_arg_on) + add_module_thunderbird(module_path, module_name, exclude_module_path); +- if (!cmdline.skip_seamonkey_flag) ++ if (cmdline.skip_seamonkey_arg != skip_seamonkey_arg_on) + add_module_seamonkey(module_path, module_name, exclude_module_path); + + cmdline_parser_free (&cmdline); +--- a/src/tools/pkcs11-register.ggo.in ++++ b/src/tools/pkcs11-register.ggo.in +@@ -8,19 +8,23 @@ option "module" m + + option "skip-chrome" - + "Don't install module to Chrome" +- flag @PKCS11_REGISTER_SKIP_FIREFOX@ ++ enum values="on","off" optional ++ default="@PKCS11_REGISTER_SKIP_FIREFOX@" + + option "skip-firefox" - + "Don't install module to Firefox" +- flag @PKCS11_REGISTER_SKIP_FIREFOX@ ++ enum values="on","off" optional ++ default="@PKCS11_REGISTER_SKIP_FIREFOX@" + + option "skip-thunderbird" - + "Don't install module to Thunderbird" +- flag off ++ enum values="on","off" optional ++ default="off" + + option "skip-seamonkey" - + "Don't install module to SeaMonkey" +- flag off ++ enum values="on","off" optional ++ default="off" + + text " + Report bugs to @PACKAGE_BUGREPORT@ diff -Nru opensc-0.26.1/debian/patches/series opensc-0.26.1/debian/patches/series --- opensc-0.26.1/debian/patches/series 2025-03-22 16:23:26.000000000 +0100 +++ opensc-0.26.1/debian/patches/series 2025-06-06 12:09:05.000000000 +0200 @@ -1,2 +1,3 @@ 0001-Use-sysconfdir-opensc-for-opensc.conf.patch 0002-Drop-non-functional-ENABLE_AUTOSTART.patch +0003-pkcs11-register-app-config.patch