Duncan Overbruck
9a30f13300
lib/initend.c: only use uname(3) if native_arch was not set
...
if the configuration file or the env variable is used
we can skip uname(3).
2021-02-04 23:38:32 +01:00
Duncan Overbruck
c6aaafb123
lib/initend.c: allow XBPS{,_TARGET}_ARCH variables to overwrite config
2021-02-04 23:27:11 +01:00
Duncan Overbruck
51b39002e5
Revert "Move all external code to lib/external."
...
This reverts commit 9effec0c4e .
2021-02-04 22:42:57 +01:00
Duncan Overbruck
93410bee7f
Revert "xbps_init: autodetect musl libc variant at compile time."
...
This reverts commit 7f75fd840a .
2021-02-04 22:41:21 +01:00
Duncan Overbruck
05ff04a0fb
tests: new test case for updating "unpacked" packages
2020-07-17 00:37:44 +02: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
Duncan Overbruck
7a1f5424f6
tests: add test case for explicit updates with repolock
...
Introduced from discussion in #273 .
2020-04-22 12:18:09 +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
Duncan Overbruck
df5f2a9378
README.md: add coverity.com badge
2020-04-18 16:13:57 +02:00
Duncan Overbruck
8d3063b5d2
.github/workflows/coverity-scan.yml: do scheduled coverity scan
2020-04-18 15:45:33 +02:00
Duncan Overbruck
c9837b9a9e
.github/workflows/coverity-scan.yml: fix tar
2020-04-18 15:39:00 +02:00
Duncan Overbruck
bed16c48db
.github/workflows/coverity-scan.yml: ignore lock files
2020-04-18 15:29:17 +02:00
Duncan Overbruck
a1f54ea4b6
.github/workflows/coverity-scan.yml: enable tests
2020-04-18 15:23:46 +02:00
Duncan Overbruck
2bc25a3369
.github/workflows/coverity-scan.yml: simplify
2020-04-18 15:17:10 +02:00
Duncan Overbruck
ef4937ecb7
.github/workflows/coverity-scan.yml: fix syntax
2020-04-18 15:10:20 +02:00
Duncan Overbruck
cf59b4a3b1
.github/workflows/coverity-scan.yml: use voidlinux/voidlinux docker container to build
2020-04-18 15:08:38 +02:00
Duncan Overbruck
65cd539f2d
.github/workflows/coverity-scan.yml: once again I'm asking you to do a coverity scan
2020-04-18 14:55:15 +02:00
Duncan Overbruck
13babcb5c0
.github/workflows/coverity-scan.yml: fix url again
2020-04-18 14:49:27 +02:00
Duncan Overbruck
6ff38bc320
.github/workflows/coverity-scan.yml: fix coverity scan tool urls
2020-04-18 14:47:38 +02:00
Duncan Overbruck
2bb6fae5d3
.github/workflows/coverity-scan.yml: fix openssl dependency
2020-04-18 14:44:28 +02:00
Duncan Overbruck
284f41c16c
.github/workflows/coverity-scan.yml: do it on push for now
2020-04-18 14:42:16 +02:00
Duncan Overbruck
537ef657d2
add github action for coverity scan
2020-04-18 14:36:35 +02:00
Duncan Overbruck
ffa5bea178
tests: add expected failure test case for cc alternatives removal
2020-03-25 14:37:31 +01:00
Duncan Overbruck
b0904b32d2
bin/xbps-fetch: fix output when not using shasum mode
2020-03-05 12:53:48 +01:00
Duncan Overbruck
044f75450b
lib/transaction_check_revdeps.c: fix previous fix
...
Don't set transaction type from inside the revdep check,
if the package is being removed then there is not point
in continueing checking if its breaks.
Referencing #245
2020-03-05 00:40:47 +01:00
Duncan Overbruck
aed9402d62
lib/transaction_check_revdeps.c: fix regression in revdeps check
...
this is probably the same as reported in #245 .
Its again not resetting/initializing a variable in a loop,
falling back to the previous set value.
2020-03-04 23:51:06 +01:00
Duncan Overbruck
4d40179a8a
bin/xbps-install: fix regression in small transaction stats
...
fixes #242
2020-03-04 12:46:48 +01:00
Duncan Overbruck
58158f28c3
includes/uthash.h: fix -Wcast-qual error
2020-02-23 22:18:34 +01:00
Duncan Overbruck
b8e611a149
bin/xbps-fbulk: port to uthash
2020-02-23 22:18:34 +01:00
Duncan Overbruck
c3830670f8
lib/transaction_files.c: cleanup memory
2020-02-23 22:18:34 +01:00
Duncan Overbruck
64f96ec940
transaction_files.c: port to uthash
2020-02-23 22:18:34 +01:00
Duncan Overbruck
3ad575178e
lib/initend.c: use new xbps_path_* functions
2020-02-14 19:20:54 +01:00
Duncan Overbruck
0f61a1a5a2
lib/util_path.c: add some util functions to work with paths
2020-02-14 19:20:54 +01:00
Duncan Overbruck
fbba38b006
lib/util_hash.c: add conditions to avoid misuse without asserts
2020-02-10 15:03:54 +01:00
Duncan Overbruck
d99aae586a
lib/download.c: fix digestlen assert and add if condition to avoid misuse
2020-02-10 15:03:54 +01:00
Duncan Overbruck
2ef79bcc09
lib/util_hash.c: change asserts to allow at least X buffer length
2020-02-10 13:32:17 +01:00
Duncan Overbruck
dd4eabe253
include/xbps.h.in: update descriptions for *_sha256* functions and defines
2020-02-10 13:32:17 +01:00
Duncan Overbruck
9efa72f5c8
lib/package_config_files.c: use _get_cstring_nocopy for sha256_orig
2020-02-10 13:32:17 +01:00
Duncan Overbruck
0d90534236
libxbps: ABI/API break due to hash function changes
2020-02-10 13:32:17 +01:00
Duncan Overbruck
aa4d726dca
lib/package_register.c: make sure to error out if copy fails
2020-02-10 13:32:17 +01:00
Duncan Overbruck
dca2223cb7
lib/transaction_store.c: store a copy in transaction packages array
...
This fixes multiple use after frees, found with AddressSanitizers.
* xbps_package_register: the pkgdb dictionary is replaced with
the new one.
* xbps_pkgdb_update: here the pkgdb is externalized, freed and
internalized.
2020-02-10 13:32:14 +01:00
Duncan Overbruck
adebbf71e2
tests: add 3 new test cases for obsolete files with alternatives
2020-02-03 15:33:55 +01:00
Duncan Overbruck
8637269b38
lib/transaction_revdeps.c: fix provides/replaces #218
...
This reverts a change that solved another issue and marks the test case
for the other issue as expected failure.
The other issue is not as important as this, as it blocks updating a lot
of systems.
2020-01-31 16:32:44 +01:00
Duncan Overbruck
8698735939
tests: add testcase for libglnvd replaces/provides from issue #218
2020-01-31 16:28:41 +01:00
Duncan Overbruck
57675c7dfc
lib/fetch: fix CVE-2020-7450
...
https://www.freebsd.org/security/advisories/FreeBSD-SA-20:01.libfetch.asc
2020-01-28 20:29:39 +01:00
Duncan Overbruck
c98d732d9c
bin/xbps-fetch: add a mode that prints sha256sums of downloaded files
2020-01-18 16:44:31 +01:00
Duncan Overbruck
013177cec3
lib/download.c: fix digest for continued downloads
2020-01-18 16:33:58 +01:00
Duncan Overbruck
7493b06cbb
NEWS: add noextract
2020-01-18 15:55:53 +01:00
Duncan Overbruck
6794077efd
Add noextract configuration option
...
Closes #208
Fixes #165
2020-01-18 15:51:13 +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
Duncan Overbruck
7b4a925302
bin/xbps-rindex: better error handling for writing repodata archives
...
This fixes issues when writes fail (as example if the disk is full),
where xbps would create empty repodata or stagedata archives.
2019-10-25 23:36:44 +02:00
Duncan Overbruck
04d5554ed2
bin/xbps-create: better error handling for writing archives
...
This fixes issues where if xbps-create creates a new archive on a full
disk, it will write an incomplete archive and then later fails to be
read by xbps-rindex.
2019-10-25 23:36:44 +02:00
Duncan Overbruck
7b66a2885b
tests: add two more tests for preserving and force removal of conf files
2019-08-06 13:49:51 +02:00
Duncan Overbruck
f0d62b9a80
lib/transaction_files.c: fix conf handling
...
This only changes the debug messages, because modified files and conf
files are handled the same on removal and unless a conf file changes
the file type it is never deleted.
2019-08-06 13:49:42 +02:00
Duncan Overbruck
79467079b2
NEWS: mention pcc
2019-08-05 16:02:53 +02:00
Duncan Overbruck
fa23602561
lib/transaction_files.c: rename remove to removepkg to not shadow remove(3)
2019-08-05 15:56:04 +02:00
Duncan Overbruck
df22b0384d
lib/package_remove.c: fix uninitialized xbps_array_t
2019-08-05 15:48:11 +02:00
Duncan Overbruck
c815d3d5f5
lib/package_remove.c: fix check_remove_pkg_files if euid is 0
...
True means the check failed, false means success
2019-08-05 15:41:23 +02:00
Duncan Overbruck
1d460bc793
bin/xbps-checkvers: make distdir absolute
...
Fixes void-linux/xbps#133
2019-08-05 15:36:27 +02:00
Duncan Overbruck
e59ded73ae
lib/conf.c: don't stop after the first error and print error
...
This fixes void-linux/xbps#153 .
2019-08-05 15:28:24 +02:00
Duncan Overbruck
72c207e0b5
NEWS: update
2019-08-05 15:12:27 +02:00
Duncan Overbruck
745ba32641
lib/package_remove.c: use obsolete_files from transaction
2019-08-05 14:56:21 +02:00
Duncan Overbruck
f0d90d3fec
lib/transaction_files.c: prepare to use obsolete files detection on package removal
2019-08-05 14:55:21 +02:00
Duncan Overbruck
c88f15c8fa
tests: add two new test cases for keep and removal of modified files
2019-08-05 14:45:19 +02:00
Duncan Overbruck
f215411362
tests: add another testcase for transitional package replaces/provides
2019-08-05 14:44:39 +02:00
Duncan Overbruck
b20e1f5192
Revert "tests: add another case to install_and_update_revdeps test"
...
This reverts commit f6bc7f621c .
2019-08-05 11:49:40 +02:00
Duncan Overbruck
f103b91663
Revert "lib/transaction_{revdeps,prepare}.c: try to update packages if necessary"
...
This reverts commit 0e950156fc .
2019-08-05 11:48:15 +02:00
Duncan Overbruck
cb28e7959a
Revert "lib/transaction_ops.c: remove updating all reverse dependencies"
...
This reverts commit 5e4d33a58f .
2019-08-05 11:48:11 +02:00
Duncan Overbruck
4f6a5a51de
tests: obsolete files test to prove that alternatives don't need to be considered
2019-08-02 11:44:26 +02:00
Duncaen
0e950156fc
lib/transaction_{revdeps,prepare}.c: try to update packages if necessary
...
`xbps_transaction_revdeps` will now try to add updates for packages to the
transaction if the dependency is not satisified anymore due to a package
install/update.
`xbps_transaction_prepare` will now check the return value of
`xbps_transaction_revdeps` and repeat the dependency resolution,
until `xbps_transaction_revdeps` returns 0, which means that it didn't
add any new packages to the transaction.
2019-07-03 00:48:57 +02:00
Duncaen
5e4d33a58f
lib/transaction_ops.c: remove updating all reverse dependencies
2019-07-03 00:48:57 +02:00
Duncaen
f6bc7f621c
tests: add another case to install_and_update_revdeps test
...
The new case checks if xbps is smart enough to only update packages that
require an update due to revdep updates.
2019-07-03 00:48:57 +02:00
Duncaen
041eed8255
lib/package_fulldeptree.c: also use the initial item from the hashtable
2019-07-02 09:48:05 +02:00
Duncaen
7c3029589c
lib/package_fulldeptree.c: don't add the package itself to the fulldeptree result
...
This was noticed a few days ago by @leah2.
2019-07-02 09:48:05 +02:00
Duncaen
57256c2328
lib/package_fulldeptree.c: add items to result if they are found in the hashtable
2019-07-02 09:48:05 +02:00
Duncaen
f9233a862c
tests: cover more cases find_pkg_orphans_test:find_all_orphans_test
2019-07-02 09:48:05 +02:00
Duncaen
b60054267b
lib/package_orphans.c: the argument is not UNUSED
2019-07-02 09:48:05 +02:00
Duncaen
7b728f5ac0
bin/xbps-remove: fix skipping executing orphans transaction
2019-06-26 22:24:47 +02:00
Duncaen
cc1c984e9a
tests: add xbps-remove tests
2019-06-26 22:22:44 +02:00
Duncaen
3c07036c24
tests: new obsolete files test with modified files which should catch bug from previous commit
2019-06-26 13:23:18 +02:00
Duncaen
d72091a206
lib/transaction_files.c: fix returning error on hash mismatch
2019-06-26 13:07:16 +02:00
Duncaen
450426a83b
NEWS: add recently merged things
2019-06-23 12:37:14 +02:00
Duncaen
b39e341426
libxbps: don't check revdeps on removal of ignored packages
2019-06-23 12:23:17 +02:00
Duncaen
5fc340a838
tests: add test for removal of ignored package
2019-06-23 12:23:17 +02:00
Duncaen
66f66ab7a1
Revert "xbps_array_foreach_cb_multi: fix incorrect array counter."
...
This reverts commit 08aa44602f .
The element still has to be processed and ignored by one of the
threads, it is not the last entry this will make the actually last item
be ignored.
2019-06-23 11:14:37 +02:00
Duncaen
a4dd0221ac
lib/plist.c: fix xbps_array_foreach_cb_multi processing entries multiple times
...
the first thread to finish will start again from 0 (`reserved`) until
0+slicecount, next thread will then start from the end of the previous
thread which is already wrong, resulting in processing the first
slicecount*maxthreads entries twice.
The first slicecount*maxthreads entries are accounted by the thread
creation loop and `reserved` has to start at the first unaccounted index.
2019-06-23 11:14:37 +02:00
Duncaen
7e762cc357
lib/fetch.c: ignore EADDRNOTAVAIL and try next ip
2019-06-21 20:23:55 +02:00
Duncaen
9c300a93d1
bin/xbps-checkvers: fix --format long form
2019-06-21 00:32:30 +02:00
Duncaen
70867bd774
lib/transaction_files.c: fix size_t printf
2019-06-20 18:04:47 +02:00
Duncaen
dc547d9f50
lib/transaction_files.c: skip preserved files while looking for obsoletes
2019-06-20 14:53:08 +02:00
Duncaen
2cccb31508
tests: add two test cases for obsolete preserved files
2019-06-20 14:53:08 +02:00
Duncaen
093950dba2
lib/fetch: remove port from happy eyeballs verbose logs, wrong cast and redundant
2019-06-20 13:28:14 +02:00
Duncaen
81a736a5ac
lib/fetch: cleanup happy eyeballs and add verbose logging
2019-06-20 12:15:30 +02:00
Duncaen
ebb61edb16
bin/xbps-fetch: restore old behaviour for output file
2019-06-20 11:32:12 +02:00