-
Notifications
You must be signed in to change notification settings - Fork 270
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
geniuspaste: Port to libsoup3 (and avoid GTK3 deprecations) #1342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bearing in mind my lack of knowledge of libsoup it looks ok.
Tested... Seems to work. |
Thanks for review & testing! BTW, a few things things to note:
Is that OK with everybody? @elextr @frlan It is with me, I feel it's OK for the plugin to live in the present, and with the webkit question we don't really have a choice (apart from process isolation). Also, maybe this means we want to drop support for webkit2gtk 4.0 in the other plugins, or have a fancy check in the build system to try and avoid the case where different plugins use incompatible libraries -- but that's gonna be non-trivial, and probably not worth it. Also a subsequent improvement would be to use the asynchronous libsoup API, because now it blocks the UI. Before this PR, it looked a bit better because IIUC (not verified) one of the libsoup calls spun the main loop manually, but this likely had some unexpected side effects of its own. I will try not to include this here. |
Do Debian and Ubuntu even bother rebuilding packages for old releases? After testing the plugin, I think it should be dropped. Most of the pastebins don't work. There's no confirmation of what it's sending. Half the time, there's no way to view the pastebin after it's sent because plugin failed to open browser on my computer, and didn't print any message indicating issue, or where to get pastebin, etc. (The other half, were error popups.) Once data is sent, there's no way to delete it, which is a security risk if accidentally (or maliciously) triggered. The pastebin that did work (https://pastebin.geany.org/) hadn't been used since Dec 2022. So the plugin probably isn't being used. |
Bugfixes, security fixes and those sorts of things, but rarely new versions. To be honest @xiota has a point, if the plugin causes constraints on others we need to look at what value it adds, and if it only works for one pastebin and what it replaces is |
Indeed only 3 did in my tests (Geany's, Debian's and Sprunge)
It's indeed unfortunate that it doesn't report deletion URL for pastebins that support it.
Failing to open the browser is odd, because it uses Geany's own
That part is not true: it's just that by default the pastes are deleted after a while, and it just means that nobody had made a forever-paste since then. Anyway, as @elextr said this has been abandoned by it's author, and I've been surprised of the amount of work I did put in it myself over the years (not that I really mind, but I don't think of myself as the maintainer). I think that this plugin has some occasional use (although I don't myself, and it lacks support for some popular ones like gists), but I won't weep over its coffin if that should be its fate. Also, there are some competent tools around that might be a worthy replacement, like pastebinit that could probably be wrapped to offer a similar featureset. Pastebin service support might however be easy enough to improve; it's configuration files that need to be added/removed/adapted to pastebin service changes. |
No, the dependency only matter for users of older releases that would like to build a newer Geany by themselves. And Debian was just an example, sometimes we check what even more slow-paced distro do, like RHEL or so. |
I had seen the browser setting, but don't know what actually uses it. Same with the terminal command. What actually uses it? I also often have ... "send selection to" not working until I restart geany. I'm close to being annoyed enough with it to search for the problem.
It didn't appear to do either. No popup or message in status or msgwin on success. I don't recall seeing anything but some usual gtk errors in terminal.
I don't see how to use the geany pastebin service without the plugin. There's no web form I can find. |
Weird… unless you have a libsoup2 plugin loaded? IIUC nothing will stop you from doing so, but things will just perform bizarrely (or crashingly). Or maybe the plugin has more issues than I can see myself.
Ah, indeed, it was removed due to spam… quoting @eht16 from an internal mail:
So indeed, only the plugin (or another API-based tool, like an oooold pastebinit configuration I have laying around). |
@@ -3,7 +3,8 @@ AC_DEFUN([GP_CHECK_GENIUSPASTE], | |||
GP_ARG_DISABLE([GeniusPaste], [auto]) | |||
|
|||
GP_CHECK_PLUGIN_DEPS([GeniusPaste], GENIUSPASTE, | |||
[libsoup-2.4 >= 2.4.0]) | |||
[gtk+-3.0 >= 3.16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to adjust the CI workflow config to install libsoup3. Currently the plugin will not be built in the CI due to the missing dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, trying it now -- but that also requires bumping the Ubuntu version because 20.04 doesn't have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eht16 Seems to work, but that hit the cppcheck issue again, do you know anything about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It breaks also the nightly builds and so I merged #1310 today to unhide this problem.
Unfortunately, now it is not hidden any longer.
0e025a7
to
d336856
Compare
I tried to test it on Windows but got mixed results :(. First, we need more dependencies on Windows:
(The diff probably won't apply cleanly against this PR but should be easy enough to adopt, sorry.) Then, I got a compiler warning which might or might not be new but still worth to look at:
When trying to paste some file, Geany crashes for me when it is executed natively. I don't know yet why this happens and I didn't manage it yet to debug it with gdb. This might be related to my system where I use some firewall rules to block unwanted internet access from Windows and also have proxy connections configured and after all, it is Windows 7. When I start Geany from within the MSYS2 environment, pasting some file works to some extend, at least no crash :). The Anyway, with the bundle changes above, we should get usable installers from the CI and so others could test it as well with a less weird Windows setup :). |
It's actually not an issue (the buffer is taken the line before), but probably worth silencing.
That's pretty bad :) I'd be nice to have more info, and possibly whether it's new or not.
This is weird, don't you have old leftover configuration for the plugin? This should only happen if your configuration has a |
I rebased against master to have a fixed CI, plus added @eht16 Windows bundle fixes -- hopefully this will help testing and finding out what's wrong :) |
I got it. After much of debugging and mostly fiddling around, I found two causes:
The letter one is a bit tricky because some of those schemas are installed already in the Geany bundle and there we compile them also to
This is probably such a case where a combined installer with everything included would be easier.
No leftover configuration. I could reproduce this with pastebin.geany.org on Linux and Windows. With this change and the additional dependencies mentioned above, I've got it finally working on Windows!!! @b4n what do you think about the schemas compile problem? |
What does the section contain?? because here (Debian) it works with the shipped configuration, even in a fresh separate install and configuration directory.
Can't we "simply" run |
What's in GIT master: https://github.com/geany/geany-plugins/blob/master/geniuspaste/data/pastebin.geany.org.conf#L12
Weird, here is Debian Testing but Geany is installed from GIT master.
Hmm, this could work. I'll give it a try soon. |
Yeah I meant separate Git install, not from Debian. But I got it, it's likely just you using a newer GLib than I am, and they made a incompatible change: https://gitlab.gnome.org/GNOME/glib/-/issues/3098 |
@eht16 paste configuration issue should be fixed. But indeed it's unrelated to this PR, just to you using a newer GLib |
What's the range of glib versions this plugin is supposed to work with? |
@xiota I don't know exactly the minimum version, but practically any should be ok, why you ask? |
I was curious about the upper limit because of problems described as being related to "newer GLib". But I guess the "invalid syntax" has been fixed. (I didn't notice earlier the commit changing backslashes.) |
Yes, it is fixed. Thanks for fixing it!
Done in geany/geany#3885 and #1352. Together with the bundle changes of this PR, this should work fine. |
@b4n do you mind rebasing on current master? Then we'll get easy to test installers from the CI and could finally merge this one. |
0e2de9f
to
9c0e16f
Compare
@eht16 sure, done. |
We are getting closer :). "gsettings-desktop-schemas" is missing in the dependency list in build/gtk-bundle-from-msys2.sh (sorry if I wasn't clear about it before). |
@eht16 done (in case you didn't see the commit) |
Seeen it but didn't have time until now. With the new installers pasting to geany.org works fine now. |
Co-Authored-By: Enrico Tröger <[email protected]>
We used the invalid single-backslash in pastebin configurations, which used to work fine for our case until GLib 2.79. Fix this by using proper double-backslashes which work with all versions.
7a2fa7c
to
4e93f0b
Compare
Merged, so we're one step closer to libsoup3 everywhere. This doesn't mean we can't still drop the plugin if people want, I still don't mind even if I spent some time on this 🙂 |
This type of plugin seems inherently dangerous... But up to people to install and run what they want. |
Many pastebins don't work, but it's not new to the changes here…
CC @xiota @jbicha