Commit Graph

755 Commits

Author SHA1 Message Date
Juan RP
e03d49f6bf xbps-install: size required on disk == dlsize+instsize. 2013-11-15 10:29:07 +01:00
Juan RP
53ecaf9819 Remove xbps_print_hexfp() from API and move it xbps-rindex, where it belongs. 2013-11-08 09:12:29 +01:00
Juan RP
89c62c626c xbps-rindex: [clean] the filesclean test now passes successfully. 2013-11-03 11:15:56 +01:00
Juan RP
3602774bc3 xbps-rindex: [clean] make sure to pass a valid repository url. 2013-11-03 10:16:58 +01:00
Juan RP
616d4420d2 xbps-rindex(8): fix #19. An ATF test-case will be imported later. 2013-11-02 11:34:55 +01:00
Juan RP
f39f7ff2fa xbps-rkeys: print the error if pubkey cannot be imported. 2013-10-28 12:46:23 +01:00
Juan RP
7b0e9967b1 xbps-uhelper: added 'real-version' action.
- This prints to stdout the version of an installed "real" package,
  not virtual. The 'version' action can be used to match any "real" and
  "virtual" package instead.
- Drop strcasecmp() to check actions and use strcmp() instead.
2013-10-22 09:56:55 +02:00
Juan RP
ab5b356b5b xbps-rindex: initialize idxfiles in repo to access to it. 2013-10-18 09:36:25 +02:00
Juan RP
70047586ee Xref xbps-rkeys(8) 2013-10-12 10:13:32 +02:00
Juan RP
43b9be6046 xbps-rindex(8): added support for XBPS_PASSPHRASE env var.
- XBPS_PASSPHRASE (if set) will be supplied as passphrase when signing repos.
- Use the default OpenSSL passphrase cb when loading the private key.
2013-10-12 09:55:03 +02:00
Juan RP
c91050fc35 xbps-rindex(8): added -v --verbose option (mainly for -r mode). 2013-10-10 10:43:01 +02:00
Juan RP
a5ecaa493f New utility: xbps-rkeys(8) to manage RSA public keys. 2013-10-09 10:13:07 +02:00
Juan RP
250916fa6a xbps-query: use the _multi version to find out largest pkgver string. 2013-10-08 10:39:20 +02:00
Juan RP
f3b0b19258 xbps-rindex: remove -c --clean mode and adapt to the new libxbps API.
- Removed -c --clean mode. It's not too useful and adds a considerable
  amount of gratuitous code. It takes almost the same time than
  adding all pkgs from scratch.

- When creating the repository data always add the meta plist at the
  2nd position in the archive, to optimize its access.

