Skip to content

Instantly share code, notes, and snippets.

@tinywrkb
Last active January 20, 2022 12:59
Show Gist options
  • Save tinywrkb/fe81d97c43d25431f88c2e47831c9524 to your computer and use it in GitHub Desktop.
Save tinywrkb/fe81d97c43d25431f88c2e47831c9524 to your computer and use it in GitHub Desktop.
ntfsprogs-ntfs3-Bump-to-2021.8.22-9.patch
From 4c89c31bd95e910e6cb28c232948345cf279cd8d Mon Sep 17 00:00:00 2001
From: tinywrkb <tinywrkb@gmail.com>
Date: Thu, 20 Jan 2022 14:28:07 +0200
Subject: [PATCH] Bump to 2021.8.22-9
---
PKGBUILD | 63 +++++++++++++++++++++-------------------------
mount.ntfs | 7 ++++++
udisks2-ntfs.rules | 1 +
3 files changed, 36 insertions(+), 35 deletions(-)
create mode 100644 mount.ntfs
create mode 100644 udisks2-ntfs.rules
diff --git a/PKGBUILD b/PKGBUILD
index aef9cb5..d717422 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,56 +1,49 @@
# Maintainer: okhsunrog <me@gornushko.com>
+# Contributor: tinywrkb <tinywrkb@gmail.com>
pkgname=ntfsprogs-ntfs3
-_pkgname=ntfs-3g_ntfsprogs
pkgver=2021.8.22
-pkgrel=8
+pkgrel=9
pkgdesc='NTFS filesystem utilities without NTFS-3G driver. For system with kernel >= 5.15'
-url='https://www.tuxera.com/community/open-source-ntfs-3g/'
+url='https://www.tuxera.com/company/open-source/'
arch=('x86_64')
license=('GPL2')
depends=('util-linux')
-source=("https://tuxera.com/opensource/${_pkgname}-${pkgver}.tgz")
-sha256sums=('55b883aa05d94b2ec746ef3966cb41e66bed6db99f22ddd41d1b8b94bb202efb')
-
+makedepends=('git')
conflicts=('ntfsprogs' 'ntfs-3g')
provides=('ntfsprogs' 'ntfs-3g')
-replaces=('ntfsprogs' 'ntfs-3g')
+replaces=('ntfsprogs')
+source=("ntfs-3g::git+https://github.com/tuxera/ntfs-3g#tag=${pkgver}"
+ 'mount.ntfs'
+ 'udisks2-ntfs.rules')
+sha256sums=('SKIP'
+ 'c468ffe0d9baac40aff77acaf2ef71baf9cd4a05355de639ad832839156eadf6'
+ '35cbd5290944b8ce9536dcee42321e5b418ff135f5b623bed6797760e1a1ad5b')
-prepare() {
- cd ${_pkgname}-${pkgver}
- sed 's|$(DESTDIR)/sbin|$(DESTDIR)/usr/bin|' -i {ntfsprogs,src}/Makefile.in
-}
build() {
- cd ${_pkgname}-${pkgver}
- ./configure \
- --prefix=/usr \
- --sbin=/usr/bin \
- --mandir=/usr/share/man \
- --disable-ldconfig \
- --disable-static \
- --enable-xattr-mappings \
- --enable-posix-acls \
- --enable-extras \
+ cd ntfs-3g
+
+ local configure_options=(
+ --prefix=/usr
+ --sbin=/usr/bin
+ --mandir=/usr/share/man
+ --disable-ldconfig
+ --disable-static
+ --enable-xattr-mappings
+ --enable-posix-acls
+ --enable-extras
--disable-ntfs-3g
+ )
+ autoreconf -vfi
+ ./configure "${configure_options[@]}"
make ntfsprogs
}
package() {
- cd ${_pkgname}-${pkgver}
- make ntfsprogs DESTDIR="${pkgdir}" rootbindir=/usr/bin rootsbindir=/usr/bin rootlibdir=/usr/lib install
+ make -C ntfs-3g ntfsprogs DESTDIR="${pkgdir}" install
rm "${pkgdir}"/usr/share/man/man8/ntfsfallocate.8 # uninstalled binary
- echo '#! /bin/sh
-
-# mount.ntfs : catch {,-tauto,-tntfs} NTFS mounts
-# ===============================================
-# (c) DLCB 2/11-2021
-
-exec mount -tntfs3 "$@"' > "${pkgdir}"/usr/bin/mount.ntfs
-chmod +x "${pkgdir}"/usr/bin/mount.ntfs
-mkdir -p "${pkgdir}"/etc/udev/rules.d/
-echo 'SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"' > "${pkgdir}"/etc/udev/rules.d/99-udisks2-ntfs.rules
-
+ install -Dm755 mount.ntfs -t "${pkgdir}"/usr/bin/
+ install -Dm644 udisks2-ntfs.rules "${pkgdir}"/usr/lib/udev/rules.d/99-udisks2-ntfs.rules
}
-
diff --git a/mount.ntfs b/mount.ntfs
new file mode 100644
index 0000000..c5db93c
--- /dev/null
+++ b/mount.ntfs
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+# mount.ntfs : catch {,-tauto,-tntfs} NTFS mounts
+# ===============================================
+# (c) DLCB 2/11-2021
+
+exec mount -tntfs3 "$@"
diff --git a/udisks2-ntfs.rules b/udisks2-ntfs.rules
new file mode 100644
index 0000000..c436d2f
--- /dev/null
+++ b/udisks2-ntfs.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"
--
2.34.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment