www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Improved snap package for LDC

reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
Hello folks,

As you may recall, last year I did some work towards a snap 
package for LDC:
https://forum.dlang.org/thread/ffmpwmhjefzzogcljmyf forum.dlang.org

At the time there were two key points of concern: first, the need 
to bundle gcc, libc etc. into the package along with LDC, and 
second, the fact that snap confinement prevented LDC from 
accessing libraries installed elsewhere on the host system 
(meaning it could only compile programs that did not link against 
any external libraries).

Recently, however, the snappy developers introduced a new 
'classic' confinement option, which is explicitly designed to 
allow the packaged program to access resources of the host Linux 
system on which it is installed.  With this available it has been 
possible to rework the LDC snap package to something much 
simpler, which AFAICT works just like a 'normal' LDC install 
(i.e. it can compile and link anything, and uses the host 
system's gcc etc. for linking).

The updated package definition is available here:
https://github.com/WebDrake/ldc2.snap/pull/2

... so I'd like to invite people to give it some level of review 
(particularly the license and the package description) and, if 
you like, to try out building and installing it.

Building it should be easy for anyone using Ubuntu 16.04 or 
later: just check out the `classic-snap` git branch from the 
repo, `sudo apt install snapcraft`, and then just type 
`snapcraft` at the command prompt.  It will check out the LDC 
source from github, install necessary build dependencies, and 
should deliver a snap package which you can install with the 
command:

     snap install --classic --dangerous ldc2_1.1.0-beta6_amd64.snap

where --classic is to give permission for classic confinement, 
and --dangerous is in order to give permission to install a 
self-built package ('dangerous' in the sense that it comes with 
no digital signature to verify its origin).

(Note, the package name might be different if you're building on 
a 32-bit system.  Let me know what happens if you try!)

Assuming nobody finds any showstoppers, I'd like to proceed to 
submit this to the official Ubuntu snap store.  On this note, I 
have a question: would there be any interest in doing this 
officially as part of the LDC project?  Any initial distribution 
would be in the 'edge' or 'devel' distribution channels, which 
are designed for early testing.

Anyway, let me know what you think!

Thanks & best wishes,

     -- Joe
Jan 20 2017
next sibling parent reply Johan Engelen <j j.nl> writes:
I don't know anything about "snap" so won't be of much help here.

Our bandwidth is very constrained at the moment, so please be 
patient or better: take lots of initiative yourself!  :)

cheers,
   Johan
Jan 20 2017
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Friday, 20 January 2017 at 22:12:32 UTC, Johan Engelen wrote:
 I don't know anything about "snap" so won't be of much help 
 here.

 Our bandwidth is very constrained at the moment, so please be 
 patient or better: take lots of initiative yourself!  :)
Thanks for the feedback on the PR :-) Just to be clear: when I asked
 would there be any interest in doing this officially as part of 
 the LDC project?
... I'm offering to do the legwork involved. I'm just asking if you are happy for me to do it officially in the name of LDC (i.e. creating a developer account for LDC to publish packages to the Ubuntu store). As a first stage I'm happy to do it under my own name and switch over ownership/responsibility if things take off. A secondary concern might be whether the `ldc2.snap` repo should live in LDC's GitHub; again I'd be happy to maintain it there, but again, happy to keep things in my repo for now if that seems better to you.
Jan 20 2017
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
Hi Joseph,

On 20 Jan 2017, at 23:48, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
 ... I'm offering to do the legwork involved.  I'm just asking if you 
 are happy for me to do it officially in the name of LDC (i.e. creating 
 a developer account for LDC to publish packages to the Ubuntu store).  
 As a first stage I'm happy to do it under my own name and switch over 
 ownership/responsibility if things take off.

 A secondary concern might be whether the `ldc2.snap` repo should live 
 in LDC's GitHub; again I'd be happy to maintain it there, but again, 
 happy to keep things in my repo for now if that seems better to you.
Ah, yes, this sounds good as per my other response. Moving the repo to ldc-developers (dlang-ldc?) is definitely an option. — David
Jan 20 2017
parent reply Johan Engelen <j j.nl> writes:
On Saturday, 21 January 2017 at 01:18:14 UTC, David Nadlinger 
wrote:
 Hi Joseph,

 On 20 Jan 2017, at 23:48, Joseph Rushton Wakeling via 
 digitalmars-d-ldc wrote:
 ... I'm offering to do the legwork involved.  I'm just asking 
 if you are happy for me to do it officially in the name of LDC 
 (i.e. creating a developer account for LDC to publish packages 
 to the Ubuntu store).  As a first stage I'm happy to do it 
 under my own name and switch over ownership/responsibility if 
 things take off.

 A secondary concern might be whether the `ldc2.snap` repo 
 should live in LDC's GitHub; again I'd be happy to maintain it 
 there, but again, happy to keep things in my repo for now if 
 that seems better to you.
