Difference between revisions of "Packaging"

From Apertium
Jump to navigation Jump to search
Line 24: Line 24:
   
 
= Release to Debian =
 
= Release to Debian =
  +
* <code><nowiki>cd packaging</nowiki></code>
<pre>
 
cd packaging
 
   
  +
== Control Files in Subversion ==
# 1) Ensure control files correct, especially debian/copyright and debian/changelog
 
# Everything else ought to be ok already, or it would have failed nightly build
+
Ensure control files correct, especially <code><nowiki>debian/copyright</nowiki></code> and <code><nowiki>debian/changelog</nowiki></code>. Everything else ought to be ok already, or it would have failed nightly build
   
# 1.1) Determine the svn revision that corresponds to the release
+
Determine the svn revision that corresponds to the release and put this with the version in <code><nowiki>debian/changelog</nowiki></code>
# and put this with the version in debian/changelog
 
   
# 1.1.1) If a tag was made, this is easy, e.g. for apertium 3.4.2:
+
If a tag was made, this is easy, e.g. for apertium 3.4.2:
svn log -q -l1 https://svn.code.sf.net/p/apertium/svn/tags/apertium/release-3.4.2/
+
* <code><nowiki>svn log -q -l1 https://svn.code.sf.net/p/apertium/svn/tags/apertium/release-3.4.2/</nowiki></code> yields r68453
# yields r68453
 
   
# 1.1.2) Otherwise, look through to see what revision corresponds with the release:
+
Otherwise, look through to see what revision corresponds with the release:
svn log https://svn.code.sf.net/p/apertium/svn/trunk/apertium/ | less
+
* <code><nowiki>svn log https://svn.code.sf.net/p/apertium/svn/trunk/apertium/ | less</nowiki></code>
   
# 1.2) For the found revision, make sure the version in configure.ac (or similar) is correct:
+
For the found revision, make sure the version in configure.ac (or similar) is correct:
svn cat -r68453 https://svn.code.sf.net/p/apertium/svn/trunk/apertium/configure.ac | less
+
* <code><nowiki>svn cat -r68453 https://svn.code.sf.net/p/apertium/svn/trunk/apertium/configure.ac | less</nowiki></code>
   
# 1.3) Update debian/changelog with the found version and revision and sign+stamp it, e.g.:
+
Update debian/changelog with the found version and revision and sign+stamp it, e.g.:
apertium (3.4.2~r68453-1) unstable; urgency=low
+
<pre>apertium (3.4.2~r68453-1) unstable; urgency=low
   
 
* New upstream release.
 
* New upstream release.
   
-- Tino Didriksen <tino@didriksen.cc> Wed, 25 May 2016 11:27:01 +0200
+
-- Tino Didriksen <tino@didriksen.cc> Wed, 25 May 2016 11:27:01 +0200</pre>
   
# 1.4) Optionally, ensure exclude.txt has patterns of all files you don't want in the source tarball.
+
Optionally, ensure exclude.txt has patterns of all files you don't want in the source tarball. For languages and pairs, this is usually all folders:
  +
* <code><nowiki>*/</nowiki></code>
# For languages and pairs, this is usually all folders: */
 
   
# 1.5) Commit control files
+
Commit control files
   
  +
== Make and Sign Tarball ==
# 2) Generate the signed Debian source package, from the revision above.
 
# The argument to -e must match the GnuPG key you're signing with:
+
Generate the signed Debian source package, from the revision above. The argument to -e must match the GnuPG key you're signing with:
./single-dpkg.pl trunk/apertium/ --auto 0 \
+
* <code><nowiki>./single-dpkg.pl trunk/apertium/ --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' -e 'Your Name <your@email.com>' --rev 68453</nowiki></code>
-m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' \
 
-e 'Your Name <your@email.com>' \
 
--rev 68453
 
   
# 3) Import it to the Debian git repo.
+
== Import to Debian ==
  +
Import it to the Debian git repo.
   
