On 22/07/2019 08.59, David C. Rankin wrote:
On 07/21/2019 07:03 AM, Andrei Borzenkov wrote:
what I did:
- downloaded kuickshow-0.9.2-4.1.src.rpm from http://download.opensuse.org/repositories/home:/mad_soft/openSUSE_Leap_42.3/...
(tried to install it directly instead of downloading it, but nothing was installed, Installing source RPM just copies files under %buildroot which by default is ~/rpmbuild for non-root user; for root user this is /usr/src/packages. I am not sure how you checked what was installed.
When you install rpmbuild and the suse build tools, then will create the rpmbuild directory in your $HOME directory:
$ tree rpmbuild/ rpmbuild/ ├── BUILD ├── BUILDROOT ├── OTHER ├── RPMS ├── SOURCES ├── SPECS └── SRPMS
On home? I have them on the root. /usr/src/packages/. I have also: /home/cer/rpmbuild/ with SOURCES and SPECS only, but I created them, not the package.
When you install a .srpm, the sources and patches, etc.. are copied to SOURCES and the .spec file is copied to SPECS. (you make any changes needed to the .spec, and you add any new patches to the SOURCES directory)
But yast installs the srpm to /usr/src/packages/, accessible to root. YaST does not run as user.
When you now attempt to build the rpm with rpmbuild, you will do:
$ rpmbuild -ba ~/rpmbuild/SPECS/kwickshow.spec
(or use -bb to build only the binary, or -bs to build only the srpm, etc..)
The completed rpm will end up in rpmbuild/RPMS/x86_64 (or noarch, or x86, ..)
The new .srpm will go under SRPMS.
The only downside (depending on how good the spec is with dependencies) is you may end up with failures like:
make[2]: *** No rule to make target '/usr/lib64/libImlib.so', needed by 'lib/libkdeinit4_kuickshow.so'. Stop.
where you are missing the library '/usr/lib64/libImlib.so' (or similar), but the build didn't stop due to a missing package dependency -- so you are left to 'zypper se' to find what package you need to install to provide the missing library, etc.. (usually the -devel package, like libImlib-devel, etc..)
It's usually not that bad to track down the handful of problems. Now with kwickshow being a KDE4 (or KDE3) package, you will need to make sure you have the correct repos enabled to get the correct version of the library needed.
rpmbuild is a fantastic tool. osc is also a good tool for building. Much easier than fighting with the buildservice web interface in many cases.
I will save these notes :-) -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)