Re: [git-buildpackage] A basic question to begin

2022-05-07 Thread Seamus de Mora
I should state this again for clarity:
My objective is to create a git repo that allows users to clone, and
then successfully
build a .deb package for 'dhcpcd5' without recourse to an
"external" tarball. By "external" I only mean that all of the data needed to
successfully complete the build process is contained within the cloned git
repo.

> The pristine-tar manpage has example:
>
>   https://manpages.debian.org/bullseye/pristine-tar/pristine-tar.1.en.html



   1. Re the example: I don't know what a "forge" site is... as in
   'sourceforge'?
   2. Reading this manpage, this passage from the Description seems to
   answer my question re the 'upstream' branch that was imported, assuming
   that 'gbp import-dsc' does what's described as "typical" below:

"pristine-tar can regenerate an exact copy of a pristine upstream tarball
using only a small binary *delta* file and the contents of the tarball,
which are typically kept in an *upstream* branch in version control"


FWIW: Under the 'Options' heading, the text used for the option
listings is buggered.
It appears to be some sort of over-printing - don't know how to describe
this, so I've attached a screenshot here that shows it clearly.

[image: Screen Shot 2022-05-07 at 2.17.56 PM.png]
>
> and the Debian Wiki:
>
>   https://wiki.debian.org/DebianPackaging--pristine-tar-option-explained

I'm sorry, the explanation in this wiki does not help me much. I did learn
that Debian has been unable to reconcile the old way with the new way -
which was a bit of a surprise since git has been around for a while now.
But it's not been part of my objective to take on any "tarball baggage". I
hope to deal with it one time during the import, and be done with it.
However, if someone else wants or needs a '*.orig.tar.xz', I would like to
make sure my repo has the ingredients they need to re-create it.

And so, it appears the answer to my earlier questions is this:

