Skip to contentSkip to conversation

Change in openvpn[master]: CMake: various small non-functional improvements

Openvpn-devel flichtenheld (Code Review) 1 participant 6 messages Sep 19, 2023 – Sep 21, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1695123863000.I4e16767ee221e1aefdd18d13b3411c27d8dd844a@...2715...

#1 lore raw

flichtenheld has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

Change subject: CMake: various small non-functional improvements
......................................................................

CMake: various small non-functional improvements

These are based on review comments for the 2.6 backport. But since they apply to the original master implementation as well, I address them in this separate patch.

- Add documentation to contrib/cmake/*.py
- Fix grammar in README.cmake.md
- Update a TODO in CMakeLists.txt to better reflect the status quo
- Fix indentation in unit_tests' Makefile.am

Change-Id I4e16767ee221e1aefdd18d13b3411c27d8dd844a

---
M CMakeLists.txt
M README.cmake.md
M contrib/cmake/git-version.py
M contrib/cmake/parse-version.m4.py
M tests/unit_tests/openvpn/Makefile.am

5 files changed, 17 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/342/1

CMakeLists.txt +1 -1
index 7dae665..da5f883 100644
@@ -291,7 +291,7 @@
 
 configure_file(config.h.cmake.in config.h)
 configure_file(include/openvpn-plugin.h.in openvpn-plugin.h)
-# TODO remove later when msvc-config.h is removed and we can always include config.h
+# TODO we should remove the need for this, and always include config.h
 add_definitions(-DHAVE_CONFIG_H)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
README.cmake.md +1 -1
index 599d8dc..d181b64 100644
@@ -24,7 +24,7 @@
 -----------
 
 The following tools are expected to be present on the system, you
-can them install with a package manager of your choice (e.g.
+can install them with a package manager of your choice (e.g.
 chocolatey, winget) or manually:
 
 * CMake
contrib/cmake/git-version.py +8 -0
index c2b4452..4f78ac4 100644
@@ -22,6 +22,14 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./git-version.py [directory]
+# Find a good textual representation of the git commit currently checked out.
+# Make that representation available as CONFIGURE_GIT_REVISION in
+# <directory>/config-version.h.
+# It will prefer a tag name if it is checked out exactly, otherwise will use
+# the branch name. 'none' if no branch is checked out (detached HEAD).
+# This is used to enhance the output of openvpn --version with Git information.
+
 import os
 import sys
 import subprocess
contrib/cmake/parse-version.m4.py +6 -0
index d5ff2bd..3dfb31f 100644
@@ -22,6 +22,12 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./parse-version.m4.py m4file [directory]
+# Read <m4file>, extract all lines looking like M4 define(), and translate
+# them into CMake style set(). Those are then written out to file
+# <directory>/version.cmake.
+# Intended to be used on top-level version.m4 file.
+
 import os
 import re
 import sys
tests/unit_tests/openvpn/Makefile.am +1 -1
index 6b56f84..ef45b11 100644
@@ -110,7 +110,7 @@
 	-Wl,--wrap=parse_line \
 	-Wl,--wrap=rand_bytes
 tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \
-    mock_win32_execve.c \
+	mock_win32_execve.c \
 	$(top_srcdir)/src/openvpn/argv.c \
 	$(top_srcdir)/src/openvpn/base64.c \
 	$(top_srcdir)/src/openvpn/buffer.c \

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, stipa.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

Change subject: CMake: various small non-functional improvements
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:
Based on your comments

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Tue, 19 Sep 2023 11:45:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld.

stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

Change subject: CMake: various small non-functional improvements
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Tue, 19 Sep 2023 12:22:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

author Acked-by Lev Stipakov
#4 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld.

stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

Change subject: CMake: various small non-functional improvements
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Tue, 19 Sep 2023 12:22:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by stipa

Change subject: CMake: various small non-functional improvements
......................................................................

CMake: various small non-functional improvements

These are based on review comments for the 2.6 backport. But since they apply to the original master implementation as well, I address them in this separate patch.

- Add documentation to contrib/cmake/*.py
- Fix grammar in README.cmake.md
- Update a TODO in CMakeLists.txt to better reflect the status quo
- Fix indentation in unit_tests' Makefile.am

Change-Id I4e16767ee221e1aefdd18d13b3411c27d8dd844a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/342
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27043.html

---
M CMakeLists.txt
M README.cmake.md
M contrib/cmake/git-version.py
M contrib/cmake/parse-version.m4.py
M tests/unit_tests/openvpn/Makefile.am

5 files changed, 17 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/342/2

CMakeLists.txt +1 -1
index 9de6aba..454ef62 100644
@@ -292,7 +292,7 @@
 
 configure_file(config.h.cmake.in config.h)
 configure_file(include/openvpn-plugin.h.in openvpn-plugin.h)
-# TODO remove later when msvc-config.h is removed and we can always include config.h
+# TODO we should remove the need for this, and always include config.h
 add_definitions(-DHAVE_CONFIG_H)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
README.cmake.md +1 -1
index 599d8dc..d181b64 100644
@@ -24,7 +24,7 @@
 -----------
 
 The following tools are expected to be present on the system, you
-can them install with a package manager of your choice (e.g.
+can install them with a package manager of your choice (e.g.
 chocolatey, winget) or manually:
 
 * CMake
contrib/cmake/git-version.py +8 -0
index c2b4452..4f78ac4 100644
@@ -22,6 +22,14 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./git-version.py [directory]
+# Find a good textual representation of the git commit currently checked out.
+# Make that representation available as CONFIGURE_GIT_REVISION in
+# <directory>/config-version.h.
+# It will prefer a tag name if it is checked out exactly, otherwise will use
+# the branch name. 'none' if no branch is checked out (detached HEAD).
+# This is used to enhance the output of openvpn --version with Git information.
+
 import os
 import sys
 import subprocess
contrib/cmake/parse-version.m4.py +6 -0
index d5ff2bd..3dfb31f 100644
@@ -22,6 +22,12 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./parse-version.m4.py m4file [directory]
+# Read <m4file>, extract all lines looking like M4 define(), and translate
+# them into CMake style set(). Those are then written out to file
+# <directory>/version.cmake.
+# Intended to be used on top-level version.m4 file.
+
 import os
 import re
 import sys
tests/unit_tests/openvpn/Makefile.am +1 -1
index 6b56f84..ef45b11 100644
@@ -110,7 +110,7 @@
 	-Wl,--wrap=parse_line \
 	-Wl,--wrap=rand_bytes
 tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \
-    mock_win32_execve.c \
+	mock_win32_execve.c \
 	$(top_srcdir)/src/openvpn/argv.c \
 	$(top_srcdir)/src/openvpn/base64.c \
 	$(top_srcdir)/src/openvpn/buffer.c \

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/342?usp=email )

Change subject: CMake: various small non-functional improvements
......................................................................

CMake: various small non-functional improvements

These are based on review comments for the 2.6 backport. But since they apply to the original master implementation as well, I address them in this separate patch.

- Add documentation to contrib/cmake/*.py
- Fix grammar in README.cmake.md
- Update a TODO in CMakeLists.txt to better reflect the status quo
- Fix indentation in unit_tests' Makefile.am

Change-Id I4e16767ee221e1aefdd18d13b3411c27d8dd844a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/342
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27043.html

---
M CMakeLists.txt
M README.cmake.md
M contrib/cmake/git-version.py
M contrib/cmake/parse-version.m4.py
M tests/unit_tests/openvpn/Makefile.am

5 files changed, 17 insertions(+), 3 deletions(-)
CMakeLists.txt +1 -1
index 9de6aba..454ef62 100644
@@ -292,7 +292,7 @@
 
 configure_file(config.h.cmake.in config.h)
 configure_file(include/openvpn-plugin.h.in openvpn-plugin.h)
-# TODO remove later when msvc-config.h is removed and we can always include config.h
+# TODO we should remove the need for this, and always include config.h
 add_definitions(-DHAVE_CONFIG_H)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
README.cmake.md +1 -1
index 599d8dc..d181b64 100644
@@ -24,7 +24,7 @@
 -----------
 
 The following tools are expected to be present on the system, you
-can them install with a package manager of your choice (e.g.
+can install them with a package manager of your choice (e.g.
 chocolatey, winget) or manually:
 
 * CMake
contrib/cmake/git-version.py +8 -0
index c2b4452..4f78ac4 100644
@@ -22,6 +22,14 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./git-version.py [directory]
+# Find a good textual representation of the git commit currently checked out.
+# Make that representation available as CONFIGURE_GIT_REVISION in
+# <directory>/config-version.h.
+# It will prefer a tag name if it is checked out exactly, otherwise will use
+# the branch name. 'none' if no branch is checked out (detached HEAD).
+# This is used to enhance the output of openvpn --version with Git information.
+
 import os
 import sys
 import subprocess
contrib/cmake/parse-version.m4.py +6 -0
index d5ff2bd..3dfb31f 100644
@@ -22,6 +22,12 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./parse-version.m4.py m4file [directory]
+# Read <m4file>, extract all lines looking like M4 define(), and translate
+# them into CMake style set(). Those are then written out to file
+# <directory>/version.cmake.
+# Intended to be used on top-level version.m4 file.
+
 import os
 import re
 import sys
tests/unit_tests/openvpn/Makefile.am +1 -1
index 6b56f84..ef45b11 100644
@@ -110,7 +110,7 @@
 	-Wl,--wrap=parse_line \
 	-Wl,--wrap=rand_bytes
 tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \
-    mock_win32_execve.c \
+	mock_win32_execve.c \
 	$(top_srcdir)/src/openvpn/argv.c \
 	$(top_srcdir)/src/openvpn/base64.c \
 	$(top_srcdir)/src/openvpn/buffer.c \

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/342?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Gerrit-Change-Number: 342
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: d12fk <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged