[ooo-build] enable file locking in gnome-vfs (sftp)

Bug #248743 reported by Chris Jones
2
Affects Status Importance Assigned to Milestone
LibreOffice
Incomplete
Undecided
Unassigned
OpenOffice
Invalid
Unknown
Ubuntu
Invalid
Undecided
Unassigned
openoffice.org (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: openoffice.org

We are using OpenOffice with an sftp share (interfaced via gnome-vfs/nautilus) and multiple users are overwriting each other's changes because there is no file locking available.
Apparently this is an option for smb/nfs, and maybe it can create an appropriate .lock file on filesystems which don't natively support locking.

Revision history for this message
Richard Seguin (sectech) wrote :

Thank you for reporting this bug and trying to make Ubuntu better... I can mark this as a wishlist if you like but sftp is basically a secure version of FTP... The FTP protocol doesn't support file locks by design... Maybe you would have better luck using a smb file share rather then sftp?

In any case I'll wishlist this...

Thanks,

Richard Seguin

Changed in openoffice.org:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Chris Jones (cmsj) wrote : Re: enable file locking in sftp

Richard: sorry, I only did half of what I was supposed to. This is a bug based on a discussion with Chris Cheney.

Changed in openoffice.org:
assignee: nobody → ccheney
milestone: none → intrepid-alpha-4
Chris Cheney (ccheney)
Changed in openoffice.org:
importance: Undecided → Medium
status: New → Triaged
Martin Pitt (pitti)
Changed in openoffice.org:
milestone: intrepid-alpha-4 → intrepid-alpha-5
Chris Cheney (ccheney)
Changed in openoffice.org:
milestone: intrepid-alpha-5 → ubuntu-8.10-beta
Chris Cheney (ccheney)
Changed in openoffice.org:
assignee: ccheney → nobody
milestone: ubuntu-8.10-beta → none
Revision history for this message
Chris Cheney (ccheney) wrote :

I need to test to see if forcing locking on in all cases will fix this issue without breaking anything else...

Changed in openoffice:
status: New → Invalid
Changed in openoffice.org:
milestone: none → intrepid-updates
assignee: nobody → ccheney
Revision history for this message
Chris Cheney (ccheney) wrote : Re: [upstream] enable file locking in gnome-vfs (sftp)

As far as I can tell turning on locking in general doesn't seem to do anything for a regular filesystem. I found the upstream bug relating to the feature and have attached it.

Changed in openoffice:
importance: Undecided → Unknown
status: Invalid → Unknown
Changed in openoffice.org:
assignee: ccheney → nobody
milestone: intrepid-updates → none
Changed in openoffice:
status: Unknown → Invalid
Revision history for this message
Chris Cheney (ccheney) wrote :

Unfortunately upstream claims they can't fix this problem until they no longer support older versions of Gnome since the older versions of Gnome do not support locking.

Revision history for this message
Chris Cheney (ccheney) wrote :

I'm going to see if someone wants to fix this for ooo-build.

Changed in openoffice:
importance: Unknown → Undecided
status: Invalid → New
Revision history for this message
In , Chris Cheney (ccheney) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121711 Ubuntu/9.04 (jaunty) Firefox/3.0.5

As noted in i87501 gnome vfs file locking is needed. Sun does not want to do it in their version since they have to support very old versions of Gnome that do not support file locking, so perhaps someone with the knowledge could fix it in ooo-build instead?

http://qa.openoffice.org/issues/show_bug.cgi?id=87501

Reproducible: Always

Changed in openoffice:
importance: Undecided → Unknown
status: New → Unknown
Changed in openoffice:
status: Unknown → Confirmed
Revision history for this message
In , Nopower (nopower) wrote :

kendy, what is the current state of play with locking, this will be fixed in 3.1 I guess

Revision history for this message
In , Tlillqvist (tlillqvist) wrote :

No (upstream) version of gnome-vfs supports locking, as far as I know. Locking on opening (GNOME_VFS_OPEN_LOCKED) and an implementation of it for for the SMB method in particular (relevant there as the SMB protocol has the "share mode" feature, like Windows) exists only in SUSE's build of gnome-vfs AFAIK. Unfortunately this feature has not been upstreamed, and by now it is too late I guess as gnome-vfs is deprecated. Other distros are free to adopt the same feature of course.

Changed in openoffice:
status: Confirmed → Incomplete
Revision history for this message
Chris Cheney (ccheney) wrote :

Chris,

After talking some more to the Novell OOo guys it appears that GIO doesn't even support file locking but they are considering adding it in the future. There is bug filed about this issue in Gnome bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=573293

Revision history for this message
In , Tlillqvist (tlillqvist) wrote :

There isn't really much more that can be done in OOo for this. Locking on opening a file though gnome-vfs requires support for it to exist in gnome-vfs. That support exists only in SUSE's gnome-vfs (and other distros that might have borrowed the same patch). (And even in that, such locking on opening is implemented only for smb. In theory it could be implemented for local files also on BSD and MacOSX as far as I know. It would have been nice if the SUSE patch had also provided an API to check whether the lock-on-open request can be handled for a particular URI (or after the open, whether it was actually handled or not).)

What we probably should do in ooo-build is remove this part of gnome-vfs-locking-ucb.diff:

+.IF "$(GNOMEVFS_HAS_LOCKING)" != "YES"
+CFLAGS+=-DGNOME_VFS_OPEN_LOCKED=16
+.ENDIF
+

i.e. thus not having OOo think that the gnome-vfs it is being built against has GNOME_VFS_OPEN_LOCKED even if it doesn't. Instead add to the patch ifdefs on GNOME_VFS_OPEN_LOCKED around the code that tries to use it.

Kendy and Chris, what do you think of that?

Maybe also add a big warning to gnome-vfs-locking-config_office.diff that says "Your gnome-vfs does not implement GNOME_VFS_OPEN_LOCKED. Be afraid"

Revision history for this message
In , Kendy (kendy) wrote :

Tor: I guess we can let the .IF "$(GNOMEVFS_HAS_LOCKING)" != "YES" there, we would have to introduce the some #ifdefs in the code anyway so that it compiles without the locking support.

But you are completely right about the config part of that - I think the best would be to introduce --enable-gnome-vfs-locking switch that would just issue an error and break configure when enabled without a locking gnome-vfs. Then we can set the --enable-gnome-vfs-locking in the appropriate distro_config's - what do you think?

Revision history for this message
In , Chris Cheney (ccheney) wrote :

That sounds useful to me. For 3.0.1 I had to disable gnome-vfs/gio since they both seem to not work properly for me on Ubuntu. I added a patch to ooo-build-3-0-1 that causes the gnome fpicker to return local fuse paths for gvfs locations which allows use to save to remote locations without having gnome-vfs/gvfs support built into OOo itself.

Changed in openoffice:
status: Incomplete → Confirmed
Revision history for this message
In , Tlillqvist (tlillqvist) wrote :

A link to the upstream bug for GIO concerning adding a locking API: http://bugzilla.gnome.org/show_bug.cgi?id=573293

Revision history for this message
In , Tlillqvist (tlillqvist) wrote :

Does it make any sense to keep this bug open any longer? What is it that is actually asked for here? Does the Debian (Ubuntu) build of OOo use gnome-vfs or gio, and does the Debian (Ubuntu) gnome-vfs use the same patch as the openSUSE one implementing GNOME_VFS_OPEN_LOCKED or not?

Changed in openoffice:
status: Confirmed → Incomplete
Revision history for this message
In , Behlert (behlert) wrote :

No response for several months. feel free to reopen when you have the requested
information available, thanks.

Changed in openoffice:
status: Incomplete → Invalid
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

No new OOo releases in Ubuntu => Wont fix
Needs upstream bug reference in LibreOffice => Incomplete

Changed in df-libreoffice:
status: New → Incomplete
Changed in openoffice.org (Ubuntu):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.