8000 ind.ie.Gnomit by aral · Pull Request #570 · flathub/flathub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ind.ie.Gnomit #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

ind.ie.Gnomit #570

wants to merge 4 commits into from

Conversation

aral
Copy link
@aral aral commented Aug 21, 2018

This is a Flatpak of Gnomit, a simple Git commit message editor for Gnome that I made while learning GJS, inspired by the excellent Komet app that I loved using on macOS.

I also wrote up a little script to help me automatically create this submission from my Gnome Builder project and also to build it locally to make sure that everything works. I’m very new to this platform, having only started using a Linux desktop/Gnome about a month ago so I’m not sure if there was an easier way or if I just reinvented the wheel a little. (It does feel like the ability to publish to Flathub could and should be seamlessly integrated into Gnome Builder.)

Also, congratulations on hitting 1.0 🎉

Flatpak and Flathub are awesome!

Thank you so much for all your hard work in creating such a valuable contribution to ethical technology!

❤️ 🎈

]
},
{
"name" : "icons",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put these as a post-install step on the main application, or better, install them properly from within your app.

Copy link
Author
@aral aral Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Nick, re: the icons: This is the only way (after hours of searching for any documentation) that I managed to get the icons to show up when running the app via Flatpak. I’m afraid I don’t know right now how to add them as part of the post-install step or what “properly from within your app” means. Do you have any links to relevant documentation handy? I will set aside a few more hours to try and find some documentation and fix this. Once the app is acceptable/accepted, I plan to write up tutorials on all this as “getting started” documentation is severely lacking at the moment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think I found something I can try – how Gnome Recipes is doing it: https://salsa.debian.org/gnome-team/gnome-recipes/blob/debian/master/data/meson.build

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, more documentation is always welcome! A lot of flatpak stuff assumes you have "a linux app" already, and is just silent about where you're actually supposed to put stuff. I'm delighted that this is getting more people to write new things, but obviously embarassed it's not as easy as it should be.

What I meant is - you could include these assets in your app and use meson to put them in the correct place. Alternatively, rather than having them as a separate module in flatpak, include them as part of the main app module and use a "post-install" section (which is basically like buildsystem simple, only it runs after the main meson build but before you move onto the next section. Here's an example of someone doing exactly that:

https://github.com/flathub/space.fips.Fips/blob/30038cb77d9f258b5bc0f044b0986ab93f6f7cdb/space.fips.Fips.json#L28

Copy link
Author
@aral aral Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Nick – I got working now; appreciate the help. Should be able to issue a PR to address all these issues within half an hour or so :)

My goal is to make Gnomit a little case study on how to take an app from zero to Flatpak/Flathub. Should be just about possible given how simple it is. I plan on having a GJS version and then doing one for Vala when the Vala version is ready. (These are learning exercises for me also.)

<url type="bugtracker">https://github.com/indie-mirror/gnomit/issues</url>
<url type="donation">https://ind.ie/fund/</url>
<url type="help">https://forum.ind.ie/</url>
<categories>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put these as categories in the desktop file instead, they'll get automatically copied into here in the build process

Copy link
Author
@aral aral Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Nick. I’ll try that and include it in the next build.

I am confused by the documentation since the Flatpak requirements page leads to the AppStream docs, which includes categories The requirements page also shows categories as part of the .desktop file example on the page.

I will open an issue for this to be explicitly documented on the Flatpak requirements page. Something along the lines of "Do not include categories in your Appstream (appdata.xml) file but put them into your .desktop file."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see what happened. I followed the instructions on the Generic Component page of the Appstream documentation instead of the Desktop Applications section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<p>Features:</p>
<ul>
<li>Highlights overflow of subject line when it exceeds 69 characters.</li>
<li>Inserts empty line between subject line and the rest of the message.</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indenting!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in https://source.ind.ie/gnome/gnomit/gjs/commit/bcabb3d532c82348c2bc8b9522374d131d0bfdc4 – will include it in the next push to this PR once I handle some of the other issues also.

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>ind.ie.Gnomit.desktop</id>
<name>Gnomit</name>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indenting!

Copy link
Author
@aral aral Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Nick. Fixed in https://source.ind.ie/gnome/gnomit/gjs/commit/bcabb3d532c82348c2bc8b9522374d131d0bfdc4 – will include it in the next push to this PR once I handle some of the other issues also.

@nedrichards
Copy link
Member

bot, build ind.ie.Gnomit

@nedrichards
Copy link
Member

@bochecha
Copy link

Since apps are usually reverse-DNS style, should this instead be ie.ind.Gnomit?

@nedrichards
Copy link
Member

Yes, it should.

@aral
Copy link
Author
aral commented Aug 22, 2018

Re: ind.ie.Gnomit. we are called ind.ie so ie.ind doesn’t make sense.

I understand why it is important to have unique IDs, and the aspect of a domain name that guarantees that is the uniqueness of the domain + TLD, regardless of order. Reverse DNS-style came into favour with Java and might make sense for organisations with names contained entirely within the domain part but our organisation’s name is ind.ie (pronounced “indie”), we’re not Ind, based in Ireland :)

