Issue #1859 - Part 4: Update mar file generation scripts for use of xz.

- Update packaging scripts to support both lzma and bzip2
- Update python script to support lzma
- Update test scripts to support lzma to be thorough

This all requires xz to be available in the path on the build system.
This commit is contained in:
Moonchild 2022-01-21 22:22:07 +00:00 committed by roytam1
commit 121d56e082
9 changed files with 163 additions and 78 deletions

View file

@ -9,6 +9,6 @@ mkdir -p "$workdir"
cp "$1" "$workdir"
cd "$workdir"
mar -x "$1"
mv updatev2.manifest updatev2.manifest.bz2
bzip2 -d updatev2.manifest.bz2
mv updatev2.manifest updatev2.manifest.xz
xz -d updatev2.manifest.xz
cat updatev2.manifest

View file

@ -10,9 +10,9 @@
# In here to use the local common.sh to allow the full mars to have unfiltered files
# -----------------------------------------------------------------------------
# By default just assume that these tools exist on our path
# By default just assume that these tools exist in our path
MAR=${MAR:-mar}
BZIP2=${BZIP2:-bzip2}
XZ=${XZ:-xz}
MBSDIFF=${MBSDIFF:-mbsdiff}
# -----------------------------------------------------------------------------

View file

@ -30,19 +30,19 @@ cp "$2" "$todir"
cd "$fromdir"
mar -x "$1"
rm "$1"
mv updatev2.manifest updatev2.manifest.bz2
bzip2 -d updatev2.manifest.bz2
mv updatev3.manifest updatev3.manifest.bz2
bzip2 -d updatev3.manifest.bz2
mv updatev2.manifest updatev2.manifest.xz
xz -d updatev2.manifest.xz
mv updatev3.manifest updatev3.manifest.xz
xz -d updatev3.manifest.xz
ls $lsargs > files.txt
cd "$todir"
mar -x "$2"
rm "$2"
mv updatev2.manifest updatev2.manifest.bz2
bzip2 -d updatev2.manifest.bz2
mv updatev3.manifest updatev3.manifest.bz2
bzip2 -d updatev3.manifest.bz2
mv updatev2.manifest updatev2.manifest.xz
xz -d updatev2.manifest.xz
mv updatev3.manifest updatev3.manifest.xz
xz -d updatev3.manifest.xz
ls $lsargs > files.txt
echo "diffing $fromdir and $todir"

View file

@ -94,7 +94,7 @@ for ((i=0; $i<$num_files; i=$i+1)); do
dir=$(dirname "$f")
mkdir -p "$workdir/$dir"
$BZIP2 -cz9 "$targetdir/$f" > "$workdir/$f"
$XZ --compress --x86 --lzma2 --format=xz --check=crc64 --force --stdout "$targetdir/$f" > "$workdir/$f"
copy_perm "$targetdir/$f" "$workdir/$f"
targetfiles="$targetfiles \"$f\""
@ -105,8 +105,8 @@ notice ""
notice "Adding file and directory remove instructions from file 'removed-files'"
append_remove_instructions "$targetdir" "$updatemanifestv2" "$updatemanifestv3"
$BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
$BZIP2 -z9 "$updatemanifestv3" && mv -f "$updatemanifestv3.bz2" "$updatemanifestv3"
$XZ --compress --x86 --lzma2 --format=xz --check=crc64 --force "$updatemanifestv2" && mv -f "$updatemanifestv2.xz" "$updatemanifestv2"
$XZ --compress --x86 --lzma2 --format=xz --check=crc64 --force "$updatemanifestv3" && mv -f "$updatemanifestv3.xz" "$updatemanifestv3"
eval "$MAR -C \"$workdir\" -c output.mar $targetfiles"
mv -f "$workdir/output.mar" "$archive"