Package Details: nhiicc 1:20240710.1-3

Git Clone URL: https://aur.archlinux.org/nhiicc.git (read-only, click to copy)
Package Base: nhiicc
Description: 台灣健保卡網路註冊憑證元件 (National Health Insurance IC Card)
Upstream URL: https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm
Licenses: custom
Submitter: None
Maintainer: yan12125 (louiswpf)
Last Packager: louiswpf
Votes: 5
Popularity: 0.000000
First Submitted: 2020-03-19 03:58 (UTC)
Last Updated: 2025-06-30 13:24 (UTC)

Dependencies (5)

Required by (0)

Sources (4)

Latest Comments

1 2 3 Next › Last »

gameuse commented on 2025-07-01 05:20 (UTC)

It's ok now. Thank you.

louiswpf commented on 2025-06-30 13:27 (UTC)

@gameuse: Thanks for reporting. Fixed in 1:20240710.1-3.

gameuse commented on 2025-06-30 06:21 (UTC) (edited on 2025-06-30 06:23 (UTC) by gameuse)

I get an error during installation

==> Verifying source files (using md5sums)...

CMS_mNHIICC_Setup-20240710.1.Linux.zip ... passed

nhiicc.service ... passed

nhiicc.rules ... passed

regen-certs.sh ... passed

==> Removing existing $srcdir/ directory...

==> Unpacking sources...

==> Starting prepare()...

tar: mLNHIICC_Setup.20240710.1.tar.xz: Unable to open: No such file or directory

tar: Error is not recoverable: exiting now

==> Error: prepare() encountered failure.

Aborting...

louiswpf commented on 2024-08-23 15:52 (UTC)

yan12125: OK :)

yan12125 commented on 2024-08-23 15:42 (UTC)

Strictly speaking, decoding a utf-8 web page using latin-1 is incorrect, and I'm not sure if that may cause unexpected issues in the future, so I prefer to be safe here. Anyway, that is just a simple line in .nvchecker.toml :)

Yes, I'd like to be a co-maintainer.

Thank you! I will add you shortly.

louiswpf commented on 2024-08-23 11:38 (UTC) (edited on 2024-08-23 11:39 (UTC) by louiswpf)

yan12125: Thank you, too.
- I knew "encoding" is for parsing the web page, not for .nvchecker.toml, and the web page is obviously encoded in utf-8. However since the part to parse only contains latin1 characters, we could omit "encoding" for brevity. What do you think?
- Yes, I'd like to be a co-maintainer.

yan12125 commented on 2024-08-23 10:46 (UTC)

louiswpf: thank you very much for cleanups! I applied most of them, leaving only "encoding" in .nvchecker.toml, as that is for the web page.

I really appreciate your kind help. Do you want to become a co-maintainer of this package?

louiswpf commented on 2024-08-22 16:22 (UTC)

I did some cleanups. Please take a look. Thank you.

From c7497053d0e15a4899e7b9e7d5c922e54a8823ec Mon Sep 17 00:00:00 2001
From: louiswpf <>
Date: Thu, 22 Aug 2024 23:20:09 +0800
Subject: [PATCH] Remove unneeded code and outdated comments

* Remove outdated comments
* .nvchecker.toml
  * Remove unneeded "\\s" from the regex
  * Use the default encoding (latin1) since the regex now only contains
    latin1 characters
* PKGBUILD
  * Remove unneeded "Jv" when executing tar
  * No need to remove "*~" and "._*" files since they no longer exist
* regen-certs.sh
  * Execute "update-ca-trust" rather than "/usr/bin/update-ca-trust"
    for consistency
---
 .nvchecker.toml | 6 +-----
 PKGBUILD        | 8 +++-----
 regen-certs.sh  | 2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/.nvchecker.toml b/.nvchecker.toml
index 70c2425..1db4f97 100644
--- a/.nvchecker.toml
+++ b/.nvchecker.toml
@@ -1,8 +1,4 @@
-# Disabled - the link on https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/Eventesting.aspx is dead (HTTP 404),
-# and the old version is still available
-
 [nhiicc]
 source = "regex"
 url = "https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/Eventesting.aspx"
-regex = "mLNHIICC_Setup\\.(.*)\\.tar\\.xz\\s"
-encoding = "utf-8"
+regex = "mLNHIICC_Setup\\.(.*)\\.tar\\.xz"
diff --git a/PKGBUILD b/PKGBUILD
index ed5f45f..89565ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
 pkgname=nhiicc
 epoch=1
 pkgver=20240710.1
-pkgrel=1
+pkgrel=2
 arch=(x86_64)
 url='https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm'
 license=(custom)
@@ -18,7 +18,6 @@ makedepends=(patchelf)
 optdepends=(
   'lib32-pcsclite: for using card readers with 32-bit driver only'
 )
