Commit Graph

1881 Commits

Author SHA1 Message Date
Takeshi Nakatani
b64dc7749c Moved parameter analysis processing to S3fsCred class 2022-02-19 17:23:40 +09:00
Takeshi Nakatani
b9e2be5c21 Fixed two typos in configure.ac 2022-02-19 17:22:43 +09:00
Takeshi Nakatani
839a33de49
Fixed not to call Flush even if the file size is increased (#1887)
Changed s3fs_truncate function.
This change reduces the number of file uploads if the file size is changed.

On macOS, I have found that the truncate call when "size=0" cannot reflect the file size.(This reason is not understood...)
To avoid this, only when "size=0", the flush method is called as before.

Other than that, I found a bug in FdEntity::Open() and fixed it.

Fixes #1875.
2022-02-15 21:29:07 +09:00
Petr Vaněk
4dfe2bfdd7 Include climits to support musl libc
PATH_MAX constant is not visible from any of currently included header
files in system with musl libc, where compilation fails with an error
below. The constant is defined in limits.h which is directly include via
climits header file.

fdcache.cpp: In static member function 'static FILE* FdManager::MakeTempFile()':
fdcache.cpp:381:14: error: 'PATH_MAX' was not declared in this scope
  381 |     char cfn[PATH_MAX];
      |              ^~~~~~~~

Fixes: d67b83e671 ("Allow configuration for temporary files directory")
2022-02-14 09:19:30 +09:00
Takeshi Nakatani
1678803566 Added S3fsCred class and moved Credential related processing in it 2022-02-13 21:38:30 +09:00
Takeshi Nakatani
d7e929e0a8
Fixed some Github Actions errors. (#1886)
- Fix knownConditionTrueFalse cppcheck(2.7) error on MacOS
- Fixed package installing failure of appstream download on centos8
2022-02-13 14:23:35 +09:00
Takeshi Nakatani
94e8e23eef
Fixed test_external_directory_creation test when cache enabled (#1885) 2022-02-13 13:32:19 +09:00
Andrew Gaul
dbf93c0152
Propagate return code properly (#1884)
Previously this did not propagate test failures.  A bad rebase
introduced this logic in 495d51113c.
2022-02-06 22:45:20 +09:00
Andrew Gaul
9224f792f0
Use CLOCK_REALTIME for UTIME_NOW (#1881)
Previously s3fs_utimens used CLOCK_MONOTONIC_COARSE which was not
1970-based.  Found via pjdfstest.  References #1589.
2022-01-30 22:19:15 +09:00
Andrew Gaul
f6ed972926
Always flush open files with O_CREAT flag (#1879)
Previously s3fs only created files that had dirty data and not those
with zero-bytes.  Regression from
771bbfeac5.  References #1013.  Found
via pjdfstest.  References #1589.
2022-01-30 22:02:37 +09:00
Andrew Gaul
0c75a63184
Preserve sub-second precision with utimens (#1880)
Found via pjdfstest.  References #1589.
2022-01-30 21:45:51 +09:00
Takeshi Nakatani
30cf7a50bb Added stat check for subdir created with awscli 2022-01-30 18:31:36 +09:00
Takeshi Nakatani
e452ef3940 Fixed the fault tolerance when time stamp getting fails 2022-01-30 18:31:36 +09:00
Andrew Gaul
cd5a69b9eb
Handle UTIME_NOW and UTIME_OMIT special values (#1868)
FUSE 3 will require this behavior.  References #1159.
2022-01-29 11:35:37 +09:00
Andrew Gaul
74c11ef226
Check bucket before trying to create it (#1874)
This makes it easier to run tests against S3 other than S3Proxy.
2022-01-26 23:42:12 +09:00
Andrew Gaul
662882d2f0
Always call clock_gettime(2) (#1871)
e01ded9e27 introduced this compatibility
shim but macOS 10.12 (2016) added this:
https://stackoverflow.com/a/39801564 .  Also remove fallback to
time(3) which loses precision.
2022-01-25 08:36:27 +09:00
Andrew Gaul
de0c87c801
Convert S3FS_LOW_LOGPRN from a macro to a function (#1869)
This shrinks the binary size from 770 to 540 KB and reduces compile
times.
2022-01-23 23:10:09 +09:00
Naoki Ikeguchi
41aaa4184f Avoid double setting values in statfs 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
451602e58d Remove unnecessary conditional for automake 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
581f5c0356 Move strptime polyfill to string_util 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
e5f6f112db Fix typo 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
b3cef944b2 Fix test_page_list_SOURCES has no if MSYS clause 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
6edb6067f3 Remove strcasestr polyfill 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
b2c659c0a6 Disable compiling polyfills in not MSYS2 env 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
807ea52ba7 Remove duplicates in .gitignore 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
3ac9f571f5 Use std::get_time instead in strptime polyfill 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
d95a612548 Revert "Run autoupdate"
This reverts commit 0b1d801598164c45e7c9e89ebd30ddde8251befa.
2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
19303a546e Fix the statfs issue, using f_frsize instead 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
4d117fd0af Add instructions for Windows compilation 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
2bf84fc705 Ignore .exe files 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
70692ee770 Run autoupdate 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
6370e150dd Disable features that causes problems on Windows 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
b14e39815b Use polyfills in MSYS2 environment 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
6aaf9433a5 Add polyfills for MSYS2 environment 2022-01-23 21:49:51 +09:00
Takeshi Nakatani
46014397d8 Added test by a shell script static analysis tool(ShellCheck) 2022-01-22 22:23:08 +09:00
Andrew Gaul
93d1c30d4d
Use XML parsing with PUT HTTP 200 responses (#1858)
This works around the missing strcasestr on win32.  References #728.
2022-01-14 16:10:22 +09:00
Andrew Gaul
6300859c80
Prefer = over == for older shell compatibility (#1857) 2022-01-14 12:40:55 +09:00
Andrew Gaul
2892d3b755
Call curl --fail to propagate exit code (#1856) 2022-01-14 11:52:52 +09:00
Andrew Gaul
25012f3839 Fix typo in -o enable_unsigned_payload 2022-01-12 22:50:49 +09:00
Andrew Gaul
3dfc1184ca Remove python2 from bullseye 2022-01-10 19:34:36 +09:00
Andrew Gaul
53d1b04cc2
Add new suppressions for clang-tidy 13 (#1847) 2022-01-09 21:42:36 +09:00
Andrew Gaul
b67465b91d
Specify C++03 for CI (#1850) 2022-01-09 20:48:09 +09:00
Andrew Gaul
cba65fc51a
Remove Python 2 (#1849) 2022-01-09 20:37:15 +09:00
Andrew Gaul
75b16c72aa
Build s3fs in parallel (#1848)
GitHub runners provide 2 Linux CPUs or 3 macOS CPUs:

https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
2022-01-09 20:22:49 +09:00
Andrew Gaul
577e2bc987
Generate S3Proxy SSL certificate during tests (#1845)
Also provide CA bundle to AWS CLI to work around CI failures instead
of ignoring errors.  Fixes #1812.
2022-01-09 15:13:36 +09:00
Andrew Gaul
adb58af17b
Annotate local variables (#1844)
This prevents collisions with other globals.  Fixes #1843.
2022-01-09 13:03:36 +09:00
Andrew Gaul
dd11de3a50
Add Debian Bullseye to CI (#1842)
Stretch is supported until June 2022:

https://wiki.debian.org/LTS
2022-01-09 12:11:00 +09:00
Andrew Gaul
fc7543fa25
Make ut_test compatible with Python 3 (#1838)
This may allow removing Python 2 on newer distros.

Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
2022-01-09 11:08:36 +09:00
Andrew Gaul
a44ea7c12a
Replace write_multiple_offsets.py with write_multiblock (#1837)
This reduces the dependency on Python 2.
2022-01-09 10:51:17 +09:00
Andrew Gaul
e734763002
Remove createbucket option (#1841)
AWS CLI can do this.  Fixes #1840.
2022-01-05 01:59:31 +09:00