Timo Teräs
c054fbc11e
db: fix unaligned memory access in csum_hash()
2020-02-21 09:33:58 +02:00
Timo Teräs
271047cc93
libfetch: support TCP_CORK
...
Unfortunately libfetch operates on raw sockets and is sending
each HTTP request line using separate syscall which causes the
HTTP request to be sent as multiple packets over the wire in most
configurations. This is not good for performance, but can also
cause subtle breakage if there's DPI firewall that does not get
the Host header.
Incidentally, it seems that on BSDs libfetch already sets
TCP_NOPUSH optimize the packetization. This commit adds same
logic for using TCP_CORK if available. When using TCP_CORK
there is no requirement to set TCP_NODELAY as uncorking will
also cause immediate send. Keep TCP_NODELAY in the fallback
codepaths.
Long term, it might make sense to replace or rewrite libfetch
to use application level buffering.
2020-02-18 15:36:01 +02:00
Timo Teräs
3694dc5fa2
fix murmur3 hash unaligned memory access
...
- do not do unaligned accesses on non-x86 hardware
- clean up the code a little bit
2020-02-17 21:36:28 +02:00
Timo Teräs
6d11ec36e6
rename all iostream source to io_*.c
2020-02-14 16:53:12 +02:00
Timo Teräs
60b87557e5
rename all applets sources to app_*.c
2020-02-14 16:49:55 +02:00
Timo Teräs
72be813930
io: add stream copy helper
2020-02-14 16:45:13 +02:00
Timo Teräs
d60477751f
defines: add typeof() as it's gcc built-in
...
Related to MR !15
2020-02-04 10:36:05 +02:00
Timo Teräs
45d313c51c
remove apk_time() as it is causing problems with shared objects
...
Instead, to make sure test mode produces same output, redefine
time() for the test mode binary.
Reverts parts of 0b82bcc53e
.
2020-02-04 10:31:10 +02:00
Timo Teräs
8fc403c582
remove travis ci, we are using gitlab ci now instead
2020-01-26 12:40:12 +02:00
Timo Teräs
4cd4d28710
remove tests connected to help output validation
...
The help has been moved to man pages now.
2020-01-26 11:55:51 +02:00
Timo Teräs
cd70e10ad9
build: separate subdirs out from targets
...
That list is needed in multiple places, so it simplifies
things a bit.
2020-01-26 11:52:56 +02:00
Timo Teräs
0867d629b9
convert man page makefile to make.rules format
2020-01-26 11:47:05 +02:00
Drew DeVault
ee24da7d36
man pages: consoldate commit options in apk(8)
2020-01-26 09:03:21 +02:00
Drew DeVault
03952ecc35
man pages: merge scdoc targetes
2020-01-26 09:03:21 +02:00
Drew DeVault
b07776bd56
Makefile: install man pages to MANDIR
2020-01-26 09:03:21 +02:00
Drew DeVault
b62d252b7b
Update apk to make man pages sole source of truth
...
Detailed docs have been removed from the apk binaries, in favor of
git-style short summaries of each command.
2020-01-26 09:03:18 +02:00
Drew DeVault
5b6c6e3573
add apk-cache(5)
2020-01-26 09:01:26 +02:00
Drew DeVault
2b5d307120
add apk-keys(5)
2020-01-26 09:01:26 +02:00
Drew DeVault
83936387ba
add apk-version(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
49d7db15e3
add apk-stats(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
6e7d307ba9
add apk-audit(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
dc2e364d28
add apk-verify(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
7c2c68df69
add apk-manifest(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
f3412acb85
add apk-fetch(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
44a79db90e
add apk-index(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
ad68a79d41
add apk-policy(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
830d96b3ee
add apk-dot(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
cd2bf9ff36
add apk-list(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
82096e9e67
add apk-info(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
0f2740f067
add apk-cache(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
77ab319958
add apk-upgrade(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
9ce9cd2588
add apk-update(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
665a37de50
add apk-fix(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
9b07a6b01d
add apk-del(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
6d507b9072
add apk-add(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
8da102ccff
add apk-repositories(5)
2020-01-26 09:01:26 +02:00
Drew DeVault
c9e33ca851
add apk-world(8)
2020-01-26 09:01:26 +02:00
Drew DeVault
01ac041bb9
Initial riggings for man pages, add apk(8)
...
This commit sets up the build system to compile man pages with scdoc,
and adds the first man page: apk(8).
2020-01-26 09:01:26 +02:00
Drew DeVault
980d249877
.gitignore: add compiled man pages
2020-01-26 09:01:26 +02:00
Reid Rankin
c7c8ab7c57
don't use hardcoded checksum buffer sizes
2020-01-25 16:35:31 +02:00
Reid Rankin
aa882df511
document mysterious SHA-1 blob in database.c
2020-01-25 16:33:54 +02:00
Reid Rankin
6cc3e6a1de
don't ignore md parameter to apk_fileinfo_hash_xattr_array()
2020-01-25 16:33:17 +02:00
Timo Teräs
9a76f0d6a6
db: additional clean up and hardening for apk extraction
...
This enforces all scripts to be in the control block, and
all data files to be in data block. Ignoring of dot files in
root is added back: packages without any real files will
ship one ".dummy" item in the data block to trigger processing
and validation to work.
2020-01-24 10:39:01 +02:00
Reid Rankin
d25e5e3879
Harden signature verification process
...
This mostly boils down to making sure control_started and
data_started are consistently used to gate actions, instead of
relying whether on file names start with a '.'.
None of the weaknesses this fixes are exploitable, but they
might have become so after changes to seemingly-unrelated code,
so it's good to clean them up.
2020-01-24 09:28:48 +02:00
Reid Rankin
093c4b8077
Improve documentation of signature verification process
2020-01-24 09:28:00 +02:00
Reid Rankin
1f9e56d8a4
manifest: fix package file processing
...
This change ensures that apk_sign_ctx_process_file() and
apk_sign_ctx_parse_pkginfo_line() are called during archive
processing, allowing discovery of signatures and the data section
checksum.
Fixes a bug uncovered by commit f123d77e
.
2020-01-24 05:11:58 +02:00
Timo Teräs
67696b2ac6
io: use min() instead of MIN()
2020-01-11 11:32:51 +02:00
Timo Teräs
f123d77e0b
archive: make apk_tar_parse check and close input stream
...
simplifies other code quite a bit
2020-01-11 11:32:51 +02:00
Timo Teräs
1de9ef422c
io: convert bstream mmap to istream, remove the now obsolete bstream machinery
2020-01-11 11:32:21 +02:00
Timo Teräs
7caa217731
convert remaining locations to use istream instead of bstream
2020-01-11 11:20:48 +02:00