Modify

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 3 weeks ago

#14576 closed enhancement (fixed)

[patch] Add snapcraft.yaml

Reported by: mvogt Owned by: mvogt
Priority: normal Milestone: 17.03
Component: Core Version: latest
Keywords: linux snap Cc:

Description

Please considering applying the attached diff that will add a "snapcraft.yaml" file to the tree (www.snapcraft.io). This allows trivial building of a "snap" package for linux. A snap package allows running josm on a lot of linux distributions without extra effort, the created snap will include everything it needs for running josm.

Once the snapcraft.yaml file is part of the tree (and issue https://github.com/openstreetmap/openstreetmap-mirror/issues/7 is fixed) build.snapcraft.io could even build and make edge snapshots available automatically.

Attachments (2)

josm-snap.diff (1.1 KB) - added by mvogt 4 weeks ago.
josm-snapcraft.diff (1.9 KB) - added by mvogt 4 weeks ago.
Updated version of the snapcraft.yaml file

Download all attachments as: .zip

Change History (22)

Changed 4 weeks ago by mvogt

Attachment: josm-snap.diff added

comment:1 Changed 4 weeks ago by Klumbumbus

Component: unspecifiedCore

comment:2 Changed 4 weeks ago by bastiK

Should be okay to host the file here, but I would put it in a new directory distribution/snap/snapcraft.yaml. Please take a bit more time to improve the metadata (icon, license, description, etc.), the Debian package is a good start for that. Why not use the launcher from there?

comment:3 Changed 4 weeks ago by Don-vip

If we create a new distribution folder we should move the Linux, macosx and windows directories in it.

comment:4 Changed 4 weeks ago by Don-vip

Keywords: linux snap added
Summary: [patch] Please add snapcraft.yaml to the tree[patch] Please add snapcraft.yaml

comment:5 Changed 4 weeks ago by Don-vip

Summary: [patch] Please add snapcraft.yaml[patch] Add snapcraft.yaml

comment:6 in reply to:  3 Changed 4 weeks ago by bastiK

Owner: changed from team to mvogt
Status: newneedinfo

Replying to Don-vip:

If we create a new distribution folder we should move the Linux, macosx and windows directories in it.

Yes, exactly!

comment:7 Changed 4 weeks ago by anonymous

Thanks a lot for your feedback!

I updated the snapcraft.yaml now as suggested. It contains more useful summary/description (taken from the excellent Debian package) and also uses the desktop file and the right icon. It is also self-contained now (it needs a special launcher unfortunately).

I did not move it to a different directory, because I am hoping we could enable automatic snapshot building using "build.snapcraft.io" at some point and AFAICT this build service will look at the toplevel dir (I might be wrong though, I can investigate this further). With these automatic builds users could easily have the latest josm on most linux distributions with a simple snap install josm.

Changed 4 weeks ago by mvogt

Attachment: josm-snapcraft.diff added

Updated version of the snapcraft.yaml file

comment:8 Changed 4 weeks ago by mvogt

(comment #7 is also from me, for some reason I can not register my account, I get the message that my submission was rejected because it is spam :/)

comment:9 Changed 4 weeks ago by bastiK

Resolution: fixed
Status: needinfoclosed

In 11794/josm:

applied #14576 - Add snapcraft.yaml (patch by michael.vogt)

comment:10 Changed 4 weeks ago by bastiK

Michael, congratulations, you are now the JOSM snap maintainer! :)

Btw., we probably don't want to release the nightly builds as a snap, certainly not marked as 'stable'.

Another note: JOSM is aware of the XDG_DATA_HOME environment variable (see Help/Preferences), so please make sure this works as intended.

comment:11 Changed 4 weeks ago by Don-vip

Milestone: 17.03

comment:12 in reply to:  8 Changed 4 weeks ago by stoecker

Replying to michael.vogt@…:

(comment #7 is also from me, for some reason I can not register my account, I get the message that my submission was rejected because it is spam :/)

Well, a gmail address makes it worse - 99% of all spam registrations have a gmail address :-)

You should get a captcha which improves your score and adding a proper description in the registration field helps and also read the rejection message - sometimes you simply violate the account name rules. If all that does no help, tell me the exact time of your tries and I'll have a look in the rejects list. The captcha may need JavaScript enabled.

comment:13 Changed 4 weeks ago by stoecker

A note: "stable" and josm-custom.jar don't match. Stable would be "josm-tested.jar". custom is the name of SVN builds.

comment:14 in reply to:  13 Changed 4 weeks ago by Klumbumbus

Replying to stoecker:

A note: "stable" and josm-custom.jar don't match. Stable would be "josm-tested.jar". custom is the name of SVN builds.

Do we need an adjustment of the yaml file?

comment:15 Changed 4 weeks ago by Klumbumbus

Does the installation via snapcraft already work or is https://github.com/openstreetmap/openstreetmap-mirror/issues/7 still required?

(I wonder, if this new install possibility should be listed at the startupppage for 17.03 milestone)

comment:16 Changed 4 weeks ago by bastiK

In 11823/josm:

snapcraft.yaml: mark as grade: devel (see #14576)

comment:17 in reply to:  15 Changed 4 weeks ago by bastiK

Replying to Klumbumbus:

Does the installation via snapcraft already work or is https://github.com/openstreetmap/openstreetmap-mirror/issues/7 still required?

(I wonder, if this new install possibility should be listed at the startupppage for 17.03 milestone)

There is no new install possibility. We just have a snapcraft build file sitting in the repository for anyone who wants to go further with this.

I don't know much about snap, but the main advantage seems to be that it works for many different Linux distributions and not just Debian+Ubuntu or OpenSuse. However, for JOSM we do not profit that much as we also have webstart and .jar download. The desktop integration is nice, but not required to run JOSM.

We don't really need the github.com -> build.snapcraft.io integration, as we could just push snap builds from our server using the normal API. The github mirror breaks occasionally, so this would be more stable anyway. In addition, the github mirror is oblivious to the release versions.

Overall, to make JOSM available as snap, it would require someone to care for it long-term, it is not just flipping a switch and then it's done.

comment:18 Changed 3 weeks ago by Klumbumbus

In 11827/josm:

see #14576 - update description with text from https://josm.openstreetmap.de/

comment:19 Changed 3 weeks ago by mvogt

Thanks for the feedback!

Auto-building from github is currently not working because of the issue outlined in https://github.com/openstreetmap/openstreetmap-mirror/issues/7 - I did a manual build/upload to the "edge" channel of the svn tree. One (IMO) nice property of a snap is that it can be in multiple channels: edge/beta/candidate/stable. So pushing the latest bits to "edge" should be ok, the expectation is that it may be unstable.

So in this sense there is a new install way via "sudo snap install --edge josm". However we should not advocate "edge" to users :) I can create a snap for stable or candidate from your next release if you want (but we can also just wait and build snaps and do something for the next release, whatever you prefer).

comment:20 Changed 3 weeks ago by bastiK

Sounds good, just 2 requests:

  • Please stay responsive if there are complaints about the package on this bug tracker (you should get email notification).
  • What we don't need is a snap with a very old JOSM version, that gets no more updates. So if you do loose interest at some time (hopefully not so soon :) ), please clean up after, hand over credentials to a core member or what needs to be done...

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain mvogt.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.