packit / dist-git-to-source-git

Converting dist-git to source-git
MIT License
4 stars 9 forks source link

package sources unreachable #50

Closed dhodovsk closed 4 years ago

dhodovsk commented 4 years ago

Known packages affected (c8s branch):

Convert output

[dhodovsk@shiny playuground]$ podman run --rm -v $PWD:/workdir:z dist2src dist2src -vv convert /workdir/rpms/accountsservice:c8s /workdir/src/accountsservice:c8s
convert(origin='/workdir/rpms/accountsservice:c8s', dest='/workdir/src/accountsservice:c8s')
Running command get_sources.sh in /workdir/rpms/accountsservice
output = Retrieving https://git.centos.org/sources/accountsservice/c8s/8d59b9cdc4121b34748442ee653b92d60607f2cb

Running rpmbuild in /workdir/rpms/accountsservice
This package uses %autosetup or %autopatch.
b'D: created directory(s) /workdir/rpms/accountsservice/BUILD mode 0755'
b'D: created directory(s) /workdir/rpms/accountsservice/RPMS mode 0755'
b'D: created directory(s) /workdir/rpms/accountsservice/SRPMS mode 0755'
b'D: created directory(s) /workdir/rpms/accountsservice/BUILDROOT mode 0755'
b'ufdio:       1 reads,       13 total bytes in 0.000002 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000002 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000001 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000001 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000001 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000001 secs'
b'ufdio:       1 reads,       13 total bytes in 0.000001 secs'
b'error: Bad source: /workdir/rpms/accountsservice/SOURCES/accountsservice-0.6.50.tar.xz: No such file or directory'
b'ufdio:       1 reads,    17154 total bytes in 0.000004 secs'
b'ufdio:       1 reads,     5442 total bytes in 0.000002 secs'
b'ufdio:       1 reads,    17154 total bytes in 0.000002 secs'
Traceback (most recent call last):
  File "/usr/local/bin/dist2src", line 11, in <module>
    load_entry_point('dist-git-to-source-git==0.1.dev138+g8e91ba5.d20200909', 'console_scripts', 'dist2src')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/dist2src/cli.py", line 82, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/dist2src/cli.py", line 208, in convert
    d2s.convert(origin_branch, dest_branch)
  File "/usr/local/lib/python3.6/site-packages/dist2src/core.py", line 316, in convert
    self.run_prep()
  File "/usr/local/lib/python3.6/site-packages/dist2src/core.py", line 270, in run_prep
    running_cmd = rpmbuild(*rpmbuild_args)
  File "/usr/local/lib/python3.6/site-packages/sh.py", line 1516, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/usr/local/lib/python3.6/site-packages/sh.py", line 780, in __init__
    self.wait()
  File "/usr/local/lib/python3.6/site-packages/sh.py", line 837, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.6/site-packages/sh.py", line 861, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/rpmbuild --nodeps --define '_topdir /workdir/rpms/accountsservice' -bp -vv SPECS/accountsservice.spec

  STDOUT:

  STDERR:
D: created directory(s) /workdir/rpms/accountsservice/BUILD mode 0755
D: created directory(s) /workdir/rpms/accountsservice/RPMS mode 0755
D: created directory(s) /workdir/rpms/accountsservice/SRPMS mode 0755
D: created directory(s) /workdir/rpms/accountsservice/BUILDROOT mode 0755
ufdio:       1 reads,       13 total bytes in 0.000002 secs
ufdio:       1 reads,       13 total bytes in 0.000002 secs
ufdio:       1 reads,       13 total bytes in 0.000001 secs
ufdio:       1 reads,       13 total bytes in 0.000001 secs
ufdio:       1 reads,       13 total bytes in 0.000001 secs
ufdio:       1 reads,       13 total bytes in 0.000001 secs
ufdio:       1 reads,       13 total bytes in 0.000001 secs
error: Bad source: /workdir/rpms/accountsservic... (247 more, please see e.stderr)
[dhodovsk@shiny playuground]$ cd rpms/accountsservice/
[dhodovsk@shiny accountsservice]$ git diff
[dhodovsk@shiny accountsservice]$ git status 
On branch c8s
Your branch is up to date with 'origin/c8s'.

nothing to commit, working tree clean
[dhodovsk@shiny accountsservice]$ cat .gitignore 
SOURCES/accountsservice-0.6.50.tar.xz
[dhodovsk@shiny accountsservice]$ ll SOURCES/accountsservice-0.6.50.tar.xz
ls: cannot access 'SOURCES/accountsservice-0.6.50.tar.xz': No such file or directory
[dhodovsk@shiny accountsservice]$ get
getcap          getconf         getenforce      getfattr        getopt          getscu          gettext
getcert         getdap          getent          gethostip       getopts         getsebool       gettext.sh
getcifsacl      getdap4         getfacl         getkeycodes     getpcaps        get_sources.sh  
[dhodovsk@shiny accountsservice]$ get_sources.sh 
Retrieving https://git.centos.org/sources/accountsservice/c8s/8d59b9cdc4121b34748442ee653b92d60607f2cb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
csomh commented 4 years ago

Weird, this "should not happen" :smiley: Can we reach out to some CentOS contacts and ask them about this issue? Maybe they know what to do about it.

dhodovsk commented 4 years ago

This only occurs when the repo is cloned with the --branch=c8s option.

TomasTomecek commented 4 years ago

I'd say then the answer here is to always pull c8 c8s and c8-beta branches

dhodovsk commented 4 years ago

Fix in https://github.com/packit/research/pull/57