From patchwork Tue Oct 12 15:24:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14108 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 06306C323E for ; Tue, 12 Oct 2021 15:24:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 83C4268F4D; Tue, 12 Oct 2021 17:24:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Br2PGLDD"; dkim-atps=neutral Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4720268F4C for ; Tue, 12 Oct 2021 17:24:27 +0200 (CEST) Received: by mail-wr1-x432.google.com with SMTP id u18so68245666wrg.5 for ; Tue, 12 Oct 2021 08:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ot8lB/wg003WQ1ZLhd6/FAy4iRawTYKbrjUdORgHQ/I=; b=Br2PGLDDD9jErMW5oQLcYPQaAst4Rb69pH7lrLchjodSuoO9Rslvpq4vvmIJJbYy3e qu68is6btr+SmFTIjyOBkjjtNYRmp+48be78WTMkXj/Mj9NzHaxkp5CrjGRL7QumDU6Y EQY60kxX/MEkX45+0ZEI13yDSl057oBXBy89XqR6dKThoziLfA/fope1jLIcKT3QuK+I kRZXTTH2duXN8Pw+CtJg+G8J6Y/rRcFOSm2DMkUT3AaAUbM2/KTYZNlo4VzoF/+s189I 03e+AeK01iTZ6ZamuDYH7LvaMd5PHXOCq/ISqCSg+Z6CJu18Acq++2qn3TPT/IW7l5Mq g2zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ot8lB/wg003WQ1ZLhd6/FAy4iRawTYKbrjUdORgHQ/I=; b=6hGfgyM/MqWzpk37PRGtbzlp1pXmxrhbL5QyPsw6Kfzeej0humt62qv8mVHBWVX6RD HLyOkaIUvhUSleFMnpa6/cqb0YxjhOLABwu0/xI4F58ANMr9FKaMrBc7hz0/I1Sut5Rl mMylv+6zQ3dj3e6M/aipciBExuu5cFskAhEGNbka52Bgrc8Kf23+OBgBnw6y+MbOl9jO tuxmhXnDg0Z2EtpnEW4xu1DBFFMplByeNBeqY248MDFmaEpxp/ixWtwNqBCjwZLsYijN TsOo+/9dp61GDbrW4IFggFgNecp7UsHYocnFbrKzxjbO1r2X80lDvzqRVx6kFfoVePI9 H2fA== X-Gm-Message-State: AOAM530Fv0Hgt3CyHKKe2EScFkmIXjqdkyvwxdXwMjUACVMK95V+vsEx q8nhkWBnk4Jn2LxvHpcq08x6KHv6IPmIwA== X-Google-Smtp-Source: ABdhPJxaoTRUmBt02d6qN8JupPI5gudsJfRJSqk8iiLSc2WAYiimoPFrhTV7JwjITzcfwt7KcgwTgQ== X-Received: by 2002:a1c:730a:: with SMTP id d10mr6252882wmb.105.1634052266454; Tue, 12 Oct 2021 08:24:26 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:26ae:314c:5c3f:f0df]) by smtp.gmail.com with ESMTPSA id s14sm10683449wro.76.2021.10.12.08.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 08:24:25 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 12 Oct 2021 16:24:08 +0100 Message-Id: <20211012152410.978077-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 0/2] Add new build option to override generate SHA X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, This set of changes have come about after a discusion on an issue raised on the Pi libcamera-apps github repo [1]. From my little understanding, various distributions use different methods to build and package libraries. As part of this process, they may build these libraries outside of the upstream tree, and perhaps not even in a git repo tree. If this happens, the version string generated during the libcamera build is either empty or (if it is from a downstream tree) useless. This change allows the user to override the SHA value with a string passed into the meson build options that would be used in-place of the one generated by the gen-version.sh script. This would allow out-of-tree builds to provide a sensible sha version string based off the upstream tree. I'm not too sure if this is the best way to do this, but it is a simple solution. If anyone has other suggestions how we can overcome this, please do let me know. Thanks, Naush [1]: https://github.com/raspberrypi/libcamera-apps/issues/122 Naushir Patuck (2): utils: Add an option to override SHA string in gen-version.sh build: Add a "version_sha" meson build option meson.build | 4 +++- meson_options.txt | 5 +++++ src/libcamera/meson.build | 3 ++- utils/gen-version.sh | 25 ++++++++++++++++++------- 4 files changed, 28 insertions(+), 9 deletions(-)