]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debian: provide fuseext2 to replace src:fuse-umfuse-ext2
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Thu, 28 Nov 2024 17:48:58 +0000 (12:48 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 29 Nov 2024 08:01:13 +0000 (03:01 -0500)
The fuse-umfuse-ext2 packaghas been abandoned by upstream, and a
follow-up fork at https://github.com/alperakcan/fuse-ext2 hasn't been
updated in five years.  Both of these versions also warn against
mounting file systems read/write with fuse-ext2.

As proposed on debian-devel, let's replace fuse-umfuse-ext2 with a
compatibility shell script shipped with fuse2fs.

Link: https://lists.debian.org/debian-devel/2024/10/msg00231.html
Addresses-Debian-Bug: #1085590
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debian/control
debian/copyright
debian/fuse-ext2 [new file with mode: 0755]
debian/fuse-ext2.1 [new file with mode: 0644]
debian/fuse2fs.install
debian/fuse2fs.links [new file with mode: 0644]

index e641b37120c4d4ae3a9935579c394002b7364d5a..bc582cd8a3081c1c31e8807e1c0ec125a5316e4c 100644 (file)
@@ -13,12 +13,23 @@ Package: fuse2fs
 Build-Profiles: <!pkg.e2fsprogs.no-fuse2fs>
 Priority: optional
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Breaks: fuseext2 (<< 1.47.1-2~)
+Replaces: fuseext2 (<< 1.47.1-2~)
 Architecture: linux-any kfreebsd-any
 Description: ext2 / ext3 / ext4 file system driver for FUSE
  fuse2fs is a FUSE file system client that supports reading and
  writing from devices or image files containing ext2, ext3, and ext4
  file systems.
 
+Package: fuseext2
+Build-Profiles: <!pkg.e2fsprogs.no-fuse2fs>
+Depends: fuse2fs (>= 1.47.1-2), ${misc:Depends}
+Architecture: all
+Priority: optional
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
 Package: logsave
 Priority: optional
 Depends: ${shlibs:Depends}, ${misc:Depends}
index 77bd5ea199858f8cd88e900497968003377295a7..604ed9e7e3f17b6872e2558a07ae688382b4fd9b 100644 (file)
@@ -21,6 +21,15 @@ Copyright: 2003-2007 Theodore Ts'o <tytso@mit.edu>
            1995-1996 Michael Nonweiler <mrn20@cam.ac.uk>
 License: GPL-2
 
+Files: debian/fuse-ext2
+Copyright: 2008-2010 Alper Akcan <alper.akcan@gmail.com>
+           2009-2010 Renzo Davoli <renzo@cs.unibo.it>
+License: GPL-2+
+
+Files: debian/fuse-ext2.1
+Copyright: 2024 наб <nabijaczleweli@nabijaczleweli.xyz>
+License: 0BSD
+
 Files: lib/et/*
        lib/ss/*
 Copyright: 1987-1988 MIT Student Information Processing Board
@@ -471,6 +480,37 @@ Comment:
  On Debian systems, the complete text of the GNU General
  Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
 
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program (in the main directory of the fuse-ext2
+ distribution in the file COPYING); if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+Comment:
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: 0BSD
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
 License: LGPL-2
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public License as
diff --git a/debian/fuse-ext2 b/debian/fuse-ext2
new file mode 100755 (executable)
index 0000000..ebd3b8a
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+usage() {
+       printf 'usage: %s [-hv] [-o ro|force|allow_others[,...]]... device|image mountpoint\n\nUse fuse2fs instead.\n' "${0##*/}"
+       exit 9
+}
+
+args="$(getopt -o 'hvo:' --long 'help,verbose,options:' -n "${0##*/}" -s 'sh' -- "$@")" || exit
+eval set -- "$args"
+
+original_options=
+readonly=
+force=
+while :; do
+       case "$1" in
+               -o|--options)
+                       original_options="$original_options,$2"
+                       shift 2
+                       ;;
+               -h|--help)
+                       usage
+                       shift
+                       ;;
+               -v|--verbose)
+                       shift
+                       ;;
+               --)
+                       shift
+                       break
+                       ;;
+       esac
+done
+
+[ $# -eq 2 ] || usage
+device="$1"
+mountpoint="$2"
+
+# let fuse2fs check $device
+
+options=
+while [ -n "${original_options#,}" ]; do
+       original_options="${original_options#,}"
+       full="${original_options%%,*}"
+       original_options="${original_options#*,},"
+       case "${full%%=*}" in
+               "ro"    ) readonly=y               ;;  # Read-only mount.
+               "rw"    ) readonly=                ;;  # Read-write mount
+               "rw+"   ) readonly=; force=y       ;;  # Read-write mount
+               "silent")                          ;;  # keep silent
+               "force" ) force=y                  ;;  # enable read/write
+               *       ) options="$options,$full"; continue ;;
+       esac
+       [ "$full" = "${full%=*}" ] || {
+               printf '%s: %s: value given but not allowed\n' "${0##*/}" "$full" >&2
+               exit 254
+       }
+done
+
+[ -z "$readonly" ] && [ -z "$force" ] && {
+       printf '%s: Mounting %s Read-Only. Use '\''force'\'' or '\''rw+'\'' options to enable Read-Write mode\n' "${0##*/}" "$device" >&2
+       readonly=y
+}
+
+[ -n "$readonly" ] && options="$options,ro" || options="$options,rw"
+
+exec /usr/bin/fuse2fs "$device" "$mountpoint" -o "${options#,}"
diff --git a/debian/fuse-ext2.1 b/debian/fuse-ext2.1
new file mode 100644 (file)
index 0000000..b24ab56
--- /dev/null
@@ -0,0 +1,67 @@
+.\" SPDX-License-Identifier: 0BSD
+.\"
+.Dd October 24, 2024
+.Dt FUSE-EXT2 1
+.Os fuse2fs
+.
+.Sh NAME
+.Nm fuse-ext2
+.Nd fuse2fs compatibility wrapper
+.Sh SYNOPSIS
+.Nm
+.Op Fl hv
+.Oo Fl o Cm ro Ns \&| Ns Cm force Ns \&| Ns Cm allow_others Ns Oo ,… Oc Oc Ns …
+.Ar device Ns \&| Ns Ar image
+.Ar mountpoint
+.
+.Sh DESCRIPTION
+This wrapper provides the
+.Nm
+interface via
+.Xr fuse2fs 1 ,
+which you should migrate to instead.
+.
+.Sh OPTIONS
+.Bl -tag -compact -width ".Fl o , -options Ar option Ns Op ,…"
+.It Fl h , -help
+Show usage string.
+.
+.It Fl v , -verbose
+Ignored.
+.
+.It Fl o , -options Ar option Ns Op ,…
+.Xr mount.fuse3 8
+options, of which these are handled specially:
+.Bl -tag -compact -offset 4n -width ".Cm silent"
+.It Cm ro
+Mount read-only.
+.
+.It Cm rw
+Mount read-write
+.Em if
+.Cm force
+also given.
+This is the default.
+.
+.It Cm rw+
+Same as
+.Fl o Cm rw , Ns Cm force
+.It Cm silent
+Ignored.
+.It Cm force
+If
+.Cm rw ,
+mount read-write.
+.El
+all other
+.Ar option Ns s
+are forwarded to
+.Nm fuse2fs
+directly.
+.Pp
+If
+.Cm rw
+but not
+.Cm force ,
+the mount is read-only and a warning is issued.
+.El
index 2ed4c3c06c0d04997f9c6159bb8a5fd341605af6..5ff8792d728ad451a743ef787eb6367505fd916c 100644 (file)
@@ -1,2 +1,5 @@
 /usr/bin/fuse2fs
 /usr/share/man/man1/fuse2fs.1
+
+debian/fuse-ext2   /usr/bin/
+debian/fuse-ext2.1 /usr/share/man/man1/
diff --git a/debian/fuse2fs.links b/debian/fuse2fs.links
new file mode 100644 (file)
index 0000000..71cb0b6
--- /dev/null
@@ -0,0 +1,7 @@
+/usr/bin/fuse-ext2        /usr/bin/fuseext2
+/usr/bin/fuse-ext2        /usr/sbin/mount.fuse-ext2
+/usr/sbin/mount.fuse-ext2 /usr/sbin/mount.fuseext2
+
+/usr/share/man/man1/fuse-ext2.1       /usr/share/man/man1/fuseext2.1
+/usr/share/man/man1/fuse-ext2.1       /usr/share/man/man8/mount.fuse-ext2.8
+/usr/share/man/man8/mount.fuse-ext2.8 /usr/share/man/man8/mount.fuseext2.8