Update voidnsrun-setup from 2022.08.25_3 to 2022.10.20_1
This commit is contained in:
parent
bdafcafe55
commit
6c956a7847
3 changed files with 13 additions and 79 deletions
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
post)
|
post)
|
||||||
|
if [ "$UPDATE" = "yes" ]; then
|
||||||
|
# Update the container
|
||||||
|
xchroot /glibc xbps-install -Syu
|
||||||
|
fi
|
||||||
|
|
||||||
voidnsrun-setup
|
voidnsrun-setup
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# voidnsrun setup script
|
|
||||||
|
|
||||||
repokeys_dir="/var/db/xbps/keys"
|
|
||||||
|
|
||||||
# Check if base-voidstrap is installed on glibc container
|
|
||||||
function checkstrap {
|
|
||||||
xbps-query -r /glibc -m | grep base-voidstrap
|
|
||||||
exitstatus=$?
|
|
||||||
|
|
||||||
if [ $exitstatus = 0 ]; then
|
|
||||||
strapinstalled=1
|
|
||||||
else
|
|
||||||
strapinstalled=0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get Void main mirror in use and adapt it to use glibc instead of musl.
|
|
||||||
function get_target_repo {
|
|
||||||
if [ ! -d /etc/xbps.d/00-repository-main.conf ]; then
|
|
||||||
mainrepofile="/usr/share/xbps.d/00-repository-main.conf"
|
|
||||||
else
|
|
||||||
mainrepofile="/etc/xbps.d/00-repository-main.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat $mainrepofile | cut -d"=" -f2 | sed 's|/musl||g'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get Cereus main mirror in use and adapt it to use x86_64 instead of x86_64-musl
|
|
||||||
|
|
||||||
function get_cereus_repo {
|
|
||||||
if [ ! -d "/etc/xbps.d/10-cereus-extra.conf" ]; then
|
|
||||||
cereus_extra="/usr/share/xbps.d/10-cereus-extra.conf"
|
|
||||||
else
|
|
||||||
cereus_extra="/etc/xbps.d/10-cereus-extra.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat $cereus_extra | cut -d"=" -f2 | sed 's|x86_64-musl|x86_64|g'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create the base glibc container
|
|
||||||
function create_container {
|
|
||||||
XBPS_ARCH=x86_64 xbps-install --repository=$(get_target_repo) -r /glibc -Sy base-voidstrap
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if /glibc container path exists, and if it has installed the base-voidstrap package.
|
|
||||||
# Otherwise, it will create the path and configure the container.
|
|
||||||
|
|
||||||
if [ ! -d "/glibc" ]; then
|
|
||||||
echo "==> Creating container path
|
|
||||||
"
|
|
||||||
mkdir -p /glibc/${repokeys_dir}
|
|
||||||
echo "==>Copying repositories keys...
|
|
||||||
"
|
|
||||||
cp ${repokeys_dir}/*.plist /glibc/${repokeys_dir}/
|
|
||||||
echo "==> Creating glibc container, this will take a bit...
|
|
||||||
"
|
|
||||||
create_container
|
|
||||||
else
|
|
||||||
checkstrap
|
|
||||||
if [ $strapinstalled = 0 ]; then
|
|
||||||
echo "==> Copying repositories keys...
|
|
||||||
"
|
|
||||||
mkdir -p /glibc/${repokeys_dir}
|
|
||||||
cp ${repokeys_dir}/*.plist /glibc/${repokeys_dir}/
|
|
||||||
echo "==> Creating glibc container, this will take a bit...
|
|
||||||
"
|
|
||||||
create_container
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install voidnsundo in container and add cereus-extra repository
|
|
||||||
echo "==> Configuring extra repository and voidnsundo
|
|
||||||
"
|
|
||||||
voidnsrun -r /glibc xbps-install -Syfv --repository=$(get_cereus_repo) voidnsundo cereus-repo-extra
|
|
|
@ -1,16 +1,20 @@
|
||||||
# Template file for 'voidnsrun-setup'
|
# Template file for 'voidnsrun-setup'
|
||||||
pkgname=voidnsrun-setup
|
pkgname=voidnsrun-setup
|
||||||
version=2022.08.25
|
version=2022.10.20
|
||||||
revision=3
|
revision=1
|
||||||
wrksrc=voidnsrun-setup-main
|
wrksrc=voidnsrun-setup-main
|
||||||
|
archs="x86_64-musl x86_64"
|
||||||
|
hostmakedepends="git"
|
||||||
repository="cereus-extra"
|
repository="cereus-extra"
|
||||||
depends="voidnsrun voidnsundo xtools"
|
depends="voidnsrun voidnsundo xtools"
|
||||||
short_desc="voidnsrun setup script"
|
short_desc="voidnsrun setup script"
|
||||||
maintainer="Kevin F. <https://github.com/KF-Art>"
|
maintainer="Kevin F. <https://github.com/KF-Art>"
|
||||||
license="GPL-3.0"
|
license="GPL-3.0"
|
||||||
homepage="https://github.com/CereusLinuxProject/voidnsrun-setup"
|
homepage="https://github.com/CereusLinuxProject/voidnsrun-setup"
|
||||||
distfiles="${homepage}/archive/refs/heads/main.zip"
|
|
||||||
checksum=40873a3734319d3141a389e0fade727f483ca9dc67c3b7d06e93770dcc275fdf
|
do_fetch() {
|
||||||
|
git clone ${homepage} ${wrksrc}
|
||||||
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vbin voidnsrun-setup
|
vbin voidnsrun-setup
|
||||||
|
|
Loading…
Add table
Reference in a new issue