Commit Graph

3304 Commits

Author SHA1 Message Date
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
Juan RP
291faddf8c xbps now also updates revdeps of itself if there's an update.
Close https://github.com/void-linux/xbps/issues/77

Closes: #78 [via git-merge-pr]
2019-04-19 22:57:42 +02:00
Juan RP
08aa44602f xbps_array_foreach_cb_multi: fix incorrect array counter.
This fixes some races that could be seen when there's a
determined number of pkgs and CPU threads.
2019-04-19 22:57:42 +02:00
Juan RP
580a5ba29b xbps_get_pkg_fulldeptree(): fix all known bugs and make it 50x faster.
faster: use a hash table with pkg names on the transaction dict,
 the process of collecting and sorting is now 50x faster or
 even more (kde5).

bugs: this now detects cyclic deps and returns with an appropropiate
 return value: ELOOP and ENOENT in xbps-query(1) --fulldeptree.
 Ping me if you need more details :-)

Close https://github.com/void-linux/xbps/issues/16
Close https://github.com/void-linux/xbps/issues/5
2019-04-19 22:57:42 +02:00
Juan RP
5243eab739 Makefile: in the check target always remove "./result*".
... otherwise you need to remove them manually when re-running
'make check'.
2019-04-19 22:57:42 +02:00
human
8d594727cc lib/util.c: improve error handling in xbps_binpkg_{arch,pkgver}
they no longer assert or segfault on malformed strings

Closes: #48 [via git-merge-pr]
2019-04-14 15:01:18 +02:00
Johannes Brechtmann
2745e25740 lib/package_remove: order directories before removal
The order of entries in files.plist is inconsistent
between different releases of xbps. Hence they must be
ordered before removal to, so sub directories are removed
before their parents.
2019-04-14 14:30:16 +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
Yuxuan Shui
2c69345acc Don't process processed packages again in collect_rdeps
Otherwise we will get exponential time complexity
2019-04-14 11:25:41 +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
Leah Neukirchen
601f0a2d09 bin/xbps-query: support $NO_COLOR
Closes: #273 [via git-merge-pr]
2019-03-22 21:47:14 +01:00
kayvenm
bea146c724 lib/initend.c: Fix user virtual packages
Dictionary was never initialized because of wrong condition check

Closes: #265 [via git-merge-pr]
2019-03-22 21:45:44 +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
human
c430d8ceb6 xbps.d.5: fix referenced sections
Closes: #45 [via git-merge-pr]
2019-03-22 21:36:31 +01:00
q66
75dc5c6b06 _xbps, _xbps-src: add ppc64 completion
Closes: #42 [via git-merge-pr]
2019-03-22 21:36:08 +01:00
Ingo Blechschmidt
a12f22de86 Use https instead of http where possible 2019-03-22 21:35:08 +01:00
Duncaen
f20032efa3 bin/xbps-checkvers: replace strncat with one snprintf 2019-03-22 19:14:08 +01:00
Cameron Nemo
31737ff946 tests/xbps/libxbps/config: safer string handling
Closes: #61 [via git-merge-pr]
2019-03-22 19:14:08 +01:00
Cameron Nemo
5aa1adca90 lib/initend.c: xbps_init(): safer string handling
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Closes: #58 [via git-merge-pr]
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
Robert Lowry
0b1b1ecf05 travis: run void host in docker to compile/test
The current CI runs in ubuntu containers, which do not provide a
recent enough version of libarchive. This uses official Void
docker images to compile and run tests on the xbps repo.

Closes: #39 [via git-merge-pr]
2019-03-22 19:14:08 +01:00
Duncaen
d7c2e87d55 tests: make tests POSIX shell compatible 2019-03-22 19:14:08 +01:00
Johannes Brechtmann
950945034b zsh: add completion for new patch phase in xbps-src 2019-03-19 15:38:26 +01:00
Robert Lowry
09a276bace README: update voidlinux URLs 2019-02-24 03:38:40 -05:00
wuhanck
b4eebafa6d upgrade to openssl 1.1.x. 2019-01-24 14:57:50 -05:00
Foxlet
0f33859701 Fix namespace violation 2018-09-25 22:11:30 -04:00
Toyam Cox
ac5776b9f5
Merge pull request #19 from steinex/fix-manpages-github-url
manpages: change URL for bug reporting to new GitHub repo
2018-09-23 18:10:11 -04:00
Frank Steinborn
f366d6cb11 manpages: change URL for bug reporting to new GitHub repo 2018-09-23 17:51:07 +02:00
Enno Boland
e4702d9d3b
Merge pull request #6 from foxlet/fix-string-formatting
Fix string formatting of 64-bit unsigned integers
2018-07-30 20:28:09 +02:00
Enno Boland
a5bfc59203 prepare release 2018-07-30 13:47:08 +02:00
Enno Boland
21e28257d1 NEWS: update date 2018-07-30 13:43:44 +02:00
Enno Boland
4c53f0b432 NEWS: fix punctuation 2018-07-30 13:42:28 +02:00
Enno Boland
75f6a2ce1f NEWS: new release date is 2018-07-27 2018-07-24 07:36:47 +02:00
Enno Boland
f47f83602a NEWS: fix style of last NEWS entry 2018-07-20 09:46:23 +02:00
Enno Boland
0e8b01803f NEWS: mention hashcheck changes in rindex. 2018-07-20 09:45:35 +02:00
Enno Boland
9e01ebcbc7 NEWS: update and announce release date.
* mention >128 character path fix
* mention threading algorithm change
* mention rindex --hashcheck
2018-07-20 09:37:50 +02:00
Enno Boland
ebca1758cc xbps-rindex.1: document --hashcheck option 2018-07-20 09:37:50 +02:00
Foxlet
4eaf45a767 Fix string formatting of 64-bit unsigned integers 2018-07-17 20:50:48 -04:00