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
Duncaen
a3af0e5559
lib/fetch: remember if ipv6 or ipv4 are unreachable and don't try to connect again
2019-06-20 11:32:12 +02:00
Duncaen
3527a1374a
lib/fetch: set connect timeout to 300 seconds
2019-06-20 11:32:12 +02:00
Duncaen
27b9da6c9a
tests: don't rely one files mtime
2019-06-18 19:54:22 +02:00
Duncaen
f4bf826c7f
tests: add two more test cases for obsolete files
2019-06-18 19:54:22 +02:00
Duncaen
8837e8c607
lib/transaction_files.c: better handle preserve files
2019-06-18 19:54:22 +02:00
Duncaen
f2b119ef31
lib/transaction_files.c: better error and debug messages and minor cleanup
2019-06-18 19:54:22 +02:00
Duncaen
f6bf9b44ce
tests: add tests for package preserve keyword
2019-06-18 19:54:22 +02:00
Duncaen
3915d523d0
tests: add test for conflicting files in transaction
2019-06-18 19:54:22 +02:00
Duncaen
247463e359
tests: add two new tests for transaction_files
2019-06-18 19:54:22 +02:00
Duncaen
6877d28139
lib/package_find_obsoletes.c: remove in favor of transaction file checks
2019-06-18 19:54:22 +02:00
Duncaen
888289786b
tests: move file type change tests to obsolete files
2019-06-18 19:54:22 +02:00
Duncaen
bf4740040f
tests: Update package to meta moving files to dependency and replaces
...
https://github.com/void-linux/xbps/issues/12
2019-06-18 19:54:22 +02:00
Duncaen
c8ef119f4b
tests: enable debug flag in directory to symlink test
2019-06-18 19:54:22 +02:00
Duncaen
0efb59a979
lib/transaction_files.c: fix undefined behaviour
2019-06-18 19:54:22 +02:00
Duncaen
f45c6798c9
lib/transaction_files.c: update package archive compressions
2019-06-18 19:54:22 +02:00
Duncaen
f5e6d33c6e
tests: update test issue31
2019-06-18 19:54:22 +02:00
Duncaen
69e64e6c21
tests: enable test 'replace directory with symlink'
2019-06-18 19:54:22 +02:00
Duncaen
8a81f6ce86
lib/package_unpack.c: use transaction obsolete detection
2019-06-18 19:54:22 +02:00
Duncaen
658f87b9c5
lib/transaction_files.c: rework to remove obsoletes before unpacking
2019-06-18 19:54:22 +02:00
Duncaen
66e5b721ae
tests: obsoletefiles_test:reinstall_obsoletes add debug flag and different rv
2019-06-18 19:54:22 +02:00
Duncaen
2a9029b736
tests: fix tests; transaction detect if multiple packages install the same file
2019-06-18 19:54:22 +02:00
Duncaen
a19c659616
bin/xbps-install: add the transaction_file states
2019-06-18 19:54:22 +02:00
Duncaen
29f1433afd
lib/transaction_files.c: collect file installs/removals to correctly find obsoletes
2019-06-18 19:54:22 +02:00
Duncaen
91e428d54d
bin/xbps-create: record file size in files.plist
2019-06-18 19:54:22 +02:00
Duncaen
c533f1bd52
tests: change the obsoletefiles tests to have the same mtime
...
This is required because the of reproducibility changes.
2019-06-18 19:54:22 +02:00
Duncaen
3677986c7e
bin/xbps-checkvers: store character returned by fgetc in int
...
The character has to be checked for EOF (-1), otherwise with
architectures that use unsigned char by default this breaks at
compile and runtime.
https://github.com/void-linux/xbps/issues/123
2019-06-18 15:04:47 +02:00
Duncaen
9a2a85d231
NEWS: fixup to add myself where I forgot
2019-06-17 20:34:31 +02:00
Duncaen
b677615565
NEWS: add my merged changes
2019-06-17 20:32:20 +02:00
Duncaen
1037a77000
xbps-checkvers: grow buffer if necessary instead of free/malloc for every file
2019-06-15 23:50:50 +02:00
Duncaen
323ca2f95a
xbps-checkvers: cleanup and check strdup errors
2019-06-15 23:50:50 +02:00
Duncaen
49cc70de9a
xbps-checkvers: rewrite check_reverts without malloc
2019-06-15 23:50:50 +02:00
Duncaen
e495f84954
xbps-checkvers: set rcv->fname when loading from cache
2019-06-15 23:50:50 +02:00
Duncaen
3805fd5297
xbps-checkvers: use proplib data structures and add cache file
2019-06-15 23:50:50 +02:00