From aee6239c8ea953d9199e7fff8abca8ad2bb0d79f Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 29 Aug 2025 22:20:03 +0800 Subject: [PATCH 1/9] add: eymate --- anda/langs/rust/eymate/anda.hcl | 5 ++++ anda/langs/rust/eymate/eymate.spec | 45 ++++++++++++++++++++++++++++++ anda/langs/rust/eymate/update.rhai | 1 + 3 files changed, 51 insertions(+) create mode 100644 anda/langs/rust/eymate/anda.hcl create mode 100644 anda/langs/rust/eymate/eymate.spec create mode 100644 anda/langs/rust/eymate/update.rhai diff --git a/anda/langs/rust/eymate/anda.hcl b/anda/langs/rust/eymate/anda.hcl new file mode 100644 index 00000000000..fdec36386c0 --- /dev/null +++ b/anda/langs/rust/eymate/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "eymate.spec" + } +} diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec new file mode 100644 index 00000000000..6e4c759d7b2 --- /dev/null +++ b/anda/langs/rust/eymate/eymate.spec @@ -0,0 +1,45 @@ +Name: eymate +Version: 0.0.1 +Release: 1%?dist +Summary: An Linux alternative to Windows facial IR login, simular to Howdy +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND GPL-3.0 AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) +SourceLicense: MIT OR Apache-2.0 +URL: https://github.com/LDprg/eyMate +Source0: %url/archive/refs/tags/v%version.tar.gz +Source1: https://github.com/timesler/facenet-pytorch/archive/refs/tags/v2.5.3.tar.gz +BuildRequires: rpm_macro(cargo_install) +BuildRequires: python +BuildRequires: python3dist(torch) +BuildRequires: python3dist(torchvision) +BuildRequires: python3-gobject +BuildRequires: pkgconfig(opencv) +BuildRequires: git-core +#BuildRequires: pkgconfig(libtorch) +Requires: python3dist(torch) + +%description +%summary. + +%prep +%autosetup -n eyMate-%version +%cargo_prep_online +mkdir facenet_pytorch +cd facenet_pytorch +tar xf %{S:1} --strip-components=1 + +%build +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies +python build_model.py + +%install +%cargo_install +install -Dm644 target/rpm/libpam_eymate.so -t %buildroot%_usr/lib/security/ +install -Dm755 vggface2.pt -t %buildroot%_datadir/eymate/ + +%files +%doc README.md +%license LICENSE LICENSE.dependencies +%_bindir/eymate +%_datadir/eymate/ +%_usr/lib/security/libpam_eymate.so diff --git a/anda/langs/rust/eymate/update.rhai b/anda/langs/rust/eymate/update.rhai new file mode 100644 index 00000000000..379267727a0 --- /dev/null +++ b/anda/langs/rust/eymate/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("LDprg/eyMate")); From 6391180167a18f8a46fc76788d30a00003ca7dce Mon Sep 17 00:00:00 2001 From: madonuko Date: Mon, 1 Sep 2025 22:31:31 +0800 Subject: [PATCH 2/9] omg --- anda/langs/rust/eymate/eymate.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index 6e4c759d7b2..283093c2b44 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -14,7 +14,6 @@ BuildRequires: python3dist(torchvision) BuildRequires: python3-gobject BuildRequires: pkgconfig(opencv) BuildRequires: git-core -#BuildRequires: pkgconfig(libtorch) Requires: python3dist(torch) %description @@ -23,6 +22,8 @@ Requires: python3dist(torch) %prep %autosetup -n eyMate-%version %cargo_prep_online +cargo rm tch +cargo add tch@0.18.0 mkdir facenet_pytorch cd facenet_pytorch tar xf %{S:1} --strip-components=1 @@ -33,6 +34,8 @@ tar xf %{S:1} --strip-components=1 python build_model.py %install +export LIBTORCH_USE_PYTORCH=1 +export LIBTORCH_BYPASS_VERSION_CHECK=1 %cargo_install install -Dm644 target/rpm/libpam_eymate.so -t %buildroot%_usr/lib/security/ install -Dm755 vggface2.pt -t %buildroot%_datadir/eymate/ From 2fc53cb76375b4486da184a3c668ee6e2e0f900d Mon Sep 17 00:00:00 2001 From: madomado Date: Mon, 1 Sep 2025 22:54:29 +0800 Subject: [PATCH 3/9] Update eymate.spec Signed-off-by: madomado --- anda/langs/rust/eymate/eymate.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index 283093c2b44..42aa96294ee 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -14,6 +14,7 @@ BuildRequires: python3dist(torchvision) BuildRequires: python3-gobject BuildRequires: pkgconfig(opencv) BuildRequires: git-core +BuildRequires: gcc-c++ gcc Requires: python3dist(torch) %description From f4574d8628c7b0a3cae63b93aedd21904ef5a2bd Mon Sep 17 00:00:00 2001 From: madonuko Date: Mon, 1 Sep 2025 23:32:31 +0800 Subject: [PATCH 4/9] large --- anda/langs/rust/eymate/anda.hcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/anda/langs/rust/eymate/anda.hcl b/anda/langs/rust/eymate/anda.hcl index fdec36386c0..09ec7e3e898 100644 --- a/anda/langs/rust/eymate/anda.hcl +++ b/anda/langs/rust/eymate/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "eymate.spec" } + labels { + large = 1 + } } From b6f94c7ed98171d2e30a38203f1ff2dfb2e130b0 Mon Sep 17 00:00:00 2001 From: madonuko Date: Mon, 1 Sep 2025 23:54:13 +0800 Subject: [PATCH 5/9] rm rf data --- anda/langs/rust/eymate/eymate.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index 42aa96294ee..e706afbb349 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -14,7 +14,7 @@ BuildRequires: python3dist(torchvision) BuildRequires: python3-gobject BuildRequires: pkgconfig(opencv) BuildRequires: git-core -BuildRequires: gcc-c++ gcc +BuildRequires: gcc-c++ gcc clang Requires: python3dist(torch) %description @@ -28,6 +28,7 @@ cargo add tch@0.18.0 mkdir facenet_pytorch cd facenet_pytorch tar xf %{S:1} --strip-components=1 +rm -rf data %build %cargo_license_summary_online From 1980e0477ec5a2821b06ec66ca50a356a12aee60 Mon Sep 17 00:00:00 2001 From: madomado Date: Tue, 2 Sep 2025 00:28:04 +0800 Subject: [PATCH 6/9] Update eymate.spec Signed-off-by: madomado --- anda/langs/rust/eymate/eymate.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index e706afbb349..51a4ff24d13 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -28,7 +28,10 @@ cargo add tch@0.18.0 mkdir facenet_pytorch cd facenet_pytorch tar xf %{S:1} --strip-components=1 -rm -rf data +# save space +rm -rf data .github dependencies tests examples +rm %{S:1} %{S:0} +touch %{S:1} %{S:0} %build %cargo_license_summary_online From bce700ac6d6623305ea4f90e17948b8ae148ef17 Mon Sep 17 00:00:00 2001 From: madomado Date: Tue, 2 Sep 2025 00:38:51 +0800 Subject: [PATCH 7/9] pam Signed-off-by: madomado --- anda/langs/rust/eymate/eymate.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index 51a4ff24d13..8c03d7bf39f 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -13,6 +13,7 @@ BuildRequires: python3dist(torch) BuildRequires: python3dist(torchvision) BuildRequires: python3-gobject BuildRequires: pkgconfig(opencv) +BuildRequires: pkgconfig(pam) BuildRequires: git-core BuildRequires: gcc-c++ gcc clang Requires: python3dist(torch) From b1c9c7cb6a7b00be5b4e8b170a06eefe48b92fc1 Mon Sep 17 00:00:00 2001 From: madonuko Date: Tue, 2 Sep 2025 00:59:04 +0800 Subject: [PATCH 8/9] alksdfs --- anda/langs/rust/eymate/eymate.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/anda/langs/rust/eymate/eymate.spec b/anda/langs/rust/eymate/eymate.spec index 8c03d7bf39f..e7dab21099a 100644 --- a/anda/langs/rust/eymate/eymate.spec +++ b/anda/langs/rust/eymate/eymate.spec @@ -42,6 +42,7 @@ python build_model.py %install export LIBTORCH_USE_PYTORCH=1 export LIBTORCH_BYPASS_VERSION_CHECK=1 +rm -rf .cargo/registry/ %cargo_install install -Dm644 target/rpm/libpam_eymate.so -t %buildroot%_usr/lib/security/ install -Dm755 vggface2.pt -t %buildroot%_datadir/eymate/ From 060cfef07e2565be6ee06a4d6e4353545bbec12d Mon Sep 17 00:00:00 2001 From: madomado Date: Tue, 2 Sep 2025 01:30:35 +0800 Subject: [PATCH 9/9] what if Signed-off-by: madomado --- anda/langs/rust/eymate/anda.hcl | 3 --- 1 file changed, 3 deletions(-) diff --git a/anda/langs/rust/eymate/anda.hcl b/anda/langs/rust/eymate/anda.hcl index 09ec7e3e898..fdec36386c0 100644 --- a/anda/langs/rust/eymate/anda.hcl +++ b/anda/langs/rust/eymate/anda.hcl @@ -2,7 +2,4 @@ project pkg { rpm { spec = "eymate.spec" } - labels { - large = 1 - } }