DevHeads.net

Heads-up: rpm 4.15 alpha coming to rawhide

As per <a href="https://fedoraproject.org/wiki/Changes/RPM-4.15" title="https://fedoraproject.org/wiki/Changes/RPM-4.15">https://fedoraproject.org/wiki/Changes/RPM-4.15</a>, rpm 4.15-alpha
will be hitting rawhide soon. A soname bump is involved but Igor kindly
promised to handle rebuilding all dependent packages as part of the
change, so no further action required from others on that account.

There are some other things that will require actions from others however:

A pile of language-specific macros and scripts have been eliminated from
rpm upstream, notably %__python and %__perl and everything built around
them, such as %python_sitelib and %perl_sitelib and their relatives.
Python packages should be using the version specific macros already,
provided by respective pythonN-devel packages so this shouldn't be an
issue. On perl-side, those macros have been temporarily added to
redhat-rpm-config instead to avoid breaking things right now, later to
be moved to final destination in perl-macros or such.

Another major change is in Python bindings where Python 3 is now
properly supported. In all the previous versions where Python 3 bindings
were buildable and available, string data from header was returned as
bytes, but the rest of the API expects strings so nothing really works
(see <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1693751" title="https://bugzilla.redhat.com/show_bug.cgi?id=1693751">https://bugzilla.redhat.com/show_bug.cgi?id=1693751</a>). To make it
worse, it was incompatible with every single rpm-python script ever
written. Usually when something is unusably broken, silence means that
it's not being used, otherwise people do complain. Not so in this case,
the absurd API has been there for almost ten years and people have
adopted to it with zero complaints. In short, rpm-python users still
supporting both Python 2 and 3 are generally compatible with this
change, but Python 3-only projects have out of necessity adopted to the
broken API and will now need to change. The most critical distro
components have more or less already been adopted, but here's more work
to do on this front. This fixed interface will be made available to
4.14.x somehow too, but the details are yet unclear. Because of that,
we'd suggest only patching packages in rawhide to work with the change
right now, and deal with upstreams once dust settles a bit.

Other than that, a major new thing is introduction of some parallel
operations in rpmbuild itself. Testing hasn't shown anything odd but
with threads and all, you never know. Keep your eyes open.

More info and details available in the preliminary release notes at
<a href="https://rpm.org/wiki/Releases/4.15.0" title="https://rpm.org/wiki/Releases/4.15.0">https://rpm.org/wiki/Releases/4.15.0</a> and the change page linked at the
start of this message.

Comments

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By =?ISO-8859-2?Q?... at 06/12/2019 - 06:07

Dne 10. 06. 19 v 13:39 Panu Matilainen napsal(a):
Where can I read more about this:

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Panu Matilainen at 06/13/2019 - 07:19

On 6/12/19 1:07 PM, Miroslav Suchý wrote:
There's not a whole lot to write about, it just means that operations
which require chroot() now more or less work for regular users by the
way of user namespaces.

That more-or-less is part of the reason for the experimental status, as
due to the way the user namespace switch is hidden inside rpm's chroot()
helpers, it can't fork which would be required (AIUI) to properly set up
the uid/gid mappings inside the namespace. So while you can now install
into a chroot as a regular user, any files not owned by root (or
yourself) will fail, so its not as useful as it seems initially:

context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[pmatilai

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Petr Pisar at 06/11/2019 - 12:33

On 2019-06-10, Panu Matilainen < ... at redhat dot com> wrote:
-- Petr

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Jitka Plesnikova at 06/12/2019 - 05:12

On 6/11/19 6:33 PM, Petr Pisar wrote:
%requires_eq isn't perl macro and it stays in redhat-rpm-config. The macro
is used only in samba.spec.

Regards,
Jitka

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Panu Matilainen at 06/12/2019 - 05:40

On 6/12/19 12:12 PM, Jitka Plesnikova wrote:
Ok, sounds more or less the way I expected it to be.

%requires_eq was considered somehow perl-related in upstream (due to
whatever long forgotten history) but okay, even better if its not used
in perl either. That way we can bury it into samba.spec and remove
elsewhere, because it violates the "dont run rpm queries from spec"
principle and we dont want to encourage such use by providing example.

Thanks for the swift analysis.

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Adam Williamson at 06/12/2019 - 11:36

On Wed, 2019-06-12 at 12:40 +0300, Panu Matilainen wrote:
AIUI, it is/was commonly used by perl module packages to require the
same version of perl as the module package was built with, because this
is/was a thing in perl - when perl's version got bumped, all modules
needed rebuilding too. That's probably where the 'perl-related' thing
comes in - it's not that the actual thing %requires_eq does is in any
way perl-specific, but it's a thing that was introduced in response to
this particular property of perl and its modules, and IIRC not often or
ever used by anything else.

However in Fedora, we don't use %requires_eq for perl modules, at least
not any more (perhaps we did in the past, I don't know). Instead we
have the perl(:MODULE_COMPAT_[version]) dependency that is handled by
our own perl macros (provided by the interpreter package and
automatically required by module packages). I *have* run across the use
of %requires_eq in SUSE packages, though.

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Igor Gnatenko at 06/10/2019 - 13:10

So apparently new RPM segfaults on some architectures randomly, I'm
digging into it.

In worst case, I'll tag old version and try to debug it locally.

So far I can't reproduce it =(

On Mon, Jun 10, 2019 at 2:36 PM Panu Matilainen < ... at redhat dot com> wrote:

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Panu Matilainen at 06/10/2019 - 14:28

Too late for any real bughunting by now, just untag and I'll look at it first thing tomorrow.

My first guess would be the multithreading, and if that's the case then building with
RPM_BUILD_NCPUS=1 in the environment (or macro %_smp_ncpus_max defined to 1) should make it go away.

Thanks,

Heads-up: rpm 4.15 alpha coming to rawhide

By Panu Matilainen at 06/10/2019 - 07:53

As per <a href="https://fedoraproject.org/wiki/Changes/RPM-4.15" title="https://fedoraproject.org/wiki/Changes/RPM-4.15">https://fedoraproject.org/wiki/Changes/RPM-4.15</a>, rpm 4.15-alpha
will be hitting rawhide soon. A soname bump is involved but Igor kindly
promised to handle rebuilding all dependent packages as part of the
change, so no further action required from others on that account.

There are some other things that will require actions from others however:

A pile of language-specific macros and scripts have been eliminated from
rpm upstream, notably %__python and %__perl and everything built around
them, such as %python_sitelib and %perl_sitelib and their relatives.
Python packages should be using the version specific macros already,
provided by respective pythonN-devel packages so this shouldn't be an
issue. On perl-side, those macros have been temporarily added to
redhat-rpm-config instead to avoid breaking things right now, later to
be moved to final destination in perl-macros or such.

Another major change is in Python bindings where Python 3 is now
properly supported. In all the previous versions where Python 3 bindings
were buildable and available, string data from header was returned as
bytes, but the rest of the API expects strings so nothing really works
(see <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1693751" title="https://bugzilla.redhat.com/show_bug.cgi?id=1693751">https://bugzilla.redhat.com/show_bug.cgi?id=1693751</a>). To make it
worse, it was incompatible with every single rpm-python script ever
written. Usually when something is unusably broken, silence means that
it's not being used, otherwise people do complain. Not so in this case,
the absurd API has been there for almost ten years and people have
adopted to it with zero complaints. In short, rpm-python users still
supporting both Python 2 and 3 are generally compatible with this
change, but Python 3-only projects have out of necessity adopted to the
broken API and will now need to change. The most critical distro
components have more or less already been adopted, but here's more work
to do on this front. This fixed interface will be made available to
4.14.x somehow too, but the details are yet unclear. Because of that,
we'd suggest only patching packages in rawhide to work with the change
right now, and deal with upstreams once dust settles a bit.

Other than that, a major new thing is introduction of some parallel
operations in rpmbuild itself. Testing hasn't shown anything odd but
with threads and all, you never know. Keep your eyes open.

More info and details available in the preliminary release notes at
<a href="https://rpm.org/wiki/Releases/4.15.0" title="https://rpm.org/wiki/Releases/4.15.0">https://rpm.org/wiki/Releases/4.15.0</a> and the change page linked at the
start of this message.

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By King InuYasha at 06/10/2019 - 08:32

On Mon, Jun 10, 2019 at 8:28 AM Panu Matilainen < ... at redhat dot com> wrote:
Unversioned Python macros need to get added to python-rpm-macros, as
there are a number of packages that do rely on their existence (as a
means of supporting only a single version of Python depending on
distro releases or legacy reasons).

CC'd python-devel, Miro, and Igor about this.

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By =?UTF-8?B?TWlyb... at 06/10/2019 - 08:42

On 10. 06. 19 14:32, Neal Gompa wrote:
On it.

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By =?UTF-8?B?TWlyb... at 06/10/2019 - 08:55

On 10. 06. 19 14:42, Miro Hrončok wrote:
<a href="https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22" title="https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22">https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22</a>

Re: Heads-up: rpm 4.15 alpha coming to rawhide

By Panu Matilainen at 06/10/2019 - 08:50

On 6/10/19 3:42 PM, Miro Hrončok wrote:
Hmm, I somehow managed to convince myself (by looking at rawhide specs)
that these would not be needed, but looking again now, clearly there are
quite a few using those still. Sorry about that.

I could add them to redhat-rpm-config easily, but even better if we can
get them directly to python-rpm-macros instead.