Commit Graph

1345 Commits

Author SHA1 Message Date
Alexis
c797c7fbc4
xbps-install.1: Add further details about -n.
Closes: #281 [via git-merge-pr]
2021-06-26 16:29:41 +02:00
Érico Nogueira
b18499a62d
bin/xbps-query: use fwrite directly.
Avoids allocations and an unnecessary loop (and printf usage, fputs
would have been enough).

Closes: #401 [via git-merge-pr]
2021-06-26 16:07:59 +02:00
Érico Rolim
d8cf66ce36
xbps-checkvers.1: fix case of -I option.
Closes: #307 [via git-merge-pr]
2021-02-04 23:49:30 +01:00
Piotr Wójcik
b26f4068b7
xbps-install: list reinstalled packages
Before, they weren't printed at all.
Additionally, this matches count from compute_transaction_stats.

Closes: #321 [via git-merge-pr]
2021-02-04 23:16:50 +01:00
Arsen Arsenović
1263b6607f
bin/xbps-rindex: fix a leak in load_rsa_privkey
Closes: #327 [via git-merge-pr]
2021-02-04 23:15:36 +01:00
Érico Rolim
2047dac6a0
xbps-fetch: use standards compliant struct initializer.
Initializing structs with '{}' is supported on most compilers, but not
defined in the standard. The correct initializer for this is '{0}'.

Spotted with cproc.
2021-02-04 23:09:36 +01:00
Érico Rolim
47df729bcc
tree-wide: remove unnecessary __UNCONST usage. 2021-02-04 23:02:39 +01:00
Duncan Overbruck
44cd938115
Revert "Use shared LICENSE file for all xbps code."
This reverts commit be7d8cfaf1.

This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
2020-04-29 14:12:10 +02:00
Juan RP
be7d8cfaf1
Use shared LICENSE file for all xbps code. 2020-04-24 11:44:19 +02:00
Juan RP
530e79c7ee
Fix warnings detected by LTO. 2020-04-23 08:32:54 +02:00
Juan RP
c488b17ca9
xbps-query.1: new section: PACKAGE MODES.
- Fix mandoc(1) warnings.
- Document --list-repolock-pkgs.
2020-04-23 07:18:57 +02:00
Juan RP
3731f12c91
xbps-install.1: new section: PACKAGE MODES.
Fix mandoc(1) warnings as well.
2020-04-23 07:18:25 +02:00
Juan RP
7d8247ae56
Multiple changes to pkgs on hold mode.
- Added transaction stats for pkgs on hold.

- Always add packages on hold to the transaction dictionary,
  its type will be set to XBPS_TRANS_HOLD.

- Changed xbps_transaction_update_pkg() to have a new "force"
  bool argument to force an update with a pkg on hold.

- As discussed in #274 with @Duncaen the only way to update a
  pkg on hold is by using `-f`, i.e `xbps-install -f foo`.

Closes #265
Closes #274
2020-04-23 06:03:56 +02:00
Juan RP
9b695433a0
bin: sync usage and keep it consistent in all utils. 2020-04-20 21:25:14 +02:00
Juan RP
0b62ba8592
xbps-fbulk: fix usage. 2020-04-20 18:55:44 +02:00
Juan RP
1f4cfc377b
xbps-fbulk: misc changes (v3).
- Re-add original behaviour now I fixed the real issue for missing
  logs. Keep the build/run pipeline full as soon as possible.
- Added -s, --system. System build mode. To only build pkgs that
  are installed manually in your system.
- Added long options; sync usage.
- Restrict max jobs to ncores; there are issues with shared data,
  and until they are resolved this is the only way to make it work
  reliably.
2020-04-20 18:50:11 +02:00
Juan RP
a1d66032bd
xbps-uchroot: support long options; update usage. 2020-04-20 15:12:44 +02:00
Juan RP
213ce1a72b
xbps-rindex/remove-obsoletes.c: fix CID 284947 (Resource leak). 2020-04-20 10:34:08 +02:00
Juan RP
debfcf1273
Use xbps_repo_release() where applicable. 2020-04-19 11:09:05 +02:00
Duncan Overbruck
cb580a5c1a bin/xbps-query: use puts instead of printf("%s\n", ...) 2020-04-19 11:05:00 +02:00
Duncan Overbruck
910bb5674c bin/xbps-query: simplify list printing (with truncation) 2020-04-19 11:05:00 +02:00
Duncan Overbruck
a2c7f5fc29 bin/xbps-query: simplify search result printing (with truncation)
This should also fix a useless error from lgtm
2020-04-19 11:05:00 +02:00
Juan RP
b9fb5e1cc8 xbps-uchroot: support read-only bind mounts, misc improvements.
- Added -B src:dest (like -b) but this makes bind mounts in
  read-only mode.

- Get rid of setfsuid(), it's unnecessary.

- Make sure chrootdir is not '/', use realpath().

- Always set SECBIT_NOROOT, see capabilities(7).

- Do not mount recursively, right now this only mounts
  /dev (ro), /dev/shm (rw), /sys (ro) and /proc (ro).
  Previously any mount below any specific mount were recursively
  mounted in chrootdir.
2020-04-14 20:01:44 +02:00
Juan RP
ae87662547 xbps-fbulk.1: sync with reality. 2020-04-14 19:57:23 +02:00
Juan RP
da2c104d16 xbps-fbulk: calloc -> malloc.
No need to use calloc here because its members are initialized
later on.
2020-04-14 19:57:23 +02:00
Juan RP
5d81aec07f xbps-fbulk: create log files with txt extension. 2020-04-14 19:57:23 +02:00
Juan RP
4f8e07aa64 xbps-fbulk: parallel working implementation.
- Removed -a, this won't work due to dependency cycles between
  host/target.
