Commit Graph

198 Commits

Author SHA1 Message Date
classabbyamp
406f109100 lib/, bin/: fix signature type, now called *.sig2
Since 8d5c48b, xbps has used a sha1 ASN1 prefix with a sha256 hash, and
as of openssl v3, openssl cares about this. This works around that in a
compatible way by moving to a second sig file, binpkg.sig2.

For xbps-remove -O and xbps-rindex -r, also clean up obselete .sig files.
2023-08-30 21:00:37 +02:00
classabbyamp
1271a3dbed bin/: use xbps logging functions more 2023-02-11 14:23:51 +01:00
classabbyamp
06fbbba2e5 manpages: small formatting improvements
- use `.Os` to show "Void Linux" in the footer
- use `Aq Mt` to display email addresses
- use `.Lk` for the bug link
- remove unnecessary use of `.Nm <name>` when already defined
- add xbps-alternatives(1) to SEE ALSO where missing
- bump date
2023-02-10 21:33:51 +01:00
Duncan Overbruck
de484e9369
lib: change xbps_dbg_printf to not require xbps_handle
This allows to simplify a lot of code by not having to pass around
the xbps handle everywhere just to print some debug information.
2022-12-24 14:29:23 +01:00
classabbyamp
0d0a2b9657 bin/xbps-rindex/remove-obsoletes.c: always opendir() pwd
If repodir is given as a relative path, it will not work because it will
try to open the dir relative to itself because it already chdir()ed into
repodir. This fixes xbps-rindex -r when relative paths are specified.

fixes #519
2022-12-09 20:45:29 +01:00
Duncan Overbruck
a8d095a2ba
bin/xbps-rindex: drop libarchive compat macros
Closes: #411 [via git-merge-pr]
2021-06-26 18:51:15 +02:00
Arsen Arsenović
1263b6607f
bin/xbps-rindex: fix a leak in load_rsa_privkey
Closes: #327 [via git-merge-pr]
2021-02-04 23:15:36 +01:00
Érico Rolim
47df729bcc
tree-wide: remove unnecessary __UNCONST usage. 2021-02-04 23:02:39 +01:00
Duncan Overbruck
44cd938115
Revert "Use shared LICENSE file for all xbps code."
This reverts commit be7d8cfaf1.

This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
2020-04-29 14:12:10 +02:00
Juan RP
be7d8cfaf1
Use shared LICENSE file for all xbps code. 2020-04-24 11:44:19 +02:00
Juan RP
9b695433a0
bin: sync usage and keep it consistent in all utils. 2020-04-20 21:25:14 +02:00
Juan RP
213ce1a72b
xbps-rindex/remove-obsoletes.c: fix CID 284947 (Resource leak). 2020-04-20 10:34:08 +02:00
Juan RP
debfcf1273
Use xbps_repo_release() where applicable. 2020-04-19 11:09:05 +02:00
Juan RP
0788cd1f42 xbps-{create,rindex}: use zstd by default.
Closes #35
2020-02-22 09:27:46 +01:00
Duncan Overbruck
0d90534236
libxbps: ABI/API break due to hash function changes 2020-02-10 13:32:17 +01:00
Juan RP
6010a24de6 libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were
using malloc(3) to return the result, until now.

They now have been changed to not allocate the result
via malloc, the caller is responsible to provide a buffer
at least of XBPS_NAME_SIZE (64).

If for whatever reason the pkgname can't be guessed,
returns false. This should avoid lots of small allocs
around libxbps.

New functions have the following prototype:

bool xbps_pkg_name(char *dst, size_t len, const char *pkg)
bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg)

as suggested by @duncaen.
2020-02-08 19:49:57 +01:00
Juan RP
850ba2d416
Revert the repodata signature stuff. 2020-01-06 14:56:01 +01:00
Juan RP
10b2f7b425
Revert "Preserve meta-index data on change of signing key"
This reverts commit ae26a83ad2.
2020-01-06 14:46:12 +01:00
Juan RP
2884fc3ab7
Revert "Don't assume repodata is signed when has index-meta.plist"
This reverts commit 4e3d4d2287.
2020-01-06 14:45:57 +01:00
Juan RP
68113a8fc0
Revert "Sign index-meta"
This reverts commit 381b7b7600.
2020-01-06 14:44:22 +01:00
Juan RP
b4fdc39e67
Revert "Sign repodata"
This reverts commit 04194f44c8.
2020-01-06 14:31:40 +01:00
Juan RP
d1c93bed52
xbps-rindex: stop adding the "build-date" pkg obj.
This was just setting the current date when the pkg
is being added to the repository index.

It does not make any sense, so get rid of it completely.

This "build-date" string obj needs to be added via
xbps-create(1) not xbps-rindex(1)!

