Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
From 9e48b9f20949165a3feafb871a9e5cb75d504987 Mon Sep 17 00:00:00 2001
From: Rohit Vighne <rohit.vighne@gmail.com>
Date: Fri, 7 Aug 2026 15:22:16 -0400
Subject: [PATCH 1/2] throw() -> __THROW on glibc, nothing otherwise

---
include/crucible/openat2.h | 6 +++++-
include/crucible/process.h | 6 +++++-
lib/openat2.cc | 4 +++-
lib/process.cc | 5 ++++-
4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/include/crucible/openat2.h b/include/crucible/openat2.h
index c408118..2c5832d 100644
--- a/include/crucible/openat2.h
+++ b/include/crucible/openat2.h
@@ -43,10 +43,14 @@ struct open_how {
#endif // Linux version >= v5.6

extern "C" {

/// Weak symbol to support libc with no syscall wrapper
-int openat2(int dirfd, const char *pathname, struct open_how *how, size_t size) throw();
+int openat2(int dirfd, const char *pathname, struct open_how *how, size_t size)
+#ifdef __THROW
+__THROW
+#endif
+;

};

#endif // CRUCIBLE_OPENAT2_H
diff --git a/include/crucible/process.h b/include/crucible/process.h
index 845ab27..b2ae817 100644
--- a/include/crucible/process.h
+++ b/include/crucible/process.h
@@ -9,11 +9,15 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

extern "C" {
- pid_t gettid() throw();
+ pid_t gettid()
+#ifdef __THROW
+ __THROW
+#endif
+ ;
};

namespace crucible {
using namespace std;

diff --git a/lib/openat2.cc b/lib/openat2.cc
index d868234..65f7f49 100644
--- a/lib/openat2.cc
+++ b/lib/openat2.cc
@@ -25,11 +25,13 @@
extern "C" {

int
__attribute__((weak))
openat2(int const dirfd, const char *const pathname, struct open_how *const how, size_t const size)
-throw()
+#ifdef __THROW
+__THROW
+#endif
{
#ifdef SYS_openat2
return syscall(SYS_openat2, dirfd, pathname, how, size);
#else
errno = ENOSYS;
diff --git a/lib/process.cc b/lib/process.cc
index 808073e..6ef4e8c 100644
--- a/lib/process.cc
+++ b/lib/process.cc
@@ -11,11 +11,14 @@
#include <sys/syscall.h>

extern "C" {
pid_t
__attribute__((weak))
- gettid() throw()
+ gettid()
+#ifdef __THROW
+ __THROW
+#endif
{
return syscall(SYS_gettid);
}
};

--
2.55.0

52 changes: 31 additions & 21 deletions srcpkgs/bees/patches/0002-move-sbin-into-bin.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
From e76b016fd0ac8a76545e4ce499d4c7d0e1cc35e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
<jan.christian@gruenhage.xyz>
Date: Thu, 7 Oct 2021 18:05:15 +0200
Subject: [PATCH 2/3] move sbin/* into bin/*
From 0a9982bc98fb3a664247c554d7b051eec2f8c359 Mon Sep 17 00:00:00 2001
From: Rohit Vighne <rohit.vighne@gmail.com>
Date: Fri, 7 Aug 2026 15:40:31 -0400
Subject: [PATCH 2/2] move sbin/* into bin/*

Void does not distinguis between bin and sbin, but this patch will
likely not be upstreamable.
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Makefile | 2 +-
scripts/beesd@.service.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 5c35bf9..c1a9b8c 100644
index 1918372..5389aa5 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ scripts: scripts/beesd scripts/beesd@.service
install_tools: ## Install support tools + libs
install_tools: src
install -Dm755 bin/fiemap $(DESTDIR)$(PREFIX)/bin/fiemap
- install -Dm755 bin/fiewalk $(DESTDIR)$(PREFIX)/sbin/fiewalk
+ install -Dm755 bin/fiewalk $(DESTDIR)$(PREFIX)/bin/fiewalk

install_bees: ## Install bees + libs
install_bees: src
@@ -56,7 +56,7 @@ install_bees: src
@@ -53,11 +53,11 @@ install_bees: ## Install bees + libs
install_bees: src $(RUN_INSTALL_TESTS)
install -Dm755 bin/bees $(DESTDIR)$(LIBEXEC_PREFIX)/bees

install_scripts: ## Install scipts
install_scripts: scripts
Expand All @@ -32,6 +23,25 @@ index 5c35bf9..c1a9b8c 100644
install -Dm644 scripts/beesd.conf.sample $(DESTDIR)$(ETC_PREFIX)/bees/beesd.conf.sample
ifneq ($(SYSTEMD_SYSTEM_UNIT_DIR),)
install -Dm644 scripts/beesd@.service $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/beesd@.service
endif

diff --git a/scripts/beesd@.service.in b/scripts/beesd@.service.in
index 32a6f85..78727a4 100644
--- a/scripts/beesd@.service.in
+++ b/scripts/beesd@.service.in
@@ -3,11 +3,11 @@ Description=Bees (%i)
Documentation=https://github.com/Zygo/bees
After=sysinit.target

[Service]
Type=simple
-ExecStart=@PREFIX@/sbin/beesd --no-timestamps %i
+ExecStart=@PREFIX@/bin/beesd --no-timestamps %i
CPUAccounting=true
CPUSchedulingPolicy=batch
CPUWeight=12
IOSchedulingClass=idle
IOSchedulingPriority=7
--
2.38.1
2.55.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 8c03747c728083e86789760b287b4f3c09654a8c Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <bees@furryterror.org>
Date: Thu, 3 Jul 2025 21:48:40 -0400
Subject: [PATCH 3/3] fsync: fix signed comparison of stf.f_type

Build fails on 32-bit Slackware because GCC 11's `-Werror=sign-compare`
is stricter than necessary:

cc -Wall -Wextra -Werror -O3 -I../include -D_FILE_OFFSET_BITS=64 -std=c99 -O2 -march=i586 -mtune=i686 -o bees-version.o -c bees-version.c
bees.cc: In function 'void bees_fsync(int)':
bees.cc:426:24: error: comparison of integer expressions of different signedness: '__fsword_t' {aka 'int'} and 'unsigned int' [-Werror=sign-compare]
426 | if (stf.f_type != BTRFS_SUPER_MAGIC) {
| ^

To work around this, cast `stf.f_type` to the same type as
`BTRFS_SUPER_MAGIC`, so it has the same number of bits that we're looking
for in the magic value.

Fixes: https://github.com/Zygo/bees/issues/317
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
---
src/bees.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bees.cc b/src/bees.cc
index c447a99..cbe3810 100644
--- a/src/bees.cc
+++ b/src/bees.cc
@@ -421,11 +421,11 @@ bees_fsync(int const fd)
BEESNOTE("checking filesystem type for " << name_fd(fd));
// LSB deprecated statfs without providing a replacement that
// can fill in the f_type field.
struct statfs stf = { 0 };
DIE_IF_NON_ZERO(fstatfs(fd, &stf));
- if (stf.f_type != BTRFS_SUPER_MAGIC) {
+ if (static_cast<decltype(BTRFS_SUPER_MAGIC)>(stf.f_type) != BTRFS_SUPER_MAGIC) {
BEESLOGONCE("Using fsync on non-btrfs filesystem type " << to_hex(stf.f_type));
BEESNOTE("fsync non-btrfs " << name_fd(fd));
DIE_IF_NON_ZERO(fsync(fd));
return;
}
--
2.55.0

23 changes: 0 additions & 23 deletions srcpkgs/bees/patches/pthread_getname1.patch

This file was deleted.

3 changes: 2 additions & 1 deletion srcpkgs/bees/patches/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0001-don-t-run-tests-unless-asked.patch
0001-throw-__THROW-on-glibc-nothing-otherwise.patch
0002-move-sbin-into-bin.patch
pthread_getname1.patch
0003-fsync-fix-signed-comparison-of-stf.f_type.patch
6 changes: 3 additions & 3 deletions srcpkgs/bees/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'bees'
pkgname=bees
version=0.8
revision=2
version=0.11
revision=1
build_style=gnu-makefile
make_check_target="test"
hostmakedepends="pkg-config"
Expand All @@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/Zygo/bees"
distfiles="https://github.com/Zygo/bees/archive/refs/tags/v${version}.tar.gz"
checksum=3efb1a7290b014b8dd0cb64ce98382c2bde1f9ccf649e1b4fc86f27ffa42edea
checksum=191caa0d6557f346fec1585743c8b76ca4a40bd6462660a45ec7888753a5cd41

if [ "$CROSS_BUILD" ]; then
# Tests don't work properly with cross compilation, because it doesn't
Expand Down