Commit Graph

1382 Commits

Author SHA1 Message Date
Juan RP
d68ff7ebf0
xbps-install: fix --reproducable.
The 'repository' obj also needs to be skipped to be fully
reproducable between different repositories.

Updated the test case accordingly.
2019-12-29 16:31:23 +01:00
Juan RP
b05f4b4db5 xbps-install: added --reproducible long option.
If set, enables reproducible mode in pkgdb.

Added a new test case.
2019-12-29 11:02:51 +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
Juan RP
6210955010 xbps-create: fix memleak introduced in 0f3ed2067c 2019-12-27 23:15:21 +01:00
Juan RP
67707657a4 xbps-create: always sanitize gathered symlinks.
Added a new test case.

Close #199
2019-12-27 23:15:21 +01:00
Juan RP
166caab986 Do not silently update xbps on any install/update transaction.
When there's a new xbps update, xbps-install(1) will now return
EBUSY (16) and a message (if dry-run disabled) explaining
how to proceed.

If there's an update and transaction does not contain xbps, it will
error out unless the 'xbps' pkg is the only target pkg, i.e:

	# xbps-install -Su
	# echo $?
	16

To update xbps, the only way to proceed is to explicitly declare
it as an update, i.e:

	# xbps-install -u xbps

The dry-run mode will still show there's an xbps update.

Modified the existing test cases to satisfy the new behaviour.

Closes #166
Closes #142
2019-12-27 21:35:40 +01:00
Juan RP
34a1ab51d0
xbps-checkvers: version cache file.
We do not want obsolete files from previous versions, so that
we version the filename of that working version.
2019-12-27 18:23:46 +01:00
Juan RP
64aeabf3f6
xbps-checkvers: restore previous behaviour after 7a220b37db.
The '%n' pkgname fmt option still needs to be the sourcepkg
for xbps-src to work with no additional changes.

This restores previous behaviour, and uses binpkg's pkgname
while checking for pkgdb/repo.
2019-12-27 18:04:53 +01:00
Juan RP
7a220b37db xbps-checkvers: use binpkg's pkgname rather than srcpkgs.
Up until now `xbps-checkvers` would only check for the
real sourcepkg, this broke detection of binary packages
that are subpkgs.

Added a new test case.

Close #192
2019-12-27 12:24:16 +01:00
Juan RP
0e1482917a
Fix maybe-uninitialized warnings detected by LTO. 2019-12-27 10:53:10 +01:00
Mohamad Barbar
66b856fa77 xbps-install: don't prompt when all pkgs on hold. 2019-12-14 13:23:31 +01:00
Doan Tran Cong Danh
36a7ddd4ae xbps-uchroot: document end of options argument
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
2019-11-24 12:28:45 +01:00
Doan Tran Cong Danh
be06a3b578 xbps-uunshare: document end of options argument
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
2019-11-24 12:28:45 +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
Juan RP
9ebe82fdc3
xbps-checkvers: fix a warning with glibc.
found by @q66

