mirror of
https://github.com/fsquillace/junest.git
synced 2026-07-28 13:34:00 +00:00
Use the Junest repo to install package deps
This commit is contained in:
parent
f98fa897bf
commit
6291e5cc83
6 changed files with 13 additions and 198 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
7.3.1
|
||||
7.3.2
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ function _install_pkg_from_aur(){
|
|||
}
|
||||
|
||||
function _install_pkg(){
|
||||
# This function allows to install packages from AUR.
|
||||
# At the moment is not used.
|
||||
local maindir=$1
|
||||
local pkgbuilddir=$2
|
||||
# Generate a working directory because sources will be downloaded to there
|
||||
|
|
@ -40,6 +42,7 @@ function _prepare() {
|
|||
}
|
||||
|
||||
function build_image_env(){
|
||||
set -x
|
||||
umask 022
|
||||
|
||||
# The function must runs on ArchLinux with non-root privileges.
|
||||
|
|
@ -67,10 +70,13 @@ function build_image_env(){
|
|||
fi
|
||||
sudo mkdir -p ${maindir}/root/run/lock
|
||||
|
||||
_install_pkg ${maindir} "$JUNEST_BASE/pkgs/sudo-fake"
|
||||
_install_pkg ${maindir} "$JUNEST_BASE/pkgs/proot-static"
|
||||
_install_pkg ${maindir} "$JUNEST_BASE/pkgs/qemu-static"
|
||||
_install_pkg ${maindir} "$JUNEST_BASE/pkgs/groot-git"
|
||||
sudo tee -a ${maindir}/root/etc/pacman.conf > /dev/null <<EOT
|
||||
|
||||
[junest]
|
||||
SigLevel = Optional TrustedOnly
|
||||
Server = https://raw.githubusercontent.com/fsquillace/junest-repo/master/any
|
||||
EOT
|
||||
sudo pacman --noconfirm --config ${maindir}/root/etc/pacman.conf --root ${maindir}/root -Sy sudo-fake groot-git proot-static qemu-static
|
||||
|
||||
info "Installing yay..."
|
||||
sudo pacman --noconfirm -S go
|
||||
|
|
@ -80,7 +86,6 @@ function build_image_env(){
|
|||
sudo install -d -m 755 "${maindir}/root/etc/${CMD}"
|
||||
sudo bash -c "echo 'JUNEST_ARCH=$ARCH' > ${maindir}/root/etc/${CMD}/info"
|
||||
|
||||
set -x
|
||||
info "Generating the locales..."
|
||||
# sed command is required for locale-gen but it is required by fakeroot
|
||||
# and cannot be removed
|
||||
|
|
@ -130,4 +135,6 @@ function build_image_env(){
|
|||
builtin cd ${ORIGIN_WD}
|
||||
trap - QUIT EXIT ABRT KILL TERM INT
|
||||
sudo rm -fr "$maindir"
|
||||
|
||||
set +x
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
# Maintainer: Filippo Squillace <feel dot sqoox at gmail dot com>
|
||||
# More details on how to change this file:
|
||||
# https://wiki.archlinux.org/index.php/PKGBUILD
|
||||
# https://wiki.archlinux.org/index.php/Creating_packages
|
||||
# https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages
|
||||
|
||||
pkgname=groot-git
|
||||
pkgver=1.0.1
|
||||
pkgrel=1
|
||||
pkgdesc=""
|
||||
arch=('any')
|
||||
url="https://github.com/fsquillace/groot"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('coreutils')
|
||||
makedepends=()
|
||||
provides=('groot')
|
||||
conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
options=()
|
||||
#install=
|
||||
noextract=()
|
||||
|
||||
|
||||
source=('groot::git+https://github.com/fsquillace/groot.git#branch=master')
|
||||
md5sums=('SKIP')
|
||||
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
# The examples below are not absolute and need to be adapted to each repo. The
|
||||
# primary goal is to generate version numbers that will increase according to
|
||||
# pacman's version comparisons with later commits to the repo. The format
|
||||
# VERSION='VER_NUM.rREV_NUM.HASH', or a relevant subset in case VER_NUM or HASH
|
||||
# are not available, is recommended.
|
||||
|
||||
# Git, tags available
|
||||
printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
|
||||
|
||||
# Git, no tags available
|
||||
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
:
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
install -d -m 755 "${pkgdir}/usr/bin"
|
||||
install -m 755 "${srcdir}/${pkgname%-git}/bin/groot" ${pkgdir}/usr/bin/groot
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Maintainer: Filippo Squillace <feel dot sqoox at gmail dot com>
|
||||
# More details on how to change this file:
|
||||
# https://wiki.archlinux.org/index.php/PKGBUILD
|
||||
# https://wiki.archlinux.org/index.php/Creating_packages
|
||||
# https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages
|
||||
|
||||
pkgname=proot-static
|
||||
_pkgname=proot
|
||||
pkgver=5.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="chroot, mount --bind, and binfmt_misc without privilege/setup. Static binary only"
|
||||
arch=('any')
|
||||
url="https://proot-me.github.io/"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=()
|
||||
makedepends=()
|
||||
provides=('proot')
|
||||
conflicts=('proot' 'proot-bin')
|
||||
backup=()
|
||||
options=()
|
||||
#install=
|
||||
source=()
|
||||
md5sums=()
|
||||
noextract=()
|
||||
|
||||
MAIN_REPO=https://s3-eu-west-1.amazonaws.com/junest-repo
|
||||
PROOT_LINK=${MAIN_REPO}/proot
|
||||
|
||||
source=("proot-x86_64"::"$PROOT_LINK/proot-x86_64" "proot-arm"::"$PROOT_LINK/proot-arm")
|
||||
md5sums=('14080705dd45a6bafa20e909a68072cb' '8218c5f00e77e2e6e04c372ced27c7e7')
|
||||
|
||||
package() {
|
||||
echo "Installing proot static binaries"
|
||||
install -d -m 755 "${pkgdir}/usr/bin/"
|
||||
install -m 755 "${srcdir}/"${_pkgname}-* ${pkgdir}/usr/bin/
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# Maintainer: Filippo Squillace <feel dot sqoox at gmail dot com>
|
||||
# More details on how to change this file:
|
||||
# https://wiki.archlinux.org/index.php/PKGBUILD
|
||||
# https://wiki.archlinux.org/index.php/Creating_packages
|
||||
# https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages
|
||||
|
||||
pkgname=qemu-static
|
||||
pkgver=2.3.0
|
||||
pkgrel=1
|
||||
pkgdesc="Statically linked binaries of Qemu with user emulation. Useful for containers/chroot environment with binfmt."
|
||||
arch=('any')
|
||||
url="http://wiki.qemu.org"
|
||||
license=('GPL2')
|
||||
groups=()
|
||||
depends=()
|
||||
makedepends=()
|
||||
provides=()
|
||||
conflicts=()
|
||||
backup=()
|
||||
options=()
|
||||
#install=
|
||||
source=()
|
||||
md5sums=()
|
||||
noextract=()
|
||||
|
||||
MAIN_REPO=https://s3-eu-west-1.amazonaws.com/junest-repo
|
||||
QEMU_LINK=$MAIN_REPO/qemu
|
||||
|
||||
source_x86_64=("${QEMU_LINK}/x86_64/qemu-x86_64-static-x86" "${QEMU_LINK}/x86_64/qemu-x86_64-static-arm")
|
||||
source_i686=("${QEMU_LINK}/x86/qemu-x86-static-x86_64" "${QEMU_LINK}/x86/qemu-x86_64-static-arm")
|
||||
md5sums_x86_64=('8a706d734f8c790743a8114dda4c344a' '3ced729c95d2514f35d4899e944a4582')
|
||||
md5sums_x86=('c28d5049193dbce75efa0c8655d71427' 'f75fd15722fcc2914e3de0b0a46eb982')
|
||||
|
||||
source_arm=("${QEMU_LINK}/arm/qemu-arm-static-x86_64" "${QEMU_LINK}/arm/qemu-arm-static-x86")
|
||||
md5sums_arm=('bd9de1927aae4eb26dc0e5615159a616' 'a7c2b6ca53fa166f0c06ec76cc5edd7d')
|
||||
source_armv6h=("${QEMU_LINK}/arm/qemu-arm-static-x86_64" "${QEMU_LINK}/arm/qemu-arm-static-x86")
|
||||
md5sums_armv6h=('bd9de1927aae4eb26dc0e5615159a616' 'a7c2b6ca53fa166f0c06ec76cc5edd7d')
|
||||
source_armv7h=("${QEMU_LINK}/arm/qemu-arm-static-x86_64" "${QEMU_LINK}/arm/qemu-arm-static-x86")
|
||||
md5sums_armv7h=('bd9de1927aae4eb26dc0e5615159a616' 'a7c2b6ca53fa166f0c06ec76cc5edd7d')
|
||||
source_aarch64=("${QEMU_LINK}/arm/qemu-arm-static-x86_64" "${QEMU_LINK}/arm/qemu-arm-static-x86")
|
||||
md5sums_aarch64=('bd9de1927aae4eb26dc0e5615159a616' 'a7c2b6ca53fa166f0c06ec76cc5edd7d')
|
||||
|
||||
|
||||
package() {
|
||||
echo "Installing qemu static binaries"
|
||||
install -d -m 755 "${pkgdir}/usr/bin"
|
||||
install -m 755 "${srcdir}"/qemu-* ${pkgdir}/usr/bin
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# Maintainer: Filippo Squillace <feel dot sqoox at gmail dot com>
|
||||
# More details on how to change this file:
|
||||
# https://wiki.archlinux.org/index.php/PKGBUILD
|
||||
# https://wiki.archlinux.org/index.php/Creating_packages
|
||||
# https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages
|
||||
|
||||
pkgname=sudo-fake
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Simple script that bypasses sudo and execute the actual command. Useful for fakeroot environments."
|
||||
arch=('any')
|
||||
url=""
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('fakeroot' 'fakechroot')
|
||||
makedepends=()
|
||||
provides=('sudo')
|
||||
conflicts=('sudo')
|
||||
backup=()
|
||||
options=()
|
||||
#install=
|
||||
source=()
|
||||
md5sums=()
|
||||
noextract=()
|
||||
|
||||
package() {
|
||||
install -d -m 755 "${pkgdir}/usr/bin/"
|
||||
cat <<EOF > "${pkgdir}/usr/bin/sudo"
|
||||
#!/bin/bash
|
||||
for opt in "\$@"
|
||||
do
|
||||
case "\$1" in
|
||||
--) shift ; break ;;
|
||||
-*) shift ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
[[ -z "\${@}" ]] || fakechroot fakeroot "\${@}"
|
||||
EOF
|
||||
|
||||
chmod 755 "${pkgdir}/usr/bin/sudo"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
Loading…
Add table
Add a link
Reference in a new issue