<86>May 24 03:40:28 userdel[1991578]: delete user 'rooter' <86>May 24 03:40:28 groupadd[1991589]: group added to /etc/group: name=rooter, GID=567 <86>May 24 03:40:28 groupadd[1991589]: group added to /etc/gshadow: name=rooter <86>May 24 03:40:28 groupadd[1991589]: new group: name=rooter, GID=567 <86>May 24 03:40:28 useradd[1991596]: new user: name=rooter, UID=567, GID=567, home=/root, shell=/bin/bash <86>May 24 03:40:28 userdel[1991608]: delete user 'builder' <86>May 24 03:40:28 userdel[1991608]: removed group 'builder' owned by 'builder' <86>May 24 03:40:28 userdel[1991608]: removed shadow group 'builder' owned by 'builder' <86>May 24 03:40:28 groupadd[1991613]: group added to /etc/group: name=builder, GID=568 <86>May 24 03:40:28 groupadd[1991613]: group added to /etc/gshadow: name=builder <86>May 24 03:40:28 groupadd[1991613]: new group: name=builder, GID=568 <86>May 24 03:40:28 useradd[1991617]: new user: name=builder, UID=568, GID=568, home=/usr/src, shell=/bin/bash <13>May 24 03:40:31 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>May 24 03:40:31 rpmi: libexpat-2.2.4-alt1 1503305341 installed <13>May 24 03:40:31 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288187 installed <13>May 24 03:40:31 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>May 24 03:40:31 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 24 03:40:31 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 24 03:40:31 rpmi: ca-certificates-2020.01.23-alt1 p9+245253.100.3.1 1580749631 installed <13>May 24 03:40:31 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>May 24 03:40:31 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288187 installed <13>May 24 03:40:31 rpmi: libcrypto1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175208 installed <13>May 24 03:40:31 rpmi: libssl1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175208 installed <13>May 24 03:40:31 rpmi: python3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:31 rpmi: libpython3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:32 rpmi: python3-base-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:32 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>May 24 03:40:32 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>May 24 03:40:34 rpmi: libtcl-8.6.9-alt1 sisyphus+227145.100.1.2 1555606523 installed <13>May 24 03:40:34 rpmi: tcl-8.6.9-alt1 sisyphus+227145.100.1.2 1555606523 installed <13>May 24 03:40:34 rpmi: python3-modules-curses-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:34 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>May 24 03:40:34 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512088 installed <13>May 24 03:40:34 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>May 24 03:40:34 groupadd[1998327]: group added to /etc/group: name=_keytab, GID=499 <86>May 24 03:40:34 groupadd[1998327]: group added to /etc/gshadow: name=_keytab <86>May 24 03:40:34 groupadd[1998327]: new group: name=_keytab, GID=499 <13>May 24 03:40:35 rpmi: libkrb5-1.17.1-alt1 p9+242852.100.2.1 1576572448 installed <13>May 24 03:40:35 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>May 24 03:40:35 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>May 24 03:40:35 rpmi: python3-modules-nis-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:35 rpmi: libpng16-1.6.36-alt1 sisyphus+219478.100.1.1 1547633315 installed <13>May 24 03:40:35 rpmi: libgraphite2-1.3.13-alt2 sisyphus+226799.100.1.1 1554648233 installed <13>May 24 03:40:35 rpmi: libharfbuzz-2.6.2-alt1 p9+238790.200.1.1 1570435797 installed <13>May 24 03:40:35 rpmi: libfreetype-2.10.1-alt1 p9+247340.100.1.1 1583394162 installed <13>May 24 03:40:35 rpmi: fontconfig-2.13.1-alt1 p9+247340.200.3.1 1583400482 installed Updating fonts cache: <29>May 24 03:40:36 fontconfig: Updating fonts cache: succeeded [ DONE ] <13>May 24 03:40:36 rpmi: libXdmcp-1.1.3-alt1 sisyphus+225206.600.1.2 1552949347 installed <13>May 24 03:40:36 rpmi: libXau-1.0.9-alt1 sisyphus+223149.200.2.1 1551268156 installed <13>May 24 03:40:36 rpmi: libxcb-1.13.1-alt1 sisyphus+226527.100.2.2 1554593799 installed <13>May 24 03:40:36 rpmi: libX11-locales-3:1.6.7-alt1 sisyphus+226735.100.2.2 1554615009 installed <13>May 24 03:40:36 rpmi: libX11-3:1.6.7-alt1 sisyphus+226735.100.2.2 1554615009 installed <13>May 24 03:40:36 rpmi: libXrender-0.9.8-alt1 1371312110 installed <13>May 24 03:40:36 rpmi: libXft-2.3.3-alt1 sisyphus+225206.1000.3.2 1552987714 installed <13>May 24 03:40:36 rpmi: libtk-8.6.9-alt1 sisyphus+227145.200.1.2 1555606663 installed <13>May 24 03:40:36 rpmi: tk-8.6.9-alt1 sisyphus+227145.200.1.2 1555606663 installed <13>May 24 03:40:37 rpmi: python3-modules-tkinter-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:37 rpmi: python3-tools-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python3-module-config-0.3.9-alt2.1.nosrc.rpm <13>May 24 03:40:39 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>May 24 03:40:39 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>May 24 03:40:39 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>May 24 03:40:39 rpmi: python3-dev-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>May 24 03:40:39 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed Installing python3-module-config-0.3.9-alt2.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.66311 + 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.19201 + 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' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + 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.17550 + 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' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + 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-37.pyc running install_egg_info Writing /usr/src/tmp/python3-module-config-buildroot/usr/lib/python3/site-packages/config-0.3.9-py3.7.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-37.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-37.opt-1.pyc' => './usr/lib/python3/site-packages/__pycache__/config.cpython-37.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-config-0.3.9-alt2.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.68654 + 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.A25DU6 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.59QF14 find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) 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.1.noarch.rpm 6.09user 0.58system 0:15.58elapsed 42%CPU (0avgtext+0avgdata 27708maxresident)k 0inputs+0outputs (0major+155869minor)pagefaults 0swaps 14.51user 4.33system 0:31.18elapsed 60%CPU (0avgtext+0avgdata 115640maxresident)k 608inputs+0outputs (0major+613543minor)pagefaults 0swaps