ampart v1.1 - minor fixes and improvement of building
This is a little update with some minor changes:
-
Now the last partition in
dsnapshot
andesnapshot
modes will not be ended with an extra space, so if the external script want to compare the snapshot with an expected layout it would be easier and more staight-forward, the last if condition in the following example is now true:snapshot_expected='data::-1:4' log=$(ampart /dev/mmcblk2 --mode dsnapshot 2>/dev/null) readarray -d $'\b' -t snapshots <<< "$log" [[ "${snapshots[0]}" == "${snapshot_expected}" ]] && echo 'already adjusted'
in older versions the
"${snapshots[0]}"
here would contain an extra trailing space and you have to compare it with"${snapshot_expected} "
instead, which is counter-intuitive -
The project now builds with an automatically generated version which will be helpful for support
[root@bestv7Ji ~]# ampart --version ampart-ng (Amlogic eMMC partition tool) by 7Ji, version 1.1-16406fe-20221110
The version can be manually specified when building with
VERSION_CUSTOM
, e.g.make VERSION_CUSTOM=my_custom_version_number
This would be more helpful if you're building ampart with source files extracted from an archive, e.g. https://github.com/7Ji/ampart/archive/refs/tags/v1.0.tar.gz, Where there's no git info and the version will be empty and does not make sense
For downloading of the releases:
The ampart-v1.1-architecture-static/distro.xz
are compressed binaries, which contains only the compiled ampart binary itself. The static
one is staticlly linked, ~900KiB in size, it does not depend on any library in the environment; the distro
one is dynamically linked, ~100KiB in size, but it depends on an existing libc and zlib which has the same ABI as the build environment.
The ampart-git-v1.1-architecture.pkg.tar.xz/zstd
are ArchLinux packages, which can be installed via pacman -U
on an Arch-derived distro.
If you're using an Arch-derived distro, consider installing ampart through my AUR package: https://aur.archlinux.org/packages/ampart-git
Following https://github.com/7Ji/ampart#building, you can build ampart on essentially any x86-64 or aarch64 hosts, which is recommended as these releases here could be incompatible if the libc and zlib on your host is different from my build environment