openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 103 forks source link

tar_scm service marked as deprecated yet obscpio does not provide usable replacement #503

Closed hramrach closed 2 months ago

hramrach commented 2 months ago

Packages using obscpio source format are broken and cannot be built with rpmbuild.

The source specified in the rpm spec file does not exist.

adrianschroeter commented 2 months ago

yes, obscpio is just a transfer format it is not supposed to be used in spec files.

You should create either a compressed tar ball at build time (default when you call "osc add http://blahfasl.git") or your spec file should be able to deal with a directory. In the later case you should package the _service file as source. See for example "osc less science:unstable FreeCAD FreeCAD.spec"

hramrach commented 2 months ago

rpmbuild -bp --nodeps FreeCAD.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.OHaMvX

That does not work in the slightest.

hramrach commented 2 months ago

Also why can't obscpio be used in spec files?

If it were it would solve the problem completely.

Teach rpm-unpack to unpack obscpio and they can be used without problem.

adrianschroeter commented 2 months ago

That is not the intention for them, but you can of course add that. However, it would be distribution specific and therefore this repo is not the right place.

regarding the FreeCAD example, yes, you need to run additional tooling to create the directory (bascially cloning it).

all of the services in general are supposed to be executed before calling a build tool.

hramrach commented 2 months ago

So basically any package that uses source service other than manual tar_scm is not buildable.

That makes tar_scm superior to obs_scm for many use cases and that makes it not obsoleted by it.

adrianschroeter commented 2 months ago

you may build it with luck, but also other changes, eg. build requires replacements and flavor setup is also missing.

So in general, you never should run rpmbuild directly of any of our packages. Even not when there are no services used at all.

adrianschroeter commented 2 months ago

the real successor of this might be remoteassets or git submodule though.

hramrach commented 2 months ago

Yes, some packages will depend on macros defined in project configuration and not build without those macros.

However, such hacks should not be encouraged.