Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/nethogs: add patch to fix version generation
@ 2024-09-20 10:39 Marcus Hoffmann via buildroot
  2024-10-26 14:34 ` Thomas Petazzoni via buildroot
  2024-11-11 14:32 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-09-20 10:39 UTC (permalink / raw)
  To: buildroot; +Cc: Marcus Hoffmann

This fixes nethogs being built with the (mangled) buildroot version
name from the outer buildroot git repo.

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
 ...termineVersion-sh-prevent-traversing.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/nethogs/0001-determineVersion-sh-prevent-traversing.patch

diff --git a/package/nethogs/0001-determineVersion-sh-prevent-traversing.patch b/package/nethogs/0001-determineVersion-sh-prevent-traversing.patch
new file mode 100644
index 0000000000..6f39c53128
--- /dev/null
+++ b/package/nethogs/0001-determineVersion-sh-prevent-traversing.patch
@@ -0,0 +1,31 @@
+From 6423bdf05d51efc5441c82248098f99e4c1f59c3 Mon Sep 17 00:00:00 2001
+From: Marcus Hoffmann <marcus.hoffmann@othermo.de>
+Date: Fri, 20 Sep 2024 12:06:26 +0200
+Subject: [PATCH] determineVersion.sh: prevent traversing into outer git repo
+ for git-describe call
+
+When building nethogs inside another git repo (as is i.e. done as part
+of a buildroot build) the version is picked up from the outer git repo,
+which is confusing as well as introducing reproducibility problems when
+rebuilding the same nethogs version produces different results if the
+outer repository changes.
+
+Upstream: https://github.com/raboof/nethogs/commit/6423bdf05d51efc5441c82248098f99e4c1f59c3
+Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
+---
+ determineVersion.sh | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/determineVersion.sh b/determineVersion.sh
+index 7c5f1de..3d80d9d 100755
+--- a/determineVersion.sh
++++ b/determineVersion.sh
+@@ -1,3 +1,6 @@
+ #!/bin/bash
+-
+-(git describe --tags 2>/dev/null || pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//") | tail -c +2
++if [ $(git rev-parse --show-toplevel 2>/dev/null) == $(pwd) ]; then
++  git describe --tags 2>/dev/null | tail -c +2
++else
++  pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//" | tail -c +2
++fi
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/nethogs: add patch to fix version generation
  2024-09-20 10:39 [Buildroot] [PATCH] package/nethogs: add patch to fix version generation Marcus Hoffmann via buildroot
@ 2024-10-26 14:34 ` Thomas Petazzoni via buildroot
  2024-11-11 14:32 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-26 14:34 UTC (permalink / raw)
  To: Marcus Hoffmann via buildroot; +Cc: Marcus Hoffmann, Marcus Hoffmann

On Fri, 20 Sep 2024 12:39:00 +0200
Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:

> This fixes nethogs being built with the (mangled) buildroot version
> name from the outer buildroot git repo.
> 
> Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
> ---
>  ...termineVersion-sh-prevent-traversing.patch | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 package/nethogs/0001-determineVersion-sh-prevent-traversing.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/nethogs: add patch to fix version generation
  2024-09-20 10:39 [Buildroot] [PATCH] package/nethogs: add patch to fix version generation Marcus Hoffmann via buildroot
  2024-10-26 14:34 ` Thomas Petazzoni via buildroot
@ 2024-11-11 14:32 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-11-11 14:32 UTC (permalink / raw)
  To: Marcus Hoffmann via buildroot; +Cc: Marcus Hoffmann, Marcus Hoffmann

>>>>> "Marcus" == Marcus Hoffmann via buildroot <buildroot@buildroot.org> writes:

 > This fixes nethogs being built with the (mangled) buildroot version
 > name from the outer buildroot git repo.

 > Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>

Committed to 2024.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-11-11 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 10:39 [Buildroot] [PATCH] package/nethogs: add patch to fix version generation Marcus Hoffmann via buildroot
2024-10-26 14:34 ` Thomas Petazzoni via buildroot
2024-11-11 14:32 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox