From patchwork Wed Jul 10 13:57:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3760 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:518c:b0:59e:d24b:d55c with SMTP id g12csp361072mae; Wed, 10 Jul 2024 06:57:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVp9zkFrc2CQXal88TdjI09e7eAwcFnsep74TTx9H1XA5dFy411wiaDKbcn/swBFqS3eAMn+bivuv2iwJgsXqBrhw1BZsI= X-Google-Smtp-Source: AGHT+IGZ9Hgiy+E4yJ11Qsv4hy2Y4S6b6CfJSLmCb3lvmSHvJh8C7vKdkvq/i3TRkBgsGxsmOh1O X-Received: by 2002:a17:90a:520c:b0:2ca:7cc3:994b with SMTP id 98e67ed59e1d1-2ca7cc39aacmr1824266a91.2.1720619863445; Wed, 10 Jul 2024 06:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720619863; cv=none; d=google.com; s=arc-20160816; b=sTg97UzVzWWibhuYGgD6EhhDCu33L7wDkhzjKc/8FWEX7WN9b6wdzgEwua7416QiIA xP+1xZFyW6ObGAZQF91OtjvNoju0Z/DNA5sVvzTQjPKi01+totlRFEQDykHZEerpol5h 1njjOjdgdujF3wcHuRo34qjHNLnJfrTthkQsBYrmdnRwitUupTUC8nnasthwXZI/zmqe N6B8elr+2D3J5uHbPA+yo1k1ebn0DLE5bCoJ9xQ6WRoaO8jbBajFofbeqYFIV3uqj0P4 PlhwLHQ+oWnt4LJ4mrJ63Qc9O6QoegvF8tn26ufwBN35oyJNNM5yqIeOhJVsUAKAppAM KNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=JAp+w8VOj1iZDUWrt2vPRA8A3FdHlaH5UxsTN6QUu68=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=S8ufKaIUSlEzv4UIhf5/TZi2DSnZe9SY+lz4X/+3oCce4KrXzEmiC2R34Vu8UREu5H jrdWHkVgiC3JKTg8nYpaXxCGy/PZOb910drJaLLz6AaKFWXU+bZ1+NhN068YBn4Lg8pT cc0QYw1rIiUXXbUSpk1uvKPpGoRbT+A+DPM2fVZalLBQdsYln/46uzCKGGoZE/lTzOKU uN3q8q4SSDT9Fb11bd2kPCgfMz8zz43TA9D2PFTyscPzYCy+K+xJO7zRo4pCesnd+5Sg /aLoc7WaJ55pkaKJAKqkyn3JNH9gzQotdj3qAU+Wvk+H7By9KBvsrALo2YcS9fVr4B46 eMPg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=I64fTdTf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=WocAPEdq; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=MzfAt5Zd; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c99a992cfasi14430475a91.80.2024.07.10.06.57.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2024 06:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=I64fTdTf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=WocAPEdq; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=MzfAt5Zd; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sRXox-0004Rz-E3; Wed, 10 Jul 2024 13:57:22 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sRXow-0004Rt-Dt for openvpn-devel@lists.sourceforge.net; Wed, 10 Jul 2024 13:57:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=svslQZtVfWfrQfe5PbtvMNpBUsnI3J168Gjl972clq4=; b=I64fTdTfEVHOIfff262xKHu5lU BWiuVhGGlqJzEtRdipcLlojIfVwHKCwAOVScNOxIfgF+UmwPisUmnanrm1EG8yw6AGMxBwRgAka5g aEJU9Po12+DK/KiTC6tZVaYM3r+jAkpnhDnZAlRMcCfQPYEx6bTQwSHM5DP3lezn1m18=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=svslQZtVfWfrQfe5PbtvMNpBUsnI3J168Gjl972clq4=; b=W ocAPEdq2o8IcnbPkZEDHw4x1Ufzn0INEJgC/krMDjdZGVYA67DiXJ4w3ADocgdqd00vXRDacBlejR xdyDf2McfalXasZaokSMKr9xv1ThjVbnTMB+DzY6taCcbo1vc8mrBMa/YmPWQA8PRs+l5rl7pGKT7 A5BzpLQZtYlCcn/U=; Received: from mail-wr1-f48.google.com ([209.85.221.48]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sRXov-0002EW-Gw for openvpn-devel@lists.sourceforge.net; Wed, 10 Jul 2024 13:57:21 +0000 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-367a9ab4d81so3215336f8f.1 for ; Wed, 10 Jul 2024 06:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1720619829; x=1721224629; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=svslQZtVfWfrQfe5PbtvMNpBUsnI3J168Gjl972clq4=; b=MzfAt5ZdpHf9lrvyC50od8Sj0/Y/opEZRweMMFdf9t2DPn2ARjrkYL8EeBHhTGSdOV cvvOKI/z+BuQI3QqXrmFpEqV3rGHvzdlKaESZYKG2OH9OsTy7IZdL8a+oadl/+IV8NZx HDCicbUFgNi8x7b6WKk336PmOhAea0jCY0fvPY63AgK1yNS76XR7FC5xU4oSboGbsTK8 /eERoxYzZ7hYEAO+XiAAiKxQRSqqcZkDGw4675z160S8hOo1P4D/ZXYSWJJNUxGoA4yo UO27GMJNlod+oAWoOBvwkqsp16q+bWw7wY8j4gNvqCSGDnet5Vx7cZmqdwXIF3yzcZdY CkpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720619829; x=1721224629; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=svslQZtVfWfrQfe5PbtvMNpBUsnI3J168Gjl972clq4=; b=VVCwImu6SZ9x2+GtRBD4oXMvOzKZLo3T/3vt46WfN8owm0rEvY870TtnIknDnOOLRR zJ6vaNMmi6xgbw06BxiTN/ONjZN/oc6QDu6zRzi1VPooQ6MLXfpGmCXW7Sc9x3CC4jzS OT/rO7AAFlg5FeVgvTi1Rr8cJeMXkK/RmcL5WmK9VCUJst+26HIAasrp2TsN/Gii2ZEQ Hnw6vsv5NmzfZ44KgZHd+Ij9V+IHZrc6cBXa8lQaHXfZytvo3EHEKmc8yJmYkeg9Qzlz vFs3Dcs7NM3jJGLRz936hCWvuAkdULSDBa40lfNvmR9DZGTVDkBKfzhkicNPMKsBvebW 4a1A== X-Gm-Message-State: AOJu0Yz4yxamfKi97qHPGub/HHfgTuUBBTFpi/Di5+UZiKc5VyOAnl3h toEzfjZaEeXjuj8qvaJfJRxI/5Mj/dyz4bPjItNB+1NIAs+jxRiU/3+aZD3z/CSuFWJZT1+Rv62 F X-Received: by 2002:adf:a1cf:0:b0:35f:f90:f383 with SMTP id ffacd0b85a97d-367ceacaab6mr3797929f8f.56.1720619829169; Wed, 10 Jul 2024 06:57:09 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-367cdfa06d3sm5335851f8f.75.2024.07.10.06.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 06:57:08 -0700 (PDT) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Wed, 10 Jul 2024 13:57:08 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I9b7a3df012e7606ddb04a944e3fa33247180e8dd X-Gerrit-Change-Number: 675 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: bd6cd7c5d075557f009ff81c6d0a7b3b780ba2ac References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -5.2 (-----) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-5.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [209.85.221.48 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.48 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.48 listed in sa-trusted.bondedsender.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.48 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1sRXov-0002EW-Gw Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Allow to detect git checkout if .git is not a directory X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1804200693924707804?= X-GMAIL-MSGID: =?utf-8?q?1804200693924707804?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/675?usp=email to review the following change. Change subject: configure: Allow to detect git checkout if .git is not a directory ...................................................................... configure: Allow to detect git checkout if .git is not a directory E.g. if you use openvpn as a git submodule, it can be a file that points to the parent's git directory. The changes to Makefile.am are not strictly required, they still work with that case, but I wanted to keep the usage consistent. Change-Id: I9b7a3df012e7606ddb04a944e3fa33247180e8dd Signed-off-by: Frank Lichtenheld --- M Makefile.am M configure.ac 2 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/675/1 diff --git a/Makefile.am b/Makefile.am index 87230fe..84b7112 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,9 +75,9 @@ README.wolfssl config-version.h: - @CONFIGURE_GIT_CHFILES="`GIT_DIR=\"$(top_srcdir)/.git\" $(GIT) diff-files --name-status -r --ignore-submodules --quiet -- || echo \"+\"`"; \ - CONFIGURE_GIT_UNCOMMITTED="`GIT_DIR=\"$(top_srcdir)/.git\" $(GIT) diff-index --cached --quiet --ignore-submodules HEAD || echo \"*\"`"; \ - CONFIGURE_GIT_REVISION="`GIT_DIR=\"$(top_srcdir)/.git\" $(GIT) rev-parse --symbolic-full-name HEAD | cut -d/ -f3-`/`GIT_DIR=\"$(top_srcdir)/.git\" $(GIT) rev-parse --short=16 HEAD`"; \ + @CONFIGURE_GIT_CHFILES="`$(GIT) -C \"$(top_srcdir)\" diff-files --name-status -r --ignore-submodules --quiet -- || echo \"+\"`"; \ + CONFIGURE_GIT_UNCOMMITTED="`$(GIT) -C \"$(top_srcdir)\" diff-index --cached --quiet --ignore-submodules HEAD || echo \"*\"`"; \ + CONFIGURE_GIT_REVISION="`$(GIT) -C \"$(top_srcdir)\" rev-parse --symbolic-full-name HEAD | cut -d/ -f3-`/`$(GIT) -C \"$(top_srcdir)\" rev-parse --short=16 HEAD`"; \ echo "#define CONFIGURE_GIT_REVISION \"$${CONFIGURE_GIT_REVISION}\"" > config-version.h.tmp; \ echo "#define CONFIGURE_GIT_FLAGS \"$${CONFIGURE_GIT_CHFILES}$${CONFIGURE_GIT_UNCOMMITTED}\"" >> config-version.h.tmp diff --git a/configure.ac b/configure.ac index 3e7c0be..75c0aa9 100644 --- a/configure.ac +++ b/configure.ac @@ -1284,9 +1284,11 @@ AC_MSG_CHECKING([git checkout]) GIT_CHECKOUT="no" -if test -n "${GIT}" -a -d "${srcdir}/.git"; then - AC_DEFINE([HAVE_CONFIG_VERSION_H], [1], [extra version available in config-version.h]) - GIT_CHECKOUT="yes" +if test -n "${GIT}"; then + if ${GIT} -C "$srcdir" rev-parse --is-inside-work-tree >/dev/null 2>&1; then + AC_DEFINE([HAVE_CONFIG_VERSION_H], [1], [extra version available in config-version.h]) + GIT_CHECKOUT="yes" + fi fi AC_MSG_RESULT([${GIT_CHECKOUT}])