Bug#951208: Impossible to mount over nonempty directories

2021-02-05 Thread marc
Package: bindfs
Followup-For: Bug #951208

bindfs -o nonempty ... works for me after today's fuse3 update to 3.10.1-3,
which is patched per #939767 ("fuse3: Installing fuse3 breaks fuse2 applications
using -o nonempty").



Bug#951208: Impossible to mount over nonempty directories

2021-01-10 Thread marc
Package: bindfs
Version: 1.14.7-1
Followup-For: Bug #951208

On 18/02/2020 14:07, Eugene V. Lyubimkin wrote:
> How common of a use case is to use bindfs with a non-empty mount point? I 
> never mounted filesystems like that myself, so
> I don't know if it's a minor nuisance with an easy workaround, or a 
> significant limitation making some use case
> unachievable.

I use bindfs to redirect heavy I/O away from my SSD from the Firefox cache, 
when visiting some specific sites, because
it does not support XDG_CACHE_HOME:

https://bugzilla.mozilla.org/show_bug.cgi?id=259356


On 21/02/2020 10:02, Willem Mulder wrote:
> At our association we have shared home directories (over NFS), but on
> one particular server, our remote desktop server, we have the XDG
> config, data and cache directories on separate HDDs. We're using bindfs
> to mount them onto their default locations, since not all software uses
> the XDG environment variables. People can also run software on other
> servers, so we do need (the ability) to mount over nonempty directories.

If that can be helpful, the arch wiki has a comprehensive list of apps that do 
not follow the XDG spec, or follow it
in part:

https://wiki.archlinux.org/index.php/XDG_Base_Directory



Bug#951208: fuse3's backwards compatibilty (Re: Bug#951208: Impossible to mount over nonempty directories)

2020-02-21 Thread Willem Mulder
Hi,

On 18/02/2020 14:07, Eugene V. Lyubimkin wrote:
> How common of a use case is to use bindfs with a non-empty mount point? I 
> never mounted filesystems like that myself, so
> I don't know if it's a minor nuisance with an easy workaround, or a 
> significant limitation making some use case
> unachievable.

At our association we have shared home directories (over NFS), but on
one particular server, our remote desktop server, we have the XDG
config, data and cache directories on separate HDDs. We're using bindfs
to mount them onto their default locations, since not all software uses
the XDG environment variables. People can also run software on other
servers, so we do need (the ability) to mount over nonempty directories.

Kind regards,

Willem Mulder




signature.asc
Description: OpenPGP digital signature


Bug#951208: fuse3's backwards compatibilty (Re: Bug#951208: Impossible to mount over nonempty directories)

2020-02-18 Thread Martin Pärtel
I've used non-empty mountpoints a few times, mostly when mounting a
directory onto itself, but I have no idea how popular that use case really
is.
Mounting to a new empty location is probably always possible, but it's
sometimes quite undesirable or inconvenient:
- Sometimes I want to enforce certain rules on a directory and hide the
original directory to prevent confusion and misuse.
- Sometimes I want to quickly test something on an existing directory, and
a program I want to use might be configured or even hard-coded to use that
specific directory.
So I think this is worth fixing.

Here's my current understanding (I was a bit confused in my initial
response):
- The scope: bindfs seems to work fine with libfuse2 and fuse3 EXCEPT for
`nonempty`. The test suite, which tests most other features, passes on
Debian 10 with fuse3 installed.
- The bug: libfuse2 checks that the destination is empty or `nonempty` is
given. Then it invokes fusermount (symlinked to fusermount3), which doesn't
accept `nonempty`.
- bindfs cannot be compiled against libfuse3. That would require
significant code changes.