main.c:195:8: error: ignoring return value of 'fread', declared with attribute warn_unused_result [-Werror=unused-result]
2019-10-27 09:13:46 +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
Duncan Overbruck
04d5554ed2 bin/xbps-create: better error handling for writing archives
This fixes issues where if xbps-create creates a new archive on a full
disk, it will write an incomplete archive and then later fails to be
read by xbps-rindex.
2019-10-25 23:36:44 +02:00
Duncan Overbruck
1d460bc793 bin/xbps-checkvers: make distdir absolute
Fixes void-linux/xbps#133
2019-08-05 15:36:27 +02:00
Juan RP
d927517327
xbps-fbulk: do not make assert() change program behaviour.
... otherwise if NDEBUG is set chdir() is skipped completely.
2019-07-06 08:37:47 +02:00
Juan RP
702d64c517
xbps-checkvers/Makefile: re-add -Wno-deprecated-declarations.
... it's still necessary due to readdir_r() with glibc.
2019-07-03 02:15:41 +02:00
Juan RP
9addb5e64e
Get rid of some old disabled warnings. 2019-07-03 01:26:07 +02:00
Juan RP
0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Juan RP
bb96486b12
xbps-install: make sure to call xbps_end() before exiting. 2019-06-27 08:02:19 +02:00
Johannes Brechtmann
44692f28d8 bin/xbps-install: update_pkg return EEXIST if package is up to date
makes 58509996aa work for
xbps-install -u <pkg>
2019-06-27 07:54:11 +02:00
Duncaen
7b728f5ac0 bin/xbps-remove: fix skipping executing orphans transaction 2019-06-26 22:24:47 +02:00
Juan RP
83aa486f6b
xbps-remove: skip trans if all pkgs were not found.
Restores behaviour with xbps<0.54.
2019-06-25 10:32:02 +02:00
Juan RP
41b2cec356
xbps-*: use xbps_pkgdb_update() correctly.
xbps-{alternatives,pkgdb,reconfigure}: xbps_pkgdb_update()
has been fixed to flush when told so, and we don't need
to update the in-memory copy because we are exiting.
2019-06-22 18:50:40 +02:00
Juan RP
58509996aa
xbps-install: skip trans if all pkgs are installed or uptodate.
Fixes an issue pointed out by @Johnnynator
2019-06-21 19:19:09 +02:00
Juan RP
13172c22fc
xbps-install: only print num of downloaded pkgs with -D. 2019-06-21 16:26:08 +02:00
Juan RP
589a96a50e
xbps-install: with -D there are no pkgs to install/update/configure/remove. 2019-06-21 16:06:42 +02:00
Juan RP
fe943eb7d2
xbps-install(1): added -D, --download-only.
Added `-D, --download-only` flag to allow downloading
packages to the cache without attempting to install them.

Contributed by Toyam Cox via #9

Adapted to master by yours truly.

Close #9
2019-06-21 15:57:25 +02:00
Juan RP
4f717dc597 xbps-install(1): added -I, --ignore-file-conflicts.
If set it will continue with the transaction and will
just print what are the conflicting files without returning
EEXIST.

This is a temporary solution for void where there are still
some packages with conflicting files (qt5-host-tools vs qt5-tools-devel).

With input by @duncaen
2019-06-21 15:31:04 +02:00
Juan RP
288cff37f8
xbps-install: return 0 if pkg is already installed or uptodate.
Before this change xbps-install could return EEXIST
when the package is already installed, or already up-to-date.

Return 0 if such condition happens, and only return EEXIST
if there's a file conflict.

Close #51
2019-06-21 11:06:45 +02:00
Duncaen
9c300a93d1 bin/xbps-checkvers: fix --format long form 2019-06-21 00:32:30 +02:00
Juan RP
2c6e0c28d4
xbps-checkvers.1: tweaks 2019-06-20 15:25:14 +02:00
Juan RP
071db09d3e
xbps-alternatives.1: proper credit. 2019-06-20 12:56:17 +02:00
Juan RP
6390817d7e
xbps-rindex.1: proper credit. 2019-06-20 11:44:45 +02:00
Juan RP
2df0778fcd
xbps-pkgdb.1: proper credit. 2019-06-20 11:42:30 +02:00
Juan RP
b0abcd4997
xbps-checkvers.1: proper credit. 2019-06-20 11:42:09 +02:00
Duncaen
ebb61edb16 bin/xbps-fetch: restore old behaviour for output file 2019-06-20 11:32:12 +02:00
Juan RP
e7738555b2
xbps-uhelper: restore compat.
Add 'digest' and 'fetch' actions again for compatibility,
but don't mention them in usage().

