Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle libcurl with the snap package #15

Merged
merged 1 commit into from Feb 14, 2019

Conversation

WebDrake
Copy link
Contributor

DUB uses std.net.curl to download package data, which in turn relies on being able to dynamically load libcurl at runtime via dlopen. If libcurl is not available in the snap, but only on the host system, then DUB may not be able to locate it: this happens e.g. on Ubuntu 18.04 and quite possibly on other distros too.

This patch adds a separate curl part that includes libcurl3-gnutls via stage-packages. This is simpler than adding it to the dub part as the dump plugin will not automatically stage packages specified in this way.

Besides the libraries themselves, we need to add extra LD_LIBRARY_PATH settings to the app environment to enable dub to find them.

Adapted from an earlier PR by @philburr: #13

@WebDrake WebDrake added the bug label Feb 13, 2019
DUB uses `std.net.curl` to download package data, which in turn relies
on being able to dynamically load libcurl at runtime via `dlopen`.  If
libcurl is not available in the snap, but only on the host system, then
DUB may not be able to locate it: this happens e.g. on Ubuntu 18.04 and
quite possibly on other distros too.

This patch adds a separate `curl` part that includes `libcurl3-gnutls`
via `stage-packages`.  This is simpler than adding it to the `dub` part
as the `dump` plugin will not automatically stage packages specified in
this way.

Besides the libraries themselves, we need to add extra `LD_LIBRARY_PATH`
settings to the app environment to enable dub to find them.

The `license.txt` file has been updated to note the inclusion of these
libraries and point the reader to copyright and licensing information.

Adapted from an earlier PR by @philburr:
dlang-snaps#13
@WebDrake
Copy link
Contributor Author

Updated with a tweak to license.txt to note the new additions and point the reader to their copyright and licensing info:

diff --git a/snap/license.txt b/snap/license.txt
index 626cd26..c0782b7 100644
--- a/snap/license.txt
+++ b/snap/license.txt
@@ -5,6 +5,10 @@ DUB is released under the MIT License.  It statically links in druntime
 and phobos (the D standard library), which are both released under the
 Boost Software License (Version 1.0).
 
+This package also bundles `libcurl3-gnutls` and its dependencies.  Copyright
+and licensing information for these libraries can be found in the `copyright`
+files in the `usr/share/doc/*` directories inside the package.
+
 
 Full license texts
 ==================

@WebDrake
Copy link
Contributor Author

Confirmed that this works on 18.04 earlier today. I think we can take this in.

@WebDrake WebDrake merged commit 40edef5 into dlang-snaps:master Feb 14, 2019
@WebDrake WebDrake deleted the libcurl branch February 14, 2019 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant