Signed-off-by: shadichy <shadichy@blisslabs.org>
This commit is contained in:
shadichy 2025-10-23 02:01:48 +07:00
commit 36ebbd0983
No known key found for this signature in database
GPG key ID: EB6C21CD35431C3E
8 changed files with 259 additions and 0 deletions

36
.SRCINFO Normal file
View file

@ -0,0 +1,36 @@
pkgbase = ntfsplus-dkms-git
pkgdesc = A new NTFS driver for Linux promised to be better than NTFS3. These patches are directly taken from the maintainer's mailing list posts. Backported to 6.17.
pkgver = 2025.10.20.r20.c8a1f11f2
pkgrel = 1
epoch = 1
url = https://lore.kernel.org/all/20251020021227.5965-6-linkinjeon@kernel.org
arch = any
license = GPL-2.0-only
makedepends = git
provides = ntfsplus
provides = NTFSPLUS-MODULE
conflicts = ntfsplus
options = !strip
options = !emptydirs
source = linux::shallowclone+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
source = 00-05.mbox.gz::https://lore.kernel.org/all/20251020020749.5522-1-linkinjeon@kernel.org/t.mbox.gz
source = 06-11.mbox.gz::https://lore.kernel.org/all/20251020021227.5965-6-linkinjeon@kernel.org/t.mbox.gz
source = 0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch
source = 0001-fs-ntfsplus-Makefile-DKMS-patch.patch
source = dkms.conf
source = 90-udev-prefer-ntfsplus.rules
sha256sums = SKIP
sha256sums = 00415c42fa5809da14b84a2ecc6623e3e859fa803dfa7bdfa407a83d21d9b744
sha256sums = bede30ed663dada47c946f74a314b8e25817c4cd8b6c39e0cd5810bbd1cddca2
sha256sums = 6e65520477bf80c9ac76cfc49e2e65eba0d63f1c846d1876c1874bdf2ac24a6c
sha256sums = e217fa145f507b1e07e228e746528554f705f44fd5744f293b302b29df764b96
sha256sums = ed9db8ec0caa09c977529c7ae89b808ee8c238331ec0fdf873525c115fcdfb7c
sha256sums = e3866cac3d71da15740159c89b233d4d1f61981dbf737d4e3bc9a4c56bfa24be
pkgname = ntfsplus-dkms-git
pkgdesc = DKMS module for ntfsplus (A new NTFS driver for Linux promised to be better than NTFS3.)
depends = dkms
pkgname = ntfsplus-udev
pkgdesc = udev rules for ntfsplus
depends = udev

17
.gitignore vendored Normal file
View file

@ -0,0 +1,17 @@
# Sources
linux.part/
linux/
*.gz
# Download agent
DLAGENTS
# Build directories
src/
pkg/
# Build artifacts
*.pkg.tar*
# Editor
.vscode/

View file

@ -0,0 +1,32 @@
From 06fb2343f2c0e4540b60a0e5ed84d6754d877b46 Mon Sep 17 00:00:00 2001
From: shadichy <shadichy@blisslabs.org>
Date: Thu, 23 Oct 2025 00:04:34 +0700
Subject: [PATCH] fs/ntfsplus/Makefile: DKMS patch
---
fs/ntfsplus/Makefile | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/ntfsplus/Makefile b/fs/ntfsplus/Makefile
index 1e7e830db..84f208ce1 100644
--- a/fs/ntfsplus/Makefile
+++ b/fs/ntfsplus/Makefile
@@ -16,3 +16,15 @@ ntfsplus-y := aops.o attrib.o collate.o misc.o dir.o file.o index.o inode.o \
ntfs_iomap.o
ccflags-$(CONFIG_NTFSPLUS_DEBUG) += -DDEBUG
+
+ccflags-$(CONFIG_NTFSPLUS_FS_POSIX_ACL) += -DCONFIG_NTFSPLUS_FS_POSIX_ACL
+
+KERNEL_SRC ?= /lib/modules/$(KVERSION)/build
+
+ccflags-y += -I$(PWD)/include
+
+all:
+ make -C $(KERNEL_SRC) M=$(PWD) modules
+
+clean:
+ make -C $(KERNEL_SRC) M=$(PWD) clean
--
2.51.0

View file

@ -0,0 +1,30 @@
From d2ba1de6dfcda1ce56b700b1b6853231860c448b Mon Sep 17 00:00:00 2001
From: shadichy <shadichy@blisslabs.org>
Date: Thu, 23 Oct 2025 01:19:10 +0700
Subject: [PATCH] fs/ntfsplus/inode.c: Resolve import for inode_generic_drop
(temporarily) for kernels older than 6.18
---
fs/ntfsplus/inode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/ntfsplus/inode.c b/fs/ntfsplus/inode.c
index 2b8e0d67c..28925d204 100644
--- a/fs/ntfsplus/inode.c
+++ b/fs/ntfsplus/inode.c
@@ -9,6 +9,12 @@
#include <linux/writeback.h>
#include <linux/seq_file.h>
+// Replace inode_generic_drop with generic_drop_inode
+// for backward compatibility with pre 6.18 kernels
+#ifndef inode_generic_drop
+#define inode_generic_drop generic_drop_inode
+#endif
+
#include "lcnalloc.h"
#include "misc.h"
#include "ntfs.h"
--
2.51.0

View file

@ -0,0 +1 @@
SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfsplus"

133
PKGBUILD Normal file
View file

