Commit Graph

1247 Commits (010497cb5ae50713f0ed4e4c4bf3b860bf751da7)

Author SHA1 Message Date
Timo Teräs 791f93fcbe man pages: make more friendly for help generation
Also few minor fixups added.
2020-05-06 13:05:25 +03:00
Timo Teräs 5258b484bf add script to autogenerate help from man pages
This creates main help like:
--
usage: apk [<OPTIONS>...] COMMAND [<ARGUMENTS>...]

Package installation and removal:
  add        Add packages to WORLD and commit changes
  del        Remove packages from WORLD and commit changes

System maintenance:
  fix        Check WORLD against the system and ensure consistency
  update     Update repository indexes
  upgrade    Install upgrades available from repositories
  cache      Commands related to the management of an offline package cache

Querying package information:
  info       Give detailed information about packages or repositories
  list       List packages matching a pattern or other criteria
  dot        Generate graphviz graphs
  policy     Show repository policy for packages

Repository maintenance:
  index      Create repository index file from packages
  fetch      Download packages from global repositories to a local directory
  manifest   Show checksums of package contents
  verify     Verify package integrity and signature

Miscellaneous:
  audit      Audit directories for changes
  stats      Show statistics about repositories and installations
  version    Compare package versions or perform tests on version strings

This apk has coffee making abilities.
--

And applet specific help like:
--
usage: apk add [<OPTIONS>...] PACKAGES...

Description:
  apk add adds the requested packages to WORLD and installs (or upgrades)
  them if not already present, ensuring all dependencies are met.

Options:
  --initdb         Initialize a new package database
  -l, --latest     Disables normal heuristics for choosing which repository to install a
  -u, --upgrade    When adding packages which are already installed, upgrade them rather
  -t, --virtual NAME
                   Instead of adding the specified packages to WORLD, create a new
  --no-chown       Do not change file owner or group
--
2020-05-06 13:05:19 +03:00
Fredrik Gustafsson d61c009f7a apk: do not manage file ownership as non-root or when asked so
If apk is run as a non-root user, it's not possible to chown files.

Maintainers note: minor wording changes on commit log and man page.

Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com>
2020-04-28 14:48:49 +03:00
Timo Teräs b67df9843d man pages: fix apk-del section in the main index 2020-04-24 11:47:37 +03:00
Fredrik Gustafsson 4856ddff31 man pages: format email addresses consistently
Some email addresses was underlined and some wasn't. Remove underline
from all email addresses to be consistent. The reason for chosing
no underline is that the email address isn't clickable and to be
consistent with the output from git log.
2020-04-21 11:19:06 +03:00
Rasmus Thomsen 47053ede6b build: fix includedir in pkgconfig file
We want to include via <apk/$headerfile> and not via <$headerfile>,
so we want to add an include statement for the dir the apk folder
which contains the headers is contained in.
2020-04-01 19:14:28 +03:00
Timo Teräs d6c54f9320 libfetch: fix no_proxy domain name comparision
Fix comparing of the hostname portion that matches exactly.
The no_proxy matching is pretty rudimentary though and probably
could go through a bit of additional rework.

Fixes #10681
2020-04-01 11:08:43 +03:00
Timo Teräs 845b6397ab db: fix database reading without scripts or triggers
Most notably this happens after blank database is initialized with --initdb,
but can happen also in other conditions.

The error checking changes modified behaviour if the file does not exist.
Explicitly check for ENOENT and ignore it. But the behaviour is improved
from earlier as now e.g. EPERM will be detected and reported correctly.

Fixes #10679

Fixes: 6da3e8eb15 "istream, archive, db: convert db and tar function to use istream"
2020-04-01 10:47:54 +03:00
Timo Teräs eae92bbacf libfetch: fixups to packetization socket option setting
- split the code to a helper function
- do not set sockets to corked state when putting back to
  cache so socket state is always deterministic
- cork/uncork also when sending CONNECT to a proxy, this
  can reduce a little bit the latency how fast the packet
  gets sent out
- also pair corking with uncorking in http_request to make
  it more obvious pairing
2020-03-25 08:50:44 +02:00
Alexander Wauck 09dbe46a76 libfetch: minor HTTP handling improvement
The recent TCP_CORK change missed this bit of code.  This change
should improve performance a bit when making HTTP requests by calling
http_cmd only once instead of three times.
2020-03-25 08:33:37 +02:00
Rasmus Thomsen 104c65ab92 build: add apk.pc.in 2020-03-23 13:44:42 +02:00
Timo Teräs b879d9ea59 build: inspect GitLab CI variables for version string 2020-03-23 13:41:51 +02:00
Timo Teräs 2d86411446 build: fix 'make check' for libfetch 2020-03-23 13:33:51 +02:00
Antoine Fontaine e8522411c1 lower min-width to 25 columns
Some screen size are quite small. For example, the default phosh
terminal is less than 50 character wide on Pinephone. This lowers the minimum
loading bar size to 25 characters.

For comparison, 25 character wide is just as wide as "apk add firefox
linux-lts" without the quotes.

Here's a bad picture to illustrate the result
gitlab.alpine.org/uploads/48c20f746fbf685b62b6bd73585ecbf2/pinephone-phosh.png
2020-03-21 17:41:49 +02:00
TBK a9916c2d4a fix glibc build
fixes #10677

src/apk_defines.h:152:15: error: unknown type name 'uint32_t'
 static inline uint32_t get_unaligned32(const void *ptr)
               ^~~~~~~~
2020-03-21 17:37:47 +02:00
Rasmus Thomsen 4966bc5ede build: enable building of development package
- always create .so and .a with the apk libary code
- create .pc file
- install headers and above mentioned files

Maintainers edit: merged commits, cleaned up sed script logic,
and few other minor fixes.
2020-03-16 15:36:46 +02:00
Jakub Jirutka 8b2efdd272 readme: fix name of doc directory
I'm sorry about that. :/
2020-02-23 18:55:19 +01:00
Jakub Jirutka 48008f9562 readme: rename to .md and add some content 2020-02-23 18:53:14 +01:00
Jakub Jirutka 72944554a6 remove empty NEWS 2020-02-23 18:41:46 +01:00
Jakub Jirutka 63dceba116 fix test6.sh - linux-vanilla was renamed to linux-lts in v3.11 2020-02-23 18:01:43 +01:00
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