Opened 6 months ago
Last modified 3 months ago
#69919 new enhancement
Nautilus upgrade + extra new ports tracker-3.0,tracker-miners and glib2 fix to include gio-launch-desktop bin.
Reported by: | christophecvr (christophecvr) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.99 |
Keywords: | gnome nautilus | Cc: | cooljeanius (Eric Gallager), christophecvr (christophecvr) |
Port: | nautilus tracker-3.0 tracker-miner glib2 nautilus-python |
Description
I tried the current nautilus into macports. But the versions self was already a buggy one. So upgrade to the last (gtk3 compatible) version 3.38.2 was required.
To do this upgrade I first needed to make two new ports one tracker-3.0 and one tracker-miners who were together in the tracker one version. The tracker one is still avbl for older packages who might need them cause there is no conflict between the tracker and tracker3 versions. They are using other libs,bins,docs and settings.
The added ports can be found on my github :
https://github.com/christophecvr/macports-ports/tree/cvrworkx11 it is branch cvrworkx11.
port tracker-3.0 https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/tracker-3.0
port tracker-miners https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/tracker-miners
Adapted glib2 port to include gio-launch-desktop into build of generic(x11) version.
port glib2 https://github.com/christophecvr/macports-ports/tree/cvrworkx11/devel/glib2
for this last one if the mp maintainers want, I can already make a patch in my master fork and send a pull request for it.
On the tracker-3.0 and tracker-miners some fine tunings need to be done. First the ports are only tested by me and I'm working on macos-10.13.6 intel (macbookpro mid 2010). But universall support is generally disabled by me since this is not required for 10.13 intel. There is one patch who needs a little change. But by me the both ports building fine working fine. Also it is the first ports I made self.
Then I updated the nautilus port to build 3.38.2 version. I added a couple of patches. Add dconf-editor as a depend since there are a couple of nautilus settings which can only be done with the editor. (unless you use dconf in terminal pretty hard way to do ) .
updated nautilus port:
https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/nautilus
Nautilus now runs fine.
- executing a script file on a selected item OK (for that the glib2 needed the gio-launch-desktop)
- select and copy files ok (you can not copy between finder and nautilus)
- Opening a file with a gnome text editor such as gedit ok.(gedit is added as a depend in port now)
- Identifying of media type such as mp4 or dvd iso or ... works ok (work of tracker3)
- and not all is fully tested yet but nautilus is already a nice and very ussefull extra on my mac.
Now some extra's nautilus can also run by sudo user. But You well need to make one change to you're mac and that is adding :
Defaults always_set_home to file /private/etc/sudoers
That is required other wise the nautilus settings for sudo will be set into you're personal home dir and not into /var/root dir when you use sudo nautilus. The result is that when using nautilus back as regular user you're settings will become inaccessible.
What is the benefit of running nautilus as sudo user:
- Yes first know what you do !!
- Copy files to from directories owned by root (system)
- Edit server setting files with gedit nice and easy.
- runnning scripts on files in system directory's or also some files in /opt/local/...
I made this enhancement ticket. So maybe some more persons would like to test it on other macos versions. Also i'm sure that there are some things in the new ports who can be improved.
What I well can do is send already a pull request for the glib2 little change concerning the gio-launch-desktop.
Change History (22)
comment:1 Changed 5 months ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
comment:2 Changed 5 months ago by christophecvr (christophecvr)
comment:3 Changed 5 months ago by christophecvr (christophecvr)
Now also adapted one example nautilus-python plugin, the open-terminal menu item. It is adapted to last version of the made example but back-patched to work on nautilus < 4 (gtk-3). It works for python >= 3.10 . On mac it will open a standard macos terminal in the selected directory or present background location.
comment:4 Changed 5 months ago by christophecvr (christophecvr)
The adapted example will also be installed when this port is installed. I well have one question I could not find which is the variable who contains the python right build binary(or link)
from :
configure.python ${prefix}/bin/python3.12
so in my port file I added first a new var with
set buildpython 0
Then used this to set the used pyton which can be 3.10,3.11 or 3.12 in code block
variant python310 conflicts python311 python312 description {Use python 3.10} { depends_lib-append port:py310-gobject3 configure.python ${prefix}/bin/python3.10 set buildpython ${prefix}/bin/python3.10 set python_framework ${frameworks_dir}/Python.framework/Versions/3.10 configure.pkg_config_path ${python_framework}/lib/pkgconfig } variant python311 conflicts python310 python312 description {Use python 3.11} { depends_lib-append port:py311-gobject3 configure.python ${prefix}/bin/python3.11 set buildpython ${prefix}/bin/python3.11 set python_framework ${frameworks_dir}/Python.framework/Versions/3.11 configure.pkg_config_path ${python_framework}/lib/pkgconfig } variant python312 conflicts python310 python311 description {Use python 3.12} { depends_lib-append port:py312-gobject3 configure.python ${prefix}/bin/python3.12 set buildpython ${prefix}/bin/python3.12 set python_framework ${frameworks_dir}/Python.framework/Versions/3.12 configure.pkg_config_path ${python_framework}/lib/pkgconfig }
So in a post-destroot I did :
post-destroot { xinstall -d -m 0755 ${destroot}/opt/local/share/nautilus-python/extensions xinstall -m 0644 ${worksrcpath}/examples/open-terminal.py ${destroot}/opt/local/share/nautilus-python/extensions/open-terminal.py system "${buildpython} -m compileall ${destroot}/opt/local/share/nautilus-python/extensions/open-terminal.py" }
It works fine. But Is there not a var who containes the result of configure.python ?
comment:5 Changed 5 months ago by christophecvr (christophecvr)
Ok Found the right way to have the right python to compile in post-destroot. (Is very logic I was a bit stupid for that)
post-destroot { xinstall -d -m 0755 ${destroot}/opt/local/share/nautilus-python/extensions xinstall -m 0644 ${worksrcpath}/examples/open-terminal.py ${destroot}/opt/local/share/nautilus-python/extensions/open-terminal.py system "${configure.python} -m compileall ${destroot}/opt/local/share/nautilus-python/extensions/open-terminal.py" }
comment:6 Changed 5 months ago by christophecvr (christophecvr)
In the mean time the gio-launch-desktop appinfo patch is merged to macports-ports master git on glib2-devel port. So if you use glib2-devel instead of glib2 it will be included in glib2-devel x11 (generic) build. Further I adapted the open-terminal.py plugin to work with python >= 3.10 . Gtk3 or Gtk4 so it should be ready the day we merge to Gtk4 (nautilus >= 4.x) . It will also be installed automatically when nautilus-python is installed. I added also a own made plugin Quit-Nautilus.py. Now the user can Terminate all his nautilus sessions out of right click menu. This item is missing cause we do not have a dash applet with x11 applications. This plugin is also installed automatically when nautilus-python is installed.
comment:7 Changed 5 months ago by christophecvr (christophecvr)
Cc: | christophecvr added |
---|---|
Port: | nautilus-python added |
comment:8 Changed 4 months ago by christophecvr (christophecvr)
Now also added renewed python plugin for nautilus. You can open file here using an interactif menu. plugin is : https://github.com/christophecvr/macports-ports/blob/cvrworkx11/gnome/nautilus-python/files/new-file-here.py
It is installed automatically when nautilus-python is installed.
comment:9 follow-up: 10 Changed 4 months ago by christophecvr (christophecvr)
Not very much persons seems to test this enhancement: But if a macports gnome dev is following this :
I think it becomes time to send some ports to macports. After all these are new ports except:
The Glib2 enhancement which is already in glib2-devel macports-port master branch. The nautilus port which is updated but need the new tracker-miners and tracker-3.0 port.
I could made a nautilus-devel port if wanted, but think that the current nautilus port is not very much used since the version is pretty buggy and nautilus is not very useful there.
But the updated nautilus now can again execute scripts on selected files and maps. The (the right click) menu can now be adapted with python plugins who can perform action on selected items or background if nautilus-python (new-port) is installed.
Further one more question ,
Did some of the devs ever tried to make a glib2 version who supports x11(xorg-server) and quartz backend togheter ?
When I looked more close to the issue looks that it should be possible if a new header file which combines the :
gosxappinfo.m # and gdesktopappinfo.h
In one file and use that it (could ??) be possible to build a glib2 who can be used with x11 or quartz backend. This would solve a lot and be very good for for example the ticket :
@cooljeanius do you still follow this ?
comment:10 follow-up: 11 Changed 4 months ago by cooljeanius (Eric Gallager)
Replying to christophecvr:
In one file and use that it (could ??) be possible to build a glib2 who can be used with x11 or quartz backend. This would solve a lot and be very good for for example the ticket :
@cooljeanius do you still follow this ?
Yeah but the specific instances of it that I'm most concerned about at this moment are #70274 and #63680
comment:11 follow-up: 14 Changed 4 months ago by christophecvr (christophecvr)
Replying to cooljeanius:
Replying to christophecvr:
In one file and use that it (could ??) be possible to build a glib2 who can be used with x11 or quartz backend. This would solve a lot and be very good for for example the ticket :
@cooljeanius do you still follow this ?
Yeah but the specific instances of it that I'm most concerned about at this moment are #70274 and #63680
Hi I checked those tickets. So there was a try to have two glib2 versions one with quartz and one with x11 support build together ?
Then also 2 gtk3 versions one with x11 and one with quartz support ?
I'm not sure but if a single glib2 build to support x11 and quartz could be build it already would be a good step forward.
I'm prepared to investigate and try it out here. since looks that it should be possible to merge the functions used into header files :
gosxappinfo.m # and gdesktopappinfo.h
Into a new header file that supports the osxappinfo and gdesktopappinfo specific function calls. Then when a application uses x11 backend it will use the specific functions of gdesktopapp quartz those of osxappinfo. then build glib2 that support generic and native in one.
There also should not be problems with not find symbols on build time and if at some point we come to a duplicate symbols error it is just a point to trac the source and mostly change the double declarations by changing one of them to ext.
Think it's worth to try that out ?
comment:12 Changed 4 months ago by christophecvr (christophecvr)
As extra could be that on older macos who needs i386 support this does not work out but that can be adapted in portfile.
comment:13 Changed 4 months ago by christophecvr (christophecvr)
What is fun is that I just for try removed glib2-devel and gtk3 . Rebuild glib2-devel +quartz Then I needed to rebuild epoxy (or is it libepoxy ?) with +quartz. It rebuilded by me all the applications such as gedit and nautilus and my new port nautilus-python and a couple off packages.
Then I build gtk3 +quartz.
Well nautilus does run with quartz !! (gnome desktop has been rebuild also this with glib2-devel quartz and gtk3 quartz !!)
The nautilus-plugins are working. It uses the mac top menu and we have a dash nautilus on top. The only issue is that now nautilus tries to open files with the mac applications (like in finder) and then crashes. But this surely is solvable (well with a lot of headache I guess).
and nautilus does run without the use of x11 server.
This means that gnome-core applications can be build for quartz also the gnome-desktop. Yes we will have to add a lot of X11 dependencies but the xorg-server is not required. Of course this was a test i've don in 20 minutes . There will well be a lot of work to have it all 100 % but definitely .
Also very important is that a build gstreamer with cocoa and x11 support so I have the full opengl support.
comment:14 follow-up: 15 Changed 4 months ago by cooljeanius (Eric Gallager)
Replying to christophecvr:
Replying to cooljeanius:
Replying to christophecvr:
In one file and use that it (could ??) be possible to build a glib2 who can be used with x11 or quartz backend. This would solve a lot and be very good for for example the ticket :
@cooljeanius do you still follow this ?
Yeah but the specific instances of it that I'm most concerned about at this moment are #70274 and #63680
Hi I checked those tickets. So there was a try to have two glib2 versions one with quartz and one with x11 support build together ?
Then also 2 gtk3 versions one with x11 and one with quartz support ?
That's the basic idea/request; idk how far anyone's actually gotten with it, though...
comment:15 Changed 4 months ago by christophecvr (christophecvr)
Replying to cooljeanius:
That's the basic idea/request; idk how far anyone's actually gotten with it, though...
Yes I did see that @mascguy was busy with it but seamed to stopped his plans ?
I'm now just starting to see if it's possible to combine the two app info's generic and native in one build. At first look it should be possible. For that I first already created a new port called :
glib2-exp
into branch :
https://github.com/christophecvr/macports-ports/tree/cvr-quartz-x11
I was just hold up with tracker package first since @barracuda156 did add now a port tracker3 so I could remove my own created tracker-3.0 .
However the tracker3 does not build the tracker-miners 3 . The last versions of tracker miners can't be build since they started using blkid linux util (blkid.h). A whole code bunch concerning file info needs to be altered cause blkid can't be build on macos (ext4 or hfs+) are on that point different. The last ver of tracker miners I could build is 3.2.2. That I keep so for the time. tracker-miners is required for nautilus 3.38.2
Now I can continu my tries on glib2 first.
comment:16 Changed 4 months ago by christophecvr (christophecvr)
I now do have adapted the glib2-exp (new port) to build: if variant x11 (or no variant is used) it build like before only for x11 only gtk3 +x11 can be build. gnome core applications do work. If variant quartz is set it builds for quartz just like before only gtk3 +quartz can be build gnome core packages do not work.
if variant +quartz +x11 is set glib2-exp builds for quartz and x11.
- Gtk3 can be build for quartz or x11
- gnome core packages can be build and do run with quartz or x11 depending on build off gtk3 variant.
- libepoxy needs also to be rebuild with +quartz +x11 (adapted port file)
The changes can be find on :
https://github.com/christophecvr/macports-ports/tree/cvrquartzx11
the ports added or changed are :
devel/glib2-exp # new port gnome/nautilus # modified port updated to version 3.38.2 gnome/tracker-miners # new port gnome/nautilus-python # new port graphics/libepoxy # modified port make it possible to build +quartz + x11 gnome/gstreamer1-gst-plugins-base # modified port build off gl support enabled for x11 and non x11
comment:17 Changed 4 months ago by christophecvr (christophecvr)
I do not know what happens but since last night sudden almost all fails during destroot phase. I tried with a fresh build off master. complete clean macports removed all I had. Problem is pretty general with almost all meson build packages. Now I'm trieing o trace from were it started. It does not come from meson update to 1.5 so ??? Did not filed ticket yet but sure it will come I guess.
comment:18 Changed 4 months ago by christophecvr (christophecvr)
Found : it is the update to meson 1.5. This update breaks build from a lot of gnome packages. This during destroot phase. The error is :
Installing gst-libs/gst/tag/libgsttag-1.0.0.dylib to /opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gstreamer1-gst-plugins-base/gstreamer1-gst-plugins-base/work/destroot/opt/local/lib Command '['install_name_tool', '/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gstreamer1-gst-plugins-base/gstreamer1-gst-plugins-base/work/destroot/opt/local/lib/libgsttag-1.0.0.dylib', '-delete_rpath', '/opt/local/lib', '-delete_rpath', '/opt/local/lib', '-id', '/opt/local/lib/libgsttag-1.0.0.dylib', '-change', '@rpath/libgsttag-1.0.0.dylib', '/opt/local/lib/libgsttag-1.0.0.dylib']' returned non-zero exit status 1. Command failed: cd "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gstreamer1-gst-plugins-base/gstreamer1-gst-plugins-base/work/build" && /opt/local/bin/meson install Exit code: 1 Error: Failed to destroot gstreamer1-gst-plugins-base: command execution failed
But this error do show by a tremendous lot of gnome packages build with meson. Off course the specific command differs depending on the dylib used .
This will !!! show up on the macports servers very soon (from the moment of one off the concerned packages needs an update. )
The worse is uninstalling meson and reinstalling with previous meson version does not solve the issue anymore.
comment:19 Changed 4 months ago by christophecvr (christophecvr)
Yes it is confirmed by many many tests. The meson 1.5.0 does break a lot of gnome packages during build.
Ticket is posted for that :
comment:20 Changed 3 months ago by christophecvr (christophecvr)
I just succeeded to install catalina on my MacBookPro (mid 2010) . Thanks to the website:
http://dosdude1.com/catalina/
Works fine Now I have:
Last version of Firefox,google chrome , Libre office (Yes since short future releases will require Macos 11.0 but for now I have the last ones)
Bank card reader do work back all cloud sync utility's do work again and ...
As for macports the build with 100% x11 works all fine
Builds for quartz do not work all to well on Catalina.
But for that there is more to change I saw. I'll start study off the extra changes to perform.
comment:21 Changed 3 months ago by christophecvr (christophecvr)
Since catalina macos-major 10.15(actually it's more since macos-major 10-14 I think but I can only test 10.15). A lot changed for the quartz integration. On x11 it's ok for quartz a lot of work to do.
I now first started by using the most recent version of gedit.
Created a port gedit4 this for not interfering with the base gedit.
The port : https://github.com/christophecvr/macports-ports/tree/cvrquartzx11/gnome/gedit4
This port does not build yet due to missing depends.
Once done off course the extra port command conflicts with gedit will be added
I just started with the first depend which is : libgedit-amtk new port :
https://github.com/christophecvr/macports-ports/tree/cvrquartzx11/gnome/libgedit-amtk
I well do have 2 questions :
- Is the solution I applied in port to download the source ok? (it works fine)
Cause it is from a git repo but not a github one so I can't use port github
I used the release tag 5.8.0 tarball file.
If there is a better way just let it know. - The build off libgedit-amtk has over the whole line different libs so can coexist with amtk ver 5
except for one single gir lib. Since in this case it is just one lib Do not think it is wise to conflict the whole
port with port amtk. I did now installed this libgedit-amtk using -f force uption. Then it just saved
The previous file conflicting lib under a tempo name. :
---> Activating libgedit-amtk @5.8.0_0 Error: Failed to activate libgedit-amtk: Image error: /opt/local/lib/girepository-1.0/Amtk-5.typelib is being used by the active amtk port. Please deactivate this port first, or use 'port -f activate libgedit-amtk' to force the activation. while executing "throw registry::image-error $msg" ("foreach" body line 49) invoked from within "foreach file $imagefiles { incr progress_step _progress update $progress_step $progress_total_steps se..." invoked from within "registry::write { foreach file $imagefiles { incr progress_step _progress update $progress_step $progress_..." # I just did : MacBookProCvr:macports-ports christophe$ sudo port -f activate libgedit-amtk ---> Computing dependencies for libgedit-amtk ---> Activating libgedit-amtk @5.8.0_0 Warning: File /opt/local/lib/girepository-1.0/Amtk-5.typelib already exists. Moving to: /opt/local/lib/girepository-1.0/Amtk-5.typelib.mp_1723536287. Warning: File /opt/local/share/gir-1.0/Amtk-5.gir already exists. Moving to: /opt/local/share/gir-1.0/Amtk-5.gir.mp_1723536287. ---> Cleaning libgedit-amtk
The old packages using amtk do work fine and does not seems to be affected by this issue.
How to best solve this in Portfile (without conflicting the whole amtk 5 port with libgedit-amtk ?)
Thanks would be nice to have some hints.
comment:22 Changed 3 months ago by christophecvr (christophecvr)
@mascguy
Hallo
With all my test and so, I did conclude that the glib2 version itself needs a upgrade to last version. When starting with updated versions of gedit nautilus and so on, also the mac integration will needs many changes, however at first glib2 must be updated since a lot of gobject are deprecated they may build but do not work well at run time. Apple on it in catalina (10.15) is also further and more up to date to gobjects.
Question are you still busy in finding a solution to build higher versions of glib2 ? I saw that by homebrew they used a way of:
- First build a glib2 without introspection stage it temporarely.
- Build gobject-introspection with use of the tempo staged glib2
- Stage and install gobject-introspection.
- Rebuild glib2 with gobject-introspection
- merge the staged glib2 with the second build glib2 stage it
- Install the glib2 final merged build version.
Do not now how to do this in macports, but updated glib two is really required before starting any further development.
What works in macports is a hacking way of building glib2 higher versions.
- Build glib2 without introspection. (disable it) install it. (so use install)
- Then build/install gobject-introspection.
- then build/install glib2 with forced option and introspection enabled.
It will deactivate the glib2 without introspection but not remove all.
You obtain a complete glib2 build so but that's a work around and hacking way of installing and you may not remove the installed first glib2.
Some news now I also added the nautilus-python to this project. Added port nautilus-python. The version I used is 1.2.3 which is the last who runs with nautilus < 4.0 (nautilus 4.0 runs with gtk-4.0). It is patched to compile with clang (the duplicated symbol error solved by using extern to pointer declarations in second module). Adapted the wrong search of python.so to python.dylib. The plugin module self has well so extension since nautilus searches for that. Set the version of python to 3.12. Patched the source to solve deprecated python stuff since python 3.11. So it is ready for higher python versions then 3.12 in future. Solved a wrong * char declaration which is since python 3 and higher * const char.
It does build clean just one warning which is also present in linux builds an needs to be solved upstream.
Does work perfect. Now we can add extra menu items with actions to the nautilus menu.
Works can be found on my git hub macports fork cvrworkx11 branch.
In the mean time a very important patch to glib2 is passed as push request to glib2 and glib2-devel.
In glib2-devel it has been tested and passed all checks but still not merged ???
https://github.com/macports/macports-ports/pull/24009
Further the extra ports added or modified are :
Modified :
-nautilus https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/nautilus upgrade to 3.38.2 (last gtk 3.0 ver)
Added:
-port tracker-3.0 https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/tracker-3.0
-port tracker-miners https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/tracker-miners
-port nautilus-python https://github.com/christophecvr/macports-ports/tree/cvrworkx11/gnome/nautilus-python