*Use the `pristine-tar' option with '**gbp import-dsc' when importing a
conventional package into git. Using this option will provide users and
maintainers the option to re-create the pristine tarball (**'*.orig.tar.xz'*
*)** if needed.*

Does that sound about right???
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-07 Thread Guido Günther
Hi,
On Sat, May 07, 2022 at 06:03:21AM -0500, Seamus de Mora wrote:
> Hello,
> 
> On Tue, May 3, 2022 at 4:19 AM Guido Günther  wrote:
> 
> > > FWIW, I experimented with my local .dsc file. 'man gbp-import-dsc'
> suggests
> > > usage of a local .dsc as follows:
> > > 'gbp import-dsc ../hello_2.10-1.dsc'
> > > Which implied to me that the folder should be created, then descend
> into it
> > > before running this command.
> >
> > this is true when you run it inside an existing repo as it assume you
> > update. If you run from a outside repo it creates one, that's why the
> > log says:
> >
> > gbp:info: No git repository found, creating one.
> 
> To recap, I have apparently successfully created a git repo that matches
> the source package I obtained using 'apt-get source dhcpcd5'.  I now have a
> question(s) re. the 'incorporation' of my pristine upstream source into the
> repo.
> 
> When I pulled the dhcpcd5 source repo (using 'apt-get source dhcpcd5'), I
> got a tarball named 'dhcpcd5_8.1.2.orig.tar.xz'. AIUI, this is called the
> 'pristine' upstream source, and during the build process it serves as a
> "quality check" on the integrity of the package.
> 
> 'man gbp-import-dsc' defines these options:
> 
>- "--pristine-tar => Generate pristine-tar delta file."
>- "--upstream-branch=branch_name => The branch in the Git repository the
>upstream sources are put onto. Default is upstream"
> 
> I'm confused on the purpose of these options - could you explain how they
> are used? Let me try to explain where I'm confused:
> 
>- The 'dhcpcd5' repo I created using 'gbp import-dsc' contains a branch
>called 'upstream'. Does this branch contain/represent the same sources that
>are in the 'dhcpcd5_8.1.2.orig.tar.xz' tarball?
>- If so, why can't the 'pristine-tar delta file' be computed from the
>'upstream' branch in the repo?

The pristine-tar manpage has example:

  https://manpages.debian.org/bullseye/pristine-tar/pristine-tar.1.en.html

and the Debian Wiki:

  https://wiki.debian.org/DebianPackaging--pristine-tar-option-explained

Cheers,
 -- Guido

> 
> 
> Thnx,
> ~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-07 Thread Seamus de Mora
Hello,

On Tue, May 3, 2022 at 4:19 AM Guido Günther  wrote:

> > FWIW, I experimented with my local .dsc file. 'man gbp-import-dsc'
suggests
> > usage of a local .dsc as follows:
> > 'gbp import-dsc ../hello_2.10-1.dsc'
> > Which implied to me that the folder should be created, then descend
into it
> > before running this command.
>
> this is true when you run it inside an existing repo as it assume you
> update. If you run from a outside repo it creates one, that's why the
> log says:
>
> gbp:info: No git repository found, creating one.

To recap, I have apparently successfully created a git repo that matches
the source package I obtained using 'apt-get source dhcpcd5'.  I now have a
question(s) re. the 'incorporation' of my pristine upstream source into the
repo.

When I pulled the dhcpcd5 source repo (using 'apt-get source dhcpcd5'), I
got a tarball named 'dhcpcd5_8.1.2.orig.tar.xz'. AIUI, this is called the
'pristine' upstream source, and during the build process it serves as a
"quality check" on the integrity of the package.

'man gbp-import-dsc' defines these options:

   - "--pristine-tar => Generate pristine-tar delta file."
   - "--upstream-branch=branch_name => The branch in the Git repository the
   upstream sources are put onto. Default is upstream"

I'm confused on the purpose of these options - could you explain how they
are used? Let me try to explain where I'm confused:

   - The 'dhcpcd5' repo I created using 'gbp import-dsc' contains a branch
   called 'upstream'. Does this branch contain/represent the same sources that
   are in the 'dhcpcd5_8.1.2.orig.tar.xz' tarball?
   - If so, why can't the 'pristine-tar delta file' be computed from the
   'upstream' branch in the repo?


Thnx,
~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-03 Thread Guido Günther
Hi,
On Tue, May 03, 2022 at 03:31:47AM -0500, Seamus de Mora wrote:
> On Tue, May 3, 2022 at 1:55 AM Guido Günther  wrote:
> >
> > Hi,
> > On Mon, May 02, 2022 at 05:03:44PM -0500, Seamus de Mora wrote:
> > > gbp:error: 'dget --download-only -q
> > >
> https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc
> '
> > > failed: it exited with 1
> >
> > See `man gbp-imort-dsc`:
> >
> > --allow-unauthenticated
> >   Whether to skip signature verification on
> >   downloads. Passed on verbatim to dget and apt-get
> >   respectively. Use with care.
> 
> Whoops - sorry about that!
> 
> Eventually succeeded with this (thanks!), but a couple of things:
> I.  1st try => 'gbp:error: Git command failed: Error running git branch:
> fatal: A branch named 'master' already exists.'

You likely ran it from a repo with that branch.

>  I still don't understand this error. 'man gbp-import-dsc' says
> '--debian-branch=branch_name...Default is master.'
> My ~/.gitconfig: 'defaultBranch = main'
> 
> II. I was expecting that the folder name created by 'gbp' would be
> 'dhcpcd5-8.1.2' instead of 'dhcpcd5`. Why is it different from what you get
> when using 'apt-get source dhcpcd5'?

Because it expects that you do further work in that repo so adding a
version number doesn't make much sense.

> FWIW, I experimented with my local .dsc file. 'man gbp-import-dsc' suggests
> usage of a local .dsc as follows:
> 'gbp import-dsc ../hello_2.10-1.dsc'
> Which implied to me that the folder should be created, then descend into it
> before running this command.

this is true when you run it inside an existing repo as it assume you
update. If you run from a outside repo it creates one, that's why the
log says:

gbp:info: No git repository found, creating one.
Cheers,
 -- Guido

> But when I did that, it created another folder with the same name; i.e.
> ~/dhcpcd5/dhcpcd5
> From ~/ I did 'gbp import-dsc hello_2.10-1.dsc' - which seems to work
> OK.
> 
> Thanks again for your help!
> ~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-03 Thread Seamus de Mora
On Tue, May 3, 2022 at 1:55 AM Guido Günther  wrote:
>
> Hi,
> On Mon, May 02, 2022 at 05:03:44PM -0500, Seamus de Mora wrote:
> > gbp:error: 'dget --download-only -q
> >
https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc
'
> > failed: it exited with 1
>
> See `man gbp-imort-dsc`:
>
> --allow-unauthenticated
>   Whether to skip signature verification on
>   downloads. Passed on verbatim to dget and apt-get
>   respectively. Use with care.

