[opensuse-buildservice] Question about usage of 'osc build' and building dependent packages
Hi, I am a bit new to osc and OBS and for now I'm just building RPMs locally for openSUSE TW using 'osc build' Under my home:<account> folder, I have 2 packages: libfoo and foo. I created a .spec for libfoo and have it built successfully with 'osc build'. Now I want to build foo and made a .spec for it. It depends on libfoo and the .spec references it but I can't understand how to have the RPMS generated for libfoo to be installed in the chroot for foo which are necessary for it to compile. I can manually install libfoo RPMs with 'osc shell' but they are removed when building foo (and --noinit does not help). My guess is that this approach is wrong. So what is the proper workflow to build dependent packages locally ? Eventually I plan to have it built by OBS but I would like to avoid it without having stuff working locally first (if possible)... -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 22.01.20 um 15:52 schrieb Michael Pujos:
Hi,
I am a bit new to osc and OBS and for now I'm just building RPMs locally for openSUSE TW using 'osc build'
Under my home:<account> folder, I have 2 packages: libfoo and foo.
I created a .spec for libfoo and have it built successfully with 'osc build'.
Now I want to build foo and made a .spec for it. It depends on libfoo and the .spec references it but I can't understand how to have the RPMS generated for libfoo to be installed in the chroot for foo which are necessary for it to compile. I can manually install libfoo RPMs with 'osc shell' but they are removed when building foo (and --noinit does not help).
My guess is that this approach is wrong.
Yes.
So what is the proper workflow to build dependent packages locally ?
once libfoo.rpm is built, you copy the built rpms somewhere (/tmp/rpms for example). You get a list of built rpms at the end of "osc build". now you chdir to the foo package and issue "osc build --local-package ... -p /tmp/rpms" This should then install libfoo from /tmp/rpms into the build root. Of course only if your "foo.spec" contains "BuildRequires: libfoo" (or maybe better "BuildRequires: pkgconfig(foo)").
Eventually I plan to have it built by OBS but I would like to avoid it without having stuff working locally first (if possible)...
Well, libfoo is already building at least, so you could check it in, have it build in OBS and then it will be used automatically for builds. You still need the BuildRequires: line. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Thank you. This is the info I was missing.
once libfoo.rpm is built, you copy the built rpms somewhere (/tmp/rpms for example). You get a list of built rpms at the end of "osc build".
now you chdir to the foo package and issue "osc build --local-package ... -p /tmp/rpms"
This should then install libfoo from /tmp/rpms into the build root.
Of course only if your "foo.spec" contains "BuildRequires: libfoo" (or maybe better "BuildRequires: pkgconfig(foo)").
Eventually I plan to have it built by OBS but I would like to avoid it without having stuff working locally first (if possible)... Well, libfoo is already building at least, so you could check it in, have it build in OBS and then it will be used automatically for builds. You still need the BuildRequires: line.
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Michael Pujos
-
Stefan Seyfried