Bug 1733862

Summary: fedpkg clone fails in _add_git_excludes() method
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: rpkgAssignee: cqi
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: cqi, dennis, fweimer, jkeating, lsedlar, onosek, s
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpkg-1.59-1.fc31 rpkg-1.59-1.fc30 rpkg-1.59-1.fc29 rpkg-1.59-1.el6 rpkg-1.59-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 00:01:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Raiskup 2019-07-29 05:26:41 UTC
$ fedpkg --verbose clone rpkg
Cloning ssh://praiskup.org/rpms/rpkg
Running: git clone ssh://praiskup.org/rpms/rpkg --origin origin
Cloning into 'rpkg'...
remote: Counting objects: 581, done.
remote: Compressing objects: 100% (574/574), done.
remote: Total 581 (delta 224), reused 67 (delta 3)
Receiving objects: 100% (581/581), 153.61 KiB | 479.00 KiB/s, done.
Resolving deltas: 100% (224/224), done.
Could not execute clone: [Errno 2] No such file or directory: '/tmp/rpkg/.git/info/exclude'
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 11, in <module>
    load_entry_point('fedpkg==1.37', 'console_scripts', 'fedpkg')()
  File "/usr/lib/python3.7/site-packages/fedpkg/__main__.py", line 86, in main
    sys.exit(client.args.command())
  File "/usr/lib/python3.7/site-packages/pyrpkg/cli.py", line 1864, in clone
    depth=self.args.depth)
  File "/usr/lib/python3.7/site-packages/pyrpkg/__init__.py", line 1550, in clone
    self._add_git_excludes(os.path.join(path, git_dir))
  File "/usr/lib/python3.7/site-packages/pyrpkg/__init__.py", line 1675, in _add_git_excludes
    git_excludes.write()
  File "/usr/lib/python3.7/site-packages/pyrpkg/gitignore.py", line 83, in write
    with open(self.path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/rpkg/.git/info/exclude'

Comment 1 Pavel Raiskup 2019-07-29 05:28:11 UTC
Well, the clone seems to be finished (from what I can tell, enough for me),
but the exit status is non-zero -> so tools working with fedpkg think that
there's some problem (e.g. tito).

Comment 2 Ondřej Nosek 2019-08-01 16:31:45 UTC
That's weird. On my (docker) Fedora30 it works.

fedpkg --verbose clone rpkg
Cloning ssh://onosek.org/rpms/rpkg
Running: git clone ssh://onosek.org/rpms/rpkg --origin origin
Cloning into 'rpkg'...
remote: Counting objects: 584, done.
remote: Compressing objects: 100% (353/353), done.
remote: Total 584 (delta 227), reused 583 (delta 227)
Receiving objects: 100% (584/584), 158.35 KiB | 105.00 KiB/s, done.
Resolving deltas: 100% (227/227), done.
Git-excludes patterns were added into /home/onosek/rpkg/.git/info/exclude


Could you, please, tell me what is a version of your tools?
rpm -qa | grep "fedpkg\|rpkg\|git"

will next command create 'exclude' file?
git clone ssh://praiskup.org/rpms/rpkg
file rpkg/.git/info/exclude

Comment 3 Pavel Raiskup 2019-08-02 05:53:58 UTC
(In reply to Ondřej Nosek from comment #2)
> That's weird. On my (docker) Fedora30 it works.

I did not try this in container.

> Could you, please, tell me what is a version of your tools?
> rpm -qa | grep "fedpkg\|rpkg\|git"

$ rpm -q fedpkg python3-rpkg rpkg git 
fedpkg-1.37-4.fc30.noarch
python3-rpkg-1.58-5.fc30.noarch
rpkg-2.7-1.fc30.noarch
git-2.21.0-1.fc30.x86_64

> will next command create 'exclude' file?
> git clone ssh://praiskup.org/rpms/rpkg
> file rpkg/.git/info/exclude

$ git clone ssh://praiskup.org/rpms/rpkg
Cloning into 'rpkg'...
remote: Counting objects: 584, done.
remote: Compressing objects: 100% (353/353), done.
remote: Total 584 (delta 227), reused 583 (delta 227)
Receiving objects: 100% (584/584), 158.35 KiB | 491.00 KiB/s, done.
Resolving deltas: 100% (227/227), done.

$ file rpkg/.git/info/exclude
rpkg/.git/info/exclude: cannot open `rpkg/.git/info/exclude' (No such file or directory)

Comment 4 Lubomír Sedlář 2019-08-16 13:58:36 UTC
Proposed fix: https://pagure.io/rpkg/pull-request/460

Comment 5 Fedora Update System 2019-09-16 13:10:59 UTC
FEDORA-2019-28abfcf4b2 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-28abfcf4b2

Comment 6 Fedora Update System 2019-09-16 13:11:36 UTC
FEDORA-2019-46aa409f08 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-46aa409f08

Comment 7 Fedora Update System 2019-09-16 13:12:16 UTC
FEDORA-2019-609226dd65 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-609226dd65

Comment 8 Fedora Update System 2019-09-16 13:12:44 UTC
FEDORA-EPEL-2019-4eb904f9c5 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-4eb904f9c5

Comment 9 Fedora Update System 2019-09-16 13:13:07 UTC
FEDORA-EPEL-2019-d5733202f4 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d5733202f4

Comment 10 Fedora Update System 2019-09-17 01:06:08 UTC
rpkg-1.59-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d5733202f4

Comment 11 Fedora Update System 2019-09-17 01:23:22 UTC
rpkg-1.59-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-28abfcf4b2

Comment 12 Fedora Update System 2019-09-17 01:39:39 UTC
rpkg-1.59-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-4eb904f9c5

Comment 13 Fedora Update System 2019-09-17 02:10:09 UTC
rpkg-1.59-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-46aa409f08

Comment 14 Fedora Update System 2019-09-17 02:14:35 UTC
rpkg-1.59-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-609226dd65

Comment 15 Fedora Update System 2019-09-21 00:01:59 UTC
rpkg-1.59-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-09-25 01:07:22 UTC
rpkg-1.59-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2019-09-25 01:57:31 UTC
rpkg-1.59-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-10-02 00:42:21 UTC
rpkg-1.59-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2019-10-02 00:44:38 UTC
rpkg-1.59-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.