Ticket #3904 (closed defect: duplicate)
s3 vfs is broken
Reported by: | dan_tofan | Owned by: | zaytsev |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-vfs | Version: | master |
Keywords: | Cc: | dmitry_koterov | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
start mc, type:
cd s3://
(ensure relevant keys are present as env variables)
After a few seconds, there is a long error dump, at the end:
ssl.CertificateError?: hostname u'...s3.amazonaws.com' doesn't match either of '*.s3.amazonaws.com', 's3.amazonaws.com'
I investigated this a bit. It seems the current version of mc s3 extension uses boto, which is now deprecated by Amazon in favor of boto3 (check https://github.com/boto/boto/issues/2836). So, it needs a rewrite to boto3.
I can help with this. Do you accept contributions?
Thank you,
Dan
mc --version
GNU Midnight Commander 4.8.20
Built with GLib 2.48.2
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
Change History
comment:1 in reply to: ↑ description Changed 7 years ago by andrew_b
- Cc dmitry_koterov added
comment:2 Changed 7 years ago by dan_tofan
Hi Andrew,
I emailed Dmitry (at his gmail address) a week ago and no answer yet.
Please advise.
Thanks,
Dan
comment:4 follow-up: ↓ 5 Changed 2 years ago by zaytsev
- Owner set to zaytsev
- Status changed from new to accepted
- Milestone changed from Future Releases to 4.8.30
There is a PR with patch for Python 3 support:
https://github.com/MidnightCommander/mc/pull/149
I think we can remove Python detection and switch to /usr/bin/env python also here.
I can do it in cleanup branch or create another branch based on cleanup. There are changes there which would cause a lot of conflicts when reformatting.
comment:5 in reply to: ↑ 4 Changed 2 years ago by andrew_b
Replying to zaytsev:
I can do it in cleanup branch or create another branch based on cleanup.
Currently cleanup branch has ~40 commits. I'm ready merge it to master. Then you can create the branch for this ticket based on master.
comment:6 follow-up: ↓ 7 Changed 2 years ago by zaytsev
Sounds good!
Maybe you can still take https://github.com/MidnightCommander/mc/pull/85 in the cleanup branch? Didn't check whether this patch is correct though. The idea is to highlight files called COMMIT_EDITMSG as diff. And maybe we can replace confusing ..\* with .\+ :-)
Oh, and case sensitivity is annoying. Maybe another fun project after mc.ext ...
comment:7 in reply to: ↑ 6 Changed 2 years ago by andrew_b
Replying to zaytsev:
Maybe you can still take https://github.com/MidnightCommander/mc/pull/85 in the cleanup branch?
Done.
Didn't check whether this patch is correct though.
The patch is correct.
The idea is to highlight files called COMMIT_EDITMSG as diff.
I got it.
And maybe we can replace confusing ..\* with .\+ :-)
Need to test that.
comment:9 Changed 12 months ago by zaytsev
So it should be at least somehow working now since the PR for Python 3 is in, but it's still not ported to latest AWS SDK and the code is scary as hell. I guess easier to rewrite than port...
comment:12 Changed 2 days ago by zaytsev
- Status changed from accepted to closed
- Resolution set to duplicate
- Milestone Future Releases deleted
Closed as duplicate of #4324.
comment:13 Changed 2 days ago by zaytsev
Python 2 code is generally not a valid Python 3 code. In ticket #4324 a patch from Fedora was merged to convert to Python 3 without any further changes. I have now adjusted shebang in #4572.
The code is still based on the old SDK and I don't know if it's working. However, I don't use it and don't have time to rewrite it just for the sake of it. So closing this ticket now. If someone wants to rewrite and update, please feel free to do so.
Replying to dan_tofan:
Yes, we do.
I thunk at first you should connect with the author of s3 fixes. A added him to Cc:. He's e-mail can be found in s3 plugin code.