Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ jobs:
run: '"$GOBIN/actionlint" -color'
- name: Check CI scripts
run: |
if ! command -v cpio >/dev/null || ! /usr/bin/python3 -c 'from PIL import Image' 2>/dev/null; then
if ! command -v cpio >/dev/null || ! command -v gawk >/dev/null || ! command -v script >/dev/null || ! /usr/bin/python3 -c 'from PIL import Image' 2>/dev/null; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends cpio python3-pil
sudo apt-get install -y --no-install-recommends cpio gawk util-linux python3-pil
fi
shellcheck scripts/ci/{install,smoke,arch-host}.sh tools/build/arch-{root,libreliefos,paru,desktop,filesystem,kernel,boot}.sh \
tools/build/arch-image{,-build}.sh tools/build/arch-installer-build.sh \
Expand Down
5 changes: 5 additions & 0 deletions Documentation/admin-guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ F3 继续、F2 返回修改,PgUp/PgDn 滚动页面或许可证。界面适
进度页显示分区、下载、验签、包事务、配置及引导安装等阶段。
安装失败时保留错误详情,完整日志位于安装环境的 ``/var/log/installer.log``。

下载和安装阶段按 pacman 的实际进度更新总进度条,下方另有当前软件包的百分比进度条。
下载时显示待下载、已下载数量、当前软件包,以及下载量、传输速度和预计剩余时间;
安装时切换为待安装、已安装数量和当前包的安装百分比。已缓存的软件包无需重新下载,
下载数量可以少于安装数量。包事务完成后继续显示配置及引导安装进度。

图形安装器可随时通过侧栏的“查看日志 (F4)”按钮或 F4 打开独立日志窗口,
安装期间和结果页面均可使用;关闭日志窗口不会退出安装器或中断安装。
窗口显示最近约 8 KiB 日志,默认每秒刷新并跟随新内容;取消“跟随日志”可暂停阅读,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,6 @@ msgstr "The graphical entry of the installation ISO starts Xorg through systemd

msgid "图形安装器可随时通过侧栏的“查看日志 (F4)”按钮或 F4 打开独立日志窗口, 安装期间和结果页面均可使用;关闭日志窗口不会退出安装器或中断安装。 窗口显示最近约 8 KiB 日志,默认每秒刷新并跟随新内容;取消“跟随日志”可暂停阅读, 也可点击“刷新”手动更新。日志可滚动和复制,完整内容仍保存在上述日志文件中。 控制台安装器在进度页用 F4 显示或隐藏日志。"
msgstr "In the graphical installer, use the sidebar’s “View log (F4)” button or F4 to open a separate log window at any time, including during installation and on the result page. Closing it does not exit the installer or interrupt installation. The window displays approximately the latest 8 KiB of the log, refreshing once per second and following new output by default. Clear “Follow log” to pause reading, or click “Refresh” to update manually. You can scroll and copy the log; the complete contents remain in the log file above. In the console installer, F4 shows or hides the log on the progress page."

msgid "下载和安装阶段按 pacman 的实际进度更新总进度条,下方另有当前软件包的百分比进度条。 下载时显示待下载、已下载数量、当前软件包,以及下载量、传输速度和预计剩余时间; 安装时切换为待安装、已安装数量和当前包的安装百分比。已缓存的软件包无需重新下载, 下载数量可以少于安装数量。包事务完成后继续显示配置及引导安装进度。"
msgstr "During downloads and installation, the overall progress bar follows pacman’s actual progress, with a second bar for the current package. Download details show pending and completed downloads, the current package, transferred size, speed, and estimated remaining time. Installation details show pending and installed package counts and the current package’s installation percentage. Cached packages do not need to be downloaded again, so fewer packages may be downloaded than installed. After the package transaction, progress continues through system configuration and bootloader installation."
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,6 @@ msgstr "インストール ISO のグラフィカル起動では、systemd が X

