Skip to content
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

Basic Wyng functions on FreeBSD #204

Open
tasket opened this issue Jun 2, 2024 · 1 comment
Open

Basic Wyng functions on FreeBSD #204

tasket opened this issue Jun 2, 2024 · 1 comment

Comments

@tasket
Copy link
Owner

tasket commented Jun 2, 2024

Experiment

See if Wyng can list and retrieve data on non-Linux systems.

Test system

  • FreeBSD 14.0 in Qubes HVM
  • Python 3.9
  • Wyng 0.8 beta5

Observations

After installing the py39-zstd and py39-pycryptodome packages in FreeBSD, then copying an existing Wyng archive from a Linux VM...


Trying simple wyng --dest=file:/path list:

  • ctypes setup of fallocate() fails –this function is only needed for receive
  • Cryptodome library doesn't expose its own name, only as "Crypto" namespace
  • The following block stops initialization with an IOError (probably the /var/lock path is not supported):
    lockf = open(lockpath, "w")
    fcntl.lockf(lockf, fcntl.LOCK_EX|fcntl.LOCK_NB)
  • Some command paths in class CP don't match
  • stat -f -c '%a %S' fails with 'No such file or directory' –probably replace this with df -P
  • chattr command not found
  • Workarounds for all of the above succeeded in producing an archive listing

Also:

  • Auth agent doesn't work; passphrase not cached

Trying wyng --dest=file:/path verify volname:

  • The following awk command exited with status 2:
do_exec([[CP.awk, r'{sub("/manifest","",FILENAME); print $0, FILENAME > "'
         +cdir+r'/"FILENAME}', fname+"/manifest"]], cwd=vol.path)

Installing gawk and changing the command path fixed this.

  • BSD sed does not like the \s and \S sequences for space; works with the replacements ' ' and [^ ].

  • With these two workarounds, verify operations succeeded.


Trying simple wyng --dest=file:/path --save-to=test.img receive volname:

  • lvm command not available
  • '/etc/mtab' not available
tasket added a commit that referenced this issue Jun 3, 2024
Replace stat with df for better portability, issue #204

Fix helper error at eof with empty receive list

Show only single overwrite warning

Make receive.log local

Create /var/lock path

Use gawk explicitly
tasket added a commit that referenced this issue Jun 4, 2024
Handle unavailable fallocate, issue #204
@tasket
Copy link
Owner Author

tasket commented Jun 6, 2024

These issues are basically resolvable for verify. In addition to the recent commits, do:

  • Auto-disable chattr use on non-Linux env (or just test for presence of the command).
  • Reconfigure other paths in class CP.
  • Install py39-pycryptodomex to supply the correct namespace. (Note the 'x'.)
  • Simple (automatic?) transform of that one sed pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant