Commit Graph

34 Commits

Author SHA1 Message Date
Thomas Mühlbacher
ceb5e80d0e chore: rm leftover gitignore entries
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-07-21 01:16:28 +02:00
John Titor
a0bbe712c0
workflows: add monthly flake lock update workflow
Signed-off-by: Masum Reza <masumrezarock100@gmail.com>
2024-05-29 01:12:56 +05:30
Gabriel
ca06a063fa Add bcachefs command compatibility symlink
The CLI is now built by Cargo, add a symlink so it can be found at the
place it was before so people don't try to run an old binary.
2024-01-29 14:29:35 +01:00
Thomas Bertschinger
505d5aaed2 remove bch_bindgen/Cargo.lock from version control
This is redundant with the root level Cargo.lock. Any changes made to
the bch_bindgen dependencies will be duplicated in both Cargo.lock
files. Removing this from version control will reduce the noise in the
git diffs for such changes.

Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-23 02:53:45 -05:00
Thomas Bertschinger
f5baaf48e3 move Rust sources to top level, C sources into c_src
This moves the Rust sources out of rust_src/ and into the top level.
Running the bcachefs executable out of the development tree is now:

$ ./target/release/bcachefs command
or
$ cargo run --profile release -- command

instead of "./bcachefs command".

Building and installing is still:

$ make && make install

Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16 01:47:05 -05:00
Jörg Thalheim
faec58a713 .gitignore: replace travis with github-ci config 2023-07-20 22:27:56 +02:00
Kent Overstreet
28f703cc25 Rust now integrated into bcachefs binary
Rust is now required for building the bcachefs tool, and rust code is
now fully integrated with the C codebase - meaning it is possible to
call back and forth.

The mount helper is now a subcommand, 'mount.bcachefs' is now a small
shell wrapper that invokes 'bcachefs mount'.

This will make it easier to start rewriting other subcommands in rust,
and eventually the whole command line interface.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 01:03:08 -05:00
Daniel Hill
9a44c6d4d0 nix: overhaul build system.
Removed outdated overlay.
Simply build tooling using bingenHook and propagated*Inputs

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03 16:58:55 +13:00
Kent Overstreet
d06f5690fa Update bcachefs sources to ff3a76e1af bcachefs: Change need_whiteout_for_snapshot() to clone iterator 2021-12-19 19:37:29 -05:00
Brett Holman
8e6f35cbf3 Documentation fixup: made filenames more descriptive, switched parsing utility to python 2021-07-10 13:51:03 -04:00
Kent Overstreet
a471a75449 Add bcachefs.5 to .gitignore
It's autogenerated now

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-07 20:32:00 -04:00
Brett Holman
b916af97dd Switched documentation from asciidoc to rst, added doc autogeneration code for options 2021-07-06 00:15:44 -06:00
Kent Overstreet
f55b90dec9 Don't build mount.bcachefs by default
So as not to depend on rust yet
2020-05-08 21:25:12 -04:00
Justin Husted
15bcfb2a33 Add a travis.yml file for bcachefs-tools.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 20:32:39 -08:00
Justin Husted
4ed889295c Add makefile support for tags.
Also, update .gitignore for various things.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-04 21:23:46 -08:00
Tim Schlueter
079e6ab647 Only run pkg-config once in Makefile, added EXTRA linker vars
* Only run the pkg-config --cflags command once (instead of every .c file)
* Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
* Removed tabs in the middle of commands to make it easier to manually re-run
  commands manually (e.g. if a compilation fails)
* Replaced `cd dir; git command` in favor of $(shell git -C dir command)
* Minor version format change: dirty trees just append "+" instead of "-dirty"
  and if git describe fails, it now sets the version to "v0.1-nogit"

Also, don't ignore .gitignore files.
2019-01-13 19:31:04 -08:00
Austin Seipp
fa36882a73 nix: add nix expressions for development
This adds Nix expressions for bcachefs-tools that are modular, work in
purely sandboxed build environments (e.g. on NixOS itself, or macOS, where
sandboxing is enabled by default), use a fixed copy of Nixpkgs (to avoid hidden,
global state) and uses standard build idioms.

This change uses a fixed version of Nixpkgs, one that will always be used for
every build of bcachefs-tools, for all users, rather than relying on whatever
copy of Nixpkgs the user has available.

This has a major benefit in that it allows the build to work in sandboxed
environments such as NixOS, and it correctly declares all of the necessary
dependencies that bcachefs-tools needs. This is done simply by using
stdenv.mkDerivation in order to write a "normal" Nix expression, where the
previous version used a variant of the stdenv builder, but this isn't needed for
the most part. (Doing this has other knock-on benefits, such as the usage of
standardized options like `enableParallelBuild = true;` -- allowing `nix-build`
to automatically do parallel builds, etc.)

Another major benefit of this change is that anyone can now use `nix-shell` to
develop/hack on bcachefs-tools incrementally; simply running nix-shell will put
you in a Bash shell environment where all of bcachefs-tools' dependencies are
proprerly provided, no matter the state of the outside build environment/host
operating system:

    $ nix-shell

    [nix-shell:~/src/bcachefs-tools]$ make -j4 # works immediately

As mentioned before, with this change, by default, nix-build and
nix-shell run using a prepackaged copy of an upstream Nixpkgs snapshot. This is
done purely to ensure anyone who builds bcachefs-tools using Nix does, in fact,
get a reproducible build. Without this, nix-build defaults to using the the
`<nixpkgs>` NIX_PATH entry in order to fetch dependencies; meaning that two
users on different channels will get different results (for example, if you have
the November 2017 channel but I have the October 2017 channel, the results may
be different).

With this patch, a user running

    $ nix-build

will always use the exact same copy of nixpkgs to bootstrap the build,
regardless of whatever channels the user has. This bootstrap mechanism does not
even depend on an existing copy of Nixpkgs itself; e.g. it can work with a
completely empty `NIX_PATH`.

This is arguably anti-modular, but for end-user applications like
bcachefs-tools, fixing the version of Nixpkgs is not normally a huge deal. Users
who wish to use a different copy of Nixpkgs can provide this with an argument to
nix-build directly, using the `nixpkgs` argument to the expression:

    $ nix-build --pure --arg nixpkgs 'import <nixpkgs> {}'

This uses the `<nixpkgs>` provided inside your `NIX_PATH` environment variable
to acquire dependencies, which by default is managed using `nix-channel`. If you
have a copy of the Nixpkgs source code e.g. from a `git clone`, you may use that
too by simply using `-I` to prepend your Nixpkgs to `NIX_PATH` (see `man
nix-build` for more):

    $ nix-build --pure \
        -I nixpkgs=$HOME/src/nixpkgs \
        --arg nixpkgs 'import <nixpkgs> {}'

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-10 16:07:33 -06:00
Kent Overstreet
c0ad33c126 bcachefs-in-userspace improvements
Got rid of the stupid shim file hack
2017-03-19 21:39:19 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
5933f9478c update bcache code, fsck improvements 2017-02-06 20:45:37 -09:00
Kent Overstreet
b33fc8298f bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
Kent Overstreet
4e158e1553 add dependency generation to make file 2016-10-11 17:50:54 -08:00
Kent Overstreet
009d6db7b0 Redo lots of stuff 2016-03-11 21:18:42 -09:00
Kent Overstreet
e13d21ade7 Major refactoring, add new settings to bcacheadm format 2015-03-28 23:21:33 -07:00
Kent Overstreet
5730e47b6f Cleanup, rip out more code, fix compiler warnings
Change-Id: I76b410dc700a917d2717b1ceda0df061a1599144
2015-01-27 13:45:02 -08:00
Kent Overstreet
3301c8dd52 Update for bcache superblock changes
Also, drop make-bcache - it's superceded by bcacheadm

Change-Id: I88ee25a1c13f2cbb0b0efa6e01bdca3f069bab62
2015-01-21 23:11:47 -08:00
Rob Millner
4b168ef820 Add Apple addendums to .gitignore
Change-Id: I1b45829d872773db1b0f4aef2ea7f0f7eb70c423
2015-01-09 12:08:00 -08:00
Kent Overstreet
02c47b0373 Superblock version 6
Change-Id: Iba976c8c5a4a91dcac06145471fc70baa6a6393e
2014-08-29 21:48:17 +00:00
Nicholas Swenson
9ae5ee2905 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools
Conflicts:
	.gitignore
2013-11-21 17:41:18 -08:00
Nicholas Swenson
fd07c41fcd .gitignore: tags, scope
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
2013-11-03 00:55:22 -07:00
Claudio Fleiner
24e98ce46d Adding autotools support to bcache-tools
thie enables building it in a different directory, more
flexible install and configure options, and should make it
easier to eventualy create deb and rpm packages. Additionally
this makes it much easier to build and test this package
as it now behaves the same way as others we are using.
2013-10-28 22:47:23 -07:00
Gabriel
865a3b1f0b Add a command to display a bcache superblock. 2013-03-09 14:33:08 +01:00
Kent Overstreet
552595bc6e Don't write journal buckets 2011-07-26 12:24:00 -07:00
Kent Overstreet
4f88b8efe2 Add an option for setting the set uuid 2011-07-12 15:42:37 -07:00