Commit Graph

9 Commits

Author SHA1 Message Date
Panu Matilainen 57899bd3bf Fix recently introduced uninitialized variable warning in rpm2archive
Fixes "warning: ‘rc’ may be used uninitialized in this function"
introduced in commit c73b0f34e3.
2019-05-07 15:24:43 +02:00
Robbie Harwood c73b0f34e3 Fix rpm2archive behavior with multiple arguments
If multiple arguments are passed to rpm2archive, convert them all to
tgz.  (Previous behavior was to convert only the first one and
silently ignore the rest.)

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Co-authored-by: Florian Festi <ffesti@redhat.com>
2019-04-30 11:33:37 +02:00
Florian Festi ef422951ae rpm2archive: Fix file names for source rpms
rpm2archive previously just prepended a "." before the file name to get a local
path. This works fine for absolute paths but not for bare file names as used
in source rpms. Now we prepend "./" in these cases.

Also use the calculated file name for hard links to avoid running into this
issue twice.

Resolves: #637
2019-02-25 13:16:04 +01:00
Florian Festi c9cda9acde Use new RPMVSF_MASK_* constants 2018-06-05 11:16:36 +02:00
Peter Jones 034f1cc4fd rpm2cpio and rpm2archive: don't write archive data to a terminal.
rpm2cpio and rpm2archive happily write binary data to the output
terminal.  This happens, for example, when I'm typing a command such as
"rpm2cpio foo.rpm | less" and I make a typo, hitting <Return> instead of
the pipe key.  This often results in hilarious (if bewildering) font and
character encoding changes.  On some systems, this can even result in
installation of relatively arbitrary rpms!

Nobody has ever meant to do this, and it's easy to prevent, so that's
what this patch does.
2017-01-26 14:53:01 +01:00
Florian Festi a6e662f6bd rpm2archive: return 0 on success instead of stop iteration
Solves: https://github.com/rpm-software-management/rpm/pull/94/files
Thanks to Neal Gompa (ニール・ゴンパ)<ngompa13@gmail.com> for spotting this
and proposing a solution!
2016-10-10 11:57:14 +02:00
Peter Eisentraut 0d74691d37 Additional fixes for getprogname()/setprogname() on BSD systems 2016-02-15 15:57:55 +01:00
Florian Festi 2e0e0a433a Use new xsetprogname() in rpm2archive 2016-02-11 14:09:26 +01:00
Florian Festi d24a1f8eec Add rpm2archive utility for converting rpm payload to tar archives.
This is needed as the new payload format for large files is not compatible with
rpm2cpio which basically just dumps the payload which happened to be cpio.

Use configure parameter --without-archive to not build this tool and get rid of the libarchive requirement.
2014-03-11 10:49:55 +01:00