Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package bindfs for openSUSE:Factory checked in at 2022-07-31 23:00:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bindfs (Old)
and /work/SRC/openSUSE:Factory/.bindfs.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bindfs"
Sun Jul 31 23:00:52 2022 rev:23 rq:991699 version:1.17.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/bindfs/bindfs.changes 2021-03-10 08:48:09.898326006 +0100
+++ /work/SRC/openSUSE:Factory/.bindfs.new.1533/bindfs.changes 2022-07-31 23:01:08.235725438 +0200
@@ -1,0 +2,6 @@
+Fri Jul 29 10:26:36 UTC 2022 - Jan Engelhardt
+
+- Update to release 1.17.0
+ * Added --map-{passwd,group}-rev
+
+-------------------------------------------------------------------
Old:
----
bindfs-1.15.1.tar.gz
New:
----
bindfs-1.17.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bindfs.spec ++++++
--- /var/tmp/diff_new_pack.4jBzLM/_old 2022-07-31 23:01:08.683726740 +0200
+++ /var/tmp/diff_new_pack.4jBzLM/_new 2022-07-31 23:01:08.687726751 +0200
@@ -1,7 +1,7 @@
#
# spec file for package bindfs
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: bindfs
-Version: 1.15.1
+Version: 1.17.0
Release: 0
Summary: Filesystem for mapping directories with alternate permissions
License: GPL-2.0-or-later
++++++ bindfs-1.15.1.tar.gz -> bindfs-1.17.0.tar.gz ++++++
++++ 17528 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/ChangeLog new/bindfs-1.17.0/ChangeLog
--- old/bindfs-1.15.1/ChangeLog 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/ChangeLog 2022-07-12 20:31:10.000000000 +0200
@@ -1,3 +1,26 @@
+2022-07-12 Martin P��rtel <martin dot partel at gmail dot com>
+
+ * Reverted change in 1.16.0 that made direct_io the default.
+ It turned out to be more problematic than not having it.
+ (issue #117, thanks @DUOLabs333 and @Misterio77)
+ * Released 1.17.0
+
+2022-06-24 Martin P��rtel <martin dot partel at gmail dot com>
+
+ * Added --map-{passwd,group}-rev
+ (PR #113 by @sshilovsky, thanks!)
+ * Fixed build on FreeBSD
+ * Released 1.16.1
+
+2022-06-18 Martin P��rtel <martin dot partel at gmail dot com>
+
+ * Released 1.16.0
+
+2022-04-03 Martin P��rtel <martin dot partel at gmail dot com>
+
+ * Added --no-direct-io and enabled FUSE's direct_io by default
+ (issue #110, thanks @DUOLabs333)
+
2021-02-15 Martin P��rtel <martin dot partel at gmail dot com>
* Fixed build on old compilers by adhering more strictly to C99.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/README.md new/bindfs-1.17.0/README.md
--- old/bindfs-1.15.1/README.md 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/README.md 2022-07-12 20:31:10.000000000 +0200
@@ -29,6 +29,7 @@
Then compile and install as usual:
+ ./autogen.sh # Only needed if you cloned the repo.
./configure
make
make install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/compile new/bindfs-1.17.0/compile
--- old/bindfs-1.15.1/compile 2021-02-15 04:35:55.000000000 +0100
+++ new/bindfs-1.17.0/compile 2022-07-12 20:31:13.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/.
+# along with this program. If not, see https://www.gnu.org/licenses/.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
@@ -255,7 +255,8 @@
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,9 +340,9 @@
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/config.h.in new/bindfs-1.17.0/config.h.in
--- old/bindfs-1.15.1/config.h.in 2021-02-15 04:35:54.000000000 +0100
+++ new/bindfs-1.17.0/config.h.in 2022-07-12 20:31:12.000000000 +0200
@@ -39,9 +39,6 @@
/* Define to 1 if you have the `lutimes' function. */
#undef HAVE_LUTIMES
-/* Define to 1 if you have the header file. */
-#undef HAVE_MEMORY_H
-
/* Define to 1 if you have the `removexattr' function. */
#undef HAVE_REMOVEXATTR
@@ -54,6 +51,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
@@ -102,7 +102,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Version number of package */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/configure.ac new/bindfs-1.17.0/configure.ac
--- old/bindfs-1.15.1/configure.ac 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/configure.ac 2022-07-12 20:31:10.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([bindfs],[1.15.1],[martin.partel@gmail.com])
+AC_INIT([bindfs],[1.17.0],[martin.partel@gmail.com])
AM_INIT_AUTOMAKE([foreign serial-tests])
AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/missing new/bindfs-1.17.0/missing
--- old/bindfs-1.15.1/missing 2021-02-15 04:35:55.000000000 +0100
+++ new/bindfs-1.17.0/missing 2022-07-12 20:31:13.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/.
+# along with this program. If not, see https://www.gnu.org/licenses/.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@
exit $st
fi
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
program_details ()
{
@@ -207,9 +207,9 @@
exit $st
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/releasescript/makerelease.sh new/bindfs-1.17.0/releasescript/makerelease.sh
--- old/bindfs-1.15.1/releasescript/makerelease.sh 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/releasescript/makerelease.sh 2022-07-12 20:31:10.000000000 +0200
@@ -6,7 +6,7 @@
fi
VERSION="$1"
-REPO_URL="git://github.com/mpartel/bindfs.git"
+REPO_URL="git@github.com:mpartel/bindfs"
umask 0022
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/src/bindfs.1 new/bindfs-1.17.0/src/bindfs.1
--- old/bindfs-1.15.1/src/bindfs.1 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/src/bindfs.1 2022-07-12 20:31:10.000000000 +0200
@@ -11,9 +11,7 @@
.SH DESCRIPTION
A FUSE filesystem for mirroring the contents of a directory to another
-directory. Additionally, one can change the permissions
-of files in the mirrored directory.
-
+directory, with changes to permissions and other features.
.SH FILE OWNERSHIP
.TP
@@ -66,21 +64,44 @@
the corresponding behavior of this option.
Requires mounting as root.
+
.TP
.B \-\-map-passwd=\fI<passwdfile>\fP, \-o map-passwd=\fI<passwdfile>\fP
.PD 0
.TP
.B \-\-map-group=\fI<groupfile>\fP, \-o map-group=\fI<groupfile>\fP
-Like \fB--map=...\fP, but reads the UID/GID mapping from passwd and group
-files (like \fI/etc/passwd\fP and \fI/etc/group\fP). Helpful to restore
-system backups where UIDs/GIDs differ.
+Like \fB--map=...\fP, but reads the UID (GID) mapping from passwd (group) file
+(like \fI/etc/passwd\fP and \fI/etc/group\fP). Maps UID (GID) provided in the
+\fI<passwdfile>\fP (\fI<groupfile>\fP) to its corresponding user (group) name.
+Helpful to restore system backups where UIDs and GIDs differ.
Example usage:
\& bindfs --map-passwd=/mnt/orig/etc/passwd \\
.br
-\& \--map-passwd=/mnt/orig/etc/group \\
-.br
+\& \--map-group=/mnt/orig/etc/group \\
+.br
+\& /mnt/orig /mnt/mapped
+
+Requires mounting as root.
+
+.TP
+.B \-\-map-passwd-rev=\fI<passwdfile>\fP, \-o map-passwd-rev=\fI<passwdfile>\fP
+.PD 0
+.TP
+.B \-\-map-group-rev=\fI<groupfile>\fP, \-o map-group-rev=\fI<groupfile>\fP
+Reversed variant of \fB--map-passwd\fP and \fB--map-group\fP. Like
+\fB--map=...\fP, but reads the UID (GID) mapping from passwd (group) files
+(like \fI/etc/passwd\fP and \fI/etc/group\fP). Maps user (group) name provided
+in the \fI<passwdfile>\fP (\fI<groupfile>\fP) to its corresponding UID (GID).
+Helpful to create compatible chroot environments where UIDs and GIDs differ.
+
+Example usage:
+
+\& bindfs --map-passwd-rev=/mnt/mapped/etc/passwd \\
+.br
+\& \--map-group-rev=/mnt/mapped/etc/group \\
+.br
\& /mnt/orig /mnt/mapped
Requires mounting as root.
@@ -389,6 +410,19 @@
a security risk for some use cases. See \fB\%BUGS\fP below.
.TP
+.B \-\-direct\-io, \-o direct\-io
+
+Forwards each read/write operation 1:1 to the underlying FS,
+disabling batching and caching by the kernel. Some applications may
+require this, however it may be incompatible with other applications,
+as currently it has issues with \fBmmap\fP(2) calls, at least.
+
+.TP
+.B \-\-no\-direct\-io, \-o no\-direct\-io
+
+This option is provided in case the default changes in the future.
+
+.TP
.B \-\-forward\-odirect=\fIalignment\fP, \-o forward\-odirect=\fIalignment\fP
Enable experimental \fBO_DIRECT\fP forwarding, with all read/write requests rounded
to the given alignment (in bytes). By default, the \fBO_DIRECT\fP flag is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/src/bindfs.c new/bindfs-1.17.0/src/bindfs.c
--- old/bindfs-1.15.1/src/bindfs.c 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/src/bindfs.c 2022-07-12 20:31:10.000000000 +0200
@@ -203,6 +203,8 @@
#ifdef __linux__
int forward_odirect;
size_t odirect_alignment;
+
+ bool direct_io;
#endif
uid_t uid_offset;
@@ -221,13 +223,6 @@
/* Checks whether the uid is to be the mirrored owner of all files. */
static int is_mirrored_user(uid_t uid);
-#ifdef HAVE_FUSE_3
-#ifndef __NR_renameat2
-/* Returns the path to a temporary file inside the same directory as src_path */
-char *tmpnam_inpath(char *src_path);
-#endif
-#endif
-
/* Processes the virtual path to a real path. Always free() the result. */
static char *process_path(const char *path, bool resolve_symlinks);
@@ -377,66 +372,6 @@
return 0;
}
-#ifdef HAVE_FUSE_3
-#ifndef __NR_renameat2
-char *tmpnam_inpath(char *src_path)
-{
-
- char *res, tmp[L_tmpnam], *path, *fname, *tfname, *src_path_cpy, *src_path_cpy_1, *tmp_cpy;
- int i = 0;
-
- src_path_cpy = (char *) calloc((strlen(src_path)), sizeof(char));
- strcpy(src_path_cpy, src_path);
-
- src_path_cpy_1 = (char *) calloc((strlen(src_path)), sizeof(char));
- strcpy(src_path_cpy_1, src_path);
-
- path = dirname(src_path_cpy);
- fname = basename(src_path_cpy_1);
-
- tmpnam(tmp);
- tmp_cpy = (char *) calloc((strlen(tmp)), sizeof(char));
- strcpy(tmp_cpy, tmp);
-
- tfname = basename(tmp_cpy);
-
- res = (char *) calloc( (strlen(path) + 2 + strlen(tfname) + 1 + strlen(fname) + 1), sizeof(char));
-
- strcat(res, path);
- strcat(res, "/.");
- strcat(res, tfname);
- strcat(res, "~");
- strcat(res, fname);
-
- while (access( res, F_OK ) == 0 && i < 10) {
-
- tmpnam(tmp);
- tmp_cpy = (char *) calloc((strlen(tmp)), sizeof(char));
- strcpy(tmp_cpy, tmp);
-
- tfname = basename(tmp_cpy);
-
- res = (char *) calloc( (strlen(path) + 2 + strlen(tfname) + 1 + strlen(fname) + 1), sizeof(char));
-
- strcat(res, path);
- strcat(res, "/.");
- strcat(res, tfname);
- strcat(res, "~");
- strcat(res, fname);
-
- i++;
- }
-
- if (access( res, F_OK ) == 0) {
- return NULL;
- }
-
- return res;
-
-}
-#endif
-#endif
-
static char *process_path(const char *path, bool resolve_symlinks)
{
if (path == NULL) { /* possible? */
@@ -756,6 +691,9 @@
cfg->entry_timeout = 0;
cfg->attr_timeout = 0;
cfg->negative_timeout = 0;
+#ifdef __linux__
+ cfg->direct_io = settings.direct_io;
+#endif
#endif
assert(settings.permchain != NULL);
@@ -1349,6 +1287,9 @@
if (!settings.forward_odirect) {
flags &= ~O_DIRECT;
}
+#ifndef HAVE_FUSE_3 // With FUSE 3, we set this in bindfs_init
+ fi->direct_io = settings.direct_io;
+#endif
#endif
fd = open(real_path, flags);
@@ -1754,8 +1695,10 @@
" -M --mirror-only=... Like --mirror but disallow access for\n"
" all other users.\n"
" --map=user1/user2:... Let user2 see files of user1 as his own.\n"
- " --map-passwd=<passwdfile> Load uid mapping from <passwdfile>.\n"
- " --map-group=<groupfile> Load gid mapping from <groupfile>.\n"
+ " --map-passwd=... Load uid mapping from passwd-like file.\n"
+ " --map-group=... Load gid mapping from group-like file.\n"
+ " --map-passwd-rev=... Load reversed uid mapping from passwd-like file.\n"
+ " --map-group-rev=... Load reversed gid mapping from group-like file.\n"
" --uid-offset=... Set file uid = uid + offset.\n"
" --gid-offset=... Set file gid = gid + offset.\n"
"\n"
@@ -1813,7 +1756,7 @@
" --block-devices-as-files Show block devices as regular files.\n"
" --multithreaded Enable multithreaded mode. See man page\n"
" for security issue with current implementation.\n"
- " --forward-odirect=... Forward O_DIRECT (it's cleared by default).\n"
+ " --forward-odirect=... Forward O_DIRECT (it's cleared by default).\n"
"\n"
"FUSE options:\n"
" -o opt[,opt,...] Mount options.\n"
@@ -1857,7 +1800,9 @@
OPTKEY_ENABLE_IOCTL,
OPTKEY_HIDE_HARD_LINKS,
OPTKEY_RESOLVE_SYMLINKS,
- OPTKEY_BLOCK_DEVICES_AS_FILES
+ OPTKEY_BLOCK_DEVICES_AS_FILES,
+ OPTKEY_DIRECT_IO,
+ OPTKEY_NO_DIRECT_IO
};
static int process_option(void *data, const char *arg, int key,
@@ -1965,7 +1910,14 @@
case OPTKEY_BLOCK_DEVICES_AS_FILES:
settings.block_devices_as_files = 1;
return 0;
-
+#ifdef __linux__
+ case OPTKEY_DIRECT_IO:
+ settings.direct_io = true;
+ return 0;
+ case OPTKEY_NO_DIRECT_IO:
+ settings.direct_io = false;
+ return 0;
+#endif
case OPTKEY_NONOPTION:
if (!settings.mntsrc) {
if (strncmp(arg, "/proc/", strlen("/proc/")) == 0) {
@@ -2380,6 +2332,8 @@
char *map;
char *map_passwd;
char *map_group;
+ char *map_passwd_rev;
+ char *map_group_rev;
char *read_rate;
char *write_rate;
char *create_for_user;
@@ -2424,6 +2378,8 @@
OPT_OFFSET2("--map=%s", "map=%s", map, -1),
OPT_OFFSET2("--map-passwd=%s", "map-passwd=%s", map_passwd, -1),
OPT_OFFSET2("--map-group=%s", "map-group=%s", map_group, -1),
+ OPT_OFFSET2("--map-passwd-rev=%s", "map-passwd-rev=%s", map_passwd_rev, -1),
+ OPT_OFFSET2("--map-group-rev=%s", "map-group-rev=%s", map_group_rev, -1),
OPT_OFFSET3("-n", "--no-allow-other", "no-allow-other", no_allow_other, -1),
OPT_OFFSET2("--read-rate=%s", "read-rate=%s", read_rate, -1),
@@ -2455,6 +2411,10 @@
OPT2("--delete-deny", "delete-deny", OPTKEY_DELETE_DENY),
OPT2("--rename-deny", "rename-deny", OPTKEY_RENAME_DENY),
+#ifdef __linux__
+ OPT2("--direct-io", "direct-io", OPTKEY_DIRECT_IO),
+ OPT2("--no-direct-io", "no-direct-io", OPTKEY_NO_DIRECT_IO),
+#endif
OPT2("--hide-hard-links", "hide-hard-links", OPTKEY_HIDE_HARD_LINKS),
OPT2("--resolve-symlinks", "resolve-symlinks", OPTKEY_RESOLVE_SYMLINKS),
@@ -2522,6 +2482,7 @@
#ifdef __linux__
settings.forward_odirect = 0;
settings.odirect_alignment = 0;
+ settings.direct_io = false;
#endif
atexit(&atexit_func);
@@ -2600,6 +2561,17 @@
}
}
+ if (od.map_passwd_rev) {
+ if (getuid() != 0) {
+ fprintf(stderr, "Error: You need to be root to use --map-passwd-rev !\n");
+ return 1;
+ }
+ if (!parse_map_file(settings.usermap_reverse, settings.usermap, od.map_passwd_rev, 0)) {
+ /* parse_map_file printed an error */
+ return 1;
+ }
+ }
+
/* Parse group */
if (od.map_group) {
if (getuid() != 0) {
@@ -2612,6 +2584,16 @@
}
}
+ if (od.map_group_rev) {
+ if (getuid() != 0) {
+ fprintf(stderr, "Error: You need to be root to use --map-group-rev !\n");
+ return 1;
+ }
+ if (!parse_map_file(settings.usermap_reverse, settings.usermap, od.map_group_rev, 1)) {
+ /* parse_map_file printed an error */
+ return 1;
+ }
+ }
/* Parse usermap (may overwrite values from --map-passwd and --map-group) */
if (od.map) {
if (getuid() != 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/test-all.sh new/bindfs-1.17.0/test-all.sh
--- old/bindfs-1.15.1/test-all.sh 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/test-all.sh 2022-07-12 20:31:10.000000000 +0200
@@ -10,4 +10,4 @@
sudo ./test_bindfs.rb --valgrind
else
echo "Valgrind not installed. Not running tests with Valgrind."
-end
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/tests/common.rb new/bindfs-1.17.0/tests/common.rb
--- old/bindfs-1.15.1/tests/common.rb 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/tests/common.rb 2022-07-12 20:31:10.000000000 +0200
@@ -108,15 +108,15 @@
mntdir = options[:mntdir_name]
begin
- Dir.mkdir TESTDIR_NAME
+ FileUtils.mkdir_p TESTDIR_NAME
rescue Exception => ex
fail!("ERROR creating testdir at #{TESTDIR_NAME}", ex)
end
begin
Dir.chdir TESTDIR_NAME
- Dir.mkdir srcdir
- Dir.mkdir mntdir
+ FileUtils.mkdir_p srcdir
+ FileUtils.mkdir_p mntdir
rescue Exception => ex
fail!("ERROR preparing testdir at #{TESTDIR_NAME}", ex)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/tests/odirect_write.c new/bindfs-1.17.0/tests/odirect_write.c
--- old/bindfs-1.15.1/tests/odirect_write.c 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/tests/odirect_write.c 2022-07-12 20:31:10.000000000 +0200
@@ -57,7 +57,7 @@
}
if (res != buf_size) {
// Too lazy to write a loop here unless it turns out to be necessary.
- fprintf(stderr, "Failed to write exactly %ld bytes", amt_read);
+ fprintf(stderr, "Failed to write exactly %lu bytes", (unsigned long)amt_read);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/tests/test_bindfs.rb new/bindfs-1.17.0/tests/test_bindfs.rb
--- old/bindfs-1.15.1/tests/test_bindfs.rb 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/tests/test_bindfs.rb 2022-07-12 20:31:10.000000000 +0200
@@ -415,6 +415,7 @@
passwd_file.flush
group_file.write("#{nobody_group}:x:789")
group_file.flush
+
root_testenv("--map-passwd=#{Shellwords.escape(passwd_file.path)} --map-group=#{Shellwords.escape(group_file.path)}") do
touch('src/file1')
chown(123, 789, 'src/file1')
@@ -426,6 +427,19 @@
assert { File.stat('src/file2').uid == 123 }
assert { File.stat('src/file2').gid == 789 }
end
+
+ # Pull Request 113
+ root_testenv("--map-passwd-rev=#{Shellwords.escape(passwd_file.path)} --map-group-rev=#{Shellwords.escape(group_file.path)}") do
+ touch('src/file1')
+ chown(nobody_uid, nobody_gid, 'src/file1')
+ assert { File.stat('mnt/file1').uid == 123 }
+ assert { File.stat('mnt/file1').gid == 789 }
+
+ touch('src/file2')
+ chown(123, 789, 'mnt/file2')
+ assert { File.stat('src/file2').uid == nobody_uid }
+ assert { File.stat('src/file2').gid == nobody_gid }
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/vagrant/centos8/Vagrantfile new/bindfs-1.17.0/vagrant/centos8/Vagrantfile
--- old/bindfs-1.15.1/vagrant/centos8/Vagrantfile 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/vagrant/centos8/Vagrantfile 2022-07-12 20:31:10.000000000 +0200
@@ -16,6 +16,11 @@
end
config.vm.provision "shell", inline: <<-SHELL
+ # CentOS 8 is EOL
+ # https://www.cyberithub.com/solved-failed-to-download-metadata-for-repo-appst...
+ sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
+ sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
+
yum install -y fuse fuse-devel gcc make pkg-config ruby valgrind
echo user_allow_other > /etc/fuse.conf
SHELL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/vagrant/debian11/Vagrantfile new/bindfs-1.17.0/vagrant/debian11/Vagrantfile
--- old/bindfs-1.15.1/vagrant/debian11/Vagrantfile 1970-01-01 01:00:00.000000000 +0100
+++ new/bindfs-1.17.0/vagrant/debian11/Vagrantfile 2022-07-12 20:31:10.000000000 +0200
@@ -0,0 +1,25 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+ config.vm.box = "roboxes/debian11"
+
+ config.vm.synced_folder ".", "/vagrant", disabled: true
+ config.vm.synced_folder "../../", "/bindfs",
+ type: "rsync",
+ rsync__auto: false,
+ rsync__exclude: ["vagrant"],
+ rsync__args: ["-av", "--delete-after"]
+
+ config.vm.provider "virtualbox" do |v|
+ v.name = "bindfs-debian11"
+ end
+
+ config.vm.provision "shell", reboot: true, inline: <<-SHELL
+ export DEBIAN_FRONTEND='noninteractive'
+ apt-get update
+ apt-get install -y fuse3 libfuse3-dev build-essential pkg-config ruby valgrind
+ apt-get clean
+ echo user_allow_other > /etc/fuse.conf
+ SHELL
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/bindfs-1.15.1/vagrant/trusty64/Vagrantfile new/bindfs-1.17.0/vagrant/trusty64/Vagrantfile
--- old/bindfs-1.15.1/vagrant/trusty64/Vagrantfile 2021-02-15 04:35:51.000000000 +0100
+++ new/bindfs-1.17.0/vagrant/trusty64/Vagrantfile 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant.configure("2") do |config|
- config.vm.box = "ubuntu/trusty64"
-
- config.vm.synced_folder ".", "/vagrant", disabled: true
- config.vm.synced_folder "../../", "/bindfs",
- type: "rsync",
- rsync__auto: false,
- rsync__exclude: ["vagrant"],
- rsync__args: ["-av", "--delete-after"]
-
- config.vm.provider "virtualbox" do |v|
- v.name = "bindfs-trusty64"
- end
-
- config.vm.provision "shell", inline: <<-SHELL
- apt-get update
- apt-get install -y fuse libfuse-dev build-essential pkg-config ruby1.9 valgrind
- apt-get clean
- adduser vagrant fuse
- echo user_allow_other > /etc/fuse.conf
- SHELL
-end