Can't build on Obs

First of, Thx for reading and answering this post if you can.

That being said, I’m trying to get my project named skylendar on Obs. Thus, I created a project as described in the doc, downloaded a spec file and the skylendar-4.1nn-.tar.xz archive via both the web interface and the command line, and launched the building process, which failed… :frowning:

But I got this in the live build log.

   41s] -----------------------------------------------------------------
   41s] I have the following modifications for skylendar.spec:
   41s] 10c10
   41s] < Release:        1
   41s] ---
   41s] > Release:        2.1
   41s] -----------------------------------------------------------------
   41s] ----- building skylendar.spec (user abuild)
   41s] -----------------------------------------------------------------
   41s] -----------------------------------------------------------------
   42s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define 'disturl obs://build.opensuse.org/home:lader1/openSUSE_Factory/048d1335137c91fdad23b91549ef4005-Skylendar' /home/abuild/rpmbuild/SOURCES/skylendar.spec
   42s] setting SOURCE_DATE_EPOCH=1278244800
   42s] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.sR4UTh
   42s] + umask 022
   42s] + cd /home/abuild/rpmbuild/BUILD
   42s] + mv /home/abuild/rpmbuild/BUILDROOT/skylendar-4.1nn-2.1.x86_64 /home/abuild/rpmbuild/tmpBBroot
   42s] mv: cannot stat '/home/abuild/rpmbuild/BUILDROOT/skylendar-4.1nn-2.1.x86_64': No such file or directory
   42s] error: Bad exit status from /var/tmp/rpm-tmp.sR4UTh (%prep)
   42s] 
   42s] 
   42s] RPM build errors:
   42s]     Bad exit status from /var/tmp/rpm-tmp.sR4UTh (%prep)
   42s] 
   42s] build32 failed "build skylendar.spec" at Fri Feb  1 16:25:00 UTC 2019.
   42s] 
   42s] ### VM INTERACTION START ###
   45s]    36.858260] sysrq: SysRq : Power Off
   45s]    36.862213] reboot: Power down
   47s] ### VM INTERACTION END ###
   47s] 
   47s] build32 failed "build skylendar.spec" at Fri Feb  1 16:25:06 UTC 2019.
   47s] 

Have u any idea what’s wrong ?

Thx again

Hi
Yikes, that’s an old spec file, and not up to par :wink:

For %prep we just extract the tarball;


%setup -q

Which is if you extracted the tarball locally… then you need to setup %build, then look at %install…

%build needs cmake to prepare etc, have a look here for an example as there are macros to do all the hard work…

https://build.opensuse.org/package/view_file/home:malcolmlewis:TESTING/openMVG/openMVG.spec?expand=1

Ok, will test. Thx for the help

Mhh, I got the same problem. How to indicate in the .spec file where to find out the tarball, because it is already added in the source file section of the obs ?

Hi
You need to add;


Source0: skylendar-4.1nn.tar.xz

Get rid of the defines as well…

I did that, but some requirements have not been fulfilled: i.e.

I need libQt5Svg5-devel, but only libQt5Svg5 seems to exist in the opensuse repositories. Same thing with libz1-devel. Only libz1 exists.
Sighhhh :frowning:

Hi
Best way is to use pkgconfig if possible…


BuildRequires: pkgconfig(Qt5Svg) 
BuildRequires: pkgconfig(zlib)

https://build.opensuse.org/package/binary/openSUSE:Factory/libqt5-qtsvg/standard/x86_64/libqt5-qtsvg-devel-5.12.0-1.2.x86_64.rpm
https://build.opensuse.org/package/binary/openSUSE:Factory/zlib/standard/x86_64/zlib-devel-1.2.11-5.5.x86_64.rpm

