Building an RPM from its source rpm

,

In fedora 39 I am trying to build the RPM for a prior version of conky from its source RPM, namely version 1.11.5.

In order to satisfy the source RPM’s dependencies, I had to manually download and install one of the build dependencies, namely wireless-tools-devel.

I set up my build environment by running

$ sudo dnf install fedora-packager
$ rpmdev-setuptree
$ sudo dnf builddep ./conky-1.11.5-3.fc32.src.rpm

But when I run the rpm build command

rpmbuild --rebuild ./conky-1.11.5-3.fc32.src.rpm

I get the error

CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_WEATHER_XOAP
    CMAKE_Fortran_FLAGS_RELEASE
    CMAKE_INSTALL_DO_STRIP
    INCLUDE_INSTALL_DIR
    LIB_SUFFIX
    SHARE_INSTALL_PREFIX
    SYSCONF_INSTALL_DIR


-- Build files have been written to: /home/ernesto/rpmbuild/BUILD/conky-1.11.5/redhat-linux-build
+ make -j2
make: *** No targets specified and no makefile found.  Stop.
error: Bad exit status from /var/tmp/rpm-tmp.uyS3sc (%build)

RPM build warnings:
    user mockbuild does not exist - using root
    user mockbuild does not exist - using root

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.uyS3sc (%build)

Am I missing a step in the setup?

1 Like

Maybe dnf builddep ./conky-1.11.5-3.fc32.src.rpm?

My guess is that you need this change: https://src.fedoraproject.org/rpms/conky/c/91d2bb5b96ad54446f33578535c466e1086333b9

due to Changes/CMake to do out-of-source builds - Fedora Project Wiki

ahh I did forget to mention that I built the source dependencies as well, will add it to the post

Chris you nailed it! Performing said updates on the spec file allowed me to successfully compile the rpm :smiley:

The 9 of us that use this niche monitoring software will be forever grateful! Here’s a pic of conky in action with wifi support to hopefully wet the apetite of others into the hobby:

1 Like