Commit Graph

1389 Commits

Author SHA1 Message Date
classabbyamp
406f109100 lib/, bin/: fix signature type, now called *.sig2
Since 8d5c48b, xbps has used a sha1 ASN1 prefix with a sha256 hash, and
as of openssl v3, openssl cares about this. This works around that in a
compatible way by moving to a second sig file, binpkg.sig2.

For xbps-remove -O and xbps-rindex -r, also clean up obselete .sig files.
2023-08-30 21:00:37 +02:00
Duncan Overbruck
ee770cb8e4
bin/xbps-remove: allow removing uninstalled packages from the cache
Change "obsolete packages" to "outdated packages" when describing the
old behaviour.
2023-06-24 18:58:22 +02:00
classabbyamp
50fb2017d0 xbps-uhelper: add verbose output for cmpver/pkgmatch
I can never remember which retval means which thing. This only prints if
-v/--verbose is specified.

Examples:
```
$ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 1 2 ; echo ret: $?
1 < 2
ret: 255
$ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 1 1 ; echo ret: $?
1 = 1
ret: 0
$ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 2 1 ; echo ret: $?
2 > 1
ret: 1
$ ./bin/xbps-uhelper/xbps-uhelper -v pkgmatch 'foo-1.0_1' 'foo>=0' ; echo ret: $?
foo-1.0_1 matches foo>=0
ret: 1
$ ./bin/xbps-uhelper/xbps-uhelper -v pkgmatch 'foo-1.0_1' 'foo<0.1_1' ; echo ret: $?
foo-1.0_1 does not match foo<0.1_1
ret: 0
```

it also seems that getting an error from pkgmatch is currently impossible
2023-06-01 20:21:57 +02:00
classabbyamp
79f29ed53e bin/xbps-pkgdb: use -errno values for error states
...when checking a package. This will give more relevant information
than before, removes a message that is misleading in many cases, and
allows for some minor simplification.