Ah, yes, this sounds good as per my other response. Moving the repo to ldc-developers (dlang-ldc?) is definitely an option.
I'm in favor of publishing the package in the name of LDC (good to send password(s) to Kai and David, I think). I'm also in favor of adding the ldc.snap package to LDC's github, so that it is easier for people to contribute. (contributing through PRs means making your own fork, and then we end up with a bunch of forks and no clear "main" trunk) -Johan
Jan 21 2017
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Saturday, 21 January 2017 at 10:08:27 UTC, Johan Engelen wrote:
 I'm in favor of publishing the package in the name of LDC (good 
 to send password(s) to Kai and David, I think).
This touches on an issue I wanted to raise. Does the LDC project offer email addresses to its contributors? If so, would it be possible for the LDC project to create an email address for me to use with the Ubuntu Developer login? One that I'd have access to but which would be under the project's control? I ask because while I can obviously create an account using an arbitrary email address and just share the developer account password, I'd feel more comfortable if there was an easy path for other LDC project members to take control of things if I slip on Berlin's icy streets and wind up underneath a car ;-)
 I'm also in favor of adding the ldc.snap package to LDC's 
 github, so that it is easier for people to contribute. 
 (contributing through PRs means making your own fork, and then 
 we end up with a bunch of forks and no clear "main" trunk)
Sounds good. If someone wants to set up an `ldc2.snap` repo there and give me push rights, I'll push a minimal collection of commits with the basic package definition.
Jan 24 2017
next sibling parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 24 Jan 2017, at 21:17, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
 I ask because while I can obviously create an account using an 
 arbitrary email address and just share the developer account password, 
 I'd feel more comfortable if there was an easy path for other LDC 
 project members to take control of things if I slip on Berlin's icy 
 streets and wind up underneath a car ;-)
Unfortunately, we don't have a great solution to this yet. Back when it was mostly me "keeping LDC on life support", I tried to avoid making any permanent commitments (however small monetarily), as I didn't want to burden myself down with the project future uncertain. Even though this obviously hasn't applied in a long while, we are still without our own self-hosted website or email facilities.
 Sounds good.  If someone wants to set up an `ldc2.snap` repo there and 
 give me push rights, I'll push a minimal collection of commits with 
 the basic package definition.
Done. Cheers, David
Jan 24 2017
next sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Wednesday, 25 January 2017 at 00:54:18 UTC, David Nadlinger 
wrote:
 Unfortunately, we don't have a great solution to this yet. Back 
 when it was mostly me "keeping LDC on life support", I tried to 
 avoid making any permanent commitments (however small 
 monetarily), as I didn't want to burden myself down with the 
 project future uncertain. Even though this obviously hasn't 
 applied in a long while, we are still without our own 
 self-hosted website or email facilities.
OK. In the short term I'll create an email forward (to which I can add both my regular development email address and those of other LDC folks). In the long run we can no doubt work something out. BTW, while I guess this wouldn't really count as "self-hosted" it seems reasonable to me that the D Foundation might take care of the logistics of an LDC domain name, website and email addresses.
 Sounds good.  If someone wants to set up an `ldc2.snap` repo 
 there and give me push rights, I'll push a minimal collection 
 of commits with the basic package definition.
Done.
Great, thanks! I'll push things there this evening and follow up from there.
Jan 25 2017
prev sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Wednesday, 25 January 2017 at 00:54:18 UTC, David Nadlinger 
wrote:
 Sounds good.  If someone wants to set up an `ldc2.snap` repo 
 there and give me push rights, I'll push a minimal collection 
 of commits with the basic package definition.
Done.
Package definition is now pushed there: https://github.com/ldc-developers/ldc2.snap I'll follow up as I have news regarding actual publication of a snap package.
Jan 26 2017
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 26 Jan 2017, at 22:12, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
 Package definition is now pushed there:
 https://github.com/ldc-developers/ldc2.snap

 I'll follow up as I have news regarding actual publication of a snap 
 package.
Thanks for doing this – the README is nicely informative! — David
Jan 26 2017
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Thursday, 26 January 2017 at 21:17:04 UTC, David Nadlinger 
wrote:
 On 26 Jan 2017, at 22:12, Joseph Rushton Wakeling via 
 digitalmars-d-ldc wrote:
 Package definition is now pushed there:
 https://github.com/ldc-developers/ldc2.snap

 I'll follow up as I have news regarding actual publication of 
 a snap package.
