On 18.02.23 17:00, Mihai Moldovan wrote:
* 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.
1.) the %disturl is not new. I don't have sufficiently old systems at hand to look at but it's certainly in SLES12 from the beginning and I'm pretty sure also in SLES11. 2) you did misinterpret what I wanted to say: 15.4 is getting rpm from sles15-sp3-update channel (as is sles15-sp4). I'm pretty happy (being a huge SLES customer) to have as much identical packages / package versions across all SLES15 variants still in use (hint: all variants...) that I have to take care of. Quite some packages are actually getting their updates from the SLES15-GA update repo. I like that. On my 15.4 server machine at home, it's 244 packages right now: server:~ # rpm -qa | grep -c -- -150000 244
My use case is to build software for a lot of different operating systems, including OpenSUSE and SLE versions.
I have the same use case.
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
For rpm based distributions, I just put them into our obs instance and be done with that. Builds automatically without any magic.
My goal is to just avoid having to pass "--dist ..." directly, since obs-build
This is certainly a worthy goal, but as you need to know your dist parameter anyway for the "--repo" argument, I'm not that sure how much this saves.
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.
Just use the content of the package of whatever provides /etc/os-release for your magic distro detection? Just put that into obs-build and issue a pull request, I'm pretty sure that there might be a good chance to get this accepted as it is no worse a hack than parsing rpm's rpm tags :-)
[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).
There are SUSE people working on reproducible builds for openSUSE. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman