All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish
@ 2023-06-12 11:14 Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies Erik Schilling
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Erik Schilling @ 2023-06-12 11:14 UTC (permalink / raw)
  To: Linux-GPIO
  Cc: Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée, Erik Schilling

After libgpiod-sys is published [1]. This series does a little bit of
cleanup and prepares libgpiod for publishing.

[1] https://crates.io/crates/libgpiod-sys

To: Linux-GPIO <linux-gpio@vger.kernel.org>
Cc: Kent Gibson <warthog618@gmail.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
Erik Schilling (3):
      bindings: rust: add version number to dependencies
      bindings: rust: exclude Makefile.am from package
      bindings: rust: document build without install

 bindings/rust/libgpiod-sys/Cargo.toml | 4 ++++
 bindings/rust/libgpiod-sys/README.md  | 9 +++++++++
 bindings/rust/libgpiod/Cargo.toml     | 6 +++++-
 3 files changed, 18 insertions(+), 1 deletion(-)
---
base-commit: 9788bdd3d6791205431e65366dcc518446f7ca6a
change-id: 20230612-crates_io_publish-946e08590c5b

Best regards,
-- 
Erik Schilling <erik.schilling@linaro.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies
  2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
@ 2023-06-12 11:14 ` Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 2/3] bindings: rust: exclude Makefile.am from package Erik Schilling
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Erik Schilling @ 2023-06-12 11:14 UTC (permalink / raw)
  To: Linux-GPIO
  Cc: Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée, Erik Schilling

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 <erik.schilling@linaro.org>
---
 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]

-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH libgpiod 2/3] bindings: rust: exclude Makefile.am from package
  2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies Erik Schilling
@ 2023-06-12 11:14 ` Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 3/3] bindings: rust: document build without install Erik Schilling
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Erik Schilling @ 2023-06-12 11:14 UTC (permalink / raw)
  To: Linux-GPIO
  Cc: Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée, Erik Schilling

We do not use those when building from crates.io.

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
 bindings/rust/libgpiod-sys/Cargo.toml | 4 ++++
 bindings/rust/libgpiod/Cargo.toml     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/bindings/rust/libgpiod-sys/Cargo.toml b/bindings/rust/libgpiod-sys/Cargo.toml
index 8b17039..0c814ee 100644
--- a/bindings/rust/libgpiod-sys/Cargo.toml
+++ b/bindings/rust/libgpiod-sys/Cargo.toml
@@ -14,6 +14,10 @@ keywords = ["libgpiod", "gpio"]
 license = "Apache-2.0 OR BSD-3-Clause"
 edition = "2021"
 
+exclude = [
+    "Makefile.am",
+]
+
 [dependencies]
 
 [build-dependencies]
diff --git a/bindings/rust/libgpiod/Cargo.toml b/bindings/rust/libgpiod/Cargo.toml
index b19e888..d6758be 100644
--- a/bindings/rust/libgpiod/Cargo.toml
+++ b/bindings/rust/libgpiod/Cargo.toml
@@ -14,6 +14,10 @@ keywords = ["libgpiod", "gpio"]
 license = "Apache-2.0 OR BSD-3-Clause"
 edition = "2021"
 
+exclude = [
+    "Makefile.am",
+]
+
 [dependencies]
 errno = "0.2.8"
 intmap = "2.0.0"

-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH libgpiod 3/3] bindings: rust: document build without install
  2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies Erik Schilling
  2023-06-12 11:14 ` [PATCH libgpiod 2/3] bindings: rust: exclude Makefile.am from package Erik Schilling
@ 2023-06-12 11:14 ` Erik Schilling
  2023-06-13  3:56 ` [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Viresh Kumar
  2023-06-13  8:16 ` Bartosz Golaszewski
  4 siblings, 0 replies; 7+ messages in thread
From: Erik Schilling @ 2023-06-12 11:14 UTC (permalink / raw)
  To: Linux-GPIO
  Cc: Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée, Erik Schilling

While the Makefile does this automatically, a user may want to do
something similar for other cargo commands.

Reported-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/ZIQJquwzNacp1Nuh@sol/
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
 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="<PATH-TO-LIBGPIOD>/lib/.libs/"
+	export SYSTEM_DEPS_LIBGPIOD_LIB=gpiod
+	export SYSTEM_DEPS_LIBGPIOD_INCLUDE="<PATH-TO-LIBGPIOD>/include/"
+
 ## License
 
 This project is licensed under either of