So it seems backwards compatibility between fusermount3 and libfuse2 was
intended, and this is a bug there.
If so, here are the "easy" fixes I can think of:
1. patch fusermount3 to accept and ignore `nonempty` (perhaps only when
invoked through a symlink named fusermount?)
or
2. patch libfuse2 to stop requiring `nonempty` (or passing it to fusermount
when it's symlinked to fusermount3?)
or
3. instead of symlinking fusermount -> fusermount3, make it a wrapper
script that drops `nonempty` from any option list like `-o
option1,nonempty,option2,...`

If someone who knows FUSE better can point out something simple I can do in
bindfs code instead, I'd be happy to write a short patch.
But there may be other FUSE 2 filesystems designed to "wrap" an existing
directory that also have this bug, so I think fixing this at the FUSE layer
is better.


On Tue, 18 Feb 2020 at 15:12, Eugene V. Lyubimkin  wrote:

> Hello,
>
> Martin Pärtel kirjoitti 17.2.2020 klo 10.49:
> > I'm unfortunately unlikely to have time to port bindfs to FUSE 3 in the
> near future :(
> >
> > The easiest distro-level workaround in terms of "least code required"
> would probably be to patch fuse3's fusermount to
> > allow and ignore `nonempty` (and maybe print a deprecation warning). Or
> some hacks could probably be invented to direct
> > FUSE 2 filesystems to use FUSE 2 helpers. It's up to the Debian
> maintainers whether they want the maintenance burder of
> > either of these workarounds.
>
> CC'ing FUSE's maintainer for extra input if any.
>
>
> From the discussion above I gather that bindfs is still (with limitations)
> usable with fuse3. If true, then I wouldn't
> like to block users of fuse3 from using bindfs via strict Depends. I could
> add Suggests or Recommends on fuse2,
> though.
>
> How common of a use case is to use bindfs with a non-empty mount point? I
> never mounted filesystems like that myself, so
> I don't know if it's a minor nuisance with an easy workaround, or a
> significant limitation making some use case
> unachievable.
>
>
> Regards,
> --
> Eugene V. Lyubimkin aka JackYF
> C++ GNU/Linux userspace developer, Debian Developer
>
>


Bug#951208: fuse3's backwards compatibilty (Re: Bug#951208: Impossible to mount over nonempty directories)

2020-02-18 Thread Eugene V. Lyubimkin
Hello,

Martin Pärtel kirjoitti 17.2.2020 klo 10.49:
> I'm unfortunately unlikely to have time to port bindfs to FUSE 3 in the near 
> future :(
> 
> The easiest distro-level workaround in terms of "least code required" would 
> probably be to patch fuse3's fusermount to
> allow and ignore `nonempty` (and maybe print a deprecation warning). Or some 
> hacks could probably be invented to direct
> FUSE 2 filesystems to use FUSE 2 helpers. It's up to the Debian maintainers 
> whether they want the maintenance burder of
> either of these workarounds.

CC'ing FUSE's maintainer for extra input if any.


>From the discussion above I gather that bindfs is still (with limitations) 
>usable with fuse3. If true, then I wouldn't
like to block users of fuse3 from using bindfs via strict Depends. I could add 
Suggests or Recommends on fuse2,
though.

How common of a use case is to use bindfs with a non-empty mount point? I never 
mounted filesystems like that myself, so
I don't know if it's a minor nuisance with an easy workaround, or a significant 
limitation making some use case
unachievable.


Regards,
-- 
Eugene V. Lyubimkin aka JackYF
C++ GNU/Linux userspace developer, Debian Developer



Bug#951208: Impossible to mount over nonempty directories

2020-02-17 Thread Martin Pärtel
Ok, thanks. If you don't use other FUSE filesystems, you can maybe
uninstall `fuse3` and install `fuse`.

I'm unfortunately unlikely to have time to port bindfs to FUSE 3 in the
near future :(

The easiest distro-level workaround in terms of "least code required" would
probably be to patch fuse3's fusermount to allow and ignore `nonempty` (and
maybe print a deprecation warning). Or some hacks could probably be
invented to direct FUSE 2 filesystems to use FUSE 2 helpers. It's up to the
Debian maintainers whether they want the maintenance burder of either of
these workarounds.



On Wed, 12 Feb 2020 at 18:07, Willem Mulder 
wrote:

> Hi Martin,
>
> On Wed, 2020-02-12 at 17:17 +0200, Martin Pärtel wrote:
> > If that doesn't help, maybe you're running a mixed environment where
> > e.g. bindfs is compiled against FUSE 2 but the system runs FUSE 3
> > helper binaries? The version list at the end of your e-mail suggests
> > this.
>
> I haven't used your option, but I can confirm (using `ldd
> /usr/bin/bindfs` and `fusermount -V`) that bindfs was linked against
> libfuse 2.9.9, and the helper binaries are version 3.7.0. I guess the
> package either needs to limit the FUSE version to < 3, or link against
> libfuse >= 3.
>
> Kind regards,
>
> Willem Mulder
>


Bug#951208: Impossible to mount over nonempty directories

2020-02-12 Thread Willem Mulder
Hi Martin,

On Wed, 2020-02-12 at 17:17 +0200, Martin Pärtel wrote:
> If that doesn't help, maybe you're running a mixed environment where
> e.g. bindfs is compiled against FUSE 2 but the system runs FUSE 3
> helper binaries? The version list at the end of your e-mail suggests
> this.

I haven't used your option, but I can confirm (using `ldd
/usr/bin/bindfs` and `fusermount -V`) that bindfs was linked against
libfuse 2.9.9, and the helper binaries are version 3.7.0. I guess the
package either needs to limit the FUSE version to < 3, or link against
libfuse >= 3.

Kind regards,

Willem Mulder



Bug#951208: Impossible to mount over nonempty directories

2020-02-12 Thread Martin Pärtel
Hi Willem,

The only reference to "nonempty" in binds code is when a directory is
mounted on itself. In that case bindfs adds `-ononempty` automatically. I
changed it so it doesn't on FUSE 3:
https://github.com/mpartel/bindfs/commit/2c2337b7c9b87744662c4b08d453bf7128444f43
(git master, not in a release yet)

If that doesn't help, maybe you're running a mixed environment where e.g.
bindfs is compiled against FUSE 2 but the system runs FUSE 3 helper
binaries? The version list at the end of your e-mail suggests this.
I added an option that may help you debug that:
https://github.com/mpartel/bindfs/commit/4b87500fef925e591b08cb8aea6bf0a21b84dd72

Let me know if I can help further.


On Wed, 12 Feb 2020 at 16:27, Willem Mulder 
wrote:

> Package: bindfs
> Version: 1.14.1-1
> Severity: normal
> File: /usr/bin/bindfs
>
> Dear Maintainer,
>
> Currently, it's not possible for me to mount over nonempty directories.
> BindFS insists I have to use -o nonempty:
>
> fuse: mountpoint is not empty
> fuse: if you are sure this is safe, use the 'nonempty' mount option
>
> But when I do, I get the following message:
>
> fusermount: unknown option 'nonempty'
>
> Some quick searching suggests this might have to do with upgrading to
> FUSE 3: https://github.com/rclone/rclone/issues/3562
>
> Kind regards,
>
> Willem Mulder
>
> -- System Information:
> Debian Release: bullseye/sid
>   APT prefers testing
>   APT policy: (990, 'testing'), (500, 'testing-debug'), (500, 'unstable'),
> (500, 'stable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 5.4.0-3-amd64 (SMP w/16 CPU cores)
> Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8),
> LANGUAGE=en_IE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages bindfs depends on:
> ii  fuse3 [fuse]  3.7.0-1
> ii  libc6 2.29-10
> ii  libfuse2  2.9.9-2
>
> bindfs recommends no packages.
>
> bindfs suggests no packages.
>
> -- no debconf information
>
>


Bug#951208: Impossible to mount over nonempty directories

2020-02-12 Thread Willem Mulder
Package: bindfs
Version: 1.14.1-1
Severity: normal
File: /usr/bin/bindfs

Dear Maintainer,

Currently, it's not possible for me to mount over nonempty directories.
BindFS insists I have to use -o nonempty:

fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

But when I do, I get the following message:

fusermount: unknown option 'nonempty'

Some quick searching suggests this might have to do with upgrading to
FUSE 3: https://github.com/rclone/rclone/issues/3562

Kind regards,

Willem Mulder

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-debug'), (500, 'unstable'), 
(500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-3-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bindfs depends on:
ii  fuse3 [fuse]  3.7.0-1
ii  libc6 2.29-10
ii  libfuse2  2.9.9-2

bindfs recommends no packages.

bindfs suggests no packages.

-- no debconf information