From 6291e5cc83cbe03f90671129fdc75bed122652d5 Mon Sep 17 00:00:00 2001 From: Filippo Squillace Date: Wed, 30 Dec 2020 13:08:01 +0100 Subject: [PATCH] Use the Junest repo to install package deps --- VERSION | 2 +- lib/core/build.sh | 17 +++++++---- pkgs/groot-git/PKGBUILD | 58 -------------------------------------- pkgs/proot-static/PKGBUILD | 39 ------------------------- pkgs/qemu-static/PKGBUILD | 50 -------------------------------- pkgs/sudo-fake/PKGBUILD | 45 ----------------------------- 6 files changed, 13 insertions(+), 198 deletions(-) delete mode 100644 pkgs/groot-git/PKGBUILD delete mode 100644 pkgs/proot-static/PKGBUILD delete mode 100644 pkgs/qemu-static/PKGBUILD delete mode 100644 pkgs/sudo-fake/PKGBUILD diff --git a/VERSION b/VERSION index 643916c..eab246c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.3.1 +7.3.2 diff --git a/lib/core/build.sh b/lib/core/build.sh index fb41ede..b387582 100644 --- a/lib/core/build.sh +++ b/lib/core/build.sh @@ -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 < ${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 } diff --git a/pkgs/groot-git/PKGBUILD b/pkgs/groot-git/PKGBUILD deleted file mode 100644 index 015f9a2..0000000 --- a/pkgs/groot-git/PKGBUILD +++ /dev/null @@ -1,58 +0,0 @@ -# Maintainer: Filippo Squillace -# 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: diff --git a/pkgs/proot-static/PKGBUILD b/pkgs/proot-static/PKGBUILD deleted file mode 100644 index f73c126..0000000 --- a/pkgs/proot-static/PKGBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Maintainer: Filippo Squillace -# 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: diff --git a/pkgs/qemu-static/PKGBUILD b/pkgs/qemu-static/PKGBUILD deleted file mode 100644 index 3b7fc65..0000000 --- a/pkgs/qemu-static/PKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# Maintainer: Filippo Squillace -# 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: diff --git a/pkgs/sudo-fake/PKGBUILD b/pkgs/sudo-fake/PKGBUILD deleted file mode 100644 index 3587807..0000000 --- a/pkgs/sudo-fake/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Maintainer: Filippo Squillace -# 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 < "${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: