ptrcbuild-base: new aport
This commit is contained in:
parent
d973a2fcad
commit
8a9a1f3b96
3 changed files with 58 additions and 0 deletions
33
ptrcbuild-base/APKBUILD
Normal file
33
ptrcbuild-base/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Maintainer: psykose <alice@ayaya.dev>
|
||||||
|
pkgname=ptrcbuild-base
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Sets up a build environment on install"
|
||||||
|
url="?"
|
||||||
|
arch="noarch"
|
||||||
|
license="ISC"
|
||||||
|
install="$pkgname.post-install"
|
||||||
|
source="build.doas.conf"
|
||||||
|
builddir="$srcdir"
|
||||||
|
options="!check"
|
||||||
|
|
||||||
|
package() {
|
||||||
|
depends="
|
||||||
|
alpine-sdk
|
||||||
|
doas
|
||||||
|
execline
|
||||||
|
openssl
|
||||||
|
s6
|
||||||
|
s6-networking
|
||||||
|
s6-portable-utils
|
||||||
|
nano
|
||||||
|
vim
|
||||||
|
"
|
||||||
|
|
||||||
|
install -Dm600 build.doas.conf \
|
||||||
|
-t "$pkgdir"/etc/doas.d/
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
b4fd75245e6c088f87e4931d13ae718ac38538beb9a5a0325f0bd4c5a6b68f765491d026c2806db1eaf3b12b5f586677a80ab4da66ed06244cfd9ea08248831b build.doas.conf
|
||||||
|
"
|
1
ptrcbuild-base/build.doas.conf
Normal file
1
ptrcbuild-base/build.doas.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
permit persist :wheel
|
24
ptrcbuild-base/ptrcbuild-base.post-install
Normal file
24
ptrcbuild-base/ptrcbuild-base.post-install
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
adduser -D nyan
|
||||||
|
adduser nyan wheel
|
||||||
|
|
||||||
|
key_location="$(SUDO="" abuild-keygen -in -b 4096 2>&1 | grep Installing | cut -d" " -f3)"
|
||||||
|
key_location="${key_location/.pub/}"
|
||||||
|
|
||||||
|
password="$(openssl rand -hex 6)"
|
||||||
|
|
||||||
|
echo "nyan:$password" | chpasswd
|
||||||
|
|
||||||
|
mkdir -p /home/nyan/.abuild
|
||||||
|
echo "PACKAGER_PRIVKEY=/home/nyan/.abuild/nyan.rsa" > /home/nyan/.abuild/abuild.conf
|
||||||
|
|
||||||
|
mv "$key_location" /home/nyan/.abuild/nyan.rsa
|
||||||
|
mv "$key_location".pub /home/nyan/.abuild/nyan.rsa.pub
|
||||||
|
cp /home/nyan/.abuild/nyan.rsa.pub /etc/apk/keys
|
||||||
|
|
||||||
|
chown -R nyan:nyan /home/nyan/.abuild
|
||||||
|
|
||||||
|
cat 1>&2 <<EOF
|
||||||
|
The password is: $password
|
||||||
|
EOF
|
Loading…
Reference in a new issue