From: "cron2 (Code Review)" Date: Fri, 6 Sep 2024 20:13:50 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., yura.uddr@...277... Message-ID: <859c3c7380a68f0bd1d8d6476be1239c27564f25-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="zib/vpnUZMo="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Allow to detect git checkout if .git is not a directory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos , uddr Cc: openvpn-devel --zib/vpnUZMo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#4) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/675?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos, Code-Review+2 by uddr Change subject: configure: Allow to detect git checkout if .git is not a di= rectory ...................................................................... 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 Acked-by: Arne Schwabe Acked-by: Yuriy Darnobyt Message-Id: <20240906172112.87148-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29= 092.html Signed-off-by: Gert Doering --- 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/4 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=3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) diff-f= iles --name-status -r --ignore-submodules --quiet -- || echo \"+\"`"; \ - CONFIGURE_GIT_UNCOMMITTED=3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) dif= f-index --cached --quiet --ignore-submodules HEAD || echo \"*\"`"; \ - CONFIGURE_GIT_REVISION=3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) rev-pa= rse --symbolic-full-name HEAD | cut -d/ -f3-`/`GIT_DIR=3D\"$(top_srcdir)/.g= it\" $(GIT) rev-parse --short=3D16 HEAD`"; \ + @CONFIGURE_GIT_CHFILES=3D"`$(GIT) -C \"$(top_srcdir)\" diff-files --name-= status -r --ignore-submodules --quiet -- || echo \"+\"`"; \ + CONFIGURE_GIT_UNCOMMITTED=3D"`$(GIT) -C \"$(top_srcdir)\" diff-index --ca= ched --quiet --ignore-submodules HEAD || echo \"*\"`"; \ + CONFIGURE_GIT_REVISION=3D"`$(GIT) -C \"$(top_srcdir)\" rev-parse --symbol= ic-full-name HEAD | cut -d/ -f3-`/`$(GIT) -C \"$(top_srcdir)\" rev-parse --= short=3D16 HEAD`"; \ echo "#define CONFIGURE_GIT_REVISION \"$${CONFIGURE_GIT_REVISION}\"" > co= nfig-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 9ce826c..ea0da1f 100644 --- a/configure.ac +++ b/configure.ac @@ -1308,9 +1308,11 @@ AC_MSG_CHECKING([git checkout]) GIT_CHECKOUT=3D"no" -if test -n "${GIT}" -a -d "${srcdir}/.git"; then - AC_DEFINE([HAVE_CONFIG_VERSION_H], [1], [extra version available in confi= g-version.h]) - GIT_CHECKOUT=3D"yes" +if test -n "${GIT}"; then + if ${GIT} -C "$srcdir" rev-parse --is-inside-work-tree >/dev/null 2>&1; t= hen + AC_DEFINE([HAVE_CONFIG_VERSION_H], [1], [extra version available in conf= ig-version.h]) + GIT_CHECKOUT=3D"yes" + fi fi AC_MSG_RESULT([${GIT_CHECKOUT}]) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/675?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9b7a3df012e7606ddb04a944e3fa33247180e8dd Gerrit-Change-Number: 675 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: uddr Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --zib/vpnUZMo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #4 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outda= ted and were removed: Code-Review+2 by plaisthos, Code-Review+2 by uddr

configure: Allow to detec=
t 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 d= irectory.

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 <frank@...2641...>
Acked-by: Arne Schwabe &= lt;arne-openvpn@...1227...>
Acked-by: Yuriy Darnobyt <yura.uddr@...1186...= .277...>
Message-Id: <20240906172112.87148-1-frank@...2641...><= br>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/ms= g29092.html
Signed-off-by: Gert Doering <gert@...1296...>
---M Makefile.am
M configure.ac
2 files changed, 8 insertions(+), 6 de= letions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/c=
hanges/75/675/4
diff --git a/Makefile.am b/Makefile.am
index 87230fe..84b7112 100644
--- a/Makefile.am<= br>+++ b/Makefile.am
@@ -75,9 +75,9 @@
README.wolfssl

config-version.h:
- @CONFIGURE_GIT_CHFILES= =3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) diff-files --na= me-status -r --ignore-submodules --quiet -- || echo \"+\"`";= \
- CONFIGURE_GIT_UNCO= MMITTED=3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) diff-ind= ex --cached --quiet --ignore-submodules HEAD || echo \"*\"`"= ;; \
- CONFIGURE_GIT_RE= VISION=3D"`GIT_DIR=3D\"$(top_srcdir)/.git\" $(GIT) rev-parse= --symbolic-full-name HEAD | cut -d/ -f3-`/`GIT_DIR=3D\"$(top_srcdir)/= .git\" $(GIT) rev-parse --short=3D16 HEAD`"; \
+ @CONFIGURE_GIT_CHFILES=3D"`$(GIT= ) -C \"$(top_srcdir)\" diff-files --name-status -r --ignore-submo= dules --quiet -- || echo \"+\"`"; \
+ CONFIGURE_GIT_UNCOMMITTED=3D"`$(GIT) -= C \"$(top_srcdir)\" diff-index --cached --quiet --ignore-submodu= les HEAD || echo \"*\"`"; \
+ CONFIGURE_GIT_REVISION=3D"`$(GIT) -C \"$(= top_srcdir)\" rev-parse --symbolic-full-name HEAD | cut -d/ -f3-`/`$(G= IT) -C \"$(top_srcdir)\" rev-parse --short=3D16 HEAD`"; \

echo "#define CONFIGURE_GIT_REVISION \"$${CONFIGU= RE_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 9ce826c..ea0da1f 100644
--- a/configure.a= c
+++ b/configure.ac
@@ -1308,9 +1308,11 @@=

AC_MSG_CHECKING([git checkout])<= br> GIT_CHECKOUT=3D"no"
-if test -n "${GIT}" -a -d "${srcdir}/.git&= quot;; then
- AC_DEFINE= ([HAVE_CONFIG_VERSION_H], [1], [extra version available in config-version.h= ])
- GIT_CHECKOUT=3D&qu= ot;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 availa= ble in config-version.h])
+ GIT_CHECKOUT=3D"yes"
+ fi
fi
AC_MSG_RESULT([= ${GIT_CHECKOUT}])


To = view, visit change 675. To unsubscribe, or for help writing mail filters, visit = settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b7a3df012e7606ddb04a944e3f= a33247180e8dd
Gerrit-Change-Number: 675
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: uddr <yura.uddr@...277...&= gt;
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--zib/vpnUZMo=--