Difference between revisions of "Packaging"
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Github-migration-check}} |
|||
= New Language or Pair Package = |
|||
== New Language or Pair Package == |
|||
<pre> |
<pre> |
||
svn co https://svn.code.sf.net/p/apertium/svn/branches/packaging |
svn co https://svn.code.sf.net/p/apertium/svn/branches/packaging |
||
Line 23: | Line 25: | ||
</pre> |
</pre> |
||
= Release to Debian = |
== Release to Debian == |
||
* <code><nowiki>cd packaging</nowiki></code> |
|||
<pre> |
|||
cd packaging |
|||
=== Prerequisites === |
|||
# 1) Ensure control files correct, especially debian/copyright and debian/changelog |
|||
* A 4096 bit GnuPG key published to the various keyservers |
|||
# Everything else ought to be ok already, or it would have failed nightly build |
|||
* An [https://alioth.debian.org/ Alioth login] |
|||
* Access to the [http://debian-science.alioth.debian.org/debian-science-policy.html#idm45916844880768 Debian Science team] |
|||
=== Control Files in Subversion === |
|||
# 1.1) Determine the svn revision that corresponds to the release |
|||
Ensure control files correct, especially <code><nowiki>debian/copyright</nowiki></code> and <code><nowiki>debian/changelog</nowiki></code>. You will probably have to merge in the Debian git's control files as minor changes happen there. Everything else ought to be ok already, or it would have failed nightly build |
|||
# and put this with the version in debian/changelog |
|||
Determine the svn revision that corresponds to the release and put this with the version in <code><nowiki>debian/changelog</nowiki></code> |
|||
# 1.1.1) 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 |
|||
If a tag was made, this is easy, e.g. for apertium 3.4.2: |
|||
# 1.1.2) Otherwise, look through to see what revision corresponds with the release: |
|||
svn log https://svn.code.sf.net/p/apertium/svn/ |
* <code><nowiki>svn log -q -l1 https://svn.code.sf.net/p/apertium/svn/tags/apertium/release-3.4.2/</nowiki></code> yields r68453 |
||
Otherwise, look through to see what revision corresponds with the release: |
|||
# 1.2) For the found revision, make sure the version in configure.ac (or similar) is correct: |
|||
* <code><nowiki>svn log https://svn.code.sf.net/p/apertium/svn/trunk/apertium/ | less</nowiki></code> |
|||
For the found revision, make sure the version in configure.ac (or similar) is correct: |
|||
* <code><nowiki>svn cat -r68453 https://svn.code.sf.net/p/apertium/svn/trunk/apertium/configure.ac | less</nowiki></code> |
|||
apertium (3.4.2~r68453-1) unstable; urgency=low |
|||
Update debian/changelog with the found version and revision and sign+stamp it, e.g.: |
|||
<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> |
||
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: */ |
|||
Commit control files |
|||
=== Make and Sign Tarball === |
|||
# 2) Generate the signed Debian source package, from the revision above. |
|||
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 |
* <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> |
||
=== 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 |
<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> |
||
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 |
||
</pre> |
</pre> |
||
= |
== Raw Rundown == |
||
Example of flow of releasing apertium-cat 2.3.1, apertium-srd 1.2.0, and apertium-cat-srd 1.0.0: |
|||
<pre># date -u |
|||
Sat, Oct 28, 2017 10:45:36 |
|||
... check out the packages: |
|||
# cd /tmp |
|||
# svn co https://svn.code.sf.net/p/apertium/svn/languages/apertium-cat |
|||
# svn co https://svn.code.sf.net/p/apertium/svn/languages/apertium-srd |
|||
# svn co https://svn.code.sf.net/p/apertium/svn/trunk/apertium-cat-srd |
|||
... for each package, check that the versions are synced and later than previous release: |
|||
# cd /tmp/apertium-cat |
|||
# svn log -v | less |
|||
# mcedit Makefile.am |
|||
# mcedit configure.ac |
|||
# cd /tmp/apertium-srd |
|||
# svn log -v | less |
|||
# mcedit Makefile.am |
|||
# mcedit configure.ac |
|||
# cd /tmp/apertium-cat-srd |
|||
# svn log -v | less |
|||
# mcedit Makefile.am |
|||
# mcedit configure.ac |
|||
# cd /tmp |
|||
# svn ci -m "Versions" apertium-cat apertium-srd apertium-cat-srd |
|||
... check that each package can be built and make a usable tarball: |
|||
# cd /tmp/apertium-cat |
|||
# autoreconf -fvi |
|||
# ./configure |
|||
# make -j4 |
|||
# make dist |
|||
# tar -zxvf apertium-cat-2.3.1.tar.gz |
|||
# cd apertium-cat-2.3.1 |
|||
# ./configure |
|||
# make -j4 |
|||
# cd /tmp/apertium-srd |
|||
# autoreconf -fvi |
|||
# ./configure |
|||
# make -j4 |
|||
# make dist |
|||
# tar -zxvf apertium-srd-1.2.0.tar.gz |
|||
# cd apertium-srd-1.2.0 |
|||
# ./configure |
|||
# make -j4 |
|||
# cd /tmp/apertium-cat-srd |
|||
# autoreconf -fvi |
|||
# ./configure --with-lang1=/tmp/apertium-cat/apertium-cat-2.3.1/ --with-lang2=/tmp/apertium-srd/apertium-srd-1.2.0/ |
|||
# make -j4 |
|||
# make dist |
|||
# tar -zxvf apertium-cat-srd-1.0.0.tar.gz |
|||
# cd apertium-cat-srd-1.0.0/ |
|||
# ./configure --with-lang1=/tmp/apertium-cat/apertium-cat-2.3.1/ --with-lang2=/tmp/apertium-srd/apertium-srd-1.2.0/ |
|||
# make -j4 |
|||
... check that the translations don't crash: |
|||
# echo "Hello world" | apertium -d . cat-srd |
|||
# echo "Hello world" | apertium -d . srd-cat |
|||
... update Debian Science repos and ensure control files are synced back to our svn: |
|||
# cd ~/debian/apertium-cat |
|||
# gbp pull && git pull --all |
|||
# cd ~/debian/apertium-srd |
|||
# gbp pull && git pull --all |
|||
# cd ~/debian/apertium-cat-srd/ |
|||
# gbp pull && git pull --all |
|||
... update control files with new releases and version dependencies: |
|||
# cd /misc/branches/packaging |
|||
# mcedit languages/apertium-cat/changelog |
|||
# mcedit languages/apertium-srd/changelog |
|||
# mcedit trunk/apertium-cat-srd/changelog |
|||
# mcedit trunk/apertium-cat-srd/control |
|||
# ./rebuild-old.pl -r apertium-cat |
|||
# ./rebuild-old.pl -r apertium-srd |
|||
# ./rebuild-old.pl -r apertium-cat-srd |
|||
# svn ci -m "Release cat, srd, cat-srd" |
|||
... for each package, make a signed Debian source package, import it to git, |
|||
... check that nothing odd was changed in the control files, then push it back to Debian: |
|||
# cd /misc/branches/packaging |
|||
# ./single-dpkg.pl languages/apertium-cat --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82994 |
|||
# cd ~/debian/apertium-cat |
|||
# gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc |
|||
# git diff origin/master debian |
|||
# git push --all && git push --tags |
|||
# cd /misc/branches/packaging |
|||
# ./single-dpkg.pl languages/apertium-srd --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82994 |
|||
# cd ~/debian/apertium-srd |
|||
# gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc |
|||
# git diff origin/master debian |
|||
# git push --all && git push --tags |
|||
# cd /misc/branches/packaging |
|||
# ./single-dpkg.pl trunk/apertium-cat-srd --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82995 |
|||
# cd ~/debian/apertium-cat-srd |
|||
# gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc |
|||
# git diff origin/master debian |
|||
# git push --all && git push --tags |
|||
... as a fresh login as the apertium user (so that systemd will work), |
|||
... update APy installation and restart service: |
|||
$ cd tarballs |
|||
$ cp -av /tmp/apertium-*/*.tar.gz ./ |
|||
$ ./install-tarball.sh apertium-cat-2.3.1.tar.gz |
|||
$ ./install-tarball.sh apertium-srd-1.2.0.tar.gz |
|||
$ ./install-tarball.sh apertium-cat-srd-1.0.0.tar.gz |
|||
$ systemctl --user restart apy |
|||
... upload .tar.gz files to https://sourceforge.net/projects/apertium/files/ |
|||
# date -u |
|||
Sat Oct 28 11:25:16 UTC 2017 |
|||
... finally, send release report to apertium-stuff |
|||
</pre> |
|||
== People, Logs/Lists == |
|||
* [[User:Tino_Didriksen|Tino Didriksen]] is the primary person to ask |
* [[User:Tino_Didriksen|Tino Didriksen]] is the primary person to ask |
||
* Github mirror: https://github.com/TinoDidriksen/apertium-packaging |
* Github mirror: https://github.com/TinoDidriksen/apertium-packaging |
||
* Nightly build results: https://lists.sourceforge.net/lists/listinfo/apertium-packaging ([https://sourceforge.net/p/apertium/mailman/apertium-packaging/ archives]) |
* Nightly build results: https://apertium.projectjj.com/apt/logs/ https://lists.sourceforge.net/lists/listinfo/apertium-packaging ([https://sourceforge.net/p/apertium/mailman/apertium-packaging/ archives]) |
Latest revision as of 19:51, 26 April 2018
This page is out of date as a result of the migration to GitHub. Please update this page with new documentation and remove this warning. If you are unsure how to proceed, please contact the GitHub migration team.
Contents
New Language or Pair Package[edit]
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[edit]
cd packaging
Prerequisites[edit]
- A 4096 bit GnuPG key published to the various keyservers
- An Alioth login
- Access to the Debian Science team
Control Files in Subversion[edit]
Ensure control files correct, especially debian/copyright
and debian/changelog
. You will probably have to merge in the Debian git's control files as minor changes happen there. 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[edit]
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[edit]
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
Raw Rundown[edit]
Example of flow of releasing apertium-cat 2.3.1, apertium-srd 1.2.0, and apertium-cat-srd 1.0.0:
# date -u Sat, Oct 28, 2017 10:45:36 ... check out the packages: # cd /tmp # svn co https://svn.code.sf.net/p/apertium/svn/languages/apertium-cat # svn co https://svn.code.sf.net/p/apertium/svn/languages/apertium-srd # svn co https://svn.code.sf.net/p/apertium/svn/trunk/apertium-cat-srd ... for each package, check that the versions are synced and later than previous release: # cd /tmp/apertium-cat # svn log -v | less # mcedit Makefile.am # mcedit configure.ac # cd /tmp/apertium-srd # svn log -v | less # mcedit Makefile.am # mcedit configure.ac # cd /tmp/apertium-cat-srd # svn log -v | less # mcedit Makefile.am # mcedit configure.ac # cd /tmp # svn ci -m "Versions" apertium-cat apertium-srd apertium-cat-srd ... check that each package can be built and make a usable tarball: # cd /tmp/apertium-cat # autoreconf -fvi # ./configure # make -j4 # make dist # tar -zxvf apertium-cat-2.3.1.tar.gz # cd apertium-cat-2.3.1 # ./configure # make -j4 # cd /tmp/apertium-srd # autoreconf -fvi # ./configure # make -j4 # make dist # tar -zxvf apertium-srd-1.2.0.tar.gz # cd apertium-srd-1.2.0 # ./configure # make -j4 # cd /tmp/apertium-cat-srd # autoreconf -fvi # ./configure --with-lang1=/tmp/apertium-cat/apertium-cat-2.3.1/ --with-lang2=/tmp/apertium-srd/apertium-srd-1.2.0/ # make -j4 # make dist # tar -zxvf apertium-cat-srd-1.0.0.tar.gz # cd apertium-cat-srd-1.0.0/ # ./configure --with-lang1=/tmp/apertium-cat/apertium-cat-2.3.1/ --with-lang2=/tmp/apertium-srd/apertium-srd-1.2.0/ # make -j4 ... check that the translations don't crash: # echo "Hello world" | apertium -d . cat-srd # echo "Hello world" | apertium -d . srd-cat ... update Debian Science repos and ensure control files are synced back to our svn: # cd ~/debian/apertium-cat # gbp pull && git pull --all # cd ~/debian/apertium-srd # gbp pull && git pull --all # cd ~/debian/apertium-cat-srd/ # gbp pull && git pull --all ... update control files with new releases and version dependencies: # cd /misc/branches/packaging # mcedit languages/apertium-cat/changelog # mcedit languages/apertium-srd/changelog # mcedit trunk/apertium-cat-srd/changelog # mcedit trunk/apertium-cat-srd/control # ./rebuild-old.pl -r apertium-cat # ./rebuild-old.pl -r apertium-srd # ./rebuild-old.pl -r apertium-cat-srd # svn ci -m "Release cat, srd, cat-srd" ... for each package, make a signed Debian source package, import it to git, ... check that nothing odd was changed in the control files, then push it back to Debian: # cd /misc/branches/packaging # ./single-dpkg.pl languages/apertium-cat --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82994 # cd ~/debian/apertium-cat # gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc # git diff origin/master debian # git push --all && git push --tags # cd /misc/branches/packaging # ./single-dpkg.pl languages/apertium-srd --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82994 # cd ~/debian/apertium-srd # gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc # git diff origin/master debian # git push --all && git push --tags # cd /misc/branches/packaging # ./single-dpkg.pl trunk/apertium-cat-srd --auto 0 -m 'Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>' --rev 82995 # cd ~/debian/apertium-cat-srd # gbp import-dsc --pristine-tar --sign-tags /tmp/autopkg.*/*.dsc # git diff origin/master debian # git push --all && git push --tags ... as a fresh login as the apertium user (so that systemd will work), ... update APy installation and restart service: $ cd tarballs $ cp -av /tmp/apertium-*/*.tar.gz ./ $ ./install-tarball.sh apertium-cat-2.3.1.tar.gz $ ./install-tarball.sh apertium-srd-1.2.0.tar.gz $ ./install-tarball.sh apertium-cat-srd-1.0.0.tar.gz $ systemctl --user restart apy ... upload .tar.gz files to https://sourceforge.net/projects/apertium/files/ # date -u Sat Oct 28 11:25:16 UTC 2017 ... finally, send release report to apertium-stuff
People, Logs/Lists[edit]
- Tino Didriksen is the primary person to ask
- Github mirror: https://github.com/TinoDidriksen/apertium-packaging
- Nightly build results: https://apertium.projectjj.com/apt/logs/ https://lists.sourceforge.net/lists/listinfo/apertium-packaging (archives)