Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package btfs for openSUSE:Factory checked in at 2026-08-24 12:10:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/btfs (Old) and /work/SRC/openSUSE:Factory/.btfs.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "btfs" Mon Aug 24 12:10:33 2026 rev:15 rq:1373146 version:3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/btfs/btfs.changes 2025-10-03 15:44:47.455925719 +0200 +++ /work/SRC/openSUSE:Factory/.btfs.new.1258/btfs.changes 2026-08-24 12:15:58.486295579 +0200 @@ -1,0 +2,9 @@ +Sat Aug 22 20:32:37 UTC 2026 - Mia Herkt <[email protected]> + +- Update to version 3.2: + * Build against libtorrent-rasterbar 2.1 (ABI 2) + Also switch to C++17, which libtorrent 2.1 requires. + Still builds against ABI 1 (2.0). + gh#johang/btfs#109 + +------------------------------------------------------------------- Old: ---- btfs-3.1.tar.gz New: ---- btfs-3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btfs.spec ++++++ --- /var/tmp/diff_new_pack.XpznER/_old 2026-08-24 12:15:59.180320447 +0200 +++ /var/tmp/diff_new_pack.XpznER/_new 2026-08-24 12:15:59.184320590 +0200 @@ -1,7 +1,7 @@ # # spec file for package btfs # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2025 Andreas Stieger <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: btfs -Version: 3.1 +Version: 3.2 Release: 0 Summary: A BitTorrent file system based on FUSE License: GPL-3.0-or-later @@ -43,7 +43,6 @@ sed -i 's,env python,python,' scripts/btplay %build -export CXXFLAGS="-std=c++14" autoreconf -fi %configure %make_build ++++++ btfs-3.1.tar.gz -> btfs-3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btfs-3.1/.github/dependabot.yml new/btfs-3.2/.github/dependabot.yml --- old/btfs-3.1/.github/dependabot.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/btfs-3.2/.github/dependabot.yml 2026-08-09 16:22:21.000000000 +0200 @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btfs-3.1/.github/workflows/ci.yml new/btfs-3.2/.github/workflows/ci.yml --- old/btfs-3.1/.github/workflows/ci.yml 2025-05-12 22:33:57.000000000 +0200 +++ new/btfs-3.2/.github/workflows/ci.yml 2026-08-09 16:22:21.000000000 +0200 @@ -1,5 +1,8 @@ name: btfs CI +permissions: + contents: read + on: push: branches: [ 'master' ] @@ -27,7 +30,7 @@ steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install dependencies env: DEBIAN_FRONTEND: noninteractive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btfs-3.1/configure.ac new/btfs-3.2/configure.ac --- old/btfs-3.1/configure.ac 2025-05-12 22:33:57.000000000 +0200 +++ new/btfs-3.2/configure.ac 2026-08-09 16:22:21.000000000 +0200 @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([btfs],[3.1],[[email protected]],[btfs],[https://github.com/johang/btfs]) +AC_INIT([btfs],[3.2],[[email protected]],[btfs],[https://github.com/johang/btfs]) AC_CONFIG_SRCDIR([src/btfs.cc]) AM_INIT_AUTOMAKE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btfs-3.1/src/Makefile.am new/btfs-3.2/src/Makefile.am --- old/btfs-3.1/src/Makefile.am 2025-05-12 22:33:57.000000000 +0200 +++ new/btfs-3.2/src/Makefile.am 2026-08-09 16:22:21.000000000 +0200 @@ -1,4 +1,4 @@ -EXTRACXXFLAGS = -std=c++14 \ +EXTRACXXFLAGS = -std=c++17 \ -Wall \ -Wextra \ -Wconversion \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btfs-3.1/src/btfs.cc new/btfs-3.2/src/btfs.cc --- old/btfs-3.1/src/btfs.cc 2025-05-12 22:33:57.000000000 +0200 +++ new/btfs-3.2/src/btfs.cc 2026-08-09 16:22:21.000000000 +0200 @@ -19,6 +19,10 @@ #define FUSE_USE_VERSION 31 +#ifdef __APPLE__ +#define FUSE_DARWIN_ENABLE_EXTENSIONS 0 +#endif + #include <cstdlib> #include <iostream> #include <fstream> @@ -82,7 +86,7 @@ static bool move_to_next_unfinished(int& piece, int num_pieces) { for (; piece < num_pieces; piece++) { - if (!handle.have_piece(piece)) + if (!handle.have_piece(libtorrent::piece_index_t{piece})) return true; } @@ -101,7 +105,7 @@ cursor = tail; for (int i = 0; i < 16; i++) { - handle.piece_priority(tail++, 7); + handle.piece_priority(libtorrent::piece_index_t{tail++}, libtorrent::download_priority_t{7}); } } @@ -116,11 +120,11 @@ #if LIBTORRENT_VERSION_NUM < 10100 int64_t file_size = ti->file_at(index).size; #else - int64_t file_size = ti->files().file_size(index); + int64_t file_size = ti->files().file_size(libtorrent::file_index_t{index}); #endif while (size > 0 && offset < file_size) { - libtorrent::peer_request part = ti->map_file(index, offset, + libtorrent::peer_request part = ti->map_file(libtorrent::file_index_t{index}, offset, (int) size); part.length = std::min( @@ -137,14 +141,14 @@ void Read::fail(int piece) { for (parts_iter i = parts.begin(); i != parts.end(); ++i) { - if (i->part.piece == piece && !i->filled) + if (i->part.piece == libtorrent::piece_index_t{piece} && !i->filled) failed = true; } } void Read::copy(int piece, char *buffer, int size) { for (parts_iter i = parts.begin(); i != parts.end(); ++i) { - if (i->part.piece == piece && !i->filled) + if (i->part.piece == libtorrent::piece_index_t{piece} && !i->filled) i->filled = (memcpy(i->buf, buffer + i->part.start, (size_t) i->part.length)) != NULL; } @@ -184,7 +188,7 @@ trigger(); // Move sliding window to first piece to serve this request - jump(parts.front().part.piece, size()); + jump(static_cast<int>(parts.front().part.piece), size()); while (!finished() && !failed) // Wait for any piece to downloaded @@ -211,7 +215,7 @@ #if LIBTORRENT_VERSION_NUM < 10100 char *p = strdup(ti->file_at(i).path.c_str()); #else - char *p = strdup(ti->files().file_path(i).c_str()); + char *p = strdup(ti->files().file_path(libtorrent::file_index_t{i}).c_str()); #endif if (!p) @@ -238,7 +242,7 @@ #if LIBTORRENT_VERSION_NUM < 10100 files["/" + ti->file_at(i).path] = i; #else - files["/" + ti->files().file_path(i)] = i; + files["/" + ti->files().file_path(libtorrent::file_index_t{i})] = i; #endif } } @@ -250,15 +254,15 @@ pthread_mutex_lock(&lock); - if (a->ec) { + if (a->error) { *log << a->message() << std::endl; for (reads_iter i = reads.begin(); i != reads.end(); ++i) { - (*i)->fail(a->piece); + (*i)->fail(static_cast<int>(a->piece)); } } else { for (reads_iter i = reads.begin(); i != reads.end(); ++i) { - (*i)->copy(a->piece, a->buffer.get(), a->size); + (*i)->copy(static_cast<int>(a->piece), a->buffer.get(), a->size); } } @@ -285,7 +289,7 @@ } static void -handle_torrent_added_alert(libtorrent::torrent_added_alert *a, Log *log) { +handle_torrent_added_alert(libtorrent::add_torrent_alert *a, Log *log) { pthread_mutex_lock(&lock); handle = a->handle; @@ -325,10 +329,10 @@ handle_metadata_received_alert( (libtorrent::metadata_received_alert *) a, log); break; - case libtorrent::torrent_added_alert::alert_type: + case libtorrent::add_torrent_alert::alert_type: *log << a->message() << std::endl; handle_torrent_added_alert( - (libtorrent::torrent_added_alert *) a, log); + (libtorrent::add_torrent_alert *) a, log); break; case libtorrent::dht_bootstrap_alert::alert_type: *log << a->message() << std::endl; @@ -437,13 +441,14 @@ if (is_root(path) || is_dir(path)) { stbuf->st_mode = S_IFDIR | 0755; + stbuf->st_nlink = 2; } else { auto ti = handle.torrent_file(); #if LIBTORRENT_VERSION_NUM < 10100 int64_t file_size = ti->file_at(files[path]).size; #else - int64_t file_size = ti->files().file_size(files[path]); + int64_t file_size = ti->files().file_size(libtorrent::file_index_t{files[path]}); #endif #if LIBTORRENT_VERSION_NUM < 10200 @@ -459,6 +464,7 @@ stbuf->st_blocks = progress[(size_t) files[path]] / 512; stbuf->st_mode = S_IFREG | 0444; stbuf->st_size = file_size; + stbuf->st_nlink = 1; } pthread_mutex_unlock(&lock); @@ -574,8 +580,11 @@ #else libtorrent::session_flags_t flags = #endif - libtorrent::session::add_default_plugins | - libtorrent::session::start_default_features; + libtorrent::session::add_default_plugins +#if LIBTORRENT_VERSION_NUM < 20100 + | libtorrent::session::start_default_features +#endif + ; #if LIBTORRENT_VERSION_NUM < 10200 int alerts = @@ -585,7 +594,11 @@ libtorrent::alert::tracker_notification | libtorrent::alert::stats_notification | libtorrent::alert::storage_notification | +#if LIBTORRENT_VERSION_NUM >= 20100 + libtorrent::alert_category::piece_progress | +#else libtorrent::alert::progress_notification | +#endif libtorrent::alert::status_notification | libtorrent::alert::error_notification | libtorrent::alert::dht_notification | @@ -733,15 +746,9 @@ return xattrslen; } -#ifdef __APPLE__ -static int -btfs_getxattr(const char *path, const char *key, char *value, size_t len, - uint32_t position) { -#else static int btfs_getxattr(const char *path, const char *key, char *value, size_t len) { uint32_t position = 0; -#endif char xattr[16]; int xattrlen = 0; @@ -773,7 +780,7 @@ } static bool -populate_target(std::string& target, char *arg) { +populate_target(std::string& target, char *arg, const std::string& name) { std::string templ; if (arg) { @@ -793,11 +800,17 @@ RETV(perror("Failed to create target"), false); } - templ += "/btfs-XXXXXX"; + templ += "/"; + templ += name; + + if (mkdir(templ.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) < 0) { + if (errno != EEXIST) + RETV(perror("Failed to create target"), false); + } char *s = strdup(templ.c_str()); - if (s != NULL && mkdtemp(s) != NULL) { + if (s != NULL) { char *x = realpath(s, NULL); if (x) @@ -1043,11 +1056,6 @@ if (params.min_port > params.max_port) RETV(fprintf(stderr, "Invalid port range\n"), -1); - std::string target; - - if (!populate_target(target, params.data_directory)) - return -1; - libtorrent::add_torrent_params p; #if LIBTORRENT_VERSION_NUM < 10200 @@ -1057,16 +1065,28 @@ p.flags &= ~libtorrent::torrent_flags::auto_managed; p.flags &= ~libtorrent::torrent_flags::paused; #endif - p.save_path = target + "/files"; - - if (mkdir(p.save_path.c_str(), 0777) < 0) - RETV(perror("Failed to create files directory"), -1); curl_global_init(CURL_GLOBAL_ALL); if (!populate_metadata(p, params.metadata)) return -1; + std::ostringstream hash_stream; + auto info_hashes = p.ti ? p.ti->info_hashes() : p.info_hashes; + hash_stream << info_hashes.get_best(); + + std::string target; + + if (!populate_target(target, params.data_directory, hash_stream.str())) + return -1; + + p.save_path = target + "/files"; + + if (mkdir(p.save_path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) < 0) { + if (errno != EEXIST) + RETV(perror("Failed to create files directory"), -1); + } + fuse_main(args.argc, args.argv, &btfs_ops, (void *) &p); curl_global_cleanup();
