How can I configure obs globally to set a specific distribution and vendor if the specfile contains
distribution: %{distribution}
vendor: %{vendor}
Normally I’d do it in /etc/rpm/macros, but here…?
Currently vendor will be set to “obs://private/projectname” and distribution is unset.
Also the packager is unset, because I removed it from my specs as the build process mocked me about presetting the packager name. I’d like it to automatically be the obs login name of the developer who compiles the package. After submitting the package to another project the package should not be recompiled (it makes no sense to me); is this possible to configure?
Is it possible to get access to the build sandbox to check things for debugging reasons? For example if the build process tells me that it cannot find a file my only option is to recompiler with a find command added to the specfile to see where my files are and where they are expected. Is it possible to speedup the sandbox creation? It needs about two minutes every time; I guess having a VM with a snapshot or something like this would be faster.
Also, the SLES11 builds try to install my packages but most of my packages depend on other (existing) ones before they can be installed, but mostly this test fails because I don’t want to duplicate all my requirements as buildrequirements - this should happen automatically if such a test is performed. How should I handle this?
Depending on what method your using to build, build-root, kvm other? You can use chroot.
Then there is;
.build.log Examine the build and identify the error.
.build.command The command used to do the actual build.
.build.packages The directory where the object files are.
Not sure what you mean about the build requirements, when installing rpm should determine the requires if libs etc are defined properly in the build (probably using pkgconfig).
On the WEB UI in the completed build and repository if you select the rpm binary it will take you to a page showing all the provides and requires.
How can I configure the %vendor and %distribution macros? The howto does not mention that. I’d guess via some advanced/xml entries. Is there a documentation about those btw?
Depending on what method your using to build, build-root, kvm other? You can use chroot.
I use the default from the obs application vm; I don’t know what kind of sandbox is used there. But building the box is quite slow (my avg build time is 2 minutes; about the time the sandbox creation needs) and I have about 200 packages to build. Most packages need some fixing here and there to build with OBS. So I’d like to optimize this if possible.
And as my packages were created for SLES11 or older versions but now have to work with CentOS as well, I’d like to have access to the build environment sometimes to have a look at things if something breaks.
Then there is;
.build.log Examine the build and identify the error.
.build.command The command used to do the actual build.
.build.packages The directory where the object files are.
find / -name .build.log does not find anything on my OBS machine (same with the other files).
Not sure what you mean about the build requirements, when installing rpm should determine the requires if libs etc are defined properly in the build (probably using pkgconfig).
For example:
I have a package “configtools” that contains a program “cfgfoo” that is used in several other programs and %pre/%post sections in spec files.
Lets assume I am now building another package that uses cfgfoo in its %post section, so I add “Requires: configtools” to the package because configtools must be preinstalled before the new package is going to be installed.
The build process works fine for CentOS because it just builds the rpm file but the SLES11 build process fails. This is because after rpm file building the SLES11 repository performs an installation in the sandbox which fails because cfgfoo is not available.
If I add “BuildRequires: configtools” it works because then the configtools package is installed as well - but cfgfoo is not actually required for the build process.
I know that I can disable this with “BuildRequires: -post-build-checks” but actually the OBS should be able to resolve this automatically.
How can I configure the %vendor and %distribution macros? The howto does
not mention that. I’d guess via some advanced/xml entries. Is there a
documentation about those btw?
I use the default from the obs application vm; I don’t know what kind of
sandbox is used there. But building the box is quite slow (my avg build
time is 2 minutes; about the time the sandbox creation needs) and I have
about 200 packages to build. Most packages need some fixing here and
there to build with OBS. So I’d like to optimize this if possible.
And as my packages were created for SLES11 or older versions but now
have to work with CentOS as well, I’d like to have access to the build
environment sometimes to have a look at things if something breaks.
>
> Then there is;
> >
Code:
> >
> .build.log Examine the build and identify the error.
> .build.command The command used to do the actual build.
> .build.packages The directory where the object files are.
>
> >
>
find / -name .build.log does not find anything on my OBS machine (same
with the other files).
I’m referring to using the osc command (not the web ui) to look at the
build info on the machine (or a remote host running osc). You should
look at using this tool, far quicker…
For example:
I have a package “configtools” that contains a program “cfgfoo” that is
used in several other programs and %pre/%post sections in spec files.
Lets assume I am now building another package that uses cfgfoo in its
%post section, so I add “Requires: configtools” to the package because
configtools must be preinstalled before the new package is going to be
installed.
The build process works fine for CentOS because it just builds the rpm
file but the SLES11 build process fails. This is because after rpm file
building the SLES11 repository performs an installation in the sandbox
which fails because cfgfoo is not available.
If I add “BuildRequires: configtools” it works because then the
configtools package is installed as well - but cfgfoo is not actually
required for the build process.
I know that I can disable this with “BuildRequires: -post-build-checks”
but actually the OBS should be able to resolve this automatically.
Again look at adding this sort of info into the project configuration
as it is part of ‘your standard’ build requirements.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.79-18.26-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!