msgid "图形安装器可随时通过侧栏的“查看日志 (F4)”按钮或 F4 打开独立日志窗口, 安装期间和结果页面均可使用;关闭日志窗口不会退出安装器或中断安装。 窗口显示最近约 8 KiB 日志,默认每秒刷新并跟随新内容;取消“跟随日志”可暂停阅读, 也可点击“刷新”手动更新。日志可滚动和复制,完整内容仍保存在上述日志文件中。 控制台安装器在进度页用 F4 显示或隐藏日志。"
msgstr "グラフィカルインストーラーでは、サイドバーの「ログを表示 (F4)」ボタンまたは F4 で、インストール中や結果画面を含め、いつでも独立したログウィンドウを開けます。ログウィンドウを閉じても、インストーラーは終了せず、インストールも中断しません。直近の約 8 KiB のログを表示し、既定では毎秒更新して新しい出力を追尾します。「ログを追尾」を解除すると表示を一時停止でき、「更新」で手動更新できます。ログはスクロールとコピーが可能で、完全な内容は上記のログファイルに保存されます。コンソールインストーラーでは、進捗ページで F4 を押すとログを表示または非表示にします。"

msgid "下载和安装阶段按 pacman 的实际进度更新总进度条,下方另有当前软件包的百分比进度条。 下载时显示待下载、已下载数量、当前软件包,以及下载量、传输速度和预计剩余时间; 安装时切换为待安装、已安装数量和当前包的安装百分比。已缓存的软件包无需重新下载, 下载数量可以少于安装数量。包事务完成后继续显示配置及引导安装进度。"
msgstr "ダウンロードとインストール中は、pacman の実際の進捗に従って全体の進捗バーが更新され、その下に現在のパッケージの進捗バーが表示されます。ダウンロード中は未完了・完了済みの件数、現在のパッケージ、転送量、速度、推定残り時間を表示します。インストール中は未インストール・インストール済みの件数と現在のパッケージのインストール率に切り替わります。キャッシュ済みのパッケージは再ダウンロードが不要なため、ダウンロード件数はインストール件数より少なくなる場合があります。パッケージ処理が完了すると、システム設定とブートローダーのインストールの進捗を表示します。"
64 changes: 64 additions & 0 deletions configs/nls/po/installer/installer.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1185,3 +1185,67 @@ msgstr ""
#: userland/apps/installer/installer_plan.c:425
msgid "unformatted"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for download list"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package list"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending downloads: %u"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending packages: %u"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloaded packages: %u"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installed packages: %u"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
msgid "Verifying downloaded packages"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
msgid "Package installation complete"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloading: %s (%u%%)"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installing: %s (%u%%)"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package transaction"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Current download: %s"
msgstr ""

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Total download: %s"
msgstr ""

#: userland/apps/installer/install_ops.c
msgid "Running package hooks"
msgstr ""
64 changes: 64 additions & 0 deletions configs/nls/po/installer/ja_JP.po
Original file line number Diff line number Diff line change
Expand Up @@ -1264,3 +1264,67 @@ msgstr "root パスワード"
#: userland/apps/installer/installer_plan.c:425
msgid "unformatted"
msgstr "未フォーマット"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for download list"
msgstr "ダウンロード一覧を取得しています"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package list"
msgstr "パッケージ一覧を取得しています"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending downloads: %u"
msgstr "未ダウンロード:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending packages: %u"
msgstr "未インストール:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloaded packages: %u"
msgstr "ダウンロード済み:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installed packages: %u"
msgstr "インストール済み:%u"

#: userland/apps/installer/installer_package_progress.c
msgid "Verifying downloaded packages"
msgstr "ダウンロードしたパッケージを検証しています"

#: userland/apps/installer/installer_package_progress.c
msgid "Package installation complete"
msgstr "パッケージのインストールが完了しました"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloading: %s (%u%%)"
msgstr "ダウンロード中:%s(%u%%)"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installing: %s (%u%%)"
msgstr "インストール中:%s(%u%%)"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package transaction"
msgstr "パッケージ処理を待機しています"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Current download: %s"
msgstr "現在のダウンロード:%s"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Total download: %s"
msgstr "ダウンロード全体:%s"

#: userland/apps/installer/install_ops.c
msgid "Running package hooks"
msgstr "パッケージフックを実行しています"
64 changes: 64 additions & 0 deletions configs/nls/po/installer/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -1262,3 +1262,67 @@ msgstr "root 密码"
#: userland/apps/installer/installer_plan.c:425
msgid "unformatted"
msgstr "未格式化"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for download list"
msgstr "等待下载列表"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package list"
msgstr "等待软件包列表"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending downloads: %u"
msgstr "待下载软件包:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Pending packages: %u"
msgstr "待安装软件包:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloaded packages: %u"
msgstr "已下载软件包:%u"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installed packages: %u"
msgstr "已安装软件包:%u"

