diff options
author | V3n3RiX <venerix@rogentos.ro> | 2015-08-30 09:00:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2015-08-30 09:00:42 +0100 |
commit | 2821833d2e292ba86d7a4da4a43453f503ff9569 (patch) | |
tree | e12f05ef71eb7f0297c3089869b6f20e4a038b76 | |
parent | 3126bda8b8e03c1a9ee32aacf5caf6204d958f3f (diff) |
move more variables into libvasile, refactor md5sum checking using md5sum itself
-rwxr-xr-x | build32 | 9 | ||||
-rwxr-xr-x | build64 | 9 | ||||
-rwxr-xr-x | libvasile | 8 |
3 files changed, 14 insertions, 12 deletions
@@ -4,7 +4,7 @@ source libvasile envkogaionstart () { # mount ro squashfs chroot + add rw overlayfs layer to enable clean package building - mount -t squashfs "$sqfsroot" "$rodir" + mount -t squashfs "$sqfsrootx86" "$rodir" mount -t overlayfs -o lowerdir="$rodir",upperdir="$rwdir" overlayfs "$overlaydir" # keep built binary packages around, we will convert them to deb packages using vasile while : true ; do @@ -65,13 +65,10 @@ envkogaionsquashfsintegrity () { # our bare metal buildserver is x86_64 but we want to build 32bit packages as well # run this script with linux32 to fool it we run i686 and to build 32bit packages while : true ; do - export local sqfsroot="kogaiondevelx86.squashfs" - export local sqfsrootmd5file=""$sqfsroot".md5" - export local sqfsrootmd5="$(cat "$sqfsrootmd5file" | awk {'print $1'})" - if [[ -f "$sqfsroot" && -f "$sqfsrootmd5file" ]] ; then + if [[ -f "$sqfsrootx86" && -f "$sqfsrootx86md5" ]] ; then echo "Good, i686 squashed chroot && checksum file FOUND ... verifying integrity" echo "" - if [[ "$(md5sum "$sqfsroot" | awk {'print $1'})" = "$sqfsrootmd5" ]] ; then + if [[ "$(md5sum -c "$sqfsrootx86md5")" ]] ; then echo "Good, i686 squashed chroot checksum PASSED ... starting environment" echo "" sleep 1 @@ -4,7 +4,7 @@ source libvasile envkogaionstart () { # mount ro squashfs chroot + add rw overlayfs layer to enable clean package building - mount -t squashfs "$sqfsroot" "$rodir" + mount -t squashfs "$sqfsrootx64" "$rodir" mount -t overlayfs -o lowerdir="$rodir",upperdir="$rwdir" overlayfs "$overlaydir" # keep built binary packages around, we will convert them to deb packages using vasile while : true ; do @@ -65,13 +65,10 @@ envkogaionsquashfsintegrity () { # our bare metal buildserver is x86_64 but we want to build 32bit packages as well # run this script with linux32 to fool it we run i686 and to build 32bit packages while : true ; do - export local sqfsroot="kogaiondevelx64.squashfs" - export local sqfsrootmd5file=""$sqfsroot".md5" - export local sqfsrootmd5="$(cat "$sqfsrootmd5file" | awk {'print $1'})" - if [[ -f "$sqfsroot" && -f "$sqfsrootmd5file" ]] ; then + if [[ -f "$sqfsrootx64" && -f "$sqfsrootx64md5" ]] ; then echo "Good, x86_64 squashed chroot && checksum file FOUND ... verifying integrity" echo "" - if [[ "$(md5sum "$sqfsroot" | awk {'print $1'})" = "$sqfsrootmd5" ]] ; then + if [[ "$(md5sum -c "$sqfsrootx64md5")" ]] ; then echo "Good, x86_64 squashed chroot checksum PASSED ... starting environment" echo "" sleep 1 @@ -16,3 +16,11 @@ export local envkogaiondesktopoverlay="layman -f -a kogaion-desktop -o https://r export local envkogaionbuildgit="cd /opt && git clone https://github.com/Rogentos/build.git" export local envkogaionportageconfig="ln -sf /opt/build/conf/intel/portage /etc/portage" export local envkogaionenvupdate="/usr/sbin/env-update && . /etc/profile" + +# env squashfs chroot variables +export local sqfsrootx86="kogaiondevelx86.squashfs" +export local sqfsrootx86md5=""$sqfsrootx86".md5" + +export local sqfsrootx64="kogaiondevelx64.squashfs" +export local sqfsrootx64md5=""$sqfsrootx64".md5" + |