- Do the process in two steps: collect deps and then build.
- Cleaned up the whole code.
2020-04-14 19:57:23 +02:00
Juan RP
743e76938f
xbps-install: fix regression in stats.
Updated packages will also be configured, so take this into
account in the stats.
2020-03-31 17:26:38 +02:00
Duncan Overbruck
b0904b32d2
bin/xbps-fetch: fix output when not using shasum mode 2020-03-05 12:53:48 +01:00
Duncan Overbruck
4d40179a8a
bin/xbps-install: fix regression in small transaction stats
fixes #242
2020-03-04 12:46:48 +01:00
Juan RP
7f0a5b5c38
xbps-fetch.1: bump date 2020-03-03 08:27:11 +01:00
Juan RP
57bf913d6c
xbps-install.1: document TIMEOUT_CONNECTION. 2020-03-03 08:26:29 +01:00
Piotr Wójcik
5737d9a941 xbps-fetch: TIMEOUT_CONNECTION to customize time waiting for response 2020-03-03 08:15:00 +01:00
Roman Neuhauser
f477465803 xbps-install: -R/--repository usage string format
same as in other options that take arguments
2020-02-28 09:37:53 +01:00
Roman Neuhauser
d282016c3e xbps-install.1: fix docs for -R
previous text seems to have been copypasted from xbps-query.1
2020-02-28 09:37:53 +01:00
Duncan Overbruck
b8e611a149 bin/xbps-fbulk: port to uthash 2020-02-23 22:18:34 +01:00
Juan RP
6236d7ae41 xbps-query/search.c: use unsigned int and remove wrong cast. 2020-02-22 14:25:22 +01:00
Juan RP
68747a12e4
xbps-query: make -S (show mode) print all properties.
run_depends was being skipped, but there's not any reason
to skip this even if there's -x.

Just print any property available in its pkgdb dictionary.
2020-02-22 11:39:29 +01:00
Juan RP
bc9fab5ee8
bin: use unsigned int rather than size_t.
unsigned int is a 32-bit value both on 32/64-bit targets.
2020-02-22 11:29:18 +01:00
Juan RP
c031ee6945 bin: use size_t where applicable.
To make sure we don't get a negative value due to overflowing.
2020-02-22 11:18:57 +01:00
Juan RP
5a6709b560
xbps-install/transaction: fix for all_pkgs_on_hold.
If all pkgs are on hold in transaction skip stats
and return early.
2020-02-22 10:51:27 +01:00
Juan RP
0788cd1f42 xbps-{create,rindex}: use zstd by default.
Closes #35
2020-02-22 09:27:46 +01:00
Juan RP
06c9891ae3 xbps_transaction_*: multiple performance improvements (v2).
This commit implements multiple performance improvements
to the transaction code:

- Don't process xbps_pkg_name() N times each time we access
  its package dictionary (via pkgdb or rpool), just do it once
  at xbps_pkgdb_init() time. At pkgdb init time, it just creates
  a property in pkgdb, "pkgname". At rpool time, each time a
  package is accessed, the "pkgname" string property is added.

- The package transaction dictionary contains the "transaction"
  object to know what's the pkg type. This has been changed to an
  uint8, this simplifies the logic and it's faster than checking
  a string object. See xbps_trans_type_t and xbps_transaction_pkg_type().

- Fixed the issue that was marked with XXX in transaction shlibs
  checking code. This has been fixed and improved and resources are
  now just freed as expected.

- Simplified random code all over the place, avoiding unnecessary
  allocations or operations.

- Rename some transaction files to have a better description.

This is my first rototill to the code in 2020.
2020-02-21 09:37:32 +01:00
sineemore
701132071d xbps-install: show overall download progress 2020-02-19 00:28:40 +01:00
Juan RP
28154f488c xbps-uchroot: fix indentation 2020-02-13 09:06:29 +01:00
Juan RP
6ccee8fd5e xbps-uchroot: overlayfs fixes v2.
- Do not use nftw(3), this won't clean up the tree properly.
  Rather use scandir(3) with alphasort, like xbps-create(1).

- Don't drop privs in the parent to make sure that the
  temp overlayfs tree can be removed properly.

This fixes the issues while building go modules and others
with xbps-src.
2020-02-13 09:06:29 +01:00
Duncan Overbruck
0d90534236
libxbps: ABI/API break due to hash function changes 2020-02-10 13:32:17 +01:00
Juan RP
71a594f681
Revert "xbps-uchroot: make sure to cleanup tempdir with overlayfs."
This reverts commit f6a6385b42.

Does not work as expected, and does not fix the real issue
which is still not understood.
2020-02-08 20:43:23 +01:00
Juan RP
6010a24de6 libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were
using malloc(3) to return the result, until now.

They now have been changed to not allocate the result
via malloc, the caller is responsible to provide a buffer
at least of XBPS_NAME_SIZE (64).

If for whatever reason the pkgname can't be guessed,
returns false. This should avoid lots of small allocs
around libxbps.

New functions have the following prototype:

bool xbps_pkg_name(char *dst, size_t len, const char *pkg)
bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg)

as suggested by @duncaen.
2020-02-08 19:49:57 +01:00
Juan RP
7d934c9290
xbps-create: fix two issues detected by lgtm 2020-02-07 17:16:47 +01:00