Problems again:

   80s] -----------------------------------------------------------------
   80s] I have the following modifications for skylendar.spec:
   80s] 3c3
   80s] < Release:        1
   80s] ---
   80s] > Release:        13.1
   80s] -----------------------------------------------------------------
   80s] ----- building skylendar.spec (user abuild)
   80s] -----------------------------------------------------------------
   80s] -----------------------------------------------------------------
   80s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define 'disturl obs://build.opensuse.org/home:lader1/openSUSE_Factory/9099587643992230705a044f56d4b302-Skylendar' /home/abuild/rpmbuild/SOURCES/skylendar.spec
   80s] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.JTx1yx
   80s] + umask 022
   80s] + cd /home/abuild/rpmbuild/BUILD
   80s] + cd /home/abuild/rpmbuild/BUILD
   80s] + rm -rf skylendar-4.1nn
   80s] + /usr/bin/xz -dc /home/abuild/rpmbuild/SOURCES/skylendar-4.1nn.tar.xz
   80s] + /usr/bin/tar -xof -
   81s] + STATUS=0
   81s] + '' 0 -ne 0 ']'
   81s] + cd skylendar-4.1nn
   81s] /var/tmp/rpm-tmp.JTx1yx: line 34: cd: skylendar-4.1nn: No such file or directory
   81s] error: Bad exit status from /var/tmp/rpm-tmp.JTx1yx (%prep)
   81s] 
   81s] 
   81s] RPM build errors:
   81s]     Bad exit status from /var/tmp/rpm-tmp.JTx1yx (%prep)
   81s] 
   81s] cloud124 failed "build skylendar.spec" at Fri Feb  1 21:30:31 UTC 2019.
   81s] 
   81s] ### VM INTERACTION START ###
   84s]    56.383246] sysrq: SysRq : Power Off
   84s]    56.387084] reboot: Power down
   92s] ### VM INTERACTION END ###
   92s] 
/var/tmp/rpm-tmp.JTx1yx: line 34: cd: skylendar-4.1nn: No such file or directory

If you unpack your Source, you get files in an directory named skylendar and not skylendar-4.1nn

So maybe you use: %setup -q -n skylendar-4.1nn

PS:
Maybe better to use the openSUSE rpm from skylendar?

Hi
It needed to create the directory first (-c) and change to it and unpack…

Here you go: https://build.opensuse.org/request/show/670647

It’s building, but failing… patches needed by the looks.

Hi
The above is cancelled…

I have prepared some patches etc so it all builds etc. I noted your with you current build the upstream sources changed, did you change and create a new tarball? If so, please don’t do that, always patch, fix etc with the pristine upstream source.

Welcome - openSUSE Build Service

Do you want me to push this build to you on a SR?

Yesterday, BuildRequires: pkgconfig(Qt5Linguist) worked in my .spec file. but today, it says that nothing provides this. How can I declare the qt5 linguist tools ?

The build logs say:

104s] CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
104s] Could not find a package configuration file provided by “Qt5LinguistTools”
104s] with any of the following names:
104s]
104s] Qt5LinguistToolsConfig.cmake
104s] qt5linguisttools-config.cmake
104s]

Hi
There is no pkgconfig, use cmake(Qt5Linguist) instead.

I both tried cmake(Qt5Linguist) and BuildRequires: cmake(Qt5Linguist) but got errors in either cases.

Hi
Its cmake(Qt5LinguistTools);

Thx very much for the contribution, but unfortunately, I got this error message:
[41s]error: Bad source: /home/abuild/rpmbuild/SOURCES/skylendar-fix-qt-error.patch: No such file or directory

you deserve that I click on a star, but there is no visible star below your posts. But I rated the thread as excellent :wink:

Ok, found th star, but only after having rated the thread !

Hi
You need to grab the patches as well… :wink:

I grabbed and uploaded the patches as recommended, but I got this:


   68s] + echo 'Patch #0 (skylendar-fix-qt-error.patch):'
   68s] Patch #0 (skylendar-fix-qt-error.patch):
   68s] + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0
   68s] can't find file to patch at input line 4
   68s] Perhaps you used the wrong -p or --strip option?
   68s] The text leading up to this was:
   68s] --------------------------
   68s] |diff -Naur a/skylendar/src/editastrodata.cpp b/skylendar/src/editastrodata.cpp
   68s] |--- a/skylendar/src/editastrodata.cpp    2018-12-12 13:33:24.157745000 -0600
   68s] |+++ b/skylendar/src/editastrodata.cpp    2019-02-01 16:47:10.444078545 -0600
   68s] --------------------------
   68s] File to patch: 
   68s] Skip this patch? [y] 
   68s] Skipping patch.
   68s] patch unexpectedly ends in middle of line


Hi
Your source is different...???? This is the one I used: https://sourceforge.net/projects/skylendar/files/skylendar-4.1nn.tar.xz/download