FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 06-01-2010, 08:53 PM
Joey Hess
 
Default RFC: 3.0 (git), now with bundles

A while ago there was discussion onlist about making 3.0 (git) use
git-bundle as its repository serialization format. I think that is a
great improvement from the old ad-hoc format. Attached patch implements
it.

Notes:

* I have not tried to keep compatability with old 3.0 (git) packages.
The format is experimental..
* The bundle file has a .git extension. There is no real standard for
extensions of git bundles, though .bundle is sometimes used. I choose .git
for namespace reasons. Also, a .git bundle file can be cloned just like
a .git bare repo directory.
* All tags and local branches are included in the bundle, and are restored
from the bundle. Whatever branch was checked out when the source package
was built will be the one checked out when the source package is unpacked.
* Since it clones the bundle to unpack, the bundle is set as the origin
repository. The remote git repo configuration is not preserved. (Maybe
enhance it so Vcs-Git is automatically set up as a remote?)
* All history is currently included (via the --all switch to git-bundle),
but I plan to add a format-specific dpkg-source option, to allow
filtering of what is included in the bundle.

Demo:

joey@gnu:~/src/ttyrec>cat debian/source/format
3.0 (git)
joey@gnu:~/src/ttyrec>git branch
* debian
master
upstream
joey@gnu:~/src/ttyrec>dpkg-source -b .
dpkg-source: info: using source format `3.0 (git)'
Counting objects: 204, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (99/99), done.
Writing objects: 100% (204/204), 79.94 KiB, done.
Total 204 (delta 102), reused 160 (delta 95)
dpkg-source: info: building ttyrec in ttyrec_1.0.8-4.dsc

joey@gnu:~/src/ttyrec>cat ../ttyrec_1.0.8-4.dsc
Format: 3.0 (git)
Source: ttyrec
Binary: ttyrec
Architecture: any
Version: 1:1.0.8-4
Maintainer: NIIBE Yutaka <gniibe@fsij.org>
Standards-Version: 3.8.0
Build-Depends: debhelper (>= 5), sharutils
Checksums-Sha1:
d1e2f70b56c041a4360ebb8f2a9d45c8d28faf0f 83369 ttyrec_1.0.8-4.git
Checksums-Sha256:
3f489ba4f49606369adb8c17ed45885bb7ead9e151b174ec95 5198ced1867f8b 83369 ttyrec_1.0.8-4.git
Files:
ec5322b0da83278f42471cc35d8bd41c 83369 ttyrec_1.0.8-4.git
joey@gnu:~/src/ttyrec>file ../ttyrec_1.0.8-4.git
../ttyrec_1.0.8-4.git: Git bundle

joey@gnu:~/src/tmp>dpkg-source -x ../ttyrec_1.0.8-4.dsc
dpkg-source: warning: extracting unsigned source package (../ttyrec_1.0.8-4.dsc)
dpkg-source: info: extracting ttyrec in ttyrec-1.0.8
dpkg-source: info: cloning ttyrec_1.0.8-4.git
Initialized empty Git repository in /home/joey/src/tmp/ttyrec-1.0.8/.git/
joey@gnu:~/src/tmp>cd ttyrec-1.0.8
joey@gnu:~/src/tmp/ttyrec-1.0.8>ls
Makefile README debian/ io.c io.h ttyplay.1 ttyplay.c ttyrec.1 ttyrec.c ttyrec.h ttytime.1 ttytime.c
joey@gnu:~/src/tmp/ttyrec-1.0.8>git branch -a
* debian
remotes/origin/HEAD -> origin/debian
remotes/origin/debian
remotes/origin/master
remotes/origin/upstream
joey@gnu:~/src/tmp/ttyrec-1.0.8>git tag
debian/1.0.8-5
upstream/1.0.8

--
see shy jo
 
Old 06-02-2010, 06:47 AM
Tollef Fog Heen
 
Default RFC: 3.0 (git), now with bundles

]] Joey Hess

| A while ago there was discussion onlist about making 3.0 (git) use
| git-bundle as its repository serialization format. I think that is a
| great improvement from the old ad-hoc format. Attached patch implements
| it.

You are awesome, this looks like a great improvement. (I haven't played
with it yet, but just from looking at the tty log, it looks good.)

| * All history is currently included (via the --all switch to git-bundle),
| but I plan to add a format-specific dpkg-source option, to allow
| filtering of what is included in the bundle.

Maybe allow a filter to be specified in debian/source somewhere?

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87aarend79.fsf@qurzaw.linpro.no">http://lists.debian.org/87aarend79.fsf@qurzaw.linpro.no
 
Old 06-02-2010, 07:25 AM
Peter Krefting
 
Default RFC: 3.0 (git), now with bundles

Joey Hess:

A while ago there was discussion onlist about making 3.0 (git) use
git-bundle as its repository serialization format. I think that is a great
improvement from the old ad-hoc format. Attached patch implements it.


How does this interact with the actual Git repository, when it comes to
detecting patches to upstream and such? I haven't really read up on how the
format is specified, so please point me in that direction if what I am
asking is obvious.


I have some software packaged for Debian, and I usually have the upstream
master branch as master, and a debian branch with Debian changes (merging
the upstream release as they come). Or, if the upstream source is not in Git
already, a branch of imported tarballs. Or, when I am the upstream, I have
everything (including the debianization) on the master branch.


When I want to package such software, do I just clone the repository on the
correct commit and have dpkg handle it? Does it still need the upstream
tarball, or will the entire source be reconstructed from the git archive?


--
// Peter - http://www.softwolves.pp.se/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: alpine.DEB.2.00.1006020821200.23247@ds9.cixit.se"> http://lists.debian.org/alpine.DEB.2.00.1006020821200.23247@ds9.cixit.se
 
Old 06-02-2010, 03:41 PM
Joey Hess
 
Default RFC: 3.0 (git), now with bundles

Peter Krefting wrote:
> How does this interact with the actual Git repository, when it comes
> to detecting patches to upstream and such? I haven't really read up
> on how the format is specified, so please point me in that direction
> if what I am asking is obvious.

It *is* the actual git repository, in basically all respects.

> I have some software packaged for Debian, and I usually have the
> upstream master branch as master, and a debian branch with Debian
> changes (merging the upstream release as they come). Or, if the
> upstream source is not in Git already, a branch of imported
> tarballs. Or, when I am the upstream, I have everything (including
> the debianization) on the master branch.
>
> When I want to package such software, do I just clone the repository
> on the correct commit and have dpkg handle it? Does it still need
> the upstream tarball, or will the entire source be reconstructed
> from the git archive?

You checkout the debian branch or whatever branch you have the
debianization on, and build the package from there.

(You may use pristine-tar to store the upstream tarball in the git repo
if desired, but this is not strictly necessary.)

--
see shy jo
 
Old 06-02-2010, 03:43 PM
Joey Hess
 
Default RFC: 3.0 (git), now with bundles

Tollef Fog Heen wrote:
> | * All history is currently included (via the --all switch to git-bundle),
> | but I plan to add a format-specific dpkg-source option, to allow
> | filtering of what is included in the bundle.
>
> Maybe allow a filter to be specified in debian/source somewhere?

It should be possible to use debian/source/options to specify such
options. (Or debian/source/local-options)

--
see shy jo
 
Old 06-02-2010, 08:15 PM
Joey Hess
 
Default RFC: 3.0 (git), now with bundles

Attached updated patch adds the ability to limit the history depth that
is included in the git bundle (via --git-depth), as well as fully
control which tags/branches/objects are included/excluded in the bundle
(via --git-ref).

A new .gitshallow file is added to the source package to record info
git needs for shallow clones.


joey@gnu:~/src>cat ttyrec/debian/source/format
3.0 (git)
joey@gnu:~/src>cat ttyrec/debian/source/options
git-ref=debian
git-ref=mytag
joey@gnu:~/src>dpkg-source --git-depth=3 -b ttyrec
dpkg-source: info: using options from ttyrec/debian/source/options:
--git-ref=debian --git-ref=mytag
dpkg-source: info: using source format `3.0 (git)'
dpkg-source: info: creating shallow clone with depth 3
dpkg-source: info: bundling: debian mytag
Counting objects: 38, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (26/26), done.
Writing objects: 100% (38/38), 49.49 KiB, done.
Total 38 (delta 5), reused 35 (delta 4)
dpkg-source: info: building ttyrec in ttyrec_1.0.8-4.dsc
joey@gnu:~/src>cat ttyrec_1.0.8-4.gitshallow
2387fc0d9c95c8de1b9afc60897fb3573761a766
79b1f1aff6d21b6028a3948b223d200925e56fa1
c15672934bfa53a33d4c329c641d8d3943194715
d8366ac884b62a90e62e506016c5b1796b7de3d2
joey@gnu:~/src>dpkg-source -x ttyrec_1.0.8-4.dsc
dpkg-source: warning: extracting unsigned source package (ttyrec_1.0.8-4.dsc)
dpkg-source: info: extracting ttyrec in ttyrec-1.0.8
dpkg-source: info: cloning ttyrec_1.0.8-4.git
dpkg-source: info: setting up shallow clone
joey@gnu:~/src>cd ttyrec-1.0.8
joey@gnu:~/src/ttyrec-1.0.8>git log --pretty=oneline
joey@gnu:~/src/ttyrec-1.0.8>git log mytag --pretty=oneline
c54af7a7a1797e41fabfa9625db9c67617d89bd3 update
7f73eb6ce9522d99ee108dd89794198c7f095d60 update
135bef2b5363925a2b1a444970b3f109e5bee5d8 add
c15672934bfa53a33d4c329c641d8d3943194715 add
joey@gnu:~/src/ttyrec-1.0.8>git log --pretty=oneline
807f48d0db54f314d4397340467d8de7976940de update
c54af7a7a1797e41fabfa9625db9c67617d89bd3 update
7f73eb6ce9522d99ee108dd89794198c7f095d60 update
135bef2b5363925a2b1a444970b3f109e5bee5d8 add
c15672934bfa53a33d4c329c641d8d3943194715 add

Note that in this example, 4 revs of mytag were stored, because git
clone --depth always stores one more rev than requested. 5 revs of the
debian branch were stored, because it shares history with mytag. The
debian/source/options caused all other tags and branches to be omitted,
so their history is not included.

--
see shy jo
 
Old 07-25-2010, 02:59 PM
Raphael Hertzog
 
Default RFC: 3.0 (git), now with bundles

Hi,

On Wed, 02 Jun 2010, Joey Hess wrote:
> Attached updated patch adds the ability to limit the history depth that
> is included in the git bundle (via --git-depth), as well as fully
> control which tags/branches/objects are included/excluded in the bundle
> (via --git-ref).

I've committed your patch with a few cleanups (coding style mainly) and will
push it later today. It will thus be in the next upload (1.15.8).

Cheers,
--
Raphaël Hertzog ◈ Debian Developer ◈ [Flattr=20693]

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100725145914.GA5776@rivendell">http://lists.debian.org/20100725145914.GA5776@rivendell
 

Thread Tools




All times are GMT. The time now is 11:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org