[kteam-tools][PATCH v2 6/7] git-build-kernel: special case no-orig-tarball src packages

Andy Whitcroft apw at canonical.com
Mon Aug 6 15:51:48 UTC 2018


On Thu, Aug 02, 2018 at 03:40:34PM -0700, Kamal Mostafa wrote:
> 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 <kamal at canonical.com>
> ---
>  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

This feels like it is going to become a problem.  For example in devel
we don't always have an orig as there isn't one yet as upstream has not
yet released the thing.  I think we need to think of a better way to
make this determination.

> +    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
>  }
>  
>  ###

-apw




More information about the kernel-team mailing list