Whoops - sorry about that!

Eventually succeeded with this (thanks!), but a couple of things:
I.  1st try => 'gbp:error: Git command failed: Error running git branch:
fatal: A branch named 'master' already exists.'
 I still don't understand this error. 'man gbp-import-dsc' says
'--debian-branch=branch_name...Default is master.'
My ~/.gitconfig: 'defaultBranch = main'

II. I was expecting that the folder name created by 'gbp' would be
'dhcpcd5-8.1.2' instead of 'dhcpcd5`. Why is it different from what you get
when using 'apt-get source dhcpcd5'?

FWIW, I experimented with my local .dsc file. 'man gbp-import-dsc' suggests
usage of a local .dsc as follows:
'gbp import-dsc ../hello_2.10-1.dsc'
Which implied to me that the folder should be created, then descend into it
before running this command.
But when I did that, it created another folder with the same name; i.e.
~/dhcpcd5/dhcpcd5
>From ~/ I did 'gbp import-dsc hello_2.10-1.dsc' - which seems to work OK.

Thanks again for your help!
~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-03 Thread Guido Günther
Hi,
On Mon, May 02, 2022 at 05:03:44PM -0500, Seamus de Mora wrote:
> gbp:error: 'dget --download-only -q
> https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc'
> failed: it exited with 1

See `man gbp-imort-dsc`:

--allow-unauthenticated
  Whether to skip signature verification on
  downloads. Passed on verbatim to dget and apt-get
  respectively. Use with care.

Cheers.
 -- Guido
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-02 Thread Seamus de Mora
> > I just tried this:
> >
> > $ gbp import-dsc 
> > https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc
>
> :) Glad to hear that, but where did you find that URL?? And why didn't
> the .dsc file on my local drive work? Is it different from this one?
>
> > which worked as expected:
> >
...
> > This is gbp 0.9.25 but that shouldn't matter much as the dhcpcd package
> > doesn't look special. Does this help?
>
> Certainly does! Let me go through this when I've got a bit more time &
> I'll have some follow-up questions if that's OK. I want to learn all I
> can from this.

I'm baffled. I initially thought that your .dsc file was different
from mine, but that's not it; my local copy & yours are the same.
Here's my attempt to replicate your success:

$ gbp --version
gbp 0.9.22
$ rm -rf dhcpcd
$ gbp import-dsc
https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc
gbp:info: Downloading
'https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc'
using 'dget'...
dhcpcd5_8.1.2-1+rpt5.dsc:
dscverify: dhcpcd5_8.1.2-1+rpt5.dsc failed signature check:
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: no valid OpenPGP data found.
gpg: processing message failed: Unknown system error
Validation FAILED!!
gbp:error: 'dget --download-only -q
https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc'
failed: it exited with 1

Isn't this due only to the fact that I don't have OpenPGP installed on my RPi?

And if so, why wouldn't this work also - given that the local & remote
.dsc files are identical? :

$ pwd
dhcpcd5
$ gbp import-dsc ../dhcpcd5_8.1.2-1+rpt5

I did not see an option to ignore signature checks. I get the feeling
I am missing something rather fundamental, but I've no clue as to what
it is.

Thnx,
~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-02 Thread Seamus de Mora
> Hi,
>
> You'd need to create a merge request but if Debian and Raspian use a different
> versions this might not help you much.

Yes - given the current state of things, a merge request doesn't make
much sense. But my objective now is only to share my results via
GitHub. By that I mean, I'd like for another RPi user to be able to
clone my dhcpcd repo, build it, and have a working version. The bug
was a bad one IMHO, but I don't know what RPi's priorities are - when
they'll get around to patching the version in their repo.

> I just tried this:
>
> $ gbp import-dsc 
> https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc

:) Glad to hear that, but where did you find that URL?? And why didn't
the .dsc file on my local drive work? Is it different from this one?

