Ticket #3904 (accepted defect)

Opened 7 years ago

Last modified 11 months ago

s3 vfs is broken

Reported by: dan_tofan Owned by: zaytsev
Priority: major Milestone: Future Releases
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

Replying to dan_tofan:

I can help with this. Do you accept contributions?

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.

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:3 Changed 7 years ago by andrew_b

Ok, feel free to make a patch to fix the S3 bug.

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:8 Changed 17 months ago by zaytsev

  • Milestone changed from 4.8.30 to 4.8.31

comment:9 Changed 11 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:10 Changed 11 months ago by zaytsev

  • Milestone changed from 4.8.31 to 4.8.32

comment:11 Changed 11 months ago by andrew_b

  • Milestone changed from 4.8.32 to Future Releases
Note: See TracTickets for help on using tickets.