Commit Graph

3403 Commits

Author SHA1 Message Date
Juan RP
dc65f62ad7 tests/remove_symlinks_dangling: fix test, noticed by @jnbr.
Somehow I confused the test case name.
2019-06-07 20:13:24 +02:00
Juan RP
dd3dc2ddec xbps_symlink_target: always canonicalize rootdir.
... otherwise we might end up with a relative rootdir that will
give unexpected results.

dtrt when rootdir != /
2019-06-07 20:13:24 +02:00
Juan RP
9e2c00ee8b libxbps: remove dangling symlinks properly.
This fixes removal of packages that contain multiple levels
of dangling symlinks, i.e faenza-icon-theme and probably others.

Close #23
2019-06-07 20:13:24 +02:00
human
56aa77d51b xbps-install: make question() read the whole input line
reading only the first character would answer the next question()
with the next character (unless you just pressed enter)
2019-06-07 19:38:51 +02:00
Juan RP
cfc8e0a580 xbps-fbulk/main.c: update my email address.
Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-06 13:11:33 +02:00
Johannes Brechtmann
f4f88705d6 data: update repo urls to voidlinux.org
remove alternative debug mirrors
2019-06-06 13:11:24 +02:00
Juan RP
371be9703e Sync with portableproplib-0.6.8. 2019-06-04 21:43:52 +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
Johannes Brechtmann
fa5911bb00 tests: test for removal of nested directories 2019-05-16 11:04:48 +02:00
Johannes Brechtmann
949d2d90e7 package_remove: fix length comparison 2019-05-16 11:04:48 +02:00
Juan RP
3eb064af2c COPYING: update for 2019. 2019-05-14 23:34:53 +02:00
Juan RP
208573d368 tests: install_and_update_revdeps: improve to catch more cases. 2019-05-14 23:34:53 +02:00
Juan RP
108a165534 libxbps: try to update revdeps when installing or updating pkgs.
This fixes the cases where a pkg installation or update
could break its revdeps due to not satisfying dependencies.

When performing an install or update, xbps now always checks if
there are updates for its revdeps and get added to the transaction.

See the two new test cases for more information.
2019-05-14 23:34:53 +02:00
Aleksej Lebedev
6f4731ca75 Fixed install location of xbps.d.5 manpage. 2019-05-14 20:49:41 +02:00
q66
9f10ee6f03 data/_xbps,_xbps_src: add ppc64+ppc(-musl) completions 2019-05-01 15:20:49 +02:00
Juan RP
2e469aaabf configure: added --enable-rpath option.
If set, binaries will have rpath set to $ORIGIN/../lib. That means
that even using defaults (--prefix=/usr), you can install
it via DESTDIR anywhere in your system and binaries will work.

This is in preparation for BSD support.

Closes: #87 [via git-merge-pr]
2019-04-26 16:27:41 +02:00
Juan RP
77ae94e6a1 xbps-create: remove two debugging printfs.
Closes: #84 [via git-merge-pr]
2019-04-26 16:27:34 +02:00
Juan RP
6498767a79 README.md: update for pcc/tcc support. 2019-04-22 19:01:28 +02:00
Juan RP
cb0bf6d914 configure: detect tcc if in PATH; fix tcc build.
Adding -pthread to CFLAGS is unnecessary because the bins don't need
it explicitly, so that it's removed and we only need to use -lpthread
on libxbps.
2019-04-22 16:18:41 +02:00
Juan RP
e013e0169f README.md: get rid of coverity status... hasn't been used for +4 years. 2019-04-22 15:37:11 +02:00
Juan RP
2a9794968c proplib/prop_object: needs compat.h. 2019-04-22 15:32:06 +02:00
Juan RP
cf78b7272f lib/util: musl needs _{GNU,BSD}_SOURCE for strlc{at,py}(). 2019-04-22 15:31:07 +02:00
Juan RP
0db5ace61d configure: fix vasprintf test; cosmetics.
The vasprintf test was always failing because it needed stdarg.h.
Misc cosmetics: rename compat objs to COMPAT_OBJS.
2019-04-22 15:30:02 +02:00
parke
ca5a88e462 xbps-uunshare: Fixed typo in error message: uidmap -> uid_map.
Thanks @parke #28
2019-04-22 14:54:29 +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
Juan RP
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
Juan RP
1d8b95a993 package_config_files.c: fix a shadowed variable declaration.
Found by pcc.
2019-04-22 14:51:13 +02:00
Juan RP
58f406756a run-tests: simplify NPROCS (cat usage is redundant). 2019-04-22 14:51:13 +02:00
Juan RP
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
Juan RP
6fe9a05d93 tests: improve previous (dupdeps). 2019-04-22 14:51:13 +02:00
Juan RP
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
Juan RP
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
Juan RP
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
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