[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gbp import-orig --uscan for the non-trivial cases



Hi,

On Wed, Aug 27, 2025 at 08:35:21PM +0200, Marc Haber wrote:
Exhibit A is sniproxy, a package I have recently taken over.

this has been solved by now. There are some issues left with uscan that I might file bugs for.

Exhibit B is console-log, a package that is non-native for historical reasons and which has no upstream. I am the upstream author, and I maintain the "upstream" sources on salsa in the main branch. I have a single "upstream" release tag, v2.0, and my debian/watch,

| version: 5
| | Source: https://salsa.debian.org/debian/console-log.git
| Matching-Pattern: refs/tags/v@ANY_VERSION@
| Git-Mode: full
| Mode: git

at least finishes successfully. Is that the correct way to do it? Does this only work because I built an upstream tarball manually (that was before Debconf, I didn't know about Otto's way to do it back then)?

This issue, regarding a different package, was obviously lost in the discussions about sniproxy. My questions do still stand.

I am also confused by gbp push complaining a non-fast-forward update on debian/upstream while manually pushing that branch works just fine. Can somebody explain this?

| [25/4863]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ gbp push
| gbp:info: Pushing debian/2.0-2 to origin
| gbp:info: Pushing upstream/2.0 to origin
| gbp:info: Pushing 4edd1f9e180c8ffd5416d8664e259bb07c642ea7 to origin:refs/heads/debian/latest
| gbp:info: Pushing 26a1f5b69ee0b157595e748b0f311d98a64ee261 to origin:refs/heads/upstream/latest
| gbp:error: Error running git push: To salsa.debian.org:debian/console-log.git
|  ! [rejected]        26a1f5b69ee0b157595e748b0f311d98a64ee261 -> upstream/latest (non-fast-forward)
| error: failed to push some refs to 'salsa.debian.org:debian/console-log.git'
| hint: Updates were rejected because a pushed branch tip is behind its remote
| hint: counterpart. If you want to integrate the remote changes, use 'git pull'
| hint: before pushing again.
| hint: See the 'Note about fast-forwards' in 'git push --help' for details.
| gbp:error: Failed to push some refs.
| 1 [26/4850]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ git checkout upstream/latest
| Switched to branch 'upstream/latest'
| Your branch is up to date with 'origin/upstream/latest'.
| [27/4827]mh@salida:~/packages/console-log/console-log (upstream/latest|u=) $ git push
| Everything up-to-date
| [28/4784]mh@salida:~/packages/console-log/console-log (upstream/latest|u=) $ git pull
| Already up to date.
| [29/4756]mh@salida:~/packages/console-log/console-log (upstream/latest|u=) $ git push
| Everything up-to-date
| [30/4756]mh@salida:~/packages/console-log/console-log (upstream/latest|u=) $ git checkout debian/latest
| Switched to branch 'debian/latest'
| Your branch is ahead of 'origin/debian/latest' by 2 commits.
|   (use "git push" to publish your local commits)

| [38/4707]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ gbp push -vv
| gbp:debug: ['git', 'rev-parse', '--show-cdup']
| gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
| gbp:debug: ['git', 'rev-parse', '--git-dir']
| gbp:debug: ['git', 'symbolic-ref', 'HEAD']
| gbp:debug: ['git', 'show-ref', 'refs/heads/debian/latest']
| gbp:debug: ['git', 'config', 'branch.debian/latest.remote']
| gbp:debug: ['git', 'config', 'branch.debian/latest.merge']
| gbp:debug: ['git', 'tag', '-l', 'debian/2.0-2']
| gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'debian/2.0-2^{commit}']
| gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'refs/heads/debian/latest']
| gbp:debug: ['git', 'tag', '-l', 'upstream/2.0']
| gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream/2.0^{commit}']
| gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'refs/heads/upstream/latest']
| gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
| gbp:debug: ['git', 'log', '--pretty=format:%H', '--no-show-signature', '--no-merges', '--grep=pristine-tar .* console-log_2\\.0\\.orig\\.tar.*', 'pristine-tar', '--']
| gbp:debug: Found pristine-tar commit at '0ac366a6c9ff071c939d12b3081d1cbe45b505fc'
| gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', '0ac366a6c9ff071c939d12b3081d1cbe45b505fc^0']
| gbp:debug: ['git', 'show', '--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%f%x00%b%x00', '-z', '--date=raw', '--no-renames', '--name-status', '--no-show-signature', '0ac366a6c9ff071c939d12b3081d1cbe45b505fc']
| gbp:debug: ['git', 'symbolic-ref', 'HEAD']
| gbp:debug: ['git', 'show-ref', 'refs/heads/debian/latest']
| gbp:debug: ['git', 'config', 'branch.debian/latest.remote']
| gbp:debug: ['git', 'config', 'branch.debian/latest.merge']
| gbp:debug: ['git', 'config', 'branch.pristine-tar.remote']
| gbp:debug: ['git', 'config', 'branch.pristine-tar.merge']
| gbp:debug: ['git', 'branch', '-r', '--contains', '0ac366a6c9ff071c939d12b3081d1cbe45b505fc']
| gbp:info: Pushing debian/2.0-2 to origin
| gbp:debug: ['git', 'push', 'origin', 'tag', 'debian/2.0-2']
| gbp:info: Pushing upstream/2.0 to origin
| gbp:debug: ['git', 'push', 'origin', 'tag', 'upstream/2.0']
| gbp:info: Pushing 4edd1f9e180c8ffd5416d8664e259bb07c642ea7 to origin:refs/heads/debian/latest
| gbp:debug: ['git', 'push', 'origin', '4edd1f9e180c8ffd5416d8664e259bb07c642ea7:refs/heads/debian/latest']
| gbp:info: Pushing 26a1f5b69ee0b157595e748b0f311d98a64ee261 to origin:refs/heads/upstream/latest
| gbp:debug: ['git', 'push', 'origin', '26a1f5b69ee0b157595e748b0f311d98a64ee261:refs/heads/upstream/latest']
| gbp:error: Error running git push: To salsa.debian.org:debian/console-log.git
|  ! [rejected]        26a1f5b69ee0b157595e748b0f311d98a64ee261 -> upstream/latest (non-fast-forward)
| error: failed to push some refs to 'salsa.debian.org:debian/console-log.git'
| hint: Updates were rejected because a pushed branch tip is behind its remote
| hint: counterpart. If you want to integrate the remote changes, use 'git pull'
| hint: before pushing again.
| hint: See the 'Note about fast-forwards' in 'git push --help' for details.
| gbp:error: Failed to push some refs.
| 1 [39/4707]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $

