package software for any distribution with upt
play

Package software for any distribution with upt Cyril Roelandt - PowerPoint PPT Presentation

Package software for any distribution with upt Cyril Roelandt Package software for any distribution with upt 1/28 Introduction Cyril Roelandt OpenStack (Red Hat) GNU Guix (Do not miss Ludovics talk at 4:30PM!) Package software for any


  1. Package software for any distribution with upt Cyril Roelandt Package software for any distribution with upt 1/28

  2. Introduction Cyril Roelandt OpenStack (Red Hat) GNU Guix (Do not miss Ludovic’s talk at 4:30PM!) Package software for any distribution with upt 2/28

  3. Outline Packaging 1 Automation 2 The Universal Packaging Tool 3 fpm 4 Conclusion 5 Package software for any distribution with upt 3/28

  4. Outline Packaging 1 Automation 2 The Universal Packaging Tool 3 fpm 4 Conclusion 5 Package software for any distribution with upt 4/28

  5. What is packaging? Turn an “upstream” package into a “downstream” package Package software for any distribution with upt 5/28

  6. What is packaging? Turn an “upstream” package into a “downstream” package Debugging Package software for any distribution with upt 5/28

  7. What is packaging? Turn an “upstream” package into a “downstream” package Debugging Send/maintain patches Package software for any distribution with upt 5/28

  8. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Package software for any distribution with upt 6/28

  9. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Package software for any distribution with upt 6/28

  10. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Package software for any distribution with upt 6/28

  11. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Dependency hell Package software for any distribution with upt 6/28

  12. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Dependency hell Debugging Package software for any distribution with upt 6/28

  13. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Dependency hell Debugging Some tasks can be automated: Package software for any distribution with upt 6/28

  14. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Dependency hell Debugging Some tasks can be automated: Package layout Package software for any distribution with upt 6/28

  15. Is packaging hard? Many sources (PyPI, RubyGems. . . ) Many targets (Debian, Fedora, Guix. . . ) Cannot be fully automated: Dependency hell Debugging Some tasks can be automated: Package layout Metadata Package software for any distribution with upt 6/28

  16. Outline Packaging 1 Automation 2 The Universal Packaging Tool 3 fpm 4 Conclusion 5 Package software for any distribution with upt 7/28

  17. Existing tools Debian Fedora Guix FreeBSD OpenBSD CPAN dh-make-perl cpan2rpm guix import ? PortGen NPM npm2deb npm2rpm N/A ? ? PyPI pypi2deb pyp2rpm guix import pytoport PortGen Ruby gem2deb gem2rpm guix import ? PortGen Package software for any distribution with upt 8/28

  18. Issues One CLI per tool Package software for any distribution with upt 9/28

  19. Issues One CLI per tool Different behaviours Package software for any distribution with upt 9/28

  20. Issues One CLI per tool Different behaviours Code duplication (read upstream archive) Package software for any distribution with upt 9/28

  21. Issues One CLI per tool Different behaviours Code duplication (read upstream archive) Code duplication (write downstream package) Package software for any distribution with upt 9/28

  22. Example: licenses (PyPI) SPDX identifiers? Package software for any distribution with upt 10/28

  23. Example: licenses (PyPI) SPDX identifiers? Classifiers: Package software for any distribution with upt 10/28

  24. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License Package software for any distribution with upt 10/28

  25. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License BSD2 or BSD3 or . . . ? Package software for any distribution with upt 10/28

  26. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License BSD2 or BSD3 or . . . ? https://github.com/pypa/warehouse/issues/2996 Package software for any distribution with upt 10/28

  27. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License BSD2 or BSD3 or . . . ? https://github.com/pypa/warehouse/issues/2996 “license” field (setup.{cfg,py}) Package software for any distribution with upt 10/28

  28. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License BSD2 or BSD3 or . . . ? https://github.com/pypa/warehouse/issues/2996 “license” field (setup.{cfg,py}) For values not available in the standard classifiers Package software for any distribution with upt 10/28

  29. Example: licenses (PyPI) SPDX identifiers? Classifiers: License :: OSI Approved :: BSD License BSD2 or BSD3 or . . . ? https://github.com/pypa/warehouse/issues/2996 “license” field (setup.{cfg,py}) For values not available in the standard classifiers ‘BSD2’, ‘BSD 2’, ‘BSD-2’, ‘BSD 2 Clause’. . . Package software for any distribution with upt 10/28

  30. Example: dependencies (PyPI) pipenv $ curl -s https://pypi.org/pypi/pipenv/json \ | jq .info.requires_dist [ "ordereddict; python_version < \"2.7\"", "requests[security]; python_version < \"2.7\"", "virtualenv", "virtualenv-clone (>=0.2.5)", "setuptools (>=36.2.1)", "certifi", "pip (>=9.0.1)" ] Package software for any distribution with upt 11/28

  31. Example: dependencies (PyPI) botocore $ curl -s https://pypi.org/pypi/botocore/json \ | jq .info.requires_dist null Package software for any distribution with upt 12/28

  32. Example: dependencies (PyPI) botocore $ curl -s https://pypi.org/pypi/botocore/json \ | jq .info.requires_dist null $ wget https://.../botocore-1.12.16-py2.py3-none-any.whl $ unzip botocore-1.12.16-py2.py3-none-any.whl $ cd botocore-1.12.16.dist-info/ $ jq .run_requires metadata.json [ { "requires": [ "jmespath>=0.7.1,<1.0.0", "docutils>=0.10", "urllib3>=1.20,<1.24" ] }, ... Package software for any distribution with upt 12/28 ]

  33. Example: dependencies (PyPI) MarkupSafe $ curl -s https://pypi.org/pypi/MarkupSafe/json \ | jq .info.requires_dist null Package software for any distribution with upt 13/28

  34. Example: dependencies (PyPI) MarkupSafe $ curl -s https://pypi.org/pypi/MarkupSafe/json \ | jq .info.requires_dist null $ pip download --only-binary :all: MarkupSafe Collecting MarkupSafe Could not find a version that satisfies the \ requirement MarkupSafe (from versions: ) No matching distribution found for MarkupSafe Package software for any distribution with upt 13/28

  35. Example: dependencies (PyPI) MarkupSafe $ curl -s https://pypi.org/pypi/MarkupSafe/json \ | jq .info.requires_dist null $ pip download --only-binary :all: MarkupSafe Collecting MarkupSafe Could not find a version that satisfies the \ requirement MarkupSafe (from versions: ) No matching distribution found for MarkupSafe $ cat setup.py ... extras_require= { 'dev': ... 'docs': ... } Package software for any distribution with upt 13/28

  36. Example: dependencies (PyPI) Read the JSON file provided by PyPI Read the wheel Read the source code Install the package, run “pip list” What about test dependencies? There might be even more ideas! Package software for any distribution with upt 14/28

  37. What we really need Unified CLI Package software for any distribution with upt 15/28

  38. What we really need Unified CLI Unified behaviour Package software for any distribution with upt 15/28

  39. What we really need Unified CLI Unified behaviour Modular Package software for any distribution with upt 15/28

  40. What we really need Unified CLI Unified behaviour Modular Simple Package software for any distribution with upt 15/28

  41. Outline Packaging 1 Automation 2 The Universal Packaging Tool 3 fpm 4 Conclusion 5 Package software for any distribution with upt 16/28

  42. Architecture Upstream | upt | upt | upt | Downstream Repos | Frontends | | Backends | Packages ----------------------------------------------------------------------- +------+ | +----------+ | +-----+ | +-------------+ | +----------+ | | | | | | | | | | | | | | | PyPI |-|->| upt-pypi |-|->| |-|->| upt-guix |-|->| Guix pkg | | | | | | | | | | | | | | | +------+ | +----------+ | | | | +-------------+ | +----------+ | | | upt | | | +------+ | +----------+ | | | | +-------------+ | +----------+ | | | | | | | | | | | | | | | CPAN |-|->| upt-cpan |-|->| |-|->| upt-openbsd |-|->| Makefile | | | | | | | | | | | | | | | +------+ | +----------+ | +-----+ | +-------------+ | +----------+ | | | | Package software for any distribution with upt 17/28

  43. Usage Install (with modules) $ pip install upt[frontends,backends] Package software for any distribution with upt 18/28

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend