From e5ce4e002d4ad21273a389f7fe3ac5240905d792 Mon Sep 17 00:00:00 2001 From: basebuilder_pel7ppc64bebuilder0 Date: Sun, 20 May 2018 01:10:58 +0200 Subject: [PATCH] python-schedutil package added Signed-off-by: basebuilder_pel7ppc64bebuilder0 --- ...-to-install-man-pages-for-pchrt-and-.patch | 63 +++++++++++ ...s-Add-man-pages-for-pchrt-and-ptasks.patch | 103 +++++++++++++++++ ...tils-Correct-typos-in-usage-messages.patch | 54 +++++++++ ...s-Update-URL-in-python-schedutils.sp.patch | 29 +++++ SPECS/python-schedutils.spec | 105 ++++++++++++++++++ 5 files changed, 354 insertions(+) create mode 100644 SOURCES/Update-spec-file-to-install-man-pages-for-pchrt-and-.patch create mode 100644 SOURCES/python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch create mode 100644 SOURCES/python-schedutils-Correct-typos-in-usage-messages.patch create mode 100644 SOURCES/python-schedutils-Update-URL-in-python-schedutils.sp.patch create mode 100644 SPECS/python-schedutils.spec diff --git a/SOURCES/Update-spec-file-to-install-man-pages-for-pchrt-and-.patch b/SOURCES/Update-spec-file-to-install-man-pages-for-pchrt-and-.patch new file mode 100644 index 00000000..4ff666ad --- /dev/null +++ b/SOURCES/Update-spec-file-to-install-man-pages-for-pchrt-and-.patch @@ -0,0 +1,63 @@ +From 995b053b6003aa157be5daf8f3677dedcda06445 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 10 May 2016 17:41:31 +0200 +Subject: [PATCH] Update spec file to install man pages for pchrt and ptaskset + +Install pchrt.1 and ptaskset.1 using the spec file + +Signed-off-by: John Kacur +--- + rpm/SPECS/python-schedutils.spec | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/rpm/SPECS/python-schedutils.spec b/rpm/SPECS/python-schedutils.spec +index 24749581fd2f..084f0978a4ac 100644 +--- a/rpm/SPECS/python-schedutils.spec ++++ b/rpm/SPECS/python-schedutils.spec +@@ -4,7 +4,7 @@ + Summary: Linux scheduler python bindings + Name: python-schedutils + Version: 0.4 +-Release: 1%{?dist} ++Release: 2%{?dist} + License: GPLv2 + URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git + Source: http://userweb.kernel.org/~acme/python-schedutils/%{name}-%{version}.tar.bz2 +@@ -28,6 +28,9 @@ rm -rf %{buildroot} + mkdir -p %{buildroot}%{_bindir} + cp -p pchrt.py %{buildroot}%{_bindir}/pchrt + cp -p ptaskset.py %{buildroot}%{_bindir}/ptaskset ++mkdir -p %{buildroot}%{_mandir}/man1 ++gzip -c pchrt.1 > %{buildroot}%{_mandir}/man1/pchrt.1.gz ++gzip -c ptaskset.1 > %{buildroot}%{_mandir}/man1/ptaskset.1.gz + + %clean + rm -rf %{buildroot} +@@ -41,8 +44,14 @@ rm -rf %{buildroot} + %if "%{python_ver}" >= "2.5" + %{python_sitearch}/*.egg-info + %endif ++%{_mandir}/man1/pchrt.1.gz ++%{_mandir}/man1/ptaskset.1.gz + + %changelog ++* Tue May 10 2016 John Kacur - 0.4-2 ++- Add man pages for pchrt and ptaskset ++- Fix and update usage messages for pchrt and ptaskset ++ + * Mon Aug 1 2011 Arnaldo Carvalho de Melo - 0.4-1 + - New upstream release. + +@@ -63,8 +72,8 @@ rm -rf %{buildroot} + * Tue Jun 10 2008 Arnaldo Carvalho de Melo - 0.1-3 + - add dist to the release tag + +-* Tue Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-2 ++* Wed Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-2 + - First build into rhel5-rt + +-* Tue Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-1 ++* Wed Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-1 + - Initial package +-- +2.4.11 diff --git a/SOURCES/python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch b/SOURCES/python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch new file mode 100644 index 00000000..618efd11 --- /dev/null +++ b/SOURCES/python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch @@ -0,0 +1,103 @@ +From cfcbaa7607f0e57eedc4841c2e430a3065f13298 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 10 May 2016 16:55:43 +0200 +Subject: [PATCH 2/2] python-schedutils: Add man pages for pchrt and ptaskset + +Add some minimal man pages based on the output of --help for +pchrt and ptaskset + +Signed-off-by: John Kacur +--- + pchrt.1 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ + ptaskset.1 | 26 ++++++++++++++++++++++++++ + 2 files changed, 73 insertions(+) + create mode 100644 pchrt.1 + create mode 100644 ptaskset.1 + +diff --git a/pchrt.1 b/pchrt.1 +new file mode 100644 +index 000000000000..cc5136d4dbda +--- /dev/null ++++ b/pchrt.1 +@@ -0,0 +1,47 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.TH PCHRT 1 "May 10 2016" ++.SH NAME ++.B pchrt (python\-schedutils) \- manipulate the real-time attributes of a process ++.SH SYNOPSIS ++pchrt [options] [prio] [pid | cmd [args...]] ++.SH OPTIONS ++.TP ++.B \-b, \-\-batch ++set policy to SCHED_BATCH ++.TP ++.B \-f, \-\-fifo ++set policy to SCHED_FIFO ++.TP ++.B \-i, \-\-idle ++set policy to SCHED_IDLE ++.TP ++.B \-p, \-\-pid ++operate on existing given pid ++.TP ++.B \-m, \-\-max ++show min and max valid priorities ++.TP ++.B \-o, \-\-other ++set policy to SCHED_OTHER ++.TP ++.B \-r, \-\-rr ++set policy to SCHED_RR (default) ++.TP ++.B \-R, \-\-reset-on-fork ++set SCHED_RESET_ON_FORK for FIFO or RR ++.TP ++.B \-h, \-\-help ++display help ++.TP ++.B Note: ++You must give a priority if changing policy. ++.SH SEE ALSO ++.BR chrt (1) ++.SH AUTHOR ++pchrt was written by Arnaldo Carvalho de Melo ++.br ++as part of python\-schedutils ++.PP ++This manual page was written by John Kacur ++.PP ++Report bugs and send patches to +diff --git a/ptaskset.1 b/ptaskset.1 +new file mode 100644 +index 000000000000..022d8f8bed65 +--- /dev/null ++++ b/ptaskset.1 +@@ -0,0 +1,26 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.TH PTASKSET 1 "May 10 2016" ++.SH NAME ++.B ptaskset (python\-schedutils) \- set or get the affinity of a process ++.SH SYNOPSIS ++ptaskset [options] [mask | cpu\-list] [pid | cmd [args...]] ++.SH OPTIONS ++.TP ++.B \-p, \-\-pid ++operate on existing given pid ++.TP ++.B \-c, \-\-cpu\-list ++display and specify cpus in list format ++.TP ++.B \-h, \-\-help ++display help ++.SH SEE ALSO ++.BR taskset (1) ++.SH AUTHOR ++ptaskset was written by Arnaldo Carvalho de Melo ++.br ++as part of python\-schedutils ++.PP ++This manual page was written by John Kacur ++.PP ++Report bugs and send patches to +-- +2.4.11 diff --git a/SOURCES/python-schedutils-Correct-typos-in-usage-messages.patch b/SOURCES/python-schedutils-Correct-typos-in-usage-messages.patch new file mode 100644 index 00000000..c5a9802b --- /dev/null +++ b/SOURCES/python-schedutils-Correct-typos-in-usage-messages.patch @@ -0,0 +1,54 @@ +From 4f039736f02e3cc8d3b2240d3bb05ae6f8600dee Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 10 May 2016 15:59:31 +0200 +Subject: [PATCH 1/2] python-schedutils: Correct typos in usage messages + +Correct typos in usage messages + - "chrt" should say "pchrt" + - "taskset" should say "ptaskset" + +Also update the email address for bug reports and patches. + +Signed-off-by: John Kacur +--- + pchrt.py | 4 ++-- + ptaskset.py | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pchrt.py b/pchrt.py +index c4f1f2c5e5ec..0761792454fa 100755 +--- a/pchrt.py ++++ b/pchrt.py +@@ -18,7 +18,7 @@ import os, schedutils, sys + + def usage(): + print '''pchrt (python-schedutils) +-usage: chrt [options] [prio] [pid | cmd [args...]] ++usage: pchrt [options] [prio] [pid | cmd [args...]] + manipulate real-time attributes of a process + -b, --batch set policy to SCHED_BATCH + -f, --fifo set policy to SCHED_FIFO +@@ -32,7 +32,7 @@ manipulate real-time attributes of a process + + You must give a priority if changing policy. + +-Report bugs and send patches to ''' ++Report bugs and send patches to ''' + return + + def show_priority_limits(policy): +diff --git a/ptaskset.py b/ptaskset.py +index 15f0ec5bfa1f..afd18477f109 100755 +--- a/ptaskset.py ++++ b/ptaskset.py +@@ -18,7 +18,7 @@ import os, schedutils, sys + + def usage(): + print '''ptaskset (python-schedutils) +-usage: taskset [options] [mask | cpu-list] [pid | cmd [args...]] ++usage: ptaskset [options] [mask | cpu-list] [pid | cmd [args...]] + set or get the affinity of a process + + -p, --pid operate on existing given pid +-- +2.4.11 diff --git a/SOURCES/python-schedutils-Update-URL-in-python-schedutils.sp.patch b/SOURCES/python-schedutils-Update-URL-in-python-schedutils.sp.patch new file mode 100644 index 00000000..b6b3c8be --- /dev/null +++ b/SOURCES/python-schedutils-Update-URL-in-python-schedutils.sp.patch @@ -0,0 +1,29 @@ +From ac9a2b761feaa93b56816ad70bb823e7c984ecb4 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 30 Jun 2016 14:31:37 +0200 +Subject: [PATCH 2/2] python-schedutils: Update URL in python-schedutils.spec + +Update URL in python-schedutils.spec to show the proper location + +Signed-off-by: John Kacur +--- + rpm/SPECS/python-schedutils.spec | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rpm/SPECS/python-schedutils.spec b/rpm/SPECS/python-schedutils.spec +index 084f0978a4ac..8372a898ac1c 100644 +--- a/rpm/SPECS/python-schedutils.spec ++++ b/rpm/SPECS/python-schedutils.spec +@@ -6,8 +6,8 @@ Name: python-schedutils + Version: 0.4 + Release: 2%{?dist} + License: GPLv2 +-URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git +-Source: http://userweb.kernel.org/~acme/python-schedutils/%{name}-%{version}.tar.bz2 ++URL: https://www.kernel.org/pub/scm/libs/python/python-schedutils/python-schedutils.git ++Source: %{name}-%{version}.tar.bz2 + Group: System Environment/Libraries + BuildRequires: python-devel + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +-- +2.4.11 diff --git a/SPECS/python-schedutils.spec b/SPECS/python-schedutils.spec new file mode 100644 index 00000000..d0952b2c --- /dev/null +++ b/SPECS/python-schedutils.spec @@ -0,0 +1,105 @@ +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")} + +Summary: Linux scheduler python bindings +Name: python-schedutils +Version: 0.4 +Release: 6%{?dist} +License: GPLv2 +URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git +Source: http://userweb.kernel.org/~acme/python-schedutils/%{name}-%{version}.tar.bz2 +Group: System Environment/Libraries +BuildRequires: python-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Patch1: python-schedutils-Correct-typos-in-usage-messages.patch +Patch2: python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch +Patch3: Update-spec-file-to-install-man-pages-for-pchrt-and-.patch +Patch4: schedutils.c-added-support-for-SCHED_DEADLINE.patch +Patch5: python-schedutils-Update-URL-in-python-schedutils.sp.patch + +%description +Python interface for the Linux scheduler sched_{get,set}{affinity,scheduler} +functions and friends. + +%prep +%setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build +%{__python} setup.py build + +%install +rm -rf %{buildroot} +%{__python} setup.py install --skip-build --root %{buildroot} +mkdir -p %{buildroot}%{_bindir} +cp -p pchrt.py %{buildroot}%{_bindir}/pchrt +cp -p ptaskset.py %{buildroot}%{_bindir}/ptaskset +mkdir -p %{buildroot}%{_mandir}/man1 +gzip -c pchrt.1 > %{buildroot}%{_mandir}/man1/pchrt.1.gz +gzip -c ptaskset.1 > %{buildroot}%{_mandir}/man1/ptaskset.1.gz + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc COPYING +%{_bindir}/pchrt +%{_bindir}/ptaskset +%{python_sitearch}/schedutils.so +%if "%{python_ver}" >= "2.5" +%{python_sitearch}/*.egg-info +%endif +%{_mandir}/man1/pchrt.1.gz +%{_mandir}/man1/ptaskset.1.gz + +%changelog +* Tue Jul 05 2016 John Kacur - 0.4-6 +- python-schedutils-Update-URL-in-python-schedutils.sp.patch +- schedutils.c-added-support-for-SCHED_DEADLINE.patch +Resolves: rhbz#1298388 + +* Tue May 10 2016 John Kacur - 0.4-5 +- Add man pages for pchrt and ptaskset +- Fix and update usage messages for pchrt and ptaskset +- Resolves:rhbz#948381 + +* Fri Jan 24 2014 Daniel Mach - 0.4-4 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 0.4-3 +- Mass rebuild 2013-12-27 + +* Thu Aug 22 2013 John Kacur - 0.4-1 +- Rebuilding for rhel7.0 + +* Mon Aug 1 2011 Arnaldo Carvalho de Melo - 0.4-1 +- New upstream release. + +* Tue May 17 2011 Clark Williams - 0.3-1 +- reworked get_affinity() and set_affinity() to use dynamic CPU_* macros + +* Thu Aug 28 2008 Arnaldo Carvalho de Melo - 0.2-2 +- Fix build and install sections as suggested by the fedora rewiewer + (BZ #460387) + +* Wed Aug 27 2008 Arnaldo Carvalho de Melo - 0.2-1 +- Add get_priority_{min,max} methods +- Add constants for SCHED_{BATCH,FIFO,OTHER,RR} +- Implement get_priority method +- Add pchrt utility for testing the bindings, chrt clone +- Add ptaskset utility for testing the bindings, taskset clone + +* Tue Jun 10 2008 Arnaldo Carvalho de Melo - 0.1-3 +- add dist to the release tag + +* Wed Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-2 +- First build into rhel5-rt + +* Wed Dec 19 2007 Arnaldo Carvalho de Melo - 0.1-1 +- Initial package