Compare commits

...

4 Commits

Author SHA1 Message Date
8f9aa522c7 Fix: add install hook
All checks were successful
Build package / build-package (push) Successful in 8s
2025-07-28 23:53:41 +08:00
903da96904 Chore: bump version to 1.0.3
All checks were successful
Build package / build-package (push) Successful in 7s
2025-07-28 23:50:22 +08:00
677de98317 Feat: add ntp settings
All checks were successful
Build package / build-package (push) Successful in 9s
2025-07-28 23:49:59 +08:00
daae0e91de Feat: add timezone settings
All checks were successful
Build package / build-package (push) Successful in 8s
2025-07-28 23:40:24 +08:00
5 changed files with 26 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ Type = Path
Operation = Install Operation = Install
Operation = Upgrade Operation = Upgrade
Target = etc/resolv.conf Target = etc/resolv.conf
Target = etc/localtime
[Action] [Action]
Description = Override configuration files... Description = Override configuration files...

View File

@@ -1,7 +1,7 @@
# Maintainer: Yi-Ting Shih <ytshih@konchin.com> # Maintainer: Yi-Ting Shih <ytshih@konchin.com>
pkgname=hl-base-env pkgname=hl-base-env
pkgver=1.0.2 pkgver=1.0.3
pkgrel=1 pkgrel=2
pkgdesc="Base environment for konchin.com homelab" pkgdesc="Base environment for konchin.com homelab"
arch=(any) arch=(any)
url="https://gitea.konchin.com/package/hl-base-env" url="https://gitea.konchin.com/package/hl-base-env"
@@ -10,6 +10,8 @@ depends=(
'vim' 'vim'
'p11-kit' 'p11-kit'
'ca-certificates-utils' 'ca-certificates-utils'
'systemd'
'tzdata'
) )
install="$pkgname.install" install="$pkgname.install"
source=( source=(
@@ -18,6 +20,7 @@ source=(
'install.sh' 'install.sh'
'90-editor.sh' '90-editor.sh'
'hl-rootca.crt' 'hl-rootca.crt'
'timesyncd.conf'
) )
package() { package() {
@@ -28,9 +31,11 @@ package() {
install -Dm755 install.sh "$pkgdir/usr/lib/$pkgname/install.sh" install -Dm755 install.sh "$pkgdir/usr/lib/$pkgname/install.sh"
install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh" install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh"
install -Dm644 hl-rootca.crt "$pkgdir/usr/share/$pkgname/hl-rootca.crt" install -Dm644 hl-rootca.crt "$pkgdir/usr/share/$pkgname/hl-rootca.crt"
install -Dm644 timesyncd.conf "$pkgdir/etc/systemd/timesyncd.conf.d/$pkgname.conf"
} }
sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b' sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b'
'453cbec2e5fa38ac9ef618d3254ba4f5fc8aacdc8bb1f17dad00f6089680d580' '60f8e5f6420163be4489c15f4c1e936b5b728005f18fd5e7fa4f711789fd990b'
'29eb6911bc0d7842385bf19b0405ee6fd354f263de817b759f0b27f80030c6db' '9d3f3962e7088ed30962d171536d81e042169ee5c3c46e3f7995eb53b27e71f5'
'8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a' '8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a'
'1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382') '1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382'
'2e24060a81df174639d4f3743b42d1cde191724292fa5bd2433d088d7f49b4f9')

View File

@@ -1,6 +1,16 @@
post_install() { _package_changed() {
trust anchor --store /usr/share/hl-base-env/hl-rootca.crt trust anchor --store /usr/share/hl-base-env/hl-rootca.crt
update-ca-trust update-ca-trust
systemctl enable --now systemd-timesyncd.service
}
post_install() {
/usr/lib/hl-base-env/install.sh
_package_changed
}
post_upgrade() {
_package_changed
} }
pre_remove() { pre_remove() {

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env -S bash #!/usr/bin/env -S bash
ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime

3
timesyncd.conf Normal file
View File

@@ -0,0 +1,3 @@
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org