Commit Graph

112 Commits

Author SHA1 Message Date
Juan RP
b96d1c9f4e bin/xbps-rindex/sign.c: CID 62699 (dereference NULL return value) 2014-10-05 13:20:18 +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
54b72d8f81 bin/xbps-rindex/index-add.c: fix CID 62685 correctly. 2014-10-05 09:35:42 +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
ced1ce4b40 bin/xbps-rindex/index-add.c: resource leak (CID 62685) 2014-10-05 08:06:12 +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
966718bb7d bin/*/*.8: fixed mdoc errors/warnings reported by mandoc -Wall. 2014-09-30 11:36:08 +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
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
287665009b Drop unused headers. 2014-09-13 08:54:12 +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
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
8939e8697d bin/*/*.8: add missing End-List macros (.El). 2014-08-23 09:26:02 +02:00
Juan RP
43090cef2a Xref xbps-uchroot(8) 2014-04-21 10:58:09 +02:00
Juan RP
119d059c9b bin/xbps-rindex/index-add.c: fix a mistake in previous cleanups. 2014-04-20 10:36:17 +02:00
Juan RP
dacbb2f22f Fixed some warnings reported by clang. 2014-04-20 10:02:54 +02:00
Juan RP
8244f57320 bin/*: update manpages with Xref xbps-checkvers(8). 2014-04-07 12:22:55 +02:00
Juan RP
ee9479cc57 xbps-rindex: --sign bugfix to avoid garbage in the PEM RSA public key buffer. 2014-03-31 12:00:08 +02:00
Juan RP
9fe6b363d6 Revert "xbps-rindex: [sign] free pubkey data obj after externalizing index-meta."
This reverts commit 11e04685ef.
2014-02-06 16:34:59 +01:00
Juan RP
06b0f86ef4 Revert "xbps-rindex: [sign] pubkey buffer must be kept until index-meta is externalized too."
This reverts commit cbe05bd0f4.
2014-02-06 16:34:45 +01:00
Juan RP
cbe05bd0f4 xbps-rindex: [sign] pubkey buffer must be kept until index-meta is externalized too. 2014-02-06 12:26:17 +01:00
Juan RP
11e04685ef xbps-rindex: [sign] free pubkey data obj after externalizing index-meta.
Otherwise the externalization process might give unexpected results.
2014-02-06 11:52:36 +01:00
Juan RP
306fe4968e xbps-rindex: clear file permission bits before creating our named semaphore.
Due to the file permission bits (umask(3)) the semaphore wasn't created
with correct permissions.
2014-02-05 15:27:35 +01:00
Juan RP
4f7385e4a6 xbps-rindex: switch named semaphore only for the target architecture. 2014-01-31 18:44:24 +01:00
Juan RP
f5e1fff93a xbps-rindex: use a POSIX named semaphore to avoid concurrency issues. 2014-01-31 11:35:31 +01:00
Juan RP
915b8b2557 bin/xbps-rindex/sign.c: fix a stupid typo. 2014-01-30 19:46:46 +01:00
Juan RP
ea26fb3d3f bin/xbps-rindex/sign.c: initialize var for strcmp(). 2014-01-30 19:33:14 +01: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
b21f4c9a59 xbps-rindex: clean mode: fixed random false positives with multiple threads. 2014-01-29 16:58:38 +01:00
Juan RP
c03505b13e Fix #30 (segment fault in xbps-rindex) 2014-01-22 11:53:08 +01:00
Juan RP
7f5bd2f8a3 bin/xbps-rindex/sign.c: add 0.27 compat again. 2014-01-21 16:36:44 +01:00
Juan RP
72f37de770 Fix #29 (xbps-rindex does not sign repodata if no pkg has been signed) 2014-01-21 11:06:02 +01:00
Juan RP
804a39c63b Added XBPS_ARCH environment var to override uname(2) machine result. 2014-01-09 11:41:25 +01:00
Juan RP
23650f1c66 bin/xbps-rindex/sign.c: add 0.27 compat glue. 2014-01-03 10:53:55 +01:00
Juan RP
3ca442eb3d xbps-rindex: [add] re-add all package objects to the index. 2013-12-30 10:27:54 +01:00
Juan RP
0a9522210a bin/xbps-rindex/sign.c: use access(2) to check if pkg signature exists. 2013-12-26 07:59:11 +01:00
Juan RP
98748bdcd1 bin/xbps-rindex/remove-obsoletes.c: also remove pkg signature files. 2013-12-24 12:02:33 +01:00
Juan RP
e4b2193786 bin/xbps-rindex/sign.c: fix a -Wsign-compare warning. 2013-12-24 10:58:55 +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
0744b76946 xbps-xxx.8: update issues url. 2013-12-17 15:38:56 +01:00
Juan RP
711f2ea7f5 bin/xbps-rindex/sign.c: fix a double free in error path found by clang-analyzer. 2013-12-11 12:39:15 +01:00
Juan RP
d98468515a Fix #25 correctly: compare against repo->signature. 2013-11-30 08:30:25 +01:00
Juan RP
e86f9def03 xbps-rindex: fix #25 (--sign unnecessarily regenerates <arch>-repodata). 2013-11-30 08:04:37 +01:00
Juan RP
7c57918950 xbps-rindex(8): fix #24 and added an ATF test case. 2013-11-29 17:30:45 +01:00
Juan RP
30a500b5b3 xbps-rindex: clean: fix a regression introduced yesterday (use-after-free). 2013-11-28 11:29:48 +01:00