* On 2/18/23 14:24, Stefan Seyfried wrote:
On 18.02.23 13:28, Mihai Moldovan wrote:
The other issue is that, if rpm was really copied from SLE 15 SP2 verbatim[4], the distribution RPM tag used in SLE is omitting any service pack information, so it's impossible to determine the actual operating system version based on that.
Well, for 15.4 and SLES15-SP4, it is actually the case:
server:~ # rpm -q rpm rpm-4.14.3-150300.52.1.x86_64 server:~ # rpm -q --queryformat %{disturl}\\n rpm obs://build.suse.de/SUSE:Maintenance:26687/SUSE_SLE-15-SP3_Update/f0914b2c279f3c55f9d8c41439b2e804-rpm.SUSE_SLE-15-SP3_Update
True, but the disturl tag is rather new and... I'm assuming that this is really SLE or Leap 15.3? If it were 15.4, it would mean that the package was copied from SUSE:SLE-15-SP3:Update, which again would make it impossible to differentiate between sle15sp3 and sle15sp4. Parsing the disturl tag also looks like a nightmare.
This would bring no benefit, except for your fringe usecase [...]
Copying binary packages from SLE instead of rebuilding them from source brings no benefit, except to lower stress on the build infrastructure. Throwing around straw man arguments is not helpful. Avoiding rebuilds wherever possible is really useful[0] and I welcome the "Closing the Leap Gap" approach. This said, making an exception for one package only would fix a currently broken feature within obs-build at a negligible cost. I've already admitted straight up that this feature is a real niche, since obs-server will probably always spawn obs-build with a --dist argument (although this is difficult to know for sure, since the obs-build invocation does not usually show up in OBS build logs).
and I'm still feeling like "you're doing it wrong"...
If I wanted to do what I'm thinking you are wanting to do, I'd probably implement somehthing like [...]
I'm really not just "holding it wrong" or doing anything too crazy. My use case is to build software for a lot of different operating systems, including OpenSUSE and SLE versions. For SUSE-based systems, I'm first spawning builds to create a source package using something like that: obs-build --nosignature --repo https://download.opensuse.org/distribution/leap/x.y/repo/oss// --repo https://download.opensuse.org/update/leap/x.y/oss/ [--repo other repositories managed by me] --root /var/cache/obs-build/opensuse/x.y/x86_64/ --clean --stage=-bs --define '%vendor ...' /path/to/file.spec and afterwards build binary packages using pretty much the same approach: obs-build --nosignature --repo https://download.opensuse.org/distribution/leap/x.y/repo/oss// --repo https://download.opensuse.org/update/leap/x.y/oss/ [--repo other repositories managed by me] --root /var/cache/obs-build/opensuse/x.y/x86_64/ --arch [actual arch] --clean --stage=-bb --debug --define '%vendor ...' /path/to/file.spec My goal is to just avoid having to pass "--dist ..." directly, since obs-build can usually figure out the distribution by itself, if the RPM tags of the rpm's package, coming directly from either the official main or update repositories, RPM tags allow that. Mihai [0] Although it can make Reproducible Builds a lot more difficult, since the binaries are coming from a non-public build system and a lot of metadata about the builds is hence unavailable. I don't know how critical or interesting RB is for OpenSUSE (or SUSE in general).