Another step towards reproducability (#55)
2019-12-29 09:57:54 +01:00
Piotr Wójcik
ae26a83ad2 Preserve meta-index data on change of signing key 2019-11-02 11:53:14 +01:00
Piotr Wójcik
4e3d4d2287 Don't assume repodata is signed when has index-meta.plist 2019-11-02 11:53:14 +01:00
Piotr Wójcik
381b7b7600 Sign index-meta 2019-11-02 11:53:14 +01:00
Piotr Wójcik
b4e93a95bf Turn off repodata signing 2019-11-02 11:53:14 +01:00
Piotr Wójcik
04194f44c8 Sign repodata 2019-11-02 11:53:14 +01:00
Duncan Overbruck
7b4a925302 bin/xbps-rindex: better error handling for writing repodata archives
This fixes issues when writes fail (as example if the disk is full),
where xbps would create empty repodata or stagedata archives.
2019-10-25 23:36:44 +02:00
Juan RP
0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Juan RP
6390817d7e
xbps-rindex.1: proper credit. 2019-06-20 11:44:45 +02:00
Juan RP
286193515c xbps-rindex/repoflush.c: pass correct filename to unlink(). 2019-06-18 18:49:29 +02:00
Juan RP
8018f53e0a xbps-rindex/repoflush.c: stop abusing assert().
assert() must not change the program behaviour.

Make sure fchmod() and rename() succeed properly and
fail gracefully otherwise.
2019-06-18 18:49:29 +02:00
Juan RP
b6a13945e0 xbps: restore default repodata compression format (gzip/zlib).
Any compression format from that list is supported without
additional changes: gzip, bzip2, lz4, xz, zstd.

This is for repository data and binary packages.

Close #122
2019-06-18 18:37:19 +02:00
Juan RP
f5f7f6b5a3
xbps-rindex: fix comment, zstd is set by default. 2019-06-17 08:22:43 +02:00
Juan RP
6c1759862e
xbps-rindex: added --compression option and set zstd by default.
Multiple compression formats are now supported for repodata,
none, gzip, bzip2, xz, lz4 and zstd.
2019-06-17 07:24:05 +02:00
Juan RP
8cea3e351b xbps-fetch(1): new utility that replaces 'xbps-uhelper fetch'.
xbps-install(1): document all libfetch env vars.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-12 18:07:24 +02:00
Juan RP
9cda7ef72a xbps-digest(1): new utility that replaces "xbps-uhelper digest".
See the manual page:

XBPS-DIGEST(1)              General Commands Manual             XBPS-DIGEST(1)

NAME
     xbps-digest - XBPS utility to generate message digests

SYNOPSIS
     xbps-digest [OPTIONS] [FILE] [FILE+N]

DESCRIPTION
     The xbps-digest utility generates message digests for specified FILE or
     stdin if unset.

OPTIONS
     -m, --mode mode
         Sets the message digest mode. Supported: sha256.  If unset, defaults
         to sha256.

     -h, --help
         Show the help message.

     -V, --version
         Show the version information.

SEE ALSO
     xbps.d(5), xbps-checkvers(1), xbps-create(1), xbps-dgraph(1),
     xbps-fbulk(1), xbps-install(1), xbps-pkgdb(1), xbps-query(1),
     xbps-reconfigure(1), xbps-remove(1), xbps-rindex(1), xbps-uchroot(1),
     xbps-uunshare(1)

AUTHORS
     Juan Romero Pardines <xtraeme@gmail.com>

BUGS
     Probably, but I try to make this not happen. Use it under your own
     responsibility and enjoy your life.

     Report bugs at https://github.com/void-linux/xbps/issues

                                 June 12, 2019

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-12 16:15:18 +02:00
Foxlet
0f33859701 Fix namespace violation 2018-09-25 22:11:30 -04:00
Frank Steinborn
f366d6cb11 manpages: change URL for bug reporting to new GitHub repo 2018-09-23 17:51:07 +02:00
Enno Boland
ebca1758cc xbps-rindex.1: document --hashcheck option 2018-07-20 09:37:50 +02:00
Enno Boland
7fe66a1f20 xbps-rindex: make hash check optional 2018-07-03 08:07:23 +02:00
Enno Boland
a717e53ee7 xbps-rindex: fix staging deadlock. 2018-06-28 13:30:14 +02:00
Michael Gehring
5e4f445b90 bin/xbps-rindex: use xbps_file_hash_raw while signing
Fixes #243
2017-06-27 20:05:15 +02:00
Duncaen
81673d69c7 bin/xbps-rindex: fix memleaks in index_add 2016-09-25 21:27:38 +02:00
Juan RP
0cff982e7b xbps-rindex/sign: simplify. 2016-07-13 08:37:04 +02:00
Enno Boland
ba2074a1cc xbps-rindex: use consistent output format 2016-03-31 08:10:14 +02:00
Enno Boland
855bc915e5 xbps-rindex: replace puts calls with printf 2016-03-22 09:47:25 +01:00
Enno Boland
2e6b2a6c94 xbps-rindex: remove empty stage file on cleanup. 2016-03-22 09:47:19 +01:00
Enno Boland
e1a76b13e5 xbps-rindex: cleanup stage area on -c too. 2016-03-21 11:39:43 +01:00
Enno Boland
3431715d67 xbps-rindex: consider stage area when removing packages. 2016-03-21 10:50:25 +01:00