Repository navigation
dwarfs: init at 0.6.1 - #181723
dwarfs: init at 0.6.1#181723
Conversation
tpwrules
left a comment
There was a problem hiding this comment.
Hi! Thank you for your first submission to Nixpkgs.
I finally got around to preparing my derivation for submission but saw that you made this one first and thus deserve the credit.
That said, there are some things I'd like you to change about yours before it is ready for submission. I highly encourage you to take the logic from mine about enabling building and running the tests. As for the other differences, that's your choice.
tpwrules
left a comment
There was a problem hiding this comment.
This looks great now, thank you! I also tested that everything works on aarch64-linux and it does.
As a final comment, please squash your fix commits, then this should be ready to merge (though I can't do it).
|
I don't think I can squash this atm, I believe it should be done when it gets merged, though if there's something I have to do it'd be good to know. |
|
You can do anything to the pull request as long as it's not closed. Here's how I would rebase it. With your PR branch checked out, run |
|
/marvin opt-in |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
winterqt
left a comment
There was a problem hiding this comment.
Nice work, just a few comments and things to discuss.
There was a problem hiding this comment.
So by my understanding of the project's CMakeLists file, FUSE 3 can also build the driver for FUSE 2. Maybe we should put this behind an option so people who don't want the FUSE 2 driver in addition to the FUSE 3 one can disable it? (Should it be enabled by default? Is there a common use case for FUSE 2 that makes it so it should?)
Or maybe we should just always compile it, as we do now? Not sure, let me know what you think.
There was a problem hiding this comment.
Why do we need fuse2 at all? If it is legacy we might as well not include it until someone needs it.
There was a problem hiding this comment.
I've commented out the FUSE2 driver for now.
There was a problem hiding this comment.
@tpwrules What's your opinion on the legacy FUSE driver option; was there a reason you originally included it in your derivation?
There was a problem hiding this comment.
A somewhat random survey of existing FUSE filesystems in nixpkgs and because it was supported by dwarfs. If you don't think it's necessary to have by default I have no problem having it removed.
There was a problem hiding this comment.
If we do it in other packages, maybe it's worth enabling by default, but make it configurable via an override flag?
There was a problem hiding this comment.
IMO that seems too complicated for now and I don't think anything currently existing has the option like that. It should either have both 2 and 3, or just 3. We can see if a legacy usecase presents itself down the line.
There was a problem hiding this comment.
Not sure, then. If other packages have it unconditionally, it may be good to follow their lead? /shrug
|
Apologies for the duplicate review comments between Sandro and I -- that's my fault. I didn't realize he reviewed this. |
|
I'll try getting a monkeypatch working now. I'll update you once that's done (under a seperate branch, probably) |
|
I accidentally pushed another package I was working on, oops. Sorry. |
I ended up not having time to do this so.. sorry, but you'll just have to take my word for it. It'd be a mess. The current creating of a git repository, into patching one file should be better. As Winter pointed out, it should result in less breakage in the long run. |
winterqt
left a comment
There was a problem hiding this comment.
FWIW, you removed zstd and xxhash from buildInputs, so it falls back to the embedded copies. Do you mind adding them back? (I'm assuming it was by mistake.)
That is indeed correct. Sorry, again. |
|
Yes to everything you just said. I think this is the midnight brain having kicked in now and I'm just messing up minor shit left and right. |
winterqt
left a comment
There was a problem hiding this comment.
I thought I submitted this a while ago, thanks GitHub.
Co-authored-by: Thomas <[email protected]>
SuperSandro2000
left a comment
There was a problem hiding this comment.
took a bit but now it is nice
winterqt
left a comment
There was a problem hiding this comment.
Yeah, let's land it. Worst case scenario we add the legacy FUSE driver later.
|
Thank you all. This process was a little bumpier than usual but it's a great contribution. |
|
Quite bumpy, but at least it works as a first contribution. Thanks to all for the reviews and help. |
|
Has anyone tried compressing the nix store with this? |
|
Yeah, I did some experiments and saw ratios of 3-3.5x (that is, compressed size * ratio = original size) for my machines with stores >10 gigs. I didn't try actually booting a machine from it though or otherwise using nix tooling on it, but it should be possible with overlayfs and some cleverness in the initrd I think. The biggest disadvantage is that there's no way yet to incrementally build a dwarfs image, so you'd have to periodically re-compress the whole thing, including stuff you'd compressed previously, as you modified the store over time. |
| --- /dev/null | ||
| +++ b/include/dwarfs/version.h | ||
| @@ -0,0 +1,16 @@ | ||
| +// autogenerated code, do not modify |
There was a problem hiding this comment.
@keksbg @tpwrules How does one generate it, and when should one?
The default.nix would really benefit from some comments on what is going on.
Trying to upgrade to a newer version, the build fails with 'PRJ_GIT_DATE' was not declared in this scope and there isn't a good explanation of what needs to be done about it.
@tpwrules What about the special flags upstream made for us in mhx/dwarfs#155 ?
Should those be used?
There was a problem hiding this comment.
I did not think it would need to be regenerated, it's autogenerated by the build system and we fill it in separately. But I guess its structure did change. We should migrate to the special flag then.
I can look at it myself in a day or two and ask you to review, or you can start a draft PR and I can weigh in.
The previous update to 0.9.9 didn't actually update the version because it forgot to update the hash, so the old source archive continued to be used: NixOS#312656 (comment) Because now the new code is actually pulled in, it needs new dependencies and fixes. * `PRJ_GIT_DATE` is needed. Remove the manual replacement of versions, and use the approach that upstream added for nixpkgs: NixOS#181723 (comment) This avoids cases like this, where new versioning fields are added; upstream takes care of it for us now. * Use `finalAttrs` for correct version overriding. * Fix compile error with `gtest`, see added comments. * Enable FLAC support (and the tests don't pass without it on this version, see mhx/dwarfs@21901d7)
The previous update to 0.9.9 didn't actually update the version because it forgot to update the hash, so the old source archive continued to be used: #312656 (comment) Because now the new code is actually pulled in, it needs new dependencies and fixes. * `PRJ_GIT_DATE` is needed. Remove the manual replacement of versions, and use the approach that upstream added for nixpkgs: #181723 (comment) This avoids cases like this, where new versioning fields are added; upstream takes care of it for us now. * Use `finalAttrs` for correct version overriding. * Fix compile error with `gtest`, see added comments. * Enable FLAC support (and the tests don't pass without it on this version, see mhx/dwarfs@21901d7) (cherry picked from commit 9bb686f)
The previous update to 0.9.9 didn't actually update the version because it forgot to update the hash, so the old source archive continued to be used: #312656 (comment) Because now the new code is actually pulled in, it needs new dependencies and fixes. * `PRJ_GIT_DATE` is needed. Remove the manual replacement of versions, and use the approach that upstream added for nixpkgs: #181723 (comment) This avoids cases like this, where new versioning fields are added; upstream takes care of it for us now. * Use `finalAttrs` for correct version overriding. * Fix compile error with `gtest`, see added comments. * Enable FLAC support (and the tests don't pass without it on this version, see mhx/dwarfs@21901d7) (cherry picked from commit 9bb686f)
Description of changes
Added dwarfs, a fast high compression read-only file system using FUSE. Linux-only as FUSE doesn't exist on any other platform (or maybe it does and I just don't know).
Added @keksbg as a new maintainer.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes