Skip to content

Conversation

@msuchane
Copy link
Contributor

Description

This PR adds Git, patching and packaging workflows migrated from the Ubuntu wiki: https://wiki.ubuntu.com/DesktopTeam/git

These guides are mainly written for the Ubuntu Desktop Team but community contributors can also follow them.

Some of the content is similar in its overall purpose to existing Ubuntu Project guides but the Desktop and GNOME workflow is distinct.

Related issue

https://warthogs.atlassian.net/browse/UDENG-6342


Checklist

  • I have read and followed the Ubuntu Project contributing guide
  • My pull request is linked to an existing issue (if applicable)
  • I have tested my changes, and they work as expected

Additional notes (optional)

This documentation needs one final review by Desktop Team members. It's a draft for now.

We can adjust the placement of the files in the documentation set. I realize they don't fit too neatly.

Copy link

@quine00 quine00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Comments in-line.

Copy link

@quine00 quine00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, will come back later. Thanks!

* Force using the current directory with your local modifications instead of the `build-area` directory, and include any local modifications to the package despite the `ignore-new` option.

For this, use the `--git-ignore-new --git-export-dir=""` Git options.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we describe how to also remove local changes? dh_clean is apparently supposed to do that, but some packages don't. I often use git checkout . && git clean -fd . && quilt -f pop -a to reset things if I don't care about what has changed. Sure there's better ways!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Until I learn about better commands, I'm using your two suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, removing local changes (as debian changes) is not needed, since when building everything is only in the build directory which is detached from this (it's the beauty of gbp).

If it's about removing git local changes, well that's imho out of scope of the guide, since using git clean is not really something strictly related to packaging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @3v1n0. I'm not sure what use case we're trying to solve here. @quine00, should we just delete the step to remove local changes then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for deleting all this, quilt is a no-no in this workflow (that exists exactly not to have to deal with it`

@msuchane msuchane marked this pull request as ready for review October 15, 2025 11:28
@msuchane
Copy link
Contributor Author

Thanks @quine00 for the review so far!

Sally and Robert, please take a look if the placement within the documentation set is appropriate. I chose the patching folder for the maintenance guide because that seemed like the closest fit.

(desktop-git-merge-a-new-upstream-version-to-latest)=
## Merge a new upstream version to latest

When upstream releases a new version of a given project, you can merge the version on the `ubuntu/latest` branch.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not wrong, you only have to gbp import-origin --uscan (or using the tarball) or either to merge with debian/latest, but you don't have to do the ubuntu/latest merge manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have to be a Debian Developer in order to merge into debian/latest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, anyone could in theory, but in practice only debian developers / maintainers should do it directly. For others MRs are welcome!

:host:
:dir: gnome-control-center
:user:
:input: git push --follow-tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:input: git push --follow-tags
:input: gbp push origin

:host:
:dir: gnome-control-center
:user:
:input: git push --follow-tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:input: git push --follow-tags
:input: gbp push origin

gbp:info: Successfully imported version 46.2 of ../gnome-control-center-46.2.tar.xz
```

1. Push all needed branches (for example, `ubuntu/latest` and `pristine-tarball` + `upstream/46.x` or `upstream/latest` if this upload is a new upstream release):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Push all needed branches (for example, `ubuntu/latest` and `pristine-tarball` + `upstream/46.x` or `upstream/latest` if this upload is a new upstream release):
1. Push all related branches (`gbp` handles this automatically, so that `ubuntu/latest`, `pristine-tarball` + `upstream/46.x` or `upstream/latest` if this upload is a new upstream release are handled):

:host:
:dir: gnome-control-center
:user:
:input: git push --follow-tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:input: git push --follow-tags
:input: gbp push origin

Comment on lines +465 to +467
:input: git push

:input: git push -u upstream/46.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:input: git push
:input: git push -u upstream/46.x
:input: gbp push origin

Comment on lines +1123 to +1132
1. Push the tags that we care about to Salsa:

```{terminal}
:copy:
:host:
:dir: gnome-control-center
:user:
:input: git tag | grep -E '^ubuntu/|^debian/|^upstream/' | xargs -r git push
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Push the tags that we care about to Salsa:
```{terminal}
:copy:
:host:
:dir: gnome-control-center
:user:
:input: git tag | grep -E '^ubuntu/|^debian/|^upstream/' | xargs -r git push
```

* Force using the current directory with your local modifications instead of the `build-area` directory, and include any local modifications to the package despite the `ignore-new` option.

For this, use the `--git-ignore-new --git-export-dir=""` Git options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for deleting all this, quilt is a no-no in this workflow (that exists exactly not to have to deal with it`

:host:
:dir: gnome-control-center
:user:
:input: git pull
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:input: git pull
:input: gbp pull origin

Comment on lines +166 to +176
```{terminal}
:copy:
:host:
:dir: gnome-control-center
:user:
:input: git remote show origin

[…]
upstream/46.x pushes to upstream/46.x (up to date)
[…]
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just git tag -l | grep debian or git tag -l | grep upstream

This procedure really needs a review. I rearranged the steps but I'm not sure if they still work.
:::

1. Downloading the source tarball.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use pull-lp-debs --download-only <source-package> [ubuntu-version] [version] like pull-lp-debs --download-only glib noble or pull-lp-debs --download-only gnome-shell 49.0-1ubuntu0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants