2122 Commits

Author SHA1 Message Date
Kent Overstreet
feb7049a58 Update bcachefs sources to 115e433659fe bcachefs: Fix double-free of journal_keys key 2025-09-23 17:29:34 -04:00
Kent Overstreet
4265385fb5 dkms: export CONFIG_BCACHEFS_DKMS
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-23 17:29:21 -04:00
Kent Overstreet
fb0c7d250d fixup! tweak debian repo readme 2025-09-23 15:41:04 -04:00
Kent Overstreet
ffc8979b8b Move initramfs scripts back to main bcachefs-tools package
If bcachefs goes back upstream or a user is compiling from source they
won't need the dkms package, but they will need the initramfs hooks.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-23 10:31:54 -04:00
koverstreet
38e9d8e7f9
Merge pull request #418 from LebedevRI/debian
Deb PPA: unbreak publish job (it was the backticks), and reorder some line
2025-09-23 08:53:28 -04:00
Roman Lebedev
47794b5f29
Deb PPA: unbreak publish job (it was the backticks), and reorder some lines 2025-09-23 13:30:07 +03:00
koverstreet
0a3e0e6582
Merge pull request #413 from beviu/systemd-ask-password
Improve systemd-ask-password integration
2025-09-21 15:55:04 -04:00
beviu
69cb6428ba
key: Pass --keyname and --accept-cached to systemd-ask-password
Before asking for a passphrase, mount.bcachefs searches for an existing
key in the keyring containing a passphrase for the filesystem. This
means that the user only has to enter the passphrase once when mounting
the filesystem multiple times.

However, if the key appears in between the check and the time when
systemd-ask-password queries the user for a password, the existing key
will not be reused. Also, when multiple instances of mount.bcachefs
are started in parallel for the same filesystem (such as during boot),
each of them will see that the key is not in the keyring and start an
instance of systemd-ask-password, meaning that the user will be queried
multiple times.

Fix the race condition by passing the --keyname and --accept-cached
options to systemd-ask-password which also makes it try itself to
retreive a cached password from the keyring before querying the user
for a password.
2025-09-21 21:42:56 +02:00
beviu
e5f4be87a8
key: Try systemd-ask-password when stdin is /dev/null
When mount.bcachefs is started with stdin set to /dev/null (such as when
it is started by systemd during boot), try to use systemd-ask-password
to ask for the passphrase.
2025-09-21 21:42:56 +02:00
Kent Overstreet
23313f0f69 tweak debian repo readme
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-21 13:25:10 -04:00
koverstreet
ebc3e58728
Merge pull request #415 from LebedevRI/debian
apt repo readme: mention pinning
2025-09-21 13:18:14 -04:00
Roman Lebedev
97a7748c35
CI: debian pkgs: re-disable publish job for PR's 2025-09-21 20:03:29 +03:00
Roman Lebedev
e61199c01f
CI: unbreak debian pkg builds for PR's 2025-09-21 19:58:23 +03:00
Roman Lebedev
931678d4aa
apt repo readme: suggest releases by default 2025-09-21 19:45:31 +03:00
Roman Lebedev
2f0b52bf85
apt repo readme: mention pinning 2025-09-21 19:45:31 +03:00
koverstreet
af416249c3
Merge pull request #416 from beviu/push-roukumnuruko
Make `BcachefsHandle::open` fallible
2025-09-21 12:26:28 -04:00
beviu
b5f23b00cd
Use bcache_fs_open_fallible in BcachefsHandle::open
Also, as long as the path is valid, bcache_fs_open{,fallible} do not
do anything unsafe so BcachefsHandle::open does not need to be marked
unsafe.
2025-09-20 22:38:18 +02:00
beviu
235c11e325
Add ret_to_result to convert int into Result<c_int, bch_errcode> 2025-09-20 22:35:25 +02:00
beviu
454a6b9ade
Propagate error instead of die()ing in bcache_fs_open_fallible 2025-09-20 22:33:35 +02:00
koverstreet
a0ec402f8d
Merge pull request #414 from LebedevRI/debian
Debian packaging: depend on linux-headers-generic, it will pull in the right one
2025-09-20 14:48:30 -04:00
Roman Lebedev
9a6be35984
Debian packaging: depend on linux-headers-generic, it will pull in the right one 2025-09-20 21:19:45 +03:00
koverstreet
991fb55fc6
Merge pull request #412 from KrzysztofHajdamowicz/fix/dkms/skip_kernels_older_than_6.16
Some checks failed
Nix Flake actions / nix-matrix (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
Update dkms.conf.in
2025-09-19 02:39:45 -04:00
Krzysztof Hajdamowicz
e96b1f7061
Update dkms.conf.in
Use BUILD_EXCLUSIVE_KERNEL to match against kernels 6.16-6.99 as kernels older than 6.16 are currently not supported
2025-09-19 08:34:11 +02:00
Kent Overstreet
3755975ce8 v1.31.2
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
v1.31.2
2025-09-19 02:30:50 -04:00
koverstreet
4fa32ae515
Merge pull request #411 from LebedevRI/debian
More Debian / Ubuntu / PPA stuff
2025-09-19 01:03:52 -04:00
Roman Lebedev
9674212ba6
More Debian / Ubuntu / PPA stuff
Signed-off-by: Roman Lebedev <lebedev.ri@gmail.com>
2025-09-19 08:02:34 +03:00
Kent Overstreet
89d6694201 Update bcachefs sources to 0c67e96b7201 bcachefs: vendor closures
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-18 23:58:13 -04:00
Kent Overstreet
9688e2e455 Update bcachefs sources to 690e0168a8e0 bcachefs: vendor closures
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-18 19:55:24 -04:00
Kent Overstreet
8a61c2cb15 Update bcachefs sources to 68d390aa7f67 bcachefs: Don't reference CONFIG_BCACHEFS_ASYNC_OBJECT_LISTS in makefile
Some checks failed
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-18 11:56:26 -04:00
koverstreet
2183399401
Merge pull request #410 from LebedevRI/dkms
Debian: split DKMS into separate binary package
2025-09-17 21:59:49 -04:00
Roman Lebedev
a235493c29
Github actions: don't try to attest PR builds, not allowed by GitHub 2025-09-18 04:57:04 +03:00
Roman Lebedev
3708f1f20a
Debian: split DKMS into separate binary package
The package deps seems to be correct,
and the mod does seem to get built
and placed into initramfs.

```
$ eatmydata sudo dpkg -i bcachefs-tools_1.31.3_amd64.deb
ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
(Reading database ... 534575 files and directories currently installed.)
Preparing to unpack bcachefs-tools_1.31.3_amd64.deb ...
Unpacking bcachefs-tools (1:1.31.3) over (1:1.31.3) ...
Setting up bcachefs-tools (1:1.31.3) ...
Processing triggers for man-db (2.13.1-1) ...
$ eatmydata sudo dpkg -i bcachefs-kernel-dkms_1.31.3_amd64.deb
ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
(Reading database ... 552274 files and directories currently installed.)
Preparing to unpack bcachefs-kernel-dkms_1.31.3_amd64.deb ...
Unpacking bcachefs-kernel-dkms (1:1.31.3) ...
Setting up bcachefs-kernel-dkms (1:1.31.3) ...
Loading new bcachefs/1.31.1 DKMS files...
Building for 6.16.7+deb14-amd64

Building initial module bcachefs/1.31.1 for 6.16.7+deb14-amd64
Sign command: /lib/modules/6.16.7+deb14-amd64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Certificate or key are missing, generating self signed certificate for MOK...

Building module(s)...... done.
Signing module /var/lib/dkms/bcachefs/1.31.1/build/src/fs/bcachefs/bcachefs.ko
Found pre-existing /lib/modules/6.16.7+deb14-amd64/kernel/fs/bcachefs/bcachefs.ko.xz, archiving for uninstallation
Installing /lib/modules/6.16.7+deb14-amd64/updates/dkms/bcachefs.ko.xz
Running depmod.... done.
Processing triggers for initramfs-tools (0.150) ...
update-initramfs: Generating /boot/initrd.img-6.16.7+deb14-amd64
update-initramfs: Generating /boot/initrd.img-6.12.38+deb13-amd64
$ lsinitramfs -l /boot/initrd.img-6.16.7+deb14-amd64 | grep bcachefs
-rw-r--r--   1 root     root      1027492 Sep 18 04:15 usr/lib/modules/6.16.7+deb14-amd64/updates/dkms/bcachefs.ko.xz
-rwxr-xr-x   1 root     root         2042 Sep 18 03:01 scripts/local-premount/bcachefs
-rwxr-xr-x   1 root     root      3791344 Sep 18 03:01 usr/sbin/bcachefs
lrwxrwxrwx   1 root     root            8 Sep 18 04:15 usr/sbin/mount.bcachefs -> bcachefs

```

Signed-off-by: Roman Lebedev <lebedev.ri@gmail.com>
2025-09-18 04:56:35 +03:00
koverstreet
99aafa9c40
Merge pull request #409 from LebedevRI/apt-readme
APT Readme: use different sentinels in nested cat blocks
2025-09-17 19:27:38 -04:00
Roman Lebedev
be615fc6d7
APT Readme: use different sentinels in nested cat blocks
Sorry about that...

Signed-off-by: Roman Lebedev <lebedev.ri@gmail.com>
2025-09-18 02:22:27 +03:00
koverstreet
82ca9d4dfa
Merge pull request #408 from LebedevRI/apt-readme
deb repo: readme fixse
2025-09-17 19:05:29 -04:00
Roman Lebedev
1b560a9a35
deb repo: actually provide usable instructions in README
Signed-off-by: Roman Lebedev <lebedev.ri@gmail.com>
2025-09-18 02:03:51 +03:00
Kent Overstreet
2303fad2be v1.31.1
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
v1.31.1
2025-09-17 18:31:49 -04:00
Kent Overstreet
c8a1412711 Fix fuse build
Some checks failed
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 16:45:38 -04:00
Kent Overstreet
f00a2843aa fix spaces instead of tabs
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 15:53:17 -04:00
Kent Overstreet
1c64faafe7 Fix build on old userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 12:38:53 -04:00
Kent Overstreet
b6bb1e2a11 Update bcachefs sources to ff14f7886ed9 bcachefs: compat code for pre 6.17 2025-09-17 12:38:53 -04:00
Kent Overstreet
5862ca9f02 kill systemd integration
We probably won't ever need this, since we've steadily been doing more
and more self healing.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 12:38:52 -04:00
Kent Overstreet
6375fda6ec Update bcachefs sources to c819a7757912 bcachefs: kill write_(begin|end)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 12:38:33 -04:00
Kent Overstreet
20667b55f8 makefile cleanup
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 12:38:33 -04:00
Kent Overstreet
1bf97bb2de drop bcachefs-tools-deb workflow
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 00:56:44 -04:00
Kent Overstreet
993396bb57 Fix initramfs hook installation
We have to create the final hook before installation for debian package
builds.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 00:37:46 -04:00
Kent Overstreet
7d37ce6485 debian: fix dkms
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 00:18:45 -04:00
Kent Overstreet
525d7f816f debian: export PREFIX
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-17 00:03:03 -04:00
Kent Overstreet
75fcddb7a2 Makefile: install DKMS
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2025-09-16 23:47:30 -04:00
koverstreet
49f0c654ac
Merge pull request #407 from LebedevRI/debian
Some checks failed
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (forky, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (trixie, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
.deb build orchestrator / buildd (unstable, map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
debian package vendoring and PPA
2025-09-16 13:59:53 -04:00