Update to mp3fs-1.1.1; tested on NetBSD 9.2 release

## Important changes in 1.1.1 (2021-03-08)

The only change in this release is a fix for an issue with filenames containing
square brackets.

## Important changes in 1.1 (2021-01-30)

This contains various bug fixes, mostly.

Fixes/improvements:

  - Recognize upper/mixed case in input filenames
  - Fix file size handling with and without cache
  - Various code simplifications/cleanup

New features:

  - Log lines now include thread ID and can be customized.

## Important changes in 1.0 (2020-05-24)

mp3fs 1.0 is finally here\!

Fixes/code improvements:

  - Many, many bug fixes (buffer overflows, memory leaks, and others)
  - Memory handling improvements (using RAII with C++ nearly everywhere)
  - Adopting C++11 and modernizing code
  - Static tests for code (e.g. clang-format, clang-tidy, IWYU)

New features:

  - Ogg Vorbis decoding support
  - MP3 VBR encoding support
  - Improved, much more customizable logging

Other:

  - Docs licensed under GPL 3+ (now entire codebase is distributable as GPL 3)
  - All docs switched to Markdown (including manpage, using pandoc)
  - Docker image now available

## Important changes in 0.91 (2014-05-14)

This contains mainly bug fixes.

Changes in this release:

  - Fixed a segfault caused by an overflow reading the list of available
    decoders.
  - A number of problems with the previous distribution tar are now fixed.
  - The output of `mp3fs --version` has been made more complete.

## Important changes in 0.9 (2014-04-06)

This is a major new release, and brings us very close to a 1.0 release\!

Changes in this release:

  - All transcoding code has been completely rewritten. Encoding and decoding
    have been abstracted out into base classes defining interfaces that can be
    implemented by different codec classes, with just a FLAC decoder and MP3
    encoder at the moment.
  - The build system has been modified as well to support this usage.
  - A number of small bugs or code inefficiencies have been fixed.

## Important changes in 0.32 (2012-06-18)

This release has a lot of bug fixes and some code cleanup.

Changes in this release:

  - The file size calculation should always be correct.
  - A crash affecting programs like scp that might try to access past the end
    of the file has been fixed.
  - Too many other little fixes were made to list here. See the ChangeLog for
    full details.

## Important changes in 0.31 (2011-12-04)

This is a minor update, with bug fixes and a new feature.

Changes in this release:

  - The ReplayGain support added earlier now can be configured through the
    command line.
  - Filename translation (from .flac to .mp3) is now fixed on filesystems such
    as XFS that do not populate dirent.d\_type.
  - A couple other minor bugs fixes and changes were made.

## Important changes in 0.30 (2010-12-01)

This is a major new release, and brings mp3fs much closer to an eventual 1.0
release.

Changes in this release:

  - Support for additional metadata tags has been added. (From Gregor Zurowski)
  - Documentation improvements: the help message is more useful, and a man page
    has been added.
  - Choosing bitrate is now done with a command-line or mount option, rather
    than the old comma syntax.
  - A new option to select LAME encoding quality is now available. (From Gregor
    Zurowski)
  - Debug output can be enabled at runtime.
  - Old external libraries included in distribution (StringIO, talloc) have
    been removed and replaced.
  - Numerous bug fixes have been made. (Some from Gregor Zurowski)
This commit is contained in:
pho 2021-12-01 14:35:15 +00:00
parent 1decbe0f70
commit 13ced228fd
9 changed files with 95 additions and 130 deletions

View file

@ -1,26 +1,24 @@
# $NetBSD: Makefile,v 1.7 2020/03/20 11:57:37 nia Exp $
# $NetBSD: Makefile,v 1.8 2021/12/01 14:35:15 pho Exp $
#
DISTNAME= mp3fs-0.13
DISTNAME= mp3fs-1.1.1
PKGNAME= fuse-${DISTNAME}
PKGREVISION= 1
CATEGORIES= filesystems
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mp3fs/}
MASTER_SITES= ${MASTER_SITE_GITHUB:=khenriks/}
GITHUB_PROJECT= mp3fs
GITHUB_RELEASE= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://mp3fs.sourceforge.net/
COMMENT= MP3 transcoding FUSE file system
LICENSE= gnu-gpl-v3
GNU_CONFIGURE= yes
USE_TOOLS= pkg-config
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++03
USE_TOOLS= pkg-config gmake
INSTALLATION_DIRS= share/doc/fuse-mp3fs
.include "options.mk"
post-install:
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/fuse-mp3fs
.include "../../audio/flac/buildlink3.mk"
.include "../../audio/lame/buildlink3.mk"
.include "../../audio/libid3tag/buildlink3.mk"
.include "../../mk/fuse.buildlink3.mk"

View file

@ -1,3 +1,3 @@
@comment $NetBSD: PLIST,v 1.3 2014/11/26 22:31:41 wiz Exp $
@comment $NetBSD: PLIST,v 1.4 2021/12/01 14:35:15 pho Exp $
bin/mp3fs
share/doc/fuse-mp3fs/README
man/man1/mp3fs.1

View file

@ -1,8 +1,7 @@
$NetBSD: distinfo,v 1.10 2021/10/26 10:25:28 nia Exp $
$NetBSD: distinfo,v 1.11 2021/12/01 14:35:15 pho Exp $
BLAKE2s (mp3fs-0.13.tar.gz) = 003d01e14336dcbd03bf7380c414f57308d68488aca5e7e1313cfa429f1c2e94
SHA512 (mp3fs-0.13.tar.gz) = 0bcbd55c3a17a8e94a29794e3225b9c18f0501a5c987f3a32e206dc3db489f778dab2cc6c2b841ec640da7a319e4be1104868c1a1e54f19f6e30491c272792ee
Size (mp3fs-0.13.tar.gz) = 301642 bytes
SHA1 (patch-aa) = 0013f729158988403ea7ed7aa3a3102e9531ef91
SHA1 (patch-ab) = 0e76e444566e2e0ff0c31a6aa64dcd82a931f397
SHA1 (patch-src_class.h) = 2a0c03c20ffce50c1270d552215edb052f3ecf50
BLAKE2s (mp3fs-1.1.1.tar.gz) = 0b576b8ee68fc3a7d21c241bd475fad3921c0200074e05d50756addf9bb1789a
SHA512 (mp3fs-1.1.1.tar.gz) = b1e4f403666122056f924514a7e63ddd53dc00346d7750e37e8150ad5f13294129595d79398677c69726fb2abf942d4ddb8fdcac3b1312a01ed467475f22592b
Size (mp3fs-1.1.1.tar.gz) = 804399 bytes
SHA1 (patch-src_fuseops.cc) = e12d4287b0a4d49f779996364f3ee9a360f04100
SHA1 (patch-src_mp3fs.cc) = baf76d4db37a10f064159e955161e738f3a0ad1f

View file

@ -0,0 +1,21 @@
# $NetBSD: options.mk,v 1.1 2021/12/01 14:35:15 pho Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.mp3fs
PKG_OPTIONS_NONEMPTY_SETS= decoders
PKG_OPTIONS_SET.decoders= flac vorbis
PKG_SUGGESTED_OPTIONS= flac vorbis
.include "../../mk/bsd.options.mk"
###
### FLAC support
###
.if !empty(PKG_OPTIONS:Mflac)
.include "../../audio/flac/buildlink3.mk"
.endif
###
### Ogg Vorbis support
###
.if !empty(PKG_OPTIONS:Mvorbis)
.include "../../audio/libvorbis/buildlink3.mk"
.endif

View file

