all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox] readme: add command to satisfy build and regular dependencies
@ 2024-07-15  9:03 Fabian Grünbichler
  2024-07-15  9:58 ` Gabriel Goller
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2024-07-15  9:03 UTC (permalink / raw)
  To: pbs-devel

this is a common gotcha when starting to work on this repository.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---

Notes:
    it's a bit rough, and probably a version that parses Cargo.toml instead would
    be even better, but it's better than nothing ;)

 README.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/README.rst b/README.rst
index 2288f797..bbec9299 100644
--- a/README.rst
+++ b/README.rst
@@ -78,3 +78,26 @@ Some restrictions apply:
 - workspace dependency specifications cannot include ``optional``
  - if needed, the ``optional`` flag needs to be set at the member level when
    using a workspace dependency
+
+Installing all required packages
+================================
+
+Generating a source package via debcargo requires all dependencies, including
+optional ones, being present on the system. The build of that source package
+does not require all the optional dependencies (since it only tests the default
+feature set), therefor having all build-dependencies listed in `debian/control`
+installed is not enough to generate the source package.
+
+The following command prints a list of all build and regular dependencies
+listed in a debian/control file, which can be passed to `apt satisfy` to
+install them:
+
+```
+grep-dctrl -n -s Depends,Build-Depends -S -e '.*' */debian/control \
+| grep -v '${misc:Depends}' \
+| sed -e 's/ <!nocheck>//g' -e 's/ (= ${binary:Version})//g' \
+| sort -u \
+| sed -e 's/,$//g' \
+| tr '\n' ',' \
+| sed -e 's/,$//' -e 's/^,//g'
+```
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

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

* Re: [pbs-devel] [PATCH proxmox] readme: add command to satisfy build and regular dependencies
  2024-07-15  9:03 [pbs-devel] [PATCH proxmox] readme: add command to satisfy build and regular dependencies Fabian Grünbichler
@ 2024-07-15  9:58 ` Gabriel Goller
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Goller @ 2024-07-15  9:58 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion

On 15.07.2024 11:03, Fabian Grünbichler wrote:
>this is a common gotcha when starting to work on this repository.
>
>Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
>---
>
>Notes:
>    it's a bit rough, and probably a version that parses Cargo.toml instead would
>    be even better, but it's better than nothing ;)
>
> README.rst | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
>diff --git a/README.rst b/README.rst
>index 2288f797..bbec9299 100644
>--- a/README.rst
>+++ b/README.rst
>@@ -78,3 +78,26 @@ Some restrictions apply:
> - workspace dependency specifications cannot include ``optional``
>  - if needed, the ``optional`` flag needs to be set at the member level when
>    using a workspace dependency
>+
>+Installing all required packages
>+================================
>+
>+Generating a source package via debcargo requires all dependencies, including
>+optional ones, being present on the system. The build of that source package

s/being/to be/
is more fitting IMO.

>+does not require all the optional dependencies (since it only tests the default
>+feature set), therefor having all build-dependencies listed in `debian/control`

s/therefor/therefore/

>+installed is not enough to generate the source package.
>+
>+The following command prints a list of all build and regular dependencies
>+listed in a debian/control file, which can be passed to `apt satisfy` to
>+install them:
>+
>+```
>+grep-dctrl -n -s Depends,Build-Depends -S -e '.*' */debian/control \
>+| grep -v '${misc:Depends}' \
>+| sed -e 's/ <!nocheck>//g' -e 's/ (= ${binary:Version})//g' \
>+| sort -u \
>+| sed -e 's/,$//g' \
>+| tr '\n' ',' \
>+| sed -e 's/,$//' -e 's/^,//g'
>+```

Otherwise tested the command, it works great!
A small cosmetic nit though:

     sed -e 's/,$/\n/' -e 's/^,//g

So that we have a new line after the last element.



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

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

end of thread, other threads:[~2024-07-15  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-15  9:03 [pbs-devel] [PATCH proxmox] readme: add command to satisfy build and regular dependencies Fabian Grünbichler
2024-07-15  9:58 ` Gabriel Goller

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal