Patchwork: Official Snapscraft release

Created on 24 Jun 2019  路  33Comments  路  Source: ssbc/patchwork

Now that you are buildin snap packages in your Travis CI, can the developer team make an official Patchwork release in the Snap store to make it super easy to install and update on supporting distributions. The relevant docs are here https://docs.snapcraft.io/snapcraft-overview

linux builds enhancement

Most helpful comment

Sweet, it looks like I can publish, now I just need to set aside an hour and just do it. Thanks for your help @afterconnery.

All 33 comments

It looks like the snapcraft package is broken on Arch Linux right now, maybe someone running Ubuntu could help with this?

Seems like we'd be able to publish programmatically, so that's nice https://docs.snapcraft.io/releasing-your-app

I've been poking around with linux packaging recently. I'll try to take a look at this on my ubuntu machine later this week.

Things I've learned:

  1. If you just download the snap from the releases page (or build it yourself), you have to specify the --dangerous flag, because code signing didn't happen.
  2. The signing happens when you upload it to snapcraft.
  3. When we install the snap, it has it's own virtual filesystem. This means that you don't get your standard ssb identity b/c it's not reading from ~/.ssb
  4. You can apparently re-construct the path to $HOME via the command getent passwd $(id -u) | cut -d ':' -f 6 which gets around the fact that $HOME is overridden in a snap.
  5. You can use the personal-files interface (specified in snap config) to get access to home directory. You have to expliclty ask for files. Example here: https://snapcraft.io/docs/personal-files-interface

I'll see if I can't get the home directory mapped in, then will submit a CR with the relevant changes. I suspect whoever maintains the CI server will have to actually setup the snapcraft tooling.

Thanks for the time you've spent gathering this info!

I suspect whoever maintains the CI server will have to actually setup the snapcraft tooling.

I'd imagine it'd probably go here: https://github.com/ssbc/patchwork/blob/a7dd2056bf17f0986cf3f8e4445fac3e024fb4ef/.travis.yml#L28-L36

It would need to go after the package has been generated (some post-step). More importantly, someone needs to go setup the snapscraft repository, I believe. (Haven't looked much into it).

I'm not entirely sure how to get ssb and snaps to play nicely with one another here. The issue appears to be that the snap wants its own home directory, but patchwork is looking in $HOME/.ssb, which isn't actually our homedir, but a snap-specific subdir.

I mentioned this stuff to @popey at OggCamp and he mentioned he might be able to help a bit with this?

New info: the snap is definitely being generated and Travis is attempting to upload it, but since Travis isn't logged into Snapcraft it's failing so it had to be disabled. I think the next step for this is: how do we get our CI to be able to upload to Snapcraft?

Heya! here's the documentation to enable that. I'm keen to hear if it doesn't work!

Thanks! I think someone else added themselves as the maintainer so I can't push to ssb-patchwork. I've filed a name dispute, and once that goes through I think we'll be good to go.

(Workaround for broken snapcraft on Arch Linux: docker run -it ubuntu:latest bash :upside_down_face: )

Filed a naming dispute a few weeks ago. Today I received:

I suggest you contact the current maintainer of the snap (there's a Contact link here: https://snapcraft.io/ssb-patchwork) and discuss with him who should own the snap name. We can then proceed to a transfer if you both agree to it (best requested in https://forum.snapcraft.io instead of by filing a name dispute).

I've sent an email to the contact info available.

Just in case, CC: @afterconnery

Hey all! I was messing around with snaps a while ago and was adding some snaps to the store that already had snap files made. I didn't know you all were going forward with publishing to the snap store yourselves. I am more than willing to give up the name to you.

How do I go about doing this? Do I just delete the snap from my account so that the name can be yours to use?

@popey @christianbundy

Hi!

I've searched through the forums for the word transfer and a few threads came up. Maybe you have to do that? Sorry, wish I had more info.

I'll take a look at it this week and see what I can do.

@christianbundy if you do not have an account on snapcraft I would create one :)

https://forum.snapcraft.io/t/transfer-ssb-patchwork-to-christian-bundy/14713?u=seandreas

Sweet, it looks like I can publish, now I just need to set aside an hour and just do it. Thanks for your help @afterconnery.

@christianbundy I found this ticket again and it sounds like we're in a better place than when I left it. I'd be interested in pairing on this, if you're available sometime in the next month.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

Still relevant. Need to pair w/ Christian, I think, in order to do the snapcraft stuff since he has creds.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

Still not stale. Silly PR bot.

@justinabrahms it won't mark it as stale if it is assigned to someone.... :P

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] writes:

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This is still relevant. I just assigned it to Christian. We're waiting
on him to do the thing, given he has the credentials necessary.

cc: @Powersource @staltz

Removing myself from this issue because I don't think I have any more time/energy for Patchwork.

am burnt out

Got it. I'm not actively following patchwork development at the moment. The next steps, should someone want to accomplish this, is you need the credentials to the snapcraft package and hook it up into the CD process mentioned above. I'm turning off the notifications for this, so I suspect stalebot is going to delete it before long. So it goes, I suppose.

Oops, didn't mean to ping Powersource here. cc: @black-puppydog :facepalm:

Ah, in that case I'm happy to do this, but there's one step I definitely can't do and that's a transfer request.
@christianbundy you can copy/paste from here:

Transfer ssb-patchwork
[ssb-patchwork](https://snapcraft.io/ssb-patchwork) is currently under my name and I would like to have it transferred to Daan Wynen (@mmcm).

Thanks!

and then create the post in this category: https://forum.snapcraft.io/c/store-requests

done! my account is temporarily "on hold" while a moderator validates that I'm a human instead of a spam bot, but hopefully it'll post once they approve me?

there should be a post that appears here once I'm unblocked: https://forum.snapcraft.io/u/christianbundy/activity

@christianbundy seems like you need to add me as a collaborator to be sure they don't give it to someone by accident.
This should be where you do that:
https://dashboard.snapcraft.io/snaps/ssb-patchwork/collaboration/

I sent you a private message with the email I use for this account, since it's different from the one I'd use for the patchwork listing.

For the record, I'm now a collaborator and I think that is it (for now) with Christian's involvement.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geovanisouza92 picture geovanisouza92  路  3Comments

ahdinosaur picture ahdinosaur  路  4Comments

slinlee picture slinlee  路  4Comments

mmckegg picture mmckegg  路  5Comments

molstrangler picture molstrangler  路  7Comments