There is also a larger philosophical reason for our choice of domain name in that we see owning your own domain as an important part of owning your own identity in the digital/networked world (see https://2018.ar.al/notes/the-nature-of-the-self-in-the-digital-age/). This is also why I have the ar.al domain.

So, in this case (and for our apps in the future), I would like to request an exception to the reverse DNS convention. I plan on distributing Gnomit via Flatpak by default and given that the App ID is ind.ie.Gnomit on direct downloads and (when we have it), our own repository on Ind.ie, I would like it to be consistent here also. This is a detail that is also exposed to the people using it as they have to enter the App ID when setting Gnomit as the default editor:

git config --global core.editor "flatpak run ind.ie.Gnomit"

Ideally, of course, I’d like that to be just Gnomit, but I can live with ind.ie.Gnomit. ie.ind.Gnomit just doesn’t make sense :)

Hope this isn’t a showstopper to getting the app on Flathub. Thanks in advance for your time :)

aral added a commit to small-tech/gnomit that referenced this pull request Aug 22, 2018
@nedrichards
Copy link
Member

I mean, it should be your app-id. If that's your app-id then that's interesting. Per the requirements it's supposed to be a valid dbus name:

https://github.com/flathub/flathub/wiki/App-Requirements
http://docs.flatpak.org/en/latest/conventions.html#application-ids
https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names

aral added a commit to small-tech/gnomit that referenced this pull request Aug 22, 2018
aral added a commit to small-tech/gnomit that referenced this pull request Aug 22, 2018
Move icons from Flatpak build stage to Meson build stage.

Addresses flathub/flathub#570 (review)
@aral
Copy link
Author
aral commented Aug 22, 2018

Yep, it’s the App ID. Afaics, it is a valid D-Bus name as the specification states should and not must for the reverse-DNS convention. Also, it passes appstream-util validate-relax.

I just pushed two commits that should hopefully address all of the other concerns (thank you for your thorough review, I appreciate it).

Looking forward to hopefully seeing Gnomit up on Flathub :)

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>ind.ie.Gnomit.desktop</id>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this <id> element's value match app-id in ind.ie.Gnomit.json? This example, while slightly different, refers to the <launchable> tag for what you have here.

Example: If your application's .desktop file is named org.example.FooBar.desktop, a good component-id would be org.example.FooBar.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated and pushed based on your suggestions.

I believe the entry in there was what Gnome Builder had auto-generated.

@nedrichards
Copy link
Member

bot, build ind.ie.Gnomit

aral added a commit to small-tech/gnomit that referenced this pull request Aug 23, 2018
Also update launch date and version number in release notes. (As we will be launching with 1.0.1 not 1.0.0.)

See flathub/flathub#570 (review)
@nedrichards
Copy link
Member

bot, build ind.ie.Gnomit

@nedrichards
Copy link
Member

fwiw the app id is exported on the command line (since 0.10.2), you just need to add them to your path.

Flatpak now creates CLI wrappers for all installed apps, so if you
add /var/lib/flatpak/exports/bin or ~/.local/share/flatpak/exports/bin
to your PATH you can easily start flatpak apps by their application id.

@nedrichards
Copy link
Member

Repository has been created: https://github.com/flathub/ind.ie.Gnomit

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.

4 participants
0