From patchwork Thu Feb 13 15:25:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "stipa (Code Review)" X-Patchwork-Id: 4137 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1d8f:b0:5e7:b9eb:58e8 with SMTP id hp15csp624985mab; Thu, 13 Feb 2025 07:25:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCULgTT/ytQl6rg3ca/Nd5lTHDmilVMBctUrc+6hovysEuan6PAMtWIW0seAb8oEpzraXihKg5a4pNg=@openvpn.net X-Google-Smtp-Source: AGHT+IHw0Cs99+9nanv6QXL2q89ysLt6RHfcdqIK16CinAqq3FHfBYzEMk04Bi8tzjLgPQeRrtnb X-Received: by 2002:a05:6e02:170e:b0:3d0:4a82:3f4b with SMTP id e9e14a558f8ab-3d18c2d55d4mr27002545ab.14.1739460330821; Thu, 13 Feb 2025 07:25:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739460330; cv=none; d=google.com; s=arc-20240605; b=gQqtVApTVU3A5UfP4srf+tJDa5rtCyWkcDpwl1bFLugF5q7H09BzPMLb/vGJku5cOo Dwde6OLHuRWWIbRgPu1ov8G4+myFt4XS8BIj+UwVb1yhwoX4avH9RqT6jx/TnkPHn+JK /tBUEp+7h4hShbpbO2PwnxvAtM/AbSKKgB7zo+GbBIDlgfaQMC4LRhytnI0Zhv3sMCme fFI9G3bU2pAzHHckSwi9HDfisjQIHh+o5K8Hp7ybvEeGBPX4sItYMneG0tY6fLdl08Ss jvj3rDYzRRGaufQ+HenF3vMsiRVlk+H9nG3GZJzAuHHhl/kjEjYSvfpr6xBOlkF1UtVV hGow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=Tglo0VlTx8iZogIGt9sdUo8WJf6nGFbKrYl5D00nwAI=; fh=lm0MLPW7DntlrDqRECIiC9JlE1uPxhepE0URYHIf+eE=; b=GzM3mDUP61orGg50xwnBGqo2Zqq2F2RDQftQlyOM+lx7E/Is63/BFmtTKBnOi/5B9T XZb2kpIPTmAA2Sc9CCm4wQPDJpvJJcjXGL74A7GftYZnCDWZdQwlChxI40NSEQsv8YtM C0475Jf6jpGimLuh3/39kK6BlAqnfaVC9imT57eJNBYn3yPSmwh6TlgyVu2Fan0eNhlA 6l0qHTZDuCNhajwTMtY6iOyoEvCk+kEitaImPyU1j9i6YnR78kR8gIXjs2OR/fEeB15n 5sIBAeWH77WuRd71J0Wyl5JjXQYp6uVrSr7WrBBSPtwCPrWNa0QjZe7AZizHWlDS8jpb LyZg==; 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=AyrCi3mn; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eS4LM07G; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=gDbVVYjC; 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 8926c6da1cb9f-4ed282d3ef5si837222173.120.2025.02.13.07.25.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2025 07:25:30 -0800 (PST) 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=AyrCi3mn; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eS4LM07G; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=gDbVVYjC; 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-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tib5e-0003OW-DS; Thu, 13 Feb 2025 15:25:22 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tib5c-0003OO-CO for openvpn-devel@lists.sourceforge.net; Thu, 13 Feb 2025 15:25:20 +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=9aJswCQWxwpZPDvB4/4WcObeLC2lQhw5E2ovEFcFh2A=; b=AyrCi3mnrHpn3410FdltnV9IZx lgog9RL6wUBKQ+sWaTwHzxkgsO+pUUFAbdRNPy1DggeJxnIJWIl1lLOsqrZWvbnZma8hPkuDaoSeZ 8qTDjC4jOwMiZkIk66Y3LS5pVP8SffOT284VRiMYjrULYGyL6clZc0ICQehAiOyqkapk=; 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=9aJswCQWxwpZPDvB4/4WcObeLC2lQhw5E2ovEFcFh2A=; b=e S4LM07GBH+o9xB1Ck7oOWLdB8yRVcGgo9vJH1AmDkEYSAmMMgMpjk0BSgh+yBoOdJQ6RnwoeqVXz3 G8C7JmMp5W78SttzeTC4CzIrQHwqavOK9aGv9hHxkAcGHNp7/QBR5woQEw7UdCNpY8D4NBCf1spOh yvYSfHYarxfSdUxo=; Received: from mail-wm1-f53.google.com ([209.85.128.53]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1tib5b-00087S-DB for openvpn-devel@lists.sourceforge.net; Thu, 13 Feb 2025 15:25:20 +0000 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4361e89b6daso7557165e9.3 for ; Thu, 13 Feb 2025 07:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1739460307; x=1740065107; 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=9aJswCQWxwpZPDvB4/4WcObeLC2lQhw5E2ovEFcFh2A=; b=gDbVVYjCab2HgC9hnJmXKaXrYhtvnfkxc9PMbooU+obKOVprkCVkPzQbALPcxOJqAb ZC9Hn5/gx/efWSg0qZjmHCWm3ndbpj0Tpij+SANDC7TC9auNtBhobCvt4netZ6rUQ81b xWYhmmjQ0Ctv4S3k271BIRMRfXLQvUHhKWczW8tYo+kIdESvN4f9QeWh2sVagurt60SP PYjy522Av1gPVVUlwrAvtqyxbb0WaqIUMTZHQ3PtmS/TmaTsqss5jicch+IMnMYI3KwQ GHAwiV1FLEp5aHuOYjyUr3S/qtKv3PTeOGQXWkBeMc+4PpRi+U0KD+OPmUq8pmBknPF4 K9/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739460307; x=1740065107; 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=9aJswCQWxwpZPDvB4/4WcObeLC2lQhw5E2ovEFcFh2A=; b=gNwIccp05pb56qpa8realM14SnfepAsbj6HtsV+Dr/Pat0lj8la+ikmYpM5UR9qXXd CMb0ZAYOJOas5BCf2AWo+QIX0pbauQsfmQVacGpL+0jsgU+YfAQKt+OrIRGpAE61n03E bIfMQa44QVSsTzztPMNe9SasZaO+P7XnHB9rnmD6UGXIvTFhYrPC/zRg2DUPtQItb0Tj aEbw0Wj7am3rYOIJAzGTDakhf/1bvuzA5zGFdjJwbR6Ud2TgBM57QQV53HfqU+eco6QS mnBMDA/WhFU0g4eaHa8X+i3rcKKMPgX06OBq7s9H2jW1MgPAJAeHH3dDy84tQYz5XZfb mUlw== X-Gm-Message-State: AOJu0YzaIY1I/dZnh4j5ZYXq3UwUOkQJcSPammUYMvssy66Ii3SaNW6z nMPuZJTGigbXe/3hFFB1hUowkrU8Pp+ojWuRgM6OAfWBJ+6cF9aSc6mHhxjWHPkAA6+pL0EZrxq s X-Gm-Gg: ASbGnctHXmH5I/R18Yj07/AEr0+noA2NxasvL6klWdqBGUzIi7CbeKXSMHQXJP4FeR0 XHSM7e5yBuwRNYp+EisWVjimQ2uJhf7LSlbP9TqkHrp7snk1GkR8HFEl6grBKjKM6sb064SnD66 itpNiG29wWMFiL5JEkq15jUxpbkIEGnlxOEtBBbgwOraKPLmUaDrRqdHH4hkqq0WrsT5MAYtFCV Uaw23vPWnDqdg4yaTz60Zase6f1VcjaKVRd822XRISXKEi9EO3W+7l7vtAnpDSmJqFl6tQdNaqf 3bX6QpGohnOb22vmsLhdJqWE+M0V7bNctDpThOb/oDcI3wBm+VoUsfUZnuyQ0TTcHUUd5hy0Yn3 oU2nT2uY= X-Received: by 2002:a5d:47af:0:b0:38d:c58f:4ce5 with SMTP id ffacd0b85a97d-38dea1bdc33mr8924699f8f.0.1739460307472; Thu, 13 Feb 2025 07:25:07 -0800 (PST) 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-38f258b4491sm2135388f8f.7.2025.02.13.07.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 07:25:07 -0800 (PST) From: "plaisthos (Code Review)" X-Google-Original-From: "plaisthos (Code Review)" X-Gerrit-PatchSet: 1 Date: Thu, 13 Feb 2025 15:25:06 +0000 To: flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772 X-Gerrit-Change-Number: 895 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: eb5cef85077af3883cdb96376f246af7042a2c55 References: Message-ID: <89c07c397eff1a4b0b151034e86cd9b861f5a773-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.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: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_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.128.53 listed in sa-accredit.habeas.com] 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.128.53 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.53 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] 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_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 Message has at least one valid DKIM or DK signature -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: 1tib5b-00087S-DB Subject: [Openvpn-devel] [S] Change in openvpn[master]: Add Android cmake building 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: arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1823956355592833236?= X-GMAIL-MSGID: =?utf-8?q?1823956355592833236?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email to review the following change. Change subject: Add Android cmake building ...................................................................... Add Android cmake building There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so. For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID. Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772 Signed-off-by: Arne Schwabe --- M CMakeLists.txt M config.h.cmake.in 2 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/895/1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5081e81..b04adce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory") @@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES) diff --git a/config.h.cmake.in b/config.h.cmake.in index 74a53a6..2f7b43d 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */