Commit Graph

3639 Commits

Author SHA1 Message Date
71a594f681 Revert "xbps-uchroot: make sure to cleanup tempdir with overlayfs."
This reverts commit f6a6385b42.

Does not work as expected, and does not fix the real issue
which is still not understood.
2020-02-08 20:43:23 +01:00
c4019aa923 xbps_transaction_files: fixed another memleak.
Thanks valgrind
2020-02-08 20:22:42 +01:00
2d7e3d7b1a xbps_transaction_remove_pkg: fix a memleak.
Thanks valgrind
2020-02-08 20:12:11 +01:00
58217d412d xbps_transaction_files: fix a memleak.
Thanks valgrind!
2020-02-08 20:08:03 +01:00
460515bf41 lib/util.c: add assertions everywhere. 2020-02-08 20:00:56 +01:00
6010a24de6 libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were
using malloc(3) to return the result, until now.

They now have been changed to not allocate the result
via malloc, the caller is responsible to provide a buffer
at least of XBPS_NAME_SIZE (64).

If for whatever reason the pkgname can't be guessed,
returns false. This should avoid lots of small allocs
around libxbps.

New functions have the following prototype:

bool xbps_pkg_name(char *dst, size_t len, const char *pkg)
bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg)

as suggested by @duncaen.
2020-02-08 19:49:57 +01:00
1cda3017c3 README.md: sort badges 2020-02-08 13:43:47 +01:00
b23bff86d8 README.md: add repology xbps versions. 2020-02-08 13:42:39 +01:00
bbf113c492 README.md: add LGTM project badges 2020-02-08 13:39:43 +01:00
66bea965dc xbps_register_pkg: switch to localtime_r(3).
lgtm suggested that localtime() is not reentrant,
so that we now use localtime_r() instead.

lgtm reports 0 alerts after this change, yay.
2020-02-08 13:34:57 +01:00
7d934c9290 xbps-create: fix two issues detected by lgtm 2020-02-07 17:16:47 +01:00
6ff9422134 configure: bump to 0.59 2020-02-07 10:11:11 +01:00
397f2b86e1 tests: new alternatives test case by @CameronNemo.
The test case has been provided by @CameronNemo via #185.
This is expected to fail currently.
2020-02-07 09:55:36 +01:00
732a0e6bdf alternatives: fixed replace_alternative_with_symlink test case.
Only 1 expected failure now!
2020-02-07 09:43:47 +01:00
94b56d7539 alternatives: do not remove symlinks if provider != target pkg.
This fixes the keep_provider_on_update test case, submitted
by @st3r4g via #219.

While checking for obsoletes make sure current provider
also matches the current target pkg.

Fixes #219
2020-02-07 09:16:57 +01:00
86ce5a2084 tests: new test case for alternatives by @st3r4g.
This currently reproduces the tar/bsdtar alternatives
issue that appeared recently in void.

This is expected to fail currently.

From #219
2020-02-07 07:51:01 +01:00
8d2aaff3e1 mk/prog.mk: fix warning with clang; use PROG_CFLAGS. 2020-02-06 09:48:43 +01:00
4c22511d17 configure: simplify 2020-02-06 09:48:30 +01:00
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
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
adebbf71e2 tests: add 3 new test cases for obsolete files with alternatives 2020-02-03 15:33:55 +01:00
749bdabc83 tests/alternatives: set atf_expect_fail for unfixed issue. 2020-02-03 09:58:57 +01:00
354d45fca1 add test which replaces an alternative group with a symlink 2020-02-03 09:57:22 +01:00
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
2612cb9bbe Makefile: add target deps 2020-02-03 08:14:10 +01:00
8637269b38 lib/transaction_revdeps.c: fix provides/replaces #218
This reverts a change that solved another issue and marks the test case
for the other issue as expected failure.

The other issue is not as important as this, as it blocks updating a lot
of systems.
2020-01-31 16:32:44 +01:00
8698735939 tests: add testcase for libglnvd replaces/provides from issue #218 2020-01-31 16:28:41 +01:00
d86e8dde47 NEWS: correct date for 0.58. 2020-01-30 17:51:57 +01:00
9b476bf081 NEWS: 0.58: mention Mohamad Barbar. 2020-01-30 09:52:23 +01:00
96be14937b NEWS: 17 new test cases since 0.57.1; list contributors. 2020-01-30 09:51:02 +01:00
1fce2f7c1d NEWS: prepare for 0.58 (v2). 2020-01-30 09:37:36 +01:00
ecc8e41dd6 NEWS: document 0.57.1; prepare for 0.58. 2020-01-30 09:12:34 +01:00
4a06cb41b1 bin/xbps-checkvers: mistake in manpage 2020-01-30 08:01:12 +01:00
57675c7dfc lib/fetch: fix CVE-2020-7450
https://www.freebsd.org/security/advisories/FreeBSD-SA-20:01.libfetch.asc
2020-01-28 20:29:39 +01:00
40dd4deb4d unpack: really skip current data on archive with noextract. 2020-01-26 10:35:40 +01:00
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
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
6e6a9294a7 xbps-install: fix for -D foo (anything else than xbps). 2020-01-25 13:44:46 +01:00
2d3ed8db19 bin/xbps-checkvers: align help text with spaces 2020-01-25 13:21:18 +01:00
cd0f81d68c bin/xbps-checkvers: list removed templates 2020-01-25 13:21:18 +01:00
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
ed5e481e77 xbps_transaction_package_replace: fix condition 2020-01-25 11:21:37 +01:00
a29f4709d0 xbps_transaction_package_replace: ignore pkgs on hold. 2020-01-25 11:19:54 +01:00
31a8dd15d0 xbps_transaction_revdeps: simplify 2020-01-25 11:09:03 +01:00
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
26b7864973 tests/hold: update hold_shlibs test case with exp behaviour. 2020-01-25 10:23:06 +01:00
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
c98d732d9c bin/xbps-fetch: add a mode that prints sha256sums of downloaded files 2020-01-18 16:44:31 +01:00
013177cec3 lib/download.c: fix digest for continued downloads 2020-01-18 16:33:58 +01:00
7493b06cbb NEWS: add noextract 2020-01-18 15:55:53 +01:00