Commit Graph

60 Commits

Author SHA1 Message Date
Juan RP
ef67b56054 xbps-rindex: clean: ignore invalid entries from index-files. 2013-11-25 11:27:11 +01:00
Juan RP
20213deb10 xbps-rindex: clean: use the correct key from index-files. 2013-11-25 11:05:06 +01:00
Juan RP
ae8925d907 xbps-rindex: in add mode also remove old entry from index-files. 2013-11-25 11:03:51 +01:00
Juan RP
d2f2796c85 xbps-rindex: redo the clean mode in two passes as it was intended in previous commit. 2013-11-25 10:45:05 +01:00
Juan RP
172c84040c xbps-rindex: fix clean mode while removing obsolete entries on index-files with updates. 2013-11-25 10:16:38 +01:00
Juan RP
8882b0215f Redo how the repository keys are stored.
- Repository keys are now stored in a new directory on metadir (/var/db/xbps):

	<metadir>/key>

- Repository keys are stored with the hex fingerprint of its RSA
  public key in a plist dictionary:

	<metadir>/keys/xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.plist

- Drop xbps-rkeys(8) and merge its functionality into xbps-install(8) and
  xbps-query(8).

- xbps-query(8) -vL now shows some more details of remote repositories:

 3134 http://localhost:8000 (RSA signed, verified)
      Signed-by: Void Linux
      4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d
   16 http://localhost:8000/nonfree (RSA signed, verified)
      Signed-by: Void Linux
      4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d

Bump XBPS_API_VERSION.
2013-11-18 16:05:46 +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
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
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
8d5c48b861 Added support for the long awaited feature: RSA signed repositories. 2013-10-05 11:38:04 +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
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
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
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
2f9bd4f9a2 bin/xbps-rindex/remove-obsoletes.c: fix use-after-free. 2013-08-07 16:01:59 +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
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
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
02a11ed08c xbps-rindex: add: remove unused headers; prop_array_count checks for NULL pointers. 2013-06-19 09:20:44 +02:00
Juan RP
db1efb3aa6 Relax memory requirements on 64bit platforms; fix two memleaks. 2013-06-12 10:04:10 +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
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
3a5d6b1376 xbps-rindex: fixed writing repo index-files (regression added in e29f221). 2013-04-17 14:20:48 +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
074a2f0747 bin/xbps-rindex/index-add.c: remove completely unused var. 2013-04-04 10:09:52 +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
5cb74b7ec9 xbps-rindex: fixed -c --clean mode (missing args wtf). 2013-03-05 05:03:15 +01:00
Juan RP
7c1a0ac3e8 New pkgdb (0.21) and repo index (1.7) format, see NEWS for info. 2013-03-05 04:08:42 +01:00
Juan RP
1f324a76a2 xbps-{install,query,rindex}.8: document environment var: XBPS_TARGET_ARCH. 2013-02-20 11:42:06 +01:00
Juan RP
82a8263f37 xbps-rindex(8): fix crash in -r when a pkg cannot be removed. 2013-01-16 16:25:29 +01:00
Juan RP
bb877b0db7 xbps-rindex: -a does not remove outdated binpkgs anymore; use -r instead. 2012-12-15 11:13:32 +01:00
Juan RP
e2176ec4b6 bin: no point in cleaning up resources when it's exiting... 2012-12-14 11:58:30 +01:00
Juan RP
41f753248f xbps-rindex(8): remove obsoletes mode (-r) is now multithreaded. 2012-12-14 09:47:47 +01:00
Juan RP
a0443fc4ce xbps-rindex(8): clean mode (-c) is now multithreaded. 2012-12-14 04:59:47 +01:00
Juan RP
849191a5de xbps-rindex: [clean] if pkg cannot be read don't check for hash mismatch. 2012-12-07 09:57:41 +01:00
Juan RP
298072ced3 xbps-rindex(8): in clean mode (-c) also remove entries with unmatched hash. 2012-12-03 11:05:37 +01:00