Hold Package: Case Example, Add Lock, Test Example, Remove Lock
Interesting Issue: systemd Dependencies
Conclusion
Build from Source
Zypper has the capability to download the source code.
Then we can utilize other tool to build from source.
General Requirement
We require to install rpm-build and toolchain.
Download and Extract
I choose herbstluftwm as an example.
Source install in zypper will download source code,
and extract to into /usr/src/packages/.
Downloading also install required package dependencies.
Please click the figure for longer content.
Build Dependencies
You can also install only updated dependencies.
This happen sometimes after a while,
like after a month, there should be package update in tumbleweed.
[
Source Path
Now we have these directories,
we need the herbstluftwm.spec.
Consider use SPECS path as working directory for build.
Build
Just one command rpmbuild -ba.
Install The RPM Output
Consider check if the output exist, and install.
Now we are almost done.
Inspect Package
Often we need to inspect .rpm package.
No need any zypper command,
as this more like an rpm issue.
rpmlint
Check for possible issue, similar to lintian or namcap.
rpm -Qpl
You can also query file -Qpl directly to the .rpm package.
rpmls
Or use the rpmls from the rpmdevtools package
rpm2cpio
This one also extract.
Hold Package
Zypper hold package using lock mechanism.
This is just terminology.
Case Example
Suppose you want to do system upgrade,
but you do not want to upgrade certain package.
There is a good reason for these,
such as keeping old driver,
because the latest has a issue or such reason.
Or maybe we want to keep our current beloved newly compiled herbstluftwm
that equipped with super duper specific configuration parameter optimization.
You can skip or ignore by hold package
so that the package will kept intact
while doing system upgrade.
Add Lock
We can add lock easily using zypper.
This will put new package entry in /etc/zypp/locks.
Now you can view the entry in nice table.
Test Example
Now we have different result
when doing the same zypper dup command.
Remove Lock
You can unlock package by removing list
from configuration /etc/zypp/locks
or command line
Interesting Issue
systemd Dependencies
While solving the no manual problem,
I encountered another issue.
This is somehow interesting,
manual pages in openSUSE depend on systemd.
Why would a manual man need to depend to an init ?
openSUSE minimal install allow the user to remove systemd,
leaving the system without init.
Conclusion
These are just preliminary knowledge about Zypper.