Quoting Jan Wielemaker (2020-04-28 16:56:30)
> On 4/28/20 4:42 PM, Jonas Smedegaard wrote:
> > The problem - which I consider a minor one - is to know for certain 
> > when it is needed to regenerate an image.
> > 
> > I prefer that the binary package for eye contains only the generated 
> > image (i.e. the eye source to generate that image is part of the 
> > Debian _source_ package but not included in the _binary_ *.deb). 
> > What I would then see as ideal would be if the binary package could 
> > know which exact ABI of SWI Prolog it was tied to, so that it was 
> > known when it was needed to regenerate the package.
> > 
> > You mentioned in a precviously quoted email that the ABI consist of 
> > two parts, one of them being a hash of a VM and the other being a 
> > set of variables.  I would gues that an ABI could then be some chars 
> > of the VM hash + some chars of a hash of those variables.
> > 
> > Debian packaging of Asterisk and uWSGI uses such ABI hash towards 
> > third party plugins, to alow them to be rebuilt as infrequently as 
> > possible. See e.g. 
> > https://packages.debian.org/buster/uwsgi-plugin-php and 
> > https://packages.debian.org/buster/asterisk-espeak (notice they 
> > depend only indirectly on uwsgi/asterisk through a virtual ABI 
> > package name).
> 
> That is worth a try.  I guess that implies that generating SWI-Prolog 
> (as package) also generates this hash.  What kind of support would be 
> needed from SWI-Prolog to make this work?  Some script/command to 
> create this hash for a particular system?

Thanks for your interest in this challenge :-)

Yes, if ABI is computed during build then what would be helpful is to 
extend that to expose the computed ABI as a single string.  Maybe add it 
as an additional note in output of "swipl --version"?

Or if possible to (re)compute at runtime then just document that, for us 
distribution maintainers to integrate into our packaging routines.


> It would make sense if we could establish a working series of patches 
> on a stable release that is guaranteed not to break the ABI.

If we have a way to track ABI as a string, it is relatively easy to have 
a distribution package fail if deviating from an expected string - and 
then manually bump to the new string each time a new upstream is 
packaged (or e.g. when cherry-picking a security patch for oldstable 
_known_ to break the ABI).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to