[Rpm-maint] PATCH 4/2013 Reimplement setprogname() and getprogname() to be generic and portable
Kamil Rytarowski
n54 at gmx.com
Fri Feb 12 23:42:58 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 11.02.2016 14:51, Florian Festi wrote:
> Looks like this fell through the cracks back then. I can only guess
> why. May be everyone was on vacation...
>
> Anyway this topic came up recently and this looks like the proper
> solution. Pushed upstream as
> 61109446ac67ca8f3d96a5592814561db908d83c with only very minor
> corrections as followup patches.
>
> Thanks for the patch!
>
> Florian
>
> On 08/17/2013 09:36 PM, Kamil Rytarowski wrote:
>> Hello,
>>
>> I'm attaching a big patch refactoring deeply the current
>> setprogname() and getprogname() feature.
>>
>> Change-log explains everything: The RPM code contains
>> setprogname()/getprogname() support implemented through
>> compatiblity layer with very old GLIBC (internals supported back
>> to '95 and earlier), before stabilization of the GNU C library.
>> This compatiblity layer (__progname, __assert_progname,
>> setprogname()) is supposed to support well archaic GLIBC, but on
>> the other hand it pollutes the library namespace and introduces
>> unpredicable compillation errors on BSD systems.
>>
>> The functions setprogname() and getprogname() are natively
>> supported in NetBSD and work the same way as __progname from the
>> GNU C library (they are even implemented in the same way - but
>> with a slightly changed logic). The support for very old (20
>> years and older) GNU C Library is obfuscating the code, because
>> it uses defines over defines without a word of explaination why
>> to do so.
>>
>> It's important to note that the setprogname()/getprogname() was
>> inconstiently implemented in the codebase, duplicating the code
>> and/or functionality.
>>
>> Add new generic functions getprogname() and setprogname() and
>> bind it to: - the current and for two decades stable GNU LIB C
>> implementation, - the current NetBSD implementation (introduces
>> to NetBSD in 2002), - fallback reimplementation functions of the
>> setprogname() and getprogname() functionality for other systems.
>>
>> Don't support anymore old GNU Lib C internals and don't support
>> older NetBSD systems, as they aren't supported for many years.
>>
>> Add to the codebase comments explaining the relevant codeparts.
>>
>>
>>
>>
>> PLEASE DOUBLE CHECK the patch and changes.
>>
>> The patch was originally prepard against RPM 4.11.0.1 (as is my
>> working version) and was just matched against the current git
>> repository revision. I want to upstream these changes as soon as
>> possible -- as it will allow me to work with the vanilla source
>> sooner -- for an upstream developer this is very important to
>> work without layer of dozen compatiblity patches around the whole
>> code-base.
>>
>> As, I'm now away from my working machine, now and I will be away
>> for some time -- I can't currently develop it farther
>> (introducing support of other Unices, it was really tested and
>> made run on NetBSD-6.1).
>>
>> If you agree with the changes, please commit it as it is. If
>> there are any bugs introduced (like compilation errors) -- please
>> commit it as it is and fix them with a new patch.
>>
>> Thank you and regards!
>>
>>
>> _______________________________________________ Rpm-maint mailing
>> list Rpm-maint at lists.rpm.org
>> http://lists.rpm.org/mailman/listinfo/rpm-maint
>>
>
>
Thanks!
I somehow lost interest since --chroot cannot be implemented with
rpm(1) on NetBSD with chroot(2). There is not known a breakage from
NetBSD chroot.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWvm4BAAoJEEuzCOmwLnZsqEkP+gKksN/IerwBWo64ORavXIMm
xTTZuw6i+ihHYI3g/m2tgmoPWjiCayHK4yku+15uKlinHHCrmAlCeOY8injRkDF8
ycAClVVP2U+GiUXWlAC5uWh84Y/EN467fbBALgx7atu4dILX31Y1/fzWyWNdYtdf
+0YNz8tLfQZ/pSuHJSlyulp7ZfSIa7jYbg1NLV/P7eBfVaGhggdSb+nTwIImlhEU
RAxTPOtGTJhY2Kpo4sAhBmijYq+1ZRp062W6OWVtco33EHB3S8AW/MCqFSD5HGa0
SG3q2e1gRqxvazg3GC+orVfccTPg4N9JAiKntRdZnfaaxKmDAVf/N3eGT+9CCjKa
16RVe8y8kVio4xPOiAziifApt1YE4xeVWd5t2xFmehhdfuL+6qMlGCEtEfJOny+N
kV87h/7sod+If4XBn+dXrVwDgD/Exj80k0cFx2arzLNiBhgEwr1a4UQKRWyRNa7u
iq5C+FQ+GrV2E3RdRNEwAzZG5u+hRKQC0rzWbzH1Q3Hs9yUCuven6gU9jwj/abPC
3PJ4iUadQJ9H3y+WC21iGY9wIVxV6SymsD9qROklrwTtt0QhnlF8U3HZ3jcvFoln
M4xc8UKq3ZF3dchzhPN0Y/E7CvOtZfGKDB7ADQ4/VSSaWnW2aQuhSyEHmuqQXUrv
1I4EhjdyzrwMVw/yavvj
=C9DL
-----END PGP SIGNATURE-----
More information about the Rpm-maint
mailing list