archive icon indicating copy to clipboard operation
archive copied to clipboard

Add password

Open cielavenir opened this issue 2 years ago • 13 comments

closes #8 (unless you meant providing callback)

cielavenir avatar Mar 05 '22 20:03 cielavenir

I tested this PR on my computer and this works perfectly.

Unfortunately, the logs have been deleted so we cannot know why the checks failed. Is there anything we could do to help so that this PR could be accepted?

DanChaltiel avatar Nov 11 '22 12:11 DanChaltiel

@gaborcsardi could you rerun roxygen2 onto this branch? I don't know how.

cielavenir avatar Nov 24 '22 07:11 cielavenir

/document

gaborcsardi avatar Nov 24 '22 08:11 gaborcsardi

Thank you @gaborcsardi

@DanChaltiel now doc is sane, much closer to the goal

But why windows CI is failing? Is this libarchive binary ('s password) issue or not...?

cielavenir avatar Nov 24 '22 09:11 cielavenir

Is is possible that the libarchive Windows build from rtools42 is missing something for password support?

gaborcsardi avatar Nov 24 '22 09:11 gaborcsardi

I tried something but failing so far

cielavenir avatar Nov 27 '22 23:11 cielavenir

Another interesting thing is that https://github.com/cielavenir/miniarc can handle encryption on Windows build. Note that I loaded libarchive-13.dll from https://packages.msys2.org/package/mingw-w64-x86_64-libarchive , which should be the same source as rwinlib libarchive.

cielavenir avatar Nov 27 '22 23:11 cielavenir

AFAICT we do not currently use rwinlib on the CI, but use the libarchive static lib from rtools42. Many dependencies of libarchive are optional, so maybe that build does not have everything that is needed?

gaborcsardi avatar Nov 28 '22 00:11 gaborcsardi

Let's revisit after https://github.com/r-lib/archive/pull/80

cielavenir avatar Nov 29 '22 03:11 cielavenir

It is now ready.

cielavenir avatar Feb 02 '23 13:02 cielavenir

seems like I'm still new to R binding (well, I just took a look on this as an extension from https://github.com/r-lib/archive/pull/72 ).

cpp11::strings password;
  if (password.size() > 0) {
    call(archive_write_set_passphrase, out, std::string(password[0]).c_str());
  }

umm that is when password is character(), not NA_character_.

cielavenir avatar Feb 04 '23 16:02 cielavenir

@gaborcsardi @jimhester

Let me explain the situation again.

I can add the password feature, but the test does not pass on Windows because archive_write_files is broken. I asked you to fix it but I don't get replies. I fixed it by my own but it is not accepted due to coding style. But what I do is correcting broken coding style of r-lib/archive:master.

Do note that currently test-archive_write_files.R is wrongly passing on Windows.

You don't fix, my fix is not accepted, hence now I think of skipping password test on Windows. Please perform some action(s). I'm serious.

cielavenir avatar Jan 03 '24 17:01 cielavenir

I think of skipping password test on Windows

done. really heartbreak.

cielavenir avatar Mar 18 '24 00:03 cielavenir