Re: salsa git workflows - import or mirror or?

2022-01-05 Thread Andrey Rahmatullin
On Wed, Jan 05, 2022 at 11:43:21AM +, Gavin Henry wrote:
> > > Brilliant, thank you Juri! Did you add this to the UpstreamGuide wiki at 
> > > all?
> > Why would it be useful on that page?
> 
> For me it was like the difference between reading a computer science
> book and source code. Juri's examples clearly showed the practical
> steps of the workflow.
I was asking why would it be useful on the UpstreamGuide page which is
explicitly for upstreams, not packagers.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: salsa git workflows - import or mirror or?

2022-01-05 Thread Gavin Henry
> >
> > https://salsa.debian.org/pkg-voip-team/libosip2
> > https://salsa.debian.org/vagrant/librecast (my friends project)
> These use two different workflows.
> libosip2 uses gbp and gbp-import-orig, importing upstream tarballs.
> librecast adds the upstream repo as a remote and merges upstream tags
> directly. It's not clear if it implies using gbp as there is no gbp.conf
> that would set the correct upstream tag pattern.

Thanks, that wasn't clear for me.

> > How best do I start?
> Thre are many different workflows and you need to choose one. If you
> decide to use gbp you can read
> https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html
> for some of the possible ones. I think gbp-import-orig+pristine-tar is the
> most popular among those.

That's the one that looks good for me. Thanks for the docs link.

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org



Re: salsa git workflows - import or mirror or?

2022-01-05 Thread Gavin Henry
> > Brilliant, thank you Juri! Did you add this to the UpstreamGuide wiki at 
> > all?
> Why would it be useful on that page?

For me it was like the difference between reading a computer science
book and source code. Juri's examples clearly showed the practical
steps of the workflow.

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org



Re: salsa git workflows - import or mirror or?

2022-01-05 Thread Andrey Rahmatullin
On Tue, Jan 04, 2022 at 07:21:47PM +, Gavin Henry wrote:
> Hi all,
> 
> I've created https://salsa.debian.org/ghenry/sentrypeer as an import
> from my main GitHub repo.
> 
> If I wanted to follow the pattern of:
> 
> https://salsa.debian.org/pkg-voip-team/libosip2
> https://salsa.debian.org/vagrant/librecast (my friends project)
These use two different workflows.
libosip2 uses gbp and gbp-import-orig, importing upstream tarballs.
librecast adds the upstream repo as a remote and merges upstream tags
directly. It's not clear if it implies using gbp as there is no gbp.conf
that would set the correct upstream tag pattern.

> How best do I start? 
Thre are many different workflows and you need to choose one. If you
decide to use gbp you can read
https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html
for some of the possible ones. I think gbp-import-orig+pristine-tar is the
most popular among those.


> I note the debian folder is in the repo too,
> where as I have mine as a branch:
> 
> https://github.com/SentryPeer/SentryPeer/tree/debian-packaging
In both cases the debian folder is in a packaging branch (master and
debian/latest respectively).


-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: salsa git workflows - import or mirror or?

2022-01-05 Thread Andrey Rahmatullin
On Tue, Jan 04, 2022 at 09:31:18PM +, Gavin Henry wrote:
> > Sorry, it's just small overview, how I do it.
> 
> Brilliant, thank you Juri! Did you add this to the UpstreamGuide wiki at all?
Why would it be useful on that page?

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: salsa git workflows - import or mirror or?

2022-01-04 Thread Gavin Henry
> Sorry, it's just small overview, how I do it.

Brilliant, thank you Juri! Did you add this to the UpstreamGuide wiki at all?

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org



Re: salsa git workflows - import or mirror or?

2022-01-04 Thread Juri Grabowski

Hello,

After reading of official documentation 
I have started like this:

Added DEB_SIGN_KEYID DEBEMAIL DEBFULLNAME to environment variables.
apt-get install build-essential pkg-config sbuild-debian-developer-setup 
dput-ng packaging-dev
Depends on packages, what you want to build: 
apt install dh-acc dh-ada-library dh-apache2 dh-apparmor dh-buildinfo

dh-consoledata dh-di dh-dist-zilla dh-elpa dh-exec dh-golang dh-haskell
dh-kpatches dh-linktree dh-lisp dh-lua dh-make-drupal dh-make-elpa
dh-make-golang dh-make-perl dh-metainit dh-ocaml dh-php dh-r dh-rebar
dh-runit dh-systemd dh-sysuser dh-virtualenv  dh-xsp

sbuild-debian-developer-setup
after this I've tried to rebuild one package with

sbuild -v -d unstable

To create skeleton for you new package you can take dh_make or debmake
I decided to take a way with just debian folder in debian/master and
debian/$(lsb_release -cs) branches.
dh_make --help give you a small overview about some options, for small
template, it should be enough:
dh_make -s -c gpl3 -p $PACKAGE_0.0.0.1
or
debmake -T -P -L -x3 -f "$DEBFULLNAME" -e "$DEBEMAIL" -p $YOUR_PACKAGENAME -u 
$PACKAGEVERSION -r 1 -d unstable -n
to have more templates.

Add d/watch for your package and try to check new version with
uscan --dehs
After changing debian/* files for you needs
wrap-and-sort -sav
for d/copyright licensecheck can be helpfull
enable CI/CD on salsa for debian/salsa.yml
I use a little bit modified version of salsa.yml:
https://salsa.debian.org/gratuxri/check-mk-agent/-/raw/debian/master/debian/salsa-ci.yml?inline=false
add upstream/metadata with lintian-brush
add d/gbp.conf with "debian-branch = debian/master" and "overlay = true" in 
section [DEFAULT] for clean debian branch.
git commit
gbp import-orig --uscan
gbp dch -i
git commit
git push

Sorry, it's just small overview, how I do it.

Best Regards,
Juri Grabowski



Re: salsa git workflows - import or mirror or?

2022-01-04 Thread Gavin Henry
> If I wanted to follow the pattern of:
>
> https://salsa.debian.org/pkg-voip-team/libosip2
> https://salsa.debian.org/vagrant/librecast (my friends project)

Upon further reading, I think this workflow is:

https://manpages.debian.org/testing/git-buildpackage/gbp-import-orig.1.en.html

like:

https://www.kali.org/docs/development/public-packaging/

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org