OBS can't seem to handle SRPM? Not talking about osc

I want to realize the following operation on OBS:

  1. Get the upstream srpm from a Linux distribution (in this case fedora)
  2. Unpack srpm to get the spec file and the source tarball
  3. Do a patch operation on the spec file
  4. Compile and package them as a rpm

This way I only need to maintain the patch for the spec file locally and nothing else.

But it seems OBS can’t get this done?

If the Fedora package is available at OBS as Build, you could branch it to your OBS Account, patch it and install it.

But the packaging logic in the spec files of packages that already exist on OBS is very different from fedora.
I would like to make changes to the spec files that come directly from fedora instead of the versions on OBS that are primarily for openSUSE.

I have no idea what you are talking about. OBS has no problems building Fedora RPMs.

For example, which files belong to the main package and which files belong to the sub package. There are also build parameters, dependencies, source patches from fedora, and other things that are different.

In other words I need all the content from fedora, not the content that already exists on OBS mainly for openSUSE.

Once more - OBS has no problems building Fedora RPMs. OBS can even build - gasp - Debian or Ubuntu DPKGs. Which most certainly have “build parameters, dependencies, source patches from [Debian/Ubunut], and other things that are different”.

Have you even tried to look what actually exists?

I think I made it pretty clear at the beginning of my post. I just need the functionality to operate exactly as I described. I don’t need any “workaround”.

BTW I do have no idea what you are talking about. I know OBS can build Fedora’s rpm, I never said it couldn’t. I just said I need to build from a source that comes from fedora, not something that already exists on OBS.

So build it on your Computer with rpmbuild…

Then I won’t be able to publish them or do automated builds.

Also I only want to maintain the patch of the spec file locally, I don’t want to maintain anything else.

The current design of OBS seems to only be suitable for creating a new package for fedora, rather than doing a rebuild from srpm.

I use osc on my Computer to do anything on the sources of a package and send it to my OBS Account
For example:

stephan@linux64:~/git/osc/home:Sauerland/rtl8821au> ls -al
insgesamt 3016
drwxr-xr-x   4 stephan users    4096  7. Mär 11:03 .
drwxr-xr-x 204 stephan users    4096 12. Mär 09:33 ..
-rw-r--r--   1 stephan users     518 11. Feb 10:01 kernel614.patch
-rw-r--r--   1 stephan users     824 12. Aug 2023  leap155.patch
-rw-r--r--   1 stephan users     340 20. Jan 2024  leap156.patch
-rw-r--r--   1 stephan users    1145 27. Okt 12:20 leap160.patch
drwxr-xr-x   3 stephan users    4096  7. Mär 11:03 .osc
-rw-r--r--   1 stephan users      40 12. Aug 2023  preamble
drwxr-xr-x   8 stephan users    4096  7. Mär 11:00 rtl8821au
-rw-r--r--   1 stephan users    1766  7. Mär 11:03 rtl8821au.changes
-rw-r--r--   1 stephan users    2652  7. Mär 11:00 rtl8821au.spec
-rw-r--r--   1 stephan users 3042715  7. Mär 11:00 rtl8821au.tar.gz
stephan@linux64:~/git/osc/home:Sauerland/rtl8821au> 

stephan@linux64:~/git/osc/home:Sauerland/rtl8821au> osc ci -n
nothing to do for package rtl8821au
stephan@linux64:~/git/osc/home:Sauerland/rtl8821au> 

Look here:

I don’t know if that’s the design philosophy of OBS, or if it’s just a lack of functionality.

It does not work as you want.

Do you know the answer?

@fxzxmic It seems to me a lack of understanding how the Build Service works? You upload the spec, sources, patches etc, set the product build target and let it build?

Just use the current spec file and adapt for openSUSE https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto

This would require me to do the patch operation locally, missing some automation.

The other thing I would ask is if this is a lack of functionality or intentional design. Not asking what ways there are to accomplish the tasks I described.

@fxzxmic Not sure why you don’t just submit your changes back to Fedora to be compatible with openSUSE? Sure it can be automated use a ci pipeline, script it.

It’s not possible to contribute back upstream because it’s some personalized customization and doesn’t fit upstream.

The patching is done in OBS. You only upload the patchfile to OBS and „reference“ the patchfile in the spec. The patching is done automatically as part of the build processs. Maybe you need to explain more in detail what more automation you want.

Nearly everything you described in the opening post can be done via OBS. As already described by Malcom, you upload the source, patch and spec to OBS and everytime you change anything at the patch or spec, the package gets automatically rebuild.

Shouldn‘t be that hard for you to get the source and the spec only once from your starting srpm. After that, nearly everything is automated when you change something.

Maybe start with branching of a simple package on OBS to play, learn and understand the functions of OBS.

You’re missing the point, my patch is for the spec file, not for the source.
Also now the problem is that OBS can’t download srpm directly and import it, you have to forward all the files contained in srpm locally to OBS.

If you see my title, you’ll see that I’m not discussing the functionality of osc, only for OBS itself.