Commit Graph
100 Commits
Author SHA1 Message Date
Duncan Overbruck 19f3e519fd lib/transaction_internalize.c: switch out deprecated libarchive function 2021-06-26 19:19:10 +02:00
Duncan Overbruck 9139c4469f lib/transaction_files.c: document some details 2021-06-26 18:58:55 +02:00
Duncan Overbruck 62962208fd lib/transaction_files.c: fix leaving behind obsolete directories
Deleting obsolete directories is different from deleting obsolete files,
files need to be deleted by the first package that might change the file
into a different file type.
Directories need to be deleted by the last package that removes files
out of the directory to avoid ENOTEMPTY if another package has a file in
the given directory which is uninstalled later.

This fixes #282.
2021-06-26 18:58:55 +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 2dc22401d5 lib: drop libarchive compat macros and use non deprecated functions 2021-06-26 18:51:15 +02:00
Duncan Overbruck fcbd7ef042 NEWS: add unpacked state changes 2021-06-26 18:48:50 +02:00
Duncan Overbruck d44aec4ecc tests: add/enable unpacked/unpack-only tests 2021-06-26 18:47:25 +02:00
Duncan Overbruck 92a21db4da lib/transaction_ops.c: do not change the transaction mode of unpacked packages
Those packages are going to be either updated or uninstalled,
changing the transaction type breaks this.
There is no apperent reason to change the type anyways.
2021-06-26 18:46:56 +02:00
Duncan Overbruck 9763a36cea NEWS: add INSTALL/REMOVE script changes 2021-06-26 18:42:43 +02:00
Duncan Overbruck dc0dda15f6 tests: add test for various script actions
Closes: #410 [via git-merge-pr]
2021-06-26 18:41:37 +02:00
Duncan Overbruck 59bcbddcdb lib/package_script.c: xbps_pkg_exec_script: remove useless copy and free 2021-06-26 18:41:37 +02:00
Duncan Overbruck 1f99a099e8 lib: run all post/purge-remove scripts at the end of the transaction 2021-06-26 18:41:37 +02:00
Duncan Overbruck 02367e3c00 lib: run pre-remove and pre-install scripts before unpacking 2021-06-26 18:41:37 +02:00
Duncan Overbruck c94648630c lib/transaction_commit.c: don't configure already unpacked packages early
This makes --unpack-only also skip the configure for currently unpacked
packages and configures unpacked packages together with all other
pckages.
2021-06-26 18:41:37 +02:00
Duncan Overbruck ab3fb82a7f lib: add binary package internalization step
- internalize scripts so we can use them before unpacking packages.
- moves some required metadata checks out of the package unpack stage
  so errors do not leave the system in a half unpacked state.

xbps_transaction_files will be changed later to use the loaded
files.plist instead of opening each binary package on its own again.
2021-06-26 18:41:37 +02:00
Duncan Overbruck c00fe9f3e1 lib/util.c: make is_revision match the code style 2021-06-26 17:14:23 +02:00
Duncan Overbruck 778dbab22b NEWS: update 2021-06-26 17:02:26 +02:00
Duncan Overbruck 72395cdf80 tests: add test for configuration key/value formatting
Closes: #412 [via git-merge-pr]
2021-06-26 17:02:26 +02:00
Duncan Overbruck 248ca4b152 lib/conf.c: cleanup a bit 2021-06-26 17:02:26 +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
Duncan Overbruck e9411eda81 lib: remove mtime updating on unchanged files 2021-06-26 16:55:11 +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
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 OverbruckandJuan RP cb580a5c1a bin/xbps-query: use puts instead of printf("%s\n", ...) 2020-04-19 11:05:00 +02:00
Duncan OverbruckandJuan RP 910bb5674c bin/xbps-query: simplify list printing (with truncation) 2020-04-19 11:05:00 +02:00
Duncan OverbruckandJuan RP 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 OverbruckandJuan RP 58158f28c3 includes/uthash.h: fix -Wcast-qual error 2020-02-23 22:18:34 +01:00
Duncan OverbruckandJuan RP b8e611a149 bin/xbps-fbulk: port to uthash 2020-02-23 22:18:34 +01:00
Duncan OverbruckandJuan RP c3830670f8 lib/transaction_files.c: cleanup memory 2020-02-23 22:18:34 +01:00
Duncan OverbruckandJuan RP 64f96ec940 transaction_files.c: port to uthash 2020-02-23 22:18:34 +01:00
Duncan OverbruckandJuan RP 3ad575178e lib/initend.c: use new xbps_path_* functions 2020-02-14 19:20:54 +01:00
Duncan OverbruckandJuan RP 0f61a1a5a2 lib/util_path.c: add some util functions to work with paths 2020-02-14 19:20:54 +01:00
Duncan OverbruckandJuan RP fbba38b006 lib/util_hash.c: add conditions to avoid misuse without asserts 2020-02-10 15:03:54 +01:00
Duncan OverbruckandJuan RP 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
DuncaenandJuan RP 3854bd103f lib/transaction_fetch.c: fix memory leak 2019-10-25 23:38:01 +02:00
DuncaenandJuan RP 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
DuncaenandJuan RP 6ed0c8c5c5 lib/verifysig.c: add xbps_verify_signature to verify signature against digest 2019-10-25 23:38:01 +02:00
DuncaenandJuan RP 62c1102cc4 lib/util.c: xbps_remote_binpkg_exists to check if signature and binpkg are cached 2019-10-25 23:38:01 +02:00
DuncaenandJuan RP d2bdd9574e lib/download.c: add xbps_fetch_file{_dest,}_digest 2019-10-25 23:38:01 +02:00
Duncan OverbruckandJuan RP 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 OverbruckandJuan RP 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