[opensuse-packaging] Building a set of RPM packages locally
Hi! I am still very new to the OBS ecosystem and I couldn't find information about building sets of packages (depending on each other) locally in a way that for example `mock` (where you can use the `--chain` option for that). Is it possible to build set of packages locally without sending the information to build.opensuse.org? I found in the documentation that building the set of packages can be done by creating them within the project, however for now I cannot do this, as they are part of a commercial program that later on will be distributed for openSUSE, I try to create a custom version specifically for this platform. Am I wrong here to assume that I need to send the information to the external service? Thanks in advance! Cheers, Jakub Olczyk -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 3/19/20 3:44 PM, Jakub Olczyk wrote:
the `--chain` option for that). Is it possible to build set of packages locally without sending the information to build.opensuse.org?
There is the --prefer-pkgs=DIR Prefer packages from this directory when installing the build-root. And you can set output directory too. --keep-pkgs=DIR Save built packages into this directory But I think at certain point you would probably better off with trying to install your own instance of OBS for building. https://openbuildservice.org/download/ - Adam -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 2020-03-19 15:44:37 +0100, Jakub Olczyk wrote:
I am still very new to the OBS ecosystem and I couldn't find information about building sets of packages (depending on each other) locally in a way that for example `mock` (where you can use the `--chain` option for that). Is it possible to build set of packages locally without sending the information to build.opensuse.org?
It depends a bit what "sending the information" actually means... You can use "osc build ..." to perform a local build of a package. If you have a set of packages, you have to manually "derive" the build order for the set of packages. Let's assume you have the packags A, B, C, D, E. A depends on packages from openSUSE Tumbleweed B depends on A + packages from openSUSE Tumbleweed E depends on D + packages from openSUSE Tumbleweed D depends on A, C + packages from openSUSE Tumbleweed C depends on packages from openSUSE Tumbleweed In this case, a potential build order would be A, B, C, D, E (or C, A, D, E, B) etc. Once, you have the build order, you can use osc to build the packages locally: $> cd package $> osc build --alternative-project openSUSE:Factory snapshot x86_64 \ -k /dir/where/to/store/built/packages \ -p /dir/where/to/store/built/packages Note that this will send some "information", like the spec file (or any other build description) + the dependency information retrieved from the packages stored in /dir/where/to/store/built/packages, to the OBS. Marcus -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Donnerstag, 19. März 2020, 16:03:57 CET wrote Marcus Hüwe:
On 2020-03-19 15:44:37 +0100, Jakub Olczyk wrote:
I am still very new to the OBS ecosystem and I couldn't find information about building sets of packages (depending on each other) locally in a way that for example `mock` (where you can use the `--chain` option for that). Is it possible to build set of packages locally without sending the information to build.opensuse.org?
It depends a bit what "sending the information" actually means... You can use "osc build ..." to perform a local build of a package. If you have a set of packages, you have to manually "derive" the build order for the set of packages.
Let's assume you have the packags A, B, C, D, E. A depends on packages from openSUSE Tumbleweed B depends on A + packages from openSUSE Tumbleweed E depends on D + packages from openSUSE Tumbleweed D depends on A, C + packages from openSUSE Tumbleweed C depends on packages from openSUSE Tumbleweed
In this case, a potential build order would be A, B, C, D, E (or C, A, D, E, B) etc.
Once, you have the build order, you can use osc to build the packages locally:
$> cd package $> osc build --alternative-project openSUSE:Factory snapshot x86_64 \ -k /dir/where/to/store/built/packages \ -p /dir/where/to/store/built/packages
Note that this will send some "information", like the spec file (or any other build description) + the dependency information retrieved from the packages stored in /dir/where/to/store/built/packages, to the OBS.
It will not be stored though. But Marcus is right, this information will go over wire and root user admins of OBS may be able to read it for a very short amount of time. -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi! Marcus wrote:
If you have a set of packages, you have to manually "derive" the build order for the set of packages.
Thank you for that insight! So I guess, there is a little bit that might be done to improve the tool :) I don't personally like the `mock` approach myself (they randomly try to build packages in different order, which usually works fine for small sets of packages) because I think there is enough information in source RPM to work out the topological ordering for the dependencies. Marcus wrote:
Note that this will send some "information", like the spec file (or any other build description) + the dependency information retrieved from the packages stored in /dir/where/to/store/built/packages, to the OBS.
Adrian wrote:
It will not be stored though.
But Marcus is right, this information will go over wire and root user admins of OBS may be able to read it for a very short amount of time.
Thank you for the explanation - Marcus, Adrian. I am not worried about the spec file or build metadata that much. I was more concerned with the source code right now, as it might not be released just yet :) (And it's not up to me to decide when). I understand that personal instance of OBS might be the best way to go now, but I am still learning the way of just working with OBS. As I have said in different thread - so far it is like a breath of refreshing air. Especially the automated QA during the build of RPM. Adam wrote:
There is the
--prefer-pkgs=DIR [...] --keep-pkgs=DIR
Marcus wrote:
Once, you have the build order, you can use osc to build the packages locally:
$> cd package $> osc build --alternative-project openSUSE:Factory snapshot x86_64 \ -k /dir/where/to/store/built/packages \ -p /dir/where/to/store/built/packages
Thank you both - Adam, Marcus! I'll be on my way trying to work with this new knowledge now. Cheers, Jakub -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Adam Majer
-
Adrian Schröter
-
Jakub Olczyk
-
Marcus Hüwe