#: userland/apps/installer/installer_package_progress.c
msgid "Verifying downloaded packages"
msgstr "正在验证已下载的软件包"

#: userland/apps/installer/installer_package_progress.c
msgid "Package installation complete"
msgstr "软件包安装完成"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Downloading: %s (%u%%)"
msgstr "正在下载:%s(%u%%)"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Installing: %s (%u%%)"
msgstr "正在安装:%s(%u%%)"

#: userland/apps/installer/installer_package_progress.c
msgid "Waiting for package transaction"
msgstr "等待软件包事务"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Current download: %s"
msgstr "当前下载:%s"

#: userland/apps/installer/installer_package_progress.c
#, c-format
msgid "Total download: %s"
msgstr "下载总计:%s"

#: userland/apps/installer/install_ops.c
msgid "Running package hooks"
msgstr "正在运行软件包钩子"
2 changes: 2 additions & 0 deletions packages/arch/reliefos-apps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ package_reliefos-installer() {
install_app installer
install -Dm755 "$RELIEFOS_SOURCE_ROOT/userland/apps/installer/arch-online-install.sh" \
"$pkgdir/usr/libexec/reliefos/arch-online-install"
install -Dm644 "$RELIEFOS_SOURCE_ROOT/userland/apps/installer/arch-package-progress.awk" \
"$pkgdir/usr/libexec/reliefos/arch-package-progress.awk"
install -Dm644 "$RELIEFOS_SOURCE_ROOT/tools/build/arch-guest-packages.sh" \
"$pkgdir/usr/libexec/reliefos/arch-guest-packages"
install -Dm644 "$RELIEFOS_SOURCE_ROOT/tools/build/arch-applications.list" \
Expand Down
2 changes: 1 addition & 1 deletion system/installer/icewm/preferences
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A dedicated live session; do not start installed-desktop applications.
ShowTaskBar=1
TaskBarShowStartMenu=0
TaskBarShowStartMenu=1
TaskBarShowWindowListMenu=1
TaskBarShowMailboxStatus=0
TaskBarShowCPUStatus=0
Expand Down
4 changes: 3 additions & 1 deletion tools/build/arch-guest-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ reliefos_guest_packages() {
local -a application_packages glibc_only_packages
reliefos_application_packages installer || return
local_packages+=("${application_packages[@]}")
official_packages+=(core/grub extra/icewm extra/xorg-server extra/xorg-xinit extra/xorg-xauth
# FLTK creates core X11 cursors from the cursor font. TTF fonts
# alone do not supply it, even when the WM's pointer is visible.
official_packages+=(core/grub extra/icewm extra/xorg-server extra/xorg-xinit extra/xorg-xauth extra/xorg-fonts-misc
extra/xf86-video-fbdev extra/xf86-input-evdev extra/ttf-dejavu)
;;
console) ;;
Expand Down
56 changes: 55 additions & 1 deletion tools/test_installer_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,59 @@


class InstallerInputTests(unittest.TestCase):
def test_package_telemetry_validates_counters_and_partial_install_progress(self):
with tempfile.TemporaryDirectory(prefix="installer-packages-") as tmp:
executable = Path(tmp) / "packages"
subprocess.run([
"cc", "-std=c11", "-O1", "-g", "-Wall", "-Wextra", "-Werror",
"-fsanitize=address,undefined", "-fno-sanitize-recover=all",
"tools/tests/installer_package_progress_test.c",
"userland/apps/installer/installer_package_progress.c", "-o", executable,
], cwd=ROOT, check=True)
subprocess.run([executable], cwd=ROOT, check=True, timeout=10)

def test_pacman_redraws_report_parallel_downloads_and_failed_hooks(self):
with tempfile.TemporaryDirectory(prefix="installer-pacman-") as tmp:
marker = Path(tmp) / "downloaded"
collector = ["awk", "-v", "total=3", "-v", f"marker={marker}",
"-f", "userland/apps/installer/arch-package-progress.awk"]
trace = (
":: Retrieving packages...\r\n"
" Total (0/2) 0.0 KiB 0 KiB/s 00:00 [---] 0%\r"
"\033[2A alpha-1.0-1-x86_64 2.0 MiB 1.0 MiB/s 00:02 [#--] 25%\r"
" Total (0/2) 6.0 MiB 2.0 MiB/s 00:02 [##-] 60%\r"
" beta-1.0-1-x86_64 1.0 MiB 1.0 MiB/s 00:00 [###] 100%\r"
" Total (1/2) 7.0 MiB 2.0 MiB/s 00:01 [##-] 70%\r"
" alpha-1.0-1-x86_64 9.0 MiB 2.0 MiB/s 00:00 [###] 100%\r"
" Total (2/2) 10.0 MiB 2.0 MiB/s 00:00 [###] 100%\r"
"(3/3) checking package integrity [###] 100%\r\n"
":: Processing package changes...\r\n"
"(1/3) installing alpha [---] 0%\r"
"(1/3) installing alpha [#--] 50%\r"
"(1/3) installing alpha [###] 100%\r\n"
"(2/3) installing beta [###] 100%\r\n"
"(3/3) installing cached [###] 100%\r\n"
":: Running post-transaction hooks...\r\n"
)
result = subprocess.run(collector, input=trace, capture_output=True, text=True,
cwd=ROOT, check=True)
self.assertNotIn("\x1b", result.stdout)
records = [line.split("\t") for line in result.stdout.splitlines()
if line.startswith("@reliefos-package ")]
self.assertTrue(marker.is_file())
self.assertTrue(any(row[0] == "@reliefos-package 1 3 0 2 0 25 60"
and row[1] == "alpha-1.0-1-x86_64" for row in records))
self.assertTrue(any(row[0] == "@reliefos-package 3 3 0 2 2 50 100"
and row[1] == "alpha" for row in records))
self.assertEqual(records[-1][0], "@reliefos-package 4 3 3 2 2 100 100")
single = subprocess.run(collector, input=" solo 2.0 MiB 1.0 MiB/s 00:00 [###] 100%\r",
capture_output=True, text=True, cwd=ROOT, check=True)
self.assertIn("@reliefos-package 1 3 0 1 1 100 100", single.stdout)
failed = subprocess.run(collector, input=trace + "error: hook failed\r\n",
capture_output=True, text=True, cwd=ROOT)
self.assertNotEqual(failed.returncode, 0)
self.assertIn("error: hook failed", failed.stdout)

def test_wrapped_labels_preserve_words_utf8_and_reflow(self):
"""Keep all label text visible as width, language and font metrics change."""
import os
Expand Down Expand Up @@ -87,7 +140,8 @@ def test_installer_progress_tracks_online_packages(self):
"cc", "-std=gnu11", "-D_GNU_SOURCE", "-O1", "-g",
"-ffunction-sections", "-fdata-sections", "-Wl,--gc-sections",
*INSTALLER_HOST_INCLUDES,
"tools/tests/installer_progress_test.c", "-o", executable,
"tools/tests/installer_progress_test.c",
"userland/apps/installer/installer_package_progress.c", "-o", executable,
], cwd=ROOT, check=True)
subprocess.run([executable, tmp], cwd=ROOT, check=True, timeout=10)

