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 possibility to upload SRPM directly to Copr #198

Merged
merged 4 commits into from Sep 24, 2015

Conversation

Projects
None yet
5 participants
@FrostyX
Collaborator

FrostyX commented Sep 10, 2015

Additionally to the current CoprReleaser behavior in which the builded SRPM is uploaded to remote server and then submitted to the Copr via URL, I have implemented direct approach for submitting the package from your local storage right into the Copr. This feature is supported since python-copr-1.58-1.

With this patch it's supported the old style configuration:

[copr]
releaser = tito.release.CoprReleaser
project_name = foo
upload_command = scp %(srpm)s user@example.com:/home/user/public_html/
remote_location = http://example.com/~user/

as well as the:

[copr]
releaser = tito.release.CoprReleaser
project_name = foo

Can you review it @xsuchy and give me your blessing? :-)

@FrostyX FrostyX changed the title from Copr releaser to Add possibility to upload SRPM directly to Copr Sep 10, 2015

@dgoodwin

This comment has been minimized.

Show comment
Hide comment
@dgoodwin

dgoodwin Sep 10, 2015

Owner

Whoah really? This would be awesome.

Owner

dgoodwin commented Sep 10, 2015

Whoah really? This would be awesome.

@xsuchy xsuchy referenced this pull request Sep 10, 2015

Closed

Add a CoprBuilder #199

@xsuchy

This comment has been minimized.

Show comment
Hide comment
@xsuchy

xsuchy Sep 10, 2015

Contributor

Looks good to me. Maybe - can you edit man page of releasers.conf(5) to state that these two options are optional now?

Contributor

xsuchy commented Sep 10, 2015

Looks good to me. Maybe - can you edit man page of releasers.conf(5) to state that these two options are optional now?

@rholy

This comment has been minimized.

Show comment
Hide comment
@rholy

rholy Sep 10, 2015

I wonder why you rather use copr-cli than python-copr but this is probably not a good place for this discussion.
Anyway, I have no idea why you prefer Popen over run_command but I think that you should still check the exit status of the process.

rholy commented Sep 10, 2015

I wonder why you rather use copr-cli than python-copr but this is probably not a good place for this discussion.
Anyway, I have no idea why you prefer Popen over run_command but I think that you should still check the exit status of the process.

@dgoodwin

This comment has been minimized.

Show comment
Hide comment
@dgoodwin

dgoodwin Sep 10, 2015

Owner

As far as I'm concerned I would have no objections to python-copr usage.

Owner

dgoodwin commented Sep 10, 2015

As far as I'm concerned I would have no objections to python-copr usage.

@xsuchy

This comment has been minimized.

Show comment
Hide comment
@xsuchy

xsuchy Sep 10, 2015

Contributor

I thought about it as well, but it have several consequences. If we use python-copr, then we have to hard require python-copr in spec file (or put a lot of try/except in code). And since this is rather soft deps I do not think we should force everyone to install it.
And I hesitate to put Suggest into spec as we still support EL6, which does not recognize these tags. Even if you wrap it with %if/%endif.

Contributor

xsuchy commented Sep 10, 2015

I thought about it as well, but it have several consequences. If we use python-copr, then we have to hard require python-copr in spec file (or put a lot of try/except in code). And since this is rather soft deps I do not think we should force everyone to install it.
And I hesitate to put Suggest into spec as we still support EL6, which does not recognize these tags. Even if you wrap it with %if/%endif.

@domcleal

This comment has been minimized.

Show comment
Hide comment
@domcleal

domcleal Sep 11, 2015

Contributor

I don't mind a hard dep on python-copr as it appears to just add a single package on a regular installation, not an entire tree of dependencies (like git-annex did).

Contributor

domcleal commented Sep 11, 2015

I don't mind a hard dep on python-copr as it appears to just add a single package on a regular installation, not an entire tree of dependencies (like git-annex did).

@FrostyX

This comment has been minimized.

Show comment
Hide comment
@FrostyX

FrostyX Sep 11, 2015

Collaborator

@rholy

Anyway, I have no idea why you prefer Popen over run_command but I think that you should still check the exit status of the process.

Well I had a problem with run_command. Even when I used run_command_print it wasn't showing the copr-cli build ... output on the fly. Which was kind of uncomfortable because you couldn't tell whether the tito froze or it is just still building. Did I do something wrong?

Next, will the process exit status help us with something? I was thinking about it, but errors are covered even now. See:

Submiting build into Copr.

Something went wrong:
Error: Copr with name bar does not exist.
Collaborator

FrostyX commented Sep 11, 2015

@rholy

Anyway, I have no idea why you prefer Popen over run_command but I think that you should still check the exit status of the process.

Well I had a problem with run_command. Even when I used run_command_print it wasn't showing the copr-cli build ... output on the fly. Which was kind of uncomfortable because you couldn't tell whether the tito froze or it is just still building. Did I do something wrong?

Next, will the process exit status help us with something? I was thinking about it, but errors are covered even now. See:

Submiting build into Copr.

Something went wrong:
Error: Copr with name bar does not exist.
@rholy

This comment has been minimized.

Show comment
Hide comment
@rholy

rholy Sep 11, 2015

Does tito exit with a non-zero exit status then? I guess no.

rholy commented Sep 11, 2015

Does tito exit with a non-zero exit status then? I guess no.

@FrostyX

This comment has been minimized.

Show comment
Hide comment
@FrostyX

FrostyX Sep 14, 2015

Collaborator

@rholy, now it sets exit code by calling error_out, which has 1 on error.

@\everyone, do you think that any other enhancements should be done? Can I ask you to try the patch, whether it works for you as expected? Thank you.

Collaborator

FrostyX commented Sep 14, 2015

@rholy, now it sets exit code by calling error_out, which has 1 on error.

@\everyone, do you think that any other enhancements should be done? Can I ask you to try the patch, whether it works for you as expected? Thank you.

dgoodwin added a commit that referenced this pull request Sep 24, 2015

Merge pull request #198 from FrostyX/copr-releaser
Add possibility to upload SRPM directly to Copr

@dgoodwin dgoodwin merged commit 28532a1 into dgoodwin:master Sep 24, 2015

@dgoodwin

This comment has been minimized.

Show comment
Hide comment
@dgoodwin

dgoodwin Sep 24, 2015

Owner

Merged, thanks.

Owner

dgoodwin commented Sep 24, 2015

Merged, thanks.

@FrostyX

This comment has been minimized.

Show comment
Hide comment
@FrostyX

FrostyX Sep 27, 2015

Collaborator

Thank you for merging,
please let me know if some related issue appears.

Collaborator

FrostyX commented Sep 27, 2015

Thank you for merging,
please let me know if some related issue appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment