This is one topic of a package management diversity series.
This is a four-parts article. There are few sections here.
- Preface: Test Bed
- Getting Started With Docker
- Package Management: RPM Frontend, Get Help, DNF Shell
- Updating System: OS Release, Repository List, System Upgrade, Extra Commands
- Package IRSIF: Install, Removal, Query Search, Show Info, Install Feature, List File
- What's Next
- Dependency: Help, Dependency, Reverse Dependency, Test, Tree
- Group: Group List, Group Info, Group Install, Beyond Group
- Repositories: repolist, repoinfo, repo-pkgs, --enablerepo, Mirror
- What's Next
- Plugin: List, Install, Help, Config Manager Example
- History: The Log File, DNF History
- Hold Package: Example, Add Lock, Remove Lock
- Clean Up
- Build from Source
- Miscellanous: Downgrade, dist-sync
- What's Next
- Build from Source: Requirement, Example, Extract, Dependencies, Build, Install
- Inspect Package: rpmlint, rpm -Qpl, rpmls, rpm2cpio
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