From patchwork Mon Apr 29 15:06:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 89144 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EFCF3858D3C for ; Mon, 29 Apr 2024 15:06:20 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 50AC03858D35 for ; Mon, 29 Apr 2024 15:06:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50AC03858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 50AC03858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714403176; cv=none; b=OoAR4TqhWysdTgUDwZj45yuElbAM53IbcM5GETN0NLrXkeNKlKYaBhaw32Ffhi7/Glal3tzEu9R1zkJ2VnOaOn4F2t+FLNM+vjA/uNj43MMNHb5sVfpV7QiojdeI6tihXp8mFroiEtQFydj4+U6bExMDzSM3sGfhA0Fzsx1XlaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714403176; c=relaxed/simple; bh=YRVu0lTJXgblY8PGYijeG72/o1gwlJacP8cndZOJrvU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GbfmThcgzMx1H8T7qEAfE0PDrrcFwN/xxjrblnPoMbHVv6SErKmtzrUFYXzZsgNcKfuGgoth2mAoD4DpUYW9cqt6FWDS09JA9kKilP5iajxnKBKAa5g2CAkN7Sh3Zmp+5Mn5wqGxAEbE2ryjK4/L0j9rMZqkayZ/Kkhr7XJVZqw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714403166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=IQeYaQqSwUTfKy+gsUVAjWmbOMPcrcVLP0eQ37lw6pY=; b=L48azqM4hU45fVMj+34N5Guf469tTR+sJIJbUOn0y7sAB87vZf1wto5A23/4oN7yhjYP8M OXY68AICqejb2B1D547GPpHQ2HXSzvMAqqmHmzMqs8ZEME/dA48aDsStuCpHXfiCjZvnBR 4hkzgdNbC+lsVKzZu8GmM8inVgUsXNc= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-ZrT7PKJ_Nii126b5s4rZ6A-1; Mon, 29 Apr 2024 11:06:04 -0400 X-MC-Unique: ZrT7PKJ_Nii126b5s4rZ6A-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-78ee7776740so659750285a.2 for ; Mon, 29 Apr 2024 08:06:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403164; x=1715007964; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IQeYaQqSwUTfKy+gsUVAjWmbOMPcrcVLP0eQ37lw6pY=; b=o7N7zNc0jr9s0FGt8oCHIxi2qOgWsXqIUMSDEfTrBF1n1ycB5S7ZL7RsBUEIfQM/bU EBHlSLp7HImYhwh3f8/JFs10390G1fsdheM8xTaC1SmdKOc8wYZD+tOHnyJVG4AnCVam sM+U06u0e4JCz8zcwmgl29SQR90Bk/0TRYqEdFc3jpCv9DnSKX/IZ/Oof6u/bUsgf4Tv HzPBpBSc5Ma+pooTjpA2KNiIwT1nguXykai4Tn8T6LP6cG05adO5tY6893mVd3XcMzU6 CXYo28nwkSNJhvCWsxbJheot4Ld6Hbx7Z95Er3ljyEzOr+/nP+JU0wb0z1k8vpjpMMWk ky9Q== X-Gm-Message-State: AOJu0YweFlEEzP/Lb4qRKMHc40ZmOjbzGTTHKtcz8/2yPIFR5marqvah pKSpXmcPrFJNXTKpsfvyA9uQ7vGfoKKJvHQD4My1XxZPvNPist78NKOifq1KSfmpoFTd1v8UzSU 8enXG4YME3r9iSck/4ar4vvEiDZ58mEpWcxs2+tP3ReFT1iTZPmjcxzcxEQ== X-Received: by 2002:a37:c44c:0:b0:78e:dcc4:339e with SMTP id h12-20020a37c44c000000b0078edcc4339emr11483633qkm.11.1714403162943; Mon, 29 Apr 2024 08:06:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkYn7cUfYYH89VwjaiFCyaYanMCyP3za06+VVvrOOAIP+t1uIIAdX6+Lp0ziB+nwc8zbSTUw== X-Received: by 2002:a37:c44c:0:b0:78e:dcc4:339e with SMTP id h12-20020a37c44c000000b0078edcc4339emr11483595qkm.11.1714403162431; Mon, 29 Apr 2024 08:06:02 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id wh13-20020a05620a56cd00b007906ab7b0b5sm8005129qkn.11.2024.04.29.08.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:06:02 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 18BB8C1B7514; Mon, 29 Apr 2024 17:06:00 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Cc: cqi@redhat.com Subject: [PATCH, applied] fedabipkgdiff: Cleanup output of ABI comparison Organization: Red Hat / France X-Operating-System: AlmaLinux 9.3 X-URL: http://www.redhat.com Date: Mon, 29 Apr 2024 17:06:00 +0200 Message-ID: <87bk5s8azr.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, The output of fedabipkgidiff doesn't clearly say when two (sub)packages have no ABI change. This patch fixes that. The patch also trims unnecessary white spaces from the output of fedabipkgdiff. As a result, the patch adjusts the expected reference output files. * tools/fedabipkgdiff: Adjust copyright year (abipkgdiff): Strip out trailing spaces from the stdout string. Emit a clear message when no ABI change was found. * tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt: Adjust. Signed-off-by: Dodji Seketeli Applied to master. --- .../test0-from-fc20-to-fc23-dbus-glib-report-0.txt | 2 -- ...0-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt | 1 - ...0.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt | 2 -- ....i686--dbus-glib-0.106-1.fc23.i686-report-0.txt | 1 - ...4.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt | 1 - ..._64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt | 1 - ...4--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt | 1 - ...7-self-compare-from-fc23-dbus-glib-report-0.txt | 8 ++++---- tools/fedabipkgdiff | 14 +++++++++++--- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt b/tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt index 3e04feb0..a0f98f30 100644 --- a/tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt @@ -26,7 +26,6 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus ================ end of changes of 'dbus-binding-tool'=============== - Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm: ================ changes of 'libdbus-glib-1.so.2.2.2'=============== @@ -51,4 +50,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt b/tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt index 9f4d1f65..567aaab5 100644 --- a/tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt @@ -22,4 +22,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt b/tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt index 3e04feb0..a0f98f30 100644 --- a/tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt @@ -26,7 +26,6 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus ================ end of changes of 'dbus-binding-tool'=============== - Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm: ================ changes of 'libdbus-glib-1.so.2.2.2'=============== @@ -51,4 +50,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt b/tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt index 8413f4a2..4ef9e60a 100644 --- a/tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt @@ -26,4 +26,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt b/tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt index 9f4d1f65..567aaab5 100644 --- a/tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt @@ -22,4 +22,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt b/tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt index 63378fd8..e093078e 100644 --- a/tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt @@ -26,4 +26,3 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db ================ end of changes of 'dbus-binding-tool'=============== - diff --git a/tests/data/test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt b/tests/data/test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt index 006b334e..9d05efa4 100644 --- a/tests/data/test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt @@ -48,4 +48,3 @@ Comparing the ABI of binaries between nss-util-3.12.6-1.fc14.x86_64.rpm and nss- ================ end of changes of 'libnssutil3.so'=============== - diff --git a/tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt b/tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt index 5c5b95d3..1ed26f4c 100644 --- a/tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt +++ b/tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt @@ -1,18 +1,18 @@ Comparing the ABI of binaries between dbus-glib-0.106-1.fc23.i686.rpm and dbus-glib-0.106-1.fc23.i686.rpm: - ==== SELF CHECK SUCCEEDED for 'libdbus-glib-1.so.2.3.3' ==== ==== SELF CHECK SUCCEEDED for 'dbus-binding-tool' ==== +No ABI change between dbus-glib-0.106-1.fc23.i686.rpm and dbus-glib-0.106-1.fc23.i686.rpm Comparing the ABI of binaries between dbus-glib-devel-0.106-1.fc23.i686.rpm and dbus-glib-devel-0.106-1.fc23.i686.rpm: - ==== SELF CHECK SUCCEEDED for 'dbus-bash-completion-helper' ==== +No ABI change between dbus-glib-devel-0.106-1.fc23.i686.rpm and dbus-glib-devel-0.106-1.fc23.i686.rpm Comparing the ABI of binaries between dbus-glib-0.106-1.fc23.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm: - ==== SELF CHECK SUCCEEDED for 'libdbus-glib-1.so.2.3.3' ==== ==== SELF CHECK SUCCEEDED for 'dbus-binding-tool' ==== +No ABI change between dbus-glib-0.106-1.fc23.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm Comparing the ABI of binaries between dbus-glib-devel-0.106-1.fc23.x86_64.rpm and dbus-glib-devel-0.106-1.fc23.x86_64.rpm: - ==== SELF CHECK SUCCEEDED for 'dbus-bash-completion-helper' ==== +No ABI change between dbus-glib-devel-0.106-1.fc23.x86_64.rpm and dbus-glib-devel-0.106-1.fc23.x86_64.rpm diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff index de494d17..49254c7d 100755 --- a/tools/fedabipkgdiff +++ b/tools/fedabipkgdiff @@ -3,7 +3,7 @@ # -*- coding: utf-8 -*- # -*- Mode: Python # -# Copyright (C) 2013-2023 Red Hat, Inc. +# Copyright (C) 2013-2024 Red Hat, Inc. # # Author: Chenxiong Qi @@ -1184,13 +1184,14 @@ def abipkgdiff(cmp_half1, cmp_half2): print('Comparing the ABI of binaries between {0} and {1}:'.format( cmp_half1.subject.filename, cmp_half2.subject.filename)) - print() proc = subprocess.Popen(' '.join(cmd), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) stdout, stderr = proc.communicate() + stdout=stdout.strip() + stderr=stderr.strip() is_ok = proc.returncode == ABIDIFF_OK is_internal_error = proc.returncode & ABIDIFF_ERROR or proc.returncode & ABIDIFF_USAGE_ERROR @@ -1198,9 +1199,16 @@ def abipkgdiff(cmp_half1, cmp_half2): if is_internal_error: six.print_(stderr, file=sys.stderr) - elif is_ok or has_abi_change: + elif has_abi_change: + print() print(stdout) + elif is_ok: + if stdout != '': + print(stdout) + print('No ABI change between {0} and {1}'.format(cmp_half1.subject.filename, + cmp_half2.subject.filename)) + print() return proc.returncode