blob: b318e4aead9f72a3c51b85c717ef792cb81700ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
libMariaS3
==========
.. image:: https://readthedocs.org/projects/libmarias3/badge/?version=latest
:target: https://libmarias3.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
This is a lightweight C library to read/write to AWS S3 buckets using objects in memory.
You will need an access key which for AWS can be created at `the AWS security crenditials page <https://console.aws.amazon.com/iam/home?#/security_credentials>`_.
Compiling
---------
.. code-block:: bash
autoreconf -fi
./configure
make
Testing
-------
libMariaS3 comes with a basic test suite which we recommend executing, especially if you are building for a new platform.
You will need the following OS environment variables set to run the tests:
+------------+----------------------------------------------------------+
| Variable | Desription |
+============+==========================================================+
| S3KEY | Your AWS access key |
+------------+----------------------------------------------------------+
| S3SECRET | Your AWS secret key |
+------------+----------------------------------------------------------+
| S3REGION | The AWS region (for example us-east-1) |
+------------+----------------------------------------------------------+
| S3BUCKET | The S3 bucket name |
+------------+----------------------------------------------------------+
| S3HOST | OPTIONAL hostname for non-AWS S3 service |
+------------+----------------------------------------------------------+
| S3PORT | OPTIONAL port for non-AWS S3 service |
+------------+----------------------------------------------------------+
| S3USEHTTP | Set to ``1`` if the host uses http instead of https |
+------------+----------------------------------------------------------+
| S3NOVERIFY | Set to ``1`` if the host should not use SSL verification |
+------------+----------------------------------------------------------+
If you have minion installed, you should be able to use same settings as used by
MariaDB mtr s3 tests:
export S3KEY=minio
export S3SECRET=minioadmin
export S3REGION=
export S3BUCKET=storage-engine
export S3HOST=127.0.0.1
export S3PORT=9000
export S3USEHTTP=1
The test suite is automatically built along with the library and can be executed with ``make check`` or ``make distcheck``.
Before pushing, please ALWAYS ensure that ``make check`` and ``make distcheck`` works!
Credits
-------
The libMariaS3 authors are:
* `Andrew (LinuxJedi) Hutchings <mailto:andrew@linuxjedi.co.uk>`_
- Starting with this commit, all my contributions are under the 3-clause BSD license.
* `Sergei Golubchik <mailto:sergei@mariadb.com>`_
* `Markus Mäkelä <markus.makela@mariadb.com>`_
libMariaS3 uses the following Open Source projects:
* `libcurl <https://curl.haxx.se/>`_
* `xml.c <https://github.com/ooxi/xml.c/>`_
* `DDM4 <https://github.com/TangentOrg/ddm4>`_
* `Jouni Malinen's SHA256 hash code <j@w1.fi>`_
|