aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/kiss-chbuild34
-rwxr-xr-xkiss9
2 files changed, 39 insertions, 4 deletions
diff --git a/contrib/kiss-chbuild b/contrib/kiss-chbuild
new file mode 100755
index 0000000..69e0854
--- /dev/null
+++ b/contrib/kiss-chbuild
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+#
+# Create/destroy temporary chroots.
+
+log() {
+ printf '\033[31;1m->\033[m %s.\n' "$@"
+}
+
+clean() {
+ log "Destroying chroot"
+ su -c "rm -rf chroot-$pid" || clean
+}
+
+pid=$$
+
+cd "${cac_dir:=$KISS_ROOT${XDG_CACHE_HOME:-$HOME/.cache}/kiss}"
+
+[ -f kiss-chroot.tar.xz ] || {
+ log "Downloading chroot tarball"
+ wget https://dl.getkiss.org/kiss-chroot.tar.xz
+}
+
+[ -d kiss-chroot ] || {
+ log "Extracting chroot"
+ tar xvf kiss-chroot.tar.xz
+}
+
+log "Creating temporary chroot"
+cp -a kiss-chroot "chroot-$pid"
+
+trap clean EXIT INT
+
+log "Entering chroot"
+su -c "kiss-chroot chroot-$pid"
diff --git a/kiss b/kiss
index ea61a0b..676a49c 100755
--- a/kiss
+++ b/kiss
@@ -321,7 +321,7 @@ pkg_fixdeps() {
case $dep in
# Skip listing these packages as dependencies.
- musl|gcc|${PWD##*/}) ;;
+ musl|gcc|${PWD##*/}|"") ;;
*) printf '%s\n' "$dep" ;;
esac
done ||:
@@ -770,8 +770,9 @@ pkg_install() {
# This is repeated multiple times. Better to make it a function.
pkg_rsync() {
- rsync --chown=root:root -WhHKa --no-compress "$1" --exclude /etc \
- "$tar_dir/$pkg_name/" "$KISS_ROOT/"
+ rsync --chown=root:root --chmod=Du-s,Dg-s,Do-s \
+ -WhHKa --no-compress "$1" --exclude /etc \
+ "$tar_dir/$pkg_name/" "$KISS_ROOT/"
}
# Install the package by using 'rsync' and overwrite any existing files
@@ -1092,7 +1093,7 @@ args() {
;;
v|version|-v|--version)
- log kiss 0.60.1
+ log kiss 0.70.0
;;
h|help|-h|--help|'')