From aa4570efda8dfcb0e438275d96b3a42be14e3907 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Mon, 28 Jul 2014 19:32:57 +0200 Subject: [PATCH] create_debug_archive.sh: Run tar in the chroot session, too. --- liveboot-dbg-tar/create_debug_archive.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/liveboot-dbg-tar/create_debug_archive.sh b/liveboot-dbg-tar/create_debug_archive.sh index 56f8786..be77ee2 100755 --- a/liveboot-dbg-tar/create_debug_archive.sh +++ b/liveboot-dbg-tar/create_debug_archive.sh @@ -28,10 +28,11 @@ cidb_query() { liveboot_name="$(cidb_query "SELECT l.build_name from liveboot AS l JOIN jenkins_build AS j ON l.jenkins_build_id = j.id WHERE j.jenkins_build_number = $liveboot_id;")" kernel_ver="$(cidb_query "SELECT p.version from package_list_view AS p JOIN liveboot AS l ON l.package_list_id = p.package_list_id JOIN jenkins_build AS j ON l.jenkins_build_id = j.id WHERE j.jenkins_build_number = $liveboot_id AND p.name = 'profitbricks-linux-image-pserver';")" ethoip6_ver="$(cidb_query "SELECT p.version from package_list_view AS p JOIN liveboot AS l ON l.package_list_id = p.package_list_id JOIN jenkins_build AS j ON l.jenkins_build_id = j.id WHERE j.jenkins_build_number = $liveboot_id AND p.name = 'profitbricks-ethoip6-modules-pserver';")" -resultfile="/srv/liveboot/debug_archives/$liveboot_name-kernel-dbg.tar.xz" +resultpath="/srv/liveboot/debug_archives" +resultfile="$liveboot_name-kernel-dbg.tar.xz" -[ -e $resultfile ] && { - echo "Error: $resultfile already exists" +[ -e $resultpath/$resultfile ] && { + echo "Error: $resultpath/$resultfile already exists" exit 1 } @@ -53,7 +54,7 @@ deb http://repo.pb.local/pb-debian-dev ${DIST}-dev main contrib non-free deb http://repo.pb.local/pb-debian-dev ${DIST}-feature-autotest main contrib non-free EOF -run_in_chroot apt-get --yes install aptitude +run_in_chroot apt-get --yes install aptitude pixz run_in_chroot aptitude update # assemble ethoip6 debug directory @@ -78,7 +79,8 @@ run_in_chroot mkdir -p $assembledir/ethoip6-$ethoip6_ver-dbg run_in_chroot find ethoip6_dbg -name "*.ko" -exec mv {} $assembledir/ethoip6-$ethoip6_ver-dbg/ \; run_in_chroot tee $assembledir/README < $script_dir/README -tar --owner=root -Ipixz -cf "$resultfile" liveboot-$liveboot_id-kernel-dbg -C $chroot_dir/$workdir +run_in_chroot tar --owner=root -Ipixz -cf "$resultfile" liveboot-$liveboot_id-kernel-dbg -C $chroot_dir/$workdir +cp $chroot_dir/$workdir/$resultfile $resultpath cleanup session_id= -- 2.39.5