Expand Down
2 changes: 1 addition & 1 deletion tools/test_installer_swap_host_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
compat.write_text('#include <sys/mount.h>\n')
sources=['install_ops.c','installer_capacity.c','installer_swap.c','installer_swap_bundle.c',
'installer_swap_config.c','installer_swap_prepare.c','installer_swap_storage.c','installer_tty.c',
'installer_tui.c','installer_tui_job.c','installer_job.c','installer_log.c']
'installer_tui.c','installer_tui_job.c','installer_job.c','installer_log.c','installer_package_progress.c']
for name in sources:
selected_headers=base_headers if name=='installer_swap_storage.c' else headers
# glibc must see the XSI feature level before the forced include.
Expand Down
2 changes: 1 addition & 1 deletion tools/test_installer_swap_tty.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

def compile_fixture(binary):
sources = ["installer_tui.c", "installer_tui_job.c", "installer_job.c", "installer_log.c", "installer_tui_partitions.c", "installer_tty.c", "model.c",
"installer_capacity.c", "installer_partitions.c", "apache_license.S"]
"installer_capacity.c", "installer_partitions.c", "installer_package_progress.c", "apache_license.S"]
subprocess.run([
"cc", "-std=gnu11", "-D_GNU_SOURCE", "-O1", "-g", "-Wall", "-Wextra", "-Werror",
"-fsanitize=address,undefined", "-fno-omit-frame-pointer", "-fno-pie", "-no-pie",
Expand Down
Loading