- Misc improvements.
2013-10-07 10:23:14 +02:00
Juan RP
1f270e3a1a xbps-query: adapt to the new libxbps API. 2013-10-07 10:22:45 +02:00
Juan RP
8d5c48b861 Added support for the long awaited feature: RSA signed repositories. 2013-10-05 11:38:04 +02:00
Juan RP
27db8e89c4 xbps-query: replace -D --defrepo' option with -R' and `--repository=url'.
The argument in `--repository' is optional, therefore must be specified
with `=' to work. If no argument is specified, repository mode is enabled
preserving the repository list of configuration file.
2013-09-18 17:13:43 +02:00
Juan RP
5e1432f418 Added support to specify multiple repositories via cmdline (close #17). 2013-09-18 16:45:05 +02:00
Juan RP
c514894152 xbps-{install,remove}: remove the stupid rw checks on rootdir/metadir. 2013-09-18 15:43:55 +02:00
Juan RP
023484ca0b Introduce xbps_{array,pkgdb}_foreach_cb_multi() and use it where appropiate.
In some tasks the single threaded implementation outperms the multithreaded
one. Use it where it really makes a difference. The _multi() routines do not
spawn any thread if _SC_NPROCESSORS_ONLN == 1.

Bump XBPS_API_VERSION.
2013-09-17 16:30:13 +02:00
Juan RP
af4e90aae8 xbps-rindex: register pkgs in index-files by pkgname and use xbps_array_foreach_cb().
This simplifies accessing/removing pkgs in this dictionary.
2013-09-16 10:41:42 +02:00
Juan RP
98e1687ef5 Re-add all pkg metadata objects to the repository index. 2013-09-16 09:09:56 +02:00
Juan RP
c5acbc7953 mk/prog.mk: set MAN to $(BIN).8 by default. 2013-09-16 08:57:24 +02:00
Juan RP
0a48738634 bin/xbps-remove/main.c: fix a memleak in the clean-cache code. 2013-09-15 10:25:47 +02:00
Juan RP
4057e4961c Use C99 for loop initializers.
That means that a C99 compiler is now mandatory.
2013-09-15 10:06:49 +02:00
Juan RP
9a9c816552 xbps-query.8: remove dup block. 2013-09-13 09:17:00 +02:00
Juan RP
24ff0472dd Use fs blksize from stat(2)ed file when reading archives. 2013-08-29 14:30:14 +02:00
Juan RP
a039330f3c Misc cleanups: use __attribute__((__unused__)); remove dead code. 2013-08-29 10:45:30 +02:00
Juan RP
add4484ad8 bin/xbps-query/xbps-query.8: document -H --list-hold-pkgs. 2013-08-18 11:06:45 +02:00
Juan RP
22ae6295f5 manpages: use github url for bugreports. 2013-08-18 10:17:45 +02:00
Juan RP
1999fbd771 Relax libarchive version requirement to 2.8.0. 2013-08-16 10:26:36 +02:00
Juan RP
84d14286a8 More libarchive-2.x compat. 2013-08-15 11:55:20 +02:00
Juan RP
776b94e6bc Remove PackagesOnHold from xbps.conf; use xbps-pkgdb -m hold|unhold instead.
To put a package on hold mode:
	$ xbps-pkgdb -m hold foo

To unhold the package:
	$ xbps-pkgdb -m unhold foo

To list packages on hold mode:
	$ xbps-query -H

This also close #12 from github.
2013-08-12 14:46:54 +02:00
Juan RP
9c9d5b58dd Assume 80 columns if TIOCGWINSZ ws.col is bogus (0). 2013-08-10 12:59:59 +02:00
Juan RP
2f9bd4f9a2 bin/xbps-rindex/remove-obsoletes.c: fix use-after-free. 2013-08-07 16:01:59 +02:00
Juan RP
4428cac154 xbps-query: ignore non working repos; misc fixes. 2013-07-27 20:02:07 +02:00
Juan RP
0c7701f2bc Introduce xbps_array_foreach_cb() and use it in random code.
This routine will spawn a thread per core to process N items stored
in the specified array, the last thread gets the remainder of items left.

Results have shown that xbps benefits if there is a considerable amount
of items and number of threads being spawned.

Use it in xbps_pkgdb_foreach_cb(), xbps-pkgdb(8), xbps-query(8)
and xbps-rindex(8).

On UP systems there's no overhead because pthread(3) is not used at all.

WIP! investigate if it can be used in libxbps (xbps_rpool_foreach()),
and finish conversion of xbps-rindex(8) -c.
2013-07-27 09:47:16 +02:00
Juan RP
84d0e429ab bin/xbps-query/list.c: simplify list_orphans(). 2013-07-27 06:11:48 +02:00
Juan RP
20f2d10527 xbps-query(8): -L now prints all repos, including non working repos (close #11). 2013-07-26 11:42:52 +02:00
Juan RP
e0643acbb0 xbps-query(8): fixed some memleaks in local/remote ownedby mode. 2013-07-21 10:49:30 +02:00
Juan RP
6358cf43fc xbps-query: fix regression in -R, also print repository string object. 2013-07-07 09:59:25 +02:00
Juan RP
6d87bf04d0 Revert "xbps-rindex: [add] add index-files.plist the first in the repo archive."
This reverts commit e76874f513.

This slows down some ops that were much faster before; will use another approach.
2013-07-04 11:05:42 +02:00
Juan RP
e76874f513 xbps-rindex: [add] add index-files.plist the first in the repo archive.
By having index.plist the 2nd entry in archive there are more chances
to skip identical bytes in the archive via rsync.
2013-07-04 03:33:42 +02:00
Juan RP
505a933097 Added support to verify reverse dependencies in a transaction.
See https://plus.google.com/106812073015308749022/posts/ZXMHimd8iKd
2013-06-27 16:52:31 +02:00
Juan RP
09e116b7f0 xbps_api.h -> xbps.h 2013-06-20 12:31:02 +02:00
Juan RP
42c0766c00 Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
55af300e65 xbps-create: needs stdarg.h. 2013-06-19 11:28:51 +02:00
Juan RP
02a11ed08c xbps-rindex: add: remove unused headers; prop_array_count checks for NULL pointers. 2013-06-19 09:20:44 +02:00
Juan RP
03575cecd0 xbps-create: s/size_t/unsigned int/ to iter in prop_arrays. 2013-06-15 10:29:43 +02:00
Juan RP
3abe48b68a Introduce xbps_repo_get_pkg_plist() and use it in xbps-query -R. 2013-06-14 10:22:10 +02:00
Juan RP
5c3985ddf1 xbps-query: search: simplify and use xbps_match_virtual_pkg_in_dict(). 2013-06-14 09:40:10 +02:00
Juan RP
89ded69bed xbps-query: use get_maxcols() from xbps-install. 2013-06-14 09:33:27 +02:00
Juan RP
5f2bba7f4e Move functionality to resolve revdeps from repos to libxbps. 2013-06-14 08:13:51 +02:00
Juan RP
8a05bc5f24 xbps-dgraph: installed_size obj is in bytes; fix a comment. 2013-06-14 05:12:15 +02:00
Juan RP
7b2942e789 xbps-dgraph: only add revdeps when it's necessary. 2013-06-13 17:44:44 +02:00
Juan RP
6b397198bf xbps-dgraph: completely updated and working as before. 2013-06-13 17:41:16 +02:00
Juan RP
f868dd7816 xbps-dgraph: make this work again; needs more changes yet. 2013-06-12 10:34:01 +02:00
Juan RP
db1efb3aa6 Relax memory requirements on 64bit platforms; fix two memleaks. 2013-06-12 10:04:10 +02:00
Juan RP
6a9e394a60 xbps-query(8): extend 734a2c3 to also match with pkgpatterns. 2013-06-12 04:48:36 +02:00
Juan RP
5f02790ac7 xbps-query(8): fix regression introduced in 734a2c3. 2013-06-11 16:41:36 +02:00
Juan RP
b646554aea xbps-query: formatting tweaks for PROP_TYPE_ARRAY objects. 2013-06-11 16:26:27 +02:00
Juan RP
734a2c3c2b xbps-query(8): added support to find revdeps for virtual pkgs in repository mode. 2013-06-11 16:18:40 +02:00
Juan RP
99be698979 Use a single file to store repository data.
This is just the starting point to extend repositories with PGP signatures.
2013-06-10 10:28:39 +02:00
Juan RP
fa9d3471d9 xbps-create: improve d6605e1b97 (sanitize destdir to resolve target files in symlinks).
Previously in d6605e1b97 if destdir had trailing '/' the behavior
of detecting target files in symlinks was changed slightly.
2013-05-27 13:03:40 +02:00
Juan RP
d6605e1b97 xbps-create(8): calculate correctly target file for relative symlinks. 2013-05-27 10:27:55 +02:00
Juan RP
15b2258b77 xbps-pkgdb: fix issue #9 (remove old code that broke pkgdb mem vs disk comparisions). 2013-05-16 17:16:39 +02:00
Juan RP
91c08bfe75 bin/xbps-query/ownedby.c: simply match patterns with fnmatch(3). 2013-05-13 15:10:47 +02:00
Juan RP
53217fd51b xbps-rindex: added -f --force flag to forcefully register a pkg with -a --add. 2013-05-02 10:46:30 +02:00
Juan RP
111184ea84 xbps-pkgdb: change symlink checks to warning messages not errors. 2013-04-19 10:15:44 +02:00
Juan RP
5fd7565e6c xbps-install(8): -R now overrides the repository list set in a configuration file.
Now -R can be used independently if a configuration file exists or not.
2013-04-18 18:17:14 +02:00
Juan RP
3a5d6b1376 xbps-rindex: fixed writing repo index-files (regression added in e29f221). 2013-04-17 14:20:48 +02:00
Juan RP
a0d50f542a xbps-install: revert fa40928026.
If a package is already installed and it's being installed without -f (force),
xbps-install must return EEXIST.

xbps-src really expects this to ignore duplicated build dependencies.
2013-04-15 21:02:33 +02:00
Juan RP
68770053e9 xbps-rindex: fixed cleaning obsolete entries from index-files in clean mode (-c). 2013-04-06 21:30:31 +02:00
Juan RP
1f5bb03daf bin/xbps-pkgdb/check_pkg_files.c: remove bogus assignment. 2013-04-04 10:17:00 +02:00
Juan RP
074a2f0747 bin/xbps-rindex/index-add.c: remove completely unused var. 2013-04-04 10:09:52 +02:00
Juan RP
ab445ec307 bin/xbps-pkgdb/check_pkg_files.c: no need to initialize rv. 2013-04-04 10:09:36 +02:00
Juan RP
6ac76f68ed bin/xbps-rindex/index-add.c: remove unused variable. 2013-04-04 10:04:45 +02:00
Juan RP
e29f2216e2 xbps-rindex: fix memleaks in error paths. 2013-04-04 09:55:12 +02:00
Juan RP
d536ad39ff xbps-pkgdb: fix two meamleaks in error paths. 2013-04-04 09:54:53 +02:00
Juan RP
ae254e9b06 bin/xbps-query/list.c: return error if pkgver or short_desc are NULL. 2013-04-04 09:11:37 +02:00
Juan RP
8736ef6c5a xbps-create: fix issue #5 from github: initialize setlocale. 2013-04-01 10:49:25 +02:00
Juan RP
ab8cb56c24 fetch_cb.c: fixed casts when computing ETA. 2013-03-27 16:14:23 +01:00
Juan RP
e25216822b xbps-uhelper: make the 'version' target also match virtual pkgs. 2013-03-25 21:11:30 +01:00
Juan RP
59006fe86c xbps-create: added --build-options option, mainly for xbps-src.
This expects a string with the list of used build options.
2013-03-23 08:18:06 +01:00
Juan RP
70b89a88cc xbps-query: make -o (ownedby) follow symlinks; close issue #4 from github. 2013-03-17 10:59:40 +01:00
Juan RP
a6c26f6c12 xbps-create: also set st_{uid,gid} to 0:0 in archived files. 2013-03-15 13:14:57 +01:00
Juan RP
7491c0e584 xbps-create: set root:root if e[gu]id == st.st_e[gu]id in package files.
The rational is that packages should have proper perms to be installed
globally in a system as root, and fakeroot is useless when generating
packages with xbps-create when it's statically build.
2013-03-15 09:31:15 +01:00
Juan RP
dd9cf9737b xbps-query: fix segfault when listing unexistent package files. 2013-03-13 23:15:42 +01:00
Juan RP
4d7c51c368 bin/xbps-install/transaction.c: fix -n (dry-run) output for removed pkgs. 2013-03-11 12:12:03 +01:00
Juan RP
3e2aac74d2 xbps-query: print filename-{sha256,size} objs from index in repo mode. 2013-03-08 21:06:55 +01:00
Juan RP
dfe42ce7e3 xbps-query: -p expects an argument; show usage() otherwise. 2013-03-08 20:23:13 +01:00
Juan RP
f13d0cdb33 bin/xbps-install/transaction.c: remove extra newlines. 2013-03-08 10:01:19 +01:00
Juan RP
50ea03df2a Revert code to update xbps independently; I'll use another way to implement this. 2013-03-08 09:44:57 +01:00
Juan RP
59105ab995 xbps-remove: make XBPS_STATE_REMOVE_FILE_OBSOLETE state silent, only show errors. 2013-03-07 11:32:22 +01:00
Juan RP
bb17958212 xbps-install: remove dead code. 2013-03-07 11:31:55 +01:00
Juan RP
0a1859987a Respect automatic-install mode from pkgdb in transaction updates.
Also simplify register/unregister and remove useless state definitions.
2013-03-07 10:03:59 +01:00
Juan RP
90b6803825 Introduce XBPS_STATE_CONFIGURE_DONE and use it in xbps-reconfigure(8). 2013-03-07 09:24:04 +01:00
Juan RP
5f71d1e40d xbps-reconfigure: also syslog XBPS_STATE_CONFIGURE state. 2013-03-06 12:02:04 +01:00
Juan RP
6d2497d8d8 xbps-install/state_cb.c: do not print anything if XBPS_STATE_XBPS_UPDATE is recvd. 2013-03-06 09:21:09 +01:00
Juan RP
a81316a248 xbps-query: ownedby.c: ignore unexistent files in pkg metadata. 2013-03-05 08:52:40 +01:00