before:
```
$ doas xbps-pkgdb runit-void; echo $?
ERROR: runit-void: hash mismatch for /etc/runit/2.
ERROR: runit-void: files check FAILED.
Failed to check `runit-void': Operation not permitted
1
```

after:
```
$ doas xbps-pkgdb runit-void; echo $?
ERROR: runit-void: hash mismatch for /etc/runit/2.
ERROR: runit-void: files check FAILED.
1
```

this does not change the behaviour of `xbps-pkgdb -a`
2023-05-30 21:20:05 +02:00
classabbyamp
426b3090f8 bin/xbps-create/xbps-create.1: add --sourcepkg, alphabetise
for #538

alpha order used: shortopts (upper before lower for each letter), then longopts
2023-02-15 21:46:51 +01:00
Duncan Overbruck
e0144062a4 bin/xbps-create: add sourcepkg metadata variable
This can be used similar to source-revisions, it should be set to the
pkgver of the template. This then allows to find removed subpackages by
looking for packages with outdated sourcepkg versions.
2023-02-15 21:46:43 +01:00
Duncan Overbruck
be2525adc0
bin/xbps-uhelper: format usage like other xbps binaries 2023-02-11 21:32:36 +01:00
classabbyamp
9056a63701 bin/xbps-uhelper/xbps-uhelper.1: add manpage 2023-02-11 19:32:44 +01:00
classabbyamp
6010b9f091 bin/xbps-uhelper: add longopts for -CdrV
also adjust help output to be more clear, and removed examples (moving
those to the manpage)
2023-02-11 19:32:44 +01:00
classabbyamp
1271a3dbed bin/: use xbps logging functions more 2023-02-11 14:23:51 +01:00
classabbyamp
7391a7b213 bin/xbps-uhelper: add getname and getversion actions
these actions are kind of "meta" actions, combining getpkgdepname and
getpkgname (and the respective version actions) so that a list of mixed
pkgvers and package patterns can be interpreted. This uses the internal
format check of `xbps_pkgpattern_{name,version}()` to allow for a
fallback to `xbps_pkg_{name,version}()` for exact versions, then falls
back to displaying an error message if that also fails.
2023-02-10 21:34:16 +01:00
classabbyamp
83e66e215a bin/xbps-uhelper: allow multiple arguments for many actions 2023-02-10 21:34:16 +01:00
classabbyamp
06fbbba2e5 manpages: small formatting improvements
- use `.Os` to show "Void Linux" in the footer
- use `Aq Mt` to display email addresses
- use `.Lk` for the bug link
- remove unnecessary use of `.Nm <name>` when already defined
- add xbps-alternatives(1) to SEE ALSO where missing
- bump date
2023-02-10 21:33:51 +01:00
Duncan Overbruck
a1a0167d80
add XBPS_SYSLOG environment variable to overwrite configuration 2022-12-24 14:29:24 +01:00
Duncan Overbruck
d962eaaf3c
lib: remove xhp argument from xbps_pubkey2fp 2022-12-24 14:29:24 +01:00
Duncan Overbruck
9efba6749f
lib: remove xhp argument from xbps_plist_{array,dictionary}_from_file 2022-12-24 14:29:24 +01:00
Duncan Overbruck
de484e9369
lib: change xbps_dbg_printf to not require xbps_handle
This allows to simplify a lot of code by not having to pass around
the xbps handle everywhere just to print some debug information.
2022-12-24 14:29:23 +01:00
Duncan Overbruck
1a3d1ea56c
bin/xbps-create: unify error messages and replace asserts with error checks 2022-12-22 22:16:47 +01:00
Duncan Overbruck
c70c55b19a
bin/xbps-create: cleanup filetype handling 2022-12-22 22:00:47 +01:00
Duncan Overbruck
9a46051499
bin/xbps-create: cleanup readlink related code 2022-12-22 21:42:32 +01:00
classabbyamp
be7e532c3c xbps-reconfigure: add ability to reconfigure dependencies
adds `-x/--deps` and `--fulldeptree`, that behave similar to the xbps-query modes

fixes #464
2022-12-22 13:47:33 +01:00
classabbyamp
0d0a2b9657 bin/xbps-rindex/remove-obsoletes.c: always opendir() pwd
If repodir is given as a relative path, it will not work because it will
try to open the dir relative to itself because it already chdir()ed into
repodir. This fixes xbps-rindex -r when relative paths are specified.

fixes #519
2022-12-09 20:45:29 +01:00
Michal Vasilek
d3b55df51b xbps-install: fflush before asking for confirmation
Closes #469
2022-06-21 13:39:31 +00:00
oopsbagel
0158000c03
bin/xbps-fetch: fix unreachable fetch result code
This commit restores the formerly unreachable code path handling the
case where the local file is identical with the remote file.

Fixes bug introduced in 66f84a8b59
2022-06-21 15:32:04 +02:00
Quentin Rameau
838fea7178
xbps-query.1: Fix PROPERTIES section
After checking in the source the actually exported fields,
a few of them don't exist anymore and a few were omitted.
Also fixed some orthographic/syntax typos.
2022-05-02 15:48:43 +02:00
Quentin Rameau
2f7feb8074
xbps-query.1: new section: PROPERTIES 2022-03-16 04:19:14 +01:00
Duncan Overbruck
65afbadf08
bin/xbps-query: fix memory leak in --list-repos 2022-01-25 19:46:12 +01:00
Piotr Wójcik
ce4fd6a63c
xbps-query: list unavailable repositories in -L mode 2022-01-25 15:32:23 +01:00
Duncan Overbruck
f5355e53cd
xbps-query: add repo and pkgdb mode to --cat 2021-12-28 15:45:21 +01:00
Duncan Overbruck
10bfeec8a3
bin/xbps-remove: avoid allocations while cache cleaning 2021-12-27 18:37:47 +01:00
Duncan Overbruck
4fb621c6c5
bin/xbps-remove: error logging for cache cleaning
Fixes #357
2021-12-25 16:07:20 +01:00
meator
b1dfdfce25 xbps-create: fix typo in manpage 2021-10-13 18:16:41 +02:00
Érico Nogueira
587856eb89 xbps-install.1: improve description for -y.
It is a common confusion that --yes should also accept new signing keys;
it really shouldn't, so document that explicitly. Also explain how to
tell XBPS about trusted keys.
2021-06-28 00:25:18 +02:00
Duncan Overbruck
a8d095a2ba
bin/xbps-rindex: drop libarchive compat macros
Closes: #411 [via git-merge-pr]
2021-06-26 18:51:15 +02:00
Duncan Overbruck
02367e3c00
lib: run pre-remove and pre-install scripts before unpacking 2021-06-26 18:41:37 +02:00
Juan RP
46b7057d91
Fix signed vs unsigned char issues found by NetBSD. 2021-06-26 17:13:01 +02:00
Piotr Wójcik
18416e2de8
xbps-checkvers: list installed subpackages
Subpackages without main package installed wasn't reported
at all. This can produce duplicates in output, but checkvers'
output isn't good to loop over without passing through
./xbps-src sort-dependencies anyway.

Closes: #404 [via git-merge-pr]
2021-06-26 16:58:45 +02:00
Duncan Overbruck
f86aeebd3e
bin/xbps-create: stop storing mtime in files.plist
Closes: #390 [via git-merge-pr]
2021-06-26 16:55:11 +02:00
Duncan Overbruck
cdb0121a99
bin/xbps-pkgdb: we don't rely on mtime anymore, the check is useless 2021-06-26 16:55:11 +02:00
Piotr Wójcik
379cd4da2c
xbps-install: in dry run mode, print transaction even when disk is full
Closes: #322 [via git-merge-pr]
2021-06-26 16:51:43 +02:00
Daniel T. Borelli
024c4cc75d
bin/xbps-create: fix incorrect assert variable
Closes: #309 [via git-merge-pr]
2021-06-26 16:50:05 +02:00
Duncan Overbruck
66f84a8b59
bin/xbps-fetch: exit with failure if there was a failure in any of the downloads 2021-06-26 16:47:25 +02:00
Duncan Overbruck
9cd3f8d0bf
bin/xbps-fetch: fix printing uninitialized shasum in error cases 2021-06-26 16:45:10 +02:00
Duncan Overbruck
5dbe040b75
xbps-install.1: fix lint warnings 2021-06-26 16:43:07 +02:00
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