sp-variant updates in 2022
3.0.0 - 2022-11-09
Incompatible changes
All: Yum/DNF: when installing packages (both via the
package.installandpkgfile.installcommands), disable all the configured repositories, only enable some base system ones and the StorPool ones.Python: dropped Python 2.6 support, using
dictcomprehensions.Rust: all the functions now return our own error enum instead of
Box<dyn error::Error>.
Fixes
All:
Correctly treat Linux Mint 21.x as a Ubuntu 22.04 equivalent.
Making AlmaLinux the principal RPM-based distribution instead of CentOS.
Python: sp_build_repo: correctly using the name and slug fields when generating the repository definitions files.
Additions
All: added some initial support for AlmaLinux 9 and Rocky Linux 9.
Python:
sp_build_repo: allowed repository URLs to be overridden using a TOML configuration file; provided a sample asexamples/build-repo-overrides.toml.Rust:
Using a separate tool,
run-clippy.sh, to invokeclippy; removed the#![warn(...)]directives from the individual source files.Keeping the
Cargo.lockfile under version control.
Other changes
All:
Allowing repository definitions to be built using a different
storpool_variantinterpretation, mostly for testing the correctness of the Rust one.Use the simpler container names for AlmaLinux and Rocky Linux.
Python:
Using the
cfg-diag0.4Configclass API.Declared Python 3.10 and 3.11 as supported versions.
Dropped the Rust and POSIX shell implementations from the
sdisttarball.sp_variant: now thatsp_build_repoandtest_dockeruse theclicklibrary, dropped thebase_parser()method.sp_build_repo:Marked the
-roption as required, renamed its long form to--runtime.Overridden a “duplicate code” warning from
pylint.Using the
typedloadlibrary for validating and loading configuration data.Using the
clicklibrary for command-line argument parsing.Using f-strings.
Using the Text type instead of
str;long overdue.
test_docker:Installing the StorPool Python packages to make sure the repository is indeed accessible and configured correctly.
Only using
asyncio.run()for the parts that need to run asynchronously (e.g. not for command-line parsing or trivial queries).Using the
clicklibrary for command-line argument parsing.Running
docker swapfor the CentOS 8 container to switch to the CentOS Stream repositories; maybe we need to start using thequay.iocontainers instead.
Test suite:
Specified version constraints for the library dependencies.
Using
pytest.mark.parametrize()instead of theddtlibrary.Dropped the Python 2.x
mypyand theflake8` + ``hackingtest environments, they do not provide much value nowadays.Dropped the outdated
pytest.pyityping stub.Moved the configuration for the check tools out of the
tox.inifile, mostly intopyproject.toml, but stillsetup.cfgforflake8.
Rust:
Minor refactoring following some suggestions from
clippy.Overridden several
clippylints, mostly for good reasons.Using the
claplibrary for command-line parsing.Using the
thiserrorlibrary instead of thequick-errorone, it is cleaner.Using the
once_celllibrary instead of thelazy_staticone.Using the
anyhowlibrary instead ofexpect-exitin the command-line tool.
2.3.3 - 2022-04-28
All: making the quoting style in the Debian/Ubuntu pkgfile.dep_query command consistent with that of the others.
sh updates:
Fixed the quoting for the Debian/Ubuntu
pkgfile.dep_querycommand.Completed the exiting-on-errors fix: two missed invocations.
Minor changes to implement some shellcheck suggestions.
Added a shellcheck test unless
NO_SHELLCHECKis specified.
2.3.2 - 2022-04-27
sh: Fixed exiting on errors in some situations; local variable declarations and error-checked assignments do not mix.
2.3.1 - 2022-04-27
sh: Fixed matching the VERSION_ID variable in the /etc/os-release file: using a POSIX extended regular expression with grep -E, not a Perl-compatible one!
2.3.0 - 2022-04-26
Incompatible changes
Rust:
The structs and enums exported by the
sp_variantcrate are now marked as non-exhaustive.Some functions are now marked as “must use”.
Other changes
Python:
Now that there is a working POSIX shell implementation that is better suited for bootstrapping, splitting the Python library into several modules.
Always requiring the “typing” module to be installed.
Rust:
Imported struct names directory for a more idiomatic Rust style.
Many small improvements, mostly suggested by
Clippylints.
2.2.0 - 2022-02-05
Fixes
Python: fix two bugs in the list_all_packages() convenience function:
Do not modify the variant structure’s command list in place!
Correctly recognize installed packages on Debian/Ubuntu systems.
Other changes
All: recognizing Ubuntu 22.04 (Jammy Jellyfish).
Python:
Reformatting with 100 characters per line.
Making the
ArgumentParser-related type annotations a bit more precise to pass some checks in recent versions ofmypy.
Rust: changed the dependency on nix to a >= relation, hoping they do not break backwards compatibility.