update to upstream version 1.2.4-1

This commit is contained in:
huayadong 2023-05-23 16:32:12 +08:00
parent ea53c4fc19
commit 281ea0932a
12 changed files with 36 additions and 317 deletions

View File

@ -1,24 +0,0 @@
From e2065a497b13f86ef814ee4181428e779ec0d1bc Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 10:44:35 +0800
Subject: [PATCH] add window icon
---
polkit-agent/src/mainwindow.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/polkit-agent/src/mainwindow.cpp b/polkit-agent/src/mainwindow.cpp
index 2913873..7a74bb1 100755
--- a/polkit-agent/src/mainwindow.cpp
+++ b/polkit-agent/src/mainwindow.cpp
@@ -192,6 +192,7 @@ void MainWindow::setIcon(const QString &iconName)
painter.drawPixmap(rect, actionIcon);
painter.end();
+ setWindowIcon(icon);
ui->lblIcon->setPixmap(icon);
}
--
2.33.0

View File

@ -0,0 +1,24 @@
From 20f3e8fa4cf4ad8f7ed9ac3ababa16e4e588dd27 Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Wed, 24 May 2023 09:24:49 +0800
Subject: [PATCH] fix build compile error
---
bioauth/src/giodbus.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bioauth/src/giodbus.cpp b/bioauth/src/giodbus.cpp
index c7983ae..cf8ee02 100644
--- a/bioauth/src/giodbus.cpp
+++ b/bioauth/src/giodbus.cpp
@@ -1,6 +1,6 @@
#include "giodbus.h"
#include <gio/gio.h>
-#include <gio-unix-2.0/gio/gunixfdlist.h>
+#include <glib-2.0/gio/gunixfdlist.h>
#include <glib.h>
int get_server_gvariant_stdout (int drvid)
--
2.36.1

View File

@ -1,33 +0,0 @@
From a408cee19e004f1c3e0fea33696fd9a862deb05c Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 11:46:01 +0800
Subject: [PATCH] add and use attribute of UseHighDpiPixmaps
---
polkit-agent/src/PolkitAgent.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/polkit-agent/src/PolkitAgent.cpp b/polkit-agent/src/PolkitAgent.cpp
index 6966c05..31a234d 100755
--- a/polkit-agent/src/PolkitAgent.cpp
+++ b/polkit-agent/src/PolkitAgent.cpp
@@ -36,9 +36,14 @@ int main(int argc, char *argv[])
logPrefix = "[ukui-polkit]:";
qInstallMessageHandler(outputMessage);
- qDebug() << "Polkit Agent Started";
+ qDebug() << "Polkit Agent Started";
+ #if(QT_VERSION >= QT_VERSION_CHECK(5,6,0))
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+ #endif
+
- QApplication agent(argc, argv);
+ QApplication agent(argc, argv);
QString locale = QLocale::system().name();
qDebug() << "Language: " <<locale;
--
2.33.0

View File

@ -1,25 +0,0 @@
From d42362b527f2bf34502875316da13e9e65fe58e6 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 14:09:01 +0800
Subject: [PATCH] modify pam module
---
pam-biometric/pam_biometric.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
index ecf55c9..1d7dbbb 100755
--- a/pam-biometric/pam_biometric.c
+++ b/pam-biometric/pam_biometric.c
@@ -454,3 +454,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
logger("Service <%s> slip through the service filter\n", service);
return PAM_IGNORE;
}
+
+int pam_sm_setcred(pam_handle_t *pamh , int flags , int argc , const char **argv)
+{
+ return PAM_SUCCESS;
+}
--
2.33.0

View File

@ -1,26 +0,0 @@
From 6c45acf841e87520a5dbe6d768ee90c39ec67f02 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Tue, 2 Aug 2022 10:15:43 +0800
Subject: [PATCH] solve the problem that ukui-greeter-wayland can't use
biometric authentication
---
pam-biometric/pam_biometric.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
index 1d7dbbb..61f3dd6 100755
--- a/pam-biometric/pam_biometric.c
+++ b/pam-biometric/pam_biometric.c
@@ -425,7 +425,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
get_greeter_session(buf, sizeof(buf));
logger("current greeter: %s\n", buf);
- if(strcmp(buf, "ukui-greeter") == 0)
+ if(strcmp(buf, "ukui-greeter") == 0 || strcmp(buf, "ukui-greeter-wayland") == 0)
return biometric_auth_embeded(pamh);
// else
// return biometric_auth_independent(pamh, "lightdm", 1);
--
2.33.0

