New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for bsdtar #169
Comments
What would be the benefit? I am afraid that this is soooo low prio, that it will not happen unless someone (you) send a patch. |
GNU tar is supposed to be the default on GNU/Linux distro. Btw.: $ rpm -q mock
mock-1.4.9-1.fc27.noarch |
Is this issue related to mock scm plugin? |
@xsuchy @praiskup All calls to tar inside mock code are not compatible with bsdtar https://github.com/libarchive/libarchive |
To give a more detailed explanation here: OpenMandriva is in the process of switching to rpm.org rpm and DNF. As a part of this, their build system build engine is changing to mock. However, they replaced GNU tar with libarchive's tar back in OpenMandriva Lx 3, and libarchive's A proper patch for this would probably involve making it configurable to use either |
Thanks @Conan-Kudo, it is starting to make sense. As a sum-up, those are the missing bits
Where this is discussed? |
This probably would be a switch in the
I'm not sure what you mean? |
On Tuesday, April 24, 2018 11:21:42 AM CEST Neal Gompa (ニール・ゴンパ) wrote:
> > What would be required for that, I don't yet ...
>
> Where this is discussed?
I'm not sure what you mean?
I thought that it is being discussed somewhere, and you'll know sooner or later.
Having some reference links would be nice.
|
No, this was discussed on IRC in There was an attempt to patch mock to forcibly switch it to |
On Tuesday, April 24, 2018 11:36:41 AM CEST Neal Gompa (ニール・ゴンパ) wrote:
No, this was discussed on IRC in `#OpenMandriva-Cooker` some time ago. The
switch to `bsdtar` occurred two years ago, and GNU tar is no longer in the
base system package set at all.
So at least `bsdtar` is generally available on every such box, which provides
`/bin/tar`, which is OK.
There was an attempt to patch mock to forcibly switch it to `bsdtar`, but it
didn't work, so currently we have a relatively unmaintained version of the
[`gnutar`](https://github.com/OpenMandrivaAssociation/gnutar/blob/master/gnutar.spec)
package providing it as `gtar` (like on macOS and BSD) and we patch `mock` to
use `gtar` instead of `tar`.
I really need to see links to discussions about this, because otherwise I only
can guess what concrete problems with bsdtar are... really really guessing now,
I grepped through mock's devel branch:
$ git grep 'tar '
mock/py/mockbuild/scm.py: self.write_tar = opts['write_tar']
mock/py/mockbuild/scm.py: self.log.debug(".write_tar detected, will write tarball on the fly")
mock/py/mockbuild/scm.py: self.write_tar = True
mock/py/mockbuild/scm.py: cmd = "tar caf " + tarball + " " + taropts + " " + tardir
... so I see one portability problem, and that's 'taropts' which contains
'--exclude-vcs' option. Is this this the core of the problem?
|
I think so. @berolinux and @tpgxyz can give more details. I wasn't really there for most of it, as we operate in different time zones. |
It would answer the question I asked before, that this is related only to scm plugin. |
@praiskup The thing is, we don't use |
On Tuesday, April 24, 2018 12:22:50 PM CEST Neal Gompa (ニール・ゴンパ) wrote:
The thing is, we don't use `mock-scm`
That's even better. /bin/yum would say, "Nothing to do.", or what am I missing?
|
@praiskup @xsuchy Yes @Conan-Kudo well descibed what i had on my mind, when i filled this issue. Problem is that mock uses switches from gnu's version of tar. Unfortunately these options does not exists in BSD's (or POSIX compiliant) tar from libarchive (https://www.libarchive.org/) Mostly libarchive's tar does not support exclude-foo-bar. Instead of this option is support excludes pattern i.e Currently gtar compatible options were found in mock's root_cache.py |
This helps OpenMandriva where /bin/tar is equivalent for /bin/bsdtar . That setup is somewhat unexpected on GNU/Linux distro, but anyway, it doesn't hurt Fedora/RHEL/CentOS where we symlink gtar to tar. As original issue suggests, we could implement everything using the POSIX tar options (+ helper scripting); but that would be just too much work which is not worth spending ATM, at least as long as it is safe to expect that 'gtar' is in PATH and that it really is GNU tar. Resolves: rpm-software-management#169
Thanks, that makes it clear now. I forgot about |
This helps OpenMandriva where /bin/tar is equivalent for /bin/bsdtar. Such setup is somewhat unexpected on GNU/Linux distro, but anyway - the fix doesn't hurt Fedora/RHEL/CentOS where we symlink gtar to tar since ever. As original issue suggests, we could implement everything using the POSIX tar options (+ helper scripting); but that would be just too much work which is not worth wasting ATM, at least as long as it is safe to expect that 'gtar' is in PATH and that it really is GNU tar. Resolves: rpm-software-management#169
@praiskup bsdtar exists even in fedora: so you can try it yourself (or compare man pages) |
On Tuesday, April 24, 2018 8:15:56 PM CEST Miroslav Suchý wrote:
so you can try it yourself (or compare man pages)
I know something about those packages :-)
|
oops, I did not realized :)) |
Short description of the problem
Currently mock supports tar from GNU, while bsdtar from libarchive is not supported
Output of
rpm -q mock
Steps to reproduce issue
Do not forget to mention full commandline with the mock command you executed.
Any additional notes
Consider adding output of
mock --debug-config
this can help developers to reproduce the issue.The text was updated successfully, but these errors were encountered: