-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repackage Linux From Scratch 12.1 sources into a squashfs image.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/echo Try "mkroot/mkroot.sh lfs" | ||
|
||
[ -z "$(which mksquashfs)" ] && echo "no squashfs" && exit 1 | ||
|
||
# Download osuosl's rollup tarball of all the LFS packages. | ||
|
||
download 45a27da2ee443a8e35a7e29db8a0c6877bbb98bb \ | ||
http://ftp.osuosl.org/pub/lfs/lfs-packages/lfs-packages-12.1.tar | ||
|
||
# This one's a little weird, we're creating a target-agonstic squashfs image | ||
# not part of the initramfs. | ||
|
||
setupfor lfs-packages | ||
LFS="$OUTPUT/lfs" LFSRC="$LFS/src" | ||
rm -rf "$LFS" && mkdir -p "$LFSRC/tzdata" && | ||
# Fixup names | ||
tar xfC tzdata*.tar.gz "$LFSRC/tzdata" && # Horrible package, no subdirectory! | ||
rm tzdata*.tar.gz && | ||
mv {expect*,expect-0}.tar.gz && # broken name (no - before version) | ||
rm -f tcl*-html.tar.gz && # Broken _and_ duplicate name | ||
mv {tcl*,tcl-0}.tar.gz && | ||
mkdir sub || exit 1 | ||
# extract tarballs to package name in output and apply patches (if any) | ||
for i in *.tar*; do | ||
PKG="${i/-[0-9]*/}" | ||
echo process $PKG | ||
tar xfC $i sub && mv sub/* "$LFSRC/$PKG" || exit 1 | ||
for j in $PKG*.patch; do | ||
[ -e "$j" ] && { ( cd "$LFSRC/$PKG" && patch -p1) < "$j" || exit 1 ; } | ||
done | ||
done | ||
|
||
# Archive the sources | ||
|
||
mksquashfs "$LFSRC" "$TOP"/lfs.sqf -noappend -all-root >/dev/null |