Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years 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 8 years ago.
josm-snapcraft.diff (1.9 KB ) - added by mvogt 8 years ago.
Updated version of the snapcraft.yaml file

Download all attachments as: .zip

Change History (22)

by mvogt, 8 years ago

Attachment: josm-snap.diff added

comment:1 by Klumbumbus, 8 years ago

Component: unspecifiedCore

comment:2 by bastiK, 8 years ago

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 by Don-vip, 8 years ago

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

comment:4 by Don-vip, 8 years ago

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

comment:5 by Don-vip, 8 years ago

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

in reply to:  3 comment:6 by bastiK, 8 years ago

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 by anonymous, 8 years ago

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.

by mvogt, 8 years ago

Attachment: josm-snapcraft.diff added

Updated version of the snapcraft.yaml file

comment:8 by mvogt, 8 years ago

(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 by bastiK, 8 years ago

Resolution: fixed
Status: needinfoclosed

In 11794/josm:

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

comment:10 by bastiK, 8 years ago

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 by Don-vip, 8 years ago

Milestone: 17.03

in reply to:  8 comment:12 by stoecker, 8 years ago

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 by stoecker, 8 years ago

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

in reply to:  13 comment:14 by Klumbumbus, 8 years ago

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 by Klumbumbus, 8 years ago

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 by bastiK, 8 years ago

In 11823/josm:

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

in reply to:  15 comment:17 by bastiK, 8 years ago

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 by Klumbumbus, 8 years ago

In 11827/josm:

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

comment:19 by mvogt, 8 years ago

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 by bastiK, 8 years ago

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.
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.