# 3.1) Clone or pull:
+
Clone or pull:
gbp clone ssh://your-alioth-login@git.debian.org/srv/git.debian.org/git/debian-science/packages/apertium.git
+
<pre>gbp clone ssh://your-alioth-login@git.debian.org/srv/git.debian.org/git/debian-science/packages/apertium.git
cd apertium
+
cd apertium</pre>
  +
# Or, if you have it cloned already:
+
Or, if you have it cloned already:
cd apertium
+
<pre>cd apertium
 
gbp pull
 
gbp pull
git pull --all
+
git pull --all</pre>
   
# 3.2) Import, push new branch data, push new upstream tag
+
Import, push new branch data, push new upstream tag:
gbp import-dsc --pristine-tar /tmp/autopkg.*/*.dsc
+
<pre>gbp import-dsc --pristine-tar /tmp/autopkg.*/*.dsc
 
git push --all
 
git push --all
 
git push origin upstream/3.4.2_r68453
 
git push origin upstream/3.4.2_r68453

Revision as of 14:10, 29 July 2016

New Language or Pair Package

svn co https://svn.code.sf.net/p/apertium/svn/branches/packaging
cd packaging

# Copy apertium-kaz-tat because update-control.pl expects it
svn cp trunk/apertium-kaz-tat trunk/apertium-arg-cat

# Automatically adjust many tiny details
./update-control.pl trunk/apertium-arg-cat Aragonese Catalan

# Determine last changed revision
svn info https://svn.code.sf.net/p/apertium/svn/trunk/apertium-arg-cat | grep 'Last Changed Rev'

# Double-check debian/control and fix debian/changelog with the version and revision

# Determine copyrights and stuff those into debian/copyright, along with any other adjustments needed there
svn log -q https://svn.code.sf.net/p/apertium/svn/trunk/apertium-arg-cat | awk '{print $3 "\t" $5}' | ./authors.php

# Add the package to packages.json

svn ci -m "Packaged arg-cat"

Release to Debian

  • cd packaging

Control Files in Subversion

Ensure control files correct, especially debian/copyright and debian/changelog. Everything else ought to be ok already, or it would have failed nightly build

Determine the svn revision that corresponds to the release and put this with the version in debian/changelog

If a tag was made, this is easy, e.g. for apertium 3.4.2:

  • svn log -q -l1 https://svn.code.sf.net/p/apertium/svn/tags/apertium/release-3.4.2/ yields r68453

Otherwise, look through to see what revision corresponds with the release:

  • svn log https://svn.code.sf.net/p/apertium/svn/trunk/apertium/ | less

For the found revision, make sure the version in configure.ac (or similar) is correct:

  • svn cat -r68453 https://svn.code.sf.net/p/apertium/svn/trunk/apertium/configure.ac | less

Update debian/changelog with the found version and revision and sign+stamp it, e.g.:

apertium (3.4.2~r68453-1) unstable; urgency=low

  * New upstream release.

 -- Tino Didriksen <tino@didriksen.cc>  Wed, 25 May 2016 11:27:01 +0200

Optionally, ensure exclude.txt has patterns of all files you don't want in the source tarball. For languages and pairs, this is usually all folders:

  • */

Commit control files

Make and Sign Tarball

Generate the signed Debian source package, from the revision above. The argument to -e must match the GnuPG key you're signing with:

  • ./single-dpkg.pl trunk/apertium/ --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' -e 'Your Name <your@email.com>' --rev 68453

Import to Debian

Import it to the Debian git repo.

Clone or pull:

gbp clone ssh://your-alioth-login@git.debian.org/srv/git.debian.org/git/debian-science/packages/apertium.git
cd apertium

Or, if you have it cloned already:

cd apertium
gbp pull
git pull --all

Import, push new branch data, push new upstream tag:

gbp import-dsc --pristine-tar /tmp/autopkg.*/*.dsc
git push --all
git push origin upstream/3.4.2_r68453

People, Lists