debian: Ensure changelog distribution is tagged

Message ID 20210923102350.4613-1-valter.jansons@gmail.com
State Accepted
Commit 635e2853c60afe44622afb13039f1b5bae6eac73
Headers
Series debian: Ensure changelog distribution is tagged |

Commit Message

Valters Jansons Sept. 23, 2021, 10:23 a.m. UTC
  UNRELEASED should not be left as-is when actually releasing.
The latest changelog entry now point at unstable instead.

The simple d/genchangelog.sh now does `dch -r ''` automatically
to ensure this distribution update doesn't get lost along the way
on future invocations.
---
I am still not sure what to propose for organizing this better across
multiple projects. In our organization we use `repo` by Google,
originally intended for syncing Android repositories, so that we track
multiple repositories that belong together while avoiding mono-repos.

It uses a default.xml manifest file in a dedicated "manifest" repo,
which then just lists which repositories should be pulled in.

Command/tool ref: https://source.android.com/setup/develop/repo
Manifest file ref: https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md

A sample manifest, which should do the trick, could be:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="origin"
    fetch="https://git.ipfire.org/pub/git/"
    pushurl="ssh://people.ipfire.org/pub/git/" />
  <default remote="origin" revision="master" />

  <project name="location/libloc" />
  <project name="location/location-database" />
</manifest>

 debian/changelog       | 2 +-
 debian/genchangelog.sh | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Comments

Michael Tremer Sept. 23, 2021, 10:34 a.m. UTC | #1
Hello Valters,

Thank you for your patch. I have merged it.

> On 23 Sep 2021, at 11:23, Valters Jansons <valter.jansons@gmail.com> wrote:
> 
> UNRELEASED should not be left as-is when actually releasing.
> The latest changelog entry now point at unstable instead.
> 
> The simple d/genchangelog.sh now does `dch -r ''` automatically
> to ensure this distribution update doesn't get lost along the way
> on future invocations.
> ---
> I am still not sure what to propose for organizing this better across
> multiple projects. In our organization we use `repo` by Google,
> originally intended for syncing Android repositories, so that we track
> multiple repositories that belong together while avoiding mono-repos.

Hmm, I do not think it is worth it to add a large dependency just to keep a couple of scripts in sync.

If we would want to go down that line, I would say a Git submodule is the easiest way and should work well.

Do you know any cool build tools that could automatically build and publish these packages? I have a couple of custom built scripts (debian/build.sh and something more to publish and sign the packages), but that doesn’t feel very rock-solid to me.

-Michael

> It uses a default.xml manifest file in a dedicated "manifest" repo,
> which then just lists which repositories should be pulled in.
> 
> Command/tool ref: https://source.android.com/setup/develop/repo
> Manifest file ref: https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md
> 
> A sample manifest, which should do the trick, could be:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <manifest>
>  <remote name="origin"
>    fetch="https://git.ipfire.org/pub/git/"
>    pushurl="ssh://people.ipfire.org/pub/git/" />
>  <default remote="origin" revision="master" />
> 
>  <project name="location/libloc" />
>  <project name="location/location-database" />
> </manifest>
> 
> debian/changelog       | 2 +-
> debian/genchangelog.sh | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/debian/changelog b/debian/changelog
> index fcef2cb..3b90542 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,4 +1,4 @@
> -libloc (0.9.8-1) UNRELEASED; urgency=medium
> +libloc (0.9.8-1) unstable; urgency=medium
> 
>   [ Michael Tremer ]
>   * importer: Do not try to initialise a column that cannot be NULL with
> diff --git a/debian/genchangelog.sh b/debian/genchangelog.sh
> index 85d3922..ab1c198 100755
> --- a/debian/genchangelog.sh
> +++ b/debian/genchangelog.sh
> @@ -31,6 +31,8 @@ main () {
>     echo "$author_name <$author_email>  $subject"
>     DEBFULLNAME="$author_name" DEBEMAIL="$author_email" debchange --upstream --multimaint-merge "$subject"
>   done
> +
> +  debchange --release ''
> }
> 
> main "$@" || exit $?
> -- 
> 2.33.0
>
  

Patch

diff --git a/debian/changelog b/debian/changelog
index fcef2cb..3b90542 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@ 
-libloc (0.9.8-1) UNRELEASED; urgency=medium
+libloc (0.9.8-1) unstable; urgency=medium
 
   [ Michael Tremer ]
   * importer: Do not try to initialise a column that cannot be NULL with
diff --git a/debian/genchangelog.sh b/debian/genchangelog.sh
index 85d3922..ab1c198 100755
--- a/debian/genchangelog.sh
+++ b/debian/genchangelog.sh
@@ -31,6 +31,8 @@  main () {
     echo "$author_name <$author_email>  $subject"
     DEBFULLNAME="$author_name" DEBEMAIL="$author_email" debchange --upstream --multimaint-merge "$subject"
   done
+
+  debchange --release ''
 }
 
 main "$@" || exit $?