<86>Apr 29 09:18:20 userdel[180316]: delete user 'rooter' <86>Apr 29 09:18:20 userdel[180316]: removed group 'rooter' owned by 'rooter' <86>Apr 29 09:18:20 userdel[180316]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 29 09:18:20 groupadd[180329]: group added to /etc/group: name=rooter, GID=624 <86>Apr 29 09:18:20 groupadd[180329]: group added to /etc/gshadow: name=rooter <86>Apr 29 09:18:20 groupadd[180329]: new group: name=rooter, GID=624 <86>Apr 29 09:18:20 useradd[180336]: new user: name=rooter, UID=624, GID=624, home=/root, shell=/bin/bash <86>Apr 29 09:18:20 userdel[180347]: delete user 'builder' <86>Apr 29 09:18:20 userdel[180347]: removed group 'builder' owned by 'builder' <86>Apr 29 09:18:20 userdel[180347]: removed shadow group 'builder' owned by 'builder' <86>Apr 29 09:18:20 groupadd[180356]: group added to /etc/group: name=builder, GID=625 <86>Apr 29 09:18:20 groupadd[180356]: group added to /etc/gshadow: name=builder <86>Apr 29 09:18:20 groupadd[180356]: new group: name=builder, GID=625 <86>Apr 29 09:18:20 useradd[180366]: new user: name=builder, UID=625, GID=625, home=/usr/src, shell=/bin/bash <13>Apr 29 09:18:23 rpmi: rpm-macros-python3-0.1.14-alt1 sisyphus+270922.100.1.1 1619661227 installed <13>Apr 29 09:18:23 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Apr 29 09:18:23 rpmi: libexpat-2.2.10-alt1 sisyphus+259966.100.1.1 1602824518 installed <13>Apr 29 09:18:23 rpmi: libp11-kit-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Apr 29 09:18:23 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>Apr 29 09:18:23 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Apr 29 09:18:23 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Apr 29 09:18:24 rpmi: ca-certificates-2021.03.24-alt1 sisyphus+268304.300.1.1 1616591829 installed <13>Apr 29 09:18:24 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Apr 29 09:18:24 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Apr 29 09:18:24 rpmi: libcrypto1.1-1.1.1k-alt1 sisyphus+268375.100.1.1 1616684255 installed <13>Apr 29 09:18:24 rpmi: libssl1.1-1.1.1k-alt1 sisyphus+268375.100.1.1 1616684255 installed <13>Apr 29 09:18:24 rpmi: python3-3.9.4-alt1 sisyphus+268966.100.1.1 1617609166 installed <13>Apr 29 09:18:25 rpmi: python3-base-3.9.4-alt1 sisyphus+268966.100.1.1 1617609166 installed <13>Apr 29 09:18:25 rpmi: libpython3-3.9.4-alt1 sisyphus+268966.100.1.1 1617609166 installed <13>Apr 29 09:18:25 rpmi: tests-for-installed-python3-pkgs-0.1.14-alt1 sisyphus+270922.100.1.1 1619661227 installed <13>Apr 29 09:18:25 rpmi: rpm-build-python3-0.1.14-alt1 sisyphus+270922.100.1.1 1619661227 installed <13>Apr 29 09:18:29 rpmi: libpython-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python2-base-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-encodings-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-compiler-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-email-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-unittest-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-ctypes-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-multiprocessing-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:29 rpmi: python-modules-logging-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed <13>Apr 29 09:18:30 rpmi: python-tools-2to3-2.7.18-alt5 sisyphus+270920.100.1.1 1619657728 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-django-reportato-1.0-alt3.nosrc.rpm (w1.gzdio) <13>Apr 29 09:18:33 rpmi: python3-module-pkg_resources-1:56.0.0-alt1 sisyphus+269911.100.2.1 1618475070 installed <13>Apr 29 09:18:33 rpmi: libtinfo-devel-6.2.20210123-alt1 sisyphus+265425.100.1.1 1611851433 installed <13>Apr 29 09:18:33 rpmi: libncurses-devel-6.2.20210123-alt1 sisyphus+265425.100.1.1 1611851433 installed <13>Apr 29 09:18:33 rpmi: python3-dev-3.9.4-alt1 sisyphus+268966.100.1.1 1617609166 installed <13>Apr 29 09:18:33 rpmi: python3-module-setuptools-1:56.0.0-alt1 sisyphus+269911.100.2.1 1618475070 installed Installing python3-module-django-reportato-1.0-alt3.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.39022 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-django-reportato-1.0 + echo 'Source #0 (python3-module-django-reportato-1.0.tar):' Source #0 (python3-module-django-reportato-1.0.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-django-reportato-1.0.tar + cd python3-module-django-reportato-1.0 + /bin/chmod -c -Rf u+rwX,go-w . + echo 'Patch #0 (port-on-new-django.patch):' Patch #0 (port-on-new-django.patch): + /usr/bin/patch -p1 patching file reportato/reporters.py + find ./ -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./setup.py RefactoringTool: No changes to ./runtests.py RefactoringTool: Refactored ./reportato/reporters.py RefactoringTool: No changes to ./reportato/views.py RefactoringTool: Refactored ./reportato/utils.py RefactoringTool: Refactored ./reportato/tests.py --- ./reportato/reporters.py (original) +++ ./reportato/reporters.py (refactored) @@ -74,9 +74,7 @@ return new_class -class ModelReporter(object): - __metaclass__ = ModelReporterMetaclass - +class ModelReporter(object, metaclass=ModelReporterMetaclass): def __init__(self, items=None, visible_fields=None): """ `items` is expected to be an iterable with Django model instances, @@ -98,14 +96,14 @@ """ Returns a sorted list with the field's headers """ - return [v for k, v in self.headers.iteritems() if k in self.visible_fields] + return [v for k, v in self.headers.items() if k in self.visible_fields] def get_rows(self): """ Returns an iterable with the different rows of the given queryset / list """ for item in self.items: - yield self.get_row(item).values() + yield list(self.get_row(item).values()) def get_row(self, instance): """ @@ -126,11 +124,11 @@ value = getattr(instance, name, None) if value is None: - return u'' + return '' if isinstance(value, Manager): - return u', '.join(map(unicode, value.all())) + return ', '.join(map(str, value.all())) - return unicode(value) + return str(value) def _render_field(self, instance, name): """ --- ./reportato/utils.py (original) +++ ./reportato/utils.py (refactored) @@ -3,7 +3,7 @@ import csv, codecs try: - from cStringIO import StringIO + from io import StringIO except ImportError: from io import StringIO --- ./reportato/tests.py (original) +++ ./reportato/tests.py (refactored) @@ -133,7 +133,7 @@ self.assertEqual( set(reporter.fields), - set(['codename', 'content_type', u'id', 'name']) + set(['codename', 'content_type', 'id', 'name']) ) def test_reporter_gets_given_model_fields(self): @@ -157,7 +157,7 @@ self.assertEqual( set(reporter.get_header_row()), - set([u'Codename', u'Content type', u'Id', u'Name']) + set(['Codename', 'Content type', 'Id', 'Name']) ) def test_custom_headers(self): @@ -165,7 +165,7 @@ self.assertEqual( set(reporter.get_header_row()), - set([u'Codename', u'Content type', u'Key', u'Foo']) + set(['Codename', 'Content type', 'Key', 'Foo']) ) def test_row_generation_with_all_fields(self): @@ -178,8 +178,8 @@ self.assertEqual( reporter.get_row(permission), { - 'codename': u'add_permission', 'content_type': u'permission', - u'id': u'1', 'name': u'Can add permission', + 'codename': 'add_permission', 'content_type': 'permission', + 'id': '1', 'name': 'Can add permission', } ) @@ -192,9 +192,9 @@ self.assertEqual( [row for row in reporter.get_rows()], [ - [u'1', u'Can add permission', u'permission', u'add_permission'], - [u'2', u'Can change permission', u'permission', u'change_permission'], - [u'3', u'Can delete permission', u'permission', u'delete_permission'], + ['1', 'Can add permission', 'permission', 'add_permission'], + ['2', 'Can change permission', 'permission', 'change_permission'], + ['3', 'Can delete permission', 'permission', 'delete_permission'], ] ) @@ -263,7 +263,7 @@ self.assertEqual( [row for row in reporter.get_rows()], [ - [u'foo', u'auth | permission | Can add permission, auth | permission | Can change permission, auth | permission | Can delete permission'], + ['foo', 'auth | permission | Can add permission, auth | permission | Can change permission, auth | permission | Can delete permission'], ] ) @@ -305,14 +305,14 @@ class MockUWARNING: couldn't encode ./reportato/tests.py's diff for your terminal RefactoringTool: Files that were modified: RefactoringTool: ./setup.py RefactoringTool: ./runtests.py RefactoringTool: ./reportato/reporters.py RefactoringTool: ./reportato/views.py RefactoringTool: ./reportato/utils.py RefactoringTool: ./reportato/tests.py ser(object): number = 0 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.62957 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-django-reportato-1.0 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/reportato copying reportato/reporters.py -> build/lib/reportato copying reportato/views.py -> build/lib/reportato copying reportato/utils.py -> build/lib/reportato copying reportato/tests.py -> build/lib/reportato copying reportato/models.py -> build/lib/reportato copying reportato/__init__.py -> build/lib/reportato + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.23892 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-django-reportato-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-django-reportato-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd python3-module-django-reportato-1.0 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-django-reportato-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-django-reportato-buildroot creating /usr/src/tmp/python3-module-django-reportato-buildroot/usr creating /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib creating /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/__init__.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/models.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/tests.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/utils.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/views.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato copying build/lib/reportato/reporters.py -> /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/__init__.py to __init__.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/models.py to models.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/tests.py to tests.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/utils.py to utils.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/views.py to views.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/reportato/reporters.py to reporters.cpython-39.pyc running install_egg_info running egg_info creating django_reportato.egg-info writing django_reportato.egg-info/PKG-INFO writing dependency_links to django_reportato.egg-info/dependency_links.txt writing top-level names to django_reportato.egg-info/top_level.txt writing manifest file 'django_reportato.egg-info/SOURCES.txt' adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*') reading manifest file 'django_reportato.egg-info/SOURCES.txt' writing manifest file 'django_reportato.egg-info/SOURCES.txt' Copying django_reportato.egg-info to /usr/src/tmp/python3-module-django-reportato-buildroot/usr/lib/python3/site-packages/django_reportato-1.0-py3.9.egg-info running install_scripts + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-django-reportato-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-django-reportato-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-django-reportato-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-django-reportato-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-django-reportato-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-django-reportato-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python3-module-django-reportato-buildroot using /usr/bin/python2.7 /usr/bin/python2.7: can't open file '/usr/lib/rpm/python.compileall.py': [Errno 2] No such file or directory error: Bad exit status from /usr/src/tmp/rpm-tmp.23892 (%install) RPM build errors: Bad exit status from /usr/src/tmp/rpm-tmp.23892 (%install) Command exited with non-zero status 1 4.86user 0.46system 0:05.25elapsed 101%CPU (0avgtext+0avgdata 19344maxresident)k 0inputs+0outputs (0major+59412minor)pagefaults 0swaps hsh-rebuild: rebuild of `python3-module-django-reportato-1.0-alt3.src.rpm' failed. Command exited with non-zero status 1 16.67user 7.65system 0:23.07elapsed 105%CPU (0avgtext+0avgdata 107220maxresident)k 9520inputs+0outputs (0major+475325minor)pagefaults 0swaps