@ -1,51 +0,0 @@
$NetBSD: patch-aa,v 1.5 2014/11/26 22:31:41 wiz Exp $
--- src/mp3fs.c.orig 2008-12-14 06:17:35.000000000 +0100
+++ src/mp3fs.c
@@ -30,7 +30,11 @@
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
+#if defined (__NetBSD__) || defined (__DragonFly__)
+#include <sys/statvfs.h>
+#else
#include <sys/statfs.h>
+#endif
#include "transcode.h"
#include "talloc.h"
@@ -195,7 +199,12 @@ static int mp3fs_read(const char *path,
return f->Read(f, buf, offset, size);
}
-static int mp3fs_statfs(const char *path, struct statfs *stbuf) {
+#if defined (__NetBSD__) || defined (__DragonFly__)
+static int mp3fs_statfs(const char *path, struct statvfs *stbuf)
+#else
+static int mp3fs_statfs(const char *path, struct statfs *stbuf)
+#endif
+{
int res;
char name[256];
@@ -204,7 +213,11 @@ static int mp3fs_statfs(const char *path
strncpy(name, basepath, sizeof(name));
strncat(name, path, sizeof(name) - strlen(name));
+#if defined (__NetBSD__) || defined (__DragonFly__)
+ res = statvfs(name, stbuf);
+#else
res = statfs(name, stbuf);
+#endif
if(res == -1)
return -errno;
@@ -252,7 +265,7 @@ int main(int argc, char *argv[]) {
basepath = argv[1];
bitrate = 0;
- rate = strchr(basepath, ',');
+ rate = strrchr(basepath, ',');
if(rate) {
rate[0] = '\0';
bitrate = atoi(rate + 1);

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ab,v 1.4 2014/11/26 22:31:41 wiz Exp $
Add inttypes.h for PRIu64.
--- src/transcode.c.orig 2008-12-14 05:24:21.000000000 +0000
+++ src/transcode.c
@@ -24,7 +24,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
-#include <sys/statfs.h>
+#include <inttypes.h>
#include <FLAC/metadata.h>
#ifdef LEGACY_FLAC

View file

@ -1,44 +0,0 @@
$NetBSD: patch-src_class.h,v 1.3 2014/11/26 22:31:41 wiz Exp $
Fix build with clang-3.1.
--- src/class.h.orig 2007-11-15 05:34:32.000000000 +0000
+++ src/class.h
@@ -171,7 +171,7 @@ super.add as well.
#define CLASS(class,super_class) \
typedef struct class *class; \
- inline void class ## _init(void); \
+ void class ## _init(void); \
void class ## _Alloc(class this); \
extern int __ ## class ## _initialised; \
extern struct class __ ## class; \
@@ -209,7 +209,7 @@ super.add as well.
#define VIRTUAL(class,superclass) \
struct class __ ## class; \
- inline void class ## _init(void) { \
+ void class ## _init(void) { \
if(!__ ## class ## _initialised) { \
class ## _Alloc(&__ ## class); \
__ ## class ## _initialised = 1; \
@@ -233,7 +233,7 @@ super.add as well.
#define VIRTUAL(class,superclass) \
struct class __ ## class; \
- inline void class ## _init(void) { \
+ void class ## _init(void) { \
if(!__ ## class ## _initialised) { \
class ## _Alloc(&__ ## class); \
__ ## class ## _initialised = 1; \
@@ -348,8 +348,8 @@ struct Object {
#define GET_CLASS(name) \
&__ ## name
-inline void Object_init(void);
-inline void Object_Alloc(Object this);
+void Object_init(void);
+void Object_Alloc(Object this);
extern struct Object __Object;

View file

@ -0,0 +1,17 @@
$NetBSD: patch-src_fuseops.cc,v 1.1 2021/12/01 14:35:15 pho Exp $
Hunk #0:
<fuse_common.h> is not meant to be directly #include'd by user
code. It's only an implementation detail, and librefuse doesn't
provide one.
--- src/fuseops.cc.orig 2021-12-01 13:29:28.302797012 +0000
+++ src/fuseops.cc
@@ -26,7 +26,6 @@
#include <dirent.h>
#include <fcntl.h>
#include <fuse.h>
-#include <fuse_common.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <unistd.h>

View file

@ -0,0 +1,40 @@
$NetBSD: patch-src_mp3fs.cc,v 1.1 2021/12/01 14:35:15 pho Exp $
Hunk #0:
<fuse_common.h> is not meant to be directly #include'd by user
code. It's only an implementation detail, and librefuse doesn't
provide one.
Hunk #1:
Work around an issue in librefuse <fuse_opt.h>. It has been
incompatible with C++11 compilers. Fixed in HEAD:
* http://mail-index.netbsd.org/source-changes/2021/12/01/msg134169.html
* http://mail-index.netbsd.org/source-changes/2021/12/01/msg134169.html
--- src/mp3fs.cc.orig 2021-01-31 04:07:18.000000000 +0000
+++ src/mp3fs.cc
@@ -26,7 +26,6 @@
#define FUSE_USE_VERSION 26
#include <fuse.h>
-#include <fuse_common.h>
#include <fuse_opt.h>
#ifdef __APPLE__
#include <fuse_darwin.h>
@@ -63,6 +62,8 @@ enum { KEY_HELP, KEY_VERSION, KEY_KEEP_O
#define FUSE_OPT_KEY(templ, key) \
{ templ, (unsigned int)(-1), key }
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnarrowing"
struct fuse_opt mp3fs_opts[] = {
MP3FS_OPT("-b %d", bitrate, 0),
MP3FS_OPT("bitrate=%d", bitrate, 0),
@@ -98,6 +99,7 @@ struct fuse_opt mp3fs_opts[] = {
FUSE_OPT_KEY("-d", KEY_KEEP_OPT),
FUSE_OPT_KEY("debug", KEY_KEEP_OPT),
FUSE_OPT_END};
+#pragma GCC diagnostic pop
void usage(const std::string& name) {
std::cout << "Usage: " << name << " [OPTION]... IN_DIR OUT_DIR"