Commit Graph
100 Commits
Author SHA1 Message Date
Juan RP 8d2aaff3e1 mk/prog.mk: fix warning with clang; use PROG_CFLAGS. 2020-02-06 09:48:43 +01:00
Juan RP 4c22511d17 configure: simplify 2020-02-06 09:48:30 +01:00
Juan RP 3a0ca77264 xbps-uchroot: stop remounting / unnecessarily.
The remount is done to use nosuid, but we can get
rid of the remount just because of this specific
option that does not have too much value for our
general usage (xbps-src).
2020-02-06 08:50:12 +01:00
Juan RP f6a6385b42 xbps-uchroot: make sure to cleanup tempdir with overlayfs.
Go modules seem to have too restrictive permissions on
its builddir, making xbps-uchroot(1) unable to remove
its directory tree due to insufficient permissions.

Run nftw() twice, the first run to set chmod 755, and
second run to remove the file.

Fixes `xbps-src -t` with any pkg that uses `build_style=go`.

This should avoid lots of temp dirs in the buildbot
builders while building go modules and others.
2020-02-04 13:17:26 +01:00
Juan RP 749bdabc83 tests/alternatives: set atf_expect_fail for unfixed issue. 2020-02-03 09:58:57 +01:00
Juan RP 5b43614e80 libxbps: fixed regression introduced in 0.58.
While looking for dependencies, we need to check
if xbps_rpool_get_pkg() returned a suitable match;
and then validate its result.

This fixes the update_and_install test case that
was reverted via #218.
2020-02-03 09:19:54 +01:00
Juan RP 2612cb9bbe Makefile: add target deps 2020-02-03 08:14:10 +01:00
Juan RP d86e8dde47 NEWS: correct date for 0.58. 2020-01-30 17:51:57 +01:00
Juan RP 9b476bf081 NEWS: 0.58: mention Mohamad Barbar. 2020-01-30 09:52:23 +01:00
Juan RP 96be14937b NEWS: 17 new test cases since 0.57.1; list contributors. 2020-01-30 09:51:02 +01:00
Juan RP 1fce2f7c1d NEWS: prepare for 0.58 (v2). 2020-01-30 09:37:36 +01:00
Juan RP ecc8e41dd6 NEWS: document 0.57.1; prepare for 0.58. 2020-01-30 09:12:34 +01:00
Juan RP 40dd4deb4d unpack: really skip current data on archive with noextract. 2020-01-26 10:35:40 +01:00
Juan RP 8a0c3032b7 xbps_find_pkg_orphans: improvements.
While checking for orphans in automatic mode (xbps-query -O,
xbps-remove -o) there's no need to generate a fulldeptree...
instead we need to iterate against pkgdb until no more orphans
are found.

See https://github.com/void-linux/xbps/issues/156#issuecomment-578473222

Also add some debugging that helped me to catch the issue
easily.

Closes #156
2020-01-26 07:40:25 +01:00
Juan RP ead62bdc7c xbps_remove_pkg: make sure pkgver is valid before use.
pkgver might contain garbage due to removal of
its ancestor object (the pkg dictionary).
2020-01-25 13:58:00 +01:00
Juan RP 6e6a9294a7 xbps-install: fix for -D foo (anything else than xbps). 2020-01-25 13:44:46 +01:00
Juan RP bda4452016 xbps-install: improved -D,--download-only support.
Added support to download all dependencies even
if the euid does not have write perms to rootdir.

In this mode we only care if cachedir is writable,
rootdir access is not necessary.

This is really useful to download all binary packages
required by any number of packages as any regular
user to later perform off-line installations, i.e:

```
$ xbps-install -c $PWD/cachedir -yD xbps
...
$ tree cachedir
cachedir/
├── acl-2.2.53_1.x86_64-musl.xbps
├── acl-2.2.53_1.x86_64-musl.xbps.sig
├── attr-2.4.48_1.x86_64-musl.xbps
├── attr-2.4.48_1.x86_64-musl.xbps.sig
├── bzip2-1.0.8_1.x86_64-musl.xbps
├── bzip2-1.0.8_1.x86_64-musl.xbps.sig
├── ca-certificates-20190110_1.noarch.xbps
├── ca-certificates-20190110_1.noarch.xbps.sig
├── libarchive-3.4.1_1.x86_64-musl.xbps
├── libarchive-3.4.1_1.x86_64-musl.xbps.sig
├── libcrypto45-3.0.2_2.x86_64-musl.xbps
├── libcrypto45-3.0.2_2.x86_64-musl.xbps.sig
├── liblz4-1.9.2_1.x86_64-musl.xbps
├── liblz4-1.9.2_1.x86_64-musl.xbps.sig
├── liblzma-5.2.4_2.x86_64-musl.xbps
├── liblzma-5.2.4_2.x86_64-musl.xbps.sig
├── libressl-3.0.2_2.x86_64-musl.xbps
├── libressl-3.0.2_2.x86_64-musl.xbps.sig
├── libssl47-3.0.2_2.x86_64-musl.xbps
├── libssl47-3.0.2_2.x86_64-musl.xbps.sig
├── libtls19-3.0.2_2.x86_64-musl.xbps
├── libtls19-3.0.2_2.x86_64-musl.xbps.sig
├── libxbps-0.57.1_8.x86_64-musl.xbps
├── libxbps-0.57.1_8.x86_64-musl.xbps.sig
├── libzstd-1.4.4_1.x86_64-musl.xbps
├── libzstd-1.4.4_1.x86_64-musl.xbps.sig
├── musl-1.1.24_1.x86_64-musl.xbps
├── musl-1.1.24_1.x86_64-musl.xbps.sig
├── run-parts-4.9.1_1.x86_64-musl.xbps
├── run-parts-4.9.1_1.x86_64-musl.xbps.sig
├── xbps-0.57.1_8.x86_64-musl.xbps
├── xbps-0.57.1_8.x86_64-musl.xbps.sig
├── xbps-triggers-0.113_3.noarch.xbps
├── xbps-triggers-0.113_3.noarch.xbps.sig
├── zlib-1.2.11_3.x86_64-musl.xbps
└── zlib-1.2.11_3.x86_64-musl.xbps.sig

0 directories, 36 files
$
```

Inpired by #213
Closes #213
2020-01-25 13:05:46 +01:00
Juan RP ed5e481e77 xbps_transaction_package_replace: fix condition 2020-01-25 11:21:37 +01:00
Juan RP a29f4709d0 xbps_transaction_package_replace: ignore pkgs on hold. 2020-01-25 11:19:54 +01:00
Juan RP 31a8dd15d0 xbps_transaction_revdeps: simplify 2020-01-25 11:09:03 +01:00
Juan RP c6e0af44e8 xbps_transaction_shlibs: better interaction with on hold pkgs.
pkgs that are on hold mode should be ignored while collecting
required shlibs (shlib-requires).

Fixes #215
2020-01-25 10:23:06 +01:00
Juan RP 26b7864973 tests/hold: update hold_shlibs test case with exp behaviour. 2020-01-25 10:23:06 +01:00
Juan RP 76f8ca595b tests: rename downgrade_hold_test.sh to hold_test.sh.
Added new test case for https://github.com/void-linux/xbps/issues/215

This fails as expected right now because the fix is still
not there.
2020-01-25 10:23:06 +01:00
Juan RP ef9260a16e libxbps: fix for vpkg providers in multiple repos.
Added new test case by @st3r4g via #206

Closes #206
2020-01-18 12:50:59 +01:00
Juan RP 5ff3ab5c60 transaction_revdeps: do not skip pkgs that are being updated.
Modified the test case with changes by @duncaen.

Closes #205
2020-01-18 08:58:54 +01:00
Juan RP 7ff9041f2a tests: improved tests case for #205.
Again, can't reproduce the issue.
2020-01-12 05:03:54 +01:00
Juan RP cb5b80711c tests/install_test.sh: new test case by @duncaen via #205.
New test case written by @duncaen, with some tweaks from
myself to verify expected behaviour.

