Feat:添加 RHEL 兼容 RPM Package#6352
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces RPM package generation support and integrates package manager detection to prevent package-managed installations from performing self-updates. It refactors Linux packaging logic by extracting shared paths and launcher script generation into a new LinuxPackageFiles helper class. The review feedback suggests adding explicit attributes to the /usr/share/java/hmcl directory in the RPM spec to prevent permission issues in strict umask environments, and expanding the boolean parser in PackageManagerIntegration to recognize "no" and "off" as disabled values.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Xingqiu Xu <hilbertanjou83@gmail.com>
Signed-off-by: Xingqiu Xu <hilbertanjou83@gmail.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for building RPM packages for HMCL by adding a new CreateRpm Gradle task and refactoring the packaging logic into a shared LinuxPackageFiles helper. It also implements a PackageManagerIntegration utility to disable automatic updates when the launcher is installed via a system package manager. The review feedback suggests several key improvements to the CreateRpm task, including ensuring cross-platform compatibility by checking for POSIX file system support before setting file permissions, properly handling process interruption to prevent leaks, removing redundant directory creation handled automatically by Gradle, and leveraging Gradle's built-in file deletion API to simplify the code.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Xingqiu Xu <hilbertanjou83@gmail.com>
|
@Glavo xd看看还有没有需要我修改的地方了 ^_^ |
摘要
关联 Issue:#5937
新的
:HMCL:makeRpm任务使用rpmbuild构建 RPM 包,并尽量沿用现有 Debian 包的安装布局,包括按发布渠道区分的启动命令、desktop entry、图标安装,以及通过 alternatives 注册通用的hmcl命令。主要改动
CreateRpmGradle task。HMCL_PACKAGE_MANAGED=rpm,避免内置更新流程和系统包管理器安装的版本冲突。说明
build流程。验证
本地已验证:
./gradlew :HMCL:compileJava --no-daemon --stacktrace./gradlew :HMCL:checkTranslations --no-daemon --stacktrace./gradlew :HMCL:makeDeb --no-daemon --stacktrace./gradlew :HMCL:checkstyleMain --no-daemon --stacktraceDocker 中已验证:
rockylinux:9容器内执行./gradlew :HMCL:makeRpm --no-daemon --stacktrace,构建成功。rockylinux:9容器内使用dnf安装并卸载生成的 RPM,安装和卸载均成功。hmcl-nightly-3.16.snapshot-1.noarch。/usr/bin/hmcl-nightly可执行。hmclalternatives 指向/usr/bin/hmcl-nightly。HMCL_PACKAGE_MANAGED="rpm"。