Comments (4)
This can already be done right now (though manually). The installation tarball is also a fully working chroot
environment.
A simple script could be written to automatically create/destroy KISS chroot environments while doing a build in this environment in-between.
I'll think about how best to implement this though it shouldn't be too difficult.
from kiss.
It looks slick, sorry I'm late to this, I haven't even been able to test it yet.
from kiss.
This simple script will setup and create a simple KISS chroot
and drop you inside of it. Once you type exit
the chroot
is then destroyed. The script will download/extract the original chroot
tarball
once (cache) and will then simply cp
the original to a temporary and unique directory.
You can make any modifications you like to the kiss-chroot/
directory as this will remain untouched by the script unless it is removed. Think of this as how you could add a repository etc. You'd just need to kiss-chroot
into the "master" and make any changes you'd like to include in each temporary chroot
.
To reset the chroot
master simply remove kiss-chroot/
. To reset and redownload the chroot
simply remove kiss-chroot/
and kiss-chroot.tar.xz
.
To make more sense of it, here's what the directory hierarchy looks like:
kiss-chroot.tar.xz # The cached chroot tarball.
kiss-chroot/ # The "master"/"base" chroot (make your changes here).
chroot-$pid/ # A copy of kiss-chroot/ which is created/destroyed using the script.
#!/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"
from kiss.
Any thoughts on the above script?
from kiss.
Related Issues (20)
- if a build-fail hook fails, kiss thinks the package built successfully HOT 1
- Feature request - list of explicitly installed packages (for better orphan handling) HOT 3
- Feature request - comparing package versions with those further down the KISS_PATH HOT 5
- kiss help / /usr/share/doc/kiss/./index.txt has html HOT 1
- Make kiss build more scriptable HOT 3
- Use the kiss package manager on arch HOT 4
- kiss unable to install packages on systems without a user with the id 1000 HOT 5
- `kiss update`: false exit on non-remote git repos HOT 7
- [Feature request] => KISS uses git clone without --depth parameter resulting in huge clones HOT 7
- Set GOFLAGS along with GOPATH
- permissions bug HOT 2
- Problem installing new packages HOT 6
- Hook for Ctrl+C HOT 1
- Inherit KISS_HOOK in children HOT 3
- Bug in pkg_source_tar HOT 1
- should this string be double quoted instead of single?
- User `umask` interferes with packaging
- Can't run `kiss update` because `ERROR 'perl' not found` HOT 10
- Discussion: Should package builds be ran from the driectory with the install and post-install scripts HOT 2
- mv files with extra privilages HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiss.