/* * SPDX-FileCopyrightText: 2021 - 2024 StorPool * SPDX-License-Identifier: BSD-2-Clause */ //! Partially-generated data for handling build variants. //! //! The data is autogenerated from the supported StorPool build variants. use std::collections::HashMap; use std::str::FromStr; use enum_iterator::Sequence; use once_cell::sync::Lazy; use serde_derive::{Deserialize, Serialize}; use crate::{ Builder, DebRepo, Detect, Repo, Supported, Variant, VariantDefTop, VariantError, VariantFormat, VariantFormatVersion, YumRepo, }; /// The supported StorPool build variants (OS distribution, version, etc). #[derive(Debug, Clone, Copy, PartialEq, Hash, Eq, Serialize, Deserialize, Sequence)] #[non_exhaustive] pub enum VariantKind { /// AlmaLinux 8.x ALMA8, /// AlmaLinux 9.x ALMA9, /// CentOS 7.x CENTOS7, /// CentOS 8.x CENTOS8, /// CentOS Stream 9.x CENTOS9, /// Debian 10.x (buster) DEBIAN10, /// Debian 11.x (bullseye) DEBIAN11, /// Debian 12.x (bookworm) DEBIAN12, /// Debian 13.x (trixie/unstable) DEBIAN13, /// Oracle Linux 7.x ORACLE7, /// Oracle Linux 8.x ORACLE8, /// RedHat Enterprise Linux 8.x RHEL8, /// Rocky Linux 8.x ROCKY8, /// Rocky Linux 9.x ROCKY9, /// Ubuntu 18.04 LTS (Bionic Beaver) UBUNTU1804, /// Ubuntu 20.04 LTS (Focal Fossa) UBUNTU2004, /// Ubuntu 22.04 LTS (Jammy Jellyfish) UBUNTU2204, /// Ubuntu 24.04 LTS (Noble Numbat) UBUNTU2404, } impl VariantKind { const ALMA8_NAME: &'static str = "ALMA8"; const ALMA9_NAME: &'static str = "ALMA9"; const CENTOS7_NAME: &'static str = "CENTOS7"; const CENTOS8_NAME: &'static str = "CENTOS8"; const CENTOS9_NAME: &'static str = "CENTOS9"; const DEBIAN10_NAME: &'static str = "DEBIAN10"; const DEBIAN11_NAME: &'static str = "DEBIAN11"; const DEBIAN12_NAME: &'static str = "DEBIAN12"; const DEBIAN13_NAME: &'static str = "DEBIAN13"; const ORACLE7_NAME: &'static str = "ORACLE7"; const ORACLE8_NAME: &'static str = "ORACLE8"; const RHEL8_NAME: &'static str = "RHEL8"; const ROCKY8_NAME: &'static str = "ROCKY8"; const ROCKY9_NAME: &'static str = "ROCKY9"; const UBUNTU1804_NAME: &'static str = "UBUNTU1804"; const UBUNTU2004_NAME: &'static str = "UBUNTU2004"; const UBUNTU2204_NAME: &'static str = "UBUNTU2204"; const UBUNTU2404_NAME: &'static str = "UBUNTU2404"; } impl AsRef for VariantKind { #[inline] fn as_ref(&self) -> &str { match *self { Self::ALMA8 => Self::ALMA8_NAME, Self::ALMA9 => Self::ALMA9_NAME, Self::CENTOS7 => Self::CENTOS7_NAME, Self::CENTOS8 => Self::CENTOS8_NAME, Self::CENTOS9 => Self::CENTOS9_NAME, Self::DEBIAN10 => Self::DEBIAN10_NAME, Self::DEBIAN11 => Self::DEBIAN11_NAME, Self::DEBIAN12 => Self::DEBIAN12_NAME, Self::DEBIAN13 => Self::DEBIAN13_NAME, Self::ORACLE7 => Self::ORACLE7_NAME, Self::ORACLE8 => Self::ORACLE8_NAME, Self::RHEL8 => Self::RHEL8_NAME, Self::ROCKY8 => Self::ROCKY8_NAME, Self::ROCKY9 => Self::ROCKY9_NAME, Self::UBUNTU1804 => Self::UBUNTU1804_NAME, Self::UBUNTU2004 => Self::UBUNTU2004_NAME, Self::UBUNTU2204 => Self::UBUNTU2204_NAME, Self::UBUNTU2404 => Self::UBUNTU2404_NAME, } } } impl FromStr for VariantKind { type Err = VariantError; #[inline] fn from_str(value: &str) -> Result { match value { Self::ALMA8_NAME => Ok(Self::ALMA8), Self::ALMA9_NAME => Ok(Self::ALMA9), Self::CENTOS7_NAME => Ok(Self::CENTOS7), Self::CENTOS8_NAME => Ok(Self::CENTOS8), Self::CENTOS9_NAME => Ok(Self::CENTOS9), Self::DEBIAN10_NAME => Ok(Self::DEBIAN10), Self::DEBIAN11_NAME => Ok(Self::DEBIAN11), Self::DEBIAN12_NAME => Ok(Self::DEBIAN12), Self::DEBIAN13_NAME => Ok(Self::DEBIAN13), Self::ORACLE7_NAME => Ok(Self::ORACLE7), Self::ORACLE8_NAME => Ok(Self::ORACLE8), Self::RHEL8_NAME => Ok(Self::RHEL8), Self::ROCKY8_NAME => Ok(Self::ROCKY8), Self::ROCKY9_NAME => Ok(Self::ROCKY9), Self::UBUNTU1804_NAME => Ok(Self::UBUNTU1804), Self::UBUNTU2004_NAME => Ok(Self::UBUNTU2004), Self::UBUNTU2204_NAME => Ok(Self::UBUNTU2204), Self::UBUNTU2404_NAME => Ok(Self::UBUNTU2404), other => Err(VariantError::BadVariant(other.to_owned())), } } } /// Return the definition of the StorPool variants. #[allow(clippy::manual_string_new)] #[allow(clippy::panic)] #[allow(clippy::too_many_lines)] #[must_use] pub fn get_variants() -> &'static VariantDefTop { static DEF_TOP: Lazy = Lazy::new(|| { VariantDefTop { format: VariantFormat { version: VariantFormatVersion { major: 1, minor: 4, }, }, order: vec![ VariantKind::ROCKY8, VariantKind::ROCKY9, VariantKind::RHEL8, VariantKind::ORACLE8, VariantKind::ORACLE7, VariantKind::CENTOS7, VariantKind::CENTOS8, VariantKind::CENTOS9, VariantKind::ALMA8, VariantKind::ALMA9, VariantKind::UBUNTU1804, VariantKind::UBUNTU2004, VariantKind::UBUNTU2204, VariantKind::UBUNTU2404, VariantKind::DEBIAN10, VariantKind::DEBIAN11, VariantKind::DEBIAN12, VariantKind::DEBIAN13, ], variants: HashMap::from( [ ( VariantKind::ALMA8, Variant { kind: VariantKind::ALMA8, descr: "AlmaLinux 8.x".to_owned(), family: "redhat".to_owned(), parent: "ALMA9".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ AlmaLinux \s .* \s 8 \. (?: [4-9] | [1-9][0-9] )".to_owned(), os_id: "almalinux".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=powertools".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "alma8".to_owned(), base_image: "almalinux:8".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::ALMA9, Variant { kind: VariantKind::ALMA9, descr: "AlmaLinux 9.x".to_owned(), family: "redhat".to_owned(), parent: "".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ AlmaLinux \s .* \s 9 \. [0-9]".to_owned(), os_id: "almalinux".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^9(?:$|\.[0-9])".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=crb".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.9".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "bash".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "bash".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "alma9".to_owned(), base_image: "almalinux:9".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::CENTOS7, Variant { kind: VariantKind::CENTOS7, descr: "CentOS 7.x".to_owned(), family: "redhat".to_owned(), parent: "CENTOS8".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ (?: CentOS | Virtuozzo ) \s .* \s 7 \.".to_owned(), os_id: "centos".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^7(?:$|\.[0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "yum".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=base".to_owned(), "--enablerepo=updates".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then yum install -y --disablerepo='*' --enablerepo=base,updates,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then yum reinstall -y --disablerepo='*' --enablerepo=base,updates,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "centos7".to_owned(), base_image: "centos:7".to_owned(), branch: "centos/7".to_owned(), kernel_package: "kernel".to_owned(), utf8_locale: "en_US.utf8".to_owned(), }, }, ), ( VariantKind::CENTOS8, Variant { kind: VariantKind::CENTOS8, descr: "CentOS 8.x".to_owned(), family: "redhat".to_owned(), parent: "ALMA8".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ CentOS \s .* \s 8 \. (?: [3-9] | (?: [12][0-9] ) )".to_owned(), os_id: "centos".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=powertools".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "centos8".to_owned(), base_image: "centos:8".to_owned(), branch: "centos/8".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::CENTOS9, Variant { kind: VariantKind::CENTOS9, descr: "CentOS Stream 9.x".to_owned(), family: "redhat".to_owned(), parent: "ALMA9".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ CentOS Stream release 9".to_owned(), os_id: "centos".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^9(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=crb".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.9".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "bash".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "bash".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "centos9".to_owned(), base_image: "quay.io/centos/centos:stream9".to_owned(), branch: "centos/9".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::DEBIAN10, Variant { kind: VariantKind::DEBIAN10, descr: "Debian 10.x (buster)".to_owned(), family: "debian".to_owned(), parent: "DEBIAN11".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Debian \s+ GNU/Linux \s+ (?: buster | 10 ) (?: \s | / ) ".to_owned(), os_id: "debian".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^10$".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.7".to_owned(), repo: Repo::Deb(DebRepo { codename: "buster".to_owned(), vendor: "debian".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-cpupower".to_owned()), ("LIBSSL".to_owned(), "libssl1.1".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "debian10".to_owned(), base_image: "debian:buster".to_owned(), branch: "debian/buster".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::DEBIAN11, Variant { kind: VariantKind::DEBIAN11, descr: "Debian 11.x (bullseye)".to_owned(), family: "debian".to_owned(), parent: "DEBIAN12".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Debian \s+ GNU/Linux \s+ (?: bullseye | 11 ) (?: \s | / ) ".to_owned(), os_id: "debian".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^11$".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.9".to_owned(), repo: Repo::Deb(DebRepo { codename: "bullseye".to_owned(), vendor: "debian".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-cpupower".to_owned()), ("LIBSSL".to_owned(), "libssl1.1".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "debian11".to_owned(), base_image: "debian:bullseye".to_owned(), branch: "debian/bullseye".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::DEBIAN12, Variant { kind: VariantKind::DEBIAN12, descr: "Debian 12.x (bookworm)".to_owned(), family: "debian".to_owned(), parent: "DEBIAN13".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Debian \s+ GNU/Linux \s+ (?: bookworm | 12 ) (?: \s | / ) ".to_owned(), os_id: "debian".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^12$".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.11".to_owned(), repo: Repo::Deb(DebRepo { codename: "bookworm".to_owned(), vendor: "debian".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-cpupower".to_owned()), ("LIBSSL".to_owned(), "libssl3".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "debian12".to_owned(), base_image: "debian:bookworm".to_owned(), branch: "debian/bookworm".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::DEBIAN13, Variant { kind: VariantKind::DEBIAN13, descr: "Debian 13.x (trixie/unstable)".to_owned(), family: "debian".to_owned(), parent: "".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Debian \s+ GNU/Linux \s+ (?: trixie | 13 ) (?: \s | / ) ".to_owned(), os_id: "debian".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^13$".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.11".to_owned(), repo: Repo::Deb(DebRepo { codename: "unstable".to_owned(), vendor: "debian".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-cpupower".to_owned()), ("LIBSSL".to_owned(), "libssl3".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "debian13".to_owned(), base_image: "debian:unstable".to_owned(), branch: "debian/unstable".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::ORACLE7, Variant { kind: VariantKind::ORACLE7, descr: "Oracle Linux 7.x".to_owned(), family: "redhat".to_owned(), parent: "CENTOS7".to_owned(), detect: Detect { filename: "/etc/oracle-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ Oracle \s+ Linux \s .* \s 7 \.".to_owned(), os_id: "ol".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^7(?:$|\.[0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "yum".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=base".to_owned(), "--enablerepo=updates".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then yum install -y --disablerepo='*' --enablerepo=base,updates,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then yum reinstall -y --disablerepo='*' --enablerepo=base,updates,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "oracle7".to_owned(), base_image: "IGNORE".to_owned(), branch: "".to_owned(), kernel_package: "kernel".to_owned(), utf8_locale: "en_US.utf8".to_owned(), }, }, ), ( VariantKind::ORACLE8, Variant { kind: VariantKind::ORACLE8, descr: "Oracle Linux 8.x".to_owned(), family: "redhat".to_owned(), parent: "ALMA8".to_owned(), detect: Detect { filename: "/etc/oracle-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ Oracle \s+ Linux \s+ Server \s+ release \s .* \s 8 \. (?: [4-9] | [1-9][0-9] )".to_owned(), os_id: "ol".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=ol8_appstream".to_owned(), "--enablerepo=ol8_baseos_latest".to_owned(), "--enablerepo=ol8_codeready_builder".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=ol8_appstream,ol8_codeready_builder,ol8_baseos_latest,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=ol8_appstream,ol8_codeready_builder,ol8_baseos_latest,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "oracle8".to_owned(), base_image: "oraclelinux:8".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::RHEL8, Variant { kind: VariantKind::RHEL8, descr: "RedHat Enterprise Linux 8.x".to_owned(), family: "redhat".to_owned(), parent: "CENTOS8".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ Red \s+ Hat \s+ Enterprise \s+ Linux \s .* \s 8 \. (?: [4-9] | [1-9][0-9] )".to_owned(), os_id: "rhel".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "--enablerepo=codeready-builder-for-rhel-8-x86_64-rpms".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,codeready-builder-for-rhel-8-x86_64-rpms --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,codeready-builder-for-rhel-8-x86_64-rpms --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "rhel8".to_owned(), base_image: "redhat/ubi8:reg".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::ROCKY8, Variant { kind: VariantKind::ROCKY8, descr: "Rocky Linux 8.x".to_owned(), family: "redhat".to_owned(), parent: "CENTOS8".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ Rocky \s+ Linux \s .* \s 8 \. (?: [4-9] | [1-9][0-9] )".to_owned(), os_id: "rocky".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[4-9]|\.[1-9][0-9])".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=powertools".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,storpool-contrib,powertools --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "libcgroup-tools".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "python2-simplejson".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "rocky8".to_owned(), base_image: "rockylinux:8".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::ROCKY9, Variant { kind: VariantKind::ROCKY9, descr: "Rocky Linux 9.x".to_owned(), family: "redhat".to_owned(), parent: "ALMA9".to_owned(), detect: Detect { filename: "/etc/redhat-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ Rocky \s+ Linux \s .* \s 9 \. [0-9]".to_owned(), os_id: "rocky".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^8(?:$|\.[0-9])".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "dnf".to_owned(), "--disablerepo=*".to_owned(), "--enablerepo=appstream".to_owned(), "--enablerepo=baseos".to_owned(), "--enablerepo=crb".to_owned(), "--enablerepo=storpool-contrib".to_owned(), "install".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "rpm".to_owned(), "-qa".to_owned(), "--qf".to_owned(), "%{Name}\\t%{EVR}\\t%{Arch}\\tii\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "yum".to_owned(), "remove".to_owned(), "-q".to_owned(), "-y".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "rpm".to_owned(), "-e".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "true".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "rpm -qpR -- \"$pkg\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), " unset to_install to_reinstall for f in $packages; do package=\"$(rpm -qp \"$f\")\" if rpm -q -- \"$package\"; then to_reinstall=\"$to_reinstall ./$f\" else to_install=\"$to_install ./$f\" fi done if [ -n \"$to_install\" ]; then dnf install -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_install fi if [ -n \"$to_reinstall\" ]; then dnf reinstall -y --disablerepo='*' --enablerepo=appstream,baseos,crb,storpool-contrib --setopt=localpkg_gpgcheck=0 -- $to_reinstall fi ".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.9".to_owned(), repo: Repo::Yum(YumRepo { yumdef: "redhat/repo/storpool-centos.repo".to_owned(), keyring: "redhat/repo/RPM-GPG-KEY-StorPool".to_owned(), }), package: HashMap::from( [ ("KMOD".to_owned(), "kmod".to_owned()), ("LIBCGROUP".to_owned(), "bash".to_owned()), ("LIBUDEV".to_owned(), "systemd-libs".to_owned()), ("OPENSSL".to_owned(), "openssl-libs".to_owned()), ("PERL_AUTODIE".to_owned(), "perl-autodie".to_owned()), ("PERL_FILE_PATH".to_owned(), "perl-File-Path".to_owned()), ("PERL_LWP_PROTO_HTTPS".to_owned(), "perl-LWP-Protocol-https".to_owned()), ("PERL_SYS_SYSLOG".to_owned(), "perl-Sys-Syslog".to_owned()), ("PROCPS".to_owned(), "procps-ng".to_owned()), ("PYTHON_SIMPLEJSON".to_owned(), "bash".to_owned()), ("UDEV".to_owned(), "systemd".to_owned()), ] ), systemd_lib: "usr/lib/systemd/system".to_owned(), file_ext: "rpm".to_owned(), initramfs_flavor: "mkinitrd".to_owned(), builder: Builder { alias: "rocky9".to_owned(), base_image: "rockylinux:9".to_owned(), branch: "".to_owned(), kernel_package: "kernel-core".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::UBUNTU1804, Variant { kind: VariantKind::UBUNTU1804, descr: "Ubuntu 18.04 LTS (Bionic Beaver)".to_owned(), family: "debian".to_owned(), parent: "UBUNTU2004".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Ubuntu \s+ 18 \. 04 ".to_owned(), os_id: "ubuntu".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^18\.04$".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.6".to_owned(), repo: Repo::Deb(DebRepo { codename: "bionic".to_owned(), vendor: "ubuntu".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-tools-generic".to_owned()), ("LIBSSL".to_owned(), "libssl1.1".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "ubuntu-18.04".to_owned(), base_image: "ubuntu:bionic".to_owned(), branch: "ubuntu/bionic".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::UBUNTU2004, Variant { kind: VariantKind::UBUNTU2004, descr: "Ubuntu 20.04 LTS (Focal Fossa)".to_owned(), family: "debian".to_owned(), parent: "UBUNTU2204".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* (?: Ubuntu \s+ 20 \. 04 | Mint \s+ 20 ) ".to_owned(), os_id: "ubuntu".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^20\.04$".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.8".to_owned(), repo: Repo::Deb(DebRepo { codename: "focal".to_owned(), vendor: "ubuntu".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-tools-generic".to_owned()), ("LIBSSL".to_owned(), "libssl1.1".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "ubuntu-20.04".to_owned(), base_image: "ubuntu:focal".to_owned(), branch: "ubuntu/focal".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::UBUNTU2204, Variant { kind: VariantKind::UBUNTU2204, descr: "Ubuntu 22.04 LTS (Jammy Jellyfish)".to_owned(), family: "debian".to_owned(), parent: "UBUNTU2404".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* (?: Ubuntu \s+ 22 \. 04 | Mint \s+ 21 ) ".to_owned(), os_id: "ubuntu".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^22\.04$".to_owned(), }, supported: Supported { repo: true, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.10".to_owned(), repo: Repo::Deb(DebRepo { codename: "jammy".to_owned(), vendor: "ubuntu".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-tools-generic".to_owned()), ("LIBSSL".to_owned(), "libssl3".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "ubuntu-22.04".to_owned(), base_image: "ubuntu:jammy".to_owned(), branch: "ubuntu/jammy".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ( VariantKind::UBUNTU2404, Variant { kind: VariantKind::UBUNTU2404, descr: "Ubuntu 24.04 LTS (Noble Numbat)".to_owned(), family: "debian".to_owned(), parent: "DEBIAN13".to_owned(), detect: Detect { filename: "/etc/os-release".to_owned(), #[allow(clippy::needless_raw_strings)] regex: r"^ PRETTY_NAME= .* Ubuntu \s+ .* Noble ".to_owned(), os_id: "ubuntu".to_owned(), #[allow(clippy::needless_raw_strings)] os_version_regex: r"^24\.04$".to_owned(), }, supported: Supported { repo: false, }, commands: HashMap::from( [ ( "package".to_owned(), HashMap::from( [ ( "install".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "--no-install-recommends".to_owned(), "install".to_owned(), "--".to_owned(), ], ), ( "list_all".to_owned(), vec![ "dpkg-query".to_owned(), "-W".to_owned(), "-f".to_owned(), "${Package}\\t${Version}\\t${Architecture}\\t${db:Status-Abbrev}\\n".to_owned(), "--".to_owned(), ], ), ( "purge".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "purge".to_owned(), "--".to_owned(), ], ), ( "remove".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "remove".to_owned(), "--".to_owned(), ], ), ( "remove_impl".to_owned(), vec![ "env".to_owned(), "DEBIAN_FRONTEND=noninteractive".to_owned(), "dpkg".to_owned(), "-r".to_owned(), "--".to_owned(), ], ), ( "update_db".to_owned(), vec![ "apt-get".to_owned(), "-q".to_owned(), "-y".to_owned(), "update".to_owned(), ], ), ] ), ), ( "pkgfile".to_owned(), HashMap::from( [ ( "dep_query".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "dpkg-deb -f -- \"$pkg\" \"Depends\" | sed -e \"s/ *, */,/g\" | tr \",\" \"\\n\"".to_owned(), ], ), ( "install".to_owned(), vec![ "sh".to_owned(), "-c".to_owned(), "env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --reinstall -y -o DPkg::Options::=--force-confnew -- $packages".to_owned(), ], ), ] ), ), ] ), min_sys_python: "3.12".to_owned(), repo: Repo::Deb(DebRepo { codename: "noble".to_owned(), vendor: "ubuntu".to_owned(), sources: "debian/repo/storpool.sources".to_owned(), keyring: "debian/repo/storpool-keyring.gpg".to_owned(), req_packages: vec![ "ca-certificates".to_owned(), ], }), package: HashMap::from( [ ("BINDINGS_PYTHON".to_owned(), "python3".to_owned()), ("BINDINGS_PYTHON_CONFGET".to_owned(), "python3-confget".to_owned()), ("BINDINGS_PYTHON_SIMPLEJSON".to_owned(), "python3-simplejson".to_owned()), ("CGROUP".to_owned(), "cgroup-tools".to_owned()), ("CPUPOWER".to_owned(), "linux-tools-generic".to_owned()), ("LIBSSL".to_owned(), "libssl3".to_owned()), ("MCELOG".to_owned(), "bash".to_owned()), ] ), systemd_lib: "lib/systemd/system".to_owned(), file_ext: "deb".to_owned(), initramfs_flavor: "update-initramfs".to_owned(), builder: Builder { alias: "ubuntu-24.04".to_owned(), base_image: "ubuntu:noble".to_owned(), branch: "ubuntu/noble".to_owned(), kernel_package: "linux-headers".to_owned(), utf8_locale: "C.UTF-8".to_owned(), }, }, ), ] ), version: "3.5.2".to_owned(), } }); assert!( DEF_TOP.format.version.major == 1, "Internal error: JSON variant definition: version {:?}", DEF_TOP.format.version ); &DEF_TOP }