Thanks for doing this – the README is nicely informative!
I've uploaded the first version of the package to the snap store. It's currently waiting for manual review (understandably given that its confinement option is quite permissive). I'll let you know as soon as it's published. David I'll follow up privately with some info on the associated developer account.
Jan 26 2017
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Thursday, 26 January 2017 at 22:44:22 UTC, Joseph Rushton 
Wakeling wrote:
 I've uploaded the first version of the package to the snap 
 store.
 It's currently waiting for manual review (understandably given 
 that its confinement option is quite permissive).  I'll let you 
 know as soon as it's published.
The package passed review and is now published to the 'edge' channel of the snap store ('edge' as in 'bleeding edge'). Anyone on Ubuntu 16.04 or later should be able to try installing it with: sudo snap install --edge --classic ldc2 (you may need to install snappy first: `sudo apt install snapd`) Instructions for installing snapd on other distros are available here: http://snapcraft.io/docs/core/install If people could give it a spin and confirm that it works for them I'd be really grateful (I'll be trying it out in a few virtual machines on different distros later this week). How official is the v1.1.0 release I see tagged on https://github.com/ldc-developers/ldc/releases ... ? If this is definitely it, I can update the snap package fairly quickly.
Jan 30 2017
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 31 Jan 2017, at 0:54, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
 How official is the v1.1.0 release I see tagged on 
 https://github.com/ldc-developers/ldc/releases ... ?  If this is 
 definitely it, I can update the snap package fairly quickly.
Typing up the announcement right now. ;) — David
Jan 30 2017
parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Monday, 30 January 2017 at 23:57:09 UTC, David Nadlinger wrote:
 Typing up the announcement right now. ;)
Congratulations! :-)
Jan 30 2017
prev sibling next sibling parent Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On Wed, 2017-01-25 at 01:54 +0100, David Nadlinger via digitalmars-d-
ldc wrote:
 [=E2=80=A6]
=20
 Unfortunately, we don't have a great solution to this yet. Back when
 it=C2=A0
 was mostly me "keeping LDC on life support", I tried to avoid making
 any=C2=A0
 permanent commitments (however small monetarily), as I didn't want
 to=C2=A0
 burden myself down with the project future uncertain. Even though
 this=C2=A0
 obviously hasn't applied in a long while, we are still without our
 own=C2=A0
 self-hosted website or email facilities.
[=E2=80=A6] Use GitHub Pages for a website and GoogleGroups for mailing list? --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jan 25 2017
prev sibling next sibling parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 25 Jan 2017, at 12:07, Russel Winder via digitalmars-d-ldc wrote:
 Use GitHub Pages for a website and GoogleGroups for mailing list?
We did both in the past before moving to dlang.org equivalents. Not sure how that is relevant. — David
Jan 25 2017
prev sibling next sibling parent Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On Wed, 2017-01-25 at 17:27 +0100, David Nadlinger via digitalmars-d-
ldc wrote:
 On 25 Jan 2017, at 12:07, Russel Winder via digitalmars-d-ldc wrote:
 Use GitHub Pages for a website and GoogleGroups for mailing list?
=20 We did both in the past before moving to dlang.org equivalents. Not sure=C2=A0 how that is relevant.
It sounds like it was irrelevant, that I just misunderstood the thread. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jan 27 2017
prev sibling parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 27 Jan 2017, at 12:39, Russel Winder via digitalmars-d-ldc wrote:
 On Wed, 2017-01-25 at 17:27 +0100, David Nadlinger via digitalmars-d-
 ldc wrote:
 We did both in the past before moving to dlang.org equivalents. Not
 sure 
 how that is relevant.
It sounds like it was irrelevant, that I just misunderstood the thread.
No worries – I'm always interested in tech suggestions. In this case, the question was just about our own domain as a point of contact. — David
Jan 27 2017
prev sibling parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
Hi Joseph,

On 20 Jan 2017, at 22:51, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
 Assuming nobody finds any showstoppers, I'd like to proceed to submit 
 this to the official Ubuntu snap store.  On this note, I have a 
 question: would there be any interest in doing this officially as part 
 of the LDC project?  Any initial distribution would be in the 'edge' 
 or 'devel' distribution channels, which are designed for early 
 testing.
We would certainly be interested in any improvements to our packaging and distribution story, and the new snap mode definitely seems like a much better match for LDC. Sadly, I don't think any of the currently active contributors has the bandwidth to take on package maintainership. If you can commit to maintaining it for some time going forward yourself, though, we can certainly trial it as an "official" distribution channel. Cheers, David
Jan 20 2017