Description of problem: Fedora/RISC-V (riscv64) kernel does not have /proc/self/loginuid thus misc.getloginuid() returns None and then the conversion to int fails. This happens while running appliance-creator to create nightly disk images. https://github.com/rpm-software-management/dnf/blob/58197bd1207525fd28cc135f88c2b988357daf5d/dnf/db/history.py#L448 [..] RPMDB altered outside of DNF. ['/'] Traceback (most recent call last): File "/usr/bin/appliance-creator", line 173, in <module> sys.exit(main()) File "/usr/bin/appliance-creator", line 151, in main creator.install() File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 726, in install dbo.runInstall() File "/usr/lib/python2.7/site-packages/imgcreate/dnfinst.py", line 211, in runInstall ret = self.do_transaction(TransactionProgress()) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 904, in do_transaction self._run_transaction(cb=cb) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 974, in _run_transaction tid = self.history.beg(rpmdbv, using_pkgs, [], cmdline) File "/usr/lib/python2.7/site-packages/dnf/db/history.py", line 448, in beg int(misc.getloginuid()) TypeError: int() argument must be a string or a number, not 'NoneType' Unmounting directory /var/tmp/imgcreate-eGs3tj/install_root/ Removing compat symlinks Unmapping /dev/loop0 Losetup remove /dev/loop0 [..] Version-Release number of selected component (if applicable): We moved to DNF 3.0.2 and this started to happen. This particular code was added ~5 months ago and landed in DNF 3. How reproducible: Boot in Fedora/RISC-V QEMU, e.g.: https://fedorapeople.org/groups/risc-v/disk-images/ [root@hifive ~]# cat /proc/self/loginuid cat: /proc/self/loginuid: No such file or directory [root@hifive ~]# python Python 2.7.15 (default, May 7 2018, 14:37:14) [GCC 8.1.1 20180502 (Red Hat 8.1.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from dnf.yum import misc >>> a = misc.getloginuid() >>> type(a) <type 'NoneType'> >>> print(a) None
Dear DNF developers, I am the maintainer of DNF package on the ArchLinux User Repository (https://aur.archlinux.org/packages/dnf/). Since ArchLinux kernel is compiled without audit support, DNF 3 does not work on Arch because of this issue. This prevents me to push DNF 3 to the AUR until this bug gets fixed. Best regards,
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
I create a patch that catch also TypeError: https://github.com/rpm-software-management/dnf/pull/1428. Please any feedback is welcome.
It looks like that the issue is already fixed in dnf-3.3.0+ by https://github.com/rpm-software-management/dnf/commit/70779df36929b5ccd621941a78c162ae3b8ea7c2