On 2017-03-08 20:35, Greg Freemyer wrote:
On Wed, Mar 8, 2017 at 1:39 PM, Carlos E. R. <> wrote:
Carlos,
At least take 10 minutes and see what it's like:
I have an OBS account, I dedicated hours to try. Not good. Compare your write up with: ./configure make su checkinstall Done. Anyway, thanks for your write work, I will try again.
1) Use you bugzilla credential to log into https://build.opensuse.org/ (that does some one time setup stuff the first time).
2) Install osc (zypper in osc)
3) Create a new working directory tree area to work in. I use ~/obs
mkdir ~/obs; cd ~obs
4) Check-out a package from OBS. This will get dc3dd from Leap 42.1
This assumes that it already exists. If I want to go this way is to build something that does not exist.
osc co openSUSE:Leap:42.1:Update dc3dd
5) Hop into the directory that now has the files needed to do a local build.
cd i~/obs/openSUSE:Leap:42.1:Update/dc3dd
6) Confirm you can do a local build (--local is needed for this because the tarball is no longer on line where it was)
osc build --local
That causes a chroot jail to be built with a new set of RPMs downloaded from OBS. Inside the jail the build pre-reqs are installed and the build performed.
The last few lines of the above tell you where to find the RPMs. You can install the RPMs or copy them to some local repo if you like.
7) Scream and shout that you have built your first set of RPMs via the OBS/osc mechanism
8) Break the spec file by deleting the lines immediately following %files near the end of the spec file
vi *.spec (and comment out these 4 lines from the %files section
# %doc ChangeLog COPYING NEWS THANKS # %doc *.txt # %{_bindir}/dc3dd # %{_mandir}/man1/dc3dd.1%{ext_man}
9) Try to build again, but note that you get errors at the end of the output:
osc build --local
[ 39s] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/abuild/rpmbuild/BUILDROOT/dc3dd-7.2.0-0.x86_64 [ 39s] error: Installed (but unpackaged) file(s) found: [ 39s] /usr/bin/dc3dd [ 39s] /usr/lib/debug/.build-id/1b/4095a17a0d90380f46f99d989398e0f8d95563 [ 39s] /usr/lib/debug/.build-id/1b/4095a17a0d90380f46f99d989398e0f8d95563.debug
[ 39s] /usr/lib/debug/usr/bin/dc3dd.debug
[ 39s] /usr/share/man/man1/dc3dd.1.gz [ 39s] [ 39s] [ 39s] RPM build errors: [ 39s] Installed (but unpackaged) file(s) found: [ 39s] /usr/bin/dc3dd [ 39s] /usr/lib/debug/.build-id/1b/4095a17a0d90380f46f99d989398e0f8d95563 [ 39s] /usr/lib/debug/.build-id/1b/4095a17a0d90380f46f99d989398e0f8d95563.debug
[ 39s] /usr/lib/debug/usr/bin/dc3dd.debug
[ 39s] /usr/share/man/man1/dc3dd.1.gz [ 39s] [ 39s] Thermaltake failed "build dc3dd.spec" at Wed Mar 8 19:19:29 UTC 2017. [ 39s]
10) Now the actual tricky part
Note that several of the unpackaged files are debug files. Ignore them.
Look at the files you don't have included and at the lines you commented out. Note the correlation and uncomment these two:
%{_bindir}/dc3dd %{_mandir}/man1/dc3dd.1%{ext_man}
11) Try the build again
osc build --local
Success again!
12) Compare what you have with what's in OBS
osc diff
%files %defattr(-,root,root) -%doc ChangeLog COPYING NEWS THANKS -%doc *.txt +# %doc ChangeLog COPYING NEWS THANKS +# %doc *.txt %{_bindir}/dc3dd %{_mandir}/man1/dc3dd.1%{ext_man}
So you're removed the inclusion of some doc files, but at least for building, that didn't break anything. If you tried to issue an SR to do that, you would get blocked. Either by automation or a juman review.
12) Restore you spec file to virgin
rm dc3dd.spec osc up
============
And that's the first basics, Admittedly there is a lot more to learn, but it is doable and the ability to checkout working packages as a reference really simplifies the learning curve.
I'll try, but you are departing from an already existing and correct .spec file. On what I may want to build, there will not be at all a spec, or it exists for ubuntu or debian or something else with different standards. Thanks. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" (Minas Tirith))