diff options
Diffstat (limited to 'docs/packaging/custom')
-rw-r--r-- | docs/packaging/custom/leap.md | 147 | ||||
-rw-r--r-- | docs/packaging/custom/python.md | 52 | ||||
-rw-r--r-- | docs/packaging/custom/ruby.md | 4 |
3 files changed, 203 insertions, 0 deletions
diff --git a/docs/packaging/custom/leap.md b/docs/packaging/custom/leap.md new file mode 100644 index 0000000..cd657c9 --- /dev/null +++ b/docs/packaging/custom/leap.md @@ -0,0 +1,147 @@ +# Example: packaging leap_cli and dependencies + +Upstream: https://leap.se/code/issues/6503 + +## Determine dependencies + +First, in a *fresh* vagrant box with *sid* and *testing* in the `sources.list`: + + sudo apt-get install rubygems gem2deb + sudo gem install leap_cli + +Then we get the dependencies and build all packages: + + dependencies=" `gem list | cut -d '(' -f 1` " + +Which currently gives us the following result: + +* activemodel +* activesupport +* base32 +* blockenspiel +* builder +* capistrano +* colored +* command_line_reporter +* gli +* gpgme +* highline +* i18n +* json +* json_pure +* leap_cli +* mini_portile +* minitest +* net-scp +* net-sftp +* net-ssh +* net-ssh-gateway +* paint +* tee +* thread_safe +* tzinfo +* versionomy +* ya2yaml + +Gem cleanup: + + sudo gem uninstall $dependencies + +Check existing dependencies: + + for item in $dependencies; do + package=ruby-"`echo $item | sed -e 's/_/-/'`" + packages="$packages $package" + done + + apt-get install --dry-run $packages + +Then: + +* Check for non-existing packages. +* Try different package names. +* Update your list of existing `$packages`. + +In this example we have the following `$already_ported` dependencies: + +* capistrano +* ruby-activemodel +* ruby-activesupport +* ruby-blockenspiel +* ruby-builder +* ruby-colored +* ruby-gpgme +* ruby-highline +* ruby-i18n +* ruby-json +* ruby-minitest +* ruby-net-scp +* ruby-net-sftp +* ruby-net-ssh +* ruby-net-ssh-gateway +* ruby-paint +* ruby-thread-safe +* ruby-tzinfo +* ruby-versionomy + +That means the following `$gems` needs to be packaged: + +* base32 +* command_line_reporter +* gli +* json_pure (we can just use ruby-json and ignore this dependency) +* leap_cli +* mini_portile +* tee +* ya2yaml + +In summary, we need to port the following `$new_packages`: + +* ruby-base32 +* ruby-command-line-reporter +* ruby-gli +* ruby-mini-portile +* ruby-tee +* ruby-ya2yaml +* ruby-leap-cli + +## Build remaining packages + + for gem in $gems; do + gem2deb $gem + done + +## Getting the source for the existing packages + + for package in $already_ported; do + apt-get -t jessie source --download-only $package + dpkg-source -x $package*dsc + done + +## Next steps + +* Fix `debian/control` and other `FIXME` on each package. +* Put `debian/` folder in a `debian` branch on each source. +* Fix [tests](https://wiki.debian.org/Teams/Ruby/Packaging/Tests). +* [Other best practices](https://wiki.debian.org/Teams/Ruby/RubyExtras/UpstreamDevelopers). +* [Review the code](https://manual.sarava.org/specs/code/). +* Automate building with pbuilder for `sid`. +* Fix lintian warnings. +* Upstream pull requests. +* Backport everything to `wheezy`. + +## Per-package tasks + +* ruby-faker: + * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765124 + * https://github.com/rails/rails/issues/13164 +* ruby-leap-cli: + * net-ssh compatibility: + * https://github.com/net-ssh/net-ssh/issues/145 + * https://github.com/capistrano/capistrano/issues/927 + * workflow: + + git checkout develop + git archive --prefix=leap-cli-1.5.6/ --format=tar HEAD | bzip2 > ../tarballs/leap-cli-1.5.6.tar.bz2 + git checkout debian + git-buildpackage --git-ignore-branch diff --git a/docs/packaging/custom/python.md b/docs/packaging/custom/python.md new file mode 100644 index 0000000..85dd263 --- /dev/null +++ b/docs/packaging/custom/python.md @@ -0,0 +1,52 @@ +# Python packaging + +## Old procedure + +Example: using [stdeb](http://github.com/astraw/stdeb) to build [http://kedpm.sf.net]. + + sudo apt-get install stdeb fakeroot + sudo apt-get install python-crypto libglade2-0 python-gtk2 python-glade2 + +File `~/.pydistutils.cfg`: + + [sdist_dsc] + force-buildsystem: False + +File `kedpm.cfg`: + + [DEFAULT] + Package: kedpm + Maintainer: User Name <user@example.org> + Depends: python-crypto + +Getting the code: + + wget http://downloads.sourceforge.net/project/kedpm/kedpm/0.4.0/kedpm-0.4.0.tar.gz + +Packaging: + + py2dsc --extra-cfg-file kedpm.cfg kedpm-0.4.0.tar.gz + cd deb_dist/kedpm-0.4.0 + dpkg-buildpackage -rfakeroot -uc -us + cd .. + sudo dpkg -i kedpm_0.4.0-1_all.deb + +## References + +* [Python/Pybuild - Debian Wiki](https://wiki.debian.org/Python/Pybuild "Python/Pybuild - Debian Wiki") + * [Packaging Python Applications for Debian | Snakes on Callisto](https://jhermann.github.io/blog/python/devops/2020/03/28/dh_virtualenv_howto.html "Packaging Python Applications for Debian | Snakes on Callisto") + * [Debian -- Details of package python3-stdeb in bullseye](https://packages.debian.org/bullseye/python3-stdeb "Debian -- Details of package python3-stdeb in bullseye") + * [Creating configuration files in /etc in Debian packages - pi3g.com](https://pi3g.com/2020/04/05/creating-configuration-files-in-etc-in-debian-packages/ "Creating configuration files in /etc in Debian packages - pi3g.com") + * [PbuilderHowto - Ubuntu Wiki](https://wiki.ubuntu.com/PbuilderHowto "PbuilderHowto - Ubuntu Wiki") + * [PyBuilder — Tutorial](https://pybuilder.io/documentation/tutorial "PyBuilder — Tutorial") + * [Distributing Python Modules (Legacy version) — Python 3.10.4 documentation](https://docs.python.org/3/distutils/index.html "Distributing Python Modules (Legacy version) — Python 3.10.4 documentation") + * [Distributing Python Modules — Python 3.10.4 documentation](https://docs.python.org/3/distributing/index.html#distributing-index "Distributing Python Modules — Python 3.10.4 documentation") + * [What’s New In Python 3.10 — Python 3.10.4 documentation](https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated "What’s New In Python 3.10 — Python 3.10.4 documentation") + * [PEP 632 – Deprecate distutils module | peps.python.org](https://peps.python.org/pep-0632/ "PEP 632 – Deprecate distutils module | peps.python.org") + * [python - setup.py build doesn't work but develop does - Stack Overflow](https://stackoverflow.com/questions/38729475/setup-py-build-doesnt-work-but-develop-does "python - setup.py build doesn't work but develop does - Stack Overflow") + * [pybuild(1) — dh-python — Debian testing — Debian Manpages](https://manpages.debian.org/testing/dh-python/pybuild.1.en.html "pybuild(1) — dh-python — Debian testing — Debian Manpages") + * [Debian -- Details of package dh-python in bullseye-backports](https://packages.debian.org/bullseye-backports/dh-python "Debian -- Details of package dh-python in bullseye-backports") + * [#1001459 - dh-python: SetuptoolsDeprecationWarning: setup.py install is deprecated - Debian Bug report logs](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001459 "#1001459 - dh-python: SetuptoolsDeprecationWarning: setup.py install is deprecated - Debian Bug report logs") + * [Bugs in package dh-python (version 5.20220403) in unstable -- Debian Bug report logs](https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=dh-python;dist=unstable "Bugs in package dh-python (version 5.20220403) in unstable -- Debian Bug report logs") + * [Debian Python Policy — Debian Python Documentation Project 1.0 documentation](https://debian-python.readthedocs.io/en/latest/debian-policy.html "Debian Python Policy — Debian Python Documentation Project 1.0 documentation") + * [dh-python/plugin_distutils.py at master · p1otr/dh-python](https://github.com/p1otr/dh-python/blob/master/dhpython/build/plugin_distutils.py "dh-python/plugin_distutils.py at master · p1otr/dh-python") diff --git a/docs/packaging/custom/ruby.md b/docs/packaging/custom/ruby.md new file mode 100644 index 0000000..be79085 --- /dev/null +++ b/docs/packaging/custom/ruby.md @@ -0,0 +1,4 @@ +# Ruby packaging + +* See [this](https://wiki.debian.org/Teams/Ruby/Packaging). +* Example: [LEAP](/leap). |