From 86caa41c5023f77ae3e4450278573b062888da51 Mon Sep 17 00:00:00 2001 From: Kuoi Date: Sun, 7 May 2023 10:14:54 +0800 Subject: [PATCH] junest*: prepare for non-root user --- BioArchLinux/groot/PKGBUILD | 16 +++++++++++ BioArchLinux/groot/lilac.yaml | 13 +++++++++ BioArchLinux/junest/PKGBUILD | 27 ++++++++++++++++++ BioArchLinux/junest/junest.install | 14 ++++++++++ BioArchLinux/junest/lilac.yaml | 13 +++++++++ BioArchLinux/proot/PKGBUILD | 44 ++++++++++++++++++++++++++++++ BioArchLinux/proot/lilac.yaml | 14 ++++++++++ BioArchLinux/sudo-fake/PKGBUILD | 42 ++++++++++++++++++++++++++++ BioArchLinux/sudo-fake/lilac.yaml | 13 +++++++++ 9 files changed, 196 insertions(+) create mode 100644 BioArchLinux/groot/PKGBUILD create mode 100644 BioArchLinux/groot/lilac.yaml create mode 100644 BioArchLinux/junest/PKGBUILD create mode 100644 BioArchLinux/junest/junest.install create mode 100644 BioArchLinux/junest/lilac.yaml create mode 100644 BioArchLinux/proot/PKGBUILD create mode 100644 BioArchLinux/proot/lilac.yaml create mode 100644 BioArchLinux/sudo-fake/PKGBUILD create mode 100644 BioArchLinux/sudo-fake/lilac.yaml diff --git a/BioArchLinux/groot/PKGBUILD b/BioArchLinux/groot/PKGBUILD new file mode 100644 index 0000000000..0af748aaac --- /dev/null +++ b/BioArchLinux/groot/PKGBUILD @@ -0,0 +1,16 @@ +pkgname=groot +pkgver=1.0.2 +pkgrel=0 +arch=('any') +url="https://github.com/fsquillace/groot" +license=('GPL') +groups=('junest-extra') +depends=('coreutils') +source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") +md5sums=('SKIP') +package() { + cd "$srcdir/${pkgname}-${pkgver}" + install -d -m 755 "${pkgdir}/usr/bin" + install -m 755 "${srcdir}/${pkgname}-${pkgver}/bin/groot" ${pkgdir}/usr/bin/groot +} + diff --git a/BioArchLinux/groot/lilac.yaml b/BioArchLinux/groot/lilac.yaml new file mode 100644 index 0000000000..e3071b35a9 --- /dev/null +++ b/BioArchLinux/groot/lilac.yaml @@ -0,0 +1,13 @@ +build_prefix: extra-x86_64 +maintainers: + - github: starsareintherose + email: kuoi@bioarchlinux.org +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() +update_on: + - source: github + github: fsquillace/groot + use_max_tag: true diff --git a/BioArchLinux/junest/PKGBUILD b/BioArchLinux/junest/PKGBUILD new file mode 100644 index 0000000000..dcfc20ac73 --- /dev/null +++ b/BioArchLinux/junest/PKGBUILD @@ -0,0 +1,27 @@ +pkgname=junest +pkgver=7.4.4 +pkgrel=0 +pkgdesc="The Arch Linux based distro that runs upon any Linux distros without root access" +arch=('any') +url="http://fsquillace.github.io/junest-site/" +license=('GPL') +depends=('pacman') +makedepends=('git') +install=junest.install + +source=("$pkgname-$pkgver.tar.gz::https://github.com/fsquillace/junest/archive/refs/tags/${pkgver}.tar.gz") +md5sums=('SKIP') + +noextract=() + +package() { + cd "$srcdir/${pkgname}-${pkgver}" + + install -d -m 755 "${pkgdir}/opt/" + cp -R "${srcdir}/${pkgname}-${pkgver}" "${pkgdir}/opt/${pkgname}" + + install -d -m 755 "${pkgdir}/usr/bin" + ln -s /opt/${pkgname}/bin/${pkgname} ${pkgdir}/usr/bin/${pkgname} + ln -s /opt/${pkgname}/bin/sudoj ${pkgdir}/usr/bin/sudoj +} + diff --git a/BioArchLinux/junest/junest.install b/BioArchLinux/junest/junest.install new file mode 100644 index 0000000000..f3ca896d55 --- /dev/null +++ b/BioArchLinux/junest/junest.install @@ -0,0 +1,14 @@ +_msg(){ + : +} + +# arg 1: the new package version +post_install() { + _msg +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + _msg +} diff --git a/BioArchLinux/junest/lilac.yaml b/BioArchLinux/junest/lilac.yaml new file mode 100644 index 0000000000..6cb01f2e1d --- /dev/null +++ b/BioArchLinux/junest/lilac.yaml @@ -0,0 +1,13 @@ +build_prefix: extra-x86_64 +maintainers: + - github: starsareintherose + email: kuoi@bioarchlinux.org +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() +update_on: + - source: github + github: fsquillace/junest + use_max_tag: true diff --git a/BioArchLinux/proot/PKGBUILD b/BioArchLinux/proot/PKGBUILD new file mode 100644 index 0000000000..4d07999ec5 --- /dev/null +++ b/BioArchLinux/proot/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Martin Rys +# Previous maintainer: navigaid + +pkgname=proot +_pkgname=proot +groups=('junest-extra') +pkgver=5.3.1 +pkgrel=0 +pkgdesc="chroot, mount --bind, and binfmt_misc without privilege/setup" +arch=('i686' 'x86_64') +url="https://proot-me.github.io/" +license=('GPL') +provides=('proot') +depends=('talloc') +makedepends=('python-docutils' 'libxslt') +source=(${pkgname}-v${pkgver}.tar.gz::https://github.com/cedric-vincent/${_pkgname}/archive/v${pkgver}.tar.gz) +sha256sums=('966afe32bf9a9d0e80836a8874d4dd829c51750060d9e0f30d330b1ed7eec8c2') + +build() { + cd "${srcdir}"/${_pkgname}-${pkgver}/src + make -f GNUmakefile + + cd "${srcdir}"/${_pkgname}-${pkgver}/doc + make -f GNUmakefile +} + +package() { + cd "${srcdir}"/${_pkgname}-${pkgver} + + install -m755 -d "${pkgdir}"/usr/bin + install -m755 src/${pkgname} "${pkgdir}"/usr/bin + + install -m755 -d "${pkgdir}"/usr/share/man/man1/ + install -m644 -T doc/proot/man.1 "${pkgdir}"/usr/share/man/man1/${pkgname}.1 + + install -m755 -d "${pkgdir}"/usr/share/doc/proot/ + install -m644 CHANGELOG.rst "${pkgdir}"/usr/share/doc/proot + install -m644 doc/proot/index.html "${pkgdir}"/usr/share/doc/proot + install -m644 doc/proot/manual.rst "${pkgdir}"/usr/share/doc/proot + + install -m755 -d "${pkgdir}"/usr/share/doc/proot/stylesheets + install -m644 doc/proot/stylesheets/* "${pkgdir}"/usr/share/doc/proot/stylesheets +} + diff --git a/BioArchLinux/proot/lilac.yaml b/BioArchLinux/proot/lilac.yaml new file mode 100644 index 0000000000..c5690a07a6 --- /dev/null +++ b/BioArchLinux/proot/lilac.yaml @@ -0,0 +1,14 @@ +build_prefix: extra-x86_64 +maintainers: + - github: starsareintherose + email: kuoi@bioarchlinux.org +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() +update_on: + - source: github + github: cedric-vincent/proot + use_max_tag: true + prefix: 'v' diff --git a/BioArchLinux/sudo-fake/PKGBUILD b/BioArchLinux/sudo-fake/PKGBUILD new file mode 100644 index 0000000000..f06d7aea9f --- /dev/null +++ b/BioArchLinux/sudo-fake/PKGBUILD @@ -0,0 +1,42 @@ +pkgname=sudo-fake +pkgver=0.1.3 +pkgrel=0 +pkgdesc="Simple script that bypasses sudo and execute the actual command. Useful for fakeroot environments." +arch=('any') +url="https://github.com/fsquillace/junest-aur-repo/blob/master/pkgs/sudo-fake/" +license=('GPL') +groups=('junest-extra') +depends=('fakeroot' 'fakechroot') +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 +export FAKEROOTDONTTRYCHOWN=true +if [[ -n "\${@}" ]] +then + if [[ \$FAKECHROOT == true ]] + then + fakechrootcmd="" + else + fakechrootcmd="fakechroot" + fi + if [[ -n \$FAKED_MODE ]] + then + fakerootcmd="" + else + fakerootcmd="fakeroot" + fi + \$fakechrootcmd \$fakerootcmd "\${@}" +fi +EOF + chmod 755 "${pkgdir}/usr/bin/sudo" +} + diff --git a/BioArchLinux/sudo-fake/lilac.yaml b/BioArchLinux/sudo-fake/lilac.yaml new file mode 100644 index 0000000000..927472fd09 --- /dev/null +++ b/BioArchLinux/sudo-fake/lilac.yaml @@ -0,0 +1,13 @@ +maintainers: + - github: starsareintherose + email: kuoi@bioarchlinux.org +build_prefix: extra-x86_64 +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() +update_on: + - source: regex + url: "https://raw.githubusercontent.com/fsquillace/junest-aur-repo/master/pkgs/sudo-fake/PKGBUILD" + regex: 'versioin=([\d.]+\d+)'