Close #205
2020-01-11 15:25:16 +01:00
Juan RP feece576b3 xbps_dbg_printf{,_append}: return if xhp is NULL.
assert() here was totally wrong, better to catch
this in all cases (NDEBUG does not change the behaviour).
2020-01-11 09:48:38 +01:00
Juan RP 615b6ce7e9 xbps_repo_fetch_remote: use XBPS_REPOIDX_META. 2020-01-06 15:09:16 +01:00
Juan RP 0abfe44954 xbps.h: XBPS_REPOIDX_SIG is gone 2020-01-06 15:02:25 +01:00
Juan RP 850ba2d416 Revert the repodata signature stuff. 2020-01-06 14:56:01 +01:00
Juan RP 4ddb335c8e Revert "Tests for signing metadata"
This reverts commit d785e7e483.
2020-01-06 14:52:39 +01:00
Juan RP 79321f3ff0 Revert "Verify index-meta for in-memory sync"
This reverts commit a1481cb285.
2020-01-06 14:52:06 +01:00
Juan RP e04cb2fa24 Revert "Read also unsigned index-meta"
This reverts commit 61ef5c3f8a.
2020-01-06 14:50:32 +01:00
Juan RP 8b2c62adfc Revert "Verify index-meta"
This reverts commit 09125769bd.
2020-01-06 14:48:39 +01:00
Juan RP 10b2f7b425 Revert "Preserve meta-index data on change of signing key"
This reverts commit ae26a83ad2.
2020-01-06 14:46:12 +01:00
Juan RP 2884fc3ab7 Revert "Don't assume repodata is signed when has index-meta.plist"
This reverts commit 4e3d4d2287.
2020-01-06 14:45:57 +01:00
Juan RP 68113a8fc0 Revert "Sign index-meta"
This reverts commit 381b7b7600.
2020-01-06 14:44:22 +01:00
Juan RP 5f1f87eeb8 Revert "Use predefined constant in place of magic string"
This reverts commit ce4873a1f1.
2020-01-06 14:34:22 +01:00
Juan RP d2208f91e0 Revert "Verify repodata signature"
This reverts commit a7830cf780.
2020-01-06 14:33:49 +01:00
Juan RP b4fdc39e67 Revert "Sign repodata"
This reverts commit 04194f44c8.
2020-01-06 14:31:40 +01:00
Juan RP 9c61e341b1 configure: added --enable-lto (default disabled). 2020-01-06 12:47:50 +01:00
Juan RP d5e91cb7d8 xbps_transaction_store: fix memleak. 2020-01-06 12:47:13 +01:00
Juan RP 802a6eae09 xbps_dbg_printf{,_append}: add assertion 2020-01-06 12:10:47 +01:00
Juan RP 9be9679b5d configure: re-add --enable-debug (enabled by default).
And fix debugging in the shared library with tcc.
2020-01-06 12:09:28 +01:00
Juan RP fabe148261 LICENSE: hi 2020 2020-01-05 10:56:19 +01:00
Juan RP e2050269b0 .travis.yml: switch to pkgconf 2020-01-05 09:58:25 +01:00
Juan RP 1f1f7e31e7 tests: improve update_xbps_with_indirect_revdeps test case. 2020-01-05 09:26:38 +01:00
Juan RP 10075c28e5 libxbps: ignore indirect broken revdeps while updating xbps.
This fixes the long standing issue that has been a plague for
a long time.

See the test case for more information.
2020-01-04 13:01:28 +01:00
Juan RP d68ff7ebf0 xbps-install: fix --reproducable.
The 'repository' obj also needs to be skipped to be fully
reproducable between different repositories.

Updated the test case accordingly.
2019-12-29 16:31:23 +01:00
Juan RP 2c7c4e1bf0 tests/xbps-create: fix the rejectfifo test.
It was using -a (alternatives) rather than -A (architecture)
so the test wasn't checking the exact error branch.
2019-12-29 16:24:33 +01:00
Juan RP b05f4b4db5 xbps-install: added --reproducible long option.
If set, enables reproducible mode in pkgdb.

Added a new test case.
2019-12-29 11:02:51 +01:00
Juan RP 95a3ba651f libxbps: added XBPS_FLAG_INSTALL_REPRO for xbps_handle::flags.
If set, enable reproducible mode; skips adding the
"install-date" obj into pkgdb.
2019-12-29 11:02:51 +01:00
Juan RP d1c93bed52 xbps-rindex: stop adding the "build-date" pkg obj.
This was just setting the current date when the pkg
is being added to the repository index.

It does not make any sense, so get rid of it completely.

This "build-date" string obj needs to be added via
xbps-create(1) not xbps-rindex(1)!