View File

@ -1,71 +0,0 @@
From 66f70196d984ce19a9f18a7ebe4ed567534aa3f6 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Tue, 2 Aug 2022 10:29:15 +0800
Subject: [PATCH] fix the problem that the probability window is not displayed
in the center of screen
---
.../polkit-ukui-authentication-agent-1.desktop.in | 2 +-
polkit-agent/src/PolkitListener.cpp | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in b/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
index d9b9c45..f2f08fd 100755
--- a/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
+++ b/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
@@ -81,7 +81,7 @@ Categories=
OnlyShowIn=UKUI;MATE
X-UKUI-StartupNotify=false
X-UKUI-AutoRestart=true
-X-UKUI-Autostart-Phase=Initialization
+X-UKUI-Autostart-Phase=Application
NoDisplay=true
X-DBUS-StartupType=Unique
X-MATE-Autostart-Phase=Initialization
diff --git a/polkit-agent/src/PolkitListener.cpp b/polkit-agent/src/PolkitListener.cpp
index 634b1db..ed0f805 100755
--- a/polkit-agent/src/PolkitListener.cpp
+++ b/polkit-agent/src/PolkitListener.cpp
@@ -27,7 +27,7 @@
#include <QDebug>
#include <QDesktopWidget>
#include <QApplication>
-
+#include <QScreen>
#include <fcntl.h>
#include "PolkitListener.h"
@@ -121,8 +121,9 @@ void PolkitListener::initiateAuthentication(
actionDesc.vendorUrl());
/* set the position of the mainwindow */
- QDesktopWidget *desktop = QApplication::desktop();
- QRect desktopRect = desktop->screen(desktop->primaryScreen())->geometry();
+ //QDesktopWidget *desktop = QApplication::desktop();
+ //QRect desktopRect = desktop->screen(desktop->primaryScreen())->geometry();
+ QRect desktopRect = QApplication::primaryScreen()->geometry();
mainWindow->move(desktopRect.left() + (desktopRect.width() - mainWindow->width()) / 2,
desktopRect.top() + (desktopRect.height() - mainWindow->height()) / 2);
@@ -288,6 +289,10 @@ void PolkitListener::onShowPrompt(const QString &prompt, bool echo)
}
mainWindow->show();
+ QRect desktopRect = QApplication::primaryScreen()->geometry();
+ mainWindow->move(desktopRect.left() + (desktopRect.width() - mainWindow->width()) / 2,
+ desktopRect.top() + (desktopRect.height() - mainWindow->height()) / 2);
+
mainWindow->activateWindow();
}
@@ -296,7 +301,6 @@ void PolkitListener::onShowError(const QString &text)
qDebug() << "[Polkit]:" << "Error:" << text;
if(mainWindow){
- qDebug() << "aaaaaaaaaaaaaaaaaaaaaaaaaaa";
mainWindow->setMessage(text);
}
}
--
2.33.0

View File

