samba-4.8.3-1.fc29.2 fails to build source RPM package in local mock in cs_CZ.UTF-8 locale because of "%requires_eq libldb" use at samba.spec:366: Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '7b63aac4f19b4b1a8af0941929aa35a0', '-D', '/var/lib/mock/fedorarebuild-x86_64-F1gd5jkcHp/root', '-a', '--bind=/tmp/mock-resolv.fkp8si3n:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=LANG=cs_CZ.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/samba.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'cs_CZ.UTF-8'} and shell False BUILDSTDERR: chyba: řádek 366: Neznámá značka: balíček libldb není nainstalován Sestavuji cílové platformy: x86_64 Sestavuji pro cíl x86_64 Child return code was: 1 EXCEPTION: [Error()] The reason is %requires_eq macro is buggy: # LC_ALL="C" echo 'libldb' | xargs -r rpm -q --qf 'Requires: %{name} = %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not" balíček libldb není nainstalován While correct command is: # echo 'libldb' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %{name} = %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not" The LC_ALL redefintion must be moved to the "xargs" command. But that's not all. According to RPM authors and Fedora Packaging Committee RPM is not reentrant and thus calling rpm from rpmbuild can exhibit undefined behavior and must not be used. This is what %requires_eq does. Please do not use %requires_eq macro at all.
It even breaks a build submission with fedpkg tool: $ fedpkg build --target f29-perl chyba: řádek 366: Neznámá značka: balíček libldb není nainstalován chyba: dotaz na spec soubor /home/petr/fedora/samba/samba.spec selhal, nemohu parsovat Could not get n-v-r-e from /home/petr/fedora/samba/samba.spec Note: You can skip NVR construction & NVR check with --skip-nvr-check. See help for more info.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
(In reply to Petr Pisar from comment #0) > The reason is %requires_eq macro is buggy: > > # LC_ALL="C" echo 'libldb' | xargs -r rpm -q --qf 'Requires: %{name} = > %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is > not" > balíček libldb není nainstalován > > While correct command is: > > # echo 'libldb' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %{name} = > %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is > not" > > The LC_ALL redefintion must be moved to the "xargs" command. Why don't we try fixing the issue in rpm's source? Please feel free to raise an issue or directly a PR at https://github.com/rpm-software-management/rpm/. > But that's not all. According to RPM authors and Fedora Packaging Committee > RPM is not reentrant and thus calling rpm from rpmbuild can exhibit > undefined behavior and must not be used. This is what %requires_eq does. > Please do not use %requires_eq macro at all. bug #1507420 details the underlying story of introducing %requires_eq for libldb into samba's spec file.
(In reply to Anoop C S from comment #3) > (In reply to Petr Pisar from comment #0) > > The reason is %requires_eq macro is buggy: > > > > # LC_ALL="C" echo 'libldb' | xargs -r rpm -q --qf 'Requires: %{name} = > > %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is > > not" > > balíček libldb není nainstalován > > > > While correct command is: > > > > # echo 'libldb' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %{name} = > > %{epoch}:%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is > > not" > > > > The LC_ALL redefintion must be moved to the "xargs" command. > > Why don't we try fixing the issue in rpm's source? > > Please feel free to raise an issue or directly a PR at > https://github.com/rpm-software-management/rpm/. Issue raised: https://github.com/rpm-software-management/rpm/issues/541
Better fix is to avoid using %require_eq at all, calling rpm from within rpm was never a particularly good idea.
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.