summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Mulder2019-11-23 17:59:56 +0100
committerWillem Mulder2019-11-23 17:59:56 +0100
commit5b1022381f4939212bacd08fc1a071cb8b773497 (patch)
treea4bfa7aea796ec8f7bb72b821197e9df3857bfac
parent1d892b1642d65b855790d275151e37f6e6b87c20 (diff)
downloadaur-5b1022381f4939212bacd08fc1a071cb8b773497.tar.gz
Update to version 1.9
Upstream moved the default cache directory from /tmp to /var/cache, but this causes permission issues (needs to be world-writable). The way upstream implemented this move also tries to add a user and group during `make install`, which does not work in packaging.
-rw-r--r--.SRCINFO8
-rw-r--r--.gitattributes1
-rw-r--r--PKGBUILD13
-rw-r--r--revert-move-to-var-cache.patch124
4 files changed, 140 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5bb26b7d999..871163bee0f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ffmpegfs
pkgdesc = FUSE-based transcoding filesystem from many formats to MP3 or MP4 including video transcoding
- pkgver = 1.8
+ pkgver = 1.9
pkgrel = 1
url = https://nschlia.github.io/ffmpegfs/
arch = x86_64
@@ -18,8 +18,10 @@ pkgbase = ffmpegfs
depends = ffmpeg
depends = sqlite
depends = libbluray
- source = https://github.com/nschlia/ffmpegfs/releases/download/v1.8/ffmpegfs-1.8.tar.gz
- sha384sums = 4bb98b28d6f21ef21c4c264498ef1428670e7e40cab76ff787d65c5ad108b3627c173680f538fe10d853ebb9c239323b
+ source = https://github.com/nschlia/ffmpegfs/releases/download/v1.9/ffmpegfs-1.9.tar.gz
+ source = revert-move-to-var-cache.patch
+ sha384sums = 188fb452d59359f94c689eb65de5b226c1affebeffeef37692595f187dcc306209f0b1658635741a6a372d19f9cd05ae
+ sha384sums = 359b739b93d314d9d5a132a359c04c121c15225f5383cbe9570b4f7b44aaa6685fa24fb281281258e0937fff7b9ee776
pkgname = ffmpegfs
diff --git a/.gitattributes b/.gitattributes
index 08c7cb3413a..519b36d7b96 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
.SRCINFO -whitespace
+*.patch -whitespace
diff --git a/PKGBUILD b/PKGBUILD
index 28948effbe7..96c823aeb3a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Willem Mulder <14mRh4X0r@gmail.com>
pkgname=ffmpegfs
-pkgver=1.8
+pkgver=1.9
pkgrel=1
pkgdesc="FUSE-based transcoding filesystem from many formats to MP3 or MP4 including video transcoding"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') # Not arch-specific, should work on all
@@ -8,8 +8,15 @@ url="https://nschlia.github.io/ffmpegfs/"
license=('GPL3' 'FDL1.3')
makedepends=('asciidoc' 'w3m' 'xxd')
depends=('fuse' 'ffmpeg' 'sqlite' 'libbluray')
-source=("https://github.com/nschlia/ffmpegfs/releases/download/v$pkgver/ffmpegfs-$pkgver.tar.gz")
-sha384sums=('4bb98b28d6f21ef21c4c264498ef1428670e7e40cab76ff787d65c5ad108b3627c173680f538fe10d853ebb9c239323b')
+source=("https://github.com/nschlia/ffmpegfs/releases/download/v$pkgver/ffmpegfs-$pkgver.tar.gz"
+ "revert-move-to-var-cache.patch")
+sha384sums=('188fb452d59359f94c689eb65de5b226c1affebeffeef37692595f187dcc306209f0b1658635741a6a372d19f9cd05ae'
+ '359b739b93d314d9d5a132a359c04c121c15225f5383cbe9570b4f7b44aaa6685fa24fb281281258e0937fff7b9ee776')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -p1 -i ../revert-move-to-var-cache.patch
+}
build() {
cd "$pkgname-$pkgver"
diff --git a/revert-move-to-var-cache.patch b/revert-move-to-var-cache.patch
new file mode 100644
index 00000000000..d27d366c208
--- /dev/null
+++ b/revert-move-to-var-cache.patch
@@ -0,0 +1,124 @@
+Index: ffmpegfs-1.9/Makefile.am
+===================================================================
+--- ffmpegfs-1.9.orig/Makefile.am
++++ ffmpegfs-1.9/Makefile.am
+@@ -4,10 +4,6 @@ export WARNINGS = -Wall -Wextra -Wconver
+ export AM_CFLAGS = -std=c11 $(INCLUDES) $(WARNINGS) $(OPTIMISATION) -D_GNU_SOURCE
+ export AM_CXXFLAGS = -std=c++11 $(INCLUDES) $(WARNINGS) $(OPTIMISATION) -D_GNU_SOURCE
+
+-export USERNAME=ffmpegfs
+-export USERGROUP=ffmpegfs
+-export CACHEDIR=/var/cache/ffmpegfs
+-
+ SUBDIRS = src test
+
+ dist_man_MANS = ffmpegfs.1
+@@ -104,43 +100,4 @@ clean-local: doxy-clean
+ # Really clean up everything
+ wipe-all: doxy-clean distclean
+ rm -Rf autom4te.cache configure config aclocal.m4 Makefile.in test/Makefile.in src/Makefile.in
+-
+-install-exec-hook:
+- @if getent passwd $(USERNAME) > /dev/null 2>&1; \
+- then \
+- echo "User $(USERNAME) already exists."; \
+- else \
+- echo "Creating user $(USERNAME)."; \
+- ls -l /etc/; \
+- useradd --system $(USERNAME); \
+- usermod -L $(USERNAME); \
+- fi
+-
+- @if [ -d "$(CACHEDIR)" ]; \
+- then \
+- echo "$(CACHEDIR) already exists."; \
+- else \
+- echo "Creating cache in $(CACHEDIR)."; \
+- mkdir $(CACHEDIR); \
+- if [ -d "/tmp/ffmpegfs" ]; \
+- then \
+- echo "Moving old cache from /tmp to $(CACHEDIR)."; \
+- mv /tmp/ffmpegfs/* $(CACHEDIR)/ || true; \
+- rmdir /tmp/ffmpegfs/; \
+- fi \
+- fi
+- @chown -R $(USERNAME):$(USERGROUP) $(CACHEDIR)
+- @chmod -R 777 $(CACHEDIR)
+-
+-uninstall-hook:
+- @if [ -d "$(CACHEDIR)" ]; \
+- then \
+- echo "Removing cache directory $(CACHEDIR)."; \
+- rm -Rf "$(CACHEDIR)"; \
+- fi
+-
+- @if getent passwd $(USERNAME) > /dev/null 2>&1; \
+- then \
+- echo "Removing user $(USERNAME)."; \
+- userdel $(USERNAME); \
+- fi
++
+Index: ffmpegfs-1.9/NEWS
+===================================================================
+--- ffmpegfs-1.9.orig/NEWS
++++ ffmpegfs-1.9/NEWS
+@@ -11,7 +11,6 @@ Important changes in 1.9 (2019-11-18)
+ * Feature: Added optional graphviz to configure, only required for Doxygen.
+ * Feature: Updated INSTALL.md with missing prerequisites. Rearranged paragraphs, mentioning building
+ from git first was confusing.
+-* Feature: Moved cache directory from rather unusual /tmp/ffmpegfs location to /var/cache/ffmpegfs.
+ * Bugfix: Fixed several warnings if compiled for 32 bit.
+ * Bugfix: Removed unused xmlint prerequisite from configure.
+ * Bugfix: Video and audio was out of sync on android devices.
+Index: ffmpegfs-1.9/ffmpegfs.1.txt
+===================================================================
+--- ffmpegfs-1.9.orig/ffmpegfs.1.txt
++++ ffmpegfs-1.9/ffmpegfs.1.txt
+@@ -228,7 +228,7 @@ Default: 0 (no minimum space)
+ *--cachepath*=DIR, *-o cachepath*=DIR::
+ Sets the disk cache directory to 'DIR'. Will be created if not existing. The user running ffmpegfs must have write access to the location.
+ +
+-Default: /var/cache/ffmpegfs
++Default: temp directory, e.g. /tmp
+
+ *--disable_cache*, -o *disable_cache*::
+ Disable the cache functionality.
+Index: ffmpegfs-1.9/src/ffmpegfs.cc
+===================================================================
+--- ffmpegfs-1.9.orig/src/ffmpegfs.cc
++++ ffmpegfs-1.9/src/ffmpegfs.cc
+@@ -113,7 +113,7 @@ FFMPEGFS_PARAMS::FFMPEGFS_PARAMS()
+ , m_prebuffer_size(100 /* KB */ * 1024) // default: 100 KB
+ , m_max_cache_size(0) // default: no limit
+ , m_min_diskspace(0) // default: no minimum
+- , m_cachepath("") // default: /var/cache/ffmpegfs
++ , m_cachepath("") // default: /tmp
+ , m_disable_cache(0) // default: enabled
+ , m_cache_maintenance((60*60)) // default: prune every 60 minutes
+ , m_prune_cache(0) // default: Do not prune cache immediately
+Index: ffmpegfs-1.9/src/ffmpegfs.h
+===================================================================
+--- ffmpegfs-1.9.orig/src/ffmpegfs.h
++++ ffmpegfs-1.9/src/ffmpegfs.h
+@@ -159,7 +159,7 @@ extern struct FFMPEGFS_PARAMS
+ size_t m_prebuffer_size; /**< @brief Number of bytes that will be decoded before it can be accessed */
+ size_t m_max_cache_size; /**< @brief Max. cache size in MB. When exceeded, oldest entries will be pruned */
+ size_t m_min_diskspace; /**< @brief Min. diskspace required for cache */
+- std::string m_cachepath; /**< @brief Disk cache path, defaults to /var/cache */
++ std::string m_cachepath; /**< @brief Disk cache path, defaults to /tmp */
+ int m_disable_cache; /**< @brief Disable cache */
+ time_t m_cache_maintenance; /**< @brief Prune timer interval */
+ int m_prune_cache; /**< @brief Prune cache immediately */
+Index: ffmpegfs-1.9/src/transcode.cc
+===================================================================
+--- ffmpegfs-1.9.orig/src/transcode.cc
++++ ffmpegfs-1.9/src/transcode.cc
+@@ -173,7 +173,7 @@ void transcoder_cache_path(std::string &
+ }
+ else
+ {
+- path = "/var/cache";
++ tempdir(path);
+ }
+
+ append_sep(&path);