Commit Graph

78 Commits

Author SHA1 Message Date
Juan RP
aa8d88272e lib/repo.c: resource leak (CID 62715) 2014-10-05 07:32:43 +02:00
Juan RP
bf92d1f5a3 xbps_repo_open: open archive read-only if lock is not set. 2014-09-05 12:39:53 +02:00
Juan RP
013731c502 Acquire/release a POSIX file lock on repository archives.
- xbps_repo_open() accepts a third argument (bool) to acquire a POSIX file
lock on the repository archive.
- xbps_repo_close() accepts a second argument (bool) to release a POSIX file
lock on the repository archive.

This avoids the issue of multiple xbps-rindex(8) processes being blocked
even for different repositories on the same architecture, resulting in
unnecessary contention.
2014-09-05 12:26:42 +02:00
Juan RP
ada3483acc lib/repo.c: fix two memleaks in error paths found by clang. 2014-04-19 16:07:29 +02:00
Juan RP
d08e76a386 Keep repo metadata if possible when updating repodata (xbps-rindex -a/-c).
API/ABI incompat changes, you've been warned.
2014-01-30 13:07:34 +01:00
Juan RP
c03505b13e Fix #30 (segment fault in xbps-rindex) 2014-01-22 11:53:08 +01:00
Juan RP
29cf8e9ba8 xbps_repo_open: just call xbps_pubkey2fp() if pubkey is valid (issue #27). 2014-01-06 10:01:49 +01:00
Juan RP
ec0d38c469 Implement per pkg RSA signatures and on-demand repository access. 2013-12-24 10:43:55 +01:00
Juan RP
851eb26596 xbps_repo_open: fix f7b4587 and really pass the correct size this time. 2013-12-16 07:45:51 +01:00
Juan RP
f7b4587e11 xbps_repo_open: pass the correct size to realloc(). 2013-12-16 07:31:15 +01:00
Juan RP
865dffde58 xbps_repo_open: switch to archive_read_data_block() and misc tweaks. 2013-12-12 00:18:08 +01:00
Juan RP
d98468515a Fix #25 correctly: compare against repo->signature. 2013-11-30 08:30:25 +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
a5ecaa493f New utility: xbps-rkeys(8) to manage RSA public keys. 2013-10-09 10:13:07 +02:00
Juan RP
27723e94ff Optimize repository API functions.
- Remove xbps_repo_get_plist() and try to internalize all members at
  xbps_repo_open() time.

- Added xbps_repo_open_idxfiles() to also internalize the index-files
  plist from repository, which is really huge and must only be internalized
  when needed.

- Improve how signed and verified repositories are detected.

- Misc optimizations and small performance improvements.

Bump XBPS_API_VERSION.
2013-10-07 10:19:04 +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
fce411bac6 xbps_rpool_foreach: ignore invalid repos. 2013-09-17 16:24:19 +02:00
Juan RP
e6aade53a0 xbps_repo_get_pkg_revdeps: ignore invalid repos. 2013-09-17 16:19:56 +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
84d14286a8 More libarchive-2.x compat. 2013-08-15 11:55:20 +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
47eed214a6 xbps_repo_get_pkg_revdeps: don't continue if arg is a virtual pkg. 2013-06-27 18:14:38 +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
9d80524a34 Minor optimization: no need to check if obj is NULL, prop_object_type() does that already. 2013-06-14 12:22:29 +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
5f2bba7f4e Move functionality to resolve revdeps from repos to libxbps. 2013-06-14 08:13:51 +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