From d0bb41024332f8673efec21ee799135ed6bc3317 Mon Sep 17 00:00:00 2001 From: lizixin <2271170409@qq.com> Date: Mon, 10 Mar 2025 17:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E5=8C=BA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BB=A5=E5=8F=8A=E7=89=88=E6=9C=AC=E5=8F=B7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-Devstation-25.03-fix-timezoneErrors.patch | 139 ++++++++++++++++++ calamares.spec | 7 +- 2 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 0016-Devstation-25.03-fix-timezoneErrors.patch diff --git a/0016-Devstation-25.03-fix-timezoneErrors.patch b/0016-Devstation-25.03-fix-timezoneErrors.patch new file mode 100644 index 0000000..0a7270e --- /dev/null +++ b/0016-Devstation-25.03-fix-timezoneErrors.patch @@ -0,0 +1,139 @@ +From 42591e54c5fd8b4491fb81dcdb5ade3a0caa46aa Mon Sep 17 00:00:00 2001 +From: lizixin <2271170409@qq.com> +Date: Mon, 10 Mar 2025 11:31:39 +0800 +Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85=E7=A8=8B?= + =?UTF-8?q?=E5=BA=8F=E7=89=88=E6=9C=AC=E5=8F=B7=E6=98=BE=E7=A4=BA=E9=97=AE?= + =?UTF-8?q?=E9=A2=98?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + CMakeLists.txt | 4 ++++ + src/branding/default/branding.desc | 4 ++-- + src/modules/partition/gui/ChoicePage.cpp | 20 +++++++++++--------- + 3 files changed, 17 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 40ae7e052..9e54345ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -686,6 +686,10 @@ install(FILES calamares.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/application + + install(FILES man/calamares.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/) + ++install(FILES lang/tz_zh_CN.ts DESTINATION /usr/share/calamares) ++ ++install(FILES lang/tz_zh_TW.ts DESTINATION /usr/share/calamares) ++ + if(INSTALL_CONFIG) + install(FILES settings.conf DESTINATION share/calamares) + endif() +diff --git a/src/branding/default/branding.desc b/src/branding/default/branding.desc +index 9f0843385..412252678 100644 +--- a/src/branding/default/branding.desc ++++ b/src/branding/default/branding.desc +@@ -125,8 +125,8 @@ strings: + shortProductName: Generic + version: 24.09 + shortVersion: 24.09 +- versionedName: openEuler-24.09 +- shortVersionedName: openEuler 24.09 ++ versionedName: openEuler-25.03 ++ shortVersionedName: openEuler 25.03 + bootloaderEntryName: openEuler + productUrl: https://openeuler.org/ + supportUrl: null +diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp +index 6185d3ff5..e5fc25870 100644 +--- a/src/modules/partition/gui/ChoicePage.cpp ++++ b/src/modules/partition/gui/ChoicePage.cpp +@@ -41,6 +41,7 @@ + #include "utils/Retranslator.h" + #include "utils/Units.h" + #include "widgets/PrettyRadioButton.h" ++#include "utils/System.h" + + #include + #include +@@ -1272,7 +1273,8 @@ void + ChoicePage::setupActions() + { + Logger::Once o; +- ++ auto rse = Calamares::System::runCommand({"cat", "/etc/os-release"}, std::chrono::seconds(30)); ++ QString osVersion = rse.getOutput().split("PRETTY_NAME=\"")[1].split("\"\n")[0].replace(" ", "-"); + Device* currentDevice = selectedDevice(); + OsproberEntryList osproberEntriesForCurrentDevice = getOsproberEntriesForDevice( currentDevice ); + +@@ -1350,11 +1352,11 @@ ChoicePage::setupActions() + + m_alongsideButton->setText( tr( "Install alongside
" + "The installer will shrink a partition to make room for %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ++ .arg( osVersion ) ); + + m_replaceButton->setText( tr( "Replace a partition
" + "Replaces a partition with %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ); ++ .arg( osVersion ) ); ); + + m_replaceButton->hide(); + m_alongsideButton->hide(); +@@ -1379,7 +1381,7 @@ ChoicePage::setupActions() + + m_alongsideButton->setText( tr( "Install alongside
" + "The installer will shrink a partition to make room for %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ++ .arg( osVersion ) ); + + m_eraseButton->setText( tr( "Automatic partitioning
" + "This will delete all data " +@@ -1387,7 +1389,7 @@ ChoicePage::setupActions() + + m_replaceButton->setText( tr( "Replace a partition
" + "Replaces a partition with %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ); ++ .arg( osVersion ) ); ); + } + else + { +@@ -1400,7 +1402,7 @@ ChoicePage::setupActions() + + m_alongsideButton->setText( tr( "Install alongside
" + "The installer will shrink a partition to make room for %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ++ .arg( osVersion ) ); + + m_eraseButton->setText( tr( "Automatic partitioning
" + "This will delete all data " +@@ -1408,7 +1410,7 @@ ChoicePage::setupActions() + + m_replaceButton->setText( tr( "Replace a partition
" + "Replaces a partition with %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ); ++ .arg( osVersion ) ); ); + } + } + else +@@ -1425,7 +1427,7 @@ ChoicePage::setupActions() + + m_alongsideButton->setText( tr( "Install alongside
" + "The installer will shrink a partition to make room for %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ++ .arg( osVersion ) ); + + m_eraseButton->setText( tr( "Automatic partitioning
" + "This will delete all data " +@@ -1433,7 +1435,7 @@ ChoicePage::setupActions() + + m_replaceButton->setText( tr( "Replace a partition
" + "Replaces a partition with %1." ) +- .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ); ++ .arg( osVersion ) ); ); + } + + #ifdef DEBUG_PARTITION_UNSAFE +-- +2.46.0 + diff --git a/calamares.spec b/calamares.spec index b6d198b..7aeaa27 100644 --- a/calamares.spec +++ b/calamares.spec @@ -2,7 +2,7 @@ Name: calamares Version: 3.3.7 -Release: 5 +Release: 6 Summary: Installer from a live CD/DVD/USB to disk License: GPL-3.0-or-later @@ -57,7 +57,7 @@ Patch11: 0012-replace-icon.patch Patch12: 0013-1230.patch Patch13: 0014-setRepoSource.patch Patch14: 0015-requireDiskScan.patch - +Patch15: 0016-Devstation-25.03-fix-timezoneErrors.patch # Calamares is only supported where live images (and GRUB) are. (#1171380) # This list matches the arches where grub2-efi is used to boot the system ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 @@ -349,6 +349,9 @@ cd %{_builddir} || exit 0 rm -rf %{buildroot} %changelog +* Mon Mar 10 2025 Li Zixin <2271170409@qq.com> - 3.3.7-6 +- fix timezone and release version problems + * Thu Feb 27 2025 Li Zixin <2271170409@qq.com> - 3.3.7-5 - Update calamares.service -- Gitee