Commit Graph

3064 Commits

Author SHA1 Message Date
Duncaen
a65630df03 tests: fix ingorepkg tests 2019-04-20 11:53:06 +02:00
Andreas Kempe
0c657582f2 lib/fetch/common.c: send socks5 request as a single transaction
Splitting the socks5 request is causing issues when running against Tor.
It causes Tor to fail with an address unknown error. Assembling the
request and sending it in its entirety solves the issue.

An strace of torsocks, that functions correctly when used with xbps, shows
that the request is being sent all at once:

        recvfrom(3, "\5\0", 2, 0, NULL, NULL)
        sendto(3, "\5\1\0\3>lysator7eknrfl47rlyxvgeamrv7ucefgrrlhk7rouv3sna25asetwid.onion\0P", 69, 0, NULL, 0)
        recvfrom(3, "\5\0\0\1\0\0\0\0\0\0", 10, 0, NULL, NULL)

Closes: #54 [via git-merge-pr]
2019-04-20 11:11:40 +02:00
human
66524481b2 tests: update test for setting one altenatives group
Closes: #47 [via git-merge-pr]
2019-04-20 11:10:34 +02:00
human
b502dc708a fix setting alternatives for packages with more than one group 2019-04-20 11:10:34 +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
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