Compare commits
No commits in common. "2e93ffd6eda94af4f05d5db0f1b5b2ae949df331" and "4a568661a1f55a4d65f7bb7d9ff23a2983cdf5e4" have entirely different histories.
2e93ffd6ed
...
4a568661a1
@ -1,102 +0,0 @@
|
|||||||
From 1b8571add42dfb84637a14032a8d0f1d5dd0e595 Mon Sep 17 00:00:00 2001
|
|
||||||
From: peijiankang <peijiankang@kylinos.cn>
|
|
||||||
Date: Tue, 14 Mar 2023 15:15:39 +0800
|
|
||||||
Subject: [PATCH] delete biometric-authenticationd SingleInstance
|
|
||||||
|
|
||||||
---
|
|
||||||
src/biometric-authenticationd.c | 47 ---------------------------------
|
|
||||||
src/biometric-authenticationd.h | 7 -----
|
|
||||||
2 files changed, 54 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/biometric-authenticationd.c b/src/biometric-authenticationd.c
|
|
||||||
index 240f03f..4a6fb39 100644
|
|
||||||
--- a/src/biometric-authenticationd.c
|
|
||||||
+++ b/src/biometric-authenticationd.c
|
|
||||||
@@ -1598,11 +1598,6 @@ int main()
|
|
||||||
int i = 0;
|
|
||||||
int ret = 0;
|
|
||||||
int uid = getuid();
|
|
||||||
- int pid = getpid();
|
|
||||||
- char * pid_dir_list[PID_DIR_NUM] = {PID_DIR_0, PID_DIR_1};
|
|
||||||
- char * pid_dir = NULL;
|
|
||||||
- char pid_file[MAX_PATH_LEN] = {0};
|
|
||||||
- char pid_string[MAX_PID_STRING_LEN] = {0};
|
|
||||||
|
|
||||||
if (uid != 0)
|
|
||||||
{
|
|
||||||
@@ -1611,45 +1606,6 @@ int main()
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- for (i = 0; i < PID_DIR_NUM; i++)
|
|
||||||
- {
|
|
||||||
- struct stat dir_stat;
|
|
||||||
-
|
|
||||||
- if (access(pid_dir_list[i], F_OK) == 0) {
|
|
||||||
- stat(pid_dir_list[i], &dir_stat);
|
|
||||||
- if (S_ISDIR(dir_stat.st_mode)) {
|
|
||||||
- pid_dir = pid_dir_list[i];
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- if (pid_dir == NULL)
|
|
||||||
- pid_dir = "/";
|
|
||||||
-
|
|
||||||
- snprintf(pid_file, MAX_PATH_LEN, "%s/%s.pid", pid_dir, AUTH_SERVER_NAME);
|
|
||||||
- int pid_file_fd = open(pid_file, O_CREAT | O_TRUNC | O_RDWR, 0644);
|
|
||||||
- if (pid_file_fd < 0)
|
|
||||||
- {
|
|
||||||
- bio_print_error(_("Can not open PID file: %s\n"), pid_file);
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- ret = flock(pid_file_fd, LOCK_EX | LOCK_NB);
|
|
||||||
- if (ret < 0)
|
|
||||||
- {
|
|
||||||
- bio_print_error(_("Biometric authentication server is running, "
|
|
||||||
- "Do not restart it repeatedly\n"));
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- snprintf(pid_string, MAX_PID_STRING_LEN, "%d\n", pid);
|
|
||||||
- ret = write(pid_file_fd, pid_string, strlen(pid_string));
|
|
||||||
- if (ret != strlen(pid_string))
|
|
||||||
- {
|
|
||||||
- bio_print_warning(_("There is an exception to write PID file: %s\n"),
|
|
||||||
- pid_file);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
setlocale (LC_ALL, "");
|
|
||||||
bindtextdomain(DOMAIN_NAME, LOCALEDIR);
|
|
||||||
textdomain(DOMAIN_NAME);
|
|
||||||
@@ -1689,8 +1645,5 @@ int main()
|
|
||||||
|
|
||||||
UnInitBioDevice();
|
|
||||||
|
|
||||||
- flock(pid_file_fd, LOCK_UN);
|
|
||||||
- close(pid_file_fd);
|
|
||||||
-
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
diff --git a/src/biometric-authenticationd.h b/src/biometric-authenticationd.h
|
|
||||||
index 6baa73b..77a6848 100644
|
|
||||||
--- a/src/biometric-authenticationd.h
|
|
||||||
+++ b/src/biometric-authenticationd.h
|
|
||||||
@@ -29,13 +29,6 @@
|
|
||||||
#include "biometric-generated.h"
|
|
||||||
#include "dbus_comm.h"
|
|
||||||
|
|
||||||
-#define PID_DIR_NUM 2
|
|
||||||
-#define PID_DIR_0 "/run/user/0/"
|
|
||||||
-#define PID_DIR_1 "/tmp/"
|
|
||||||
-
|
|
||||||
-#define AUTH_SERVER_NAME "biometric-authentication"
|
|
||||||
-#define MAX_PID_STRING_LEN 64
|
|
||||||
-
|
|
||||||
#define SIGNAL_DEV_CHANGED STATUS_TYPE_DEVICE
|
|
||||||
#define SIGNAL_OPS_CHANGED STATUS_TYPE_OPERATION
|
|
||||||
#define SIGNAL_NOTIFY_CHANGED STATUS_TYPE_NOTIFY
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
||||||
@ -1,25 +1,11 @@
|
|||||||
Name: biometric-authentication
|
Name: biometric-authentication
|
||||||
Version: 0.9.72
|
Version: 0.9.72
|
||||||
Release: 10
|
Release: 7
|
||||||
Summary: biometric-authentication
|
Summary: biometric-authentication
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch01: 0001-add-getenv.patch
|
Patch01: 0001-add-getenv.patch
|
||||||
Patch02: 0002-delete-biometric-authenticationd-SingleInstance.patch
|
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
%global platform x86_64
|
|
||||||
%endif
|
|
||||||
%ifarch aarch64
|
|
||||||
%global platform aarch64
|
|
||||||
%endif
|
|
||||||
%ifarch riscv64
|
|
||||||
%global platform riscv64
|
|
||||||
%endif
|
|
||||||
%ifarch loongarch64
|
|
||||||
%global platform loongarch64
|
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -86,18 +72,18 @@ Biometric Identification DRIVER API - development files
|
|||||||
%package -n libbiometric0
|
%package -n libbiometric0
|
||||||
Summary: libbiometric0
|
Summary: libbiometric0
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0 license
|
||||||
|
|
||||||
%description -n libbiometric0
|
%description -n libbiometric0
|
||||||
Biometric Identification library
|
Biometric Identification library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export prefix=/usr
|
export prefix=/usr
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure --build=%{platform}-linux-gnu \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--includedir=\${prefix}/include \
|
--includedir=\${prefix}/include \
|
||||||
--mandir=\${prefix}/share/man \
|
--mandir=\${prefix}/share/man \
|
||||||
@ -105,8 +91,7 @@ export prefix=/usr
|
|||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--libdir=\${prefix}/lib/%{platform}-linux-gnu \
|
--libdir=\${prefix}/lib64 \
|
||||||
--libexecdir=\${prefix}/lib/%{platform}-linux-gnu \
|
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
@ -117,7 +102,7 @@ export prefix=/usr
|
|||||||
--with-bio-extra-dir=/usr/lib/biometric-authentication/drivers/extra \
|
--with-bio-extra-dir=/usr/lib/biometric-authentication/drivers/extra \
|
||||||
--libexecdir=\${prefix}/lib/biometric-authentication
|
--libexecdir=\${prefix}/lib/biometric-authentication
|
||||||
|
|
||||||
%{make_build}
|
make -j4
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -126,17 +111,9 @@ make install DESTDIR=%{buildroot}
|
|||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/biometric-authenticationd
|
chrpath -d %{buildroot}/usr/lib/biometric-authentication/biometric-authenticationd
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/*.so
|
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/*.so
|
||||||
|
|
||||||
touch %{name}-%{platform}.conf
|
|
||||||
echo "%{_prefix}/lib/%{platform}-linux-gnu" >> %{name}-%{platform}.conf
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
|
||||||
install -p -m644 %{name}-%{platform}.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d/
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%posttrans
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%files -n biometric-auth
|
%files -n biometric-auth
|
||||||
%{_sysconfdir}/dbus-1/system.d/org.ukui.Biometric.conf
|
%{_sysconfdir}/dbus-1/system.d/org.ukui.Biometric.conf
|
||||||
@ -151,7 +128,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files -n biometric-driver-community-multidevice
|
%files -n biometric-driver-community-multidevice
|
||||||
/usr/lib/biometric-authentication/discover-tools/extra/community-multidevice-discover-tool
|
/usr/lib/biometric-authentication/discover-tools/extra/community-multidevice-discover-tool
|
||||||
/usr/lib/biometric-authentication/drivers/*
|
/usr/lib/biometric-authentication/drivers/*.la
|
||||||
|
/usr/lib/biometric-authentication/drivers/*.so
|
||||||
/usr/lib/biometric-authentication/discover-tools/usb*
|
/usr/lib/biometric-authentication/discover-tools/usb*
|
||||||
|
|
||||||
|
|
||||||
@ -177,23 +155,14 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/locale/pt/LC_MESSAGES/biometric-authentication.mo
|
%{_datadir}/locale/pt/LC_MESSAGES/biometric-authentication.mo
|
||||||
%{_datadir}/locale/ru/LC_MESSAGES/biometric-authentication.mo
|
%{_datadir}/locale/ru/LC_MESSAGES/biometric-authentication.mo
|
||||||
%{_datadir}/locale/zh_CN/LC_MESSAGES/biometric-authentication.mo
|
%{_datadir}/locale/zh_CN/LC_MESSAGES/biometric-authentication.mo
|
||||||
%{_prefix}/lib/%{platform}-linux-gnu/libbiometric.*
|
%{_libdir}/libbiometric.*
|
||||||
%{_prefix}/lib/%{platform}-linux-gnu/pkgconfig/libbiometric.pc
|
%{_libdir}/pkgconfig/libbiometric.pc
|
||||||
%{_sysconfdir}/ld.so.conf.d/%{name}-%{platform}.conf
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Dec 10 2024 peijiankang <peijiankang@kylinos.cn> - 0.9.72-10
|
* Thu Mar 07 2023 peijiankang <peijiankang@kylinos.cn> - 0.9.72-7
|
||||||
- fix license info
|
- fix biometric-authentication error
|
||||||
|
|
||||||
* Tue Jun 18 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 0.9.72-9
|
|
||||||
- fix build build error for loongarch64
|
|
||||||
|
|
||||||
* Tue Mar 14 2023 peijiankang <peijiankang@kylinos.cn> - 0.9.72-8
|
|
||||||
- delete biometric-authenticationd SingleInstance
|
|
||||||
|
|
||||||
* Tue Mar 07 2023 peijiankang <peijiankang@kylinos.cn> - 0.9.72-7
|
|
||||||
- fix biometric-authentication service start error
|
|
||||||
|
|
||||||
* Wed Mar 01 2023 misaka00251 <liuxin@iscas.ac.cn> - 0.9.72-6
|
* Wed Mar 01 2023 misaka00251 <liuxin@iscas.ac.cn> - 0.9.72-6
|
||||||
- Fix riscv64 build error
|
- Fix riscv64 build error
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user