Commit Graph

984 Commits

Author SHA1 Message Date
Juan RP
edb613f1d5 xbps-dgraph: remove dead code; use more saner defaults. 2014-11-20 17:15:43 +01:00
Juan RP
4b3a4159a0 xbps-dgraph: update graph label for -f mode 2014-11-20 16:28:47 +01:00
Juan RP
8c4d41ccfd xbps-dgraph: simplify. 2014-11-20 16:24:43 +01:00
Juan RP
0b50672a33 xbps-dgraph: added support to generate full dependency graphs.
- Full dependency graphs can be generated with -f in pkgdb or repository
  mode (-R).
- Removed -o and writing dot files by default, the generated dot file
  is written to stdout.
- Misc tweaks that I cannot remember right now.
2014-11-20 13:32:21 +01:00
Juan RP
2e3213de25 xbps-dgraph: remove code to colorize optional objs (unmaintanable). 2014-11-20 10:48:28 +01:00
Juan RP
1bae26606e Introduce xbps_{pkgdb,rpool}_get_pkg_fulldeptree().
These routines return a xbps_array_t with a full sorted dependency graph
for the target pkg, by querying pkgdb or rpool.

Update xbps-query(8) to use the new libxbps API.
2014-11-20 09:23:51 +01:00
Juan RP
2c01994497 xbps-dgraph: random changes as anticipation of more features.
* Rather than requiring a config file to be generated with -g, if -c
  is unset and default config file does not exist, use builtin defaults.
* Always process all available pkg objs.
* -R is now used to enable repository mode rather than checking revdeps.
* -o removed; simply use <pkgname>.dot.
2014-11-19 18:21:32 +01:00
Juan RP
428a747fad Fix #69 (No way to set globally a custom architecture)
The "architecture" configuration keyword is now available to override
the native machine architecture returned by (uname(2)).

The XBPS_ARCH environment variable still has preference.
2014-11-19 11:36:09 +01:00
Juan RP
83d00e4e8c xbps-query/search: pass correct length to strlcat to truncate results. 2014-11-18 07:35:25 +01:00
Juan RP
d53b2c57cc xbps-query.8: more detailed info about --cat. 2014-11-17 19:40:35 +01:00
Juan RP
77c6c3e504 Introduce xbps_binpkg_get_file_into_fd() and use it for xbps-query(8) --cat.
This allows you to print to stdout any file stored in a binary package,
locally or remotely!

