- From d02077fd60d22f27dc211ee0bbf6c50ae3a66af1 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 8 Apr 2025 15:16:11 +0200
- Subject: [PATCH 1/6] tests: Require autoconf+automake for building gcc+bash
- Require Cygwin/MSYS2 autoconf+automake packages for building gcc+bash
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/manual_testing.txt | 6 +++++-
- tests/nfsbuildtest/nfsbuildtest.ksh93 | 4 ++++
- 2 files changed, 9 insertions(+), 1 deletion(-)
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 8f0fbdd..20106b0 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -1,5 +1,5 @@
- #
- -# ms-nfs41-client manual testing sequence, 2025-03-20
- +# ms-nfs41-client manual testing sequence, 2025-04-08
- #
- # Draft version, needs to be turned into automated tests
- # if possible
- @@ -18,6 +18,8 @@
- # gdb
- # make
- # bmake
- +# autoconf
- +# automake
- # netpbm
- # attr
- # git
- @@ -54,6 +56,8 @@
- # (install with $ pacman -S --noconfirm ${name_of_package} # (use space to separate package names)
- # ---- snip ----
- # base-devel
- +# autoconf
- +# automake
- # gcc
- # clang
- # sed
- diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
- index f211850..d4e7d7a 100644
- --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
- +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
- @@ -607,6 +607,8 @@ function main
- is_toolkit_pkg_installed itp 'libmpc-devel' || (( errc++ ))
- is_toolkit_pkg_installed itp 'libintl-devel' || (( errc++ ))
- is_toolkit_pkg_installed itp 'libisl-devel' || (( errc++ ))
- + is_toolkit_pkg_installed itp 'autoconf' || (( errc++ ))
- + is_toolkit_pkg_installed itp 'automake' || (( errc++ ))
- is_toolkit_pkg_installed itp 'gettext' || (( errc++ ))
- is_toolkit_pkg_installed itp 'gettext-devel' || (( errc++ ))
- (( errc > 0 )) && return 1
- @@ -626,6 +628,8 @@ function main
- is_toolkit_pkg_installed itp 'git' || (( errc++ ))
- is_toolkit_pkg_installed itp 'gcc-core' || (( errc++ ))
- is_toolkit_pkg_installed itp 'gcc-g++' || (( errc++ ))
- + is_toolkit_pkg_installed itp 'autoconf' || (( errc++ ))
- + is_toolkit_pkg_installed itp 'automake' || (( errc++ ))
- if is_cygwin ; then
- if (( (cygwin_vers.major*1000+cygwin_vers.minor) >= 3005 )) ; then
- print '# bash_build: Using Cygwin >= 3.5 config'
- --
- 2.45.1
- From 568b25a8d479bf5694642dd8c863ec34a8e75475 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 8 Apr 2025 15:23:49 +0200
- Subject: [PATCH 2/6] cygwin,tests: Update MSYS2 installation info
- Update MSYS2 installation info.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.bintarball.txt | 10 ++++++----
- tests/manual_testing.txt | 8 ++++----
- 2 files changed, 10 insertions(+), 8 deletions(-)
- diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
- index bfa378d..21b6e38 100644
- --- a/cygwin/README.bintarball.txt
- +++ b/cygwin/README.bintarball.txt
- @@ -199,6 +199,8 @@ NFSv4.2/NFSv4.1 filesystem driver for Windows 10/11&Windows Server 2019+2022
- emacs
- gdb
- make
- + autoconf
- + automake
- gettext
- gettext-devel
- git
- @@ -264,15 +266,15 @@ setup-x86.exe --allow-unsupported-windows -q --no-verify --site "http://ctm.crou
- # 1. Download&&install from Cygwin
- # ---- snip ----
- mkdir -p download && cd download
- -wget 'https://github.com/msys2/msys2-installer/releases/download/2024-11-16/msys2-x86_64-20241116.exe'
- -chmod a+x msys2-x86_64-20241116.exe
- -./msys2-x86_64-20241116 --default-answer --root 'C:\msys64' install
- +wget 'https://github.com/msys2/msys2-installer/releases/download/2025-02-21/msys2-x86_64-20250221.exe'
- +chmod a+x 'msys2-x86_64-20250221'
- +./msys2-x86_64-20250221 --default-answer --root 'C:\msys64' install
- # ---- snip ----
- # 2. Install extra packages:
- # Start MSYS2 UCRT mintty and execute this:
- # ---- snip ----
- -pacman -S --noconfirm base-devel gcc clang sed time coreutils util-linux grep sed emacs gdb make gettext gettext-devel git subversion flex bison unzip pax tar libiconv-devel ncurses-devel gmp-devel mpfr-devel mpc-devel isl-devel procps-ng libiconv-devel
- +pacman -S --noconfirm base-devel gcc clang sed time coreutils util-linux grep sed emacs gdb make autoconf automake gettext gettext-devel git subversion flex bison unzip pax tar libiconv-devel ncurses-devel gmp-devel mpfr-devel mpc-devel isl-devel procps-ng libiconv-devel
- # ---- snip ----
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 20106b0..0141a80 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -49,11 +49,11 @@
- # - MSYS2 environment:
- # - Install the env with:
- # $ mkdir -p download && cd download
- -# $ wget 'https://github.com/msys2/msys2-installer/releases/download/2024-11-16/msys2-x86_64-20241116.exe'
- -# $ chmod a+x msys2-x86_64-20241116.exe
- -# $ ./msys2-x86_64-20241116 --default-answer --root 'C:\msys64' install
- +# $ wget 'https://github.com/msys2/msys2-installer/releases/download/2025-02-21/msys2-x86_64-20250221.exe'
- +# $ chmod a+x 'msys2-x86_64-20250221'
- +# $ ./msys2-x86_64-20250221 --default-answer --root 'C:\msys64' install
- # - The following MSYS2 packages should be installed for running the tests with MSYS2:
- -# (install with $ pacman -S --noconfirm ${name_of_package} # (use space to separate package names)
- +# (install with $ pacman -S --noconfirm ${name_of_package} # (use <space> to separate package names)
- # ---- snip ----
- # base-devel
- # autoconf
- --
- 2.45.1
- From 93f77853393f3d6d729450abd5c2e7c1bca2fe74 Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Tue, 8 Apr 2025 15:33:03 +0200
- Subject: [PATCH 3/6] tests: winfsinfo fileremoteprotocolinfo should prefix hex
- values with 0x
- winfsinfo fileremoteprotocolinfo should prefix hex values with 0x
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/winfsinfo1/winfsinfo.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
- diff --git a/tests/winfsinfo1/winfsinfo.c b/tests/winfsinfo1/winfsinfo.c
- index 10616ed..1d2989a 100644
- --- a/tests/winfsinfo1/winfsinfo.c
- +++ b/tests/winfsinfo1/winfsinfo.c
- @@ -943,7 +943,7 @@ bool get_file_remote_protocol_info(const char *progname, const char *filename)
- (void)printf("\tcompound GenericReserved=(\n");
- (void)printf("\t\ttypeset -a Reserved=(\n");
- for (i=0 ; i < 8 ; i++) {
- - (void)printf("\t\t\t[%d]=%lx\n",
- + (void)printf("\t\t\t[%d]=0x%lx\n",
- i,
- (long)frpi.GenericReserved.Reserved[i]);
- }
- @@ -955,7 +955,7 @@ bool get_file_remote_protocol_info(const char *progname, const char *filename)
- (void)printf("\tcompound ProtocolSpecificReserved=(\n");
- (void)printf("\t\ttypeset -a Reserved=(\n");
- for (i=0 ; i < 16 ; i++) {
- - (void)printf("\t\t\t[%d]=%lx\n",
- + (void)printf("\t\t\t[%d]=0x%lx\n",
- i,
- (long)frpi.ProtocolSpecificReserved.Reserved[i]);
- }
- @@ -966,7 +966,7 @@ bool get_file_remote_protocol_info(const char *progname, const char *filename)
- (void)printf("\tcompound ProtocolSpecific=(\n");
- (void)printf("\t\ttypeset -a Reserved=(\n");
- for (i=0 ; i < 16 ; i++) {
- - (void)printf("\t\t\t[%d]=%lx\n",
- + (void)printf("\t\t\t[%d]=0x%lx\n",
- i,
- (long)frpi.ProtocolSpecific.Reserved[i]);
- }
- --
- 2.45.1
- From f5d19d9fc25acaccdcc77fdfa164024db77ceb90 Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Tue, 8 Apr 2025 15:37:01 +0200
- Subject: [PATCH 4/6] dll: nfs41_np should prefix hex values in debug messages
- with 0x
- nfs41_np should prefix hex values in debug messages with 0x
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- dll/nfs41_np.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/dll/nfs41_np.c b/dll/nfs41_np.c
- index 0943164..1db6d54 100644
- --- a/dll/nfs41_np.c
- +++ b/dll/nfs41_np.c
- @@ -850,7 +850,7 @@ NPCancelConnection(
- &CopyBytes);
- if (Status != WN_SUCCESS) {
- - DbgP((L"SendToMiniRdr returned Status %lx\n",
- + DbgP((L"SendToMiniRdr returned Status 0x%lx\n",
- Status));
- break;
- }
- @@ -886,7 +886,7 @@ NPCancelConnection(
- &CopyBytes);
- if (Status != WN_SUCCESS) {
- - DbgP((L"SendToMiniRdr returned Status %lx\n",
- + DbgP((L"SendToMiniRdr returned Status 0x%lx\n",
- Status));
- break;
- }
- --
- 2.45.1
- From c11917644df3ad0041367b7c6e034261b2f5c79a Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 8 Apr 2025 16:03:26 +0200
- Subject: [PATCH 5/6] daemon: Remove |FILE_SUPPORTS_REMOTE_STORAGE| from volume
- flags
- Remove Remove |FILE_SUPPORTS_REMOTE_STORAGE| from volume flags,
- this is for HSM.
- Fixes: https://cygwin.com/pipermail/cygwin/2025-April/257885.html
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/nfs41_superblock.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
- diff --git a/daemon/nfs41_superblock.c b/daemon/nfs41_superblock.c
- index b73cf45..db75c09 100644
- --- a/daemon/nfs41_superblock.c
- +++ b/daemon/nfs41_superblock.c
- @@ -170,9 +170,17 @@ void nfs41_superblock_fs_attributes(
- IN const nfs41_superblock *superblock,
- OUT PFILE_FS_ATTRIBUTE_INFORMATION FsAttrs)
- {
- + /*
- + * |FileSystemAttributes| - general filesystem attributes
- + *
- + * Notes:
- + * - |FILE_SUPPORTS_REMOTE_STORAGE| can only be set if we are on
- + * HSM storage (tape worm etc.), see
- + * https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/d4bc551b-7aaf-4b4f-ba0e-3a75e7c528f0#Appendix_A_167
- + */
- +
- FsAttrs->FileSystemAttributes = 0;
- FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_SPARSE_FILES;
- - FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_REMOTE_STORAGE;
- /* NFSv4 protocol uses Unicode by default */
- FsAttrs->FileSystemAttributes |= FILE_UNICODE_ON_DISK;
- --
- 2.45.1
- From a30198628c3a443f44a5f30d3b20bcf3bf79ec2e Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 8 Apr 2025 16:44:44 +0200
- Subject: [PATCH 6/6] daemon: Increase volume |BYTES_PER_SECTOR| to |1024|
- Increase volume |BYTES_PER_SECTOR| from |512| to |1024|.
- NFSv4 has no way to query the block size for a filesystem,
- because each file can technically have it's own block size or a
- variable block size.
- Since 512bytes has become increasily rare we just use 1kb.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/volume.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/volume.c b/daemon/volume.c
- index f18e902..c26d062 100644
- --- a/daemon/volume.c
- +++ b/daemon/volume.c
- @@ -34,7 +34,7 @@
- /* windows volume queries want size in 'units', so we have to
- * convert the nfs space_* attributes from bytes to units */
- #define SECTORS_PER_UNIT 8
- -#define BYTES_PER_SECTOR 512
- +#define BYTES_PER_SECTOR 1024
- #define BYTES_PER_UNIT (SECTORS_PER_UNIT * BYTES_PER_SECTOR)
- #define TO_UNITS(bytes) (bytes / BYTES_PER_UNIT)
- --
- 2.45.1
msnfs41client: Patches for MSYS2/Cygwin instructions, increasing BYTES_PER_SECTOR, tests+misc, 2025-04-08
Posted by Anonymous on Tue 8th Apr 2025 17:49
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.