From patchwork Tue Mar 26 16:16:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roxana Nicolescu X-Patchwork-Id: 1916259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V3w1D10Wjz1yWv for ; Wed, 27 Mar 2024 03:17:04 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rp9Tr-00015s-Ce; Tue, 26 Mar 2024 16:16:55 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rp9Tk-00014Y-Go for kernel-team@lists.ubuntu.com; Tue, 26 Mar 2024 16:16:48 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 61BB83F628 for ; Tue, 26 Mar 2024 16:16:48 +0000 (UTC) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1e0b3a4c2e4so20275065ad.0 for ; Tue, 26 Mar 2024 09:16:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711469807; x=1712074607; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FSZlDRei5zZmj6E729dwS8KckbxcaFoACGObsdeluOg=; b=XC5Ii6Dza6Jzy6p/2uf/g+6tE7GeYZJ1SwUVExnzYvVDVe4cAPYDKRE+GyGy4xTJn0 eRI24oF83MagqO1A3XBgDTUNoUF1GGLRzkR6VdM1AGGo5UupmK5zUQxni4ae1CTB+Mge M234pzY0SPbKIIvG0Yr1XRBLQ+f19tyCJnLwplgoZXI3LyFUF9U0ZZGGxY9XG7+5ye6D Oop9poeLYtTS+nbBVYzDTjcejsOztMDJgmponbZdb76ClI6JOc47cXeH4GSauEtcbmpf DB2OaQvFpSdO5FwbLr7I4F1cBaY3gTztmF/ijFxOiT6ZMxqmjN4CyJVgYI1eKtlp6w+S MtFg== X-Gm-Message-State: AOJu0YxW51t/zVUWjHk5MIgKA91RzM0QcAkvqabHwi8ZyzLjh5pbM8If zZXjtFEZI+VTF61Xi+UGxyU1ulMYPVPevqFUqiHmrn4ZJeGNbTrre0HJV5PlVKxQNrgxc5Zl3hr zl42+YUjbU6Q+yBGawgvZ/CS7XnknXB1DWyMa3NZuzFzV73bWApwRkxNitPcqACFD/c2feqVbqk 6b69NpixKuXm9i7Ws= X-Received: by 2002:a17:903:228b:b0:1e0:b5d4:9f61 with SMTP id b11-20020a170903228b00b001e0b5d49f61mr7813253plh.36.1711469807022; Tue, 26 Mar 2024 09:16:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHP1hMe+aXIlv+zJQe23s8gtwCrcP/fAMjak2uTDG/YH+dJ9ZIvMpV+kGr1dY9U7QInMIPCVg== X-Received: by 2002:a17:903:228b:b0:1e0:b5d4:9f61 with SMTP id b11-20020a170903228b00b001e0b5d49f61mr7813219plh.36.1711469806620; Tue, 26 Mar 2024 09:16:46 -0700 (PDT) Received: from work.lan ([2001:67c:1560:8007::aac:c490]) by smtp.gmail.com with ESMTPSA id d6-20020a170902654600b001dd4d0082c8sm7140493pln.216.2024.03.26.09.16.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 09:16:46 -0700 (PDT) From: Roxana Nicolescu To: kernel-team@lists.ubuntu.com Subject: [SRU][M,J,F,B,X,T][PATCH 1/1] UBUNTU: [Packaging] Remove getabis Date: Tue, 26 Mar 2024 17:16:37 +0100 Message-Id: <20240326161637.274890-2-roxana.nicolescu@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326161637.274890-1-roxana.nicolescu@canonical.com> References: <20240326161637.274890-1-roxana.nicolescu@canonical.com> MIME-Version: 1.0 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2059143 With ABI checks removed from the tree (#LP2055685), there's no need to download the buildinfo from a previous version. Signed-off-by: Roxana Nicolescu --- debian/scripts/misc/getabis | 222 ------------------------------------ 1 file changed, 222 deletions(-) delete mode 100755 debian/scripts/misc/getabis diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis deleted file mode 100755 index 819824f6162c..000000000000 --- a/debian/scripts/misc/getabis +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/bash - -export LC_ALL=C.UTF-8 - -if [ "$#" = "1" ]; then - set - $(echo "$1" | sed -e 's/-/ /') -fi -if [ "$#" != "2" ]; then - echo "Usage: $0 " 1>&2 - echo "Usage: $0 " 1>&2 - exit 1 -fi - -if [ "$DEBIAN" = "" ]; then - . debian/debian.env -fi - -ver=$1 -revision=$2 -abi=${revision%%.*} - -verabi=$ver-$abi -verfull=$ver-$revision - -WGET="wget --tries=1 --timeout=10 --quiet -c" - -# Check if we use a flat (unversioned) ABI directory -if [ -f "${DEBIAN}/abi/version" ] || \ - grep -qP '^abidir\s+.*/__abi.current/' debian/rules.d/0-common-vars.mk ; then - echo "Using flat ABI directory" - flat_abi=1 - abidir=$(pwd)/${DEBIAN}/abi -else - echo "Using versioned ABI directory" - flat_abi=0 - abidir=$(pwd)/${DEBIAN}/abi/${verfull} -fi - -tmpdir="`pwd`/abi-tmp-$verfull" -origdir="`pwd`" -fwinfo=$abidir/fwinfo - -test -d $tmpdir || mkdir $tmpdir - -package_prefixes() { - : # no longer used ... -} - -getall() { - arch=$1 - shift - - mkdir -p $abidir/$arch - - for sub in $@; do - if [ -f $abidir/$arch/$sub ]; then - echo "Existing $sub($arch)..." - continue - fi - echo "Fetching $sub($arch)..." - getall_set "linux-buildinfo" "$arch" "$sub" || \ - getall_set "linux-image-unsigned linux-modules linux-modules-extra" "$arch" "$sub" || \ - getall_set "linux-image-unsigned linux-modules" "$arch" "$sub" || \ - getall_set "linux-image linux-modules linux-modules-extra" "$arch" "$sub" || \ - getall_set "linux-image linux-modules" "$arch" "$sub" || \ - getall_set "linux-image linux-image-extra" "$arch" "$sub" || \ - getall_set "linux-image" "$arch" "$sub" || \ - { echo "FAILED"; exit 1; } - done -} -getall_set() -{ - prefixes="$1" - arch="$2" - sub="$3" - ( - echo -n " set:" - filenames="" - cd $tmpdir - found=1 - for prefix in $prefixes - do - echo -n " $prefix=" - if [ "$found" = 0 ]; then - echo -n "-" - continue - fi - filename=${prefix}-${verabi}-${sub}_${verfull}_${arch}.deb - for r in "${repo_list[@]}" - do - if ! [ -f $filename ]; then - $WGET $r/$filename - rc="$?" - # If this was not successful or a valid error - # return from the server all bets are off, bail. - [ "$rc" != 0 -a "$rc" != 8 ] && return 2 - fi - if [ -f $filename ]; then - echo -n "y" - filenames="$filenames $filename" - break - fi - done - if [ ! -f "$filename" ]; then - echo -n "n" - found=0 - fi - done - echo "" - if [ "$found" = 0 ]; then - return 1 - fi - echo " extracting..." - for filename in $filenames - do - dpkg-deb --extract $filename tmp - done - # FORM 1: linux-image et al extracted here. - if [ -d tmp/boot ]; then - echo " images..." - find tmp -name "*.ko" | while read f; do - modinfo $f | grep ^firmware >> $fwinfo - done - if [ -f tmp/boot/abi-* ]; then - mv tmp/boot/abi-* $abidir/$arch/$sub - else - echo " NO ABI FILE" - fi - if [ -f tmp/boot/retpoline-* ]; then - mv tmp/boot/retpoline-* $abidir/$arch/$sub.retpoline - else - echo " NO RETPOLINE FILE" - fi - (cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \ - sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \ - $abidir/$arch/$sub.modules - ( - cd tmp; - # Prevent exposing some errors when called by python scripts. SIGPIPE seems to get - # exposed when using the `find ...` form of the command. - ko=$(find lib/modules/$verabi-$sub/kernel \ - -name '*.ko' | head -1) - readelf -p .comment "$ko" | gawk ' - ($1 == "[") { - printf("%s", $3); - for (n=4; n<=NF; n++) { - printf(" %s", $n); - } - print "" - }' | sort -u >$abidir/$arch/$sub.compiler - version=`cat $abidir/$arch/$sub.compiler` - echo " $version" - ) - # FORM 2: moduleinfo packages - # cranky fix -- modinfo supported - else - echo " buildinfo..." - base="tmp/usr/lib/linux/${verabi}-${sub}" - mv "$base/abi" "$abidir/$arch/$sub" - for comp in 'modules' 'retpoline' 'compiler' - do - mv "$base/$comp" "$abidir/$arch/$sub.$comp" - done - if [ -e "${base}"/modules.builtin ] ; then - mv "${base}"/modules.builtin "${abidir}/${arch}/${sub}".modules.builtin - fi - cat "$base/fwinfo" >>"$fwinfo" - if [ -e "${base}"/fwinfo.builtin ] ; then - cat "${base}"/fwinfo.builtin >> "${fwinfo}".builtin - fi - fi - rm -rf tmp $filenames - echo " done" - ) - rc="$?" - if [ "$rc" = 2 ]; then - echo "ERROR: downloads are reporting network failures" 1>&2 - exit 1 - fi - return "$rc" -} - -# MAIN - -# Setup abi directory -rm -rf "${abidir}" -mkdir -p $abidir -echo $abi > $abidir/abiname -if [ ${flat_abi} -eq 1 ] ; then - echo "${verfull}" > "${abidir}"/version -fi - -# NOTE: The flavours are hardcoded, because they may have changed from the -# current build. - -. $DEBIAN/etc/getabis - -# Extract compiler source package version from e.g.: -# GCC: (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2 -compilers=`sed 's/^.*(.* \(.*\)).*$/\1/' $abidir/*/*.compiler | sort -u | wc -l` -if [ "$compilers" != 1 ]; then - echo "WARNING: inconsistent compiler versions detected:" 1>&2 - sort -u $abidir/*/*.compiler | sed 's/^/WARNING: /' 1>&2 -fi - -# Sort fwinfo files -sort < $fwinfo | uniq > fwinfo.tmp -mv fwinfo.tmp $fwinfo -if [ -e "${fwinfo}".builtin ] ; then - sort < "${fwinfo}".builtin | uniq > fwinfo.tmp - mv fwinfo.tmp "${fwinfo}".builtin -fi - -rmdir $tmpdir - -# If this is running in a git repo, add the new ABI directory, remove the old -if [ -d ".git" ]; then - git add "${abidir}" - if [ ${flat_abi} -eq 0 ] ; then - find "$DEBIAN"/abi/* -maxdepth 0 -type d | grep -v "$verfull" | while read f; do git rm -rf "$f"; done - fi -fi