@ -1,46 +0,0 @@
From 641e55da3ba9f73d74dd7b67876a9f5024ba4898 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Wed, 3 Aug 2022 14:49:44 +0800
Subject: [PATCH] can't exit with ctrl c using biometric autentication
---
pam-biometric/pam_biometric.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
index 61f3dd6..c235d00 100755
--- a/pam-biometric/pam_biometric.c
+++ b/pam-biometric/pam_biometric.c
@@ -139,6 +139,12 @@ void child(char *service, char *username, char *xdisp)
_exit(BIO_IGNORE);
}
+void handler()
+{
+ return;
+}
+
+
/* PAM parent process */
int parent(int pid, pam_handle_t *pamh, int need_call_conv)
{
@@ -181,8 +187,15 @@ int parent(int pid, pam_handle_t *pamh, int need_call_conv)
waitpid(pid, &child_status, 0);
} else {
logger("Waiting for the GUI child process to exit...\n");
- waitpid(pid, &child_status, 0);
+ sigset_t mask;
+ sigprocmask(SIG_BLOCK,NULL,&mask);
+ sigprocmask(SIG_UNBLOCK,&mask,NULL);
+
+ sinal(SIGINT,handler);
+
+ waitpid(pid, &child_status, 0);
logger("GUI child process has exited.\n");
+ sigprocmask(SIG_SETMASK,&mask,NULL);
}
/*
--
2.33.0

View File

@ -1,26 +0,0 @@
From b753e8693e9b06ee2a8f29ac274719d8d7ab9eb9 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Thu, 4 Aug 2022 11:22:52 +0800
Subject: [PATCH] add opencv complication dependencies
---
debian/control | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index 32b2925..baaedc6 100755
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,8 @@ Build-Depends: debhelper-compat (= 12),
libpolkit-qt5-1-dev,
qttools5-dev,
qttools5-dev-tools,
- pkg-config
+ pkg-config,
+ libopencv-dev,
Standards-Version: 4.5.0
Rules-Requires-Root: no
Homepage: https://github.com/ukui/ukui-biometric-auth
--
2.33.0

View File

@ -1,48 +0,0 @@
From 2b6ad995607e60a9674f31fbec3f317f2eecb9c7 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 19 Dec 2022 13:27:29 +0800
Subject: [PATCH] Username to long and ends the display
---
polkit-agent/i18n_ts/zh_CN.ts | 2 +-
polkit-agent/src/mainwindow.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/polkit-agent/i18n_ts/zh_CN.ts b/polkit-agent/i18n_ts/zh_CN.ts
index 337765d..0ebbaed 100755
--- a/polkit-agent/i18n_ts/zh_CN.ts
+++ b/polkit-agent/i18n_ts/zh_CN.ts
@@ -23,7 +23,7 @@
</message>
<message>
<source>Password</source>
- <translation type="obsolete">密码</translation>
+ <translation>密码</translation>
</message>
<message>
<location filename="../src/mainwindow.ui" line="156"/>
diff --git a/polkit-agent/src/mainwindow.cpp b/polkit-agent/src/mainwindow.cpp
index 7a74bb1..a88431a 100755
--- a/polkit-agent/src/mainwindow.cpp
+++ b/polkit-agent/src/mainwindow.cpp
@@ -24,7 +24,7 @@
#include <QPixmap>
#include <QFontMetrics>
#include <QtMath>
-
+#include <QAbstractItemView>
#include <sys/types.h>
#include <pwd.h>
#include <libintl.h>
@@ -234,7 +234,7 @@ void MainWindow::setPrompt(const QString &text, bool echo)
QString prompt = text;
if(text == "Password: ")
- prompt = tr("Password: ");
+ prompt = tr("Password");
ui->lblPrompt->setText(prompt);
ui->lePassword->setEchoMode(echo ? QLineEdit::Normal : QLineEdit::Password);
--
2.33.0

Binary file not shown.

Binary file not shown.

View File

@ -1,23 +1,19 @@
#glib2-devel >= 2.74.4 glib2test 1
%global glib2test 1
Name: ukui-biometric-auth
Summary: ukui-biometric-auth
Version: 1.2.1
Release: 13
Version: 1.2.4
Release: 1
License: GPL-3+
URL: https://github.com/ukui/ukui-biometric-auth
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config
BuildRequires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config opencv qt5-qtsvg-devel glib2-devel gsettings-qt-devel
Requires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config
Patch0: 0001-add-window-icon.patch
Patch1: 0002-add-and-use-attribute-of-UseHighDpiPixmaps.patch
Patch2: 0003-modify-pam-module.patch
Patch3: 0004-solve-the-problem-that-ukui-greeter-wayland-can-t-use-biometric-authentication.patch
Patch4: 0005-fix-the-problem-that-the-probability-window-is-not-displayed-in-the-center-of-screen.patch
Patch5: 0006-can-t-exit-with-ctrl-c-using-biometric-autentication.patch
Patch6: 0007-add-opencv-complication-dependencies.patch
Patch7: 0008-Username-to-long-and-ends-the-display.patch
Patch1: 0001-fix-build-compile-error.patch
%description
ukui-biometric-auth
@ -48,14 +44,9 @@ biometric-auth package.
%prep
%setup -q
%patch0 -p1
%if %{?glib2test}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%endif
%build
mkdir build
@ -90,6 +81,9 @@ cd build
%changelog
* Mon May 22 2023 huayadong <huayadong@kylinos.cn> - 1.2.4-1
- update to upstream version 1.2.4-1
* Wed Mar 01 2023 peijiankang <peijiankang@kylinos.cn> - 1.2.1-13
- add debug to fix not strip