diff --git a/bluechi.spec b/bluechi.spec index e6ac21f79a7c890c309c87885032bc8d61e6d75f..f3a9b97e077c4e04b665bc2a6e0a945368c1e8d5 100644 --- a/bluechi.spec +++ b/bluechi.spec @@ -3,8 +3,8 @@ %endif Name: bluechi -Version: 0.7.0 -Release: 2%{?dist} +Version: 1.2.2 +Release: 1%{?dist} Summary: A systemd service controller for multi-nodes environments License: LGPL-2.1-or-later AND CC0-1.0 URL: https://github.com/eclipse-bluechi/bluechi @@ -14,9 +14,10 @@ BuildRequires: git-core BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: meson +BuildRequires: libselinux-devel BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros -BuildRequires: golang-github-cpuguy83-md2man +BuildRequires: go-md2man %description BlueChi is a systemd service controller for multi-node environments with a @@ -27,6 +28,7 @@ such as those requiring functional safety (for example in cars). Summary: BlueChi service controller Requires: systemd Recommends: bluechi-selinux +Obsoletes: hirte < 0.6.0 Provides: hirte = %{version}-%{release} Provides: bluechi = %{version}-%{release} @@ -48,26 +50,36 @@ This package contains the controller service. %files controller %ghost %{_sysconfdir}/bluechi/controller.conf +%dir %{_sysconfdir}/bluechi +%dir %{_sysconfdir}/bluechi/controller.conf.d %doc README.md %doc README.developer.md %license LICENSE -%dir %{_sysconfdir}/bluechi -%dir %{_sysconfdir}/bluechi/controller.conf.d %{_libexecdir}/bluechi-controller -%{_datadir}/dbus-1/interfaces/org.eclipse.bluechi.*.xml +%{_datadir}/dbus-1/interfaces/org.eclipse.bluechi.Job.xml +%{_datadir}/dbus-1/interfaces/org.eclipse.bluechi.Controller.xml +%{_datadir}/dbus-1/interfaces/org.eclipse.bluechi.Monitor.xml +%{_datadir}/dbus-1/interfaces/org.eclipse.bluechi.Node.xml %{_datadir}/dbus-1/system.d/org.eclipse.bluechi.conf %{_datadir}/bluechi/config/controller.conf %{_mandir}/man1/bluechi-controller.* %{_mandir}/man5/bluechi-controller.conf.* + %{_sysconfdir}/bluechi/controller.conf.d/README.md %{_unitdir}/bluechi-controller.service %{_unitdir}/bluechi-controller.socket +# Create UDS directory on install and setup tmpfile for reboots +%dir %{_rundir}/bluechi +%attr(700, root, root) %{_rundir}/bluechi +%{_tmpfilesdir}/%{name}.conf + %package agent Summary: BlueChi service controller agent Requires: systemd Recommends: bluechi-selinux +Obsoletes: hirte-agent < 0.6.0 Provides: hirte-agent = %{version}-%{release} %description agent @@ -100,6 +112,7 @@ This package contains the node agent. %{_mandir}/man1/bluechi-agent.* %{_mandir}/man1/bluechi-proxy.* %{_mandir}/man5/bluechi-agent.conf.* + %{_sysconfdir}/bluechi/agent.conf.d/README.md %{_unitdir}/bluechi-agent.service %{_userunitdir}/bluechi-agent.service @@ -123,9 +136,13 @@ Requires(post): policycoreutils Requires(post): policycoreutils-python-utils Requires(postun): policycoreutils-python-utils -Provides: hirte-selinux = %{version}-%{release} +%if "%{_selinux_policy_version}" != "" +Requires(post): selinux-policy-base >= %_selinux_policy_version +Requires(post): selinux-policy-any >= %_selinux_policy_version +%endif -%global selinuxtype targeted +Obsoletes: hirte-selinux < 0.6.0 +Provides: hirte-selinux = %{version}-%{release} %description selinux SELinux policy associated with the bluechi and bluechi-agent daemons @@ -135,39 +152,38 @@ SELinux policy associated with the bluechi and bluechi-agent daemons %{_datadir}/selinux/packages/bluechi.pp.bz2 %{_mandir}/man8/bluechi*selinux.* + %post selinux +# Remove hirte policy if [ $1 -eq 1 ]; then - semanage port -N -d -p udp 842 2>/dev/null || true - semanage port -N -d -p tcp 842 2>/dev/null || true semodule -N -X 200 -r hirte 2>/dev/null || true fi -%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/bluechi.pp.bz2 +. %{_sysconfdir}/selinux/config +%selinux_modules_install -s ${SELINUXTYPE} %{_datadir}/selinux/packages/bluechi.pp.bz2 restorecon -R %{_bindir}/bluechi* &> /dev/null || : -semanage port -a -t bluechi_port_t -p udp 842 2>/dev/null || semanage port -m -t bluechi_port_t -p udp 842 -semanage port -a -t bluechi_port_t -p tcp 842 2>/dev/null || semanage port -m -t bluechi_port_t -p tcp 842 +restorecon -R %{_rundir}/bluechi/ &> /dev/null || : +restorecon -R %{_localstatedir}/%{_rundir}/bluechi/ &> /dev/null || : %postun selinux if [ $1 -eq 0 ]; then - semanage port -d -p udp 842 2>/dev/null || true - semanage port -d -p tcp 842 2>/dev/null || true - %selinux_modules_uninstall -s %{selinuxtype} bluechi + . %{_sysconfdir}/selinux/config + %selinux_modules_uninstall -s ${SELINUXTYPE} bluechi restorecon -R %{_bindir}/bluechi* &> /dev/null || : + restorecon -R %{_rundir}/bluechi/ &> /dev/null || : + restorecon -R %{_localstatedir}/%{_rundir}/bluechi/ &> /dev/null || : fi -%triggerpostun selinux -- hirte-selinux -semanage port -a -t bluechi_port_t -p udp 842 2>/dev/null || semanage port -m -t bluechi_port_t -p udp 842 -semanage port -a -t bluechi_port_t -p tcp 842 2>/dev/null || semanage port -m -t bluechi_port_t -p tcp 842 - %package ctl Summary: BlueChi service controller command line tool Requires: %{name} = %{version}-%{release} Provides: bluechictl = %{version} +Obsoletes: hirte-ctl < 0.6.0 Provides: hirte-ctl = %{version}-%{release} %description ctl -BlueChi is a systemd service controller for multi-nodes environements with a +BlueChi is a systemd service controller for multi-nodes environments with a predefined number of nodes and with a focus on highly regulated environment such as those requiring functional safety (for example in cars). This package contains the service controller command line tool. @@ -179,26 +195,46 @@ This package contains the service controller command line tool. %{_mandir}/man1/bluechictl.* + +%package is-online +Summary: Command line tool to monitor the connection state of BlueChi's components +Recommends: bluechi-controller = %{version}-%{release} +Recommends: bluechi-agent = %{version}-%{release} + +%description is-online +BlueChi is a systemd service controller for multi-nodes environments with a +predefined number of nodes and with a focus on highly regulated environment +such as those requiring functional safety (for example in cars). +This package contains a command line tool for checking and monitoring the +connection state of BlueChi's core components. + +%files is-online +%doc README.md +%license LICENSE +%{_bindir}/bluechi-is-online +%{_mandir}/man1/bluechi-is-online.* + + + %if %{with_python} %package -n python3-bluechi Summary: Python bindings for BlueChi +BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-wheel Requires: python3-dasbus +Obsoletes: python3-pyhirte < 0.6.0 Provides: python3-pyhirte = %{version}-%{release} -BuildArch: noarch %description -n python3-bluechi -pybluechi is a python module to access the public D-Bus API of bluechi. -It contains typed python code that is auto-generated from bluechi's +bluechi is a python module to access the public D-Bus API of BlueChi project. +It contains typed python code that is auto-generated from BlueChi's API description and manually written code to simplify recurring tasks. %files -n python3-bluechi -%license LICENSE -%doc README.md -%{python3_sitelib}/bluechi-*.egg-info/ -%{python3_sitelib}/bluechi/ +%{python3_sitelib} %endif @@ -206,13 +242,19 @@ API description and manually written code to simplify recurring tasks. %prep %autosetup -S git_am +%if %{with_python} +ln -s src/bindings/python/pyproject.toml pyproject.toml +%generate_buildrequires +%pyproject_buildrequires +%endif + %build %meson -Dapi_bus=system %meson_build %if %{with_python} pushd src/bindings/python -%py3_build +%pyproject_wheel popd %endif @@ -221,7 +263,7 @@ popd %if %{with_python} pushd src/bindings/python -%py3_install +%pyproject_install popd %endif @@ -230,6 +272,10 @@ popd %changelog +* Wed May 06 2026 PkgAgent Robot - 1.2.2-1 +- [Type] security +- [DESC] Update to 1.2.2 (fixes CVE-2025-2515) + * Tue Jun 03 2025 bbrucezhang - 0.7.0-2 - Rebuilt for loongarch64 diff --git a/sources b/sources index 028546dd57f8c728abadc109e1277751703ff354..83e19d93ff84c1782fc3d0963320c67aa98f831c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bluechi-0.7.0.tar.gz) = 2fb929ab56e27985f3a2382b9f588b73540f3c646d023626228153fc93a38e417bbce4564956d98b2b6e1231d493f31d0c7f359a85c73d914cbd702eb329817a +SHA512 (bluechi-1.2.2.tar.gz) = 90c07d07cae8d987b533a2afcd95c3da346ca0a6b5919d98ba6c5334f7c7a59c2a7f274c94db231371d05f01e10a9dc5f837b8647f42d27273186a93ccb93b1d