-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various fixes and improvements #204
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so on rebuild, we do not have to download all the packages Closes: #3
'apt' does not provide a stable interface (and warns us about this, when using in a script) also, 'apt' automatically removes downloaded packages after a (successful) installation, but we want to be able to control this with 'PKGUPGRADE_CLEANUP'
to explain what this script is doing (and what the args are for) this is inherited by <customos>/src/build_dist Closes: #6
so we can log to another file Closes: #4 (somewhat)
a /dev/loop* is not a *file*, hence 'test -f' does not work. it is a block-device, so use 'test -b' for compat, we leave the 'test -f' intact Closes: guysoft#203
this is mostly to prevent errors like > .../src/config: line 28: [: !=: unary operator expected which happens if BUILD_VARIANT is unset and you call > if [ $BUILD_VARIANT != 'default' ]; then while being there i also quoted the other variables, which should make *this* part of the code more resilient against whitespace paths
with our extra escaping, passing an empty BUILD_VARIANT is not longer detected as 'default'. this is now fixed.
Hey, Also - what did you use to detect all the spelling errors? :) |
Sorry for being impatient.
Thx for merging
|
apt-get install codespell
codespell . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
base build system
the
make_custom_pi_os
script now allows more variants to download directly, namely the non-lite variants of raspios.the
build_custom_os
script (and therefore thebuild_dist
script for the various custom distributions) now accepts a few options:-h
to print a short help about the script (mostly for documenting thevariant
argument. i found myself running./build_dist -h
which started a build for some unknown -h variant)-l <logfile>
for setting the logfile directly (just because we can)the
custompios
scriptlet now checks ifsfdisk
is available (and required), and aborts early with a warning. (on my Debian system,sfdisk
lives in/sbin
, which is not in my PATH. oftentimes i accidentally run./build_dist
as an ordinary (non-root) user, which would happily work away only to fail at the end when resizing the image. with this change it now fails after a few seconds, rather than after an hour, and i'm reminded to run throughsudo
...in
common.sh
i've changed mostecho
invocations to use their colour variants (since the build log is so verbose with all thoseset -x
, i really like the things that the build script wants to tell me to stand out visually).also in
common.sh
, i've improved thedetach_all_loopback()
function, to test possible loop-devices for being a block device rather than a regular file.modules
the
pkgupgrade
module now usesapt-get
instead ofapt
to quote from
man apt
:there's a new
PKGUPGRADE_CLEANUP
variable that can be set ton
(or really: anything except the defaulty
), in which case the apt-cache is not cleaned up. this is cool if you do not want to download the tons of deb packages for each build without setting up an apt-cacher.minor stuff
i've added a few
.gitignore
files to thedist_example
, in order to make sure that image-files are not accidentally committed to my precious git repository.i've also run
codespell
over the sources and fixed spelling errors.finally, the build process now shows the date when the build was started resp. finished. i find it nice to see how long it took, even when not closely watching the script)
feel free to cherry pick, or just merge the whole bunch.