Merge branch 'next' of https://git.devuan.org/sdk/libdevuansdk into next
This commit is contained in:
commit
a67ef2cf00
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
libdevuansdk_version="0.4"
|
||||
libdevuansdk_version="0.5"
|
||||
LIBPATH=${LIBPATH:-$(dirname $0)}
|
||||
|
||||
source $LIBPATH/config
|
||||
|
|
|
|||
|
|
@ -151,6 +151,19 @@ bootstrap_tar_unpack() {
|
|||
cat <<EOF | sudo tee ${strapdir}/postunpack >/dev/null
|
||||
#!/bin/sh
|
||||
apt-get update
|
||||
|
||||
## check if all our extra_packages exist
|
||||
allpkgs="\$(apt-cache search '.' | cut -d' ' -f1)"
|
||||
for i in ${extra_packages} ; do
|
||||
printf "%s" "\$allpkgs" | grep -q "^\$i$" || missing="\$missing \$i"
|
||||
done
|
||||
|
||||
[ -n "\$missing" ] && {
|
||||
printf "\033[1;31m[!!] some extra packages don't exist\033[0m\n"
|
||||
printf "%s\n" "\$missing"
|
||||
exit 1
|
||||
}
|
||||
|
||||
apt-get --yes --force-yes upgrade
|
||||
apt-get --yes --force-yes install ${extra_packages}
|
||||
apt-get --yes --force-yes autoremove
|
||||
|
|
|
|||
|
|
@ -114,10 +114,12 @@ image_pack_dist() {
|
|||
zerr
|
||||
}
|
||||
|
||||
notice "compressing image with xz"
|
||||
_xz="xz -zv"
|
||||
[[ $(command -v pixz) ]] && _xz=pixz
|
||||
notice "compressing image with $_xz"
|
||||
silly
|
||||
pushd $workdir
|
||||
xz -zv ${image_name}.img
|
||||
${=_xz} ${image_name}.img
|
||||
|
||||
notice "generating sha256 for ${image_name}.img.xz"
|
||||
sha256sum ${image_name}.img.xz > ${image_name}.img.xz.sha
|
||||
|
|
@ -143,9 +145,11 @@ image_raw_mount() {
|
|||
sudo mount $rootpart $workdir/mnt && \
|
||||
act "mounted root partition" || zerr
|
||||
|
||||
sudo mkdir $workdir/mnt/boot
|
||||
sudo mount $bootpart $workdir/mnt/boot && \
|
||||
act "mounted boot partition" || zerr
|
||||
[[ "$parted_type" == gpt ]] || {
|
||||
sudo mkdir $workdir/mnt/boot
|
||||
sudo mount $bootpart $workdir/mnt/boot && \
|
||||
act "mounted boot partition" || zerr
|
||||
}
|
||||
}
|
||||
|
||||
image_raw_umount() {
|
||||
|
|
@ -153,8 +157,10 @@ image_raw_umount() {
|
|||
req=(workdir bootpart rootpart)
|
||||
ckreq || return 1
|
||||
|
||||
sudo umount $workdir/mnt/boot && act "unmounted boot partition" || zerr
|
||||
sleep 1
|
||||
[[ "$parted_type" == gpt ]] || {
|
||||
sudo umount $workdir/mnt/boot && act "unmounted boot partition" || zerr
|
||||
sleep 1
|
||||
}
|
||||
sudo umount $workdir/mnt && act "unmounted root partition" || zerr
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue