Compare commits
10 Commits
0651cf8f3a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
34fc56dca3
|
|||
|
7821487450
|
|||
|
040cf027bc
|
|||
|
42ef4cdcdb
|
|||
|
602ea2cd3f
|
|||
|
5520dcdaf6
|
|||
|
8f9aa522c7
|
|||
|
903da96904
|
|||
|
677de98317
|
|||
|
daae0e91de
|
4
60-hl-base-env.preset
Normal file
4
60-hl-base-env.preset
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
enable systemd-resolved.service
|
||||||
|
enable systemd-networkd.service
|
||||||
|
enable systemd-timesyncd.service
|
||||||
|
enable sshd.service
|
||||||
@@ -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...
|
||||||
|
|||||||
19
PKGBUILD
19
PKGBUILD
@@ -1,6 +1,6 @@
|
|||||||
# 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.1.5
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Base environment for konchin.com homelab"
|
pkgdesc="Base environment for konchin.com homelab"
|
||||||
arch=(any)
|
arch=(any)
|
||||||
@@ -10,27 +10,38 @@ depends=(
|
|||||||
'vim'
|
'vim'
|
||||||
'p11-kit'
|
'p11-kit'
|
||||||
'ca-certificates-utils'
|
'ca-certificates-utils'
|
||||||
|
'systemd'
|
||||||
|
'tzdata'
|
||||||
)
|
)
|
||||||
install="$pkgname.install"
|
install="$pkgname.install"
|
||||||
source=(
|
source=(
|
||||||
"60-$pkgname.conf"
|
"60-$pkgname.conf"
|
||||||
|
"60-$pkgname.preset"
|
||||||
"61-$pkgname.hook"
|
"61-$pkgname.hook"
|
||||||
'install.sh'
|
'install.sh'
|
||||||
'90-editor.sh'
|
'90-editor.sh'
|
||||||
'hl-rootca.crt'
|
'hl-rootca.crt'
|
||||||
|
'hl-package.pem'
|
||||||
|
'timesyncd.conf'
|
||||||
)
|
)
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
|
|
||||||
install -Dm644 "60-$pkgname.conf" "$pkgdir/etc/systemd/resolved.conf.d/60-$pkgname.conf"
|
install -Dm644 "60-$pkgname.conf" "$pkgdir/etc/systemd/resolved.conf.d/60-$pkgname.conf"
|
||||||
|
install -Dm644 "60-$pkgname.preset" "$pkgdir/etc/systemd/system-preset/60-$pkgname.preset"
|
||||||
install -Dm644 "61-$pkgname.hook" "$pkgdir/etc/pacman.d/hooks/61-$pkgname.hook"
|
install -Dm644 "61-$pkgname.hook" "$pkgdir/etc/pacman.d/hooks/61-$pkgname.hook"
|
||||||
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 hl-package.pem "$pkgdir/usr/share/$pkgname/hl-package.pem"
|
||||||
|
install -Dm644 timesyncd.conf "$pkgdir/etc/systemd/timesyncd.conf.d/$pkgname.conf"
|
||||||
}
|
}
|
||||||
sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b'
|
sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b'
|
||||||
'453cbec2e5fa38ac9ef618d3254ba4f5fc8aacdc8bb1f17dad00f6089680d580'
|
'e2fdc89ad2b5c5a156cac3b1d571645617a4e62bbb898d1cb067bbf7dbac1fa9'
|
||||||
'29eb6911bc0d7842385bf19b0405ee6fd354f263de817b759f0b27f80030c6db'
|
'60f8e5f6420163be4489c15f4c1e936b5b728005f18fd5e7fa4f711789fd990b'
|
||||||
|
'9d3f3962e7088ed30962d171536d81e042169ee5c3c46e3f7995eb53b27e71f5'
|
||||||
'8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a'
|
'8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a'
|
||||||
'1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382')
|
'1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382'
|
||||||
|
'986eaa2445c51d8d81023c9c7280b27785ec9f0513bcf9d8601ed8a8aad2c0c6'
|
||||||
|
'2e24060a81df174639d4f3743b42d1cde191724292fa5bd2433d088d7f49b4f9')
|
||||||
|
|||||||
@@ -1,9 +1,30 @@
|
|||||||
post_install() {
|
_keyuid='Yi-Ting Shih Packaging Infrastructure <ytshih@konchin.com>'
|
||||||
|
|
||||||
|
_package_changed() {
|
||||||
|
/usr/lib/hl-base-env/install.sh
|
||||||
|
|
||||||
|
pacman-key --add /usr/share/hl-base-env/hl-package.pem && \
|
||||||
|
pacman-key --lsign-key "$_keyuid"
|
||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
_package_changed
|
||||||
|
|
||||||
|
systemctl preset systemd-networkd.service
|
||||||
|
systemctl preset systemd-resolved.service
|
||||||
|
systemctl preset systemd-timesyncd.service
|
||||||
|
systemctl preset sshd.service
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
_package_changed
|
||||||
|
}
|
||||||
|
|
||||||
pre_remove() {
|
pre_remove() {
|
||||||
trust anchor --remove /usr/share/hl-base-env/hl-rootca.crt
|
trust anchor --remove /usr/share/hl-base-env/hl-rootca.crt
|
||||||
|
pacman-key --delete "$_keyuid"
|
||||||
update-ca-trust
|
update-ca-trust
|
||||||
}
|
}
|
||||||
|
|||||||
14
hl-package.pem
Normal file
14
hl-package.pem
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mDMEaIZLEhYJKwYBBAHaRw8BAQdAafVnmLSy+WcA3xNHiV2h7fV5SBRTicwDi1IG
|
||||||
|
QP/pb9a0OllpLVRpbmcgU2hpaCBQYWNrYWdpbmcgSW5mcmFzdHJ1Y3R1cmUgPHl0
|
||||||
|
c2hpaEBrb25jaGluLmNvbT6IkAQTFgoAOBYhBIwTNXb7ilfFXqI27hsD/zv6jd3v
|
||||||
|
BQJohksSAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBsD/zv6jd3vqs8A
|
||||||
|
+wTySLJ+zS1UMeRI0IiOFYpRxGM6FP88WRldTqI7APH9AQCTt2FQlqHuMAuV2D+U
|
||||||
|
pxJcDG8EM4FGRzTpO7R7snTbDLg4BGiGSxISCisGAQQBl1UBBQEBB0DuMgsiVgGm
|
||||||
|
HtbUXLmY3U7u0GCQm2YNoSOT9eBIAtaUXQMBCAeIeAQYFgoAIBYhBIwTNXb7ilfF
|
||||||
|
XqI27hsD/zv6jd3vBQJohksSAhsMAAoJEBsD/zv6jd3vq5UBANdez/3eDHjK01Pd
|
||||||
|
OLXvPUBFuZfEiC7EcrBJ8SjzPkSOAQC0fADV0KYGOcFQ8KBWJIftlaY3wo2nnDMm
|
||||||
|
GGMU7hgaAw==
|
||||||
|
=6oKc
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
@@ -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
3
timesyncd.conf
Normal 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
|
||||||
Reference in New Issue
Block a user