This way previous versions of xbps-src (that don't require xbps-0.54)
still work without changes.
2019-06-20 10:53:30 +02:00
Juan RP
e083440b70
xbps-checkvers: always initialize repourl. 2019-06-19 14:00:54 +02:00
Juan RP
2d1d6245b8
xbps-checkvers.1: update default fmt. 2019-06-19 13:30:57 +02:00
Juan RP
27634afd21
xbps-checkvers: change default output fmt to "%n %r %s %t %R". 2019-06-19 13:27:08 +02:00
Juan RP
0727d9a53a
xbps-checkvers: implement --format %R (repository).
Close #128
2019-06-19 13:07:42 +02:00
Juan RP
b12b72e151
xbps-install/state_cb.c: minor tweaks. 2019-06-18 21:17:44 +02:00
Duncaen
a19c659616 bin/xbps-install: add the transaction_file states 2019-06-18 19:54:22 +02:00
Duncaen
91e428d54d bin/xbps-create: record file size in files.plist 2019-06-18 19:54:22 +02:00
Juan RP
eddd2cd602 xbps-checkvers: stop abusing assert().
assert() must not change program behaviour.

It's unlikely that xbps_dictionary_set_cstring() fails, but even
so proplib will report it, so no need to run it via assert().
2019-06-18 18:49:29 +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
042ab422b2 xbps-dgraph/main.c: simplify logic.
Thanks to clang-analyzer for reporting a dead assignment
that lead me to rework the logic.
2019-06-18 18:49:29 +02:00
Juan RP
5f68687cbb bin/xbps-install/main.c: fix dead assignment.
Found by clang-analyzer.

Bug Summary

File: bin/xbps-install/main.c
Warning: line 246, column 5
Value stored to 'rv' is never read
2019-06-18 18:49:29 +02:00
Juan RP
daf65b0767 bin/xbps-install/main.c: fix dead assignment.
Found by clang-analyzer.

Bug Summary

File: bin/xbps-install/main.c
Warning: line 259, column 5
Value stored to 'rv' is never read
2019-06-18 18:49:29 +02:00
Juan RP
0ee0aaa395 xbps-pkgdb/check_pkg_alternatives.c: dead store.
Reported by clang-analyzer.
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
Duncaen
3677986c7e bin/xbps-checkvers: store character returned by fgetc in int
The character has to be checked for EOF (-1), otherwise with
architectures that use unsigned char by default this breaks at
compile and runtime.

https://github.com/void-linux/xbps/issues/123
2019-06-18 15:04:47 +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
ab9a587d34
xbps-create: added support for lz4 and zstd compression formats. 2019-06-17 07:12:18 +02:00
Duncaen
1037a77000 xbps-checkvers: grow buffer if necessary instead of free/malloc for every file 2019-06-15 23:50:50 +02:00
Duncaen
323ca2f95a xbps-checkvers: cleanup and check strdup errors 2019-06-15 23:50:50 +02:00
Duncaen
49cc70de9a xbps-checkvers: rewrite check_reverts without malloc 2019-06-15 23:50:50 +02:00
Duncaen
e495f84954 xbps-checkvers: set rcv->fname when loading from cache 2019-06-15 23:50:50 +02:00
Duncaen
3805fd5297 xbps-checkvers: use proplib data structures and add cache file 2019-06-15 23:50:50 +02:00
Duncaen
26cc209225 xbps-checkvers: remove magic buffer and use fwrite for %t format 2019-06-15 23:50:50 +02:00
Duncaen
dfa6e80d13 xbps-checkvers: add %t format to get requested template name from path (ie subpackage) 2019-06-15 23:50:50 +02:00
Duncaen
db2eb29cbc xbps-checkvers: add --format 2019-06-15 23:50:50 +02:00
Duncaen
5dfaf5c075 xbps-checkvers: allow files argument to be paths or package name 2019-06-15 23:50:50 +02:00
Duncaen
8018833010 lib/fetch: add FORCE_IPV{4,6} environment variables 2019-06-15 19:19:40 +02:00
Juan RP
a9a889c54d fulldeptree: return a proper error if deps can't be resolved.
xbps_get_pkg_fulldeptree() now returns NULL and sets errno to ENODEV
when there are missing dependencies, rather than assert()ing.

Added another test case to check returned error codes.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-15 18:04:20 +02:00
Duncaen
f18cf87e3a xbps-checkvers: fix bug noticed by fixing another bug 2019-06-13 23:32:58 +02:00
Duncaen
684d2a7187 xbps-checkvers: only allocate if $ is in the current line
Before this commit, it would have seen $ from following lines
and thinks it needs to substitute variables.
2019-06-13 23:32:58 +02:00
Duncaen
0691054a59 xbps-checkvers: try to not see something like ${var##foo} as comment 2019-06-13 23:32:58 +02:00
Duncaen
204b9b630a xbps-checkvers: rewrite shell substitution without buffer guessing 2019-06-13 23:32:58 +02:00
Duncaen
93c6825520 xbps-checkvers.1: mention --manual 2019-06-13 20:12:05 +02:00
Duncaen
5bed1a775c xbps-checkvers: make usage look more like all tools 2019-06-13 20:12:05 +02:00
Duncaen
597c0119dd xbps-checkvers: simplify print logic 2019-06-13 20:12:05 +02:00
Duncaen
abdd1047eb xbps-checkvers: use xbps_repo_store 2019-06-13 20:12:05 +02:00
Duncaen
a99283bcdb xbps-checkvers: add --manual flag to only process listed templates 2019-06-13 20:12:05 +02:00
Juan RP
7a104fa911 xbps-checkvers.1: update for -s,--show-all.
Signed-off-by: Juan RP <xtraeme@gmail.com>
Closes: #108 [via git-merge-pr]
2019-06-13 20:12:05 +02:00
Juan RP
79bffac877 xbps-checkvers: implement -s,--show-all.
This replaces -s,--show-missing. This now prints all processed packages
and outputs in the following format:

pkgname repover srcver

if `repover` or `srcver` can't be known, '?' is print.

Will be used in xbps-src soon. Thanks to @duncaen for ideas.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-13 20:12:05 +02:00
Juan RP
fc98779ad1 xbps-checkvers: forgot to set correct short opt in long opts. 2019-06-12 20:04:28 +02:00
Juan RP
d53f3243ce xbps-checkvers: added ability to ignore conf repos via -i.
-i,--ignore-conf-repos has been added.
The previous -i,--installed flag has been renamed to -I.

This breaks compat but we'll need to change buildbot anyway.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-12 20:04:28 +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
human
56aa77d51b xbps-install: make question() read the whole input line
reading only the first character would answer the next question()
with the next character (unless you just pressed enter)
2019-06-07 19:38:51 +02:00
Juan RP
cfc8e0a580 xbps-fbulk/main.c: update my email address.
Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-06 13:11:33 +02:00
Juan RP
77ae94e6a1 xbps-create: remove two debugging printfs.
Closes: #84 [via git-merge-pr]
2019-04-26 16:27:34 +02:00
parke
ca5a88e462 xbps-uunshare: Fixed typo in error message: uidmap -> uid_map.
Thanks @parke #28
2019-04-22 14:54:29 +02:00
Juan RP
0c860d1db0 xbps-dgraph: fix regresion introduced by the fulldeptree changes.
This now works as expected again, see https://i.imgur.com/pr2XO70.png
for the full dependency graph of the sway pkg installed on my system.

Closes: #80 [via git-merge-pr]
2019-04-22 14:49:19 +02:00
Duncaen
bd616aa901 xbps-pkgdb: add alternatives check
Closes #66
2019-04-20 11:07:00 +02:00
Duncaen
d1667fd931 Add the ability to ignore packages
The previous idea was to use virtual packages in the users configuration
to satisfy dependencies by mapping them to existing installed packages.
Using virtual packages for it doesn't work as expected and trying to make
it work would break other functionalities of virtual packages, like the
version satisfaction checks for `provides` and the ability to replace
virtual packages with real packages. The virtual package functionality
should be used exclusively for virtual packages.

This allows users to specify packages packages that should be ignored.
Ignored packages in dependencies are always satisfied without installing
the package, while updating or installing a package that depends on an
ignored package.

This does NOT ignore the shlib checks, ignoring a package that provides
required shared libraries will abort the transaction as if there was no
package that provides the required shared library.
2019-04-19 23:07:59 +02:00
Duncaen
a46be6867a xbps-create: reject unhandled files
A segfault in xbps-create(1) was found in:
https://github.com/void-linux/void-packages/pull/7524

xbps-create adds a file type string to the xentry for every file it
finds in `destdir`, files other than symlinks, regular files and
directories weren't handled and resulted in a segfault later when
when processing the xentry structures.

This commit adds checks for sockets and fifos and exits with an
appropriate error message or with a generic error message for every
other unhandled file.

Closes #66
2019-04-14 12:39:04 +02:00
Duncaen
d57a39ef4a bin/xbps-install: don't overwrite action with downgrade if its on hold
Fixed #65
2019-04-14 11:53:07 +02:00
Leah Neukirchen
601f0a2d09 bin/xbps-query: support $NO_COLOR
Closes: #273 [via git-merge-pr]
2019-03-22 21:47:14 +01:00
Duncaen
c950441537 bin/xbps-install: ignore EBUSY errors 2019-03-22 21:43:52 +01:00
Duncaen
3ad6b7a523 bin/xbps-remove: ignore EBUSY errors
EBUSY occurs if xbps tries to remove a directory with unlink(2) that is
a mount point, this happens with `/boot` as example.

https: //github.com/voidlinux/void-packages/issues/7229#issuecomment-319392560
https: //github.com/voidlinux/void-packages/issues/8753
Closes: #259 [via git-merge-pr]
2019-03-22 21:41:43 +01:00
Duncaen
f20032efa3 bin/xbps-checkvers: replace strncat with one snprintf 2019-03-22 19:14:08 +01:00
Duncaen
71b076908d bin/xbps-install: remove duplicate from Makefile 2019-03-22 19:14:08 +01: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
e4702d9d3b
Merge pull request #6 from foxlet/fix-string-formatting
Fix string formatting of 64-bit unsigned integers
2018-07-30 20:28:09 +02:00
Enno Boland
ebca1758cc xbps-rindex.1: document --hashcheck option 2018-07-20 09:37:50 +02:00
Foxlet
4eaf45a767 Fix string formatting of 64-bit unsigned integers 2018-07-17 20:50:48 -04:00
Enno Boland
c992049eb5 xbps-create: fix formatting, set return value on path overflow 2018-07-07 12:23:01 +02:00
Enno Boland
3ef932de2f xbps-create: replace nftw by an implementation that traverses the directory tree in an alphabetic order. 2018-07-07 12:15:00 +02:00
Enno Boland
aa21cb08fd Revert "bin/xbps-create: process dictionary instead of linked list."
This reverts commit 25fa00ea46.
2018-07-06 08:07:59 +02:00
Enno Boland
705a30c63c Revert "bin/xbps-create: process_entry_file uses dictionary instead of linked list now."
This reverts commit 61d2361646.
2018-07-06 08:07:58 +02:00
Enno Boland
e211ae21fe Revert "bin/xbps-create: remove xentry struct and clean up"
This reverts commit aa90201b2d.
2018-07-06 08:07:55 +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
Duncaen
daa1b44682 xbps-install: fix "Space available on disk:" padding 2018-05-02 00:46:07 +02:00
Enno Boland
513bf65c6d uunshare: fix argument parsing 2018-04-30 18:22:28 +02:00
Enno Boland
449dc8a551 Revert "bin/xbps-uunshare: stop option parsing at the first nonoption argument"
This reverts commit 6cca905d64.
2018-04-16 14:00:30 +02:00
Enno Boland
f4060aff6c Revert "bin/xbps-uchroot: stop option parsing at the first nonoption argument"
This reverts commit 948ba8d7d1.
2018-04-16 14:00:29 +02:00
Juan RP
e0f4199fff Merge pull request #250 from ebfe/infinity
bin/xbps-checkvers: avoid infinite loops when checking reverts
2017-10-25 09:19:10 +02:00
Juan RP
c20b37e022 Merge pull request #247 from ebfe/man
manpages: fix invalid escape
2017-10-25 09:18:11 +02:00
Juan RP
a6df70b8af Merge pull request #245 from ebfe/sign-big-pkgs
bin/xbps-rindex: use xbps_file_hash_raw while signing
2017-10-25 09:17:08 +02:00
Juan RP
9c0d795810 Merge pull request #207 from Duncaen/relative
xbps-uchroot and xbps-uunshare usability improvements
2017-10-25 09:14:40 +02:00
Agustin Chiappe Berrini
51207b9076 fix compilation of fetch_cb on gcc 7
Original message:

```
fetch_cb.c:80:29: error: ‘h’ directive output may be truncated writing 1 byte into a region of size between 0 and 14 [-Werror=format-truncation=]
   snprintf(str, sizeof str, "%02ldh%02ldm",
                             ^~~~~~~~~~~~~~
fetch_cb.c:80:29: note: directive argument in the range [0, 59]
fetch_cb.c:80:3: note: ‘snprintf’ output between 7 and 21 bytes into a destination of size 16
   snprintf(str, sizeof str, "%02ldh%02ldm",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       eta / 3600, (eta % 3600) / 60);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fetch_cb.c:83:30: error: ‘%02ld’ directive output may be truncated writing between 2 and 19 bytes into a region of size 16 [-Werror=format-truncation=]
   snprintf(str, sizeof str, "%02ldm%02lds",
                              ^~~~~
fetch_cb.c:83:29: note: directive argument in the range [-153722867280912930, 60]
   snprintf(str, sizeof str, "%02ldm%02lds",
                             ^~~~~~~~~~~~~~
fetch_cb.c:83:29: note: directive argument in the range [-59, 59]
fetch_cb.c:83:3: note: ‘snprintf’ output between 7 and 25 bytes into a destination of size 16
   snprintf(str, sizeof str, "%02ldm%02lds",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       eta / 60, eta % 60);
       ~~~~~~~~~~~~~~~~~~~
fetch_cb.c:80:29: error: ‘h’ directive output may be truncated writing 1 byte into a region of size between 0 and 14 [-Werror=format-truncation=]
   snprintf(str, sizeof str, "%02ldh%02ldm",
                             ^~~~~~~~~~~~~~
fetch_cb.c:80:29: note: directive argument in the range [0, 59]
fetch_cb.c:80:3: note: ‘snprintf’ output between 7 and 21 bytes into a destination of size 16
   snprintf(str, sizeof str, "%02ldh%02ldm",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       eta / 3600, (eta % 3600) / 60);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fetch_cb.c:83:30: error: ‘%02ld’ directive output may be truncated writing between 2 and 19 bytes into a region of size 16 [-Werror=format-truncation=]
   snprintf(str, sizeof str, "%02ldm%02lds",
                              ^~~~~
fetch_cb.c:83:29: note: directive argument in the range [-153722867280912930, 60]
   snprintf(str, sizeof str, "%02ldm%02lds",
                             ^~~~~~~~~~~~~~
fetch_cb.c:83:29: note: directive argument in the range [-59, 59]
fetch_cb.c:83:3: note: ‘snprintf’ output between 7 and 25 bytes into a destination of size 16
   snprintf(str, sizeof str, "%02ldm%02lds",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       eta / 60, eta % 60);
       ~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
2017-08-22 18:44:32 -04:00
Leah Neukirchen
876f9f4a27 xbps-fbulk: use _DEFAULT_SOURCE, required for wait3 in glibc 2.16.
Also these guards need to be defined before including anything.
2017-08-07 16:08:15 +02:00
Michael Gehring
52d3077206 bin/xbps-checkvers: avoid infinite loops when checking reverts 2017-07-16 20:08:25 +00:00
Michael Gehring
63596b5a06 xbps-remove.1: fix invalid escape 2017-07-11 04:30:23 +02:00
Michael Gehring
0886012d72 xbps-reconfigure.1: fix invalid escape 2017-07-11 04:30:03 +02:00
Michael Gehring
25418f98af xbps-query.1: fix invalid escape 2017-07-11 04:29:45 +02:00
Michael Gehring
a61fd5f8c1 xbps-pkgdb.1: fix invalid escape 2017-07-11 04:29:19 +02:00
Michael Gehring
b9656b1546 xbps-install.1: fix invalid escape 2017-07-11 04:28:57 +02:00
Michael Gehring
681acd08ef xbps-dgraph.1: fix invalid escape 2017-07-11 04:28:34 +02:00
Michael Gehring
ae3f5546bf xbps-checkvers.1: fix invalid escape 2017-07-11 04:28:13 +02:00
Michael Gehring
13a38fa6ba xbps-alternatives.1: fix invalid escape 2017-07-11 04:27:51 +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
Juan RP
1670ff000d Merge pull request #206 from Duncaen/memleak
fix some some memory leaks
2017-02-19 02:46:50 +01:00
Juan RP
a7f2080367 Merge pull request #198 from roman-neuhauser/package-modes
xbps-pkgdb(1), xbps-install(1), xbps-remove(1): extend discussion of package modes
2017-02-19 02:45:58 +01:00
Juan RP
956ec93f45 Merge pull request #202 from ebfe/list-repolock
bin/xbps-query: add --list-repolock-pkgs
2017-02-19 02:45:51 +01:00
Juan RP
a53bcef00b Merge pull request #196 from Duncaen/xbps-uchroot
xbps-uchroot: umount chroot mounts
2017-02-19 02:44:43 +01:00
Alain Kalker
69a5ee2c1b xbps-checkvers.1: fix incorrect double negative (#219) 2016-12-25 21:21:28 +01:00
Michael Gehring
2984d6a5ec bin/xbps-install/fetch_cb.c: flush stdout when printing progress 2016-10-05 20:18:43 +02:00
Duncaen
6cca905d64 bin/xbps-uunshare: stop option parsing at the first nonoption argument 2016-09-25 22:26:47 +02:00
Duncaen
948ba8d7d1 bin/xbps-uchroot: stop option parsing at the first nonoption argument 2016-09-25 22:26:38 +02:00
Duncaen
2a6e805bb4 bin/xbps-uunshare: allow relative chroot directory 2016-09-25 22:23:17 +02:00
Duncaen
c5784e9cc3 bin/xbps-uchroot: allow relative chroot directory 2016-09-25 22:23:05 +02:00
Duncaen
81673d69c7 bin/xbps-rindex: fix memleaks in index_add 2016-09-25 21:27:38 +02:00
Roman Neuhauser
d0b4089e6e xbps-install(1), xbps-remove(1) point to xbps-pkgdb(1)
... from descriptions of -A and -u (xbps-install) and -o (xbps-remove).
2016-09-21 14:56:17 +02:00
Roman Neuhauser
025b133025 xbps-pkgdb(1): extend discussion of package modes
description of implications of the various modes was scattered across
xbps-pkgdb(1), xbps-install(1), xbps-remove(1).
2016-09-21 14:56:17 +02:00
Michael Gehring
3dce6ab1ed bin/xbps-query: add --list-repolock-pkgs 2016-09-21 14:11:04 +02:00