- recognize the -m option

- modernize the specfile
    - use recommended systemd macros
    - fix manual pages installation
    - sort file list and BuildRequires
    - use modern make macros
    - simplify %%install section
This commit is contained in:
Lukáš Zaoral 2023-11-21 13:25:52 +01:00
parent b9fdb5b1b0
commit 5c1fb57154
No known key found for this signature in database
GPG Key ID: 39157506DD67752D

View File

@ -1,8 +1,6 @@
%global systemctl_bin /usr/bin/systemctl
Name: numad Name: numad
Version: 0.5 Version: 0.5
Release: 41.20150602git%{?dist} Release: 42.20150602git%{?dist}
Summary: NUMA user daemon Summary: NUMA user daemon
License: LGPL-2.1-only License: LGPL-2.1-only
@ -12,17 +10,14 @@ URL: https://pagure.io/numad
# git clone https://pagure.io/numad.git numad-0.5git # git clone https://pagure.io/numad.git numad-0.5git
# tar --exclude-vcs -cJf numad-0.5git.tar.xz numad-0.5git/ # tar --exclude-vcs -cJf numad-0.5git.tar.xz numad-0.5git/
Source0: %{name}-%{version}git.tar.xz Source0: %{name}-%{version}git.tar.xz
Patch0: 0000-remove-conf.patch Patch0: 0000-remove-conf.patch
Patch1: 0001-numad_log-fix-buffer-overflow.patch Patch1: 0001-numad_log-fix-buffer-overflow.patch
Patch2: 0002-recognize--m-option-correctly.patch
Requires: systemd-units BuildRequires: gcc
Requires(post): systemd-units
Requires(preun): systemd-units
BuildRequires: make BuildRequires: make
BuildRequires: gcc BuildRequires: systemd-rpm-macros
BuildRequires: systemd-units
ExcludeArch: s390 %{arm}
%description %description
Numad, a daemon for NUMA (Non-Uniform Memory Architecture) systems, Numad, a daemon for NUMA (Non-Uniform Memory Architecture) systems,
@ -30,27 +25,21 @@ that monitors NUMA characteristics and manages placement of processes
and memory to minimize memory latency and thus provide optimum performance. and memory to minimize memory latency and thus provide optimum performance.
%prep %prep
%setup -q -n %{name}-%{version}git %autosetup -n %{name}-%{version}git
%patch0 -p1
%patch1 -p1
%build %build
make CFLAGS="$RPM_OPT_FLAGS -std=gnu99" LDFLAGS="$RPM_LD_FLAGS -lpthread -lrt -lm" %make_build CFLAGS="$CFLAGS"
%install %install
mkdir -p %{buildroot}%{_bindir} install -D -p -m 644 {,%{buildroot}%{_unitdir}/}numad.service
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d install -D -p -m 644 {,%{buildroot}%{_sysconfdir}/logrotate.d/%{name}/}numad.logrotate
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_mandir}/man8/
install -p -m 644 numad.service %{buildroot}%{_unitdir}/
install -p -m 644 numad.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%make_install prefix=%{buildroot}/usr %make_install prefix=%{buildroot}/usr
%files %files
%{_bindir}/numad
%{_unitdir}/numad.service
%config(noreplace) %{_sysconfdir}/logrotate.d/numad %config(noreplace) %{_sysconfdir}/logrotate.d/numad
%doc %{_mandir}/man8/numad.8.gz %{_bindir}/numad
%{_mandir}/man8/numad.8.*
%{_unitdir}/numad.service
%post %post
%systemd_post numad.service %systemd_post numad.service
@ -62,6 +51,15 @@ install -p -m 644 numad.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%systemd_postun numad.service %systemd_postun numad.service
%changelog %changelog
* Tue Nov 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 0.5-42.20150602git
- recognize the -m option
- modernize the specfile
- use recommended systemd macros
- fix manual pages installation
- sort file list and BuildRequires
- use modern make macros
- simplify %%install section
* Wed Sep 06 2023 Lukas Nykryn <lnykryn@redhat.com> - 0.5-41.20150602git * Wed Sep 06 2023 Lukas Nykryn <lnykryn@redhat.com> - 0.5-41.20150602git
- fix buffer overflow - fix buffer overflow