Patch Detail
Show a patch.
GET /api/1.1/patches/15323/?format=api
{ "id": 15323, "url": "https://patchwork.libcamera.org/api/1.1/patches/15323/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15323/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220203093022.536031-1-javierm@redhat.com>", "date": "2022-02-03T09:30:22", "name": "[libcamera-devel,v2] lc-compliance: Only download gtest subproject as a fallback", "commit_ref": "e526a57d09a3cb9fe226e70f896b4beaa8f9180a", "pull_url": null, "state": "accepted", "archived": false, "hash": "0aa0edbd884fc46d07a63c2a25c8135b5653b638", "submitter": { "id": 95, "url": "https://patchwork.libcamera.org/api/1.1/people/95/?format=api", "name": "Javier Martinez Canillas", "email": "javierm@redhat.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15323/mbox/", "series": [ { "id": 2912, "url": "https://patchwork.libcamera.org/api/1.1/series/2912/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2912", "date": "2022-02-03T09:30:22", "name": "[libcamera-devel,v2] lc-compliance: Only download gtest subproject as a fallback", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2912/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15323/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15323/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9DAF0BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 3 Feb 2022 09:30:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1CE0B609E1;\n\tThu, 3 Feb 2022 10:30:34 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6BEB06020B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 3 Feb 2022 10:30:33 +0100 (CET)", "from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-212-P1Sf8ZU0NPOiwHpmiQUBJA-1; Thu, 03 Feb 2022 04:30:31 -0500", "by mail-wm1-f70.google.com with SMTP id\n\ti204-20020a1c3bd5000000b00352cf8b74dcso1359876wma.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 03 Feb 2022 01:30:31 -0800 (PST)", "from minerva.home ([92.176.231.205])\n\tby smtp.gmail.com with ESMTPSA id\n\tj9sm5316560wro.8.2022.02.03.01.30.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 03 Feb 2022 01:30:29 -0800 (PST)" ], "Authentication-Results": [ "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"FbfSypzY\"; dkim-atps=neutral", "relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1643880632;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=p8e+2bsA++clMbL8dEO79qU1me99vQ4CIenH06/9LYg=;\n\tb=FbfSypzYdQgV62zr55dMqpLczARl84KNNDz4DGnapsaLNGZ+YuEDPjVqSpT9YtVXfSMeUy\n\tz1DZt9gpAeQ4KQMOpY3NfDcfo1wbsMJttGg7S5Cl08y76+Loc96UERSOsN6PHFIeNZiZ6t\n\tEP4YUWixA9sY8yKlYm0grUo0z43QRuU=", "X-MC-Unique": "P1Sf8ZU0NPOiwHpmiQUBJA-1", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=p8e+2bsA++clMbL8dEO79qU1me99vQ4CIenH06/9LYg=;\n\tb=cjZlE+mLwGZl1YMA8qsauTvE3K3YsbvKHE9K2bTlGtaOi6IueMwJUPXrFPnXVOfVAA\n\tLhBZm/R830vxOfqSwcb+OHt6104KsUWwEIWcosfIWv4aDcrY5Va+3uY30qKd5gA/rLgK\n\tpA2pN2Z4ncU2CQq56avwuDeRYpjWnEtDRyWxzB/POXsBIyp2rNHpmfzQkt85EjRcy4rX\n\tCWoCwmcyeSacjlxhNi9Lybnix5Cd4kROPlQjwQEY8Ap2A2hT+gLB2NGkVCoqsU/p4EJY\n\tusNai/nMhwaF11n0F8piUgUKfRKOCTgRDmGa+RyOHC/isEHqd7zWtP44UOEndWyZpqf9\n\t46pQ==", "X-Gm-Message-State": "AOAM532LkTOO4TH4bushrKPtQigRpY70q/SGYszUm6YdebGXJyqH6/ye\n\tFM8oAB1hU0kU/UAea3uwgGttbzaJWpxo08tWucDIyQ3IfeXSb5y/Rl2copGKrWyRbNrgQK+gPIB\n\tW6n8TdRHMKm0cDVE5bi0azbtl5VpjpoCu2Ht3RvEauVFebrp86MC8lqUbXjGnzMAtYrgZ2PZRjJ\n\tSWxVOEUfXF", "X-Received": [ "by 2002:a5d:590b:: with SMTP id\n\tv11mr27946903wrd.74.1643880630052; \n\tThu, 03 Feb 2022 01:30:30 -0800 (PST)", "by 2002:a5d:590b:: with SMTP id\n\tv11mr27946875wrd.74.1643880629746; \n\tThu, 03 Feb 2022 01:30:29 -0800 (PST)" ], "X-Google-Smtp-Source": "ABdhPJwuMCb+S0Wijv06WJTOk9daseMwsZ1cYIiAStepOhl0+n05/TDMZGsYSWbZMvW87/3iwerqjA==", "From": "Javier Martinez Canillas <javierm@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 3 Feb 2022 10:30:22 +0100", "Message-Id": "<20220203093022.536031-1-javierm@redhat.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[libcamera-devel] [PATCH v2] lc-compliance: Only download gtest\n\tsubproject as a fallback", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Currently, a subproject is used to fetch gtest dependency unconditionally\nfor any Linux distribution besides ChromeOS. But it leads to a regression\nin distros whose builders are not allowed to download files during build.\n\nThis change was introduced by commit 0d50a04cc918 (\"lc-compliance: Build\nwith gtest in subprojects\") and the rationale is that some distros, such\nas Debian ship libgtest-dev as a static library. And this could be built\nwith a different toolchain than the one used to build libcamera itself.\n\nBut this seems to be a corner case, usually users will either build both\nlibcamera and all its dependencies using the same toolchain or build it\nusing both the libgtest library and toolchain as provided by the distro.\n\nIf someone doesn't want for meson to pick up the non-compatible static\nlibrary provided by the distro, then instead should make sure that their\nbuild root does not have the package providing this installed.\n\nLet's simplify the logic to find the dependency and just use the built-in\nsupport in dependency() function to fallback to a subproject if not found.\n\nThis covers to common case of attempting to use the gtest provided by the\nsystem or pulling from source if not found or is not preferred.\n\nTo force meson to fallback to the wrap for gtest you can use this command:\n\n meson configure -Dforce_fallback_for=gtest\n\nand to force fallback for all the dependencies, you can use the following:\n\n meson build --wrap-mode=forcefallback\n\nFixes: commit 0d50a04cc918 (\"lc-compliance: Build with gtest in subprojects\")\nReported-by: Eric Curtin <ecurtin@redhat.com>\nSigned-off-by: Javier Martinez Canillas <javierm@redhat.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n---\n\nChanges in v2:\n- Add collected Reviewed-by tags.\n- Mention in the commit message how to force messon to do fallbacks.\n\n src/lc-compliance/meson.build | 17 +++--------------\n 1 file changed, 3 insertions(+), 14 deletions(-)", "diff": "diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build\nindex 130ddbb55916..8b57474be2b2 100644\n--- a/src/lc-compliance/meson.build\n+++ b/src/lc-compliance/meson.build\n@@ -1,25 +1,14 @@\n # SPDX-License-Identifier: CC0-1.0\n \n libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n+libgtest = dependency('gtest', required : get_option('lc-compliance'),\n+ fallback : ['gtest', 'gtest_dep'])\n \n-if not libevent.found()\n+if not (libevent.found() and libgtest.found())\n lc_compliance_enabled = false\n subdir_done()\n endif\n \n-if get_option('android_platform') == 'cros'\n- libgtest = dependency('gtest', required : get_option('lc-compliance'))\n-\n- if not libgtest.found()\n- lc_compliance_enabled = false\n- subdir_done()\n- endif\n-\n-else\n- libgtest_sp = subproject('gtest')\n- libgtest = libgtest_sp.get_variable('gtest_dep')\n-endif\n-\n lc_compliance_enabled = true\n \n lc_compliance_sources = files([\n", "prefixes": [ "libcamera-devel", "v2" ] }