Commit Graph
100 Commits
Author SHA1 Message Date
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
Duncaen 26cc209225 xbps-checkvers: remove magic buffer and use fwrite for %t format 2019-06-15 23:50:50 +02:00
Duncaen dfa6e80d13 xbps-checkvers: add %t format to get requested template name from path (ie subpackage) 2019-06-15 23:50:50 +02:00
Duncaen db2eb29cbc xbps-checkvers: add --format 2019-06-15 23:50:50 +02:00
Duncaen 5dfaf5c075 xbps-checkvers: allow files argument to be paths or package name 2019-06-15 23:50:50 +02:00
Duncaen b2f5afd02e lib/repo: add xbps_repo_remove and use it in xbps_rpool_foreach
https://github.com/void-linux/xbps/issues/3
2019-06-15 21:11:07 +02:00
Duncaen 104e8393f3 lib/fetch: fix happy eyeballs without any usable addresses and catch more errors 2019-06-15 19:19:40 +02:00
Duncaen 8018833010 lib/fetch: add FORCE_IPV{4,6} environment variables 2019-06-15 19:19:40 +02:00
Duncaen 45fc07260c xbps_binpkg_exists: fix access() on remote packages and avoid malloc 2019-06-14 23:21:06 +02:00
Duncaen 008e1ed901 lib/external/fexec.c: run child with 022 umask 2019-06-14 21:09:15 +02:00
Duncaen c3f6f485a3 lib/repo_sync.c: set umask before creating repo cache directories 2019-06-14 21:08:55 +02:00
Duncaen f18cf87e3a xbps-checkvers: fix bug noticed by fixing another bug 2019-06-13 23:32:58 +02:00
Duncaen 684d2a7187 xbps-checkvers: only allocate if $ is in the current line
Before this commit, it would have seen $ from following lines
and thinks it needs to substitute variables.
2019-06-13 23:32:58 +02:00
Duncaen 0691054a59 xbps-checkvers: try to not see something like ${var##foo} as comment 2019-06-13 23:32:58 +02:00
Duncaen 204b9b630a xbps-checkvers: rewrite shell substitution without buffer guessing 2019-06-13 23:32:58 +02:00
Duncaen 93c6825520 xbps-checkvers.1: mention --manual 2019-06-13 20:12:05 +02:00
Duncaen 5bed1a775c xbps-checkvers: make usage look more like all tools 2019-06-13 20:12:05 +02:00
Duncaen 597c0119dd xbps-checkvers: simplify print logic 2019-06-13 20:12:05 +02:00
Duncaen abdd1047eb xbps-checkvers: use xbps_repo_store 2019-06-13 20:12:05 +02:00
Duncaen 260d21877f tests/xbps-checkvers: add --manual mode test 2019-06-13 20:12:05 +02:00
Duncaen a99283bcdb xbps-checkvers: add --manual flag to only process listed templates 2019-06-13 20:12:05 +02:00
Duncaen 121d0fbb64 tests: add test for removing package with ignored dependency 2019-06-02 18:24:03 +02:00
Duncaen 33fbe8a5ef fulldeptree: ignore missing local runtime dependencies
They most likely come from `ignorepkg` and without this patch
operations xbps-remove -R aborts if a dependency was ignored
at install time.
2019-05-27 12:41:39 +02:00
Duncaen 67badf983b lib/conf.c: ignore glob errors 2019-05-22 15:05:45 +02:00
Duncaen 79317563e9 lib/conf.c: fix including absolute paths 2019-05-22 15:05:45 +02:00
Duncaen 3533af846f tests: add tests for absolute configuration include 2019-05-22 15:05:45 +02:00
Duncaen 85bf13f138 lib: move conf parsing to lib/conf.c and refactor to not rely on getcwd/chdir
This fixes https://github.com/voidlinux/xbps/issues/158
2019-05-22 13:22:10 +02:00
Duncaen 456f775e4d alternatives: don't switch unchanged alternative groups on removal
Closes: #82 [via git-merge-pr]
2019-04-22 14:51:32 +02:00
Duncaen 4162ec2bd6 tests: add test for useless alternative switch on package removal 2019-04-22 14:51:32 +02:00
Duncaen a65630df03 tests: fix ingorepkg tests 2019-04-20 11:53:06 +02:00
Duncaen bd616aa901 xbps-pkgdb: add alternatives check
Closes #66
2019-04-20 11:07:00 +02:00
Duncaen ea2cb1d369 unpack: keep conf_files replaced with symlinks, unpack as .new-pkgver 2019-04-20 10:56:08 +02:00
Duncaen 2ad2659d4c tests: disable failing test 2019-04-20 10:54:51 +02:00
Duncaen cd4c07a467 libxbps: sane umask for pkgdb and files plists 2019-04-20 10:46:59 +02:00
Duncaen 4999f3f2fc tests: add xbps-install update test (replace directory with symlink) 2019-04-20 10:46:59 +02:00
Duncaen d1667fd931 Add the ability to ignore packages
The previous idea was to use virtual packages in the users configuration
to satisfy dependencies by mapping them to existing installed packages.
Using virtual packages for it doesn't work as expected and trying to make
it work would break other functionalities of virtual packages, like the
version satisfaction checks for `provides` and the ability to replace
virtual packages with real packages. The virtual package functionality
should be used exclusively for virtual packages.

This allows users to specify packages packages that should be ignored.
Ignored packages in dependencies are always satisfied without installing
the package, while updating or installing a package that depends on an
ignored package.

This does NOT ignore the shlib checks, ignoring a package that provides
required shared libraries will abort the transaction as if there was no
package that provides the required shared library.
2019-04-19 23:07:59 +02:00
Duncaen 9f52a7837f lib/fetch: add happy eyeballs connect algorithm (RFC6555/RFC8305)
Connect to the addresses from `getaddrinfo(3)`,
alternating between address family,
starting with ipv6 and wait `fetchConnDelay`
between each connection attempt.

If a connection is established within the attempts,
use this connection and close all others.

If `connect(3)` returns `ENETUNREACH`, don't attempt more
connections with the failing address family.

If there are no more addresses to attempt,
wait for `fetchConnTimeout` and return the first established
connection.

If no connection was established within the timeouts,
close all sockets and return -1 and set errno to
`ETIMEDOUT`.
2019-04-19 22:58:50 +02:00
Duncaen a46be6867a xbps-create: reject unhandled files
A segfault in xbps-create(1) was found in:
https://github.com/void-linux/void-packages/pull/7524

xbps-create adds a file type string to the xentry for every file it
finds in `destdir`, files other than symlinks, regular files and
directories weren't handled and resulted in a segfault later when
when processing the xentry structures.

This commit adds checks for sockets and fifos and exits with an
appropriate error message or with a generic error message for every
other unhandled file.

Closes #66
2019-04-14 12:39:04 +02:00
Duncaen 25427fca7d tests: xbps-create with fifo in destdir 2019-04-14 12:37:24 +02:00
Duncaen 5aabfe3ad9 fix indention 2019-04-14 12:37:24 +02:00
Duncaen 4e267de72d tests: fix downgrade hold test 2019-04-14 12:08:49 +02:00
Duncaen 53e6f5c75f tests: add downgrade hold test 2019-04-14 11:53:07 +02:00
Duncaen d57a39ef4a bin/xbps-install: don't overwrite action with downgrade if its on hold
Fixed #65
2019-04-14 11:53:07 +02:00
Duncaen 4d1f9832c1 lib/package_find_obsoletes: fix comment 2019-04-14 11:52:32 +02:00
Duncaen 07ec982b07 lib/fetch/http.c: ignore headers after CONNECT response 2019-04-08 13:34:23 +02:00
Duncaen c1a64ba86e Revert "lib/initend.c: Fix user virtual packages"
This reverts commit bea146c724.
2019-03-22 22:34:11 +01:00
Duncaen c950441537 bin/xbps-install: ignore EBUSY errors 2019-03-22 21:43:52 +01:00
Duncaen 3ad6b7a523 bin/xbps-remove: ignore EBUSY errors
EBUSY occurs if xbps tries to remove a directory with unlink(2) that is
a mount point, this happens with `/boot` as example.

https: //github.com/voidlinux/void-packages/issues/7229#issuecomment-319392560
https: //github.com/voidlinux/void-packages/issues/8753
Closes: #259 [via git-merge-pr]
2019-03-22 21:41:43 +01:00
Duncaen f20032efa3 bin/xbps-checkvers: replace strncat with one snprintf 2019-03-22 19:14:08 +01:00
Duncaen 71b076908d bin/xbps-install: remove duplicate from Makefile 2019-03-22 19:14:08 +01:00
Duncaen d41cafbe52 tests: add test for shlib-provides with replaces 2019-03-22 19:14:08 +01:00
Duncaen 9139cc79bf mk/prog.mk: rebuild static binaries if static libs change 2019-03-22 19:14:08 +01:00
Duncaen bf5eba411b travis: trim dependencies 2019-03-22 19:14:08 +01:00
Duncaen 6a5048b46d travis: add voidlinux/voidlinux-musl to test matrix 2019-03-22 19:14:08 +01:00
Duncaen d7c2e87d55 tests: make tests POSIX shell compatible 2019-03-22 19:14:08 +01:00
Duncaen daa1b44682 xbps-install: fix "Space available on disk:" padding 2018-05-02 00:46:07 +02:00
Duncaen ae868eeb30 NEWS: add some missing changes to xbps-0.52 2018-05-01 12:14:59 +02:00
Duncaen e797936c40 lib/repo_sync.c: sane umask for repodata files 2017-02-27 18:50:19 +01:00
Duncaen 332fbc195a lib/package_unpack.c: set a sane umask for pkg files plists 2017-02-27 18:24:51 +01:00
Duncaen 44778867df lib/pkgdb.c: set a sane umask for pkgdb plist 2017-02-27 18:24:46 +01:00