| 1 [32/4711]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ it branch -a
| -bash: it: command not found
| 127 [33/4712]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ git branch -a
| [34/4704]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ git branch -a -vv
| [35/4705]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $ git branch -a -vv | cat
| * debian/latest                  5017a24 [origin/debian/latest: ahead 2] remove an obsolete obverride
|   main                           b8b7c97 [origin/main] New upstream version 2.0
|   pristine-tar                   0ac366a [origin/pristine-tar] pristine-tar data for console-log_2.0.orig.tar.xz
|   upstream/latest                b8b7c97 [origin/upstream/latest] New upstream version 2.0
|   remotes/origin/HEAD            -> origin/debian/latest
|   remotes/origin/debian/latest   4edd1f9 prepare upload to unstable
|   remotes/origin/main            b8b7c97 New upstream version 2.0
|   remotes/origin/pristine-tar    0ac366a pristine-tar data for console-log_2.0.orig.tar.xz
|   remotes/origin/upstream/latest b8b7c97 New upstream version 2.0
|   remotes/origin/wip-systemd     d5f5343 re-add debian
| [36/4706]mh@salida:~/packages/console-log/console-log (debian/latest|u+2) $

The commit 26a1f5b69ee0b157595e748b0f311d98a64ee261 that gbp push wants to push to upstream/latest is already in the history of upstream/latest. I don't understand that.

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: