ysenda / rpms / rt-setup

Forked from rpms/rt-setup 2 years ago
Clone

Blame SPECS/rt-setup.spec

be80c1
Name: rt-setup
be80c1
Version: 2.0
be80c1
Release: 10%{?dist}
be80c1
License: GPL+
be80c1
Summary: Setup RHEL-RT environment details
be80c1
Group: System Environment/Base
be80c1
Source: rt-setup-%{version}.tar.bz2
be80c1
be80c1
ExclusiveArch: x86_64
be80c1
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
be80c1
BuildRequires: gcc
be80c1
BuildRequires: systemd
be80c1
BuildRequires: annobin
be80c1
Requires: pam >= 0.99.6.2-3.26
be80c1
Requires: /usr/sbin/groupadd
be80c1
Requires: kexec-tools
be80c1
Requires: tuna
be80c1
Requires: tuned
be80c1
Requires: tuned-profiles-realtime
be80c1
Requires: systemd
be80c1
be80c1
%global debug_package %{nil}
be80c1
be80c1
%description
be80c1
The 'rt-setup' package configures details required by RHEL-RT environment.
be80c1
  - creates realtime group
be80c1
  - adds realtime limits configuration for PAM
be80c1
  - adds /usr/bin/rt-setup-kdump to config kdump in RT
be80c1
  - adds udev specific rules for threaded irqs and /dev/rtc access
be80c1
  - adds /usr/bin/slub_cpu_partial_off to turn off cpu_partials in SLUB
be80c1
  - adds net-socket timestamp static key daemon (rt-entsk)
be80c1
be80c1
%prep
be80c1
%setup
be80c1
be80c1
%build
be80c1
%set_build_flags
be80c1
make all
be80c1
be80c1
%install
be80c1
rm -Rf %{buildroot}
be80c1
make DEST=%{buildroot} install
be80c1
be80c1
%post
be80c1
/usr/sbin/groupadd -f -g 71 realtime
be80c1
be80c1
if grep kernel.hung_task_panic /etc/sysctl.conf >/dev/null 2>&1
be80c1
then
be80c1
	:
be80c1
else
be80c1
	sysctl -w kernel.hung_task_panic=0 >/dev/null 2>&1
be80c1
	cat <<EOF >>/etc/sysctl.conf
be80c1
# controls whether the system should reboot if it detects a hung task
be80c1
# 1 means reboot after hung_task_timeout_secs after a hung task is detected
be80c1
# default value is 0
be80c1
kernel.hung_task_panic = 0
be80c1
EOF
be80c1
fi
be80c1
be80c1
if grep kernel.hung_task_timeout_secs /etc/sysctl.conf >/dev/null 2>&1
be80c1
then
be80c1
	:
be80c1
else
be80c1
	sysctl -w kernel.hung_task_timeout_secs=600 >/dev/null 2>&1
be80c1
	cat <<EOF >>/etc/sysctl.conf
be80c1
# controls how long to reboot after a hung task is detected
be80c1
# default is 600 seconds.
be80c1
# note: this only matters if kernel.hung_task_panic=1
be80c1
kernel.hung_task_timeout_secs = 600
be80c1
EOF
be80c1
fi
be80c1
be80c1
# turn on the rt-setup startup file
be80c1
systemctl enable rt-setup
be80c1
be80c1
%preun
be80c1
if [ "$1" = "0" ] ; then # uninstall
be80c1
systemctl disable rt-setup
be80c1
fi
be80c1
be80c1
%clean
be80c1
rm -rf %{buildroot}
be80c1
be80c1
%files
be80c1
%defattr(0644,root,root,0755)
be80c1
%config(noreplace) %{_sysconfdir}/security/limits.d/realtime.conf
be80c1
%config(noreplace) %{_sysconfdir}/udev/rules.d/99-rhel-rt.rules
be80c1
%config(noreplace) %{_sysconfdir}/sysconfig/rt-setup
be80c1
%attr(0755, root, root) %{_bindir}/rt-setup-kdump
be80c1
%attr(0755, root, root) %{_bindir}/slub_cpu_partial_off
be80c1
%attr(0755, root, root) %{_sbindir}/rt-entsk
be80c1
%attr(0755, root, root) %{_sbindir}/kernel-is-rt
be80c1
%attr(0644, root, root) %{_unitdir}/rt-setup.service
be80c1
%attr(0755, root, root) %{_bindir}/rt-setup
be80c1
%attr(0644, root, root) %{_unitdir}/rt-entsk.service
be80c1
be80c1
%changelog
be80c1
* Tue Oct 23 2018 Clark Williams <williams@redhat.com> 2.0.10
be80c1
- rebuild to see if build-id continues to appear in the rpm
be80c1
be80c1
* Mon Sep 24 2018 Clark Williams <williams@redhat.com> 2.0.9
be80c1
- fix annocheck static source analysis errors
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Fri Sep 14 2018 Clark Williams <williams@redhat.com> 2.0.8
be80c1
- fix some coverity complaints about shell scripts
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Fri Sep 14 2018 Clark Williams <williams@redhat.com> 2.0.7
be80c1
- strip rt-entsk executable on installation
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Fri Aug 24 2018 Clark Williams <williams@redhat.com> 2.0.6
be80c1
- check for open failure to make coverity happy
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Fri Aug 24 2018 Clark Williams <williams@redhat.com> 2.0.5
be80c1
- move pidfile write to after daemonize in rt-entsk
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Wed Aug 22 2018 Clark Williams <williams@redhat.com> 2.0.4
be80c1
- add logic to write a pid file in rt-entsk (keep systemd happy)
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Wed Aug 22 2018 Clark Williams <williams@redhat.com> 2.0.3
be80c1
- sync with rhel-7.6 build
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Wed Aug 22 2018 Clark Williams <williams@redhat.com> 2.0.2
be80c1
- fix installation of rt-entsk
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Mon Aug 20 2018 Clark Williams <williams@redhat.com> 2.0.1
be80c1
- build for RHEL 8.0.0
be80c1
- add rt-entsk program for forcing network timestamps enabled
be80c1
Resolves: rhbz#1619407
be80c1
be80c1
* Wed Aug 08 2018 Clark Williams <williams@redhat.com> 1.59-8
be80c1
- remove libcgroup requirement
be80c1
- remove comment about irqbalance
be80c1
be80c1
* Fri Jun 01 2018 Luis Claudio R. Goncalves <lgoncalv@redhat.com> 1.59-7
be80c1
- rt-setup no longer rrequires rtctl (1585198)
be80c1
Resolves: rhbz#1585198
be80c1
be80c1
* Tue Jul 05 2016 John Kacur <jkacur@redhat.com> - 1.59-5
be80c1
- Rebuild for rhel-7.3
be80c1
Resolves: rhbz#1341783
be80c1
be80c1
* Tue Jun 14 2016 John Kacur <jkacur@redhat.com> - 1.59-3
be80c1
- Fix some spelling mistakes in the comments in rhel-rt.rules
be80c1
- Add udev rules to allow the realtime group to access msr and cpuid registers
be80c1
Resolves: rhbz#1341783
be80c1
be80c1
* Fri Jul 10 2015 Clark Williams <williams@redhat.com> - 1.59-2
be80c1
- removed post-install script that disables irqbalance (1203764)
be80c1
- fixed typo in requires for tuned-profiles-realtime (1241936)
be80c1
be80c1
* Thu Jul  2 2015 Clark Williams <williams@redhat.com> - 1.59-1
be80c1
- added tuned and tuna dependencies, removed sqlite  (1203764)
be80c1
be80c1
* Mon Dec 29 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.58-2
be80c1
- fixed rt-setup shell script called on startup (1162769)
be80c1
- removed the unnecessary mrg-rt-firmware logic (1162769)
be80c1
be80c1
* Fri Dec 26 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.58-1
be80c1
- make startup logic work with systemd (1162769)
be80c1
- product name cleanup (1173312)
be80c1
be80c1
* Fri Nov 28 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.57-6
be80c1
- remove a reference to mrg-rt-release from initscript (1162766)
be80c1
be80c1
* Mon Nov 24 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.57-5
be80c1
- move kernel-is-rt from /sbin to /usr/sbin (1151563)
be80c1
be80c1
* Tue Nov 18 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.57-4
be80c1
- remove the database used by mrg-rt-release (1162766)
be80c1
be80c1
* Tue Nov 11 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.57-3
be80c1
- remove mrg-rt-release (1162766)
be80c1
be80c1
* Tue Nov 04 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.57-2
be80c1
- remove the old dracut rules from RHEL6 (1160440)
be80c1
be80c1
* Wed Oct 29 2014 Clark Williams <williams@redhat.com> - 1.57-1
be80c1
- added mrg-2.5.8 release to mrg-rt-release database
be80c1
be80c1
* Tue Sep 30 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.56-2
be80c1
- added mrg-2.5.7 release to mrg-rt-release database
be80c1
be80c1
* Wed Aug 20 2014 Clark Williams <williams@redhat.com> - 1.56-1
be80c1
- added mrg-2.5.6 release to mrg-rt-release database
be80c1
- removed dracut rule that caused problems when adding firmware to initramfs
be80c1
be80c1
* Fri Jul 25 2014 Clark Williams <williams@redhat.com> - 1.55-8
be80c1
- added mrg-2.5.2 and mrg-2.5.4 releases to mrg-rt-release database
be80c1
be80c1
* Tue Jun 10 2014 John Kacur <jkacur@redhat.com> - 1.55-7
be80c1
- udev: Add udev rule to give group realtime write access to cpu_dma_latency
be80c1
be80c1
* Mon Apr 28 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.55-6
be80c1
- Added mrg-2.5 GA data to the mrg-rt-release database
be80c1
be80c1
* Wed Apr 09 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.55-5
be80c1
- Added mrg-2.4.6 data to the mrg-rt-release database
be80c1
be80c1
* Fri Mar 28 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.55-4
be80c1
- Trim the kernel version when read from uname -rt
be80c1
be80c1
* Tue Feb 18 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.55-3
be80c1
- Added mrg-2.4.5 data to the mrg-rt-release database
be80c1
be80c1
* Wed Jan 22 2014 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.55-2
be80c1
- Added mrg-2.4.3 data to the mrg-rt-release database
be80c1
be80c1
* Tue Dec 10 2013 Clark Williams <williams@redhat.com> - 1.55-1
be80c1
- First common build for RHEL7 and RHEL6
be80c1
be80c1
* Thu Nov 28 2013 Luis Claudio R. Goncalves <lgoncalv@redhat.com> 1.54-2
be80c1
- Enhanced update-mrg-rt-release
be80c1
be80c1
* Thu Nov 28 2013 Luis Claudio R. Goncalves <lgoncalv@redhat.com> 1.54-1
be80c1
- Update mrg-rt-release on every boot [848433]
be80c1
be80c1
* Thu Aug 29 2013 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.53-4
be80c1
- add /lib/firmware/$(uname -r) to dracut firmware search path (998920)
be80c1
- ensure rt-firmware files are on udev firmware search path (998920)
be80c1
be80c1
* Thu Aug 22 2013 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.53-3
be80c1
- removed the dracut config file
be80c1
be80c1
* Tue Aug 20 2013 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.53-2
be80c1
- added configuration file for dracut (998920)
be80c1
- fixed macro usage on the specfile
be80c1
be80c1
* Thu Apr  25 2013 Clark Williams <williams@redhat.com> - 1.53-1
be80c1
- turn off cgroup mounting logic
be80c1
- added Requires for libcgroup
be80c1
be80c1
* Tue Apr   2 2013 Clark Williams <williams@redhat.com> - 1.52-1
be80c1
- added script slub_cpu_partial_off
be80c1
- added cgroups to /etc/sysconfig/rt-setup
be80c1
be80c1
* Wed Mar  27 2013 Clark Williams <williams@redhat.com> - 1.51-1
be80c1
- added code to turn off SLUB cpu_partial at startup
be80c1
be80c1
* Mon Nov  12 2012 Luis Claudio R. Goncalves  <lgoncalv@redhat.com> - 1.50-1
be80c1
- rt-setup-kdump: use mrg-2.x as the kdump kernel [868446] [868442] [868329]
be80c1
- rt-setup-kdump: simplified the script and added --rhel option
be80c1
be80c1
* Tue Mar   6 2012 Clark Williams <williams@redhat.com> - 1.11-1
be80c1
- removed %%post logic that disables bandwidth limiting [BZ# 791371]
be80c1
- changed rtprio from 100 to 99 in realtime.conf
be80c1
be80c1
* Thu Oct  13 2011 Clark Williams <williams@redhat.com> - 1.10-1
be80c1
- fixed thinko by removing firmware download logic
be80c1
be80c1
* Tue Oct  11 2011 Clark Williams <williams@redhat.com> - 1.9-1
be80c1
- added sysconfig and init script for handling cgroup mounting
be80c1
- changed script kernel-is-rt to use /sys/kernel/realtime
be80c1
be80c1
* Wed May 11 2011 Clark Williams <williams@redhat.com> - 1.8-1
be80c1
- simplified mrg-rt-firmware.rules to fix boot time hang on
be80c1
  large core machines (BZ# 698481)
be80c1
be80c1
* Fri Feb 11 2011 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.7-4
be80c1
- Normalized the RHEL6 firmware path search (due to uname -r changes)
be80c1
be80c1
* Thu May 27 2010 John Kacur <jkacur@redhat.com> - 1.7-2
be80c1
- set kernel.hung_task_panic=0 (off) by default
be80c1
- set kernel.hung_task_timeout_secs=600 by default
be80c1
- used sysctl to set sched_rt_runtime_us at install time, not just boot time
be80c1
be80c1
* Tue May 18 2010 Clark Williams <williams@redhat.com> - 1.7-1
be80c1
- removed requirement for kernel-rt (circular dependency)
be80c1
- cleaned up mrg-rt-firmware.rules (added commas between all key/value pairs)
be80c1
be80c1
* Wed Nov 25 2009 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.6-3
be80c1
- rt-setup-kdump: configure kdump on all MRG kernel flavors
be80c1
- rt-setup-kdump: fix a log entry that was too verbose
be80c1
be80c1
* Wed Nov 25 2009 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.6-2
be80c1
- rt-setup-kdump treats MRG v1 and v2 kernels accordingly (BZ# 517529)
be80c1
be80c1
* Mon Nov  2 2009 Clark Williams <williams@redhat.com> - 1.6-1
be80c1
- removed "@16" specifier from rt-setup-kdump script (BZ# 517529)
be80c1
be80c1
* Tue Sep  1 2009 Clark Williams <williams@redhat.com> - 1.5-2
be80c1
- fixed path mismatches reported by Vernon Maury
be80c1
be80c1
* Wed Aug 26 2009 Clark Williams <williams@redhat.com> - 1.5-1
be80c1
- add udev rules and scripts for handling driver firmware download
be80c1
be80c1
* Thu Jul  9 2009 Clark Williams <williams@redhat.com> - 1.4-1
be80c1
- blow away rtctl udev rule (compatibility problem with RHEL
be80c1
  version of udev)
be80c1
- update /dev/rtc udev rule to use PROGRAM rather than SYMLINK
be80c1
be80c1
* Tue Jul  7 2009 Clark Williams <williams@redhat.com> - 1.3-1
be80c1
- added udev rules file to address:
be80c1
 - BZ 510121 hwclock & /dev/rtc broken in rt-kernel
be80c1
 - BZ 466929 udev rule for hotplug rtctl
be80c1
be80c1
* Thu May 21 2009 Clark Williams <williams@redhat.com> - 1.2-1
be80c1
- added post section to edit /etc/sysctl.conf and add the
be80c1
  kernel.sched_rt_runtime_us parameter = -1 line to disable
be80c1
  the RT scheduler bandwith limiter
be80c1
be80c1
* Tue Jul 15 2008 Clark Williams <williams@redhat.com> - 1.1-6%{dist}
be80c1
- fixed rt-setup-kdump to handle incorrect arguments (BZ 455536)
be80c1
- added help argument to rt-setup-kdump
be80c1
be80c1
* Fri Jun 13 2008 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.1-5%{dist}
be80c1
- rt-setup-kdump now touches /etc/grub.conf only when requested
be80c1
be80c1
* Tue Jun 03 2008 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.1-4%{dist}
be80c1
- /usr/bin/rt-setup-kdump had wrong permissions
be80c1
- changed rt-setup-kdump: added a few tests for reserved memory and for the
be80c1
  absence of /etc/sysconfig/kdump
be80c1
- now rt-setup requires kexec-tools
be80c1
be80c1
* Mon May 12 2008 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.1-3%{dist}
be80c1
- disables irqbalance as it may hurt determinism in RT
be80c1
- installs rt-setup-kdump in /usr/bin
be80c1
be80c1
* Tue Apr 22 2008 Clark Williams <williams@redhat.com> - 1.1-2%{?dist}
be80c1
- removed sed script to edit kdump config file (using updated
be80c1
  kexec-tools instead)
be80c1
be80c1
* Mon Apr 21 2008 Clark Williams <williams@redhat.com> - 1.1-1%{?dist}
be80c1
- removed --args-linux from /etc/sysconfig/kdump (BZ# 432378)
be80c1
- changed BuildArch to noarch
be80c1
be80c1
* Thu Feb 07 2008 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.0-3%{?dist}
be80c1
- BZ:399591 - Fixed spec issues pointed by Jeremy Katz
be80c1
- BZ:399591 - @realtime has gid=71.
be80c1
- FIXES: BZ399591
be80c1
be80c1
* Thu Aug 02 2007 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.0-2%{?dist}
be80c1
- Fixed package description
be80c1
be80c1
* Mon Jul 30 2007 Luis Claudio R. Goncalves <lgoncalv@redhat.com> - 1.0-1%{?dist}
be80c1
- Initial packaging
be80c1
- Requires all the basic packages for RT
be80c1
- Requires support for limits.d and no realtime.conf present in PAM package