Another step towards reproducability (#55)
2019-12-29 09:57:54 +01:00
Juan RP 2e08cbef7a tests: fixed tests to not use host's xbps.d confdir. 2019-12-28 13:42:30 +01:00
Juan RP 34471902ed README.md: update requirements; prefer pkgconf. 2019-12-28 11:55:11 +01:00
Juan RP 6210955010 xbps-create: fix memleak introduced in 0f3ed2067c 2019-12-27 23:15:21 +01:00
Juan RP 67707657a4 xbps-create: always sanitize gathered symlinks.
Added a new test case.

Close #199
2019-12-27 23:15:21 +01:00
Juan RP 166caab986 Do not silently update xbps on any install/update transaction.
When there's a new xbps update, xbps-install(1) will now return
EBUSY (16) and a message (if dry-run disabled) explaining
how to proceed.

If there's an update and transaction does not contain xbps, it will
error out unless the 'xbps' pkg is the only target pkg, i.e:

	# xbps-install -Su
	# echo $?
	16

To update xbps, the only way to proceed is to explicitly declare
it as an update, i.e:

	# xbps-install -u xbps

The dry-run mode will still show there's an xbps update.

Modified the existing test cases to satisfy the new behaviour.

Closes #166
Closes #142
2019-12-27 21:35:40 +01:00
Juan RP c81a2806ff xbps_transaction_prepare: optimize a bit.
If all packages in transaction are on hold, there's no
need to check for conflicts, shlibs, etc.

This makes `xbps-install -un` work faster on my system:
~0.450ms -> ~0.250ms

There's still room for more improvements :-)
2019-12-27 21:32:54 +01:00
Juan RP 73e0668840 libxbps: fix issue found by the recent glvnd switch.
See the new test case for details, but this simulates
the recent glvnd switch, with mesa, nvidia and libglvnd.

Thanks @st3r4g for the fix! this indeed fixes the new test case.

Close #186
2019-12-27 20:25:05 +01:00
Juan RP 34a1ab51d0 xbps-checkvers: version cache file.
We do not want obsolete files from previous versions, so that
we version the filename of that working version.
2019-12-27 18:23:46 +01:00
Juan RP 64aeabf3f6 xbps-checkvers: restore previous behaviour after 7a220b37db.
The '%n' pkgname fmt option still needs to be the sourcepkg
for xbps-src to work with no additional changes.

This restores previous behaviour, and uses binpkg's pkgname
while checking for pkgdb/repo.
2019-12-27 18:04:53 +01:00
Juan RP 90c040f37f configure: bump version to 0.58.
not yet released but 0.58 will be next version.
2019-12-27 16:35:03 +01:00
Juan RP 2f51b4c0bc xbps_init: fix warning on glibc. 2019-12-27 16:23:56 +01:00
Juan RP 7f75fd840a xbps_init: autodetect musl libc variant at compile time.
This way we don't need to set the 'architecture' xbps.d
setting when the binaries are compiled for musl.

Close #195
2019-12-27 16:23:56 +01:00
Juan RP 66b07bb795 xbps_array_foreach_cb_multi: fix previous. 2019-12-27 16:22:40 +01:00
Juan RP f5d93caf15 xbps_array_foreach_cb_multi: improve previous (v2).
As suggested by @CasperVector reuse the 'i' var to
wait for threads that were created successfully.
2019-12-27 15:47:43 +01:00
Juan RP a3a1c372cb xbps_array_foreach_cb_multi: improve previous.
Do not wait for the other threads to finish, just exit early.
2019-12-27 15:19:22 +01:00
Juan RP 08a1c61a4d xbps_array_foreach_cb_multi: error out if pthread_create(3) fails.
We do not want to continue processing more threads
if pthread_create(3) fails, rather return an error.

This is for #182 but not yet fixed, there might be a
memleak somewhere.
2019-12-27 14:27:51 +01:00
Juan RP 7a220b37db xbps-checkvers: use binpkg's pkgname rather than srcpkgs.
Up until now `xbps-checkvers` would only check for the
real sourcepkg, this broke detection of binary packages
that are subpkgs.

Added a new test case.

Close #192
2019-12-27 12:24:16 +01:00
Juan RP 0e1482917a Fix maybe-uninitialized warnings detected by LTO. 2019-12-27 10:53:10 +01:00
Juan RP 9775a20dbc configure: use pkg-config found via PATH.
We only care if the `pkg-config` bin is there, don't override
it with the result from _which(). In the xbps-src world,
pkg-config is a wrapper, that makes it cross compile easily.
2019-12-26 15:29:03 +01:00
Juan RP be05118aa8 libxbps: verify repodata signatures even if rootdir is unset.
xbps-rindex(1) has a -r option that sets the remove mode,
due to the changes added to sign repodata we need to access
to the correct directory where repository public keys are
stored. This makes the code use `$PWD/keys` before falling
back to `metadir`.

Fixes the test suite to run with unprivileged users (non root).
2019-11-24 12:52:50 +01:00
Juan RP f723edbca1 trans/revdeps: ignore pkgs on hold.
shlib checking is still performed later on...
2019-11-24 11:44:21 +01:00
Juan RP 5c9be1eefd travis: update xbps and system and then install deps.
code is too strict (or stupid) to allow unmatched versions.
2019-11-17 12:18:44 +01:00
Juan RP 6886a73288 Bump to 0.57.1 and libxbps micro. 2019-10-27 09:50:11 +01:00
Juan RP b9b6f43300 package_script.c: fix runtime with tcc
Making `shells` a global declaration does not seem to make tcc happy, so make this a local variable in `xbps_pkg_exec_buffer` instead.
2019-10-27 09:38:50 +01:00
Juan RP 9ebe82fdc3 xbps-checkvers: fix a warning with glibc.
found by @q66

main.c:195:8: error: ignoring return value of 'fread', declared with attribute warn_unused_result [-Werror=unused-result]
2019-10-27 09:13:46 +01:00
Juan RP c3a64f60e9 configure: bump to 0.58 2019-10-27 08:57:40 +01:00
Juan RP 98e09e01e1 lib/package_alternatives.c: check if alternative is a symlink before removing it
Original commit by @duncaen ... but couldn't find this anywhere.
2019-10-27 08:44:37 +01:00
Juan RP d927517327 xbps-fbulk: do not make assert() change program behaviour.
... otherwise if NDEBUG is set chdir() is skipped completely.
2019-07-06 08:37:47 +02:00
Juan RP 702d64c517 xbps-checkvers/Makefile: re-add -Wno-deprecated-declarations.
... it's still necessary due to readdir_r() with glibc.
2019-07-03 02:15:41 +02:00
Juan RP 9addb5e64e Get rid of some old disabled warnings. 2019-07-03 01:26:07 +02:00
Juan RP 5c828d8667 README.md: remove pcc note; it's in the build matrix now. 2019-06-27 18:12:33 +02:00
Juan RP 51bfc2a395 travis: add pcc/musl to the build matrix. 2019-06-27 18:09:26 +02:00
Juan RP 0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Juan RP bb96486b12 xbps-install: make sure to call xbps_end() before exiting. 2019-06-27 08:02:19 +02:00
Juan RP db00ccc3b0 tests/xbps-remove/orphans: use -r root. 2019-06-27 07:57:13 +02:00
Juan RP c250bdce45 travis: disable tcc/glibc for now. 2019-06-26 16:00:56 +02:00
Juan RP 646115efdc run-tests: set LIBRARY_PATH for tcc. 2019-06-26 15:55:47 +02:00
Juan RP 815754a0e9 configure: set -Wno-error later for tcc, to override -Werror. 2019-06-26 15:48:46 +02:00
Juan RP 899b8e7abb Revert "travis: disable tcc again, seems to not obey -Wno-error."
This reverts commit 405f4b8379.
2019-06-26 15:48:35 +02:00
Juan RP 405f4b8379 travis: disable tcc again, seems to not obey -Wno-error. 2019-06-26 15:27:12 +02:00
Juan RP ab2445e722 configure: use -Wno-error for now with tcc. 2019-06-26 15:13:01 +02:00
Juan RP ceab3c66b7 travis: tcc builds need binutils. 2019-06-26 15:03:32 +02:00
Juan RP d6aebd45f0 fetch/http.c: fix tcc build failure.
fetch/http.c:1475: warning: function might return no value: 'parse_index'

The code uses abort() before returning anything; return a proper
return value instead.
2019-06-26 14:57:39 +02:00
Juan RP 3c98d7cc4c README.md: tcc seems to be working ok now to run the testsuite. 2019-06-26 14:53:56 +02:00
Juan RP 2694654317 travis: add tcc glibc/musl to the build matrix. 2019-06-26 14:46:52 +02:00
Juan RP 00cda75a63 Require libarchive>=3.3.3 due to zstd support. 2019-06-26 09:05:37 +02:00