Bug#958243: Use system libinih-dev

Luca Boccassi bluca at debian.org
Sat Jan 23 13:33:44 GMT 2021


Control: tags -1 -moreinfo

On Sun, 26 Apr 2020 10:54:35 +0200 Andreas Metzler <ametzler at bebt.de> wrote:
> Control: tags -1 moreinfo
> 
> On 2020-04-20 Yangfl <mmyangfl at gmail.com> wrote:
> > Source: gnutls28
> > Severity: wishlist
> 
> > Hi,
> 
> > As libinih-dev is now available, please consider linking against
> > system library instead of bundled ini.c.
> 
> 
> Hello,
> 
> Afaict libinih/upstream does not provide a shared library, the Debian
> package is patched to build one. However inih does not seem to be
> designed as a shared library. It is build-time configured by setting
> #defines. The inih Debian patch changes/extends this:
> 
> --- a/ini.h
> +++ b/ini.h
>  /* Maximum line length for any line in INI file (stack or heap). Note that
>     this must be 3 more than the longest line (due to '\r', '\n', and '\0'). */
>  #ifndef INI_MAX_LINE
>  #define INI_MAX_LINE 200
>  #endif
> +extern int ini_max_line;
> --- a/ini.c
> +++ b/ini.c
> +int ini_max_line = INI_MAX_LINE;
> [...]
> 
> Afaict when linking /statically/ the old '#define INI_MAX_LINE 666' in
> config.h would continue to work even with the patched version but would
> be ignored if linking dynamically. Gnutls would need to set the global
> variable 'ini_max_line = 666' instead. (Isn't this going to break when gnutls
> sets 'ini_max_line = 666' and another program using both gnutls and inih
> sets/wants 'ini_max_line = 50' instead?)
> 
> So linking gnutls against libinih-dev dynamically would require source
> changes which are not upstreamable because inih/shared is a Debian fork.
> 
> cu Andreas

Hi,

Just FYI, this is no longer the case and upstream now provides a shared
library natively. The max line length is also a build time option in
the upstream build system, defaulting to 200.

See:

https://github.com/benhoyt/inih/blob/master/meson_options.txt

-- 
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnutls-maint/attachments/20210123/f583d3a8/attachment.sig>


More information about the Pkg-gnutls-maint mailing list