Skip to content

Add snap packaging support#44

Open
lnee94 wants to merge 2 commits into
magic-wormhole:mainfrom
lnee94:patch-1
Open

Add snap packaging support#44
lnee94 wants to merge 2 commits into
magic-wormhole:mainfrom
lnee94:patch-1

Conversation

@lnee94

@lnee94 lnee94 commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

So this adds the configurations required to make a snap
The snaps name needs to get register with snapcraft register fowl
https://snapcraft.io/docs/releasing-your-app

Note edit the relese entry in the snapcraft.yaml when making a new relese

@meejah

meejah commented Jan 22, 2025

Copy link
Copy Markdown
Member

Hello.

Neat, thanks! I've never packaged or released via Snap before. If possible, can you write down the steps please?

Usually I have a like "how to make a release" document, but for now all this repo has is the Makefile and/or DEVELOPERS so one or both of those might be good places to write it down. Meantime I'll look into registering the name.

@meejah

meejah commented Jan 22, 2025

Copy link
Copy Markdown
Member

Apparently this needs manual review. I have requested that a few minutes ago: https://dashboard.snapcraft.io/register-snap-feedback/fowl/ (might need to be logged in to see this? I don't know how snapcraft.io works).

@lnee94

lnee94 commented Jan 23, 2025

Copy link
Copy Markdown
Contributor Author

Apparently this needs manual review. I have requested that a few minutes ago: https://dashboard.snapcraft.io/register-snap-feedback/fowl/ (might need to be logged in to see this? I don't know how snapcraft.io works).

Yes you will need to make a dev account here is the publishing instructions https://snapcraft.io/docs/releasing-your-app
to build a snap simply run snapcraft in the main directory

@lnee94

lnee94 commented Jan 23, 2025

Copy link
Copy Markdown
Contributor Author

Heres the guide on how to register a name https://snapcraft.io/docs/registering-your-app-name

@lnee94

lnee94 commented Jan 23, 2025

Copy link
Copy Markdown
Contributor Author

I added code to the make file that updates the snapcraft version

I don't know how you want to set up the rest so ya.

To build the snap run snapcraft
to upload run snapcraft upload --release=stable mysnap_latest_amd64.snap

@meejah

meejah commented Jan 24, 2025

Copy link
Copy Markdown
Member

Great, thanks! The snap "store" has approved my name, so I should be able to try the above now. (That's what I meant by "manual review", they had to do some stuff to approve "fowl" I guess?)

@lnee94

lnee94 commented Jan 25, 2025

Copy link
Copy Markdown
Contributor Author

Great, thanks! The snap "store" has approved my name, so I should be able to try the above now. (That's what I meant by "manual review", they had to do some stuff to approve "fowl" I guess?)

So ya there was some crypto stealer and pretended to be a alleddy existing wallet so they do a review to make sure that you have a legiment clame to the name fowl.

Also the fowld is do to how snap works is the fowl.fowld command

@lnee94

lnee94 commented Jan 25, 2025

Copy link
Copy Markdown
Contributor Author

You can request that fowld be a base command by https://snapcraft.io/docs/commands-and-aliases#p-19557-requesting-aliases

@meejah

meejah commented Feb 3, 2025

Copy link
Copy Markdown
Member

Tried some more, after installing "lxd" and some other things "snapcraft" wanted; hung on this:

2025-02-02 20:33:01.698 craft_providers.lxd.errors.LXDError: LXD has not been properly initialized.
2025-02-02 20:33:01.698 The default LXD profile is empty or does not contain a disk device with a path of '/'.
2025-02-02 20:33:01.698 Execute 'lxd init --auto' to initialize LXD.

and executing the recommended fix doesn't help.

@lnee94

lnee94 commented Feb 5, 2025

Copy link
Copy Markdown
Contributor Author

Tried some more, after installing "lxd" and some other things "snapcraft" wanted; hung on this:

2025-02-02 20:33:01.698 craft_providers.lxd.errors.LXDError: LXD has not been properly initialized.
2025-02-02 20:33:01.698 The default LXD profile is empty or does not contain a disk device with a path of '/'.
2025-02-02 20:33:01.698 Execute 'lxd init --auto' to initialize LXD.

and executing the recommended fix doesn't help.

First try running sudo adduser "$USER" lxd
What system are your on like OS distro if your running wsl etc.

@meejah

meejah commented Feb 6, 2025

Copy link
Copy Markdown
Member

Debian 12 / bookworm

@lnee94

lnee94 commented Feb 7, 2025

Copy link
Copy Markdown
Contributor Author

Debian 12 / bookworm

on a fresh install of debian 12 i do this and it works

# apt update
# apt install snapd
# snap install snapcraft
# /sbin/adduser $USER sudo
# /sbin/adduser $USER lxd
git clone https://github.com/lnee94/fowl.git
cd fowl
git checkout patch-1
snapcraft
// note i get the same error
lxd init --auto
snapcraft
// now it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants