Sunday, January 29, 2012

Gobohide kernel patch

You probably have heard about GoboHide kernel patch ? If not, here is the short story:
GoboHide is an idea for redesign of linux directory tree in a more user friendly way. The trick is to patch the linux kernel with a user specified list of directories, that should not listed and returned to the user if directory listing is required ('ls' command for example). The readdir() kernel function is then patched to look into this list and if an entry found, then it is just skipped. Very tricky...
The origin of GoboHide comes from GoboLinux and is well described here.

MoonOS screenshot, featuring new directory structure











I think the more widespread publicity of GoboHide comes when MoonOS adopted it an year ago. This was revolutionary; I liked it very much and I will adopt it in my own linux distro too. Yes, I'd like to see AmeOS file manager list root directory structure like the picture above. It is more intuitive and simple.

Unfortunately, the Linux Kernel changes too fast to 3.2 (It was 2.6+ when I heard about GoboHide for the first time).
So, I'm trying to patch Arch Linux kernel for a second day and with no success. The patch and compiling went ok, but gobohide utility gave me the same error:

ioctl: Operation not supported.


Today I wrote to gobolinux-dev mailing list, asking for help. The response came immediately - Michael Homer told me the gobohide runs well on his machine with kernel 3.1 and gave me some point to start checking my kernel.

For now, I'm compiling again. Will see what's happened later.
Thats the odd in archlinux - you have to compile on your own machine. If there is a public compile farm it will be more easy, eh!

EDIT:
Gobohide patch and utility succeeds and working like a charm. Now I will test it against current 3.2.2 kernel and later will publish AUR packages.
Stay tuned.


10 comments:

  1. I'm actually interested in GoboHide for ArchLinux! I already try MoonOS but no one beat ArchLinux... so I will follow your experience. I have 1h30 per kernel compilation so I prefer have your feedback before wasting time :p

    Maybe you could do an AUR package if it's works fine.

    ReplyDelete
  2. You're lucky one, I have ~ 3h per kernel compilation :)
    Anyway, the patch went ok, I also fix gobohide utility. It was broken due to the wrong svn version.
    Soon I will publish PKGBUILDS on AUR and here.

    ReplyDelete
  3. I'm trying to apply gobohide to 3.2 too. I saw the latest userland version is GoboHide-0.14 (september 2011), but the patch seems to be 5 years old: http://cvs.savannah.gnu.org/viewvc/tools/GoboHide/src/?root=goboscripts
    What patch are you using for kernel 3.2?

    ReplyDelete
  4. Hi, the patch is actually here:
    http://recipes.gobolinux.org/r/?list=Linux&ver=3.1.1-r1
    take the file 01-gobohide.patch
    the gobohide utility is here:
    http://gobolinux.org/download/gobohide/GoboHide-0.14.tar.bz2
    compile yourself or wait a day or two - I will publish my PKGBUILDS on AUR or my own site
    Regards

    ReplyDelete
  5. Thanks for the patch url. I was wondering if you have tried applying it to 3.2 or only to 3.1 ? Also, how did you solve the "Operation not supported" error? Thanks

    ReplyDelete
  6. You are welcome. I've actually successfully compiled 3.1, 3.2.2 and 3.2.5 kernel. The PKGBUILDS for 3.2.5 will be published tonight on Arch AUR. 'Operation not supported' error is caused by version mismatch between patch itself and gobohide utility. The links above are for the right patch and utility pair.
    Regards

    ReplyDelete
  7. Ah I understand now. Thanks a lot!

    ReplyDelete
  8. Hello I come to take some news ^^

    ReplyDelete
  9. I'm back! I got your PKGBUILD to build the kernel and I got the GoboHide utility and it works but won't hide /dev /home /proc /run and /sys. I read that GoboHide is designed to deliberately not hide directories which are mountpoint so I tried this fixture : http://lists.gobolinux.org/pipermail/gobolinux-devel/2011-June/004297.html but it still don't hide the above directories. Have you encountered the same problem ??

    Thanks.

    ReplyDelete
  10. I found the answer to my own question >.>
    Lucas C. Villa Real made a patch the 12-Sep-2011 (Take the superblock into account when comparing the dentries in order to allow mount points to be hidden) in recipe for 3.0.4-r4. This patch is *not* available in the most recents recipes (!?) so you just have to take the recipe 3.0.4-r4 and make this modification for a most recent kernel.
    __________
    line 588 ADD #include BEFORE #include
    or it wont compile.
    __________

    http://www.mail-archive.com/gobolinux-devel@lists.gobolinux.org/msg03392.html
    http://recipes.gobolinux.org/r/?list=Linux&ver=3.0.4-r4&file=01-gobohide.patch

    Now it works like a charm :)

    ReplyDelete