<86>Apr 14 01:01:13 userdel[10943]: delete user 'rooter' <86>Apr 14 01:01:13 groupadd[10969]: group added to /etc/group: name=rooter, GID=573 <86>Apr 14 01:01:13 groupadd[10969]: group added to /etc/gshadow: name=rooter <86>Apr 14 01:01:13 groupadd[10969]: new group: name=rooter, GID=573 <86>Apr 14 01:01:13 useradd[10995]: new user: name=rooter, UID=573, GID=573, home=/root, shell=/bin/bash <86>Apr 14 01:01:13 userdel[11040]: delete user 'builder' <86>Apr 14 01:01:13 userdel[11040]: removed group 'builder' owned by 'builder' <86>Apr 14 01:01:13 userdel[11040]: removed shadow group 'builder' owned by 'builder' <86>Apr 14 01:01:13 groupadd[11069]: group added to /etc/group: name=builder, GID=574 <86>Apr 14 01:01:13 groupadd[11069]: group added to /etc/gshadow: name=builder <86>Apr 14 01:01:13 groupadd[11069]: new group: name=builder, GID=574 <86>Apr 14 01:01:13 useradd[11162]: new user: name=builder, UID=574, GID=574, home=/usr/src, shell=/bin/bash <13>Apr 14 01:01:16 rpmi: libtcl-8.5.9-alt2 1351878901 installed <13>Apr 14 01:01:16 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 14 01:01:16 rpmi: tcl-8.5.9-alt2 1351878901 installed <13>Apr 14 01:01:16 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 14 01:01:16 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 14 01:01:16 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 14 01:01:16 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 14 01:01:16 rpmi: libpng15-1.5.28-alt1 1484572014 installed <13>Apr 14 01:01:16 rpmi: libgraphite2-1.3.10-alt0.M80P.1 1496411360 installed <13>Apr 14 01:01:16 rpmi: libXdmcp-1.1.1-alt1 1334617699 installed <13>Apr 14 01:01:16 rpmi: libXau-1.0.8-alt1 1369565807 installed <13>Apr 14 01:01:16 rpmi: libxcb-1.12-alt2 p8.218219.300 1545313310 installed <13>Apr 14 01:01:16 rpmi: libX11-locales-3:1.6.3-alt1 1431956885 installed <13>Apr 14 01:01:16 rpmi: libX11-3:1.6.3-alt1 1431956911 installed <13>Apr 14 01:01:16 rpmi: libXrender-0.9.8-alt1 1371312110 installed <13>Apr 14 01:01:16 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 14 01:01:16 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 14 01:01:16 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 14 01:01:16 groupadd[19798]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 14 01:01:16 groupadd[19798]: group added to /etc/gshadow: name=_keytab <86>Apr 14 01:01:16 groupadd[19798]: new group: name=_keytab, GID=499 <13>Apr 14 01:01:16 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 14 01:01:16 rpmi: libharfbuzz-1.6.3-alt0.M80P.1 1509918814 installed <13>Apr 14 01:01:16 rpmi: libfreetype-2.8-alt0.M80P.3 1505462817 installed <13>Apr 14 01:01:16 rpmi: fontconfig-2.12.6-alt1.M80P.1 1506008910 installed Updating fonts cache: <29>Apr 14 01:01:17 fontconfig: Updating fonts cache: succeeded [ DONE ] <13>Apr 14 01:01:17 rpmi: libXft-2.3.2-alt1 1409902650 installed <13>Apr 14 01:01:17 rpmi: libtk-8.5.9-alt3 1308047279 installed <13>Apr 14 01:01:18 rpmi: tk-8.5.9-alt3 1308047279 installed <13>Apr 14 01:01:18 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:01:18 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:01:18 rpmi: python3-modules-curses-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:01:18 rpmi: python3-modules-tkinter-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:01:19 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 14 01:01:19 rpmi: python3-tools-3.5.4-alt2.M80P.1 1527753911 installed Installing python3-module-config-0.3.9-alt2.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.30902 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf config-0.3.9 + echo 'Source #0 (config-0.3.9.tar.gz):' Source #0 (config-0.3.9.tar.gz): + /bin/gzip -dc /usr/src/RPM/SOURCES/config-0.3.9.tar.gz + /bin/tar -xf - + cd config-0.3.9 + /bin/chmod -c -Rf u+rwX,go-w . + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.16492 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd config-0.3.9 + python3-2to3 -w . RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./config.py RefactoringTool: Refactored ./logconfig.py RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./test_config.py --- ./config.py (original) +++ ./config.py (refactored) @@ -195,7 +195,7 @@ if (size == 0) or (self.encoding is None): rv = self.stream.read(size) else: - rv = u'' + rv = '' while size > 0: rv += self.stream.read(1) size -= 1 @@ -208,7 +208,7 @@ if self.encoding is None: line = '' else: - line = u'' + line = '' while True: c = self.stream.read(1) if c: @@ -483,7 +483,7 @@ #if name == "__class__": # return '' data = object.__getattribute__(self, "data") - useData = data.has_key(name) + useData = name in data if useData: rv = getattr(data, name) else: @@ -493,7 +493,7 @@ return rv def iteritems(self): - for key in self.keys(): + for key in list(self.keys()): yield(key, self[key]) raise StopIteration @@ -556,7 +556,7 @@ return len(object.__getattribute__(self, 'order')) def __iter__(self): - return self.iterkeys() + return iter(self.keys()) def iterkeys(self): order = object.__getattribute__(self, 'order') @@ -629,7 +629,7 @@ self.os = os def __repr__(self): - return "" % ','.join(self.__dict__.keys()) + return "" % ','.join(list(self.__dict__.keys())) def __init__(self, streamOrFile=None, parent=None): """ @@ -730,7 +730,7 @@ s = 'self.' + path try: return eval(s) - except Exception, e: + except Exception as e: raise ConfigError(str(e)) class Sequence(Container): @@ -749,7 +749,7 @@ def __iter__(self): return self - def next(self): + def __next__(self): if self.index >= self.limit: raise StopIteration rv = self.seq[self.index] @@ -845,7 +845,7 @@ data = object.__getattribute__(self, 'data') comments = object.__getattribute__(self, 'comments') indstr = indent * ' ' - for i in xrange(0, len(data)): + for i in range(0, len(data)): value = data[i] comment = comments[i] if comment: @@ -1305,7 +1305,7 @@ value = True try: parent.addMapping(key, value, comment) - except Exception, e: + except Exception as e: raise ConfigFormatError("%s: %s, %r" % (self.location(), e, self.token[1])) tt = self.token[0] @@ -1593,8 +1593,8 @@ @param map2: The mapping to merge. @type map2: L{Mapping}. """ - keys = map1.keys() - for key in map2.keys(): + keys = list(map1.keys()) + for key in list(map2.keys()): if key not in keys: map1[key] = map2[key] else: --- ./logconfig.py (original) +++ ./logconfig.py (refactored) @@ -82,19 +82,19 @@ cfg.addNamespace(logging) cfg.addNamespace(sys.modules[StreamHandler.__module__], 'logconfig') - for name in cfg.formatters.keys(): + for name in list(cfg.formatters.keys()): formatterConfig = cfg.formatters[name] fmt = formatterConfig.get('format') datefmt = formatterConfig.get('datefmt') formatter = logging.Formatter(fmt, datefmt) cfg.formatters[name] = formatter - for name in cfg.handlers.keys(): + for name in list(cfg.handlers.keys()): klass = cfg.handlers[name].get('class') config = cfg.handlers[name].get('config') cfg.handlers[name] = klass(config) - for name in cfg.loggers.keys(): + for name in list(cfg.loggers.keys()): loggerConfig = cfg.loggers[name] logger = logging.getLogger(name) configLogger(logger, loggerConfig) @@ -105,7 +105,7 @@ def testConfig(): levels = [logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL] loggers = ['', 'area1', 'area2'] - for i in xrange(1000): + for i in range(1000): logger = logging.getLogger(choice(loggers)) level = choice(levels) logger.log(level, "Message number %d", i) @@ -122,12 +122,12 @@ raise Usage("No configuration file specified") fileConfig(args[0]) testConfig() - except Usage, e: + except Usage as e: parser.print_help() - print "\n%s: error: %s" % (get_prog_name(), e) + print("\n%s: error: %s" % (get_prog_name(), e)) rv = 1 - except Exception, e: - print "\n%s: error: %s" % (get_prog_name(), e) + except Exception as e: + print("\n%s: error: %s" % (get_prog_name(), e)) typ, val, tb = sys.exc_info() import traceback traceback.print_tb(tb) --- ./test_config.py (original) +++ ./test_config.py (refactored) @@ -24,7 +24,7 @@ from config import Config, ConfigMerger, ConfigList from config import ConfigError, ConfigFormatError, ConfigResolutionError import logging -from StringIO import StringIO +from io import StringIO STREAMS = { "simple_1" : @@ -218,11 +218,11 @@ def testSimple(self): self.cfg.load(makeStream("simple_1")) - self.failUnless('message' in self.cfg) - self.failIf('root' in self.cfg) - self.failIf('stream' in self.cfg) - self.failIf('load' in self.cfg) - self.failIf('save' in self.cfg) + self.assertTrue('message' in self.cfg) + self.assertFalse('root' in self.cfg) + self.assertFalse('stream' in self.cfg) + self.assertFalse('load' in self.cfg) + self.assertFalse('save' in self.cfg) def testValueOnly(self): self.assertRaises(ConfigError, self.cfg.load, @@ -318,7 +318,7 @@ self.assertEqual(sys.stdin, self.cfg.stdin) self.assertRaises(ConfigResolutionError, lambda x: x.debug, self.cfg) self.cfg.addNamespace(logging.Logger) - self.assertEqual(logging.Logger.debug.im_func, self.cfg.debug) + self.assertEqual(logging.Logger.debug.__func__, self.cfg.debug) self.assertRaises(ConfigResolutionError, lambda x: x.DEBUG, self.cfg) self.cfg.addNamespace(logging) self.assertEqual(logging.DEBUG, self.cfg.DEBUG) @@ -333,12 +333,12 @@ self.assertEqual('suffix', makePath(None, 'suffix')) self.assertEqual('prefix.suffix', makePath('prefix', 'suffix')) self.assertEqual('prefix[1]', makePath('prefix', '[1]')) - self.failUnless(isWord('a9')) - self.failUnless(isWord('9a')) #perverse, but there you go - self.failIf(isWord(9)) - self.failIf(isWord(None)) - self.failIf(isWord(self)) - self.failIf(isWord('')) + self.assertTrue(isWord('a9')) + self.assertTrue(isWord('9a')) #perverse, but there you go + self.assertFalse(isWord(9)) + self.assertFalse(isWord(None)) + self.assertFalse(isWord(self)) + self.assertFalse(isWord('')) def testMerge(self): cfg1 = Config() @@ -348,9 +348,9 @@ merged = cfg1 cfg1 = Config() cfg1.load(makeStream("merge_1")) - for i in xrange(0, 5): + for i in range(0, 5): key = 'value%d' % (i + 1,) - self.failUnless(key in merged) + self.assertTrue(key in merged) self.assertEqual(len(cfg1.value5) + len(cfg2.value5), len(merged.value5)) cfg3 = Config() @@ -397,14 +397,14 @@ self.assertEqual(123, cfg.get('value1', -123)) self.assertEqual(-123, cfg.get('value11', -123)) self.assertEqual('abcd', cfg.get('value2')) - self.failUnless(cfg.get('value3')) - self.failIf(cfg.get('value4') is not None) + self.assertTrue(cfg.get('value3')) + self.assertFalse(cfg.get('value4') is not None) self.assertEqual(123, cfg.value5.get('value1')) self.assertEqual(123, cfg.value5.get('value1', -123)) self.assertEqual(-123, cfg.value5.get('value11', -123))RefactoringTool: Files that were modified: RefactoringTool: ./config.py RefactoringTool: ./logconfig.py RefactoringTool: ./setup.py RefactoringTool: ./test_config.py self.assertEqual('abcd', cfg.value5.get('value2')) - self.failUnless(cfg.value5.get('value3')) - self.failIf(cfg.value5.get('value4') is not None) + self.assertTrue(cfg.value5.get('value3')) + self.assertFalse(cfg.value5.get('value4') is not None) def testMultiline(self): cfg = self.cfg + python3-2to3 -w -d . RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No files need to be modified. + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + python3 setup.py build running build running build_py creating build creating build/lib copying config.py -> build/lib + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.3262 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-config-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-config-buildroot + cd config-0.3.9 + python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-config-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-config-buildroot creating /usr/src/tmp/python3-module-config-buildroot/usr creating /usr/src/tmp/python3-module-config-buildroot/usr/lib creating /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages copying build/lib/config.py -> /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages byte-compiling /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py to config.cpython-35.pyc running install_egg_info Writing /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config-0.3.9-py3.5.egg-info + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-config-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-config-buildroot (binconfig,pkgconfig,libtool,desktop) Compressing files in /usr/src/tmp/python3-module-config-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-config-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-config-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-config-buildroot using /usr/bin/python Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-config-buildroot using /usr/bin/python -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-config-buildroot using python3 unlink /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/__pycache__/config.cpython-35.pyc compile /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-config-buildroot using python3 -O compile /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-config-buildroot using python3 -OO compile /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/__pycache__/config.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/__pycache__/config.cpython-35.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-config-0.3.9-alt2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.78618 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd config-0.3.9 + DOCDIR=/usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + /bin/mkdir -p /usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + cp -prL README.txt LICENSE /usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + chmod -R go-w /usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + chmod -R a+rX /usr/src/tmp/python3-module-config-buildroot/usr/share/doc/python3-module-config-0.3.9 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.3VYYOw 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.N5yidS find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) python3.req: /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py: line=135 IGNORE (for REQ=slight and deep=8) module=encodings /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config.py: line=141 IGNORE (for REQ=slight and deep=8) module=logging Provides: python3(config), python3.3(config) Requires: /usr/lib/python3/site-packages, python3(codecs) < 0, python3(logging) < 0, python3(os) < 0, python3(types) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-config-0.3.9-alt2.noarch.rpm 3.35user 0.28system 0:08.59elapsed 42%CPU (0avgtext+0avgdata 28388maxresident)k 0inputs+0outputs (0major+123381minor)pagefaults 0swaps 7.21user 2.04system 0:18.68elapsed 49%CPU (0avgtext+0avgdata 121792maxresident)k 1928inputs+0outputs (0major+342404minor)pagefaults 0swaps --- python3-module-config-0.3.9-alt2.noarch.rpm.repo 2016-04-08 10:25:59.000000000 +0000 +++ python3-module-config-0.3.9-alt2.noarch.rpm.hasher 2019-04-14 01:01:29.784345935 +0000 @@ -9,6 +9,6 @@ Requires: /usr/lib/python3/site-packages -Requires: python3(codecs) -Requires: python3(logging) -Requires: python3(os) -Requires: python3(types) +Requires: python3(codecs) < 0 +Requires: python3(logging) < 0 +Requires: python3(os) < 0 +Requires: python3(types) < 0 Requires: rpmlib(PayloadIsLzma)