On Monday, 25 January 2016 at 23:46:09 UTC, Paul O'Neil wrote:
On 01/25/2016 12:08 PM, ikod wrote:
Hello
I'd like to hear any opinions and best practices on
coexistence of dub and debian .deb packaging and deployment.
Here is my problem: I wrote some small library that use Pegged
to parse and process user requests. This library can be used
in shebang-scripts on servers or can be statically linked to
applications. The first case require library code and
dependencies (Pegged in this case) be deployed on servers to
some well-known system-wide place like /usr/include/d/ so that
any developer can simply use line like '#!/usr/bin/rdmd
--shebang -I/usr/include/d` in his script.
And here is a problem: we (like many other) distribute our
software over our debian-based machines using standard debian
packaging system. There is no problem for me to wrap my
library into .deb. The question about Pegged or any other
dub-based D library - how do you think, what is better way to
tie together dub and deb-packaged software?
Should I use some postinstall scripts to fetch-build-deploy
Pegged to /usr/include/d/ using dub, or should I wrap Pegged
in separate .deb and include it dependencies in my library or
any other package relying on Pegged? For me the latter way is
better/ but what is your opinion?
I think there's a longer discussion one one of the dub issues
that explains why this doesn't exist yet. The blocker is that
the D ABI is not compatible across compilers (dmd vs. ldc vs.
gdc) or compiler versions (2.068 vs. 2.069). Until there's a
reasonable resolution to that problem, I don't think there will
be OS packages of libraries.
Note that the OP is essentially talking about source distribution
for use in rdmd scripts. So ABI is not an issue. This source
could be installed as a Debian package, but since dub exists, the
question is whether to use dub or not. If not, there'll be two
parallel ways to install source. In any case, files should be
written to system directories and it should be possible to
uninstall.
The question originates from here:
https://github.com/PhilippeSigaud/Pegged/issues/171