Obs_scm vs buildroot vs standard macros

My _service file works. It creates the obscpio and set_version creates the _service spec file that rpmbuild executes. What I’m struggling with is how to convince the default macros to work with it.

People tend to just suggest to avoid set_version and re-compress but that seems a bit wasteful.

I’ve seen the suggestion to call %setup with a different path which works for the %prep phase but then buildroot is still wrong for all the other phases like build install etc.

Is there a way to override what the buildroot is?

My _service file can be found here File _service of Package blueman-git - openSUSE Build Service

Why is that when I make a post on an issue I find a solution like 30 minutes later :sweat_smile:. So the issue was that I had the tar service still in my _service file. Now everything magically works.

I do want to note that the documentation for this is quite hard to find. The documentation for this on openSUSE:Build Service Concept SourceService - openSUSE Wiki is still assuming tar_scm is used which is deprecated. I read the deprecated bit and started using obs_scm and got stuck.

Well, after reading this topic I neither understand what problem you had nor what you did to solve this problem. What about providing description that actually helps others?

It is wiki. You can edit it.

I ran into more issues since but the original issue is that obs_scm without re-compress needs to build in %_sourcedir. But by default rpmbuild/obs looks in the BUILD directory for files.

I got %prep working by using %setup -q -n %_sourcedir/%name-%version -T -D but then %build failed as it still looks in the BUILD dir. The reason I guess it was still looking in BUILD dir was because of the tar service I had in the _service file as removing the tar service %build started looking for files (like configure) in %_sourcedir`.

Current issue is that %files/%doc bits are failing as they are looking for things in BUILD again :sob:.

Like why :confused: . It somehow knows it has to look in the source dir but then prefixes it with the buildroot path.

[   41s] Executing(%doc): /usr/bin/bash -e /var/tmp/rpm-tmp.1PKaqX
[   41s] + umask 022
[   41s] + cd /home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build
[   41s] + cd /home/abuild/rpmbuild/SOURCES/blueman-2.5.git.1750957498.0c9b506d
[   41s] + DOCDIR=/home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build/BUILDROOT/usr/share/doc/packages/blueman
[   41s] + export LC_ALL=C.UTF-8
[   41s] + LC_ALL=C.UTF-8
[   41s] + export DOCDIR
[   41s] + /usr/bin/mkdir -p /home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build/BUILDROOT/usr/share/doc/packages/blueman
[   41s] + cp -pr /home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build/home/abuild/rpmbuild/SOURCES/blueman-2.5.git.1750957498.0c9b506d/CHANGELOG.md /home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build/BUILDROOT/usr/share/doc/packages/blueman
[   41s] cp: cannot stat '/home/abuild/rpmbuild/BUILD/blueman-2.5.git.1750957498.0c9b506d-build/home/abuild/rpmbuild/SOURCES/blueman-2.5.git.1750957498.0c9b506d/CHANGELOG.md': No such file or directory

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.