Re: Git, gbp blues

2019-09-08 Thread Dmitry Shachnev
On Sat, Sep 07, 2019 at 11:57:42PM +0200, Guðjón Guðjónsson wrote:
> Hi again
>
> One more question.
> If I have updated the sources with uscan and when running lintian I
> find out that
> there is an unwanted file in the upstream sources.
>
> How can I remove the file from the upstream tarball after it has been
> imported into upstream and pristine-tar?

If the tarball was not previously repacked, then you need to use a different
version number (e.g. +dfsg or +repack). List the file in Files-Excluded in
debian/copyright and add repack options to debian/rules (e.g.
opts=dversionmangle=s/\+dfsg//,repacksuffix=+dfsg — see pyqt5 for example).

After that, you have a new upstream version so you can import the tarball
using the normal procedure (gbp import-orig --uscan --pristine-tar).

Although, this depends on how much unwanted the file is. If it does not
violate DFSG and is not large, then it may be better to leave the tarball
as is and add that file to debian/clean.

If the tarball is already repacked, and you need to exclude one more file
(and you have not yet uploaded the current version to archive), then I would
suggest you to manually remove the files from upstream branch, and run
pristine-tar commit after generating the new tarball.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-09-08 Thread Dmitry Shachnev
Hi Guðjón,

On Sat, Sep 07, 2019 at 08:44:53AM +0200, Guðjón Guðjónsson wrote:
> I am now working on my gspiceui package (which is in fact not a python
> package)
> But the master branch is just master, not debian/master
>
> Here debian/master is preferred
> https://wiki.debian.org/Python/GitPackaging
>
> But in this page the branch name is master.
> https://wiki.debian.org/PackagingWithGit
>
> What is the standard?
> Shall I change?

If the package is not in DPMT or PAPT then you can use any branch names.

Just if you use debian/master, do not forget to specify it in
debian/gbp.conf (gbp expects master by default).

There is an attempt to standardize, DEP-14 (which suggests debian/master),
but it is not yet widely adopted:
https://dep-team.pages.debian.net/deps/dep14/

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-09-07 Thread Guðjón Guðjónsson
Hi again

One more question.
If I have updated the sources with uscan and when running lintian I
find out that
there is an unwanted file in the upstream sources.

How can I remove the file from the upstream tarball after it has been
imported into upstream and pristine-tar?

Regards
Gudjon



Re: Git, gbp blues

2019-09-06 Thread Guðjón Guðjónsson
Hi

Thanks for the suggestions. I will try my best.

I am now working on my gspiceui package (which is in fact not a python package)
But the master branch is just master, not debian/master

Here debian/master is preferred
https://wiki.debian.org/Python/GitPackaging

But in this page the branch name is master.
https://wiki.debian.org/PackagingWithGit

What is the standard?
Shall I change?

git checkout -b debian/master
git branch -D master
?

Regards
Gudjon



Re: Git, gbp blues

2019-08-26 Thread Dmitry Shachnev
On Mon, Aug 26, 2019 at 11:18:33AM +0200, Raphael Hertzog wrote:
> Instead you should use "gbp pq import --time-machine=X" where X is the
> number of commits that you accept to go backwards to try to find a point
> where the patch series can be applied.
>
> Then you are on your branch, ready for a rebase...

Nice option, thanks for the suggestion!

So Guðjón, next time if you have already imported a new tarball and do not
have patch-queue/debian/master branch, use this command instead.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-08-26 Thread Raphael Hertzog
On Sun, 25 Aug 2019, Dmitry Shachnev wrote:
> The correct procedure is running “gbp pq import” *before* importing a new
> tarball. Then after importing you do “gbp pq rebase”.
> 
> Sometimes I myself forget to run “gbp pq import”. In this case I do the
> following:

Instead you should use "gbp pq import --time-machine=X" where X is the
number of commits that you accept to go backwards to try to find a point
where the patch series can be applied.

Then you are on your branch, ready for a rebase...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-08-25 Thread Andrey Rahmatullin
On Mon, Aug 26, 2019 at 08:20:13AM +0200, Guðjón Guðjónsson wrote:
> > The correct procedure is running “gbp pq import” *before* importing a new
> > tarball. Then after importing you do “gbp pq rebase”.
> In fact I did do that.
Then you would get an error message when trying to do that second time.

> > > But fixing the patches with quilt before importing them the second
> > > time seems to fix all my problems.
> > If it does not break the patches metadata then it also works.
> But what other way is possible?
gbp pq rebase.
Seriously.

> The patch queue must apply cleanly in gbp pq import 
And it will, of course.

> in general you can assume it doesn't with new upstream and
> old patch queue.
This is not something you can or should do.

> I still don't understand how to edit the patches the correct way
> after a new upstream release.
gbp pq rebase, as the wiki page tells you.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-08-25 Thread Guðjón Guðjónsson
Hi Dmitry and Anrdrey

On Sun, Aug 25, 2019 at 10:19 PM Dmitry Shachnev  wrote:
> The correct procedure is running “gbp pq import” *before* importing a new
> tarball. Then after importing you do “gbp pq rebase”.
In fact I did do that.
>
> Sometimes I myself forget to run “gbp pq import”. In this case I do the
> following:
>
> - Remember the current commit SHA1;
> - git reset --hard origin/debian/master;  # or to previous tag
> - gbp pq import;  # this is the needed step
> - git checkout debian/master;  # back to debian/master branch
> - git merge COMMIT_ID;  # that you remembered before
Thanks, this is useful for me.
>
> > But fixing the patches with quilt before importing them the second
> > time seems to fix all my problems.
> If it does not break the patches metadata then it also works.
But what other way is possible?
The patch queue must apply cleanly in gbp pq import and
in general you can assume it doesn't with new upstream and
old patch queue.
I still don't understand how to edit the patches the correct way
after a new upstream release.

Regards
Gudjon

Ps. The package qscintilla2 is pushed, still a few lintian warnings to fix.



Re: Git, gbp blues

2019-08-25 Thread Dmitry Shachnev
Hi Guðjón!

On Sun, Aug 25, 2019 at 10:01:02PM +0200, Guðjón Guðjónsson wrote:
> I did follow the procedure but I don't know what to do if a patch
> doesn't apply cleanly.
> I did try
> gbp pq import
> gbp:info: Trying to apply patches at 
> 'c72f39a3a32b5e5c1eb7f9aaf7176e942e85d804'
> gbp:warning: Patch 0004-remove-logo-privacy-issue.diff.patch failed to
> apply, retrying with whitespace fixup

The correct procedure is running “gbp pq import” *before* importing a new
tarball. Then after importing you do “gbp pq rebase”.

Sometimes I myself forget to run “gbp pq import”. In this case I do the
following:

- Remember the current commit SHA1;
- git reset --hard origin/debian/master;  # or to previous tag
- gbp pq import;  # this is the needed step
- git checkout debian/master;  # back to debian/master branch
- git merge COMMIT_ID;  # that you remembered before

> But fixing the patches with quilt before importing them the second
> time seems to fix all my problems.

If it does not break the patches metadata then it also works.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-08-25 Thread Andrey Rahmatullin
On Sun, Aug 25, 2019 at 10:01:02PM +0200, Guðjón Guðjónsson wrote:
> > > Isn't this an error. Shouldn't it be git checkout?
> > > $ gbp checkout debian/master
> > Yes.
> You mean it should be git checkout?
Yes.

> > If you ran gbp pq import after importing the new tarball and it didn't say
> > "Patch queue branch 'patch-queue/master'. already exists. Try 'rebase' or
> > 'switch' instead." this means you didn't follow the procedure you copied
> > above, which includes running gbp pq import before gbp import-orig.
> 
> I did follow the procedure but I don't know what to do if a patch
> doesn't apply cleanly.
You seem to be misunderstanding what I wrote.

> I did try
> gbp pq import
> gbp:info: Trying to apply patches at 
> 'c72f39a3a32b5e5c1eb7f9aaf7176e942e85d804'
> gbp:warning: Patch 0004-remove-logo-privacy-issue.diff.patch failed to
> apply, retrying with whitespace fixup
This cannot happen when you run gbp pq import before running gbp
import-orig, as the wiki page tells you to do.
And this cannot happen when you run it after gbp import-orig, if you also
ran it before running gbp import-orig, as the wiki page tells you to do.
So this can only happen if you didn't follow the procedure.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: Git, gbp blues

2019-08-25 Thread Guðjón Guðjónsson
Hi Andrey

Thanks for the answer.
On Sun, Aug 25, 2019 at 9:50 PM Andrey Rahmatullin  wrote:
> > Isn't this an error. Shouldn't it be git checkout?
> > $ gbp checkout debian/master
> Yes.
You mean it should be git checkout?
>
> If you ran gbp pq import after importing the new tarball and it didn't say
> "Patch queue branch 'patch-queue/master'. already exists. Try 'rebase' or
> 'switch' instead." this means you didn't follow the procedure you copied
> above, which includes running gbp pq import before gbp import-orig.

I did follow the procedure but I don't know what to do if a patch
doesn't apply cleanly.
I did try
gbp pq import
gbp:info: Trying to apply patches at 'c72f39a3a32b5e5c1eb7f9aaf7176e942e85d804'
gbp:warning: Patch 0004-remove-logo-privacy-issue.diff.patch failed to
apply, retrying with whitespace fixup
gbp:error: Failed to apply
'/home/gudjon/debian/python-modules/qscintilla2/debian/patches/0004-remove-logo-privacy-issue.diff.patch':
Error running git apply: error: patch failed:
doc/Scintilla/index.html:64
error: doc/Scintilla/index.html: patch does not apply
gbp:error: Couldn't apply patches

But fixing the patches with quilt before importing them the second
time seems to fix all my problems.

I can push my changes if you want to take a look?

Regards
Gudjon



Re: Git, gbp blues

2019-08-25 Thread Andrey Rahmatullin
On Sun, Aug 25, 2019 at 09:40:16PM +0200, Guðjón Guðjónsson wrote:
> Isn't this an error. Shouldn't it be git checkout?
> $ gbp checkout debian/master
Yes.

> But I still find working with patch queues difficult especially with
> new upstream where the old patches don't apply correctly.
> I tried to do
> $ gbp pq import
> but it fails because one of the patches doesn't apply.
> So I fixed the patches in the old way using
> quilt push -f
> quilt edit
> quilt refresh
> And after having fixed all the patches I could do
> $gbp pq import
> $gbp pq export
> and the diff seems ok.
> Is this the correct procedure?
The correct procedure is documented on that page.

"""
Rebase the patches:

$ gbp pq rebase
$ gbp pq export
"""

If you ran gbp pq import after importing the new tarball and it didn't say
"Patch queue branch 'patch-queue/master'. already exists. Try 'rebase' or
'switch' instead." this means you didn't follow the procedure you copied
above, which includes running gbp pq import before gbp import-orig.


-- 
WBR, wRAR


signature.asc
Description: PGP signature


Git, gbp blues

2019-08-25 Thread Guðjón Guðjónsson
Hi list

I'm sorry to say but I am no friend of git for Debian packaging but I
am a big wannabe.

This page has been very helpful:
https://wiki.debian.org/Python/GitPackaging
It says
$ gbp pq import
which has more or less solved my problems when trying to upgrade a package.

Isn't this an error. Shouldn't it be git checkout?
$ gbp checkout debian/master
$ gbp import-orig --pristine-tar --uscan

rebase and export.

But I still find working with patch queues difficult especially with
new upstream where the old patches don't apply correctly.
I tried to do
$ gbp pq import
but it fails because one of the patches doesn't apply.
So I fixed the patches in the old way using
quilt push -f
quilt edit
quilt refresh
And after having fixed all the patches I could do
$gbp pq import
$gbp pq export
and the diff seems ok.
Is this the correct procedure?

Regards
Gudjon