Commit Graph

3575 Commits

Author SHA1 Message Date
ca5a88e462 xbps-uunshare: Fixed typo in error message: uidmap -> uid_map.
Thanks @parke #28
2019-04-22 14:54:29 +02:00
456f775e4d alternatives: don't switch unchanged alternative groups on removal
Closes: #82 [via git-merge-pr]
2019-04-22 14:51:32 +02:00
4162ec2bd6 tests: add test for useless alternative switch on package removal 2019-04-22 14:51:32 +02:00
ffed6ff707 tests/shell/incorrect_deps: get rif of an unnecessary line.
Closes: #81 [via git-merge-pr]
2019-04-22 14:51:13 +02:00
1d8b95a993 package_config_files.c: fix a shadowed variable declaration.
Found by pcc.
2019-04-22 14:51:13 +02:00
58f406756a run-tests: simplify NPROCS (cat usage is redundant). 2019-04-22 14:51:13 +02:00
3cf3dafc20 run-tests: enable kyua parallelism by default.
Use number of processors as reported by /proc/cpuinfo,
otherwise just set it to 1 (default).

This makes running the test suite in less than 16s on my
i5 ivybridge CPU.
2019-04-22 14:51:13 +02:00
6fe9a05d93 tests: improve previous (dupdeps). 2019-04-22 14:51:13 +02:00
c658e41747 fulldeptree: make sure there are no dups.
Added a test case to verify that dup deps are discarded
completely.
2019-04-22 14:51:13 +02:00
71775950e8 lib/fetch/http.c: fix https->http redirection via proxy.
See https://github.com/void-linux/xbps/issues/52

Thanks @jschultz

Closes: #79 [via git-merge-pr]
2019-04-22 14:49:54 +02:00
0c860d1db0 xbps-dgraph: fix regresion introduced by the fulldeptree changes.
This now works as expected again, see https://i.imgur.com/pr2XO70.png
for the full dependency graph of the sway pkg installed on my system.

Closes: #80 [via git-merge-pr]
2019-04-22 14:49:19 +02:00
a65630df03 tests: fix ingorepkg tests 2019-04-20 11:53:06 +02:00
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
66524481b2 tests: update test for setting one altenatives group
Closes: #47 [via git-merge-pr]
2019-04-20 11:10:34 +02:00
b502dc708a fix setting alternatives for packages with more than one group 2019-04-20 11:10:34 +02:00
bd616aa901 xbps-pkgdb: add alternatives check
Closes #66
2019-04-20 11:07:00 +02:00
ea2cb1d369 unpack: keep conf_files replaced with symlinks, unpack as .new-pkgver 2019-04-20 10:56:08 +02:00
2ad2659d4c tests: disable failing test 2019-04-20 10:54:51 +02:00
cd4c07a467 libxbps: sane umask for pkgdb and files plists 2019-04-20 10:46:59 +02:00
4999f3f2fc tests: add xbps-install update test (replace directory with symlink) 2019-04-20 10:46:59 +02:00
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
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
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
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
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
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
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
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
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
25427fca7d tests: xbps-create with fifo in destdir 2019-04-14 12:37:24 +02:00
5aabfe3ad9 fix indention 2019-04-14 12:37:24 +02:00
4e267de72d tests: fix downgrade hold test 2019-04-14 12:08:49 +02:00
53e6f5c75f tests: add downgrade hold test 2019-04-14 11:53:07 +02:00
d57a39ef4a bin/xbps-install: don't overwrite action with downgrade if its on hold
Fixed #65
2019-04-14 11:53:07 +02:00
4d1f9832c1 lib/package_find_obsoletes: fix comment 2019-04-14 11:52:32 +02:00
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
07ec982b07 lib/fetch/http.c: ignore headers after CONNECT response 2019-04-08 13:34:23 +02:00
c1a64ba86e Revert "lib/initend.c: Fix user virtual packages"
This reverts commit bea146c724.
2019-03-22 22:34:11 +01:00
601f0a2d09 bin/xbps-query: support $NO_COLOR
Closes: #273 [via git-merge-pr]
2019-03-22 21:47:14 +01:00
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
c950441537 bin/xbps-install: ignore EBUSY errors 2019-03-22 21:43:52 +01:00
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
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
a12f22de86 Use https instead of http where possible 2019-03-22 21:35:08 +01:00
f20032efa3 bin/xbps-checkvers: replace strncat with one snprintf 2019-03-22 19:14:08 +01:00
31737ff946 tests/xbps/libxbps/config: safer string handling
Closes: #61 [via git-merge-pr]
2019-03-22 19:14:08 +01:00
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
71b076908d bin/xbps-install: remove duplicate from Makefile 2019-03-22 19:14:08 +01:00
d41cafbe52 tests: add test for shlib-provides with replaces 2019-03-22 19:14:08 +01:00