$ xbps-query -R --cat=/usr/bin/ls coreutils > ls
$ file ls
ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7a195fc46d1d5cdca32bfccd3b30f81784e342ed, stripped
$
2014-11-17 18:43:08 +01:00
Juan RP
db14524cf3 xbps-query: unbreak -f/--files mode. 2014-11-17 16:10:55 +01:00
Juan RP
a6516505e9 xbps-query(8: added --cat=FILE mode support.
- This mode prints to stdout the matching FILE stored in a binary package.
- ABI break: renamed xbps_get_pkg_plist_from_binpkg() xbps_binpkg_get_plist().
- Added xbps_binpkg_get_file() as a generic way to get pkg file contents.
- Removed useless comments from xbps_api_impl.h.
2014-11-17 15:45:46 +01:00
Juan RP
3afb9d709d Get rid of repodata index-files; the archive is now 8x smaller.
See the NEWS file for more information.
2014-11-13 17:09:43 +01:00
Juan RP
fcaf18c494 bin/xbps-install/util.c: add a newline before the header (requested by chris2). 2014-11-13 15:25:35 +01:00
Juan RP
039a155918 xbps-create(8): fix #64 "incorrect installed-size with hardlinks" 2014-11-12 12:37:35 +01:00
Juan RP
84be0dcd8b xbps-rindex: use correct argv index. 2014-11-06 11:33:04 +01:00
Juan RP
51ec53846c xbps-rindex: added 'd' to shortopts. 2014-11-06 11:14:29 +01:00
Juan RP
40c3e048b0 xbps-rindex: added -d/--debug option. 2014-11-06 10:54:52 +01:00
Juan RP
5b522109f7 Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.
See the NEWS file for more information.
2014-11-06 09:58:04 +01:00
Juan RP
578c3add0c xbps-uchroot: mount sys/dev recursively to access to /dev/pts (thanks chris2). 2014-11-05 15:57:21 +01:00
Juan RP
42bbc60154 xbps-install: fix cnt stats and align issues in the column output mode.
- The counter stats were not taken into account.
- Align version/new version with pkgs that have long versions (chromium).
2014-11-05 10:16:57 +01:00
Juan RP
59781f4e91 bin/xbps-install/fetch_cb.c: use STDOUT_FILENO. 2014-10-30 11:25:37 +01:00
Juan RP
b179c16fc0 xbps-{install,remove}: implemented column/wide output mode.
See https://github.com/voidlinux/xbps/issues/63 for info.

Close #63
2014-10-30 11:23:10 +01:00
Juan RP
3f7cd86d9d bin/xbps-query/list.c: remove unused header. 2014-10-30 11:00:01 +01:00
Juan RP
12e18ae579 bin/xbps-install/util.c: use STDOUT_FILENO. 2014-10-30 10:59:42 +01:00
Juan RP
15943d990c xbps-query: fix --fulldeptree with multiple pkgs using vpkgs and non vpkgs. 2014-10-29 09:46:54 +01:00
Juan RP
fa6f20ec4f xbps-pkgdb: rework symlinks checks to avoid false positives with -r. 2014-10-25 10:11:46 +02:00
Juan RP
87ca42f399 Remove xdelta support: it never worked and wasn't fully implemented. 2014-10-24 11:04:51 +02:00
Juan RP
adc0643ee4 Fully switch to zplists. 2014-10-17 10:27:58 +02:00
Juan RP
84a16c86cc xbps-query/search: simplify. 2014-10-17 10:09:34 +02:00
Juan RP
b157407684 bin/xbps-remove/clean-cache.c: CID 62747 (toctou) 2014-10-08 10:09:58 +02:00
Juan RP
d4374fb9af xbps-rindex: fix CID 62741 correctly (untrusted value as argument) 2014-10-07 10:11:14 +02:00
Juan RP
8d4a01baa4 bin/xbps-checkvers/main.c: CID 62712 (NULL pointer dereference) 2014-10-07 07:55:54 +02:00
Juan RP
eb0674376f bin/xbps-checkvers/main.c: CID 62711 (NULL pointer dereference) 2014-10-07 07:53:49 +02:00
Juan RP
4a188a433a bin/xbps-rindex/index-clean.c: CID 62708 (NULL pointer dereference) 2014-10-07 07:50:03 +02:00
Juan RP
8c5ef42935 bin/xbps-checkvers/main.c: CID 62705 (argument cannot be negative) 2014-10-07 07:33:28 +02:00
Juan RP
960c3fdcdf bin/xbps-pkgdb/check.c: CID 62721 (argument cannot be negative) 2014-10-07 07:25:25 +02:00
Juan RP
5bec421726 bin/xbps-rindex/index-add.c: add assertions to make coverity happy (CID 62741) 2014-10-06 17:13:06 +02:00
Juan RP
b96d1c9f4e bin/xbps-rindex/sign.c: CID 62699 (dereference NULL return value) 2014-10-05 13:20:18 +02:00
Juan RP
1edd4e2ecf bin/xbps-create/main.c: CID 62678 (unchecked return value) 2014-10-05 12:33:45 +02:00
Juan RP
f74f079d9d bin/xbps-checkvers/main.c: CID 62673 (unchecked return value) 2014-10-05 12:25:58 +02:00
Juan RP
616af5c207 bin/xbps-create/main.c: CID 62713 (dead code) 2014-10-05 12:16:39 +02:00
Juan RP
fe80347a32 bin/xbps-checkvers/main.c: use-after-free (CID 62743) 2014-10-05 10:06:42 +02:00
Juan RP
14da590f41 bin/xbps-checkvers/main.c: fix CID 62667 (2/2) 2014-10-05 09:56:42 +02:00
Juan RP
d006d60497 bin/xbps-rindex/index-clean.c: use-after-free (CID 62752) 2014-10-05 09:47:48 +02:00
Juan RP
15743d20ea bin/xbps-checkvers/main.c: fix CID 62667 correctly. 2014-10-05 09:44:39 +02:00
Juan RP
54b72d8f81 bin/xbps-rindex/index-add.c: fix CID 62685 correctly. 2014-10-05 09:35:42 +02:00
Juan RP
2902a43aab bin/xbps-query/list.c: fix CID 62690 correctly. 2014-10-05 09:31:32 +02:00
Juan RP
3b0917c24a bin/xbps-rindex/index-add.c: use-after-free (CID 62764) 2014-10-05 09:23:03 +02:00
Juan RP
f7441d24cf bin/xbps-create/main.c: fix CID 62686 correctly; all tests pass now. 2014-10-05 08:55:32 +02:00
Juan RP
9f873072b4 bin/xbps-query/list.c: resource leak (CID 62690) 2014-10-05 08:14:17 +02:00
Juan RP
2fe9fbe777 bin/xbps-create/main.c: Out-of-bounds write (CID 62686) 2014-10-05 08:09:42 +02:00
Juan RP
ced1ce4b40 bin/xbps-rindex/index-add.c: resource leak (CID 62685) 2014-10-05 08:06:12 +02:00
Juan RP
0af6db77e6 bin/xbps-remove/clean-cache.c: resource leak (CID 62680) 2014-10-05 08:00:31 +02:00
Juan RP
596a37defa bin/xbps-checkvers/main.c: buffer not NUL terminated (CID 62667) 2014-10-05 07:55:27 +02:00
Juan RP
810c5d8de0 bin/xbps-pkgdb/check_pkg_symlinks.c: buffer not NUL terminated (CID 62665) 2014-10-05 07:43:39 +02:00
Juan RP
b5713ecf12 bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62695) 2014-10-05 07:40:18 +02:00
Juan RP
73e81addba bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62707) 2014-10-05 07:34:15 +02:00
Juan RP
62cb6f14e6 bin/xbps-rindex/index-add.c: resource leak (CID 62718) 2014-10-05 07:31:07 +02:00
Juan RP
a15dc24fe8 bin/xbps-pkgdb/check_pkg_symlinks.c: uninitialized pointer read (CID 62730) 2014-10-05 07:23:53 +02:00
Juan RP
83c981884c bin/xbps-query/show-deps.c: initialize a var to make gcc-4.6 happy. 2014-10-04 22:08:07 +02:00
Juan RP
8f25116d54 bin/xbps-install/main.c: rename a var to make gcc-4.6 happy. 2014-10-04 22:05:33 +02:00
Juan RP
966718bb7d bin/*/*.8: fixed mdoc errors/warnings reported by mandoc -Wall. 2014-09-30 11:36:08 +02:00
Juan RP
ef7e8bdfe3 xbps-query.8: mdoc fix. 2014-09-28 09:29:08 +02:00
Enno Boland
7e47614b4d bin/xbps-checkvers: take reverts field in account 2014-09-27 20:51:21 +02:00
Juan RP
0f5ce62ba9 xbps-create: fix build introduced in previous. 2014-09-27 13:11:43 +02:00
Juan RP
72cefcfc83 Introduce xbps_mmap_file() and use it in strategic points.
Rather than using a random buffer from stack or heap, and decide
what size to use, create a private memory mapped object...

This simplifies the code in lib/verifysig.c and xbps-create.
2014-09-27 13:00:34 +02:00
Juan RP
ba0cdabe1e bin/xbps-pkgdb/check.c: fix assertion due to double free. 2014-09-27 12:22:13 +02:00
Enno Boland
2fe65dccec rename xbps-packages to void-packages 2014-09-26 14:24:06 +02:00
Enno Boland
b5f357bd5e bin/xbps-create: update manpage. 2014-09-23 20:50:59 +02:00
Enno Boland
78203c1735 bin/xbps-rindex: fix adding packages with reverts. 2014-09-23 19:14:45 +02:00
Enno Boland
50fb6c1605 rename xbps_pkgver_is_reverted to xbps_pkg_reverts 2014-09-23 13:54:06 +02:00
Enno Boland
ebd614dff6 bin/xbps-rindex: take the revert field in account.
- if the user wants to add a package which is older than the
  one in the index, xbps-rindex will check if the package
  reverts the one on the index. If so the package will be added
  regardless of its version

- if the user wants to add a package which is newer than the
  one on the index, xbps-rindex will check if the package on the
  index reverts the one the user wants to add. If so the package
  will be skipped regardless of its version.
2014-09-23 13:54:06 +02:00
Enno Boland
33032429c2 bin/xbps-create: allow to define the reverts field for a package. 2014-09-23 13:54:06 +02:00
Christian Neukirchen
cfc0e3b9d9 xbps-create: do not compress with xz -9
xz -9 is very expensive in terms of CPU and memory usage, and also
memory usage for decompression.  Thus we stick to default of -6 for
xz.  For gzip and bzip2, -9 is ok.
2014-09-19 16:38:31 +02:00
Juan RP
f52eea34d4 xbps-install: abort transaction if there's insufficient disk space on rootdir.
The free disk space wasn't computed correctly and xbps-install(8) wasn't
handling ENOSPC rval in xbps_transaction_prepare().
2014-09-18 12:11:02 +02:00
Juan RP
20326738ed bin/xbps-install/fetch_cb.c: optimize: only call isatty() once. 2014-09-18 10:21:24 +02:00
Juan RP
2550d3d006 xbps-query: do not print ANSI escape codes if stdout is not a tty. 2014-09-18 10:14:42 +02:00
Juan RP
f80df0fa22 xbps-{install,remove}: print guards in post-install/pre-remove messages.
This avoids the need to manually add them to the {INSTALL,REMOVE}.msg
files in binary packages, and saves some bytes in the repository archive
and binary packages.

Idea by @dominikh.
2014-09-16 09:58:27 +02:00
Juan RP
dee7852af8 xbps-rindex: fix -a/--add mode repodata archive permissions.
The repodata archive wasn't group writable, resulting in a new archive
created from scratch if the fd wasn't writable.

repodata archives are now created with 0664 mode, this way its main group
also can write to it.
2014-09-15 12:15:42 +02:00
Juan RP
567382c3a2 xbps-rindex: fix musl build: needs -lcrypto explicitly. 2014-09-14 20:01:05 +02:00
Juan RP
e902619220 Remove empty self replaced pkg arrays from pkgdb. 2014-09-14 18:16:43 +02:00
Juan RP
2b7c4d568a Remove pkg self replacement from pkgdb; this must not be propagated. 2014-09-13 18:14:04 +02:00
Juan RP
411480e43d pkgdb: repository-origin -> repository to match the repo pkg obj. 2014-09-13 10:49:13 +02:00
Juan RP
287665009b Drop unused headers. 2014-09-13 08:54:12 +02:00
Juan RP
f26a9c1e2b xbps-{install,query}.8: sync with reality. 2014-09-12 12:15:03 +02:00
Juan RP
39aca1bbc9 Implement shlib checks for all pkg revdeps in the transaction.
Added three new test cases to verify its correctness.
2014-09-12 11:49:34 +02:00
Juan RP
b306adf52b bin/xbps-query/ownedby.c: take into account pkgs with no files. 2014-09-11 18:10:04 +02:00
Juan RP
dea7ea888e bin/*/*.8: sync with reality. 2014-09-11 12:21:33 +02:00
Juan RP
f9d162e639 xbps-install: show "pkgname (curver -> newver)" in updates; requested by @chneukirchen. 2014-09-11 11:43:15 +02:00
Juan RP
e32f7f4909 xbps-pkgdb: unfix previous, pkg metafile must be internalized. 2014-09-11 08:04:51 +02:00
Juan RP
bd2bb98fa7 xbps-pkgdb: update for pkgdb-0.38. 2014-09-11 08:00:37 +02:00
Juan RP
ed67cad564 xbps-query(8): added local search mode support (-s [-p]). 2014-09-11 01:15:51 +02:00
Juan RP
01dbb968dd Welcome pkgdb-0.38. 2014-09-11 00:12:12 +02:00
Juan RP
56ab438d3c xbps-install: indentation. 2014-09-07 09:34:33 +02:00
Juan RP
05e7a59f03 xbps_handle: constify xbps_xxx_cb_data argument. 2014-09-06 09:46:03 +02:00
Juan RP
1a024773af xbps-remove: use xbps_binpkg_{arch,pkgver} for -O (clean-cache).
The new implementation is almost 1s faster than before on my system.
2014-09-05 21:09:27 +02:00
Juan RP
d7d749312d xbps-rindex: use xbps_binpkg_{arch,pkgver} for -r (remove-obsoletes).
This is magnituds faster than before; some results:

$ for f in 1 2 3; do time xbps-rindex -r /var/cache/xbps/ &>/dev/null; done

real 0m0.624s
user 0m2.163s
sys 0m0.032s

real 0m0.590s
user 0m2.159s
sys 0m0.023s

real 0m0.584s
user 0m2.144s
sys 0m0.039s

$ for f in 1 2 3; do time LD_PRELOAD=$PWD/lib/libxbps.so.2.0.0 ./bin/xbps-rindex/xbps-rindex -r /var/cache/xbps &>/dev/null; done

real 0m0.037s
user 0m0.030s
sys 0m0.010s

real 0m0.036s
user 0m0.032s
sys 0m0.007s

real 0m0.037s
user 0m0.035s
sys 0m0.006s
$
2014-09-05 21:07:07 +02:00
Juan RP
b73d40092c xbps-uhelper: new targets: binpkgarch and binpkgver.
- binpkgarch: returns the architecture component of a xbps filename.
- binpkgver: returns the pkgver component of a xbps filename.
2014-09-05 21:06:06 +02:00