<86>Jan 9 08:56:35 userdel[2557]: delete user 'rooter' <86>Jan 9 08:56:35 groupadd[2623]: group added to /etc/group: name=rooter, GID=561 <86>Jan 9 08:56:35 groupadd[2623]: group added to /etc/gshadow: name=rooter <86>Jan 9 08:56:35 groupadd[2623]: new group: name=rooter, GID=561 <86>Jan 9 08:56:35 useradd[2679]: new user: name=rooter, UID=561, GID=561, home=/root, shell=/bin/bash <86>Jan 9 08:56:35 userdel[2828]: delete user 'builder' <86>Jan 9 08:56:35 userdel[2828]: removed group 'builder' owned by 'builder' <86>Jan 9 08:56:35 userdel[2828]: removed shadow group 'builder' owned by 'builder' <86>Jan 9 08:56:35 groupadd[2962]: group added to /etc/group: name=builder, GID=562 <86>Jan 9 08:56:35 groupadd[2962]: new group: name=builder, GID=562 <86>Jan 9 08:56:35 useradd[2977]: new user: name=builder, UID=562, GID=562, home=/usr/src, shell=/bin/bash <13>Jan 9 08:56:38 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Jan 9 08:56:38 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Jan 9 08:56:38 rpmi: libtasn1-4.13-alt2 1521133850 installed <13>Jan 9 08:56:38 rpmi: libp11-kit-0.23.9-alt5 1525798298 installed <13>Jan 9 08:56:38 rpmi: rpm-macros-alternatives-0.5.0-alt1 sisyphus.219012.300 1546745004 installed <13>Jan 9 08:56:38 rpmi: alternatives-0.5.0-alt1 sisyphus.219012.300 1546745004 installed <13>Jan 9 08:56:39 rpmi: ca-certificates-2018.11.12-alt1 sisyphus.216395.300 1542114035 installed <13>Jan 9 08:56:39 rpmi: ca-trust-0.1.1-alt2 1515595785 installed <13>Jan 9 08:56:39 rpmi: p11-kit-trust-0.23.9-alt5 1525798298 installed <13>Jan 9 08:56:39 rpmi: libcrypto1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Jan 9 08:56:39 rpmi: libssl1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Jan 9 08:56:39 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Jan 9 08:56:39 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Jan 9 08:56:39 rpmi: python3-3.6.5-alt1.1 1535734576 installed <13>Jan 9 08:56:40 rpmi: python3-base-3.6.5-alt1.1 1535734576 installed <13>Jan 9 08:56:40 rpmi: libpython3-3.6.5-alt1.1 1535734576 installed <13>Jan 9 08:56:45 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus.215627.200 1540831974 installed <13>Jan 9 08:56:45 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus.215627.200 1540831974 installed <13>Jan 9 08:56:45 rpmi: python-modules-curses-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:45 rpmi: libverto-0.3.0-alt1_5 1525957714 installed <13>Jan 9 08:56:45 rpmi: libkeyutils-1.6-alt2 sisyphus.217337.100 1544003161 installed <13>Jan 9 08:56:45 rpmi: libcom_err-1.44.5-alt1 sisyphus.218838.100 1546206118 installed <86>Jan 9 08:56:45 groupadd[39608]: group added to /etc/group: name=_keytab, GID=499 <86>Jan 9 08:56:45 groupadd[39608]: group added to /etc/gshadow: name=_keytab <86>Jan 9 08:56:45 groupadd[39608]: new group: name=_keytab, GID=499 <13>Jan 9 08:56:45 rpmi: libkrb5-1.16.2-alt2 sisyphus.216877.200 1543483297 installed <13>Jan 9 08:56:45 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Jan 9 08:56:45 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Jan 9 08:56:45 rpmi: python-modules-email-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:45 rpmi: python-modules-unittest-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:45 rpmi: python-modules-nis-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-encodings-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-compiler-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-xml-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-hotshot-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-bsddb-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-ctypes-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-multiprocessing-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-logging-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: python-modules-distutils-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:46 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>Jan 9 08:56:46 rpmi: python-dev-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:47 rpmi: python-tools-2to3-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Jan 9 08:56:47 rpmi: python3-dev-3.6.5-alt1.1 1535734576 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-texttemplate-0.2.0-alt3.2.nosrc.rpm <13>Jan 9 08:56:50 rpmi: python3-module-pkg_resources-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed <13>Jan 9 08:56:50 rpmi: python-module-pkg_resources-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed <13>Jan 9 08:56:50 rpmi: python-module-setuptools-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed <13>Jan 9 08:56:50 rpmi: python3-module-setuptools-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed Installing python-module-texttemplate-0.2.0-alt3.2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.63715 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-texttemplate-0.2.0 + echo 'Source #0 (python-module-texttemplate-0.2.0.tar):' Source #0 (python-module-texttemplate-0.2.0.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-texttemplate-0.2.0.tar + cd python-module-texttemplate-0.2.0 + /bin/chmod -c -Rf u+rwX,go-w . + rm -rf ../python3 + cp -a . ../python3 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.39654 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-texttemplate-0.2.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/python setup.py build running build running build_py creating build creating build/lib copying texttemplate.py -> build/lib + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-texttemplate-0.2.0 + 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: Refactored ./texttemplate.py RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./Examples/Tutorial_1.py RefactoringTool: Files that were modified: RefactoringTool: ./texttemplate.py RefactoringTool: ./setup.py RefactoringTool: ./Examples/Tutorial_1.py --- ./texttemplate.py (original) +++ ./texttemplate.py (refactored) @@ -84,8 +84,8 @@ return else: break - raise ParseError, "Can't process separator 'sep:%s': " \ - "no matching Repeater node found." % element.nodeName + raise ParseError("Can't process separator 'sep:%s': " \ + "no matching Repeater node found." % element.nodeName) # event handlers @@ -93,10 +93,10 @@ # Called when parser finds an open tag, e.g. {con:foo}. If tag is self- # closing, e.g. {con:bar/}, closeTag() is called immediately after. if nodeName in self.__invalidNodeNames: - raise ParseError, 'Invalid node name: %r' % nodeName + raise ParseError('Invalid node name: %r' % nodeName) if nodeName in self.__outputStack[-1].elementNames and \ nodeType != 'sep': - raise ParseError, 'Duplicate node name: %r' % nodeName + raise ParseError('Duplicate node name: %r' % nodeName) self.__outputStack.append(ElementCollector(nodeType, nodeName)) def closeTag(self, nodeType, nodeName): @@ -117,8 +117,8 @@ # Returns a list of top-level nodes and interstitial strings. element = self.__outputStack.pop() if element.nodeType != 'tem': - raise ParseError, "Can't complete template: node '%s:%s' wasn't " \ - "correctly closed." % (element.nodeType, element.nodeName) + raise ParseError("Can't complete template: node '%s:%s' wasn't " \ + "correctly closed." % (element.nodeType, element.nodeName)) return element.content ## @@ -166,7 +166,7 @@ """ def __readOnly(self, val): - raise RuntimeError, "Property is read-only." + raise RuntimeError("Property is read-only.") nodetype = property(lambda self:self._nodeType, __readOnly, doc="str (r/o) -- the node's type (con/rep/tem)") @@ -312,19 +312,19 @@ try: return self.__nodesDict[name] except KeyError: - raise AttributeError , "%s instance has no attribute %r." % ( - self.__class__.__name__, name) + raise AttributeError("%s instance has no attribute %r." % ( + self.__class__.__name__, name)) def __setitem__(self, name, value): """Replace sub-node, e.g. node['foo'] = newNode""" - if self.__nodesDict.has_key(name): + if name in self.__nodesDict: if not isinstance(value, Node): # Note: This type check is to catch careless user # mistakes like 'node.foo = "text"' instead of # 'node.foo.content = "text"' - raise TypeError, "Can't replace node '%s:%s': value isn't " \ + raise TypeError("Can't replace node '%s:%s': value isn't " \ "a Node object." % (self.__nodesDict[name]._nodeName, - self.__nodesDict[name]._nodeName) + self.__nodesDict[name]._nodeName)) value = value._clone() value._nodeName = name idx = self.__nodesList.index(self.__nodesDict[name]) @@ -434,6 +434,6 @@ # assigned values at point of origin, but much cheaper return ''.join(collector) except TypeError: - raise TypeError, "Can't render template: some node's content " \ - "was set to a non-text value." - + raise TypeError("Can't render template: some node's content " \ + "was set to a non-text value.") + --- ./Examples/Tutorial_1.py (original) +++ ./Examples/Tutorial_1.py (refactored) @@ -32,4 +32,4 @@ title = 'Balderdash Pro 5' descriptions = ['New Extended Fubbilizer', 'Updated Super Knobitzer', 'Enhanced Virbiled Noxinator'] -print renderTemplate(title, descriptions) +print(renderTemplate(title, descriptions)) + sed -i 's|/usr/bin/python|/usr/bin/python3|' Examples/Tutorial_1.py + 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 running build running build_py creating build creating build/lib copying texttemplate.py -> build/lib + popd ~/RPM/BUILD/python-module-texttemplate-0.2.0 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.77441 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-texttemplate-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-texttemplate-buildroot + cd python-module-texttemplate-0.2.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/python setup.py install --skip-build --root=/usr/src/tmp/python-module-texttemplate-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-texttemplate-buildroot creating /usr/src/tmp/python-module-texttemplate-buildroot/usr creating /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib creating /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages copying build/lib/texttemplate.py -> /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages byte-compiling /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages/texttemplate.py to texttemplate.pyc running install_egg_info Writing /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages/texttemplate-0.2.0-py2.7.egg-info + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-texttemplate-0.2.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/python-module-texttemplate-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages copying build/lib/texttemplate.py -> /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages byte-compiling /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/texttemplate.py to texttemplate.cpython-36.pyc running install_egg_info Writing /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/texttemplate-0.2.0-py3.6.egg-info + popd ~/RPM/BUILD/python-module-texttemplate-0.2.0 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-texttemplate-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python-module-texttemplate-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python-module-texttemplate-buildroot/ (default) Compressing files in /usr/src/tmp/python-module-texttemplate-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-texttemplate-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-texttemplate-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python-module-texttemplate-buildroot using /usr/bin/python unlink /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages/texttemplate.pyc compile /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages/texttemplate.py Bytecompiling python modules with optimization in /usr/src/tmp/python-module-texttemplate-buildroot using /usr/bin/python -O compile /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python2.7/site-packages/texttemplate.py Bytecompiling python3 modules in /usr/src/tmp/python-module-texttemplate-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/__pycache__/texttemplate.cpython-36.pyc compile /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/texttemplate.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python-module-texttemplate-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/texttemplate.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python-module-texttemplate-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python-module-texttemplate-buildroot/usr/lib/python3/site-packages/texttemplate.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/__pycache__/texttemplate.cpython-36.opt-1.pyc' => './usr/lib/python3/site-packages/__pycache__/texttemplate.cpython-36.pyc' Hardlinking identical .pyc and .pyo files './usr/lib/python2.7/site-packages/texttemplate.pyo' => './usr/lib/python2.7/site-packages/texttemplate.pyc' Processing files: python-module-texttemplate-0.2.0-alt3.2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.5816 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-texttemplate-0.2.0 + DOCDIR=/usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + export DOCDIR + rm -rf /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + /bin/mkdir -p /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + cp -prL README.txt Documentation Examples /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + chmod -R go-w /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + chmod -R a+rX /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python-module-texttemplate-0.2.0 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.BWw35D find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.V13B3F find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) Provides: python2.7(texttemplate) Requires: /usr/lib/python2.7/site-packages, python-base, python2.7(keyword) Processing files: python3-module-texttemplate-0.2.0-alt3.2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.35924 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-texttemplate-0.2.0 + DOCDIR=/usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + export DOCDIR + rm -rf /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + /bin/mkdir -p /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + cp -prL README.txt Documentation ../python3/Examples /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + chmod -R go-w /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + chmod -R a+rX /usr/src/tmp/python-module-texttemplate-buildroot/usr/share/doc/python3-module-texttemplate-0.2.0 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.Tj6bEY find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.Jycmey find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) Provides: python3(texttemplate) Requires: /usr/lib/python3/site-packages, python3(keyword) < 0, python3(re) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python-module-texttemplate-0.2.0-alt3.2.noarch.rpm Wrote: /usr/src/RPM/RPMS/noarch/python3-module-texttemplate-0.2.0-alt3.2.noarch.rpm 9.21user 3.02system 0:26.30elapsed 46%CPU (0avgtext+0avgdata 14416maxresident)k 0inputs+0outputs (0major+190533minor)pagefaults 0swaps 22.84user 6.15system 0:53.27elapsed 54%CPU (0avgtext+0avgdata 121684maxresident)k 0inputs+0outputs (0major+794609minor)pagefaults 0swaps