diff --git a/.rumdl.toml b/.rumdl.toml index 2147237..1627688 100644 --- a/.rumdl.toml +++ b/.rumdl.toml @@ -7,6 +7,13 @@ disable = [ "MD076", # Blank line between list items — false-positives inside mixed-indent MyST :::{card} ] -# content/ is MyST (directives, roles); slides/ are Marp (standard Markdown + HTML). +# Marp treats `---` as a slide separator, so each deck is many "documents" glued +# together: repeated/level-jumping per-slide `#` headings, background images with no +# alt text, mixed list markers. Those clash with MD001/MD004/MD024/MD025/MD045, and +# `rumdl fmt` rewrites them (e.g. demoting `#` to `##`) regardless of per-file-ignores, +# which changes how slides render. Exclude the decks entirely instead. +exclude = ["slides"] + +# content/ is MyST (directives, roles). [per-file-flavor] "content/**/*.md" = "myst" diff --git a/content/other-tools/04_distros-debian_control_file.png b/content/other-tools/04_distros-debian_control_file.png new file mode 100644 index 0000000..4500a44 Binary files /dev/null and b/content/other-tools/04_distros-debian_control_file.png differ diff --git a/content/other-tools/04_distros-debian_files.png b/content/other-tools/04_distros-debian_files.png new file mode 100644 index 0000000..65a6b98 Binary files /dev/null and b/content/other-tools/04_distros-debian_files.png differ diff --git a/content/other-tools/04_distros-packit_example.png b/content/other-tools/04_distros-packit_example.png new file mode 100644 index 0000000..d78c2ea Binary files /dev/null and b/content/other-tools/04_distros-packit_example.png differ diff --git a/content/other-tools/04_distros-shipping.jpg b/content/other-tools/04_distros-shipping.jpg new file mode 100644 index 0000000..2e19997 Binary files /dev/null and b/content/other-tools/04_distros-shipping.jpg differ diff --git a/content/other-tools/04_distros.md b/content/other-tools/04_distros.md index 8e1cccb..5716925 100644 --- a/content/other-tools/04_distros.md +++ b/content/other-tools/04_distros.md @@ -1 +1,109 @@ +--- +authors: [Cristian Le] +--- + # Shipping to distros + +{button}`Slides ` + +Is packaging to distros still valuable these days? +Yes, both to the ecosystem in general and your own project.[^1] + +[^1]: + +## Why get involved? + +- You find what is currently used across the ecosystem +- You get reverse-dependency tests +- You get notified early of dependencies breakage +- You get help from the packagers + +## Participating as upstream + +You do not have to be a packager to help with distro packaging. +Just running the downstream package build in upstream is a huge step towards it. +If your project is not yet packaged, that's fine, you can do it yourself. + +The only files you need to manage is a `.spec` file and enable `packit` configuration[^2]. +The spec file can be quite minimal and low/no maintenance: + +```rpmspec +Name: foo +Version: 0.0.0 +Release: %autorelease +Summary: Example package +License: Unlicense +URL: https://example.com +Source: %{pypi_source foo} +BuildRequires: python3-devel + +%description +Lorem ipsum + +%prep +%autosetup -n foo-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files foo + +%check +%pytest + +%files -f %{pyproject_files} +%license LICENSE +%doc README.md + +%changelog +%autochangelog +``` + +Packit is a service available as a GitHub app and GitLab, but can be extended upon request. +There are some [onboarding steps] to follow, after which you get distro builds in upstream project. + +```{image} 04_distros-packit_example.png +:alt: Packit jobs run in upstream +``` + +[onboarding steps]: https://packit.dev/docs/guide +[^2]: You can handle the building yourself, but why would you? +There are a bunch of edge-case issues you should not be subjected to. + +## Shipping to distros + +```{image} 04_distros-shipping.jpg +:alt: Packaging is dangerous business +``` + +Doing the whole packaging process is a daunting process. +It is best to contact your local neighborhood distro packager. +You can find some in [#scitech] or [#python] channels in Fedora matrix who also share your interest. +[#devel] channel is where you find everyone else if you're feeling social. + +If you want to do it all yourself, drop a line in [#join] or [#devel] and there will be people guiding you. +Note being a packager is as much a social problem as it is a technical one. + +[#scitech]: https://matrix.to/#/#scitech:fedoraproject.org +[#python]: https://matrix.to/#/#python:fedoraproject.org +[#devel]: https://matrix.to/#/#devel:fedoraproject.org +[#join]: https://matrix.to/#/#join:fedoraproject.org + +## What about non-Fedora? + +Unfortunately equivalent CI tools do not seem to be available for other distros. + +```{image} 04_distros-debian_files.png +:alt: Lots more files to manage +``` + +```{image} 04_distros-debian_control_file.png +:alt: Looks like a lot to maintain +``` + +But still the same advice applies, get in touch with a local packager and express your interest. diff --git a/slides/5_04_distros.md b/slides/5_04_distros.md new file mode 100644 index 0000000..8079ed7 --- /dev/null +++ b/slides/5_04_distros.md @@ -0,0 +1,174 @@ +--- +marp: true +theme: simplepy +paginate: true +_paginate: skip +--- + +# SIMPLE-Py + +## Shipping to distros + +--- + +## Is it still valuable? + +- What about `conda`, `spack`, etc.? + * Does not have extensive testing, vulnerability tracking, etc. +- Are traditional packaging dying? + * Not for non-gui apps/libraries + * Still valuable even if you have a flatpak app +- Isn't it a big commitment? + * Not for you, that's the packager's job + * Your only job is be open and communicate + +--- + +## How to get involved + +- Run downstream builds/CI in upstream +- Collaborate with a packager + +--- + +# Downstream builds in upstream + +All you need is +- `.spec` file: how to build the package +- `packit` app: does the build shows the result + +--- + +# Downstream builds in upstream + +
+
+ +## Spec file metadata +- Mostly boilerplate +- `python3-devel` dependency is enough +- That is it, no maintenance needed + +
+
+ +```rpmspec +Name: foo +Version: 0.0.0 +Release: %autorelease +Summary: Example package +License: Unlicense +URL: https://example.com +Source: %{pypi_source foo} +BuildRequires: python3-devel + +%description +Lorem ipsum +``` + +
+
+ +--- + +# Downstream builds in upstream + +
+
+ +## Build instructions +- Luckily it's a python project +- You can add any bash commands +- But check with packager if there are not simpler methods + +
+
+ +```rpmspec +%prep +%autosetup -n foo-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files foo + +%check +%pytest +``` + +
+
+ +--- + +# Downstream builds in upstream + +
+
+ +## The rest +- What files you package and where +- `%{pyproject_files}` contains all python files +- `%changelog` don't worry about it + +
+
+ +```rpmspec +%files -f %{pyproject_files} +%license LICENSE +%doc README.md + +%changelog +%autochangelog +``` + +
+
+ +--- + +# Shipping to distros + +![](../content/other-tools/04_distros-shipping.jpg) + +--- + +# Shipping to distros + +## Find your local neighborhood packager + +- #scitech:fedoraproject.org + - (Former?) Scientists involved in distro packaging +- #python:fedoraproject.org + - Python distro packagers hangout +- #devel:fedoraproject.org + - Distro packager's water-cooler +- #join:fedoraproject.org + - Want to become a packager? + +--- + +# What about non-Fedora? + +![](../content/other-tools/04_distros-debian_files.png) + +--- + +# What about non-Fedora? + +![](../content/other-tools/04_distros-debian_control_file.png) + +--- + +# What about non-Fedora? + +## Find your local neighborhood packager + +- Where? TBD :)