From patchwork Thu Aug 2 22:40:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 952990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41hQBC0Rrxz9s9l; Fri, 3 Aug 2018 08:40:50 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1flMGy-0000wq-7Z; Thu, 02 Aug 2018 22:40:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1flMGw-0000vU-8X for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 22:40:42 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1flMGv-00054O-Sr for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 22:40:42 +0000 Received: from kamal by fourier with local (Exim 4.86_2) (envelope-from ) id 1flMGt-0002UC-M7 for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 15:40:39 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH v2 6/7] git-build-kernel: special case no-orig-tarball src packages Date: Thu, 2 Aug 2018 15:40:34 -0700 Message-Id: <1533249635-9483-7-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533249635-9483-1-git-send-email-kamal@canonical.com> References: <1533249635-9483-1-git-send-email-kamal@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The "meta" and "signed" source packages do not use an orig tarball, so do not try to symlink to one, and do use --no-tgz-check to inhibit checking for one (the latter is explicitly required just for "signed" since its non-Debian-native version number implies that there will be a orig tarball). Signed-off-by: Kamal Mostafa --- git-build-kernel/git-build-kernel | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel index 3c19587..02994db 100755 --- a/git-build-kernel/git-build-kernel +++ b/git-build-kernel/git-build-kernel @@ -142,10 +142,23 @@ touch "$WORKDIR/building" trap "rm -rf $WORKDIR/building $BUILDDIR" 0 [ $do_source_pkg = 1 ] && { - orig_tarball="${SRCPKG}_${VERSION%%-*}.orig.tar.gz" - # Careful: $ORIG_TARBALLS_DIR must be accessible from within the chroot. - # (Alternately, use "cp -p" instead of "ln -s" if that's not an option) - ln -s $ORIG_TARBALLS_DIR/$orig_tarball $WORKDIR/ + ### Special case for linux-signed and linux-meta packages, which + ### have no .orig tarball + [ ${SRCPKG/-signed} != $SRCPKG ] && no_orig_tarball=1 + [ ${SRCPKG/-meta} != $SRCPKG ] && no_orig_tarball=1 + if [ "$no_orig_tarball" = 1 ] + then + srcpkg_debopts="--no-tgz-check $srcpkg_debopts" + else + orig_tarball="${SRCPKG}_${VERSION%%-*}.orig.tar.gz" + # Careful: $ORIG_TARBALLS_DIR must be accessible from within the chroot. + # (Alternately, use "cp -p" instead of "ln -s" if that's not an option) + [ -e "$ORIG_TARBALLS_DIR/$orig_tarball" ] || { + echo "fatal: missing $ORIG_TARBALLS_DIR/$orig_tarball" 1>&2 + exit 1 + } + ln -s $ORIG_TARBALLS_DIR/$orig_tarball $WORKDIR/ + fi } ###