@ -0,0 +1,133 @@
# shellcheck shell=bash
# AUR Maintainer: Shadichy <shadichy@blisslabs.org>
pkgbase=ntfsplus-dkms-git
pkgname=("$pkgbase" "ntfsplus-udev")
pkgver=2025.10.20.r20.c8a1f11f2
pkgrel=1
epoch=1
pkgdesc="A new NTFS driver for Linux promised to be better than NTFS3. These patches are directly taken from the maintainer's mailing list posts. Backported to 6.17."
arch=('any')
url="https://lore.kernel.org/all/20251020021227.5965-6-linkinjeon@kernel.org"
license=('GPL-2.0-only')
makedepends=('git')
provides=('ntfsplus' 'NTFSPLUS-MODULE')
conflicts=('ntfsplus')
options=('!strip' '!emptydirs')
# Using custom download agent to shallow clone the repo
cat <<'EOF' >DLAGENTS
#!/bin/sh
ORIGIN=${1#shallowclone+}
DEST=${2}
REAL_DEST=${DEST%.part}
# Verify if destination already exists and is a valid git repository with the correct remote URL
verify_dest() {
local dest=$1 current_url
if [ -d "${dest}/.git" ]; then
cd "${dest}"
current_url=$(git config --get remote.origin.url)
if [ "${current_url}" = "${ORIGIN}" ]; then
git fetch --depth 1
git reset --hard FETCH_HEAD
exit 0
fi
fi
}
verify_dest "${DEST}"
verify_dest "${REAL_DEST}"
# If not, perform a fresh shallow clone
rm -rf "${DEST}"
git clone --depth 1 --branch master --single-branch --no-tags "${ORIGIN}" "${DEST}"
echo ${REAL_DEST}
EOF
chmod +x DLAGENTS
export DLAGENTS="shallowclone::$(realpath "./DLAGENTS") %u %o"
source=(
'linux::shallowclone+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
'00-05.mbox.gz::https://lore.kernel.org/all/20251020020749.5522-1-linkinjeon@kernel.org/t.mbox.gz'
'06-11.mbox.gz::https://lore.kernel.org/all/20251020021227.5965-6-linkinjeon@kernel.org/t.mbox.gz'
'0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch'
'0001-fs-ntfsplus-Makefile-DKMS-patch.patch'
'dkms.conf'
'90-udev-prefer-ntfsplus.rules'
)
sha256sums=(
SKIP
00415c42fa5809da14b84a2ecc6623e3e859fa803dfa7bdfa407a83d21d9b744
bede30ed663dada47c946f74a314b8e25817c4cd8b6c39e0cd5810bbd1cddca2
6e65520477bf80c9ac76cfc49e2e65eba0d63f1c846d1876c1874bdf2ac24a6c
e217fa145f507b1e07e228e746528554f705f44fd5744f293b302b29df764b96
ed9db8ec0caa09c977529c7ae89b808ee8c238331ec0fdf873525c115fcdfb7c
e3866cac3d71da15740159c89b233d4d1f61981dbf737d4e3bc9a4c56bfa24be
)
_mailbox_last_date=
prepare() {
if [ ! -e "$srcdir/linux" ]; then
ln -s ../linux "$srcdir/linux"
fi
cd "$srcdir/linux"
# Apply the ntfsplus patches from the mailing list
git am --empty=keep "$srcdir/00-05.mbox" "$srcdir/06-11.mbox"
_mailbox_last_date=$(git log -1 --format='%ad' --date=iso-strict)
# Apply the inode.c import fix patch
git apply "$srcdir/0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch"
# Apply the dkms Makefile patch
patch -p1 <"$srcdir/0001-fs-ntfsplus-Makefile-DKMS-patch.patch"
}
pkgver() {
cd "$srcdir/linux"
# Version format: YYYY.MM.DD.r<commitcount>.<commitsha>
# with date from _mailbox_last_date
local commit_count commit_sha
commit_count=$(git rev-list --count ORIG_HEAD..HEAD)
commit_sha=$(git rev-parse --short HEAD)
date +'%Y.%m.%d.r'"${commit_count}"'.'"${commit_sha}" -d "$_mailbox_last_date"
}
build() {
cd "$srcdir"
sed -i "s/@PKGVER@/${pkgver}/" dkms.conf
}
package_ntfsplus-dkms-git() {
pkgdesc="DKMS module for ntfsplus (A new NTFS driver for Linux promised to be better than NTFS3.)"
depends=('dkms')
opdepends+=(
'ntfsprogs-plus: Recommended NTFS utilities'
'ntfsplus-udev: udev rules for ntfsplus'
)
cd "$srcdir"
local dest="$pkgdir/usr/src/ntfsplus-${pkgver}"
install -Dm644 "$(readlink -f dkms.conf)" "$dest/dkms.conf"
cp -rpT "$srcdir/linux/fs/ntfsplus" "$dest"
install -Dm644 "$srcdir/linux/include/uapi/linux/ntfs.h" "$dest/include/uapi/linux/ntfs.h"
}
package_ntfsplus-udev() {
pkgdesc="udev rules for ntfsplus"
depends=('udev')
cd "$srcdir"
local rule='90-udev-prefer-ntfsplus.rules'
install -Dm644 "$(readlink -f "$rule")" "$pkgdir/usr/lib/udev/rules.d/$rule"
}

9
dkms.conf Normal file
View file

@ -0,0 +1,9 @@
PACKAGE_NAME="ntfsplus"
PACKAGE_VERSION="@PKGVER@"
BUILT_MODULE_NAME[0]="ntfsplus"
DEST_MODULE_LOCATION[0]="/extra"
AUTOINSTALL="yes"
MAKE[0]="KVERSION=${kernelver} CONFIG_NTFSPLUS_FS=m CONFIG_NTFSPLUS_FS_POSIX_ACL=y make KDIR=${kernel_source_dir}"

1
linux.src Submodule

@ -0,0 +1 @@
Subproject commit dd72c8fcf6d35de5d6d976f20dc1ae84ce7af08b