aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-02-17 19:53:23 -0500
committerJesús <heckyel@hyperbola.info>2021-02-17 19:53:23 -0500
commitab6a7fcb62c68f3011e01bac962148cb206dbd9b (patch)
tree7c143dcf167f478e3ba9612f1bf3ac9aae07629e
parenteab7a6db0b59b5f46f48eafc51874f044ee9f3fa (diff)
downloadhyperbola-bootstrap-ab6a7fcb62c68f3011e01bac962148cb206dbd9b.tar.lz
hyperbola-bootstrap-ab6a7fcb62c68f3011e01bac962148cb206dbd9b.tar.xz
hyperbola-bootstrap-ab6a7fcb62c68f3011e01bac962148cb206dbd9b.zip
Fix generating file tar.gz
-rw-r--r--.gitignore4
-rwxr-xr-xhyper-bootstrap.sh1
-rw-r--r--make-bootstrap-file.sh15
3 files changed, 10 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 66dd7b2..359a49d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
-myhyper
+myhyper/
+x86_64/
+i686/
*.tar.gz
*.sha512sum
diff --git a/hyper-bootstrap.sh b/hyper-bootstrap.sh
index 4b2e525..fd057c5 100755
--- a/hyper-bootstrap.sh
+++ b/hyper-bootstrap.sh
@@ -13,6 +13,7 @@
# Example:
#
# # ./hyper-bootstrap.sh -a x86_64 -r "https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/testing" myhyper
+# # ./hyper-bootstrap.sh myhyper
#
# And then you can chroot to the destination directory (user: root, password: root):
#
diff --git a/make-bootstrap-file.sh b/make-bootstrap-file.sh
index d1c5cb4..00e46bf 100644
--- a/make-bootstrap-file.sh
+++ b/make-bootstrap-file.sh
@@ -11,24 +11,22 @@ CHROOT_DELETE='y'
RESULTPATH=${SCRIPT_PWD}/
ARCH="x86_64"
REPO_URL="https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/testing"
-DOWNLOAD_DIR="/tmp/bootstrap-packages"
-
-ROOTFS=$(mktemp -d)
-mkdir -p "$ROOTFS"
+ROOTFS="$ARCH"
# remove old archives
rm -f "${RESULTPATH}/hyperbola-bootstrap.tar.gz" "${RESULTPATH}/hyperbola-bootstrap.tar.gz.sha512sum"
# bootstrap
-"${SCRIPT_PWD}/hyper-bootstrap.sh" -a "${ARCH}" -r "${REPO_URL}" -d "${DOWNLOAD_DIR}" "${ROOTFS}"
+"${SCRIPT_PWD}/hyper-bootstrap.sh" -a "${ARCH}" -r "${REPO_URL}" "${ROOTFS}"
cd "${ROOTFS}"
# clean up package cache
rm -rf var/cache/*
+
# create new archive
-tar -czf "${RESULTPATH}/hyperbola-bootstrap.tar.gz" --transform "s|^|root.${ARCH}/|" --owner 0 --group 0 -- \
- bin dev home media opt root sbin sys usr lib64 \
- boot etc lib mnt proc run srv tmp var
+cd ${RESULTPATH}
+tar --create --gzip --numeric-owner --xattrs --acls --file="hyperbola-bootstrap.tar.gz" "${ROOTFS}"
+# create shasum
sha512sum "${RESULTPATH}/hyperbola-bootstrap.tar.gz" >| "${RESULTPATH}/hyperbola-bootstrap.tar.gz.sha512sum"
# clean chroot temp
@@ -40,6 +38,5 @@ esac
# report result
echo "REPO: $REPO_URL"
-echo "DOWNLOAD_DIR: $DOWNLOAD_DIR"
echo "ROOTFS: $ROOTFS"
echo "RESULTPATH: $RESULTPATH"