Mock Version: 2.12 Mock Version: 2.12 Mock Version: 2.12 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/prefixdevname.spec'], chrootPath='/var/lib/mock/dist-an23-build-80116-40910/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=989gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/prefixdevname.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1646870400 Wrote: /builddir/build/SRPMS/prefixdevname-0.1.0-1.an23.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/prefixdevname.spec'], chrootPath='/var/lib/mock/dist-an23-build-80116-40910/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=989gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/prefixdevname.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1646870400 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.EKTd1E + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf prefixdevname-0.1.0 + /usr/bin/gzip -dc /builddir/build/SOURCES/prefixdevname-0.1.0.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd prefixdevname-0.1.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #0 (0999-sema-fix-cast-needed-to-build-with-rust-1.26.patch):' Patch #0 (0999-sema-fix-cast-needed-to-build-with-rust-1.26.patch): + /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0 patching file src/sema.rs + /usr/bin/mkdir -p .cargo + cat + /usr/bin/tar -xoaf /builddir/build/SOURCES/prefixdevname-0.1.0-vendor.tar.gz + cat + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.x1uPDd + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd prefixdevname-0.1.0 + /usr/bin/env CARGO_HOME=.cargo /usr/bin/cargo build --release -j64 Compiling libc v0.2.42 Compiling pkg-config v0.3.11 Compiling void v1.0.2 Compiling lazy_static v1.0.1 Compiling regex v1.0.1 Compiling ucd-util v0.1.1 Compiling quick-error v1.2.2 Compiling utf8-ranges v1.0.0 Compiling cfg-if v0.1.3 Compiling termcolor v0.3.6 Compiling rust-ini v0.12.2 Compiling log v0.4.3 Compiling unreachable v1.0.0 Compiling humantime v1.1.1 Compiling regex-syntax v0.6.1 Compiling thread_local v0.3.5 Compiling memchr v2.0.1 Compiling atty v0.2.10 Compiling aho-corasick v0.6.4 Compiling libudev-sys v0.1.4 Compiling libudev v0.2.0 Compiling env_logger v0.5.10 Compiling prefixdevname v0.1.0 (/builddir/build/BUILD/prefixdevname-0.1.0) warning: use of deprecated constant `std::sync::ONCE_INIT`: the `new` function is now preferred --> src/config.rs:33:9 | 33 | / lazy_static! { 34 | | static ref RE: Regex = Regex::new(r"([[:alpha:]]+)\d+").unwrap(); 35 | | } | |_________^ | = note: `#[warn(deprecated)]` on by default = note: this warning originates in the macro `__lazy_static_create` (in Nightly builds, run with -Z macro-backtrace for more info) warning: use of deprecated constant `std::sync::ONCE_INIT`: the `new` function is now preferred --> src/config.rs:58:9 | 58 | / lazy_static! { 59 | | static ref RE: Regex = Regex::new(r"([[:alpha:]]+)\d+").unwrap(); 60 | | } | |_________^ | = note: this warning originates in the macro `__lazy_static_create` (in Nightly builds, run with -Z macro-backtrace for more info) warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:29:72 | 29 | pub fn new(link_name: &T) -> Result> { | ^^^^^ | = note: `#[warn(bare_trait_objects)]` on by default = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 29 - pub fn new(link_name: &T) -> Result> { 29 + pub fn new(link_name: &T) -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:53:96 | 53 | pub fn new_with_hwaddr(link_name: &T, hwaddr: &T) -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 53 - pub fn new_with_hwaddr(link_name: &T, hwaddr: &T) -> Result> { 53 + pub fn new_with_hwaddr(link_name: &T, hwaddr: &T) -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:77:73 | 77 | pub fn link_name_sane(link_name: &T) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 77 - pub fn link_name_sane(link_name: &T) -> Result<(), Box> { 77 + pub fn link_name_sane(link_name: &T) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:98:53 | 98 | pub fn write_link_file(&self) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 98 - pub fn write_link_file(&self) -> Result<(), Box> { 98 + pub fn write_link_file(&self) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:142:46 | 142 | pub fn load(&mut self) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 142 - pub fn load(&mut self) -> Result<(), Box> { 142 + pub fn load(&mut self) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:163:56 | 163 | pub fn next_link_name(&self) -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 163 - pub fn next_link_name(&self) -> Result> { 163 + pub fn next_link_name(&self) -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:174:89 | 174 | fn match_ethernet_links(udev_enumerate: &mut libudev::Enumerator) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 174 - fn match_ethernet_links(udev_enumerate: &mut libudev::Enumerator) -> Result<(), Box> { 174 + fn match_ethernet_links(udev_enumerate: &mut libudev::Enumerator) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:181:63 | 181 | fn enumerate_links_from_udev(&mut self) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 181 - fn enumerate_links_from_udev(&mut self) -> Result<(), Box> { 181 + fn enumerate_links_from_udev(&mut self) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/config.rs:215:64 | 215 | fn enumerate_links_from_files(&mut self) -> Result<(), Box> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 215 - fn enumerate_links_from_files(&mut self) -> Result<(), Box> { 215 + fn enumerate_links_from_files(&mut self) -> Result<(), Box> { | warning: trait objects without an explicit `dyn` are deprecated --> src/sema.rs:14:63 | 14 | pub fn new_with_name(name: &str) -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 14 - pub fn new_with_name(name: &str) -> Result> { 14 + pub fn new_with_name(name: &str) -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/util.rs:39:72 | 39 | pub fn hwaddr_normalize(hwaddr: &T) -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 39 - pub fn hwaddr_normalize(hwaddr: &T) -> Result> { 39 + pub fn hwaddr_normalize(hwaddr: &T) -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/util.rs:54:57 | 54 | pub fn hwaddr_from_event_device() -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 54 - pub fn hwaddr_from_event_device() -> Result> { 54 + pub fn hwaddr_from_event_device() -> Result> { | warning: trait objects without an explicit `dyn` are deprecated --> src/util.rs:67:63 | 67 | pub fn get_prefix_from_file(path: &str) -> Result> { | ^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see help: use `dyn` | 67 - pub fn get_prefix_from_file(path: &str) -> Result> { 67 + pub fn get_prefix_from_file(path: &str) -> Result> { | warning: use of deprecated associated function `core::str::::trim_left_matches`: superseded by `trim_start_matches` --> src/config.rs:42:22 | 42 | let i = name.trim_left_matches(&prefix).parse::()?; | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start_matches` warning: use of deprecated associated function `core::str::::trim_left_matches`: superseded by `trim_start_matches` --> src/config.rs:66:22 | 66 | let i = name.trim_left_matches(&prefix).parse::()?; | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start_matches` warning: use of deprecated associated function `core::str::::trim_left_matches`: superseded by `trim_start_matches` --> src/config.rs:169:36 | 169 | let last_index = last.name.trim_left_matches(&self.ifname_prefix).parse::()?; | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start_matches` error[E0308]: mismatched types --> src/sema.rs:19:32 | 19 | s = libc::sem_open(raw_sema_name.as_ptr() as *const u8, libc::O_CREAT, libc::S_IRUSR | libc::S_IWUSR, 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8` | = note: expected raw pointer `*const i8` found raw pointer `*const u8` For more information about this error, try `rustc --explain E0308`. warning: `prefixdevname` (bin "prefixdevname") generated 18 warnings error: could not compile `prefixdevname` due to previous error; 18 warnings emitted error: Bad exit status from /var/tmp/rpm-tmp.x1uPDd (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.x1uPDd (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 600, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/prefixdevname.spec