public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command
@ 2023-01-04  6:51 Uladzimir Bely
  2023-01-04  8:20 ` Jan Kiszka
  2023-01-04  8:28 ` Henning Schild
  0 siblings, 2 replies; 4+ messages in thread
From: Uladzimir Bely @ 2023-01-04  6:51 UTC (permalink / raw)
  To: isar-users

Since we now use `gbp export-orig <options>` and they need different
options than `gbp buildpackage`, we should store these options in
different variable.

This patch intruduces `GBP_EXPORT_ORIG_OPTINS` variable and
describes it in RECIPE-API-CHANGELOG.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 RECIPE-API-CHANGELOG.md       | 16 ++++++++++++++++
 meta/classes/dpkg-gbp.bbclass |  4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 0bb83389..8013e585 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -441,3 +441,19 @@ exist, empty variables are forwarded.
 
 **Note about reproducibility**: the forwarded variables must not have any influence on the generated package.
 This mechanism must also not be used to inject build configurations. For these cases, templates should be used.
+
+### Switch to `gbp export-orig` and `GBP_EXPORT_ORIG_OPTIONS`
+
+Since Debian Stretch support is removed, we can now use short `gbp export-orig`
+instead of long `gbp buildpackage --git-ignore-new --git-builder=/bin/true`
+to prepare gbp-based sources for building.
+
+Options for `export-orig` should be specified with `GBP_EXPORT_ORIG_OPTIONS`
+variable in favor of previously used `GBP_EXTRA_OPTIONS` one. For example:
+
+```
+GBP_EXTRA_OPTIONS = "--git-no-pristine-tar --git-upstream-branch=master"
+GBP_EXPORT_ORIG_OPTIONS = "--no-pristine-tar --upstream-branch=master"
+```
+
+To support both old and new Isar, custom recipe should have both variables.
diff --git a/meta/classes/dpkg-gbp.bbclass b/meta/classes/dpkg-gbp.bbclass
index f765eb9a..4e29f62d 100644
--- a/meta/classes/dpkg-gbp.bbclass
+++ b/meta/classes/dpkg-gbp.bbclass
@@ -9,13 +9,13 @@ S = "${WORKDIR}/git"
 
 PATCHTOOL ?= "git"
 
-GBP_EXTRA_OPTIONS ?= "--pristine-tar"
+GBP_EXPORT_ORIG_OPTIONS ?= "--pristine-tar"
 
 SCHROOT_MOUNTS = "${WORKDIR}:${PP} ${GITDIR}:/home/.git-downloads"
 
 dpkg_runbuild_prepend() {
     sh -c "
         cd ${WORKDIR}/${PPS}
-        gbp export-orig ${GBP_EXTRA_OPTIONS}
+        gbp export-orig ${GBP_EXPORT_ORIG_OPTIONS}
     "
 }
-- 
2.20.1


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

end of thread, other threads:[~2023-01-04 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04  6:51 [PATCH] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command Uladzimir Bely
2023-01-04  8:20 ` Jan Kiszka
2023-01-04 13:16   ` Henning Schild
2023-01-04  8:28 ` Henning Schild

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