summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordevome2023-12-20 14:54:34 +0800
committerdevome2023-12-20 14:54:34 +0800
commit31a7d410490fd6a68378291797ca9bce25f15146 (patch)
tree24d38cd6cfcd426e44330db4c6c941ee2f356e8a
parent382f6ae3ea55e63359b2e6d6c82943adcd429417 (diff)
downloadaur-31a7d410490fd6a68378291797ca9bce25f15146.tar.gz
1.0.19-2
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD24
-rw-r--r--iventoy.install53
-rw-r--r--iventoy.service14
-rw-r--r--iventoy.tmpfiles3
6 files changed, 62 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 95f0311f05aa..dab481b011b5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = iventoy-bin
- pkgdesc = An enhanced version of the PXE server. 一个增强版的 PXE 服务器。
+ pkgdesc = An enhanced version of the PXE server | 一个增强版的 PXE 服务器
pkgver = 1.0.19
- pkgrel = 1
+ pkgrel = 2
url = https://www.iventoy.com
install = iventoy.install
arch = x86_64
@@ -10,13 +10,14 @@ pkgbase = iventoy-bin
depends = coreutils
depends = glibc
provides = iventoy
+ options = !strip
source = iventoy-1.0.19.tar.gz::https://github.com/ventoy/PXE/releases/download/v1.0.19/iventoy-1.0.19-linux-free.tar.gz
source = iventoy
source = iventoy.service
source = iventoy.tmpfiles
sha256sums = c624dc593f17a118131fbc6490a00ce05809ed9e498dd85bc8d2338ffa214328
sha256sums = ef27beecddc5a9650194e8b033ae0b3172f29a9bf352cfff079a61ece86a3263
- sha256sums = cd5565f2c67ea128604a44074fc3e6a1b741abbc47525af5d7671404e9854e18
- sha256sums = 65131e0002958dbfc831375c1f31d7aa10c38ee8f1f39f945ae91b1becc69a47
+ sha256sums = 2f4bf44eb5efb78cce2a8d6f98469803f918a7b1d64b4cfec7d68f055a19e90b
+ sha256sums = 9d9378926284a0f2f2591bda744aff752e90de6b77b9b80bb2e5aa2e81173c61
pkgname = iventoy-bin
diff --git a/.gitignore b/.gitignore
index c32b546f7db3..87b086537c4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-*.tar.gz \ No newline at end of file
+*.tar.gz
+*.pkg.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
index 2bbfaa4a53f8..9d41f9342bfa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,13 @@
# Maintainer: Evine Deng <evinedeng@hotmail.com>
+# 由于 iventoy 本身的设计,只能以root用户运行。
+# Due to the design of iventoy itself, it can only run as root user.
+
_pkgname=iventoy
pkgname=${_pkgname}-bin
pkgver=1.0.19
-pkgrel=1
-pkgdesc="An enhanced version of the PXE server. 一个增强版的 PXE 服务器。"
+pkgrel=2
+pkgdesc="An enhanced version of the PXE server | 一个增强版的 PXE 服务器"
arch=("x86_64")
url="https://www.iventoy.com"
license=("custom")
@@ -17,9 +20,13 @@ source=("${_pkgname}-$pkgver.tar.gz::https://github.com/ventoy/PXE/releases/down
"iventoy.tmpfiles")
sha256sums=('c624dc593f17a118131fbc6490a00ce05809ed9e498dd85bc8d2338ffa214328'
'ef27beecddc5a9650194e8b033ae0b3172f29a9bf352cfff079a61ece86a3263'
- 'cd5565f2c67ea128604a44074fc3e6a1b741abbc47525af5d7671404e9854e18'
- '65131e0002958dbfc831375c1f31d7aa10c38ee8f1f39f945ae91b1becc69a47')
-options=(!strip)
+ '2f4bf44eb5efb78cce2a8d6f98469803f918a7b1d64b4cfec7d68f055a19e90b'
+ '9d9378926284a0f2f2591bda744aff752e90de6b77b9b80bb2e5aa2e81173c61')
+options=(!strip) # If strip, it will not start.
+
+prepare() {
+ sed -i 's|#! /bin/bash|#!/bin/bash|' "${srcdir}/${_pkgname}-$pkgver/iventoy.sh"
+}
package() {
cd "${srcdir}/${_pkgname}-$pkgver"
@@ -29,11 +36,12 @@ package() {
install -Dm755 -t "${pkgdir}/opt/${_pkgname}/lib/lin64" lib/lin64/*
install -Dm755 -t "${pkgdir}/opt/${_pkgname}/lib" lib/iventoy
install -Dm755 -t "${pkgdir}/opt/${_pkgname}" iventoy.sh
- sed -i 's|#! /bin/bash|#!/bin/bash|' "${pkgdir}/opt/${_pkgname}/iventoy.sh"
- mkdir -p "${pkgdir}/opt/${_pkgname}"/{user/scripts,log/history}
+ ln -s /var/lib/iventoy/config.dat "${pkgdir}/opt/${_pkgname}/data/config.dat"
+ ln -s /var/lib/iventoy/iso "${pkgdir}/opt/${_pkgname}/iso"
+ ln -s /var/log/iventoy "${pkgdir}/opt/${_pkgname}/log"
cd "${srcdir}"
install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
install -Dm644 "${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
- install -Dm644 "${_pkgname}.tmpfiles" "${pkgdir}"/usr/lib/tmpfiles.d/${_pkgname}.conf
+ install -Dm644 "${_pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
}
diff --git a/iventoy.install b/iventoy.install
index 609c7f6753f4..55f0d0704d69 100644
--- a/iventoy.install
+++ b/iventoy.install
@@ -2,48 +2,51 @@
_pkgname=iventoy
-msg_blue() {
- printf "${blue}==>${bold} $1${all_off}\n"
-}
-
-note() {
- printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
-}
-
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
+note() {
+ printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
+}
+
post_install() {
- if [ ! -L "/var/lib/${_pkgname}/iso" ] && [ ! -d "/var/lib/${_pkgname}/iso" ]; then
- mkdir -p "/var/lib/${_pkgname}/iso"
- fi
- ln -sf "/var/lib/${_pkgname}/config.dat" "/opt/${_pkgname}/data/config.dat"
- if [ "$(readlink /opt/${_pkgname}/iso)" != "/var/lib/${_pkgname}/iso" ]; then
- rm -rf /opt/${_pkgname}/iso
- fi
- if [ ! -d "/opt/${_pkgname}/iso" ]; then
- ln -sf "/var/lib/${_pkgname}/iso" "/opt/${_pkgname}/iso"
- fi
if [ "$LANG" = 'zh_CN.UTF-8' ]; then
- note "请将你的镜像文件放置在 \"/var/lib/${_pkgname}/iso\" 下,或将存放镜像文件的目录手动软链接为 \"/var/lib/${_pkgname}/iso\" ..."
- note "随后,以命令 \"sudo systemctl enable --now ${_pkgname}.service\" 来启用并启动 ${_pkgname}.service ..."
+ note "请将你的镜像文件放置在 \"/var/lib/${_pkgname}/iso\" 下...
+ 或将存放镜像文件的目录手动软链接为 \"/var/lib/${_pkgname}/iso\"...
+ 然后以命令 \"sudo systemctl start ${_pkgname}.service\" 来启动...
+ 请访问 http://127.0.0.1:26000 来进行 ${_pkgname} 的配置...
+ 一些无人值守、自动安装部署的示例脚本/示例模板存放在 \"/usr/share/${_pkgname}/scripts\"...
+ 帮助文档见: https://www.iventoy.com/cn/doc_start.html"
else
- note "Please place your image file under \"/var/lib/${_pkgname}/iso\", or manually soft link the directory where the image file is stored to \"/var/lib/${_pkgname}/iso\" ..."
- note "Subsequently, enable and start ${_pkgname}.service with the command \"sudo systemctl enable --now ${_pkgname}.service\" ..."
+ note "Please put your image file under \"/var/lib/${_pkgname}/iso\" ...
+ Or manually symbolic link the directory where the image file is stored to \"/var/lib/${_pkgname}/iso\" ...
+ Subsequently, start ${_pkgname} with the command \"sudo systemctl start ${_pkgname}.service\"...
+ Please visit http://127.0.0.1:26000 to configure ${_pkgname} ...
+ Some example scripts / templates for unattended deployment are stored in \"/usr/share/${pkkname}/scripts\" ...
+ Help document see: https://www.iventoy.com/en/doc_start.html"
fi
}
post_upgrade() {
- post_install
+ if [ "$LANG" = 'zh_CN.UTF-8' ]; then
+ note "重载 ${_pkgname} systemd 配置:\"sudo systemctl daemon-reload\" ...
+ 重启 ${_pkgname} 服务:\"sudo systemctl restart ${_pkgname}.service\" ..."
+ else
+ note "Reload systemd manager configuration: \"sudo systemctl daemon-reload\" ...
+ Restart ${_pkgname} daemon service:\"sudo systemctl restart ${_pkgname}.service\" ..."
+ fi
}
post_remove() {
rm -rf /opt/$_pkgname/
if [ "$LANG" = 'zh_CN.UTF-8' ]; then
- note "iventoy 的配置文件和镜像文件残留在 \"/var/lib/${_pkgname}\",如果需要,请手动删除..."
+ note "${_pkgname} 的配置文件和镜像文件残留在 \"/var/lib/${_pkgname}\",
+ 日志文件残留在 \"/var/log/iventoy\",如果需要,请手动删除它们..."
else
- note "The configuration files and image files of iventoy are left in \"/var/lib/${_pkgname}\". If necessary, please manually delete them ..."
+ note "The configuration files and image files of ${_pkgname} are left in \"/var/lib/${_pkgname}\",
+ and the log files are left in \"/var/log/${_pkgname}\" ...
+ If necessary, please manually delete them ..."
fi
}
diff --git a/iventoy.service b/iventoy.service
index 2e2bbdd79d4d..6247974f1298 100644
--- a/iventoy.service
+++ b/iventoy.service
@@ -1,13 +1,15 @@
[Unit]
-Description = An enhanced version of the PXE server.
-Requires = network-online.target
-After = network-online.target
+Description = An enhanced version of the PXE server.
+Documentation = https://www.iventoy.com/cn/doc_start.html
+Documentation = https://www.iventoy.com/en/doc_start.html
+Requires = network-online.target
+After = network-online.target
[Service]
-Type = forking
+Type = forking
WorkingDirectory = /opt/iventoy
-ExecStart = /usr/bin/iventoy -R start
-ExecStop = /usr/bin/iventoy stop
+ExecStart = /usr/bin/iventoy -R start
+ExecStop = /usr/bin/iventoy stop
[Install]
WantedBy = multi-user.target
diff --git a/iventoy.tmpfiles b/iventoy.tmpfiles
index 59cc24d3b1d3..e5f20a4d1fbd 100644
--- a/iventoy.tmpfiles
+++ b/iventoy.tmpfiles
@@ -1 +1,4 @@
d /var/lib/iventoy 0755 root root -
+d /var/lib/iventoy/iso 0755 root root -
+d /var/log/iventoy 0755 root root -
+d /var/log/iventoy/history 0755 root root -