-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish
  2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
                   ` (2 preceding siblings ...)
  2023-06-12 11:14 ` [PATCH libgpiod 3/3] bindings: rust: document build without install Erik Schilling
@ 2023-06-13  3:56 ` Viresh Kumar
  2023-06-13  8:16 ` Bartosz Golaszewski
  4 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2023-06-13  3:56 UTC (permalink / raw)
  To: Erik Schilling
  Cc: Linux-GPIO, Kent Gibson, Bartosz Golaszewski,
	Manos Pitsidianakis, Alex Bennée

On 12-06-23, 13:14, Erik Schilling wrote:
> After libgpiod-sys is published [1]. This series does a little bit of
> cleanup and prepares libgpiod for publishing.
> 
> [1] https://crates.io/crates/libgpiod-sys
> 
> To: Linux-GPIO <linux-gpio@vger.kernel.org>
> Cc: Kent Gibson <warthog618@gmail.com>
> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Cc: Alex Bennée <alex.bennee@linaro.org>
> 
> Signed-off-by: Erik Schilling <erik.schilling@linaro.org>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish
  2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
                   ` (3 preceding siblings ...)
  2023-06-13  3:56 ` [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Viresh Kumar
@ 2023-06-13  8:16 ` Bartosz Golaszewski
  2023-06-13 10:37   ` Erik Schilling
  4 siblings, 1 reply; 7+ messages in thread
From: Bartosz Golaszewski @ 2023-06-13  8:16 UTC (permalink / raw)
  To: Erik Schilling
  Cc: Linux-GPIO, Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée

On Mon, Jun 12, 2023 at 1:37 PM Erik Schilling
<erik.schilling@linaro.org> wrote:
>
> After libgpiod-sys is published [1]. This series does a little bit of
> cleanup and prepares libgpiod for publishing.
>
> [1] https://crates.io/crates/libgpiod-sys
>
> To: Linux-GPIO <linux-gpio@vger.kernel.org>
> Cc: Kent Gibson <warthog618@gmail.com>
> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Cc: Alex Bennée <alex.bennee@linaro.org>
>
> Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
> ---
> Erik Schilling (3):
>       bindings: rust: add version number to dependencies
>       bindings: rust: exclude Makefile.am from package
>       bindings: rust: document build without install
>
>  bindings/rust/libgpiod-sys/Cargo.toml | 4 ++++
>  bindings/rust/libgpiod-sys/README.md  | 9 +++++++++
>  bindings/rust/libgpiod/Cargo.toml     | 6 +++++-
>  3 files changed, 18 insertions(+), 1 deletion(-)
> ---
> base-commit: 9788bdd3d6791205431e65366dcc518446f7ca6a
> change-id: 20230612-crates_io_publish-946e08590c5b
>
> Best regards,
> --
> Erik Schilling <erik.schilling@linaro.org>
>

Series applied, thanks!

Bart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish
  2023-06-13  8:16 ` Bartosz Golaszewski
@ 2023-06-13 10:37   ` Erik Schilling
  0 siblings, 0 replies; 7+ messages in thread
From: Erik Schilling @ 2023-06-13 10:37 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linux-GPIO, Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée

On Tue Jun 13, 2023 at 10:16 AM CEST, Bartosz Golaszewski wrote:
> Series applied, thanks!

Thanks! Package is published to https://crates.io/crates/libgpiod now.
I will look into adding a README.md and explore whether there is an easy
option for getting the docs published (docs.rs does not work nicely with
us depending on a fairly recent libgpiod C lib).

Any suggestions are welcome!

- Erik

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-13 10:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 11:14 [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Erik Schilling
2023-06-12 11:14 ` [PATCH libgpiod 1/3] bindings: rust: add version number to dependencies Erik Schilling
2023-06-12 11:14 ` [PATCH libgpiod 2/3] bindings: rust: exclude Makefile.am from package Erik Schilling
2023-06-12 11:14 ` [PATCH libgpiod 3/3] bindings: rust: document build without install Erik Schilling
2023-06-13  3:56 ` [PATCH libgpiod 0/3] bindings: rust: prepare for crates.io publish Viresh Kumar
2023-06-13  8:16 ` Bartosz Golaszewski
2023-06-13 10:37   ` Erik Schilling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.