diff --git a/0000-fix-control-center-fix-kiran-session-account-managem-97343173.patch b/0000-fix-control-center-fix-kiran-session-account-managem-97343173.patch new file mode 100644 index 0000000..1aa0eba --- /dev/null +++ b/0000-fix-control-center-fix-kiran-session-account-managem-97343173.patch @@ -0,0 +1,33 @@ +From 973431738550652eca51ff83639909eb5cef4bd9 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Thu, 30 Dec 2021 09:46:51 +0800 +Subject: [PATCH] fix(control center): fix kiran session account management is + not displayed in the control panel +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复账户管理工具由于desktop之中OnlyShowIn=MATE,导致的不能显示在KIRAN桌面的mate-control-center之中 + +Signed-off-by: liuxinhao +--- + config/kiran-cpanel-account.desktop.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/config/kiran-cpanel-account.desktop.in b/config/kiran-cpanel-account.desktop.in +index 37f640b..d5d2b2c 100644 +--- a/config/kiran-cpanel-account.desktop.in ++++ b/config/kiran-cpanel-account.desktop.in +@@ -9,8 +9,7 @@ Exec=kiran-cpanel-launcher --cpanel-plugin=kiran-cpanel-account + Icon=kcp-account + StartupNotify=true + Categories=Qt;Settings;Account;X-System-Server;X-Common-Features; +-Keywords=mate-control-center;MATE;clock;date;user;account; +-OnlyShowIn=MATE; ++Keywords=user;account; + X-KIRAN-NoDisplay=true + + [Kiran Control Panel Plugin] +-- +2.27.0 + diff --git a/0001-fix-build-fix-incomplete-type-class-QPainterPath-bui.patch b/0001-fix-build-fix-incomplete-type-class-QPainterPath-bui.patch new file mode 100644 index 0000000..07ea637 --- /dev/null +++ b/0001-fix-build-fix-incomplete-type-class-QPainterPath-bui.patch @@ -0,0 +1,77 @@ +From 04c065a529a55619cb640fbe4df85dd68993c90b Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 25 Jan 2022 16:09:54 +0800 +Subject: [PATCH] fix(build): fix incomplete type 'class QPainterPath' build + error + +--- + avatar-editor/src/image-preview-widget.cpp | 1 + + src/widgets/avatar-item-button.cpp | 1 + + src/widgets/enroll-progressbar.cpp | 1 + + src/widgets/kiran-tips.cpp | 1 + + src/widgets/user-avatar-widget.cpp | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/avatar-editor/src/image-preview-widget.cpp b/avatar-editor/src/image-preview-widget.cpp +index a471969..920afb9 100644 +--- a/avatar-editor/src/image-preview-widget.cpp ++++ b/avatar-editor/src/image-preview-widget.cpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "image-preview-widget.h" + #include "include/ui-defines.h" +diff --git a/src/widgets/avatar-item-button.cpp b/src/widgets/avatar-item-button.cpp +index ad2082d..430db56 100644 +--- a/src/widgets/avatar-item-button.cpp ++++ b/src/widgets/avatar-item-button.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + AvatarItemButton::AvatarItemButton(QWidget *parent) + : QAbstractButton(parent), +diff --git a/src/widgets/enroll-progressbar.cpp b/src/widgets/enroll-progressbar.cpp +index d749716..494a8f8 100644 +--- a/src/widgets/enroll-progressbar.cpp ++++ b/src/widgets/enroll-progressbar.cpp +@@ -20,6 +20,7 @@ + + #include "enroll-progressbar.h" + #include ++#include + + EnrollProgressBar::EnrollProgressBar(QWidget *parent) : QWidget(parent) + { +diff --git a/src/widgets/kiran-tips.cpp b/src/widgets/kiran-tips.cpp +index d727b05..96122b4 100644 +--- a/src/widgets/kiran-tips.cpp ++++ b/src/widgets/kiran-tips.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + ///tips离显示控件的间距 + #define TIPS_SPACING 3 +diff --git a/src/widgets/user-avatar-widget.cpp b/src/widgets/user-avatar-widget.cpp +index 7305ca6..b1974c4 100644 +--- a/src/widgets/user-avatar-widget.cpp ++++ b/src/widgets/user-avatar-widget.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + UserAvatarWidget::UserAvatarWidget(QWidget *parent) + : QWidget(parent), +-- +2.33.0 + diff --git a/0002-fix-create-user-the-user-was-created-successfully-bu-60fd3816.patch b/0002-fix-create-user-the-user-was-created-successfully-bu-60fd3816.patch new file mode 100644 index 0000000..1a8c073 --- /dev/null +++ b/0002-fix-create-user-the-user-was-created-successfully-bu-60fd3816.patch @@ -0,0 +1,350 @@ +From 60fd3816a74cabbad309d1320fb21121001e0b8d Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Wed, 19 Jan 2022 15:22:48 +0800 +Subject: [PATCH] fix(create user): the user was created successfully, but the + property setting failed. The user will not be deleted +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 创建用户成功,设置属性失败不删除用户,弹窗警告用户 + +Closes #47439 + +Signed-off-by: liuxinhao +--- + src/hard-worker.cpp | 6 +- + .../advance-settings.cpp | 2 +- + .../create-user-page/create-user-page.cpp | 10 ++- + translations/kiran-cpanel-account.zh_CN.ts | 85 ++++++++++--------- + 4 files changed, 58 insertions(+), 45 deletions(-) + +diff --git a/src/hard-worker.cpp b/src/hard-worker.cpp +index 89ac041..3ab232c 100644 +--- a/src/hard-worker.cpp ++++ b/src/hard-worker.cpp +@@ -110,7 +110,10 @@ void HardWorker::doCreateUser(QString userName, + KLOG_INFO() << QString("create user(%1) is done").arg(userName); + emit sigCreateUserDnoe(userObjPath, ""); + return; ++ + failed: ++ //NOTE:创建用户成功,设置用户属性失败时,不再删除用户 ++#if 0 + if (!userObjPath.isEmpty()) + { + KSDAccountsUserProxy userInterface(ACCOUNTS_DBUS_NAME, +@@ -125,13 +128,14 @@ failed: + KLOG_WARNING() << "create user failed,delete user:" << reply.error(); + } + } ++#endif + QString errMsg = errMsgPrefix; + if (!errMsgDetail.isEmpty()) + { + errMsg.append(","); + errMsg.append(errMsgDetail); + } +- emit sigCreateUserDnoe("", errMsg); ++ emit sigCreateUserDnoe(userObjPath, errMsg); + } + + void HardWorker::doUpdatePasswd(QString objPath, +diff --git a/src/pages/advance-settings-page/advance-settings.cpp b/src/pages/advance-settings-page/advance-settings.cpp +index 3fd7900..244cf00 100644 +--- a/src/pages/advance-settings-page/advance-settings.cpp ++++ b/src/pages/advance-settings-page/advance-settings.cpp +@@ -58,7 +58,7 @@ void AdvanceSettings::setInfo(QString userName, AdvanceSettingsInfo &info) + } + else + { +- ui->edit_loginShell->clear(); ++ ui->edit_loginShell->setText(DEFAULT_SHELL); + } + + ///缓存账用户信息,当特殊用户Home目录设置关闭时,重新生成Home目录路径 +diff --git a/src/pages/create-user-page/create-user-page.cpp b/src/pages/create-user-page/create-user-page.cpp +index 69092a6..7f3956e 100644 +--- a/src/pages/create-user-page/create-user-page.cpp ++++ b/src/pages/create-user-page/create-user-page.cpp +@@ -241,11 +241,15 @@ void CreateUserPage::handlerCreateNewUserIsDone(QString userPath, + { + emit sigIsBusyChanged(false); + ui->btn_confirm->setBusy(false); +- if (!errMsg.isEmpty()) ++ if (!errMsg.isEmpty() && userPath.isEmpty()) + { +- KiranMessageBox::message(nullptr, tr("Error"), +- errMsg, KiranMessageBox::Yes | KiranMessageBox::No); ++ KiranMessageBox::message(nullptr, tr("Error"),errMsg, KiranMessageBox::Ok); + } ++ else if(!errMsg.isEmpty() && !userPath.isEmpty()) ++ { ++ KiranMessageBox::message(nullptr,tr("Warning"),errMsg,KiranMessageBox::Ok); ++ } ++ + if (!userPath.isEmpty()) + { + emit sigRequestSetCurrentUser(userPath); +diff --git a/translations/kiran-cpanel-account.zh_CN.ts b/translations/kiran-cpanel-account.zh_CN.ts +index 9a48aef..6b430c9 100644 +--- a/translations/kiran-cpanel-account.zh_CN.ts ++++ b/translations/kiran-cpanel-account.zh_CN.ts +@@ -76,8 +76,8 @@ + 取消 + + +- +- ++ ++ + Automatically generated by system + 由系统自动生成 + +@@ -89,17 +89,17 @@ + 指定用户目录 + + +- ++ + Please enter the correct path + 请输入正确的路径 + + +- ++ + Please enter specify user Id + 请输入用户ID + + +- ++ + Please enter the correct home directory + 请输入正确的用户目录 + +@@ -212,12 +212,12 @@ + 账户类型 + + +- ++ + standard + 普通用户 + + +- ++ + administrator + 管理员 + +@@ -298,51 +298,56 @@ + 请输入用户名 + + +- ++ + Please enter user name first + 请输入用户名 + + +- ++ + Please enter your user name + 请输入用户名 + + +- ++ + user name cannot be a pure number + 用户名不能全为数字 + + +- ++ + user name already exists + 用户名已存在 + + +- ++ + Please enter your password + 请输入密码 + + +- ++ + Please enter the password again + 请再次输入密码 + + +- ++ + The password you enter must be the same as the former one + 两次密码不相同,请核对后,再次输入 + + +- +- ++ ++ + Error + 错误 + + +- ++ + Password encryption failed + 密码加密失败 + ++ ++ ++ Warning ++ 警告 ++ + + + FaceEnrollDialog +@@ -520,17 +525,17 @@ + 设置用户属性失败 + + +- ++ + update password failed + 更新密码失败 + + +- ++ + icon file + 头像 + + +- ++ + userName type + 用户名 + +@@ -539,12 +544,12 @@ + 账户类型 + + +- ++ + locked + 启用状态 + + +- ++ + Failed to update user properties,%1 + 更新用户属性失败,%1 + +@@ -553,7 +558,7 @@ + 更新用户属性失败(%1) + + +- ++ + Failed to delete user,%1 + 删除用户失败,%1 + +@@ -837,12 +842,12 @@ + 取消 + + +- ++ + standard + 普通用户 + + +- ++ + administrator + 管理员 + +@@ -851,65 +856,65 @@ + 账户信息更新成功 + + +- ++ + Password updated successfully + 密码更新成功 + + +- ++ + The directory and files under the user's home directory are deleted with the user.Are you sure you want to delete the user(%1)? + 用户目录下的目录和文件会随用户一起删除,确定要删除%1用户吗? + + +- ++ + Warning + 警告 + + +- ++ + Please enter the new user password + 请输入新密码 + + +- ++ + Please enter the password again + 请再次输入密码 + + +- ++ + The password you enter must be the same as the former one + 两次密码不相同,请核对后,再次输入 + + +- ++ + Please enter the current user password + 请输入当前密码 + + +- ++ + The current password is incorrect + 当前密码错误,请再次输入 + + +- ++ + The new password cannot be the same as the current password + 新密码不能和旧密码相同,请重新输入 + + +- +- +- +- ++ ++ ++ ++ + Error + 错误 + + +- ++ + Password encryption failed + 密码加密失败 + + +- ++ + user information updated successfully + 用户信息更新成功 + +-- +2.27.0 + diff --git a/kiran-cpanel-account-2.1.1.tar.gz b/kiran-cpanel-account-2.2.0.tar.gz similarity index 70% rename from kiran-cpanel-account-2.1.1.tar.gz rename to kiran-cpanel-account-2.2.0.tar.gz index d9173fb..a846fd2 100644 Binary files a/kiran-cpanel-account-2.1.1.tar.gz and b/kiran-cpanel-account-2.2.0.tar.gz differ diff --git a/kiran-cpanel-account.spec b/kiran-cpanel-account.spec index 041ce75..ef544d8 100644 --- a/kiran-cpanel-account.spec +++ b/kiran-cpanel-account.spec @@ -1,14 +1,15 @@ Name: kiran-cpanel-account -Version: 2.1.1 -Release: 3%{?dist} +Version: 2.2.0 +Release: 3.kb4 Summary: Kiran Account Manager -Summary(zh_CN): 账户管理工具 +Summary(zh_CN): 用户管理工具 License: Mulan PSL v2 -#URL: Source0: %{name}-%{version}.tar.gz -%define SHOW_AUTH_MANAGER false +Patch0001: 0000-fix-control-center-fix-kiran-session-account-managem-97343173.patch +Patch0002: 0002-fix-create-user-the-user-was-created-successfully-bu-60fd3816.patch +Patch0003: 0001-fix-build-fix-incomplete-type-class-QPainterPath-bui.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -21,10 +22,8 @@ BuildRequires: qt5-qtx11extras-devel BuildRequires: qt5-qtsvg-devel BuildRequires: kiran-widgets-qt5-devel BuildRequires: zeromq-devel -BuildRequires: kiran-cc-daemon-devel -%if %{SHOW_AUTH_MANAGER} == true +BuildRequires: kiran-cc-daemon-devel >= 2.0.7 BuildRequires: kiran-biometrics-devel -%endif BuildRequires: kiran-log-qt5-devel BuildRequires: kiran-control-panel-devel BuildRequires: kiran-qdbusxml2cpp @@ -37,9 +36,7 @@ Requires: qt5-qtbase Requires: qt5-qtx11extras Requires: zeromq Requires: kiran-system-daemon -%if %{SHOW_AUTH_MANAGER} == true Requires: kiran-biometrics -%endif Requires: kiran-log-qt5 Requires: kiran-cpanel-launcher @@ -54,12 +51,7 @@ Account Manager %build %{__mkdir} -p %{buildroot} - -%cmake \ -%if %{SHOW_AUTH_MANAGER} == true --DAUTH_MANAGER_VISIBLE=on \ -%endif - +%cmake make %install @@ -93,8 +85,36 @@ fi rm -rf %{buildroot} %changelog -* Mon Oct 18 2021 xiewenhao - 2.1.1-2 -- KYOS: rebuild for KiranUI-2.1-OE (#43502) +* Wed Jan 26 2022 longcheng - 2.2.0-3.kb4 +- KYOS-B: fix compilation errors on OpenEuler + +* Wed Jan 19 2022 liuxinhao - 2.2.0-3.kb3 +- KYOS-B: the user was created successfully, but the property setting failed. The user will not be deleted(#47439) + +* Thu Dec 30 2021 liuxinhao - 2.2.0-3.kb2 +- fix kiran session account management is not displayed in the control panel + +* Wed Dec 29 2021 kpkg - 2.2.0-3.kb1 +- rebuild for KY3.4-MATE-modules-dev + +* Wed Dec 29 2021 caoyuanji - 2.2.0-3 +- Upgrade version number for easy upgrade + +* Tue Dec 28 2021 caoyuanji - 2.2.0-2.kb1 +- rebuild for KY3.4-4-KiranUI-2.2 + +* Tue Dec 21 2021 liuxinhao - 2.2.0-2 +- KYOS-F: add do crack passwd check build option + +* Thu Dec 02 2021 liuxinhao - 2.2.0-1 +- KYBD: rebuild for 2.2,changed required name to kiran-widgets-qt5 + +* Thu Dec 02 2021 liuxinhao - 2.1.1-2.kb2 +- KYBD: changed required name to kiranwidgets-qt5 + +* Fri Nov 05 2021 liuxinhao - 2.1.1-2.kb1 +- KYBD: changed required name and license +- KYOS-B: passwd edit filter paster event(#45721) * Mon Sep 06 2021 liuxinaho - 2.1.1-1.kb1 - KYOS-B: fix moc error @@ -116,7 +136,7 @@ rm -rf %{buildroot} - KYOS-B: install desktop link (#38890) * Wed Jun 30 2021 liuxinhao - 2.1.0-4.kb1 -- KYOS-B: don't exit if translation file not found (#40693) +- KYOS-B: don't exit if translation file not found * Mon Jun 28 2021 liuxinhao - 2.1.0-3.kb1 - KYOS-B: unified user name for interface description (#40542) @@ -124,9 +144,6 @@ rm -rf %{buildroot} * Wed Jun 23 2021 liuxinhao - 2.1.0-2.kb1 - KYOS-B: modify user prompt infomation -* Fri Jun 18 2021 liuxinhao - 2.1.0-1.kb2 -- KYBD: disable authentication management page - * Wed Jun 16 2021 liuxinhao - 2.1.0-1.kb1 - KYOS-B: solve the related problems of authentication management page(#40172)