update to 1.0.1-4
Signed-off-by: renoseven <dev@renoseven.net> (cherry picked from commit 567505f70fe05e4e05d35e71e768cec8f4d255a4) (cherry picked from commit ac6f860b4b594328e3735af137daecb59787feba)
This commit is contained in:
parent
b4f259cf4a
commit
4dca1d9749
Binary file not shown.
37
syscare.spec
37
syscare.spec
@ -1,12 +1,12 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
%define kernel_devel_rpm %(echo $(rpm -q kernel-devel | head -n 1))
|
%define kernel_devel_rpm %(echo $(rpm -q kernel-devel | head -n 1))
|
||||||
|
%define kernel_version %(echo $(rpm -q --qf "\%%{VERSION}" %{kernel_devel_rpm}))
|
||||||
%define kernel_name %(echo $(rpm -q --qf "\%%{VERSION}-\%%{RELEASE}.\%%{ARCH}" %{kernel_devel_rpm}))
|
%define kernel_name %(echo $(rpm -q --qf "\%%{VERSION}-\%%{RELEASE}.\%%{ARCH}" %{kernel_devel_rpm}))
|
||||||
%define kernel_version %(echo $(rpm -q --qf "\%%{VERSION}-\%%{RELEASE}" %{kernel_devel_rpm}))
|
|
||||||
|
|
||||||
Name: syscare
|
Name: syscare
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: system hot-fix service
|
Summary: system hot-fix service
|
||||||
|
|
||||||
License: MulanPSL-2.0 and GPL-2.0-only
|
License: MulanPSL-2.0 and GPL-2.0-only
|
||||||
@ -17,15 +17,12 @@ BuildRequires: rust cargo gcc gcc-g++ cmake make
|
|||||||
BuildRequires: elfutils-libelf-devel
|
BuildRequires: elfutils-libelf-devel
|
||||||
|
|
||||||
Requires: coreutils systemd kpatch-runtime
|
Requires: coreutils systemd kpatch-runtime
|
||||||
%ifarch x86_64
|
|
||||||
Requires: %{name}-kmod >= 1.0.1-1
|
Requires: %{name}-kmod >= 1.0.1-1
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SysCare is a system-level hot-fix software that provides single-machine-level and cluster-level security patches and system error hot-fixes for the operating system.
|
SysCare is a system-level hot-fix software that provides single-machine-level and cluster-level security patches and system error hot-fixes for the operating system.
|
||||||
The host can fix the system problem without rebooting.
|
The host can fix the system problem without rebooting.
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
%package kmod
|
%package kmod
|
||||||
Summary: Syscare kernel modules.
|
Summary: Syscare kernel modules.
|
||||||
Requires: kernel = %{kernel_version}
|
Requires: kernel = %{kernel_version}
|
||||||
@ -34,14 +31,11 @@ BuildRequires: make gcc bison flex
|
|||||||
|
|
||||||
%description kmod
|
%description kmod
|
||||||
Syscare kernel modules dependency.
|
Syscare kernel modules dependency.
|
||||||
%endif
|
|
||||||
|
|
||||||
%package build
|
%package build
|
||||||
Summary: Tools for build syscare patch.
|
Summary: Tools for build syscare patch.
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
%ifarch x86_64
|
|
||||||
Requires: %{name}-kmod >= 1.0.1-1
|
Requires: %{name}-kmod >= 1.0.1-1
|
||||||
%endif
|
|
||||||
Requires: kpatch make gcc openssl-devel dwarves python3-devel bison flex
|
Requires: kpatch make gcc openssl-devel dwarves python3-devel bison flex
|
||||||
Requires: elfutils-libelf-devel
|
Requires: elfutils-libelf-devel
|
||||||
Requires: rpm-build
|
Requires: rpm-build
|
||||||
@ -62,16 +56,12 @@ make
|
|||||||
%install
|
%install
|
||||||
cd build_tmp
|
cd build_tmp
|
||||||
%make_install
|
%make_install
|
||||||
%ifarch x86_64
|
|
||||||
mkdir -p %{buildroot}/lib/modules/%{kernel_name}/extra/syscare
|
mkdir -p %{buildroot}/lib/modules/%{kernel_name}/extra/syscare
|
||||||
mv %{buildroot}/usr/libexec/syscare/upatch.ko %{buildroot}/lib/modules/%{kernel_name}/extra/syscare
|
mv %{buildroot}/usr/libexec/syscare/upatch.ko %{buildroot}/lib/modules/%{kernel_name}/extra/syscare
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Create runtime directory at installation
|
# Create runtime directory
|
||||||
if [ "$1" -eq 1 ]; then
|
mkdir -p /usr/lib/syscare/patches
|
||||||
mkdir -p /usr/lib/syscare/patches
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start all services
|
# Start all services
|
||||||
systemctl enable syscare
|
systemctl enable syscare
|
||||||
@ -88,10 +78,9 @@ if [ "$1" -eq 0 ] || { [ -n "$2" ] && [ "$2" -eq 0 ]; }; then
|
|||||||
rm -rf /usr/lib/syscare
|
rm -rf /usr/lib/syscare
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
%post kmod
|
%post kmod
|
||||||
# Generate kernel module list
|
# Create kmod weak-updates link
|
||||||
depmod -a > /dev/null 2>&1 || true
|
echo "/lib/modules/%{kernel_name}/extra/syscare/upatch.ko" | /sbin/weak-modules --add-module --no-initramfs --verbose >&2
|
||||||
|
|
||||||
# Start all services
|
# Start all services
|
||||||
systemctl enable syscare-upatch
|
systemctl enable syscare-upatch
|
||||||
@ -103,36 +92,32 @@ systemctl stop syscare-upatch
|
|||||||
systemctl disable syscare-upatch
|
systemctl disable syscare-upatch
|
||||||
|
|
||||||
%postun kmod
|
%postun kmod
|
||||||
# Generate kernel module list
|
# Remove kmod weak-updates link
|
||||||
depmod -a > /dev/null 2>&1 || true
|
echo "/lib/modules/%{kernel_name}/extra/syscare/upatch.ko" | /sbin/weak-modules --remove-module --no-initramfs --verbose >&2
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%attr(755,root,root) /usr/bin/syscare
|
%attr(755,root,root) /usr/bin/syscare
|
||||||
%attr(644,root,root) /usr/lib/systemd/system/syscare.service
|
%attr(644,root,root) /usr/lib/systemd/system/syscare.service
|
||||||
%ifarch x86_64
|
|
||||||
%dir /usr/libexec/syscare
|
%dir /usr/libexec/syscare
|
||||||
%attr(755,root,root) /usr/libexec/syscare/upatch-tool
|
%attr(755,root,root) /usr/libexec/syscare/upatch-tool
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
%files kmod
|
%files kmod
|
||||||
%dir /lib/modules/%{kernel_name}/extra/syscare
|
%dir /lib/modules/%{kernel_name}/extra/syscare
|
||||||
%attr(640,root,root) /lib/modules/%{kernel_name}/extra/syscare/upatch.ko
|
%attr(640,root,root) /lib/modules/%{kernel_name}/extra/syscare/upatch.ko
|
||||||
%attr(644,root,root) /usr/lib/systemd/system/syscare-upatch.service
|
%attr(644,root,root) /usr/lib/systemd/system/syscare-upatch.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%files build
|
%files build
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%dir /usr/libexec/syscare
|
%dir /usr/libexec/syscare
|
||||||
%attr(755,root,root) /usr/libexec/syscare/syscare-build
|
%attr(755,root,root) /usr/libexec/syscare/syscare-build
|
||||||
%attr(755,root,root) /usr/libexec/syscare/upatch-build
|
%attr(755,root,root) /usr/libexec/syscare/upatch-build
|
||||||
%ifarch x86_64
|
|
||||||
%attr(755,root,root) /usr/libexec/syscare/upatch-diff
|
%attr(755,root,root) /usr/libexec/syscare/upatch-diff
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 04 2023 renoseven<dev@renoseven.net> - 1.0.1-4
|
||||||
|
- Enable aarch64
|
||||||
|
- Fix syscare-upatch service may start failed issue
|
||||||
* Thu Mar 30 2023 renoseven<dev@renoseven.net> - 1.0.1-3
|
* Thu Mar 30 2023 renoseven<dev@renoseven.net> - 1.0.1-3
|
||||||
- Fix upatch may not contain all symbols issue
|
- Fix upatch may not contain all symbols issue
|
||||||
- Add syscare-kmod package
|
- Add syscare-kmod package
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user