merge master branch
This commit is contained in:
parent
c3b1207a0b
commit
41dbdb0c57
32
0001-add-getenv.patch
Normal file
32
0001-add-getenv.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 8fe61f2bf34569b0a0995c7ae77f6fb237d01e4d Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Tue, 7 Mar 2023 15:17:03 +0800
|
||||||
|
Subject: [PATCH] add getenv
|
||||||
|
|
||||||
|
---
|
||||||
|
src/drivers/community-multidevice/community_ops.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/drivers/community-multidevice/community_ops.c b/src/drivers/community-multidevice/community_ops.c
|
||||||
|
index 9766959..9f5bd15 100644
|
||||||
|
--- a/src/drivers/community-multidevice/community_ops.c
|
||||||
|
+++ b/src/drivers/community-multidevice/community_ops.c
|
||||||
|
@@ -56,10 +56,11 @@ int community_ops_discover(bio_dev *dev)
|
||||||
|
bio_print_debug ("bio_drv_demo_ops_discover start\n");
|
||||||
|
|
||||||
|
int ret = 0;
|
||||||
|
-
|
||||||
|
- if ((strcmp(getenv("BIO_PRINT_LEVEL"), "7") == 0) && (strcmp(getenv("BIO_PRINT_COLOR"), "1") == 0))
|
||||||
|
- setenv ("G_MESSAGES_DEBUG", "all", 0);
|
||||||
|
-
|
||||||
|
+ if (getenv("BIO_PRINT_LEVEL") != NULL && getenv("BIO_PRINT_COLOR") != NULL)
|
||||||
|
+ {
|
||||||
|
+ if ((strcmp(getenv("BIO_PRINT_LEVEL"), "7") == 0) && (strcmp(getenv("BIO_PRINT_COLOR"), "1") == 0))
|
||||||
|
+ setenv ("G_MESSAGES_DEBUG", "all", 0);
|
||||||
|
+ }
|
||||||
|
// 探测设备
|
||||||
|
ret = device_discover (dev);
|
||||||
|
if ( ret < 0 ) {
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
102
0002-delete-biometric-authenticationd-SingleInstance.patch
Normal file
102
0002-delete-biometric-authenticationd-SingleInstance.patch
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
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,10 +1,12 @@
|
|||||||
Name: biometric-authentication
|
Name: biometric-authentication
|
||||||
Version: 0.9.72
|
Version: 0.9.72
|
||||||
Release: 5
|
Release: 8
|
||||||
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
|
||||||
|
Patch02: 0002-delete-biometric-authenticationd-SingleInstance.patch
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
%global platform x86_64
|
%global platform x86_64
|
||||||
@ -12,6 +14,9 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
%global platform aarch64
|
%global platform aarch64
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch riscv64
|
||||||
|
%global platform riscv64
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -25,7 +30,7 @@ BuildRequires: sqlite-devel
|
|||||||
BuildRequires: libfprint-devel
|
BuildRequires: libfprint-devel
|
||||||
BuildRequires: polkit-devel
|
BuildRequires: polkit-devel
|
||||||
BuildRequires: uuid-devel
|
BuildRequires: uuid-devel
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
|
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
Requires: python-prettytable
|
Requires: python-prettytable
|
||||||
@ -39,6 +44,7 @@ biometric identification framework
|
|||||||
Summary: libs
|
Summary: libs
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0
|
||||||
Provides: biometric-auth
|
Provides: biometric-auth
|
||||||
|
Requires: libbiometric0 systemd
|
||||||
|
|
||||||
%description -n biometric-auth
|
%description -n biometric-auth
|
||||||
Biometric Authentication Service
|
Biometric Authentication Service
|
||||||
@ -48,6 +54,7 @@ Biometric Authentication Service
|
|||||||
Summary: libs
|
Summary: libs
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0
|
||||||
Provides: biometric-driver-community-multidevice
|
Provides: biometric-driver-community-multidevice
|
||||||
|
Requires: libbiometric0 biometric-utils
|
||||||
|
|
||||||
%description -n biometric-driver-community-multidevice
|
%description -n biometric-driver-community-multidevice
|
||||||
ometric Authentication Driver (community multidevice)
|
ometric Authentication Driver (community multidevice)
|
||||||
@ -56,6 +63,7 @@ ometric Authentication Driver (community multidevice)
|
|||||||
Summary: biometric-utils
|
Summary: biometric-utils
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0
|
||||||
Provides: biometric-utils
|
Provides: biometric-utils
|
||||||
|
Requires: biometric-auth systemd python3-prettytable python3-dbus python3-gobject
|
||||||
|
|
||||||
%description -n biometric-utils
|
%description -n biometric-utils
|
||||||
Biometric authentication utils
|
Biometric authentication utils
|
||||||
@ -65,6 +73,7 @@ Biometric authentication utils
|
|||||||
%package -n libbiometric-devel
|
%package -n libbiometric-devel
|
||||||
Summary: libbiometric-devel
|
Summary: libbiometric-devel
|
||||||
License: LGPL-3.0
|
License: LGPL-3.0
|
||||||
|
Requires: libbiometric0 systemd
|
||||||
|
|
||||||
%description -n libbiometric-devel
|
%description -n libbiometric-devel
|
||||||
Biometric Identification DRIVER API - development files
|
Biometric Identification DRIVER API - development files
|
||||||
@ -73,6 +82,7 @@ Biometric Identification DRIVER API - development files
|
|||||||
|
|
||||||
%package -n libbiometric0
|
%package -n libbiometric0
|
||||||
Summary: libbiometric0
|
Summary: libbiometric0
|
||||||
|
Requires: systemd
|
||||||
License: LGPL-3.0 license
|
License: LGPL-3.0 license
|
||||||
|
|
||||||
%description -n libbiometric0
|
%description -n libbiometric0
|
||||||
@ -80,6 +90,8 @@ Biometric Identification library
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch01 -p1
|
||||||
|
%patch02 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export prefix=/usr
|
export prefix=/usr
|
||||||
@ -104,38 +116,26 @@ 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 -j4
|
%{make_build}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes1610.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes1660.so
|
chrpath -d %{buildroot}/usr/lib/biometric-authentication/biometric-authenticationd
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes2501.so
|
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/*.so
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes2550.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes2660.so
|
touch %{name}-%{platform}.conf
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes3500.so
|
echo "%{_prefix}/lib/%{platform}-linux-gnu" >> %{name}-%{platform}.conf
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/aes4000.so
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/elan.so
|
install -p -m644 %{name}-%{platform}.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d/
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/etes603.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/fdu2000.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/upeksonly.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/upektc.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/upektc_img.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/upekts.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/uru4000.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/vcom5s.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/vfs0050.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/vfs101.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/biometric-authentication/drivers/vfs301.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/%{platform}-linux-gnu/libbiometric.so
|
|
||||||
chrpath -d %{buildroot}/usr/lib/%{platform}-linux-gnu/libbiometric.so.0
|
|
||||||
chrpath -d %{buildroot}/usr/lib/%{platform}-linux-gnu/libbiometric.so.0.0.0
|
|
||||||
chrpath -d %{buildroot}/usr/bin/biometric-config-tool
|
|
||||||
|
|
||||||
%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
|
||||||
@ -177,20 +177,25 @@ 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
|
||||||
/usr/lib/%{platform}-linux-gnu/libbiometric.a
|
%{_prefix}/lib/%{platform}-linux-gnu/libbiometric.*
|
||||||
/usr/lib/%{platform}-linux-gnu/libbiometric.la
|
%{_prefix}/lib/%{platform}-linux-gnu/pkgconfig/libbiometric.pc
|
||||||
/usr/lib/%{platform}-linux-gnu/libbiometric.so
|
%{_sysconfdir}/ld.so.conf.d/%{name}-%{platform}.conf
|
||||||
/usr/lib/%{platform}-linux-gnu/libbiometric.so.0
|
|
||||||
/usr/lib/%{platform}-linux-gnu/libbiometric.so.0.0.0
|
|
||||||
/usr/lib/%{platform}-linux-gnu/pkgconfig/libbiometric.pc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Dec 15 2022 huayadong <huayadong@kylinos.cn> - 0.9.72-5
|
* Tue Mar 14 2023 peijiankang <peijiankang@kylinos.cn> - 0.9.72-8
|
||||||
- Fix unsafe compilation options STRIP, RPATH
|
- delete biometric-authenticationd SingleInstance
|
||||||
|
|
||||||
* Thu Dec 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.9.72-4
|
* 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
|
||||||
|
- Fix riscv64 build error
|
||||||
|
|
||||||
|
* Wed Mar 01 2023 peijiankang <peijiankang@kylinos.cn> - 0.9.72-5
|
||||||
|
- remove rpath of biometric-authentication
|
||||||
|
|
||||||
|
* Tue Feb 07 2023 tanyulong <tanyulong@kylinos.cn> - 0.9.72-4
|
||||||
- Enable debuginfo for fix strip
|
- Enable debuginfo for fix strip
|
||||||
|
|
||||||
* Wed Aug 3 2022 peijiankang <peijiankang@kylinos.cn> - 0.9.72-3
|
* Wed Aug 3 2022 peijiankang <peijiankang@kylinos.cn> - 0.9.72-3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user