<86>Jan 5 07:37:03 userdel[3917]: delete user 'rooter' <86>Jan 5 07:37:03 userdel[3917]: removed group 'rooter' owned by 'rooter' <86>Jan 5 07:37:03 userdel[3917]: removed shadow group 'rooter' owned by 'rooter' <86>Jan 5 07:37:03 groupadd[3932]: group added to /etc/group: name=rooter, GID=573 <86>Jan 5 07:37:03 groupadd[3932]: group added to /etc/gshadow: name=rooter <86>Jan 5 07:37:03 groupadd[3932]: new group: name=rooter, GID=573 <86>Jan 5 07:37:03 useradd[3949]: new user: name=rooter, UID=573, GID=573, home=/root, shell=/bin/bash <86>Jan 5 07:37:03 userdel[3980]: delete user 'builder' <86>Jan 5 07:37:03 userdel[3980]: removed group 'builder' owned by 'builder' <86>Jan 5 07:37:03 userdel[3980]: removed shadow group 'builder' owned by 'builder' <86>Jan 5 07:37:03 groupadd[4002]: group added to /etc/group: name=builder, GID=574 <86>Jan 5 07:37:03 groupadd[4002]: group added to /etc/gshadow: name=builder <86>Jan 5 07:37:03 groupadd[4002]: new group: name=builder, GID=574 <86>Jan 5 07:37:03 useradd[4021]: new user: name=builder, UID=574, GID=574, home=/usr/src, shell=/bin/bash <13>Jan 5 07:37:06 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Jan 5 07:37:06 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Jan 5 07:37:06 rpmi: libtasn1-4.13-alt2 1521133850 installed <13>Jan 5 07:37:06 rpmi: libp11-kit-0.23.9-alt5 1525798298 installed <13>Jan 5 07:37:06 rpmi: ed-1:0.2-alt10 1449768440 installed <13>Jan 5 07:37:06 rpmi: rpm-macros-alternatives-0.4.5-alt1.1 1404382149 installed <13>Jan 5 07:37:06 rpmi: alternatives-0.4.5-alt1.1 1404382149 installed <13>Jan 5 07:37:07 rpmi: ca-certificates-2018.11.12-alt1 sisyphus.216395.300 1542114035 installed <13>Jan 5 07:37:07 rpmi: ca-trust-0.1.1-alt2 1515595785 installed <13>Jan 5 07:37:07 rpmi: p11-kit-trust-0.23.9-alt5 1525798298 installed <13>Jan 5 07:37:07 rpmi: libcrypto1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Jan 5 07:37:07 rpmi: libssl1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Jan 5 07:37:07 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Jan 5 07:37:07 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Jan 5 07:37:07 rpmi: python3-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:08 rpmi: python3-base-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:08 rpmi: libpython3-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:12 rpmi: libtcl-8.6.8-alt1 1518663643 installed <13>Jan 5 07:37:13 rpmi: tcl-8.6.8-alt1 1518663643 installed <13>Jan 5 07:37:13 rpmi: python3-modules-curses-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:13 rpmi: libpng16-1.6.35-alt1 sisyphus.214397.100 1539159349 installed <13>Jan 5 07:37:13 rpmi: libgraphite2-1.3.13-alt1 sisyphus.218545.100 1545686511 installed <13>Jan 5 07:37:13 rpmi: libharfbuzz-2.2.0-alt1 sisyphus.218134.500 1545261518 installed <13>Jan 5 07:37:13 rpmi: libfreetype-2.9.1-alt1.S1 1530781053 installed <13>Jan 5 07:37:13 rpmi: fontconfig-2.13.1-alt1 sisyphus.215917.100 1540973886 installed Updating fonts cache: <29>Jan 5 07:37:14 fontconfig: Updating fonts cache: succeeded [ DONE ] <13>Jan 5 07:37:14 rpmi: libXdmcp-1.1.1-alt1 1334617701 installed <13>Jan 5 07:37:14 rpmi: libXau-1.0.8-alt1 1369565808 installed <13>Jan 5 07:37:14 rpmi: libxcb-1.13.1-alt1 sisyphus.214413.100 1539170896 installed <13>Jan 5 07:37:14 rpmi: libX11-locales-3:1.6.7-alt1 sisyphus.214413.200 1539171080 installed <13>Jan 5 07:37:14 rpmi: libX11-3:1.6.7-alt1 sisyphus.214413.200 1539171143 installed <13>Jan 5 07:37:14 rpmi: libXrender-0.9.8-alt1 1371312112 installed <13>Jan 5 07:37:14 rpmi: libXft-2.3.2-alt1 1409902660 installed <13>Jan 5 07:37:14 rpmi: libtk-8.6.8-alt1 1518663864 installed <13>Jan 5 07:37:14 rpmi: tk-8.6.8-alt1 1518663864 installed <13>Jan 5 07:37:14 rpmi: python3-modules-tkinter-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:14 rpmi: python3-tools-3.6.5-alt1.1 1535734576 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-config-0.3.9-alt2.nosrc.rpm <13>Jan 5 07:37:18 rpmi: python3-module-pkg_resources-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed <13>Jan 5 07:37:18 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus.215627.200 1540831974 installed <13>Jan 5 07:37:18 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus.215627.200 1540831974 installed <13>Jan 5 07:37:18 rpmi: python3-dev-3.6.5-alt1.1 1535734576 installed <13>Jan 5 07:37:18 rpmi: python3-module-setuptools-1:40.5.0-alt1 sisyphus.216029.100 1541106477 installed Installing python3-module-config-0.3.9-alt2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.49158 + 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.60420 + 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 -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 config.py -> build/lib + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.27105 + 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 + 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-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-36.pyc running install_egg_info Writing /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config-0.3.9-py3.6.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) Checking contents of files in /usr/src/tmp/python3-module-config-buildroot/ (default) 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 /usr/bin/python3 unlink /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/__pycache__/config.cpython-36.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 /usr/bin/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 /usr/bin/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-36.opt-1.pyc' => './usr/lib/python3/site-packages/__pycache__/config.cpython-36.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.84141 + 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.f12PFc 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.o3vWkT 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.utf_32 /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.handlers Provides: python3(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 15.40user 0.90system 0:20.05elapsed 81%CPU (0avgtext+0avgdata 16908maxresident)k 0inputs+0outputs (0major+133745minor)pagefaults 0swaps 35.31user 8.26system 0:49.03elapsed 88%CPU (0avgtext+0avgdata 122176maxresident)k 1960inputs+0outputs (0major+756449minor)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-01-05 07:37:40.489167562 +0000 @@ -1,5 +1,5 @@ -/usr/lib/python3/site-packages/__pycache__/config.cpython-35.opt-1.pyc 100644 -/usr/lib/python3/site-packages/__pycache__/config.cpython-35.opt-2.pyc 100644 -/usr/lib/python3/site-packages/__pycache__/config.cpython-35.pyc 100644 -/usr/lib/python3/site-packages/config-0.3.9-py3.5.egg-info 100644 +/usr/lib/python3/site-packages/__pycache__/config.cpython-36.opt-1.pyc 100644 +/usr/lib/python3/site-packages/__pycache__/config.cpython-36.opt-2.pyc 100644 +/usr/lib/python3/site-packages/__pycache__/config.cpython-36.pyc 100644 +/usr/lib/python3/site-packages/config-0.3.9-py3.6.egg-info 100644 /usr/lib/python3/site-packages/config.py 100644 @@ -9,9 +9,8 @@ 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) Provides: python3(config) -Provides: python3.3(config) Provides: python3-module-config = 0.3.9-alt2