public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command
@ 2023-01-04  9:07 Uladzimir Bely
  2023-01-04  9:43 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Uladzimir Bely @ 2023-01-04  9:07 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_OPTIONS` 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

Changes since v1:
- Fixed typo in commit message

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

* Re: [PATCH v2] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command
  2023-01-04  9:07 [PATCH v2] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command Uladzimir Bely
@ 2023-01-04  9:43 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2023-01-04  9:43 UTC (permalink / raw)
  To: Uladzimir Bely, isar-users

On 04.01.23 10:07, Uladzimir Bely wrote:
> 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_OPTIONS` 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}
>      "
>  }

Still no warning on GBP_EXTRA_OPTIONS usage.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04  9:07 [PATCH v2] Use GBP_EXPORT_ORIG_OPTIONS for dpg-gbp export command Uladzimir Bely
2023-01-04  9:43 ` Jan Kiszka

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