> which worked as expected:
>
> gbp:info: Downloading 
> 'https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5.dsc'
>  using 'dget'...
> gbp:info: No git repository found, creating one.
> gbp:info: Version '1:8.1.2-1+rpt5' imported under '/tmp/dhcpcd5'
>
> $ git show head
>
> commit 1faa2ede0900e433db11a27532900cc11e99deb5 (HEAD -> master, tag: 
> debian/1%8.1.2-1+rpt5)
> Author: Serge Schneider 
> Date:   Mon Jan 17 08:13:46 2022 +
>
> Import Debian changes 1:8.1.2-1+rpt5
>
> dhcpcd5 (1:8.1.2-1+rpt5) bullseye; urgency=medium
> .
>   * IPv6ND: Fix reachable test
> - https://github.com/RPi-Distro/repo/issues/286
> .
> dhcpcd5 (1:8.1.2-1+rpt4) bullseye; urgency=medium
> .
>   * Add -q flag to avoid double logging
>- https://github.com/RPi-Distro/raspi-config/issues/173
> .
> dhcpcd5 (1:8.1.2-1+rpt3) bullseye; urgency=medium
> .
>   * Add libudev-dev and pkg-config dependencies
> - pkg-config is required for udev to be detected
> - https://github.com/RPi-Distro/repo/issues/274
> .
> dhcpcd5 (1:8.1.2-1+rpt2) bullseye; urgency=medium
> .
>   * New upstream version 8.1.2
>   * Install dhcpcd's wpa_supplicant hook
>   * Add netdev group and give it write access to dhcpcd.conf
>   * Background dhcpcd on launch to avoid startup delays
>   * Remove upstreamed patches
>   * Use hardware address instead of duid for Client ID
> - https://github.com/raspberrypi/noobs/issues/336
>   * Disable address senitisation
>
> …
>
> $ git branch
> * master
>   pristine-tar
>   upstream
>
> This is gbp 0.9.25 but that shouldn't matter much as the dhcpcd package
> doesn't look special. Does this help?

Certainly does! Let me go through this when I've got a bit more time &
I'll have some follow-up questions if that's OK. I want to learn all I
can from this.Thnx,
~S
___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


Re: [git-buildpackage] A basic question to begin

2022-05-02 Thread Guido Günther
Hi,
On Sun, May 01, 2022 at 06:28:48AM -0500, Seamus de Mora wrote:
> I am under the impression that the gbp-import-dsc command in
> git-buildpackage (gbp) is designed to translate or convert (import) a
> *traditional* Debian source repository into a structure/format suitable for
> deployment and distribution using git (locally) and (for example) GitLab
> and GitHub as a remote, publicly available repository. If I've gotten this
> wrong, please let me know.
> 
> Some background on my objective: I discovered a bug in a program I use
> frequently on Raspberry Pi: *dhcpcd*. The *dhcpcd* upstream sources are in 
> this
> GitHub repo . I submitted a
> PR against the upstream sources, and the author accepted it, but informed
> me that it would not get to the downstream repos.

As Raspian is based on Debian did you try to contribute your patch to
Debian? According to

   https://packages.qa.debian.org/d/dhcpcd5.html

The current git repo for that packaging is at

   https://salsa.debian.org/smlx-guest/dhcpcd5

> 
> The *dhcpcd* source package used by the Raspberry Pi organization is not
> under 'git' version control - nor is it available on their GitHub site. I
> worked with the sources I downloaded using the 'apt-get source dhcpcd5'
> command. I have learned enough of the basics to make the source
> modifications, and build a new package (.deb) for installation & testing.
> 
> My objective now is to put this *dhcpcd* code under 'git' version control,
> and share it; i.e. publish it on my GitHub site, and potentially make
> additional changes to it. I'm under the assumption that gbp can help me do
> that, and that the first step is *gbp-import-dsc*. I have tried this, but
> get only error messages so far. I suspect that the issue may be the current
> construction of the *dsc* file used for RPi's *dhcpcd*, but I need some
> help in sorting that.

Can you post how you invoke the command and the full error message?

> Am I in the right place to ask these questions?

yes, I hope we can help,
 -- Guido


___
git-buildpackage mailing list
git-buildpackage@lists.sigxcpu.org
http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage