-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wyng-extract: non-working cleanup #104
Conversation
config/linux-x230-maximized: add lvm thin provisioning modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd support (best compression algo, thanks to facebook. wyng-backup requirement) Makefile: add glue to support blake2 and zstd boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
@tasket : if you want to play with busybox, the current 1.35.0 config I was using to add trunctate and bashisms support is here: tlaurion/heads@5d82834#diff-7906e5e771d8da6406d4081c2f8e0b51443c1dd41b0300f55f50c016034e9077 |
config/linux-x230-maximized: add lvm thin provisioning modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd support (best compression algo, thanks to facebook. wyng-backup requirement) Makefile: add glue to support blake2 and zstd boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
config/linux-x230-maximized: add lvm thin provisioning modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd support (best compression algo, thanks to facebook. wyng-backup requirement) Makefile: add glue to support blake2 and zstd boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
Looking into this now. |
@tasket awesome. |
Commented on changes needed on my side under |
I used TBH I'm having trouble sorting out what is ash behavior and what is dash. |
@tasket I know, same for me. Shellcheck only supports dash, which is what I've used to target what was not compliant changing header to parse it.
I would have to test again to see what was the error thrown |
@tasket you are under matrix? Can send whatever you have right now and can test it |
@tlaurion I don't have any revisions yet. I'm only testing bits of example code now. |
@tlaurion One bug I spotted is on line 110. Two variables should be set here (m_last and m_therest) but only one is set. It should look like:
I haven't checked if this omission was repeated elsewhere. |
Also noticed that |
It is used basically everywhere under Heads scripts and should work. |
@tlaurion I've made some correction comments in the pr. The script might actually work now and I'll try to test it sometime today. |
…ot support modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries lookup modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd 1.4.1 support (best compression algo, thanks to facebook. wyng-backup-extract.sh requirement) Makefile: add glue to pack blake2 and zstd if configured in board boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
@tasket heads PR modified to bind zstd to 1.4.9, let me know where I can see testing version of wyng-extract, was going to put that into my tests today as well. |
…ot support modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries lookup modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd 1.4.9 support (best compression algo, thanks to facebook. wyng-backup-extract.sh requirement) Makefile: add glue to pack blake2 and zstd if configured in board boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
…ot support modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries lookup modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd 1.4.9 support (best compression algo, thanks to facebook. wyng-backup-extract.sh requirement) - pass ZSTD_LIB_MINIFY=1 to build to have -Os and other space optimized build Makefile: add glue to pack blake2 and zstd if configured in board boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104
@tasket let me know :) |
@tlaurion Tested without sparse, it nearly works now except for the dreaded pipe interruption at the DECOMPRESS cmd in the final pipe segment. My memory was right about that one. In my scenario pigz receives a signal 13 early. See branch 'extractor' for the test code. |
BTW, sig 13 means EOF. I need to be able to ignore or suppress that to make the final volume creation work. |
@tasket may I suggest you turn the shell back to bash? afae272#diff-e874df9a730390d6d1f5991b7249cdeac695104b2f152d6319c5bc3e334de965L1 Should work if bash compat on, which is the case per heads busybox compiled options: Busybox comfig file: Will test tomorrow on my side, reverting script shell declared environment. |
@tlaurion I guess this is a compile-time option. I've been using the Debian busybox ash v1.35. Also, there were bugs introduced by adding quotes around variables. This should not be done in most cases where a variable holds a multi-word string such as Normally, I only add quotes when I think a user (or the system) supplies a datum (such as a file path) that may or may not contain whitespace. |
@tlaurion The busybox |
Unrelated. |
@tasket Confirmed. busybox find -printf is not a thing |
@tasket find -exec stat seems to be a good solution? https://stackoverflow.com/a/3425540 |
@tasket also just realized that only local volumes are supported.... Not ssh without sshfs (which is not maintained and requires fuse and is not usable, really). Can test with local wyng lvm qube private volume, but goal is definitely ssh. Could be paid as part of https://opencollective.com/insurgo/expenses/23902 ? |
Doh. wyng-backup/misc/wyng-extract.sh Line 251 in 81788f8
https://github.com/mirror/busybox/blob/1ce60699c15e5fc2ecff5db40ea1e1ae583b8b34/coreutils/dd.c#L352 Basically, I had to change the following for it to run without error:
But then the script does not write anything neither in sparse or normal mode: |
…ot support modules/busybox: version bump to have better ash<-> bash compatibility config/busybox.config: add truncate and other needed stuff initd/etc/lvm/lvm.config: deactivate thin-provisioning binaries lookup modules/blake2: bsum2 checksuming support (wyng-backups requirement, not under busybox) modules/zstd: zstd 1.4.9 support (best compression algo, thanks to facebook. wyng-backup-extract.sh requirement) - pass ZSTD_LIB_MINIFY=1 to build to have -Os and other space optimized build Makefile: add glue to pack blake2 and zstd if configured in board boards/x230-hotp-maximized: add blake2 and zstd modules (working) PR for wyng-extract (non-working.... still in the process of removing bashisms but was not completely successful): tasket/wyng-backup#104 missing: softlink to have zstdcat (have to create it manually under Heads as of now, tried to replicated busybox do call for symlink, but the target is just skipped.
@tlaurion Also busybox But lack of |
@tlaurion A work-around for these limitations would involve:
|
Hey @tasket
Here is my current attempt to fix incompatibilities between bash/ash, where busybox is more on the dash side even when bash compatibility is on.
I would love you to be able to pick up on that work, and take whatever you like and merge it to upstream.
I made it not work at all, but
( )
functions and indent, but ash was complaining, not sure how to fix that but rewrite those parts${var,,}
not supportedIn current state, console stops output showing megachunk added echo and dies without going further.....
Any help appreciated.
I will point WiP heads PR that I finally gave some love to. It now includes functional blake2 and zstd, thin provisioning support without complaining of thin-provisioning tools missing and newer busybox version (making ash more compatible to bash but quite not there yet, so bashisms should be replaced everywhere).