We should not be maintaining specfiles upstream, they should be
maintained in the distributions instead.
Also, a lot of the functionality in the Makefile was for working with
rpms. This is not needed anymore because there are other tools that do
this. So, the Makefile was gutted, leaving just a few things like making
tags.
Finally, for version 0.7.2, the version numbers were not bumped-up to
match the git tag. Therefore, bumping version numbers up to 0.7.3 and
creating a new git tag v0.7.3
Signed-off-by: John Kacur <jkacur(a)redhat.com>
---
Makefile | 42 ++-----
procfs/procfs.py | 2 +-
rpm/SPECS/python-linux-procfs.spec | 177 -----------------------------
setup.py | 2 +-
4 files changed, 9 insertions(+), 214 deletions(-)
delete mode 100644 rpm/SPECS/python-linux-procfs.spec
diff --git a/Makefile b/Makefile
index b29f968b726f..6819214adea4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,42 +1,14 @@
-PACKAGE := python-linux-procfs
-VERSION := $(shell rpm -q --qf '%{VERSION}' --specfile
rpm/SPECS/$(PACKAGE).spec)
-
-rpmdirs:
- @[ -d rpm/BUILD ] || mkdir rpm/BUILD
- @[ -d rpm/RPMS ] || mkdir rpm/RPMS
- @[ -d rpm/SRPMS ] || mkdir rpm/SRPMS
- @[ -d rpm/SOURCES ] || mkdir rpm/SOURCES
-
-bz2: rpmdirs
- git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD | \
- bzip2 -9 > rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2
-
-rpm: bz2 rpmdirs
- rpmbuild -ba --define "_topdir $(PWD)/rpm" rpm/SPECS/$(PACKAGE).spec
-
-bz2dev: rpmdirs
- @mkdir -p /tmp/$(PACKAGE)-$(VERSION)
- @tar cf - `cat MANIFEST` | (cd /tmp/$(PACKAGE)-$(VERSION) ; tar xf -)
- @(cd /tmp; tar cf - $(PACKAGE)-$(VERSION)) | bzip2 -9 >
rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2
-
-rpmdev: bz2dev rpmdirs
- rpmbuild -ba --define "_topdir $(PWD)/rpm" rpm/SPECS/$(PACKAGE).spec
-
-rpmclean:
- @rm -f rpm/RPMS/*/$(PACKAGE)-$(VERSION)-*.rpm
- @rm -f rpm/SRPMS/$(PACKAGE)-$(VERSION)-*.src.rpm
- @rm -f rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2
- @rm -rf rpm/BUILD/$(PACKAGE)-$(VERSION)*
-
-pyclean:
- @find . -type f \( -name \*~ -o -name \*.pyc \) -delete
-
+CTAGS_EXTRA := $(shell ctags --version 2>&1 | grep -iq universal && echo
extras || echo extra)
.PHONY: tags
tags:
- ctags -R --extra=+fq --python-kinds=+cfmvi
+ ctags -R --$(CTAGS_EXTRA)=+fq --python-kinds=+cfmvi
.PHONY: cleantags
cleantags:
rm -f tags
-clean: pyclean rpmclean cleantags
+.PHONY: pyclean
+pyclean:
+ @find . -type f \( -name \*~ -o -name \*.pyc \) -delete
+
+clean: pyclean cleantags
diff --git a/procfs/procfs.py b/procfs/procfs.py
index e5204cda3a06..7cc7371b53e2 100755
--- a/procfs/procfs.py
+++ b/procfs/procfs.py
@@ -14,7 +14,7 @@ from functools import reduce
from six.moves import range
from procfs.utilist import bitmasklist
-VERSION = "0.7.1"
+VERSION = "0.7.3"
def is_s390():
diff --git a/rpm/SPECS/python-linux-procfs.spec b/rpm/SPECS/python-linux-procfs.spec
deleted file mode 100644
index be3d56da7943..000000000000
--- a/rpm/SPECS/python-linux-procfs.spec
+++ /dev/null
@@ -1,177 +0,0 @@
-%if 0%{?fedora}
-%global with_python3 1
-%else
-%global without_python3 1
-%endif
-
-Name: python-linux-procfs
-Version: 0.7.1
-Release: 1%{?dist}
-License: GPLv2
-Summary: Linux /proc abstraction classes
-Group: System Environment/Libraries
-Source:
https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version...
-URL:
https://rt.wiki.kernel.org/index.php/Tuna
-BuildArch: noarch
-BuildRequires: python2-devel
-BuildRequires: python-setuptools
-%if 0%{?with_python3}
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-%endif
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
-%global _description\
-Abstractions to extract information from the Linux kernel /proc files.
-
-%description %_description
-
-%package -n python2-linux-procfs
-Summary: %summary
-%{?python_provide:%python_provide python2-linux-procfs}
-
-Requires: python-six
-
-%description -n python2-linux-procfs %_description
-
-%if 0%{?with_python3}
-%package -n python3-linux-procfs
-Summary: %summary
-%{?python_provide:%python_provide python3-linux-procfs}
-
-Requires: python3-six
-
-%description -n python3-linux-procfs %_description
-%endif
-
-%prep
-%autosetup -p1
-
-%build
-%py2_build
-%if 0%{?with_python3}
-%py3_build
-%endif
-
-%install
-rm -rf %{buildroot}
-%py2_install
-%if 0%{?with_python3}
-%py3_install
-%endif
-
-%clean
-rm -rf %{buildroot}
-
-%files -n python2-linux-procfs
-%defattr(0755,root,root,0755)
-%{python2_sitelib}/procfs/
-%if 0%{?without_python3}
-%{_bindir}/pflags
-%endif
-%defattr(0644,root,root,0755)
-%{python2_sitelib}/python_linux_procfs*.egg-info
-%license COPYING
-
-%if 0%{?with_python3}
-%files -n python3-linux-procfs
-%defattr(0755,root,root,0755)
-%{_bindir}/pflags
-%{python3_sitelib}/procfs/
-%defattr(0644,root,root,0755)
-%{python3_sitelib}/python_linux_procfs*.egg-info
-%license COPYING
-%endif
-
-%changelog
-* Fri Nov 18 2022 John Kacur <jkacur(a)redhat.com> - 0.7.1-1
-- python-linux-procfs: Correct VERSION number in procfs.py
-- python-linux-procfs: Use f-strings
-- python-linux-procfs: Add missing open in with statement
-- python-linux-procfs: Use sys.exit and add some docstrings
-
-* Mon Jan 10 2022 John Kacur <jkacur(a)redhat.com> - 0.7.0-1
-- python-linux-procfs: Add tar.xz and asc files to gitignore
-- python-linux-procfs: Fix traceback with non-utf8 chars in the
- /proc/PID/cmdline
-- python-linux-procfs: Propagate error to user if a pid is completed
-- python-linux-procfs: pflags: Handle pids that completed
-- python-linux-procfs: Makefile: Add ctags
-- python-linux-procfs: Remove procfs/sysctl.py
-- python-linux-procfs: Various clean-ups
-- python-linux-procfs: Fix UnicodeDecodeError
-
-* Mon Jan 11 2021 John Kacur <jkacur(a)redhat.com> - 0.6.3-1
-- python-linux-procfs: Fix more spacing problems with procfs.py
-- python-linux-procfs: procfs.py: Simplify is_s390
-- python-linux-procfs: procfs.py: Fix a few more style problems
-
-* Mon Jun 22 2020 John Kacur <jkacur(a)redhat.com> - 0.6.2-1
-- Add bitmasklist_test
-- clean-ups for recent python formating regarding spacing, tabs, etc
-- Fix to parse the number of cpus correctly on s390(x)
-
-* Fri Jan 11 2019 Jiri Kastner <jkastner(a)redhat.com> - 0.6.1-1
-- python3 fixes
-
-* Thu Aug 9 2018 Jiri Kastner <jkastner(a)redhat.com> - 0.6-1
-- moved cannot)set*affinity calls from tuna
-
-* Tue Nov 21 2017 Jiri Kastner <jkastner(a)redhat.com> - 0.5.1-1
-- missed snippet in specfile for python2 only
-- added scripts to setup.py, pflags renamed and added to setup.py
-
-* Mon Nov 20 2017 Jiri Kastner <jkastner(a)redhat.com> - 0.5-1
-- added python3 support
-
-* Tue Sep 26 2017 Jiri Kastner <jkastner(a)redhat.com> - 0.4.11-1
-- fixed rpmlint compliants (url, source)
-
-* Thu Dec 22 2016 Jiri Kastner <jkastner(a)redhat.com> - 0.4.10-1
-- fixed affinity parsing with cpu numbers greater than 31
-- added test for fix above
-
-* Thu Oct 8 2015 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.9-1
-- Adds documentations to classes, more work to do on methods
-- Fixes parsing of users in /proc/interrupts users field
-- Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1245677
-
-* Tue Jun 23 2015 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.8-1
-- Support spaces in COMM names
-- Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1232394
-
-* Thu Jun 11 2015 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.7-1
-- Fix pidstat.process_flag()
-- Introduce pflags utility
-- Parse IRQ affinities for !root
-- Add PF_NO_SETAFFINITY const
-
-* Wed Jun 5 2013 Jiri Kastner <jkastner(a)redhat.com> - 0.4.6-1
-- support for parsing cgroups
-- support for parsing environ variables
-
-* Mon May 10 2010 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.5-1
-- Fix
https://bugzilla.redhat.com/show_bug.cgi?id=577365
-
-* Mon Feb 10 2009 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.4-1
-- Even more fixes due to the fedora review process
-
-* Mon Feb 9 2009 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.3-1
-- Fixups due to the fedora review process
-
-* Tue Aug 12 2008 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4.2-1
-- interrupts: Add find_by_user_regex
-- process: Always set the "cmdline" array, even if empty
-- pidstats: Remove dead processes in find_by_name()
-- pidstats: Add process class to catch dict references for late parsing
-- pidstats: Move the /proc/PID/{stat,status} parsing to classes
-- pidstats: Introduce process_flags method
-
-* Tue Aug 12 2008 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.4-1
-- Per process flags needed by tuna
-
-* Fri Jun 13 2008 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.3-1
-- Support CPU hotplug
-
-* Mon Feb 25 2008 Arnaldo Carvalho de Melo <acme(a)redhat.com> - 0.1-1
-- package created
diff --git a/setup.py b/setup.py
index 31b94d1d166e..144e07e69e14 100755
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ if not SCHEME in sysconfig.get_scheme_names():
PYTHONLIB = relpath(sysconfig.get_path('platlib', SCHEME), '/usr')
setup(name="python-linux-procfs",
- version = "0.7.1",
+ version = "0.7.3",
description = "Linux /proc abstraction classes",
author = "Arnaldo Carvalho de Melo",
author_email = "acme(a)redhat.com",
--
2.41.0