-# XXX: Upstream still use 20220110 for the filename
 source=("CMS_mNHIICC_Setup-$pkgver.Linux.zip"::"https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/CMS_mNHIICC_Setup.Linux.zip"
         nhiicc.service
         nhiicc.rules
@@ -27,11 +26,11 @@ source=("CMS_mNHIICC_Setup-$pkgver.Linux.zip"::"https://cloudicweb.nhi.gov.tw/cl
 md5sums=('3bbad14d8ce82a504811319e06c3cdac'
          '3a7ba068b49eab2edca614ea2495e706'
          'e4a249ff4e638527a0bde9deec6eeb5a'
-         '605ed8db0ec700bb07ca256c5282ae6a')
+         '97e402f39fffe35e411419d062f6baf8')
 install=nhiicc.install

 prepare() {
-  tar Jxvf mLNHIICC_Setup.${pkgver}.tar.xz
+  tar xf mLNHIICC_Setup.${pkgver}.tar.xz

   # Delete insecure RUNPATH
   patchelf --remove-rpath mLNHIICC_Setup/x64/mLNHIICC
@@ -41,7 +40,6 @@ package() {
   install -Dm755 mLNHIICC_Setup/x64/mLNHIICC -t "$pkgdir"/usr/bin
   install -Dm755 regen-certs.sh -t "$pkgdir"/usr/share/nhiicc/
   cp -dr mLNHIICC_Setup/html "$pkgdir"/usr/share/nhiicc/
-  find "$pkgdir" \( -name '*~' -or -name '._*' \) -delete
   install -Dm644 nhiicc.service -t "$pkgdir"/usr/lib/systemd/system/
   install -Dm644 nhiicc.rules -t "$pkgdir"/usr/share/polkit-1/rules.d
 }
diff --git a/regen-certs.sh b/regen-certs.sh
index e1c8f7f..05aa49c 100644
--- a/regen-certs.sh
+++ b/regen-certs.sh
@@ -40,4 +40,4 @@ ln -sf /etc/ca-certificates/trust-source/anchors/NHIRootCA.crt "$out_dir/NHIRoot
 install -Dm644 localhost.crt "$out_dir/NHIServerCert.crt"
 install -Dm600 localhost.key "$out_dir/NHIServerCert-real.key"

-/usr/bin/update-ca-trust
+update-ca-trust
-- 
2.46.0

yan12125 commented on 2024-08-22 13:31 (UTC)

Thank you! I applied your patch with small modifications.

ChenyHsu commented on 2024-08-21 12:55 (UTC)

New version 20240710.1 is out. It seems NHI changed the file structure slightly.

I patched the PKGBUILD and roughly test it. The test page can read and display NHI card info.

Here is the new PKGBUILD and patch file: https://gist.github.com/chenyhsu/cb9fb0b81e4dbf58cc466f09307058a9

--- PKGBUILD.old    2024-08-21 20:42:32.214424955 +0800
+++ PKGBUILD    2024-08-21 20:26:08.402500840 +0800
@@ -6,8 +6,8 @@

 pkgname=nhiicc
 epoch=1
-pkgver=20220530
-pkgrel=3
+pkgver=20240710.1
+pkgrel=1
 arch=(x86_64)
 url='https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm'
 license=(custom)
@@ -18,21 +18,28 @@
   'lib32-pcsclite: for using card readers with 32-bit driver only'
 )
 # XXX: Upstream still use 20220110 for the filename
-source=("https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mLNHIICC_Setup.20220110.tar.gz"
-        nhiicc.service
-        nhiicc.rules
-        regen-certs.sh)
+source=("https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/CMS_mNHIICC_Setup.Linux.zip"
+    nhiicc.rules
+    nhiicc.service
+    regen-certs.sh 
+)
+
 # See https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm for MD5 sums
-md5sums=('af4c8e12bdadef7e6ab2b9b1dabb21d4'
-         '3a7ba068b49eab2edca614ea2495e706'
+md5sums=('3bbad14d8ce82a504811319e06c3cdac'
          'e4a249ff4e638527a0bde9deec6eeb5a'
+         '3a7ba068b49eab2edca614ea2495e706'
          '605ed8db0ec700bb07ca256c5282ae6a')
 install=nhiicc.install

+build() {
+  cd $srcdir
+  tar Jxvf mLNHIICC_Setup.${pkgver}.tar.xz
+}
+
 package() {
-  install -Dm755 mLNHIICC_Setup."$pkgver"/x64/mLNHIICC -t "$pkgdir"/usr/bin
+  install -Dm755 mLNHIICC_Setup/x64/mLNHIICC -t "$pkgdir"/usr/bin
   install -Dm755 regen-certs.sh -t "$pkgdir"/usr/share/nhiicc/
-  cp -dr mLNHIICC_Setup."$pkgver"/html "$pkgdir"/usr/share/nhiicc/
+  cp -dr mLNHIICC_Setup/html "$pkgdir"/usr/share/nhiicc/
   find "$pkgdir" \( -name '*~' -or -name '._*' \) -delete
   install -Dm644 nhiicc.service -t "$pkgdir"/usr/lib/systemd/system/
   install -Dm644 nhiicc.rules -t "$pkgdir"/usr/share/polkit-1/rules.d