<86>Apr 14 00:57:23 userdel[7752]: delete user 'rooter' <86>Apr 14 00:57:23 userdel[7752]: removed group 'rooter' owned by 'rooter' <86>Apr 14 00:57:23 userdel[7752]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 14 00:57:23 groupadd[7780]: group added to /etc/group: name=rooter, GID=555 <86>Apr 14 00:57:23 groupadd[7780]: group added to /etc/gshadow: name=rooter <86>Apr 14 00:57:23 groupadd[7780]: new group: name=rooter, GID=555 <86>Apr 14 00:57:23 useradd[7795]: new user: name=rooter, UID=555, GID=555, home=/root, shell=/bin/bash <86>Apr 14 00:57:23 userdel[7818]: delete user 'builder' <86>Apr 14 00:57:23 userdel[7818]: removed group 'builder' owned by 'builder' <86>Apr 14 00:57:23 userdel[7818]: removed shadow group 'builder' owned by 'builder' <86>Apr 14 00:57:23 groupadd[7840]: group added to /etc/group: name=builder, GID=556 <86>Apr 14 00:57:23 groupadd[7840]: group added to /etc/gshadow: name=builder <86>Apr 14 00:57:23 groupadd[7840]: new group: name=builder, GID=556 <86>Apr 14 00:57:23 useradd[7856]: new user: name=builder, UID=556, GID=556, home=/usr/src, shell=/bin/bash <13>Apr 14 00:57:26 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 14 00:57:26 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 14 00:57:26 rpmi: libpcap0.8-2:1.1.1-alt3 1298589613 installed <13>Apr 14 00:57:26 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 14 00:57:26 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 14 00:57:26 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 14 00:57:26 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 14 00:57:26 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 14 00:57:26 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 14 00:57:27 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 14 00:57:27 rpmi: libpcap-devel-2:1.1.1-alt3 1298589613 installed <13>Apr 14 00:57:27 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 14 00:57:27 groupadd[17669]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 14 00:57:27 groupadd[17669]: group added to /etc/gshadow: name=_keytab <86>Apr 14 00:57:27 groupadd[17669]: new group: name=_keytab, GID=499 <13>Apr 14 00:57:27 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 14 00:57:28 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 00:57:28 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 00:57:28 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 14 00:57:28 rpmi: libpython3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 00:57:28 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 14 00:57:28 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:29 rpmi: python3-dev-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 00:57:29 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Apr 14 00:57:29 rpmi: python3-module-coverage-4.0-alt1.a7.git20150730.1.1 1459584383 installed <13>Apr 14 00:57:29 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 14 00:57:29 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python3-module-Cython-0.26-alt0.M80P.1 1503652343 installed <13>Apr 14 00:57:30 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 00:57:30 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed Installing python3-module-pcap-1.1.1-alt1.git20141230.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.86799 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-pcap-1.1.1 + echo 'Source #0 (python3-module-pcap-1.1.1.tar):' Source #0 (python3-module-pcap-1.1.1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-pcap-1.1.1.tar + cd python3-module-pcap-1.1.1 + /bin/chmod -c -Rf u+rwX,go-w . + sed -i s/dylib/so/ setup.py + sed -i 's/'\''lib'\''/'\''lib64'\''/g' setup.py + sed -i 's/'\''include'\'', *//' setup.py + rm -f pcap.c + 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 ./setup.py RefactoringTool: Refactored ./testsniff.py RefactoringTool: Refactored ./test.py RefactoringTool: Files that were modified: RefactoringTool: ./setup.py RefactoringTool: ./testsniff.py RefactoringTool: ./test.py --- ./setup.py (original) +++ ./setup.py (refactored) @@ -2,7 +2,7 @@ # # $Id$ -from __future__ import with_statement + from setuptools import setup, Extension import glob import os @@ -37,11 +37,11 @@ pcap_h = recursive_search_dirs(search_dirs, ['pcap.h']) if pcap_h: - print "Found pcap headers in %s" % pcap_h + print("Found pcap headers in %s" % pcap_h) break if not pcap_h: - print "pcap.h not found" + print("pcap.h not found") sys.exit(1) include_dirs = os.path.dirname(pcap_h) @@ -57,7 +57,7 @@ ] lib_file_path = recursive_search_dirs(lib_sub_dirs, lib_files) -print "Found libraries in %s" % lib_file_path +print("Found libraries in %s" % lib_file_path) lib_file = os.path.basename(lib_file_path) @@ -73,21 +73,21 @@ if recursive_search_dirs(dirs, ['pcap-int.h']): define_macros.append(('HAVE_PCAP_INT_H', 1)) else: - print "No pcap-int.h found" + print("No pcap-int.h found") pcap_h_file = open(pcap_h).readlines() for line in pcap_h_file: if 'pcap_file(' in line: - print "found pcap_file function" + print("found pcap_file function") define_macros.append(('HAVE_PCAP_FILE', 1)) if 'pcap_compile_nopcap(' in line: - print "found pcap_compile_nopcap function" + print("found pcap_compile_nopcap function") define_macros.append(('HAVE_PCAP_COMPILE_NOPCAP', 1)) if 'pcap_setnonblock(' in line: - print "found pcap_setnonblock" + print("found pcap_setnonblock") define_macros.append(('HAVE_PCAP_SETNONBLOCK', 1)) if 'pcap_setdirection(' in line: - print "found pcap_setdirection" + print("found pcap_setdirection") define_macros.append(('HAVE_PCAP_SETDIRECTION', 1)) --- ./testsniff.py (original) +++ ./testsniff.py (refactored) @@ -4,7 +4,7 @@ import dpkt, pcap def usage(): - print >>sys.stderr, 'usage: %s [-i device] [pattern]' % sys.argv[0] + print('usage: %s [-i device] [pattern]' % sys.argv[0], file=sys.stderr) sys.exit(1) def main(): @@ -20,13 +20,13 @@ pcap.DLT_NULL:dpkt.loopback.Loopback, pcap.DLT_EN10MB:dpkt.ethernet.Ethernet }[pc.datalink()] try: - print 'listening on %s: %s' % (pc.name, pc.filter) + print('listening on %s: %s' % (pc.name, pc.filter)) for ts, pkt in pc: - print ts, `decode(pkt)` + print(ts, repr(decode(pkt))) except KeyboardInterrupt: nrecv, ndrop, nifdrop = pc.stats() - print '\n%d packets received by filter' % nrecv - print '%d packets dropped by kernel' % ndrop + print('\n%d packets received by filter' % nrecv) + print('%d packets dropped by kernel' % ndrop) if __name__ == '__main__': main() --- ./test.py (original) +++ ./test.py (refactored) @@ -16,7 +16,7 @@ def test_pcap_errors(self): p = pcap.pcap(b'test.pcap') try: - print p.stats() + print(p.stats()) except OSError: pass assert p.geterr() != '', 'pcap_geterr' + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.89479 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-pcap-1.1.1 + cython3 pcap.pyx + CFLAGS='-pipe -Wall -g -O2 -DHAVE_PCAP_FILE' + python3 setup.py config Found pcap headers in /usr/include/pcap.h Found libraries in /usr/lib64/libpcap.so No pcap-int.h found running config + CFLAGS='-pipe -Wall -g -O2 -DHAVE_PCAP_FILE' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2 -DHAVE_PCAP_FILE' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2 -DHAVE_PCAP_FILE' + export FFLAGS + python3 setup.py build --debug Found pcap headers in /usr/include/pcap.h Found libraries in /usr/lib64/libpcap.so No pcap-int.h found running build running build_ext building 'pcap' extension creating build creating build/temp.linux-x86_64-3.5 x86_64-alt-linux-gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Wall -g -O2 -DHAVE_PCAP_FILE -fPIC -g -I/usr/include -I/usr/include/python3.5m -c pcap.c -o build/temp.linux-x86_64-3.5/pcap.o pcap.c: In function '__pyx_pf_4pcap_3bpf_2filter': pcap.c:1670:52: warning: passing argument 2 of 'PyObject_AsCharBuffer' from incompatible pointer type [-Wincompatible-pointer-types] __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0); ^ In file included from /usr/include/python3.5m/Python.h:122:0, from pcap.c:4: /usr/include/python3.5m/abstract.h:464:22: note: expected 'const char **' but argument is of type 'char **' PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, ^ pcap.c:1670:66: warning: passing argument 3 of 'PyObject_AsCharBuffer' from incompatible pointer type [-Wincompatible-pointer-types] __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0); ^ In file included from /usr/include/python3.5m/Python.h:122:0, from pcap.c:4: /usr/include/python3.5m/abstract.h:464:22: note: expected 'Py_ssize_t * {aka long int *}' but argument is of type 'int *' PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, ^ pcap.c:1699:58: warning: pointer targets in passing argument 2 of 'bpf_filter' differ in signedness [-Wpointer-sign] __pyx_t_1 = ((bpf_filter(__pyx_v_self->fcode.bf_insns, __pyx_v_p, __pyx_v_n, __pyx_v_n) == 0) != 0); ^ In file included from /usr/include/pcap.h:45:0, from pcap.c:472: /usr/include/pcap/pcap.h:352:7: note: expected 'const u_char * {aka const unsigned char *}' but argument is of type 'char *' u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); ^ pcap.c: In function '__pyx_pf_4pcap_4pcap_18dispatch': pcap.c:3729:68: warning: passing argument 3 of 'pcap_dispatch' from incompatible pointer type [-Wincompatible-pointer-types] __pyx_v_n = pcap_dispatch(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_f_4pcap___pcap_handler, ((unsigned char *)(&__pyx_v_ctx))); ^ In file included from /usr/include/pcap.h:45:0, from pcap.c:472: /usr/include/pcap/pcap.h:298:5: note: expected 'pcap_handler {aka void (*)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *)}' but argument is of type 'void (*)(void *, struct pcap_pkthdr *, char *)' int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); ^ pcap.c: In function '__pyx_pf_4pcap_4pcap_20loop': pcap.c:3971:74: warning: passing argument 3 of 'pcap_ex_next' from incompatible pointer type [-Wincompatible-pointer-types] __pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt)); ^ In file included from pcap.c:473:0: pcap_ex.h:13:7: note: expected 'u_char ** {aka unsigned char **}' but argument is of type 'char **' int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt); ^ pcap.c: In function '__pyx_pf_4pcap_4pcap_22sendpacket': pcap.c:4252:61: warning: pointer targets in passing argument 2 of 'pcap_sendpacket' differ in signedness [-Wpointer-sign] __pyx_v_ret = pcap_sendpacket(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_t_2); ^ In file included from /usr/include/pcap.h:45:0, from pcap.c:472: /usr/include/pcap/pcap.h:309:5: note: expected 'const u_char * {aka const unsigned char *}' but argument is of type 'char *' int pcap_sendpacket(pcap_t *, const u_char *, int); ^ pcap.c: In function '__pyx_pf_4pcap_4pcap_30__next__': pcap.c:4616:74: warning: passing argument 3 of 'pcap_ex_next' from incompatible pointer type [-Wincompatible-pointer-types] __pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt)); ^ In file included from pcap.c:473:0: pcap_ex.h:13:7: note: expected 'u_char ** {aka unsigned char **}' but argument is of type 'char **' int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt); ^ x86_64-alt-linux-gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Wall -g -O2 -DHAVE_PCAP_FILE -fPIC -g -I/usr/include -I/usr/include/python3.5m -c pcap_ex.c -o build/temp.linux-x86_64-3.5/pcap_ex.o pcap_ex.c: In function 'pcap_ex_compile_nopcap': pcap_ex.c:302:2: warning: implicit declaration of function 'mktemp' [-Wimplicit-function-declaration] mktemp(path); ^ creating build/lib.linux-x86_64-3.5 x86_64-alt-linux-gcc -pthread -shared -pipe -Wall -g -O2 -DHAVE_PCAP_FILE -g build/temp.linux-x86_64-3.5/pcap.o build/temp.linux-x86_64-3.5/pcap_ex.o -lpcap -o build/lib.linux-x86_64-3.5/pcap.cpython-35m.so build/temp.linux-x86_64-3.5/pcap_ex.o: In function `pcap_ex_compile_nopcap': /usr/src/RPM/BUILD/python3-module-pcap-1.1.1/pcap_ex.c:302: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.92321 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-pcap-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-pcap-buildroot + cd python3-module-pcap-1.1.1 + python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-pcap-buildroot --force Found pcap headers in /usr/include/pcap.h Found libraries in /usr/lib64/libpcap.so No pcap-int.h found running install running install_lib creating /usr/src/tmp/python3-module-pcap-buildroot creating /usr/src/tmp/python3-module-pcap-buildroot/usr creating /usr/src/tmp/python3-module-pcap-buildroot/usr/lib64 creating /usr/src/tmp/python3-module-pcap-buildroot/usr/lib64/python3 creating /usr/src/tmp/python3-module-pcap-buildroot/usr/lib64/python3/site-packages copying build/lib.linux-x86_64-3.5/pcap.cpython-35m.so -> /usr/src/tmp/python3-module-pcap-buildroot/usr/lib64/python3/site-packages running install_egg_info running egg_info creating pypcap.egg-info writing pypcap.egg-info/PKG-INFO writing top-level names to pypcap.egg-info/top_level.txt writing dependency_links to pypcap.egg-info/dependency_links.txt writing manifest file 'pypcap.egg-info/SOURCES.txt' reading manifest file 'pypcap.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pypcap.egg-info/SOURCES.txt' Copying pypcap.egg-info to /usr/src/tmp/python3-module-pcap-buildroot/usr/lib64/python3/site-packages/pypcap-1.1.1-py3.5.egg-info running install_scripts + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-pcap-buildroot (auto) mode of './usr/lib64/python3/site-packages/pcap.cpython-35m.so' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--) Verifying and fixing files in /usr/src/tmp/python3-module-pcap-buildroot (binconfig,pkgconfig,libtool,desktop) Compressing files in /usr/src/tmp/python3-module-pcap-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-pcap-buildroot ./usr/lib64: Verifying ELF objects in /usr/src/tmp/python3-module-pcap-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Hardlinking identical .pyc and .opt-?.pyc files Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.90569 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-pcap-1.1.1 + python3 setup.py test Found pcap headers in /usr/include/pcap.h Found libraries in /usr/lib64/libpcap.so No pcap-int.h found running test running egg_info writing top-level names to pypcap.egg-info/top_level.txt writing pypcap.egg-info/PKG-INFO writing dependency_links to pypcap.egg-info/dependency_links.txt reading manifest file 'pypcap.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pypcap.egg-info/SOURCES.txt' running build_ext copying build/lib.linux-x86_64-3.5/pcap.cpython-35m.so -> test_pcap_dispatch (test.PcapTestCase) ... ok test_pcap_errors (test.PcapTestCase) ... ok test_pcap_iter (test.PcapTestCase) ... ok test_pcap_properties (test.PcapTestCase) ... ok test_pcap_readpkts (test.PcapTestCase) ... ok testsniff (unittest.loader._FailedTest) ... ERROR ====================================================================== ERROR: testsniff (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: testsniff Traceback (most recent call last): File "/usr/lib64/python3.5/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.5/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/usr/src/RPM/BUILD/python3-module-pcap-1.1.1/testsniff.py", line 4, in import dpkt, pcap ImportError: No module named 'dpkt' ---------------------------------------------------------------------- Ran 6 tests in 0.003s FAILED (errors=1) error: Bad exit status from /usr/src/tmp/rpm-tmp.90569 (%check) RPM build errors: Bad exit status from /usr/src/tmp/rpm-tmp.90569 (%check) Command exited with non-zero status 1 8.43user 1.24system 0:09.63elapsed 100%CPU (0avgtext+0avgdata 67920maxresident)k 0inputs+0outputs (0major+148480minor)pagefaults 0swaps hsh-rebuild: rebuild of `python3-module-pcap-1.1.1-alt1.git20141230.1.src.rpm' failed. Command exited with non-zero status 1 15.93user 4.14system 0:20.25elapsed 99%CPU (0avgtext+0avgdata 122164maxresident)k 5016inputs+0outputs (0major+336842minor)pagefaults 0swaps