diff --git a/0001-fix-compile-error-of-ukui-control-center.patch b/0001-fix-compile-error-of-ukui-control-center.patch new file mode 100644 index 0000000..ef63c46 --- /dev/null +++ b/0001-fix-compile-error-of-ukui-control-center.patch @@ -0,0 +1,39 @@ +From 5e47f424d62f41d983ed1f9bcf26786ee0a74834 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Wed, 1 Mar 2023 16:33:16 +0800 +Subject: [PATCH] fix compile error of ukui-control-center + +--- + changeUserPwd/run-passwd.cpp | 2 +- + translate_generation.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/changeUserPwd/run-passwd.cpp b/changeUserPwd/run-passwd.cpp +index c48297d..3b416ec 100644 +--- a/changeUserPwd/run-passwd.cpp ++++ b/changeUserPwd/run-passwd.cpp +@@ -362,7 +362,7 @@ static gboolean io_watch_stdout (GIOChannel *source, GIOCondition condition, Pas + "Your password has been changed after you verify!"); + } */else { + error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_UNKNOWN, +- str->str); ++ "Unknown error"); + } + + /* At this point, passwd might have exited, in which case +diff --git a/translate_generation.sh b/translate_generation.sh +index 7bf4000..c971497 100755 +--- a/translate_generation.sh ++++ b/translate_generation.sh +@@ -7,7 +7,7 @@ version=(`echo $ID`) + for ts in "${ts_list[@]}" + do + printf "\nprocess ${ts}\n" +- if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then ++ if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ] || [ "$version" == "openEuler" ];then + lrelease-qt5 "${ts}" + else + lrelease "${ts}" +-- +2.33.0 + diff --git a/0001-modify-version-info-error.patch b/0001-modify-version-info-error.patch index c43b861..57ce608 100644 --- a/0001-modify-version-info-error.patch +++ b/0001-modify-version-info-error.patch @@ -1,30 +1,32 @@ -From 56af3614f31d303d2664850b8ca9c541cdf0258c Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Tue, 1 Mar 2022 14:33:45 +0800 +From fc98b89e8acc49ab32abe288e794dbb77659f778 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Fri, 9 Dec 2022 15:20:28 +0800 Subject: [PATCH] modify version-info error --- - plugins/messages-task/about/about.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) + plugins/system/about/about.cpp | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -diff --git a/plugins/messages-task/about/about.cpp b/plugins/messages-task/about/about.cpp -index e675232..e29c227 100644 ---- a/plugins/messages-task/about/about.cpp -+++ b/plugins/messages-task/about/about.cpp -@@ -197,6 +197,13 @@ void About::setupVersionCompenent() +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index 688395e..e63591c 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -795,7 +795,14 @@ void About::setupVersionCompenent() version = rx.cap(1); } } +- } + else if(str.contains("VERSION=")) { -+ QRegExp rx("VERSION=\"(.*)\"$"); -+ int pos = rx.indexIn(str); -+ if (pos > -1) { -+ version = rx.cap(1); -+ } -+ } - } ++ QRegExp rx("VERSION=\"(.*)\"$"); ++ int pos = rx.indexIn(str); ++ if (pos > -1) { ++ version = rx.cap(1); ++ } ++ } ++ } } + if (!version.isEmpty()) { -- 2.33.0 diff --git a/0002-modify-area-info-display-error.patch b/0002-modify-area-info-display-error.patch deleted file mode 100644 index 0883323..0000000 --- a/0002-modify-area-info-display-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6fbd0243017e5731bb5db6bb6844833d97b4020e Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Tue, 1 Mar 2022 16:59:57 +0800 -Subject: [PATCH] modify area-info display error - ---- - plugins/time-language/area/area.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp -index 409f894..048f2be 100644 ---- a/plugins/time-language/area/area.cpp -+++ b/plugins/time-language/area/area.cpp -@@ -264,7 +264,7 @@ void Area::initComponent() { - int langIndex = lang.split(':').at(0) == "zh_CN" ? 1 : 0; - int formatIndex = res.at(0) == "zh_CN.UTF-8" ? 1 : 0; - // ui->langcomboBox->setCurrentIndex(langIndex); -- ui->countrycomboBox->setCurrentIndex(formatIndex); -+ ui->countrycomboBox->setCurrentIndex(langIndex); - - initFormComponent(0b1111); - } --- -2.33.0 - diff --git a/0003-fix-power-missing-issue.patch b/0003-fix-power-missing-issue.patch index 4b75fce..36e34b4 100644 --- a/0003-fix-power-missing-issue.patch +++ b/0003-fix-power-missing-issue.patch @@ -1,8 +1,18 @@ -diff -Naur ukui-control-center-3.0.4/shell/mainwindow.cpp ukui-control-center-3.0.4-/shell/mainwindow.cpp ---- ukui-control-center-3.0.4/shell/mainwindow.cpp 2021-11-19 10:02:39.000000000 +0800 -+++ ukui-control-center-3.0.4-/shell/mainwindow.cpp 2022-03-02 15:52:56.715867011 +0800 -@@ -794,7 +794,7 @@ - bool MainWindow::isExitsCloudAccount() { +From 434d2c7ffce80409d61eb62fad01b2ed342161a1 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Thu, 15 Dec 2022 17:09:20 +0800 +Subject: [PATCH] fix power missing issue + +--- + shell/mainwindow.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/shell/mainwindow.cpp b/shell/mainwindow.cpp +index a1ac0e5..c75e55b 100644 +--- a/shell/mainwindow.cpp ++++ b/shell/mainwindow.cpp +@@ -810,7 +810,7 @@ QPushButton * MainWindow::buildLeftsideBtn(QString bname,QString tipName, QIcon + bool MainWindow::isExistsCloudAccount() { QProcess *wifiPro = new QProcess(); QString shellOutput = ""; - wifiPro->start("dpkg -l | grep kylin-sso-client"); @@ -10,8 +20,8 @@ diff -Naur ukui-control-center-3.0.4/shell/mainwindow.cpp ukui-control-center-3. wifiPro->waitForFinished(); QString output = wifiPro->readAll(); shellOutput += output; -@@ -811,14 +811,14 @@ - bool MainWindow::isExitsPower() +@@ -827,14 +827,14 @@ bool MainWindow::isExistsCloudAccount() { + bool MainWindow::isExistsPower() { QProcess *process = new QProcess; - process->start("dpkg -l ukui-power-manager"); @@ -26,4 +36,7 @@ diff -Naur ukui-control-center-3.0.4/shell/mainwindow.cpp ukui-control-center-3. + return mOutput.contains("ukui-power-manager", Qt::CaseSensitive) ? true : false; } - bool MainWindow::dblOnEdge(QMouseEvent *event) { + bool MainWindow::isExistWirelessDevice() +-- +2.33.0 + diff --git a/0004-disable-the-str-of-password-check.patch b/0004-disable-the-str-of-password-check.patch deleted file mode 100644 index 6f217d2..0000000 --- a/0004-disable-the-str-of-password-check.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a59a56767afb447307264827df8ae9a03b60f250 Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Wed, 9 Mar 2022 09:42:52 +0800 -Subject: [PATCH] disable the str "'" of password check - ---- - plugins/account/userinfo/createuserdialog.cpp | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/plugins/account/userinfo/createuserdialog.cpp b/plugins/account/userinfo/createuserdialog.cpp -index 2af9290..e35732c 100644 ---- a/plugins/account/userinfo/createuserdialog.cpp -+++ b/plugins/account/userinfo/createuserdialog.cpp -@@ -318,8 +318,6 @@ void CreateUserDialog::pwdLegalityCheck(QString pwd){ - } - - bool CreateUserDialog::checkCharLegitimacy(QString password){ -- if (password.contains("'")) -- return false; - //密码不能包含非标准字符 - foreach (QChar ch, password){ - if (int(ch.toLatin1() <= 0 || int(ch.toLatin1()) > 127)){ --- -2.33.0 - diff --git a/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch b/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch index 3b1cbb0..7218c1b 100644 --- a/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch +++ b/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch @@ -1,38 +1,38 @@ -From 5fde797a955ccf550c034a509208e6bbddd037a2 Mon Sep 17 00:00:00 2001 -From: huayadong -Date: Wed, 9 Mar 2022 15:54:43 +0800 -Subject: [PATCH] ssssssss +From 1cc7cdb36a52cb242c14e503e8b8b186b3d495d4 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Fri, 23 Dec 2022 16:10:47 +0800 +Subject: [PATCH] Fix the problem of displaying none in the interface version + information --- - shell/ukccabout.cpp | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) + shell/ukccabout.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/ukccabout.cpp b/shell/ukccabout.cpp -index 9fb591b..416e251 100644 +index 547d6f3..371fccf 100644 --- a/shell/ukccabout.cpp +++ b/shell/ukccabout.cpp -@@ -148,21 +148,16 @@ QString UkccAbout::getUkccVersion() { +@@ -99,7 +99,7 @@ QString UkccAbout::getUkccVersion() { char *q = NULL; QString version = "none"; - pp = popen("dpkg -l ukui-control-center | grep ukui-control-center", "r"); -+ pp = popen("rpm -qa ukui-control-center", "r"); ++ pp = popen("rpm -q ukui-control-center", "r"); if(NULL == pp) return version; - while((read = getline(&line, &len, pp)) != -1){ - q = strrchr(line, '\n'); +@@ -108,12 +108,12 @@ QString UkccAbout::getUkccVersion() { *q = '\0'; -- + QString content = line; - QStringList list = content.split(" "); -- -- list.removeAll(""); -- -- if (list.size() >= 3) -- version = list.at(2); + QStringList list = content.split("-"); -+ version = list.at(3); + + list.removeAll(""); + + if (list.size() >= 3) +- version = list.at(2); ++ version = list.at(3); } free(line); diff --git a/0006-fix-the-problem-that-the-new-user-in-the-control-panel-is-stuck.patch b/0006-fix-the-problem-that-the-new-user-in-the-control-panel-is-stuck.patch deleted file mode 100644 index b9db9e6..0000000 --- a/0006-fix-the-problem-that-the-new-user-in-the-control-panel-is-stuck.patch +++ /dev/null @@ -1,54 +0,0 @@ -From d832b319220c7b02e4ce55a1980111b4170d31ec Mon Sep 17 00:00:00 2001 -From: huayadong -Date: Fri, 11 Mar 2022 16:36:23 +0800 -Subject: [PATCH] xxxxxxxxxxxxxxxxxxxxx - ---- - registeredQDbus/sysdbusregister.cpp | 29 ++++++++--------------------- - 1 file changed, 8 insertions(+), 21 deletions(-) - -diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp -index 4b7786f..4eecad5 100644 ---- a/registeredQDbus/sysdbusregister.cpp -+++ b/registeredQDbus/sysdbusregister.cpp -@@ -162,29 +162,16 @@ void SysdbusRegister::setPasswdAging(int days, QString username) { - } - - int SysdbusRegister::_changeOtherUserPasswd(QString username, QString pwd){ -+ QProcess process; -+ QProcessEnvironment env; -+ env.insert("LC_ALL", "C"); - -- std::string str1 = username.toStdString(); -- const char * user_name = str1.c_str(); -+ process.setProcessEnvironment(env); -+ process.start("/usr/bin/passwd", QStringList() << QString(username)); -+ process.write(QString("%1\n%2\n").arg(pwd).arg(pwd).toLatin1()); - -- std::string str2 = pwd.toStdString(); -- const char * passwd = str2.c_str(); -- -- QString output; -- -- char * cmd = g_strdup_printf("/usr/bin/changeotheruserpwd '%s' '%s'", user_name, passwd); -- -- FILE *stream; -- char buf[256]; -- -- if ((stream = popen(cmd, "r" )) == NULL){ -- return -1; -- } -- -- while(fgets(buf, 256, stream) != NULL){ -- output = QString(buf).simplified(); -- } -- -- pclose(stream); -+ process.closeWriteChannel(); -+ process.waitForFinished(); - - return 1; - } --- -2.33.0 - diff --git a/0007-modify-icon-theme-not-display.patch b/0007-modify-icon-theme-not-display.patch index 50e0b70..541cc9b 100644 --- a/0007-modify-icon-theme-not-display.patch +++ b/0007-modify-icon-theme-not-display.patch @@ -1,28 +1,28 @@ -From 0f33449dc1c22e97331265a6410e9a0a5466d39c Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Wed, 6 Apr 2022 17:29:15 +0800 +From d155a8511018a478fc55486075761c664913ef34 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Thu, 29 Dec 2022 14:08:05 +0800 Subject: [PATCH] modify icon theme not display --- - plugins/personalized/theme/theme.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + shell/utils/utils.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/plugins/personalized/theme/theme.cpp b/plugins/personalized/theme/theme.cpp -index 893db27..59f66af 100644 ---- a/plugins/personalized/theme/theme.cpp -+++ b/plugins/personalized/theme/theme.cpp -@@ -443,8 +443,9 @@ void Theme::initIconTheme() { +diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp +index 9c97e3e..24d5f56 100644 +--- a/shell/utils/utils.cpp ++++ b/shell/utils/utils.cpp +@@ -187,9 +187,9 @@ bool Utils::isCommunity() + QString filename = "/etc/os-release"; + QSettings osSettings(filename, QSettings::IniFormat); - foreach (QString themedir, themesDir.entryList(QDir::Dirs)) { +- QString versionID = osSettings.value("VERSION_ID").toString(); ++ QString versionID = osSettings.value("ID").toString(); -- if ((Utils::isCommunity() && (!themedir.compare("ukui") || !themedir.compare("ukui-classical"))) -- || (!Utils::isCommunity() && themedir.startsWith("ukui-icon-theme-"))) { -+ if ((Utils::isCommunity() && (!themedir.compare("ukui") || !themedir.compare("ukui-classical")) ) -+ || (!Utils::isCommunity() && themedir.startsWith("ukui-icon-theme-")) -+ || (!Utils::isCommunity() && (!themedir.compare("ukui") || !themedir.compare("ukui-classical") || !themedir.compare("ukui-fashion")))) { - QDir appsDir = QDir(ICONTHEMEPATH + themedir + "/48x48/apps/"); - QDir placesDir = QDir(ICONTHEMEPATH + themedir + "/48x48/places/"); - QDir devicesDir = QDir(ICONTHEMEPATH + themedir + "/48x48/devices/"); +- if (versionID.compare("22.04", Qt::CaseSensitive)) { ++ if (versionID.compare("openEuler", Qt::CaseSensitive)) { + return false; + } + return true; -- 2.33.0 diff --git a/0008-Fix-preferred-language-default-errors.patch b/0008-Fix-preferred-language-default-errors.patch deleted file mode 100644 index 163466e..0000000 --- a/0008-Fix-preferred-language-default-errors.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 449655a9a73e8afac4b5d60ea1b4e47553294918 Mon Sep 17 00:00:00 2001 -From: peijiankang -Date: Mon, 18 Jul 2022 13:42:37 +0800 -Subject: [PATCH] Fix preferred language default errors - ---- - plugins/time-language/area/area.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp -index 048f2be..1c10b4e 100644 ---- a/plugins/time-language/area/area.cpp -+++ b/plugins/time-language/area/area.cpp -@@ -379,6 +379,8 @@ QStringList Area::getUserDefaultLanguage() { - } - if(language.isEmpty() && propertyMap.keys().contains("Language")) { - language = propertyMap.find("Language").value().toString(); -+ if(language.isEmpty()) -+ language = QLocale::system().name(); - } - } else { - qDebug() << "reply failed"; --- -2.33.0 - diff --git a/0009-Fix-the-resolution-donotsave-button-fails.patch b/0009-Fix-the-resolution-donotsave-button-fails.patch deleted file mode 100644 index b695e74..0000000 --- a/0009-Fix-the-resolution-donotsave-button-fails.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 934fc1be1565d019b98373954551e81187096960 Mon Sep 17 00:00:00 2001 -From: peijiankang -Date: Wed, 20 Jul 2022 17:41:12 +0800 -Subject: [PATCH] Fix the resolution donotsave button fails - ---- - plugins/system/display/widget.cpp | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/plugins/system/display/widget.cpp b/plugins/system/display/widget.cpp -index 642114e..bb7fcf6 100644 ---- a/plugins/system/display/widget.cpp -+++ b/plugins/system/display/widget.cpp -@@ -1707,12 +1707,12 @@ void Widget::initConnection() - applyNightModeSlot(); - }); - -- QDBusConnection::sessionBus().connect(QString(), -- QString("/"), -- "org.ukui.ukcc.session.interface", -- "screenChanged", -- this, -- SLOT(kdsScreenchangeSlot(QString))); -+// QDBusConnection::sessionBus().connect(QString(), -+// QString("/"), -+// "org.ukui.ukcc.session.interface", -+// "screenChanged", -+// this, -+// SLOT(kdsScreenchangeSlot(QString))); - - - QDBusConnection::sessionBus().connect(QString(), --- -2.33.0 - diff --git a/0010-Fix-the-problem-of-scrambled-shortcut-keys.patch b/0010-Fix-the-problem-of-scrambled-shortcut-keys.patch index 3979c7b..406d12e 100644 --- a/0010-Fix-the-problem-of-scrambled-shortcut-keys.patch +++ b/0010-Fix-the-problem-of-scrambled-shortcut-keys.patch @@ -1,6 +1,6 @@ -From d4982a90afbc954404f1bb821e636f57c599e3ef Mon Sep 17 00:00:00 2001 +From 1c127130f57ea4085b26b42771716196df20e96b Mon Sep 17 00:00:00 2001 From: peijiankang -Date: Mon, 15 Aug 2022 14:48:53 +0800 +Date: Mon, 9 Jan 2023 09:39:04 +0800 Subject: [PATCH] Fix the problem of scrambled shortcut keys --- @@ -8,17 +8,17 @@ Subject: [PATCH] Fix the problem of scrambled shortcut keys 1 file changed, 4 insertions(+) diff --git a/plugins/devices/shortcut/shortcut.cpp b/plugins/devices/shortcut/shortcut.cpp -index 15c37ca..2f52086 100644 +index 44efa56..a5084a9 100644 --- a/plugins/devices/shortcut/shortcut.cpp +++ b/plugins/devices/shortcut/shortcut.cpp -@@ -96,6 +96,10 @@ int Shortcut::get_plugin_type() +@@ -100,6 +100,10 @@ int Shortcut::pluginTypes() - QWidget *Shortcut::get_plugin_ui() + QWidget *Shortcut::pluginUi() { + //修复快捷键中文乱码问题 + const QString locale = QLocale::system().name(); + (void) setlocale(LC_ALL, QString(locale + ".UTF-8").toStdString().c_str()); -+ ++ if (mFirstLoad) { mFirstLoad = false; diff --git a/0011-Fix-about-copyright-display-error.patch b/0011-Fix-about-copyright-display-error.patch new file mode 100644 index 0000000..9810329 --- /dev/null +++ b/0011-Fix-about-copyright-display-error.patch @@ -0,0 +1,25 @@ +From 648547177ddceb27394135bb276deb18666019cf Mon Sep 17 00:00:00 2001 +From: tanyulong2021 +Date: Mon, 27 Feb 2023 14:37:21 +0800 +Subject: [PATCH] Fix about copyright display error + +--- + plugins/system/about/about.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index e63591c..824b781 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -465,7 +465,7 @@ void About::initUI(QWidget *widget) + mActivationLayout_1->addLayout(mActivationLayout); + mActivationLayout_1->addWidget(mActivationBtn); + +- QString currentyear("2022"); ++ QString currentyear("2023"); + mTipLabel = new FixLabel(QString(tr("Copyright © 2009-%1 KylinSoft. All rights reserved.")).arg(currentyear) , Aboutwidget); + mTipLabel->setContentsMargins(16 , 0 , 0 , 0); + +-- +2.33.0 + diff --git a/0012-fix-add-group-failed-issue.patch b/0012-fix-add-group-failed-issue.patch new file mode 100644 index 0000000..502c7bd --- /dev/null +++ b/0012-fix-add-group-failed-issue.patch @@ -0,0 +1,27 @@ +From a7e979d343f35dda8aaf0fc864d4e7b2189ed1ab Mon Sep 17 00:00:00 2001 +From: tanyulong2021 +Date: Wed, 1 Mar 2023 15:03:01 +0800 +Subject: [PATCH] fix add group failed issue + +--- + group-manager-server/group_manager_server.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/group-manager-server/group_manager_server.cpp b/group-manager-server/group_manager_server.cpp +index 974ef68..f8051b6 100644 +--- a/group-manager-server/group_manager_server.cpp ++++ b/group-manager-server/group_manager_server.cpp +@@ -100,8 +100,8 @@ bool group_manager_server::add(QString groupName, QString groupId) + QString groupadd = "/usr/sbin/groupadd"; + QString addgroup = "/usr/sbin/addgroup"; + QString command; +- QFile groupaddFile("/usr/sbin/addgroup"); +- QFile addgroupFile("/usr/sbin/groupadd"); ++ QFile groupaddFile("/usr/sbin/groupadd"); ++ QFile addgroupFile("/usr/sbin/addgroup"); + + QProcess p(0); + QStringList args; +-- +2.33.0 + diff --git a/0011-Fix-terminal-garbled-characters.patch b/0013-Fix-terminal-garbled-characters-when-not-root-user-change-locale-language.patch similarity index 67% rename from 0011-Fix-terminal-garbled-characters.patch rename to 0013-Fix-terminal-garbled-characters-when-not-root-user-change-locale-language.patch index 542d144..16781e0 100644 --- a/0011-Fix-terminal-garbled-characters.patch +++ b/0013-Fix-terminal-garbled-characters-when-not-root-user-change-locale-language.patch @@ -1,17 +1,18 @@ -From 67d91670a337d97b0ceab43ba20c886a50618e90 Mon Sep 17 00:00:00 2001 -From: peijiankang -Date: Tue, 18 Oct 2022 11:27:00 +0800 -Subject: [PATCH] Fix terminal garbled characters +From c7f9c64e1c920ed00f434a4acc9e687a9070208b Mon Sep 17 00:00:00 2001 +From: tanyulong2021 +Date: Fri, 17 Mar 2023 09:50:56 +0800 +Subject: [PATCH] Fix terminal garbled characters when not root user change + locale language --- - plugins/time-language/area/area.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + plugins/time-language/area/area.cpp | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp -index 1c10b4e..35777bc 100644 +index df6834d..58704ec 100644 --- a/plugins/time-language/area/area.cpp +++ b/plugins/time-language/area/area.cpp -@@ -229,7 +229,7 @@ void Area::initLanguage() +@@ -184,7 +184,7 @@ void Area::initLanguage() QStringList res = getUserDefaultLanguage(); QString lang = res.at(1); @@ -20,7 +21,7 @@ index 1c10b4e..35777bc 100644 if (0 == langIndex) { chineseFrame->showSelectedIcon(true); -@@ -244,13 +244,13 @@ void Area::initLanguage() +@@ -201,13 +201,13 @@ void Area::initLanguage() connect(chineseFrame, &LanguageFrame::clicked, this, [=](){ englishFrame->showSelectedIcon(false); @@ -36,7 +37,7 @@ index 1c10b4e..35777bc 100644 showMessageBox(2); }); } -@@ -261,7 +261,7 @@ void Area::initComponent() { +@@ -218,7 +218,7 @@ void Area::initComponent() { QStringList res = getUserDefaultLanguage(); QString lang = res.at(1); @@ -44,16 +45,16 @@ index 1c10b4e..35777bc 100644 + int langIndex = lang.split(':').at(0) == "zh_CN.UTF-8" ? 1 : 0; int formatIndex = res.at(0) == "zh_CN.UTF-8" ? 1 : 0; // ui->langcomboBox->setCurrentIndex(langIndex); - ui->countrycomboBox->setCurrentIndex(langIndex); -@@ -380,7 +380,7 @@ QStringList Area::getUserDefaultLanguage() { + ui->countrycomboBox->setCurrentIndex(formatIndex); +@@ -344,6 +344,8 @@ QStringList Area::getUserDefaultLanguage() { + } if(language.isEmpty() && propertyMap.keys().contains("Language")) { language = propertyMap.find("Language").value().toString(); - if(language.isEmpty()) -- language = QLocale::system().name(); -+ language = QLocale::system().name()+ ".UTF-8"; ++ if(language.isEmpty()) ++ language = QLocale::system().name()+ ".UTF-8"; } } else { qDebug() << "reply failed"; -- -2.36.1 +2.33.0 diff --git a/0014-fix-memorysize-of-aboutinfo.patch b/0014-fix-memorysize-of-aboutinfo.patch new file mode 100644 index 0000000..4df21a4 --- /dev/null +++ b/0014-fix-memorysize-of-aboutinfo.patch @@ -0,0 +1,51 @@ +From b37c6f1491e04a28808660b57bb0b51cb23759a3 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Thu, 30 Mar 2023 10:36:31 +0800 +Subject: [PATCH] fix memorysize of aboutinfo + +--- + plugins/system/about/about.cpp | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index 824b781..e783d9b 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -879,20 +879,20 @@ void About::setupKernelCompenent() + QString kernal = QSysInfo::kernelType() + " " + QSysInfo::kernelVersion(); + getTotalMemory(); + +- QDBusInterface *memoryDbus = new QDBusInterface("com.control.center.qt.systemdbus", +- "/", +- "com.control.center.interface", +- QDBusConnection::systemBus(), this); +- if (memoryDbus->isValid()) { +- QDBusReply result = memoryDbus->call("getMemory"); +- qDebug()<<"memory :"<isValid()) { ++// QDBusReply result = memoryDbus->call("getMemory"); ++// qDebug()<<"memory :"<setText(kernal); +-- +2.39.1 + diff --git a/fix-changeOtherUserPasswd-critical-vulnerabilities.patch b/fix-changeOtherUserPasswd-critical-vulnerabilities.patch index 3448a90..a67008e 100644 --- a/fix-changeOtherUserPasswd-critical-vulnerabilities.patch +++ b/fix-changeOtherUserPasswd-critical-vulnerabilities.patch @@ -1,58 +1,51 @@ -From a85afbd3022fb63f8356d0260a2a1d976898ff3f Mon Sep 17 00:00:00 2001 +From 41f79e92846945fe6adf55e25e80c38976a9845a Mon Sep 17 00:00:00 2001 From: peijiankang -Date: Fri, 19 May 2023 15:56:07 +0800 -Subject: [PATCH] fix critical vulnerabilities +Date: Mon, 22 May 2023 10:54:44 +0800 +Subject: [PATCH] fix changeOtherUserPasswd critical vulnerabilities --- - registeredQDbus/sysdbusregister.cpp | 5 +++++ - registeredQDbus/sysdbusregister.h | 4 +++- - 2 files changed, 8 insertions(+), 1 deletion(-) + registeredQDbus/sysdbusregister.cpp | 6 ++++-- + registeredQDbus/sysdbusregister.h | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp -index 1aaefbe..077c8d6 100644 +index 8b05278..476923f 100644 --- a/registeredQDbus/sysdbusregister.cpp +++ b/registeredQDbus/sysdbusregister.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - /* qt会将glib里的signals成员识别为宏,所以取消该宏 - * 后面如果用到signals时,使用Q_SIGNALS代替即可 -@@ -180,6 +181,10 @@ int SysdbusRegister::_changeOtherUserPasswd(QString username, QString pwd){ - } - +@@ -288,7 +288,9 @@ int SysdbusRegister::_changeOtherUserPasswd(QString username, QString pwd){ int SysdbusRegister::changeOtherUserPasswd(QString username, QString pwd){ -+ //密码校验 + + //密码校验 +- if (!checkAuthorization()){ + QDBusConnection conn = connection(); + QDBusMessage msg = message(); -+ _id = conn.interface()->servicePid(msg.service()).value(); ++ if (!checkAuthorization(conn.interface()->servicePid(msg.service()).value())){ + return 0; + } - if (_id == 0){ - return -1; +@@ -356,7 +358,8 @@ bool SysdbusRegister::checkCreateAuthorization() + } + } + +-bool SysdbusRegister::checkAuthorization(){ ++bool SysdbusRegister::checkAuthorization(qint64 id){ ++ _id = id; + + if (_id == 0) + return false; diff --git a/registeredQDbus/sysdbusregister.h b/registeredQDbus/sysdbusregister.h -index a513ada..bffc80b 100644 +index 7942715..0aca90d 100644 --- a/registeredQDbus/sysdbusregister.h +++ b/registeredQDbus/sysdbusregister.h -@@ -28,6 +28,8 @@ - #include - #include - #include -+#include -+#include - - struct brightInfo { - QString serialNum; -@@ -40,7 +42,7 @@ struct displayInfo { - QString edidHash; //edid信息的hash值(md5) - }; - --class SysdbusRegister : public QObject -+class SysdbusRegister : public QObject,QDBusContext - { - Q_OBJECT +@@ -52,7 +52,7 @@ public: + public: + bool checkCreateAuthorization(); +- bool checkAuthorization(); ++ bool checkAuthorization(qint64 id); + bool authoriyLogin(qint64 id); + bool authoriyAutoLogin(qint64 id); + bool authoriyDelete(qint64 id); -- 2.39.1 diff --git a/fix-createuser-critical-vulnerabilities.patch b/fix-createuser-critical-vulnerabilities.patch index bc86f36..c08e307 100644 --- a/fix-createuser-critical-vulnerabilities.patch +++ b/fix-createuser-critical-vulnerabilities.patch @@ -1,53 +1,82 @@ -From 50f91cb252eea20b210fd6acaa12baa95a5b1e3b Mon Sep 17 00:00:00 2001 +From 5b7f91085ed6f4fd6d5a5f3fe0a90fac17dfa64a Mon Sep 17 00:00:00 2001 From: peijiankang -Date: Mon, 22 May 2023 11:13:49 +0800 +Date: Mon, 22 May 2023 14:38:31 +0800 Subject: [PATCH] fix createuser critical vulnerabilities --- - plugins/account/userinfo/userinfo.cpp | 6 +----- - registeredQDbus/sysdbusregister.cpp | 5 +++++ - 2 files changed, 6 insertions(+), 5 deletions(-) + plugins/account/userinfo/changeuserpwd.cpp | 5 +---- + plugins/account/userinfo/createusernew.cpp | 1 - + registeredQDbus/sysdbusregister.cpp | 7 +++++-- + registeredQDbus/sysdbusregister.h | 2 +- + 4 files changed, 7 insertions(+), 8 deletions(-) -diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp -index e9ee51c..2393366 100644 ---- a/plugins/account/userinfo/userinfo.cpp -+++ b/plugins/account/userinfo/userinfo.cpp -@@ -934,7 +934,6 @@ void UserInfo::createUser(QString username, QString pwd, QString pin, int atype) - return; - } +diff --git a/plugins/account/userinfo/changeuserpwd.cpp b/plugins/account/userinfo/changeuserpwd.cpp +index a216449..8017a9b 100644 +--- a/plugins/account/userinfo/changeuserpwd.cpp ++++ b/plugins/account/userinfo/changeuserpwd.cpp +@@ -421,10 +421,7 @@ void ChangeUserPwd::setupConnect(){ + return; + } -- tmpSysinterface->call("setPid", QCoreApplication::applicationPid()); - tmpSysinterface->call("createUser", username, username, atype, DEFAULTFACE, pwd); +- QDBusReply reply = tmpiface.call("setPid", QCoreApplication::applicationPid()); +- if (reply.isValid()){ +- tmpiface.call("changeOtherUserPasswd", name, newPwdLineEdit->text()); +- } ++ tmpiface.call("changeOtherUserPasswd", name, newPwdLineEdit->text()); - delete tmpSysinterface; -@@ -1251,10 +1250,7 @@ void UserInfo::changeUserPwd(QString pwd, QString username){ - qCritical() << "Create Client Interface Failed When : " << QDBusConnection::systemBus().lastError(); - return; - } -- QDBusReply reply = tmpSysinterface->call("setPid", QCoreApplication::applicationPid()); -- if (reply.isValid()){ -- tmpSysinterface->call("changeOtherUserPasswd", username, pwd); -- } -+ tmpSysinterface->call("changeOtherUserPasswd", username, pwd); + this->accept(); + }); +diff --git a/plugins/account/userinfo/createusernew.cpp b/plugins/account/userinfo/createusernew.cpp +index ae378bf..22542ba 100644 +--- a/plugins/account/userinfo/createusernew.cpp ++++ b/plugins/account/userinfo/createusernew.cpp +@@ -376,7 +376,6 @@ void CreateUserNew::setConnect(){ - delete tmpSysinterface; - tmpSysinterface = nullptr; + if (tmpSysinterface.isValid()){ + +- tmpSysinterface.call("setPid", QCoreApplication::applicationPid()); + tmpSysinterface.call("createUser", usernameLineEdit->text(), nicknameLineEdit->text(), typeBtnGroup->checkedId(), DEFAULTFACE, newPwdLineEdit->text()); + + } else { diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp -index 077c8d6..bfe267e 100644 +index 7f26c97..46766c3 100644 --- a/registeredQDbus/sysdbusregister.cpp +++ b/registeredQDbus/sysdbusregister.cpp -@@ -211,6 +211,11 @@ int SysdbusRegister::changeOtherUserPasswd(QString username, QString pwd){ - } - +@@ -303,7 +303,9 @@ int SysdbusRegister::changeOtherUserPasswd(QString username, QString pwd){ int SysdbusRegister::createUser(QString name, QString fullname, int accounttype, QString faceicon, QString pwd){ -+ //密码校验 + + //密码校验 +- if (!checkCreateAuthorization()){ + QDBusConnection conn = connection(); + QDBusMessage msg = message(); -+ _id = conn.interface()->servicePid(msg.service()).value(); -+ - if (_id == 0){ - return -1; ++ if (!checkCreateAuthorization(conn.interface()->servicePid(msg.service()).value())){ + return 0; } + +@@ -336,8 +338,9 @@ int SysdbusRegister::createUser(QString name, QString fullname, int accounttype, + + } + +-bool SysdbusRegister::checkCreateAuthorization() ++bool SysdbusRegister::checkCreateAuthorization(qint64 id) + { ++ _id = id; + + if (_id == 0) + return false; +diff --git a/registeredQDbus/sysdbusregister.h b/registeredQDbus/sysdbusregister.h +index 0aca90d..9c413e6 100644 +--- a/registeredQDbus/sysdbusregister.h ++++ b/registeredQDbus/sysdbusregister.h +@@ -51,7 +51,7 @@ public: + ~SysdbusRegister(); + + public: +- bool checkCreateAuthorization(); ++ bool checkCreateAuthorization(qint64 id); + bool checkAuthorization(qint64 id); + bool authoriyLogin(qint64 id); + bool authoriyAutoLogin(qint64 id); -- 2.39.1 diff --git a/ukui-control-center-3.0.4-fix-invalid-automatic-login.patch b/ukui-control-center-3.0.4-fix-invalid-automatic-login.patch index c533546..41004a6 100644 --- a/ukui-control-center-3.0.4-fix-invalid-automatic-login.patch +++ b/ukui-control-center-3.0.4-fix-invalid-automatic-login.patch @@ -1,17 +1,17 @@ -From afa73b8653f4c6cb82d2e23c0a90f7afab499d0f Mon Sep 17 00:00:00 2001 +From 354eaef4c59308e58792258fc37bfef4d74eaaf5 Mon Sep 17 00:00:00 2001 From: huayadong -Date: Fri, 30 Dec 2022 17:12:01 +0800 -Subject: [PATCH] xx +Date: Wed, 4 Jan 2023 15:03:57 +0800 +Subject: [PATCH] xxxxxxxxxxxxxxxxxx --- - data/95-SeatDefaults.conf | 2 ++ - .../account/userinfo/qtdbus/userdispatcher.cpp | 17 ++++++++++++++++- - .../account/userinfo/qtdbus/userdispatcher.h | 2 +- - plugins/account/userinfo/userinfo.cpp | 7 ++++--- - registeredQDbus/sysdbusregister.cpp | 11 +++++++---- - registeredQDbus/sysdbusregister.h | 2 +- - ukui-control-center.pro | 6 +++++- - 7 files changed, 36 insertions(+), 11 deletions(-) + data/95-SeatDefaults.conf | 2 ++ + .../userinfo/qtdbus/userdispatcher.cpp | 4 ++-- + .../account/userinfo/qtdbus/userdispatcher.h | 2 +- + plugins/account/userinfo/userinfo.cpp | 21 ++++++------------- + registeredQDbus/sysdbusregister.cpp | 10 ++++++--- + registeredQDbus/sysdbusregister.h | 2 +- + ukui-control-center.pro | 6 +++++- + 7 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 data/95-SeatDefaults.conf diff --git a/data/95-SeatDefaults.conf b/data/95-SeatDefaults.conf @@ -23,74 +23,84 @@ index 0000000..bf666a2 +[SeatDefaults] +autologin-user= diff --git a/plugins/account/userinfo/qtdbus/userdispatcher.cpp b/plugins/account/userinfo/qtdbus/userdispatcher.cpp -index f40e8ca..418e4b7 100644 +index a13d4fa..8617b79 100644 --- a/plugins/account/userinfo/qtdbus/userdispatcher.cpp +++ b/plugins/account/userinfo/qtdbus/userdispatcher.cpp -@@ -104,8 +104,23 @@ void UserDispatcher::change_user_name(QString newName){ +@@ -104,7 +104,7 @@ void UserDispatcher::change_user_name(QString newName){ useriface->call("SetRealName", QVariant(newName)); } --void UserDispatcher::change_user_autologin(bool isAutoLogin){ -+void UserDispatcher::change_user_autologin(bool checked, QString isAutoLogin){ - useriface->call("SetAutomaticLogin", QVariant(isAutoLogin)); -+ -+ -+ QDBusInterface * tmpSysinterface = new QDBusInterface("com.control.center.qt.systemdbus", -+ "/", -+ "com.control.center.interface", -+ QDBusConnection::systemBus()); -+ -+ if (!tmpSysinterface->isValid()){ -+ qCritical() << "Create Client Interface Failed When execute gpasswd: " << QDBusConnection::systemBus().lastError(); -+ return; -+ } -+ tmpSysinterface->call("setAutoLoginStatus", checked, isAutoLogin); -+ -+ delete tmpSysinterface; -+ tmpSysinterface = nullptr; - } +-void UserDispatcher::change_user_autologin(QString username){ ++void UserDispatcher::change_user_autologin(bool checked, QString username){ + QDBusInterface * tmpSysinterface = new QDBusInterface("com.control.center.qt.systemdbus", + "/", + "com.control.center.interface", +@@ -114,7 +114,7 @@ void UserDispatcher::change_user_autologin(QString username){ + qCritical() << "Create Client Interface Failed When : " << QDBusConnection::systemBus().lastError(); + return; + } +- tmpSysinterface->call("setAutoLoginStatus", username); ++ tmpSysinterface->call("setAutoLoginStatus", checked, username); - bool UserDispatcher::get_autoLogin_status() { + delete tmpSysinterface; + tmpSysinterface = nullptr; diff --git a/plugins/account/userinfo/qtdbus/userdispatcher.h b/plugins/account/userinfo/qtdbus/userdispatcher.h -index 77fd7fc..d11ca14 100644 +index b498c15..41b2425 100644 --- a/plugins/account/userinfo/qtdbus/userdispatcher.h +++ b/plugins/account/userinfo/qtdbus/userdispatcher.h @@ -51,7 +51,7 @@ public: QString change_user_pwd(QString pwd, QString hint); void change_user_type(int atype); void change_user_face(QString facefile); -- void change_user_autologin(bool isAutoLogin); -+ void change_user_autologin(bool checked, QString isAutoLogin); +- void change_user_autologin(QString username); ++ void change_user_autologin(bool checked, QString username); void change_user_name(QString newName); bool get_autoLogin_status(); diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp -index 6cdbf81..e9ee51c 100644 +index a86088b..9727c00 100644 --- a/plugins/account/userinfo/userinfo.cpp +++ b/plugins/account/userinfo/userinfo.cpp -@@ -579,6 +579,7 @@ void UserInfo::initComponent(){ +@@ -765,11 +765,15 @@ void UserInfo::setUserConnect(){ + Q_UNUSED(checked) + showChangeGroupDialog(); + }); ++ UserInfomation username = allUserInfoMap.value(g_get_user_name()); ++ autoLoginSBtn->setChecked(!getAutomaticLogin().compare(username.username, Qt::CaseSensitive)); - UserInfomation user = allUserInfoMap.value(g_get_user_name()); + //自动登录登录 + connect(autoLoginSBtn, &SwitchButton::checkedChanged, autoLoginSBtn, [=](bool checked){ + UserInfomation user = allUserInfoMap.value(g_get_user_name()); ++ UserDispatcher * userdispatcher = new UserDispatcher(user.objpath); + - UserDispatcher * userdispatcher = new UserDispatcher(user.objpath); + QString autoUser = getAutomaticLogin(); + qDebug() << "Current Auto User:" << autoUser; - bool status = !getAutomaticLogin().compare(user.username, Qt::CaseSensitive); -@@ -591,7 +592,7 @@ void UserInfo::initComponent(){ +@@ -783,20 +787,7 @@ void UserInfo::setUserConnect(){ + return; } - - if ((checked != status)) { -- userdispatcher->change_user_autologin(checked); -+ userdispatcher->change_user_autologin(checked, user.username); - bool status = !getAutomaticLogin().compare(user.username, Qt::CaseSensitive); - autoLoginSwitchBtn->blockSignals(true); - autoLoginSwitchBtn->setChecked(status); -@@ -1301,10 +1302,10 @@ bool UserInfo::eventFilter(QObject *watched, QEvent *event){ - - return QObject::eventFilter(watched, event); - } + } - -+//获取当前用户自动登录属性 +- QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.Accounts", +- user.objpath, +- "org.freedesktop.Accounts.User", +- "SetAutomaticLogin"); +- message << checked; +- QDBusMessage response = QDBusConnection::systemBus().call(message); +- +- if (response.type() == QDBusMessage::ErrorMessage){ +- +- autoLoginSBtn->blockSignals(true); +- autoLoginSBtn->setChecked(!checked); +- autoLoginSBtn->blockSignals(false); +- } ++ userdispatcher->change_user_autologin(checked, user.username); + }); + + //免密登录 +@@ -981,7 +972,7 @@ bool UserInfo::isLastAdmin(QString uname){ + QString UserInfo::getAutomaticLogin() { - QString filename = "/etc/lightdm/lightdm.conf"; @@ -99,48 +109,54 @@ index 6cdbf81..e9ee51c 100644 autoSettings->beginGroup("SeatDefaults"); diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp -index 4eecad5..1aaefbe 100644 +index d928d41..8b05278 100644 --- a/registeredQDbus/sysdbusregister.cpp +++ b/registeredQDbus/sysdbusregister.cpp -@@ -123,13 +123,16 @@ void SysdbusRegister::setNoPwdLoginStatus(bool status,QString username) { +@@ -167,7 +167,7 @@ int SysdbusRegister::setNoPwdLoginStatus(bool status,QString username) } // 设置自动登录状态 --void SysdbusRegister::setAutoLoginStatus(QString username) { +-int SysdbusRegister::setAutoLoginStatus(QString username) { ++int SysdbusRegister::setAutoLoginStatus(bool checked, QString username) { + //密码校验 + QDBusConnection conn = connection(); + QDBusMessage msg = message(); +@@ -175,11 +175,15 @@ int SysdbusRegister::setAutoLoginStatus(QString username) { + if (!authoriyAutoLogin(conn.interface()->servicePid(msg.service()).value())){ + return 0; + } - QString filename = "/etc/lightdm/lightdm.conf"; -+void SysdbusRegister::setAutoLoginStatus(bool checked, QString username) { + QString filename = "/usr/share/lightdm/lightdm.conf.d/95-SeatDefaults.conf"; QSharedPointer autoSettings = QSharedPointer(new QSettings(filename, QSettings::IniFormat)); autoSettings->beginGroup("SeatDefaults"); - autoSettings->setValue("autologin-user", username); -- + if(true == checked){ + autoSettings->setValue("autologin-user", username); + }else{ + autoSettings->setValue("autologin-user", ""); + } + autoSettings->endGroup(); autoSettings->sync(); - } diff --git a/registeredQDbus/sysdbusregister.h b/registeredQDbus/sysdbusregister.h -index b9c9310..a513ada 100644 +index d9fca66..7942715 100644 --- a/registeredQDbus/sysdbusregister.h +++ b/registeredQDbus/sysdbusregister.h -@@ -81,7 +81,7 @@ public slots: +@@ -95,7 +95,7 @@ public slots: Q_SCRIPTABLE QString getNoPwdLoginStatus(); // 设置自动登录状态 -- Q_SCRIPTABLE void setAutoLoginStatus(QString username); -+ Q_SCRIPTABLE void setAutoLoginStatus(bool checked, QString username); +- Q_SCRIPTABLE int setAutoLoginStatus(QString username); ++ Q_SCRIPTABLE int setAutoLoginStatus(bool checked, QString username); + + Q_SCRIPTABLE int DeleteUser(qint64 userId, bool removeWhole); - // 获取挂起到休眠时间 - Q_SCRIPTABLE QString getSuspendThenHibernate(); diff --git a/ukui-control-center.pro b/ukui-control-center.pro -index f3cb239..e6b4585 100644 +index 39966b2..e5c8556 100644 --- a/ukui-control-center.pro +++ b/ukui-control-center.pro -@@ -38,8 +38,12 @@ search_file.files = shell/res/search.xml +@@ -36,8 +36,12 @@ search_file.files = shell/res/search.xml INCLUDEPATH += /usr/lib/gcc/aarch64-linux-gnu/9/include/ @@ -153,7 +169,7 @@ index f3cb239..e6b4585 100644 + lightdm HEADERS += \ - shell/utils/xatom-helper.h + shell/utils/mthread.h \ -- 2.33.0 diff --git a/ukui-control-center-3.0.4.tar.gz b/ukui-control-center-3.1.2.tar.gz similarity index 54% rename from ukui-control-center-3.0.4.tar.gz rename to ukui-control-center-3.1.2.tar.gz index 282e816..84c6c83 100644 Binary files a/ukui-control-center-3.0.4.tar.gz and b/ukui-control-center-3.1.2.tar.gz differ diff --git a/ukui-control-center.spec b/ukui-control-center.spec index 1d2af8e..0b67aaa 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -1,104 +1,68 @@ -%define debug_package %{nil} Name: ukui-control-center -Version: 3.0.4 -Release: 22 +Version: 3.1.2 +Release: 16 Summary: utilities to configure the UKUI desktop License: GPL-2+ URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz -Patch01: 0001-modify-version-info-error.patch -Patch02: 0002-modify-area-info-display-error.patch +Patch01: 0001-fix-compile-error-of-ukui-control-center.patch +Patch02: 0001-modify-version-info-error.patch Patch03: 0003-fix-power-missing-issue.patch -Patch04: 0004-disable-the-str-of-password-check.patch Patch05: 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch -Patch06: 0006-fix-the-problem-that-the-new-user-in-the-control-panel-is-stuck.patch Patch07: 0007-modify-icon-theme-not-display.patch -Patch08: 0008-Fix-preferred-language-default-errors.patch -Patch09: 0009-Fix-the-resolution-donotsave-button-fails.patch +Patch08: ukui-control-center-3.0.4-fix-invalid-automatic-login.patch Patch10: 0010-Fix-the-problem-of-scrambled-shortcut-keys.patch -Patch11: 0011-Fix-terminal-garbled-characters.patch -Patch12: ukui-control-center-3.0.4-fix-invalid-automatic-login.patch -Patch13: fix-changeOtherUserPasswd-critical-vulnerabilities.patch -Patch14: fix-createuser-critical-vulnerabilities.patch +Patch11: 0011-Fix-about-copyright-display-error.patch +Patch12: 0012-fix-add-group-failed-issue.patch +Patch13: 0013-Fix-terminal-garbled-characters-when-not-root-user-change-locale-language.patch +Patch14: 0014-fix-memorysize-of-aboutinfo.patch +Patch15: fix-changeOtherUserPasswd-critical-vulnerabilities.patch +Patch16: fix-createuser-critical-vulnerabilities.patch BuildRequires: qt5-qtsvg-devel -BuildRequires: qt5-qtbase-devel BuildRequires: gsettings-qt-devel BuildRequires: glib2-devel BuildRequires: libmatekbd-devel BuildRequires: qt5-qtx11extras-devel BuildRequires: libxklavier-devel -BuildRequires: kf5-kwindowsystem-devel -BuildRequires: kf5-kwidgetsaddons-devel -BuildRequires: kf5-kconfig-devel -BuildRequires: kf5-kconfigwidgets-devel -BuildRequires: kf5-ki18n-devel BuildRequires: libkscreen-qt5-devel -BuildRequires: qt5-qtdeclarative-devel -BuildRequires: dconf-devel -BuildRequires: edid-decode -BuildRequires: redshift -BuildRequires: libmatemixer-devel -BuildRequires: libqtxdg-devel -BuildRequires: qt5-qtmultimedia-devel -BuildRequires: libxml2-devel -BuildRequires: libcanberra-devel -BuildRequires: kf5-kcoreaddons-devel -BuildRequires: kf5-kguiaddons-devel -BuildRequires: mate-desktop-devel -BuildRequires: libX11-devel -BuildRequires: libxkbcommon-devel -BuildRequires: libxkbfile-devel -BuildRequires: boost-devel -BuildRequires: libxcb-devel -BuildRequires: qt5-linguist -BuildRequires: polkit-qt5-1-devel -BuildRequires: pam-devel -BuildRequires: systemd-devel - +BuildRequires: kf5-ki18n-devel +BuildRequires: kf5-kwindowsystem-devel BuildRequires: kf5-kxmlgui-devel BuildRequires: kf5-kglobalaccel-devel -BuildRequires: kf5-bluez-qt-devel -BuildRequires: opencv -BuildRequires: libddcutil-devel -BuildRequires: upower-devel +BuildRequires: qt5-qtdeclarative-devel +BuildRequires: dconf-devel +BuildRequires: libmatemixer-devel +BuildRequires: libxml2-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: libX11-devel +BuildRequires: libxkbfile-devel +BuildRequires: boost-devel +BuildRequires: qt5-qttools-devel +BuildRequires: libxcb-devel +BuildRequires: polkit-qt5-1-devel +BuildRequires: pulseaudio-libs-devel BuildRequires: libpwquality-devel - - +BuildRequires: xorg-x11-server-devel +BuildRequires: upower-devel +BuildRequires: pam-devel +BuildRequires: ukui-interface +BuildRequires: mate-desktop-devel +BuildRequires: libddcutil-devel +BuildRequires: libkylin-chkname-devel +BuildRequires: cups-devel +#compile need but control is not exist +BuildRequires: kf5-kguiaddons-devel Requires: dconf -Requires: qt5-qtimageformats -Requires: qt5-qtsvg-devel -Requires: gsettings-qt-devel -Requires: glib2-devel -Requires: libmatekbd-devel -Requires: qt5-qtx11extras-devel -Requires: libxklavier-devel -Requires: kf5-kwindowsystem-devel -Requires: kf5-kwidgetsaddons-devel -Requires: kf5-kconfig-devel -Requires: kf5-kconfigwidgets-devel -Requires: kf5-ki18n-devel -Requires: libkscreen-qt5-devel -Requires: qt5-qtdeclarative-devel -Requires: dconf-devel -Requires: edid-decode -Requires: redshift -Requires: libmatemixer-devel -Requires: libqtxdg-devel -Requires: qt5-qtmultimedia-devel -Requires: libxml2-devel -Requires: network-manager-applet -Requires: libcanberra-devel -Requires: qt5-qtgraphicaleffects -Requires: qt5-qtquickcontrols +Requires: ukui-search +Requires: kylin-nm +Requires: ukui-bluetooth +Requires: ukui-media +Requires: ukui-themes +#install need but control is not exist +Requires: libkylin-chkname1 -Requires: ddcutil -Requires: glib2 -Requires: systemd-pam - - -Recommends: qt5-qtquickcontrols Suggests: gsettings-desktop-schemas Suggests: mate-common @@ -106,7 +70,6 @@ Suggests: ukui-power-manager Suggests: ukui-session-manager Suggests: ukui-screensaver Suggests: ukui-settings-daemon -#Suggests: qt5-qtgraphicaleffects %description @@ -115,16 +78,21 @@ Suggests: ukui-settings-daemon and mouse properties, sound setup, desktop theme and background, user interface properties, screen resolution, and other UKUI parameters. +%package -n libukcc-devel +Summary: libukcc +%description -n libukcc-devel +The UKUI control center contains configuration applets for the UKUI des allowing to set accessibility configuration, desktop fonts, keyboard and mouse properties, sound setup, desktop theme and background, user interface properties, screen resolution, and other UKUI parameters. + %prep %autosetup -n %{name}-%{version} -p1 %build -qmake-qt5 -make -j4 +%{qmake_qt5} +%{make_build} %install rm -rf $RPM_BUILD_ROOT -make INSTALL_ROOT=%{buildroot} install +%{make_install} INSTALL_ROOT=%{buildroot} mkdir -p %{buildroot}/etc/xdg/autostart/ @@ -132,115 +100,123 @@ mkdir -p %{buildroot}/etc/xdg/autostart/ set -e glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null ||: +systemctl enable ukui-group-manager.service +systemctl start ukui-group-manager.service chown root:root /usr/bin/checkUserPwd chmod u+s /usr/bin/checkUserPwd +sed -i "1iauth sufficient pam_succeed_if.so user ingroup nopasswdlogin" /etc/pam.d/lightdm +groupadd nopasswdlogin &> /dev/null ||: + gsettings set org.ukui.power-manager sleep-computer-battery 0 &> /dev/null ||: gsettings set org.ukui.power-manager sleep-computer-ac 0 &> /dev/null ||: -sed -i "1iauth sufficient pam_succeed_if.so user ingroup nopasswdlogin" /etc/pam.d/lightdm - -groupadd nopasswdlogin &> /dev/null ||: - %postun sed -i "/auth sufficient pam_succeed_if.so user ingroup nopasswdlogin/d" /etc/pam.d/lightdm +systemctl disable ukui-group-manager.service +systemctl stop ukui-group-manager.service %clean rm -rf $RPM_BUILD_ROOT %files %{_sysconfdir}/dbus-1/system.d/* -%{_bindir}/launchSysDbus -%{_bindir}/ukui-control-center -%{_libdir}/ukui-control-center/* +%{_sysconfdir}/pam.d/* +/lib/systemd/system/* +%{_bindir}/* %{_datadir}/applications/* %{_datadir}/dbus-1/system-services/* +%{_datadir}/dbus-1/services/* %{_datadir}/glib-2.0/schemas/* -%{_datadir}/locale/zh_CN/LC_MESSAGES/* -%{_datadir}/ukui/faces/* -%{_datadir}/ukui-control-center/shell/res/i18n -%{_bindir}/group-manager-server -%{_bindir}/checkUserPwd -%{_datadir}/polkit-1/actions/org.ukui.groupmanager.policy -%{_sysconfdir}/pam.d/control-center -/lib/systemd/system/ukui-group-manager.service -%{_bindir}/changeotheruserpwd -%{_bindir}/changeuserpwd -%{_bindir}/childCheckpwdwithPAM -%{_bindir}/ukui-control-center-session -%{_datadir}/dbus-1/services/org.ukui.ukcc.session.service %{_datadir}/kylin-user-guide/data/* -%{_datadir}/polkit-1/actions/com.control.center.qt.systemdbus.policy -%{_datadir}/ukui-control-center/shell/res/search.xml +%{_datadir}/locale/zh_CN/LC_MESSAGES/* +%{_datadir}/polkit-1/actions/* +%{_datadir}/ukui/faces/* +%{_datadir}/ukui-control-center/shell/res/* +%{_libdir}/ukui-control-center/* %{_datadir}/lightdm/lightdm.conf.d/95-SeatDefaults.conf +%files -n libukcc-devel +%{_includedir}/ukcc/interface/*.h +%{_includedir}/ukcc/widgets/*.h +%{_libdir}/libukcc* + %changelog -* Mon May 22 2023 peijiankang - 3.0.4-22 +* Mon May 22 2023 peijiankang - 3.1.2-16 - fix createuser critical vulnerabilities -* Mon May 15 2023 peijiankang - 3.0.4-21 +* Mon May 22 2023 peijiankang - 3.1.2-15 - fix changeOtherUserPasswd critical vulnerabilities -* Tue Jan 10 2023 huayadong - 3.0.4-20 -- repair installation %post warning +* Thu Mar 30 2023 peijiankang - 3.1.2-14 +- fix memorysize of aboutinfo -* Fri Dec 30 2022 huayadong - 3.0.4-19 -- Fix invalid automatic login +* Fri Mar 17 2023 tanyulong - 3.1.2-13 +- Fix terminal garbled characters when not root user change locale language -* Mon Dec 12 2022 huayadong - 3.0.4-18 -- fix invalid password free login +* Wed Mar 01 2023 peijiankang - 3.1.2-12 +- add build debuginfo and debugsource -* Mon Dec 12 2022 douyan - 3.0.4-17 -- change power default settings +* Wed Mar 01 2023 tanyulong - 3.1.2-11 +- fix add group failed issue -* Tue Oct 18 2022 peijiankang - 3.0.4-16 -- Fix terminal garbled characters +* Mon Feb 27 2023 tanyulong - 3.1.2-10 +- Fix about copyright display error -* Mon Aug 15 2022 peijiankang - 3.0.4-15 -- Fix the problem of scrambled shortcut keys +* Tue Feb 7 2023 douyan - 3.1.2-9 +- change power default setting -* Thu Jul 21 2022 peijiankang - 3.0.4-14 -- rebuild +* Mon Jan 9 2023 peijiankang - 3.1.2-8 +- add patch10: 0010-Fix-the-problem-of-scrambled-shortcut-keys.patch -* Wed Jul 20 2022 peijiankang - 3.0.4-13 -- Fix the resolution donotsave button fails +* Fri Dec 30 2022 huayadong - 3.1.2-7 +- Fix invalid automatic login, fix invalid password free login -* Mon Jul 18 2022 peijiankang - 3.0.4-12 -- Fix preferred language default errors - -* Tue Jun 28 2022 peijiankang - 3.0.4-11 -- update about.png for openEuler - -* Tue Apr 19 2022 pei-jiankang - 3.0.4-10 -- modify ukui-control-center install error - -* Wed Apr 6 2022 pei-jiankang - 3.0.4-9 +* Thu Dec 29 2022 peijiankang - 3.1.2-6 - modify icon theme not display -* Fri Mar 11 2022 huayadong - 3.0.4-8 -- add patch6: 0006-fix-the-problem-that-the-new-user-in-the-control-panel-is-stuck.patch +* Fri Dec 23 2022 peijiankang - 3.1.2-5 +- add patch5: 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch -* Wed Mar 09 2022 huayadong - 3.0.4-7 -- add patch5: 0004-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch - -* Wed Mar 09 2022 pei-jiankang - 3.0.4-6 -- modify audio-info display - -* Tue Mar 08 2022 tanyulong - 3.0.4-5 -- fix no checkuserpwd directory - -* Wed Mar 2 2022 douyan - 3.0.4-4 +* Thu Dec 15 2022 peijiankang - 3.1.2-4 - fix power missing issue -* Tue Mar 1 2022 pei-jiankang - 3.0.4-3 -- modify area-info display error +* Fri Dec 9 2022 peijiankang - 3.1.2-3 +- add libkylin-chkname1 Requires to fix useradd error -* Tue Mar 1 2022 pei-jiankang - 3.0.4-2 +* Fri Dec 9 2022 peijiankang - 3.1.2-2 - modify version-info error -* Wed Jan 26 2022 huayadong - 3.0.4-1 -- update to upstream version 3.0.4-1 +* Mon Dec 5 2022 peijiankang - 3.1.2-1 +- update version to 3.1.2 + +* Mon Aug 08 2022 tanyulong - 3.0.1-29 +- update and modify translations + +* Thu Aug 04 2022 tanyulong - 3.0.1-28 +- fix and update translation + +* Fri Jul 29 2022 tanyulong - 3.0.1-27 +- modify displayed size after the installation and download of system update completed + +* Thu Jul 28 2022 tanyulong - 3.0.1-26 +- add dependency ddcutil to make HDMI brightness adjustment available + +* Tue Jun 28 2022 peijiankang - 3.0.1-25 +- update about.png for openEuler + +* Fri Apr 29 2022 huayadong - 3.0.1-24 +- Modify the icon displayed on the tray + +* Tue Apr 19 2022 pei-jiankang - 3.0.1-23 +- modify ukui-control-center install error + +* Fri Mar 25 2022 huayadong - 3.0.1-22 +- The shortcut keys of the same function are combined together + +* Thu Oct 28 2021 tanyulong - 3.0.1-21 +- fix net sort wifi strength * Tue Oct 19 2021 peijiankang - 3.0.1-20 - add 0014-modify-the-error-of-ukui-control-center-open.patch diff --git a/ukui-control-center.yaml b/ukui-control-center.yaml new file mode 100644 index 0000000..d2ae47b --- /dev/null +++ b/ukui-control-center.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: ukui/ukui-control-center +tag_prefix: "^v" +separator: "." diff --git a/ukui-group-manager.desktop b/ukui-group-manager.desktop deleted file mode 100644 index 3c61dc8..0000000 --- a/ukui-group-manager.desktop +++ /dev/null @@ -1,18 +0,0 @@ -[Desktop Entry] -Name=ukui-group-manager -Comment=ukui-group-manager -Exec=/usr/bin/group-manager-server -Terminal=false -Type=Application -Keywords=UKUI; -NoDisplay=true -OnlyShowIn=UKUI; -X-UKUI-Autostart-Phase=Application -X-UKUI-Bugzilla-Bugzilla=UKUI -X-MATE-Autostart-Phase=Applications -X-KDE-autostart-after=panel -X-UKUI-Autostart-Notify=true -X-UKUI-Autostart-Delay=3 -X-UKUI-AutoRestart=true - -