supermin in Fedora Rawhide switched (again) to using dnf instead of yum
Previous attempt: https://www.redhat.com/archives/libguestfs/2015-April/msg00013.html supermin needs to download packages (eg. RPMs) when preparing the appliance. After a lot of work, 'dnf download' can now be used as a replacement for the (deprecated) 'yumdownloader' program. This only affects the 'supermin --prepare' phase, which means it only affects people building libguestfs from source. Ordinary use of libguestfs, even in Rawhide, should be unaffected. If you are building libguestfs from source on Fedora please try the new supermin + dnf, and let me know if you find any problems. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
On Thu, May 21, 2015 at 02:37:31PM +0100, Richard W.M. Jones wrote:
Previous attempt: https://www.redhat.com/archives/libguestfs/2015-April/msg00013.html
supermin needs to download packages (eg. RPMs) when preparing the appliance.
After a lot of work, 'dnf download' can now be used as a replacement for the (deprecated) 'yumdownloader' program.
This only affects the 'supermin --prepare' phase, which means it only affects people building libguestfs from source. Ordinary use of libguestfs, even in Rawhide, should be unaffected.
If you are building libguestfs from source on Fedora please try the new supermin + dnf, and let me know if you find any problems.
I just built `supermin` from source on my Fedora 22 machine, and somehow it can't seem to detect RPM (but `supermin` from Rawhide detects it). Exact error: supermin: could not detect package manager used by this system or distro. which is coming from: supermin/src/package_handler.ml. Test ---- Build `supermin` from source: $ git clone https://github.com/libguestfs/supermin.git $ ./bootstrap $ ./autogen.sh $ ./configure $ make $ echo $? 0 Try to build a `supermin` appliance: $ ../src/supermin --prepare bash coreutils -o basic-supermin.d supermin: could not detect package manager used by this system or distro. If this is a new Linux distro, or not Linux, or a Linux distro that uses an unusual packaging format then you may need to port supermin. If you are expecting that supermin should work on this system or distro then it may be that the package detection code is not working. To list which package handlers are compiled into this version of supermin, do: supermin --list-drivers List `supermin` drivers: $ ../src/supermin --list-drivers | grep -fedora fedora/rpm not-detected Build an appliance from rawhide-installed `supermin` proceeds further, because RPM was detected, however it seems to fail due to cache synchronization issue on my Fedora 22 machine (but obtained `supermin` from Rawhide): $ rpm -q supermin supermin-5.1.12-11.fc23.x86_64 $ supermin --list-drivers | grep fedora fedora/rpm detected $ supermin --prepare bash coreutils -o supermin.d Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64 [Connection timed out after 120002 milliseconds] supermin: /usr/bin/dnf download -q --destdir '/tmp/supermin8ff696.tmpdir/o64gk00o' 'bash.x86_64' 'coreutils.x86_64' 'glibc.x86_64' 'info.x86_64' 'grep.x86_64' 'libattr.x86_64' 'openssl-libs.x86_64' 'glibc-common.x86_64' 'ca-certificates.noarch' 'crypto-policies.noarch' 'krb5-libs.x86_64' 'setup.noarch' 'fedora-release.noarch' 'fedora-repos.noarch': command failed, see earlier errors What am I missing? -- /kashyap
On Mon, May 25, 2015 at 10:22:35PM +0200, Kashyap Chamarthy wrote:
I just built `supermin` from source on my Fedora 22 machine, and somehow it can't seem to detect RPM (but `supermin` from Rawhide detects it). Exact error:
supermin: could not detect package manager used by this system or distro.
which is coming from: supermin/src/package_handler.ml.
Test ----
Build `supermin` from source:
$ git clone https://github.com/libguestfs/supermin.git $ ./bootstrap $ ./autogen.sh $ ./configure
I'm guessing that you don't have one of 'rpm-devel', 'yum-utils' or 'dnf' installed. What is the output from ./configure? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
On Tue, May 26, 2015 at 09:44:33AM +0100, Richard W.M. Jones wrote:
On Mon, May 25, 2015 at 10:22:35PM +0200, Kashyap Chamarthy wrote:
I just built `supermin` from source on my Fedora 22 machine, and somehow it can't seem to detect RPM (but `supermin` from Rawhide detects it). Exact error:
supermin: could not detect package manager used by this system or distro.
which is coming from: supermin/src/package_handler.ml.
Test ----
Build `supermin` from source:
$ git clone https://github.com/libguestfs/supermin.git $ ./bootstrap $ ./autogen.sh $ ./configure
I'm guessing that you don't have one of 'rpm-devel',
I was missing this. Retrying with it.
'yum-utils' or 'dnf' installed.
I did have these, though: yum-utils-1.1.31-505.fc22.noarch dnf-1.0.0-1.fc22.noarch rpm-4.12.0.1-9.fc22.x86_64
What is the output from ./configure?
https://kashyapc.fedorapeople.org/virt/temp/supermin-config.log
From here, it complains that the 'rpm' package is not found in in the PKG_CONFIG_PATH:
[. . .] configure:15882: $PKG_CONFIG --exists --print-errors "rpm" Package rpm was not found in the pkg-config search path. Perhaps you should add the directory containing `rpm.pc' to the PKG_CONFIG_PATH environment variable No package 'rpm' found configure:15885: $? = 1 configure:15899: $PKG_CONFIG --exists --print-errors "rpm" Package rpm was not found in the pkg-config search path. Perhaps you should add the directory containing `rpm.pc' to the PKG_CONFIG_PATH environment variable No package 'rpm' found [. . .] -- /kashyap
On Tue, May 26, 2015 at 10:59:19AM +0200, Kashyap Chamarthy wrote:
On Tue, May 26, 2015 at 09:44:33AM +0100, Richard W.M. Jones wrote:
On Mon, May 25, 2015 at 10:22:35PM +0200, Kashyap Chamarthy wrote:
I just built `supermin` from source on my Fedora 22 machine, and somehow it can't seem to detect RPM (but `supermin` from Rawhide detects it). Exact error:
supermin: could not detect package manager used by this system or distro.
which is coming from: supermin/src/package_handler.ml.
Test ----
Build `supermin` from source:
$ git clone https://github.com/libguestfs/supermin.git $ ./bootstrap $ ./autogen.sh $ ./configure
I'm guessing that you don't have one of 'rpm-devel',
I was missing this. Retrying with it.
Yep -- 'rpm-devel' and 'zlib-static' (which was not pulled in by `dnf builddep supermin`, though) package did it (thanks Pino): Build `supermin: $ dnf install xz-static $ sudo dnf install rpm-devel -y $ ./configure $ make $ make check [. . .] # TOTAL: 8 # PASS: 8 [. . .] Check for rpm driver: $ ../src/supermin --list-drivers | grep fedora fedora/rpm detected Prepare and build the appliance using the existing script from source tree: $ ./build-basic-vm.sh $ cd basic-full-appliance/ Boot it: $ qemu-system-x86_64 -m 512 -kernel kernel \ -initrd initrd -serial mon:stdio \ -append 'console=ttyS0,115200,selinux=0' \ -drive file=root,format=raw,if=virtio \ -nographic -nodefconfig -nodefaults [. . .] bash-4.3# Thanks. -- /kashyap
participants (2)
-
Kashyap Chamarthy -
Richard W.M. Jones