Build from Source
DNF has the capability to download the source code.
Then we can utilize other tool to build from source.
herbstluftwm as our guinea pig example.
I was wondering how DNF handle source code,
and I finally figure out a generic steps,
from the very nice fedora Community in Google Plus.
Let me quote form “Johan Heikkilä”:
Dnf has capability to install source packages, as long as they are available in the installed/enabled repositories. It is recommended to do the following steps as user and not as root.
In this example:
I actually alter the steps a bit for clarity.
And I still use root for simplicity. It is just docker experience anyway.
Using herbstluftwm as an example case
We require to install
And also these toolchain.
Now consider using home directory.
Since we have already enable
we can directly download.
We need to extract the previously downloaded package
As you can see below, there are warnings for using root.
For real system, please do not use root.
Now we have two directories inside.
Since the case is Herbstluftwm,
we also need require to install these packages
to avoid missing dependencies.
Consider get in to
~/rpmbuild/SPECS to build.
Consider going back to
Now we can see additional directories inside as built result.
And the build output result
Now we can install the previously built rpm.
There are also Mock solution. But it is beyond this scope.
I respect the help from community.
Again, thank you.
Often we need to inspect
No need any
as this more like an
Check for possible issue, similar to lintian or namcap.
You can also query file
-Qpl directly to the
Or use the
rpmls from the
This one also extract.
These are just preliminary knowledge about DNF.
Thank you for reading