Yakov Olkhovskiy
c8f635e40b
WSL1 inconsistency
2023-01-16 18:32:41 +00:00
Azat Khuzhin
15bcd6250a
Fix -Wshorten-64-to-32 for darwin builds
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
8414ea0691
Fix -Wshorten-64-to-32 in self extracting executable
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Yakov Olkhovskiy
1338f7d65e
disable inode lock for macos and freebsd
2022-09-05 15:41:52 +00:00
Yakov Olkhovskiy
a9cab86a73
typo
2022-08-30 01:46:17 +00:00
Yakov Olkhovskiy
7a85a943f1
fix close lock on exec, refactoring, comments added
2022-08-30 01:11:04 +00:00
Yakov Olkhovskiy
ae82c68725
truncate lock
2022-08-25 10:52:56 +00:00
Yakov Olkhovskiy
6c1a7205e3
fix style
2022-08-24 21:47:37 +00:00
Yakov Olkhovskiy
f043d03053
fix style
2022-08-24 21:28:52 +00:00
Yakov Olkhovskiy
6afd9c176b
inode based singleton
2022-08-24 21:05:00 +00:00
Yakov Olkhovskiy
d11d494587
Merge pull request #40426 from ClickHouse/util-compressor-exec
...
Self-extracting: add --exec param, allow compressed to be renamed
2022-08-23 11:20:28 -04:00
Yakov Olkhovskiy
088a969500
comments added
2022-08-22 12:14:29 +00:00
Yakov Olkhovskiy
47d5a64f13
fix style
2022-08-21 22:06:11 +00:00
Yakov Olkhovskiy
32717a844e
allow empty --exec to signify no executable to run, add some stats printout
2022-08-21 21:39:24 +00:00
Yakov Olkhovskiy
5be782a7e6
fix buffer overflow
2022-08-20 21:02:36 +00:00
Alexey Milovidov
74e1f4dc61
Fix clang-tidy
2022-08-20 17:09:20 +02:00
Yakov Olkhovskiy
d4facec3fa
typo
2022-08-20 14:03:03 +00:00
Yakov Olkhovskiy
151afb16e2
add EOL
2022-08-19 20:57:12 +00:00
Yakov Olkhovskiy
d81ec25027
add --exec param, allow compressed to be renamed
2022-08-19 20:43:10 +00:00
Yakov Olkhovskiy
2c3732ed3a
extract real path of executable instead of argv[0]
2022-08-08 17:56:16 -04:00
Yakov Olkhovskiy
9dfd650a7c
Merge pull request #39763 from ClickHouse/util-self-extracting-exec
...
Self-extracting - run resulting executable with execvp
2022-08-05 08:13:15 -04:00
Yakov Olkhovskiy
ba86959b72
Merge branch 'util-self-extracting-exec' of https://github.com/ClickHouse/ClickHouse into util-self-extracting-exec
2022-08-03 13:15:06 -04:00
Yakov Olkhovskiy
53530a5fa4
deadcode/clang-tidy fight solution
2022-08-03 13:11:11 -04:00
Yakov Olkhovskiy
5a5d028154
remove global variables
2022-08-03 03:34:51 -04:00
Yakov Olkhovskiy
504180d7d6
stat is different for macos
2022-08-02 15:39:11 -04:00
Yakov Olkhovskiy
e65cef79ad
some refactoring
2022-08-01 14:32:32 -04:00
Yakov Olkhovskiy
8820774fe3
do not rename original file - just remove
2022-08-01 13:39:26 -04:00
Yakov Olkhovskiy
2a074288f0
style fix
2022-08-01 11:06:54 -04:00
Yakov Olkhovskiy
c79893f4ef
remove call to sh, use random names suffix for temporaries
2022-08-01 10:58:08 -04:00
Yakov Olkhovskiy
3aeb525036
style fix
2022-08-01 01:45:02 -04:00
Yakov Olkhovskiy
7a2d969850
fix clang tidy unused return
2022-08-01 01:20:40 -04:00
Yakov Olkhovskiy
c534bdd42f
clang tidy treats call to system as security issue - replace with fork/exec
2022-08-01 01:13:50 -04:00
Yakov Olkhovskiy
3731a415e6
run resulting executable with execvp
2022-07-31 20:07:33 -04:00
Yakov Olkhovskiy
250f19378d
free compression and decompression contexts
2022-07-25 15:22:48 -04:00
Yakov Olkhovskiy
a85818f654
some refactoring
2022-07-24 21:13:00 -04:00
Yakov Olkhovskiy
5071295a6a
mount.h for OS_FREEBSD
2022-07-21 11:43:00 -04:00
Yakov Olkhovskiy
c8ea6783dc
clang tidy suggestions
2022-07-21 10:27:56 -04:00
Yakov Olkhovskiy
15496c63b9
__APPLE__->OS_DARWIN, __FreeBSD__->OS_FREEBSD
2022-07-21 10:14:53 -04:00
Yakov Olkhovskiy
bdd11f671d
different path of endian.h for FreeBSD
2022-07-21 02:08:07 -04:00
Yakov Olkhovskiy
e7438cc433
Merge branch 'master' into cmake-self-extracting-executable
2022-07-21 00:25:08 -04:00
Yakov Olkhovskiy
29ed2083d1
endian.h in different path on __APPLE__ and __FreeBSD__
2022-07-21 00:20:23 -04:00
Yakov Olkhovskiy
b766552481
add native build for cross-compilation
2022-07-20 23:09:05 -04:00
Jordi Villar
c63512d255
Use CH custom platform macro for OS Darwin
2022-07-18 09:59:02 +02:00
Jordi Villar
d86abba2c6
Fix macosx compilation due to endian.h
2022-07-17 14:58:27 +02:00
Yakov Olkhovskiy
7c437c3f9b
some optimizations
2022-07-12 09:56:09 -04:00
Yakov Olkhovskiy
3432768dc3
Parameter --decompressor added, architecture-agnostic metadata, bugs fixed, some improvements
2022-07-09 16:05:12 -04:00
Robert Schulze
c22038d48b
More clang-tidy fixes
2022-06-28 11:50:05 +00:00
Robert Schulze
8fef6e7fa3
Add missing ":" to error msg
2022-06-15 14:37:58 +02:00
Robert Schulze
50748a94bd
Fix a compile errors in self-extracting-executable (de)compressor
...
E.g.
utils/self-extracting-executable/compressor.cpp:257:31: format specifies type 'ptrdiff_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
printf("Size: %td\n", info_in.st_size);
~~~ ^~~~~~~~~~~~~~~
%lld
Not sure though if it's a hard requirement to use only C.
Avoided usage of fmt::format() to keep link dependencies to a minimum.
Also not using C++20 std::format() as it's only available in Clang >=14.
2022-06-15 13:41:28 +02:00
Yakov Olkhovskiy
539100fc4a
some refactoring, cleaning, types fixed in fprintf
2022-06-13 20:25:19 -04:00