diff --git a/systemd-mini.changes b/systemd-mini.changes index e0ad5a2e..cc9f7913 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue May 18 18:31:20 UTC 2021 - Franck Bui + +- Introduce subpackage systemd-tests + + This subpackage is mainly used before submitting a new version of + the systemd packages. As such it's not intended for regular users + hence can be removed/renamed at any time. One might wonder why the + unit tests are not executed during package builds (%check)... the + reason is that the environment used to build package (chroot) is too + limited and therefore only a subset of the unit tests would be + executed in this environment. + + To disable the build of the subpackage, use "--without=tests". + ------------------------------------------------------------------- Tue May 18 10:04:16 UTC 2021 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index a2e5123b..31ba396b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -39,6 +39,7 @@ %bcond_with resolved %bcond_with sysvcompat %bcond_with experimental +%bcond_with tests %else %bcond_without coredump %ifarch %{ix86} x86_64 @@ -52,6 +53,7 @@ %bcond_without resolved %bcond_without sysvcompat %bcond_without experimental +%bcond_without tests %endif %bcond_with parentpathid @@ -500,6 +502,25 @@ This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. %endif +%if %{with tests} +%package tests +Summary: Unit tests for systemd +License: LGPL-2.1-or-later +Group: System/Base +Requires: %{name} = %{version}-%{release} +Recommends: python3 +Recommends: python3-colorama +# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped) +Recommends: dosfstools + +%description tests +This package contains the unit tests used to check various internal +functions used by systemd and all its components. + +The python script /usr/lib/systemd/tests/run-unit-tests.py can be used +to run all unit tests at once. +%endif + %if %{with experimental} %package experimental Summary: Experimental systemd features @@ -619,6 +640,13 @@ Have fun with these services at your own risk. %if %{without sysvcompat} -Dsysvinit-path= \ -Dsysvrcnd-path= \ +%endif +%if %{with tests} + -Dtests=unsafe \ + -Dinstall-tests=true \ +%else + -Dtests=false \ + -Dinstall-tests=false \ %endif -Dadm-group=false \ -Dwheel-group=false \ @@ -1730,6 +1758,11 @@ fi %{_mandir}/man*/systemd-portabled* %endif +%if %{with tests} +%files tests +%{_prefix}/lib/systemd/tests +%endif + %if %{with experimental} %files experimental %defattr(-,root,root) diff --git a/systemd.changes b/systemd.changes index e0ad5a2e..cc9f7913 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue May 18 18:31:20 UTC 2021 - Franck Bui + +- Introduce subpackage systemd-tests + + This subpackage is mainly used before submitting a new version of + the systemd packages. As such it's not intended for regular users + hence can be removed/renamed at any time. One might wonder why the + unit tests are not executed during package builds (%check)... the + reason is that the environment used to build package (chroot) is too + limited and therefore only a subset of the unit tests would be + executed in this environment. + + To disable the build of the subpackage, use "--without=tests". + ------------------------------------------------------------------- Tue May 18 10:04:16 UTC 2021 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 1bfc5920..08e0e32b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -37,6 +37,7 @@ %bcond_with resolved %bcond_with sysvcompat %bcond_with experimental +%bcond_with tests %else %bcond_without coredump %ifarch %{ix86} x86_64 @@ -50,6 +51,7 @@ %bcond_without resolved %bcond_without sysvcompat %bcond_without experimental +%bcond_without tests %endif %bcond_with parentpathid @@ -498,6 +500,25 @@ This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. %endif +%if %{with tests} +%package tests +Summary: Unit tests for systemd +License: LGPL-2.1-or-later +Group: System/Base +Requires: %{name} = %{version}-%{release} +Recommends: python3 +Recommends: python3-colorama +# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped) +Recommends: dosfstools + +%description tests +This package contains the unit tests used to check various internal +functions used by systemd and all its components. + +The python script /usr/lib/systemd/tests/run-unit-tests.py can be used +to run all unit tests at once. +%endif + %if %{with experimental} %package experimental Summary: Experimental systemd features @@ -617,6 +638,13 @@ Have fun with these services at your own risk. %if %{without sysvcompat} -Dsysvinit-path= \ -Dsysvrcnd-path= \ +%endif +%if %{with tests} + -Dtests=unsafe \ + -Dinstall-tests=true \ +%else + -Dtests=false \ + -Dinstall-tests=false \ %endif -Dadm-group=false \ -Dwheel-group=false \ @@ -1728,6 +1756,11 @@ fi %{_mandir}/man*/systemd-portabled* %endif +%if %{with tests} +%files tests +%{_prefix}/lib/systemd/tests +%endif + %if %{with experimental} %files experimental %defattr(-,root,root)