From patchwork Mon Jun 12 11:14:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Schilling X-Patchwork-Id: 691818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BFB8C7EE23 for ; Mon, 12 Jun 2023 11:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbjFLLhH (ORCPT ); Mon, 12 Jun 2023 07:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237885AbjFLLg3 (ORCPT ); Mon, 12 Jun 2023 07:36:29 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3912611B for ; Mon, 12 Jun 2023 04:15:02 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5147e8972a1so7486439a12.0 for ; Mon, 12 Jun 2023 04:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686568501; x=1689160501; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1DVWYkURR6mcXMKYmOIQUwAj0q/FyswtijwBX81gzGo=; b=hn/Sj/8YYXXELLlR5K1tUqQpA4LCJtVPFppN4uv5plJN6j8s7iopuj+O3hKSdzfkSG gAJ2ar9GZlwUo7Nu6rJJAklI06/v4LhlbD8cKm24tjIASdVtns+GzrOoyhipHBjxcjJl PqqLtNadwRZAHUHviBbjOHA09nNu1kyuLRpnML6KzI72/U1ygUxCfCXWBW8U6uKdRKwS KPChIzwJOV8Oyvy2xiKAdcCCs68O3mCoISKAqExE99pQUfXFxw2DGCe4AaMXR6GMGprf iRDGMlhMBCSCPXc2UWf2oJ9/BEJRP/TIggxK9hhPd7FLMIOzF+6JuL7jAvW3tGq1gKz/ eHwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686568501; x=1689160501; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1DVWYkURR6mcXMKYmOIQUwAj0q/FyswtijwBX81gzGo=; b=XzKlnv1YdkxJL8x5eX8y4LZWLLTAsLsmnFeNEjDw3dMLU5YBtRBFS5mbI0ffbN07Xr PLqnfTlRfcS8fgEMUB2ojEYgbIaGPzx78KIul9+34rt+Tkv2aGzum1Ovmg39JspjpDLX XKgr2bBQtQc4vpVa/cFDZ5p/XejGGBm6SKBcU3PB36iEUfojJBHeUIKfQLCTM6sjJCdS IPc2xKJGnhZTG2ThJeP2a66+R118zoJxQf6/F4EkmJsKqtn8uXXf6O9cWAsFrErW6Au0 JABoFvdobxZHcTzh4oNJyP5kpeJP7iCDYDWsUV8sLY9wQWBUnDqmbucDYiw+u9OFUxa2 LMhA== X-Gm-Message-State: AC+VfDze15wG/K0SgVX6LugdTnzkDXwVs7BjPkCORv1i9FkltpnGwGnv 1l0EYcJQZIMC6XlaI3yQZSd57TzjhzzjM2jB8Es= X-Google-Smtp-Source: ACHHUZ6+cP3LPGxpA35QW/qwC140lndYuLWv9D1KRR/fdyNdOkWnXsVx0k+ApN7/H7gwAZnm3i7OkQ== X-Received: by 2002:a17:906:5d0e:b0:970:553:272c with SMTP id g14-20020a1709065d0e00b009700553272cmr10438613ejt.27.1686568500769; Mon, 12 Jun 2023 04:15:00 -0700 (PDT) Received: from [192.168.1.149] (i5C74066A.versanet.de. [92.116.6.106]) by smtp.gmail.com with ESMTPSA id g12-20020a1709064e4c00b00965e1be3002sm3463054ejw.166.2023.06.12.04.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 04:15:00 -0700 (PDT) From: Erik Schilling Date: Mon, 12 Jun 2023 13:14:48 +0200 Subject: [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies MIME-Version: 1.0 Message-Id: <20230612-crates_io_publish-v1-1-70988ee9a655@linaro.org> References: <20230612-crates_io_publish-v1-0-70988ee9a655@linaro.org> In-Reply-To: <20230612-crates_io_publish-v1-0-70988ee9a655@linaro.org> To: Linux-GPIO Cc: Kent Gibson , Bartosz Golaszewski , Viresh Kumar , Manos Pitsidianakis , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Erik Schilling X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686568499; l=1134; i=erik.schilling@linaro.org; s=20230523; h=from:subject:message-id; bh=pLfqJD80oUldRNxQB5/ahE0iI4z7PT2xbEwmBys45+A=; b=vBwpRMnpIXmWXDsxxPEx95sit+Z27wXuIbmPcdWcHoc7mpbmm5mCxFTcyrHaKlk4wrEDi80cz 6zz+VAUMfRDC/9FVcMBqtSaxAyKaUoLCVeZb6SanMak3UAREr0L9k1n X-Developer-Key: i=erik.schilling@linaro.org; a=ed25519; pk=/nNqy8/YOEdthj1epXl5FgwCTKEiVqTqqnVN1jVal7s= Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When publishing to crates.io, all dependencies need to have a version number. When building from crates.io the version number will be used, otherwise the `path` is effective for builds when checking out the repository. As discussed on the maillinglist [1], each crate will have their own version number (like the other language bindings) that will be bumped as needed to fulfill the Rust SemVer requirements. [1] https://lore.kernel.org/r/CACMJSes5+vT=NBqSe7xpSEPAEMmkgrZvJ8iKx7oBCKZQaGB_rg@mail.gmail.com/ Signed-off-by: Erik Schilling --- bindings/rust/libgpiod/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/rust/libgpiod/Cargo.toml b/bindings/rust/libgpiod/Cargo.toml index 48681de..b19e888 100644 --- a/bindings/rust/libgpiod/Cargo.toml +++ b/bindings/rust/libgpiod/Cargo.toml @@ -18,7 +18,7 @@ edition = "2021" errno = "0.2.8" intmap = "2.0.0" libc = "0.2.39" -libgpiod-sys = { path = "../libgpiod-sys" } +libgpiod-sys = { version = "0.1", path = "../libgpiod-sys" } thiserror = "1.0" [dev-dependencies] From patchwork Mon Jun 12 11:14:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Schilling X-Patchwork-Id: 691817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4DB2C7EE25 for ; Mon, 12 Jun 2023 11:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237518AbjFLLhK (ORCPT ); Mon, 12 Jun 2023 07:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234230AbjFLLg3 (ORCPT ); Mon, 12 Jun 2023 07:36:29 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6964518B for ; Mon, 12 Jun 2023 04:15:04 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-977cc662f62so618219266b.3 for ; Mon, 12 Jun 2023 04:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686568503; x=1689160503; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zJCE+1fuWVtMaz9EHfnAWHnNiUanDidN3rc+6SvJYoE=; b=jXu8XXOgqJG1c/2BqwMLw86Ptg7hVbDxyNG0g1G0tO+pJ93tpMm3njhqQh6HwSSRt/ cmBl+UVI4sljrorJxRirIjqDEOKRH33tHfuOcSgSM5/mLqkJT621AZGCRF50N5M4dXhI NxuN61qRJpVnWSzrJci7PoYZ5CYk1ioso+KWAV0wsEeXtC872DyJDtdhhhj39hsaTyEx faUdINyn7WKAV4Jw0OKgDAsgwDpQTNfAA/O2fwW0q5if6Q+LVa/42N4CSKHJo5DbQ5Yd 8QfRd+Dz0p14Tsmluty+WqROH6zc5DkCjevfyzazJfFUuXlcJxaR0IOM+jhrApuxHHIY lwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686568503; x=1689160503; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zJCE+1fuWVtMaz9EHfnAWHnNiUanDidN3rc+6SvJYoE=; b=WEm4fEWBX24oQt2A3fLknLCBQOtz/LmD9bRTJslI7owLwi+jAsv+kPoaDhC16549ui E3Fa3Qju3rxZqTqTNtHiCNfKdCZ32yHa+0uMfCR5RsvxM45+mZ7yL91NnoKP/Ym3oyjd Cq0eBizk6CfsqQVnElD5R3lwuWkzjB5XAntorp0mKljHjwp7HbcxDYAuuvrZqEB7hMYW zXxeArKRPaPCFhRJ6KHLlNgEg+YVThqcJwU6oUNem1iwtiN9qc2dtdUmvcBn4Gq1LrUs 82q0Lhier6v/2ybouPNpVS4dqcXf657q9ZU52XnB8c1kDKxTsDfjE9cNdLyMmPWpZlkf bZDQ== X-Gm-Message-State: AC+VfDwLOfOkOunl4ne4kqY07SPiQeB6mv5gdgExsY/itupaoGsBsiTr u5g9Lm+GgejO3042qB/ur3PevtSawIoQ20aSyr0= X-Google-Smtp-Source: ACHHUZ47gyrJoZge2mlr2jmFuPxoz12hCkx3cc854GFgU74O8T/xqVtPoU/Xd/OevOGA6P2rDadXuQ== X-Received: by 2002:a17:907:9728:b0:97d:f8db:601 with SMTP id jg40-20020a170907972800b0097df8db0601mr6079097ejc.62.1686568502845; Mon, 12 Jun 2023 04:15:02 -0700 (PDT) Received: from [192.168.1.149] (i5C74066A.versanet.de. [92.116.6.106]) by smtp.gmail.com with ESMTPSA id g12-20020a1709064e4c00b00965e1be3002sm3463054ejw.166.2023.06.12.04.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 04:15:02 -0700 (PDT) From: Erik Schilling Date: Mon, 12 Jun 2023 13:14:50 +0200 Subject: [PATCH libgpiod 3/3] bindings: rust: document build without install MIME-Version: 1.0 Message-Id: <20230612-crates_io_publish-v1-3-70988ee9a655@linaro.org> References: <20230612-crates_io_publish-v1-0-70988ee9a655@linaro.org> In-Reply-To: <20230612-crates_io_publish-v1-0-70988ee9a655@linaro.org> To: Linux-GPIO Cc: Kent Gibson , Bartosz Golaszewski , Viresh Kumar , Manos Pitsidianakis , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Erik Schilling X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686568499; l=1340; i=erik.schilling@linaro.org; s=20230523; h=from:subject:message-id; bh=9hj92/J4aEKe6yjLkwxtY/de6Oko13n5mW+Lz9nN/VU=; b=2z6B877xz3/ypfjoRmABE7KGa+AdfftaE9DWUowe2Ii2wEsrG0bNMm/gQ2vF9y/4FwWgY9Ti/ KPvLPuDfDvLB15PdmUwZOk3clHGVEUPD4y9be+MT8caSANESdilf/BA X-Developer-Key: i=erik.schilling@linaro.org; a=ed25519; pk=/nNqy8/YOEdthj1epXl5FgwCTKEiVqTqqnVN1jVal7s= Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org While the Makefile does this automatically, a user may want to do something similar for other cargo commands. Reported-by: Kent Gibson Link: https://lore.kernel.org/r/ZIQJquwzNacp1Nuh@sol/ Signed-off-by: Erik Schilling --- bindings/rust/libgpiod-sys/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bindings/rust/libgpiod-sys/README.md b/bindings/rust/libgpiod-sys/README.md index 90198d8..f9db496 100644 --- a/bindings/rust/libgpiod-sys/README.md +++ b/bindings/rust/libgpiod-sys/README.md @@ -16,6 +16,15 @@ libs and headers by setting environment variables. The mechanism for that is documented in the [system_deps crate documentation](https://docs.rs/system-deps/6.1.0/system_deps/#overriding-build-flags). +If installing libgpiod is undesired, one can set the following environent +variables in order to build against the intermediate build results of a `make` +build of the C lib (paths are relative to the Cargo.toml): + + export SYSTEM_DEPS_LIBGPIOD_NO_PKG_CONFIG=1 + export SYSTEM_DEPS_LIBGPIOD_SEARCH_NATIVE="/lib/.libs/" + export SYSTEM_DEPS_LIBGPIOD_LIB=gpiod + export SYSTEM_DEPS_LIBGPIOD_INCLUDE="/include/" + ## License This project is licensed under either of