Juan RP
ef9260a16e
libxbps: fix for vpkg providers in multiple repos.
...
Added new test case by @st3r4g via #206
Closes #206
2020-01-18 12:50:59 +01:00
Juan RP
5ff3ab5c60
transaction_revdeps: do not skip pkgs that are being updated.
...
Modified the test case with changes by @duncaen.
Closes #205
2020-01-18 08:58:54 +01:00
Juan RP
feece576b3
xbps_dbg_printf{,_append}: return if xhp is NULL.
...
assert() here was totally wrong, better to catch
this in all cases (NDEBUG does not change the behaviour).
2020-01-11 09:48:38 +01:00
Piotr Wójcik
6cf1555398
Revert "libxbps: verify repodata signatures even if rootdir is unset."
...
This reverts commit be05118aa8
.
2020-01-06 15:33:25 +01:00
Juan RP
615b6ce7e9
xbps_repo_fetch_remote: use XBPS_REPOIDX_META.
2020-01-06 15:09:16 +01:00
Juan RP
850ba2d416
Revert the repodata signature stuff.
2020-01-06 14:56:01 +01:00
Juan RP
79321f3ff0
Revert "Verify index-meta for in-memory sync"
...
This reverts commit a1481cb285
.
2020-01-06 14:52:06 +01:00
Juan RP
e04cb2fa24
Revert "Read also unsigned index-meta"
...
This reverts commit 61ef5c3f8a
.
2020-01-06 14:50:32 +01:00
Juan RP
8b2c62adfc
Revert "Verify index-meta"
...
This reverts commit 09125769bd
.
2020-01-06 14:48:39 +01:00
Juan RP
2884fc3ab7
Revert "Don't assume repodata is signed when has index-meta.plist"
...
This reverts commit 4e3d4d2287
.
2020-01-06 14:45:57 +01:00
Juan RP
5f1f87eeb8
Revert "Use predefined constant in place of magic string"
...
This reverts commit ce4873a1f1
.
2020-01-06 14:34:22 +01:00
Juan RP
d2208f91e0
Revert "Verify repodata signature"
...
This reverts commit a7830cf780
.
2020-01-06 14:33:49 +01:00
Juan RP
b4fdc39e67
Revert "Sign repodata"
...
This reverts commit 04194f44c8
.
2020-01-06 14:31:40 +01:00
Juan RP
d5e91cb7d8
xbps_transaction_store: fix memleak.
2020-01-06 12:47:13 +01:00
Juan RP
802a6eae09
xbps_dbg_printf{,_append}: add assertion
2020-01-06 12:10:47 +01:00
Juan RP
10075c28e5
libxbps: ignore indirect broken revdeps while updating xbps.
...
This fixes the long standing issue that has been a plague for
a long time.
See the test case for more information.
2020-01-04 13:01:28 +01:00
Juan RP
d68ff7ebf0
xbps-install: fix --reproducable.
...
The 'repository' obj also needs to be skipped to be fully
reproducable between different repositories.
Updated the test case accordingly.
2019-12-29 16:31:23 +01:00
Juan RP
95a3ba651f
libxbps: added XBPS_FLAG_INSTALL_REPRO for xbps_handle::flags.
...
If set, enable reproducible mode; skips adding the
"install-date" obj into pkgdb.
2019-12-29 11:02:51 +01:00
Juan RP
166caab986
Do not silently update xbps on any install/update transaction.
...
When there's a new xbps update, xbps-install(1) will now return
EBUSY (16) and a message (if dry-run disabled) explaining
how to proceed.
If there's an update and transaction does not contain xbps, it will
error out unless the 'xbps' pkg is the only target pkg, i.e:
# xbps-install -Su
# echo $?
16
To update xbps, the only way to proceed is to explicitly declare
it as an update, i.e:
# xbps-install -u xbps
The dry-run mode will still show there's an xbps update.
Modified the existing test cases to satisfy the new behaviour.
Closes #166
Closes #142
2019-12-27 21:35:40 +01:00
Juan RP
c81a2806ff
xbps_transaction_prepare: optimize a bit.
...
If all packages in transaction are on hold, there's no
need to check for conflicts, shlibs, etc.
This makes `xbps-install -un` work faster on my system:
~0.450ms -> ~0.250ms
There's still room for more improvements :-)
2019-12-27 21:32:54 +01:00
Juan RP
73e0668840
libxbps: fix issue found by the recent glvnd switch.
...
See the new test case for details, but this simulates
the recent glvnd switch, with mesa, nvidia and libglvnd.
Thanks @st3r4g for the fix! this indeed fixes the new test case.
Close #186
2019-12-27 20:25:05 +01:00
Juan RP
2f51b4c0bc
xbps_init: fix warning on glibc.
2019-12-27 16:23:56 +01:00
Juan RP
7f75fd840a
xbps_init: autodetect musl libc variant at compile time.
...
This way we don't need to set the 'architecture' xbps.d
setting when the binaries are compiled for musl.
Close #195
2019-12-27 16:23:56 +01:00
Juan RP
66b07bb795
xbps_array_foreach_cb_multi: fix previous.
2019-12-27 16:22:40 +01:00
Juan RP
f5d93caf15
xbps_array_foreach_cb_multi: improve previous (v2).
...
As suggested by @CasperVector reuse the 'i' var to
wait for threads that were created successfully.
2019-12-27 15:47:43 +01:00
Juan RP
a3a1c372cb
xbps_array_foreach_cb_multi: improve previous.
...
Do not wait for the other threads to finish, just exit early.
2019-12-27 15:19:22 +01:00
Juan RP
08a1c61a4d
xbps_array_foreach_cb_multi: error out if pthread_create(3) fails.
...
We do not want to continue processing more threads
if pthread_create(3) fails, rather return an error.
This is for #182 but not yet fixed, there might be a
memleak somewhere.
2019-12-27 14:27:51 +01:00
Juan RP
0e1482917a
Fix maybe-uninitialized warnings detected by LTO.
2019-12-27 10:53:10 +01:00
Piotr Wójcik
26d853751e
lib/util.c: relax revision check to match existing data
2019-12-14 12:07:12 +01:00
Juan RP
be05118aa8
libxbps: verify repodata signatures even if rootdir is unset.
...
xbps-rindex(1) has a -r option that sets the remove mode,
due to the changes added to sign repodata we need to access
to the correct directory where repository public keys are
stored. This makes the code use `$PWD/keys` before falling
back to `metadir`.
Fixes the test suite to run with unprivileged users (non root).
2019-11-24 12:52:50 +01:00
Juan RP
f723edbca1
trans/revdeps: ignore pkgs on hold.
...
shlib checking is still performed later on...
2019-11-24 11:44:21 +01:00
q66
85b8b3bbb7
lib/package_alternatives.c: prune obsolete alternatives groups
...
In the edge case when an updated package has different (or no)
alternatives groups, make sure to prune those that are in pkgdb
but not in the newly installed package.
A potentially common case of this is when a package that formerly
had alternatives gets removed and a transitional metapackage
takes its place (which has no alternatives).
When the new package has no dependencies, oldest next possible
alternatives group will be used. This is because that indicates
a removed package. When there are dependencies, the newest one
will be used; as this indicates a transitional package.
2019-11-17 13:22:15 +01:00
Piotr Wójcik
a1481cb285
Verify index-meta for in-memory sync
2019-11-02 11:53:14 +01:00
Piotr Wójcik
61ef5c3f8a
Read also unsigned index-meta
2019-11-02 11:53:14 +01:00
Piotr Wójcik
09125769bd
Verify index-meta
2019-11-02 11:53:14 +01:00
Piotr Wójcik
4e3d4d2287
Don't assume repodata is signed when has index-meta.plist
2019-11-02 11:53:14 +01:00
Piotr Wójcik
381b7b7600
Sign index-meta
2019-11-02 11:53:14 +01:00
Piotr Wójcik
b4e93a95bf
Turn off repodata signing
2019-11-02 11:53:14 +01:00
Piotr Wójcik
ce4873a1f1
Use predefined constant in place of magic string
2019-11-02 11:53:14 +01:00
Piotr Wójcik
a7830cf780
Verify repodata signature
2019-11-02 11:53:14 +01:00
Piotr Wójcik
04194f44c8
Sign repodata
2019-11-02 11:53:14 +01:00
Juan RP
6886a73288
Bump to 0.57.1 and libxbps micro.
2019-10-27 09:50:11 +01:00
Juan RP
b9b6f43300
package_script.c: fix runtime with tcc
...
Making `shells` a global declaration does not seem to make tcc happy, so make this a local variable in `xbps_pkg_exec_buffer` instead.
2019-10-27 09:38:50 +01:00
Enno Boland
bc59d0b407
lib/package_script.c: try to find a usable shell instead of using /bin/sh
2019-10-27 09:38:50 +01:00
Juan RP
98e09e01e1
lib/package_alternatives.c: check if alternative is a symlink before removing it
...
Original commit by @duncaen ... but couldn't find this anywhere.
2019-10-27 08:44:37 +01:00
Duncaen
3854bd103f
lib/transaction_fetch.c: fix memory leak
2019-10-25 23:38:01 +02:00
Duncaen
143b13f9e6
lib/transaction_fetch.c: move fetch and verify binpkgs and make use of xbps_fetch_file_digest
2019-10-25 23:38:01 +02:00
Duncaen
6ed0c8c5c5
lib/verifysig.c: add xbps_verify_signature to verify signature against digest
2019-10-25 23:38:01 +02:00
Duncaen
62c1102cc4
lib/util.c: xbps_remote_binpkg_exists to check if signature and binpkg are cached
2019-10-25 23:38:01 +02:00
Duncaen
d2bdd9574e
lib/download.c: add xbps_fetch_file{_dest,}_digest
2019-10-25 23:38:01 +02:00