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

Bug#919587: bringing back Imapsync



Hello,

(I switched to personnal email as I am doing this in my "personnal time" and have no official agreement from my company for now.)

It appeared to me that a couple of years later my notes on how to build the package were not accurate anymore ! (sorry for my last post.)




After a quick chat in OFTC/#debian-mentors channel, I went on packaging imapsync.



So I (tried to) keep up good work done by Markus Raps on salsa and here is how.


For now, I focus on having only imapsync perl script[1] and imapsync man page[2] in debian package.

(I wish to have some upstream documentation too, but I plan to add it once I get more familiar with debian packaging.)



Here are the steps followed and how to build package at the bottom of this message:

0. on salsa.debian.net cloned Markus repo to mine
1. change debian/watch to fix new URL for upstream tags
2. change Makefile and imapsync files to use the ones from
   imapsync v1.945

3. launch command "gbp pq import"
  (it creates and checks out branch patch-queue/master)

4. Use attached file as ~/.gbp.conf (note filter in import-orig section)
5. Download new upstream with command "gbp import-orig --uscan --upstream-version=2.229 --pristine-tar" (this creates some commits, downloads on ./../ directory and a new pristine-tar branch (I am not sure about this branch) )

6. Rebase existing debian patch (error → skip its rebase)
7. Create equivalent patches for version 2.229
8. Launch "gbp pq export --commit" (this checkout master branch)
9. make some changes and commits to debian files
   (new dependency, unfollow debian/files, maintainer and salsa)

9. Checkout Makefile and imapsync from patch-queue/master branch (why??)
10. Build package with:
    gbp buildpackage

This built a package in ./../


Now, thing is I could not rebuild package with "gbp buildpackage" command (why?).

I had to push pristine-tar branch to be able to build package "from scratch" (why?).


It is now (as in commit 1e0d6bd39f9a2d7deb5cb0edb6246b57fa26e9a6) possible to build package "from scratch" with following steps:

0. git clone https://salsa.debian.org/fernando-guest/imapsync.git
1. cd imapsync && git checkout pristine-tar && git checkout master
(why?)
2. gbp buildpackage
And the magic happens ! \o/ :tada:


[1] https://github.com/imapsync/imapsync/blob/master/imapsync

[2] Built launching pod2man on imapsync perl script.



Hope this helps
Regards
Fernando
[DEFAULT]
#builder = git-pbuilder
cleaner = fakeroot debian/rules clean
# Create pristine-tar on import
pristine-tar = True
# Run lintian to check package after build
postbuild = lintian -iIE --pedantic $GBP_CHANGES_FILE && echo "Lintian OK"""

[import-orig]
# Filter out unwanted files/dirs from upstream
filter = [
    '.github*',
    '.gitignore',
    'aa',
    'ChangeLog',
    'CREDITS',
    'dist',
    'doc',
    'docs*',
    'examples',
    'examples/*',
    'FAQ*',
    'i3',
    'imapsync-1.921',
    'index.shtml',
    'INSTALL*',
    'LICENSE',
    'NOLIMIT',
    'oauth2',
    'README*',
    'S*',
    'tests.sh',
    'TODO',
    'VERSION',
    'webserver',
    'W*',
    'X'
    ]

# filter the files out of the tarball passed to pristine-tar
filter-pristine-tar = True

[import-dsc]
filter = [
    'CVS',
    '.cvsignore',
    '.hg',
    '.hgignore',
    '.bzr',
    '.bzrignore',
    '.gitignore'
    ]

Reply to: