Re: GitHub webhooks not working

2018-09-22 Thread Michal Novotny
On Thu, Sep 20, 2018 at 8:55 PM Jonathan Leroy  wrote:
>
> Le jeu. 20 sept. 2018 à 18:22, Michal Novotny  a écrit :
> > The generated srpm is written to
> >
> > Wrote: 
> > /mnt/tmp/tmpktelyu3h/plexmediaplayer-fedora/SRPMS/plexmediaplayer-2.18.0-1.fc28.src.rpm
> >
> > But it should be written to
> >
> > $(outdir)
> >
> > /mnt/var/lib/copr-rpmbuild/results/tmpeuhha9ly in the referenced build.
>
> I've added to the following argument to rpmbuild to force the SRPM
> output directory:
>  --define "_srcrpmdir $(outdir)"
>
> The build now succeed. Thank you!

Glad it worked!

>
> --
> Jonathan Leroy
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Re: GitHub webhooks not working

2018-09-20 Thread Jonathan Leroy
Le jeu. 20 sept. 2018 à 18:22, Michal Novotny  a écrit :
> The generated srpm is written to
>
> Wrote: 
> /mnt/tmp/tmpktelyu3h/plexmediaplayer-fedora/SRPMS/plexmediaplayer-2.18.0-1.fc28.src.rpm
>
> But it should be written to
>
> $(outdir)
>
> /mnt/var/lib/copr-rpmbuild/results/tmpeuhha9ly in the referenced build.

I've added to the following argument to rpmbuild to force the SRPM
output directory:
 --define "_srcrpmdir $(outdir)"

The build now succeed. Thank you!

-- 
Jonathan Leroy
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Re: GitHub webhooks not working

2018-09-20 Thread Michal Novotny
Hello Jonathan,

if you check the end of build-live.log here:
https://copr-be.cloud.fedoraproject.org/results/jleroy/PlexMediaPlayer/srpm-builds/00799659/builder-live.log

There is no output from the script

> Output: []

The generated srpm is written to

Wrote: 
/mnt/tmp/tmpktelyu3h/plexmediaplayer-fedora/SRPMS/plexmediaplayer-2.18.0-1.fc28.src.rpm

But it should be written to

$(outdir)

/mnt/var/lib/copr-rpmbuild/results/tmpeuhha9ly in the referenced build.

From our docs

$ cd myrepo
$ cat .copr/Makefile
srpm:
dnf -y install tito
tito build --builder=SomeBuilder --test --srpm --output=$(outdir)

Copr looks for the generated srpm in the $(outdir) Makefile variable
(that you can pass to a custom shell script optionally).

Let us know if it works for you
Copr team
On Tue, Sep 18, 2018 at 11:02 AM Jonathan Leroy  wrote:
>
> Le dim. 16 sept. 2018 à 10:17, Michal Novotny  a écrit :
> > Hello, the problem with make_srpm method is that useful information
> > in the builder-live.log is usually somewhere in the middle. Here:
>
> Thank you for your answer.
> Indeed the errors are in the log file, I should have checked better!
>
> I'm now calling spectool in my Makefile in order to download the
> missing source file from GitHub.
>
> The SRPM file is successfully built according to the logs, but the
> build still fail and I don't see any error message in the logs located
> at 
> https://copr-be.cloud.fedoraproject.org/results/jleroy/PlexMediaPlayer/srpm-builds/00799659/.
>
> However, the task log
> (https://copr-dist-git.fedorainfracloud.org/per-task-logs/799659.log)
> show this strange error:
>
> Traceback (most recent call last):
>   File "/usr/share/copr/dist_git/importer.py", line 75, in do_import
> workdir
>   File "/usr/share/copr/dist_git/helpers.py", line 173, in download_file
> raise FileDownloadException(str(e))
> dist_git.exceptions.FileDownloadException: Invalid URL 'None': No
> schema supplied. Perhaps you meant http://None?
>
>
> After looking at Copr's source code, this seems to be an issue with
> dist-git's handling of srpm import?
> https://pagure.io/copr/copr/blob/master/f/dist-git/dist_git/importer.py#_75
>
> Thank you,
>
> --
> Jonathan Leroy
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Re: GitHub webhooks not working

2018-09-18 Thread Jonathan Leroy
Le dim. 16 sept. 2018 à 10:17, Michal Novotny  a écrit :
> Hello, the problem with make_srpm method is that useful information
> in the builder-live.log is usually somewhere in the middle. Here:

Thank you for your answer.
Indeed the errors are in the log file, I should have checked better!

I'm now calling spectool in my Makefile in order to download the
missing source file from GitHub.

The SRPM file is successfully built according to the logs, but the
build still fail and I don't see any error message in the logs located
at 
https://copr-be.cloud.fedoraproject.org/results/jleroy/PlexMediaPlayer/srpm-builds/00799659/.

However, the task log
(https://copr-dist-git.fedorainfracloud.org/per-task-logs/799659.log)
show this strange error:

Traceback (most recent call last):
  File "/usr/share/copr/dist_git/importer.py", line 75, in do_import
workdir
  File "/usr/share/copr/dist_git/helpers.py", line 173, in download_file
raise FileDownloadException(str(e))
dist_git.exceptions.FileDownloadException: Invalid URL 'None': No
schema supplied. Perhaps you meant http://None?


After looking at Copr's source code, this seems to be an issue with
dist-git's handling of srpm import?
https://pagure.io/copr/copr/blob/master/f/dist-git/dist_git/importer.py#_75

Thank you,

-- 
Jonathan Leroy
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Re: GitHub webhooks not working

2018-09-16 Thread Michal Novotny
On Sat, Sep 15, 2018 at 4:44 PM Jonathan Leroy  wrote:
>
> 2018-07-01 19:42 GMT+02:00 Jonathan Leroy :
> > Thank you for your very detailed answer. I will look at that.
>
> Michal,
>
> I don't known if it's related to the use of the "make_sprm" build
> method (first time I use it with Copr), but I can't get to build my
> package using Copr.
> Every build fails with the following description: "Attempt to build
> SRPM have failed."
>
> I don't see anything interesting in the builder-live.log, but the
> rsync log show this error:
>
> rsync: link_stat "/var/lib/copr-rpmbuild/results/*" failed: No such
> file or directory (2)
> [...]
> rsync error: some files/attrs were not transferred (see previous
> errors) (code 23) at main.c(1659) [Receiver=3.1.3]
> rsync: [Receiver] write error: Broken pipe (32)
>
> Any idea?

Hello, the problem with make_srpm method is that useful information
in the builder-live.log is usually somewhere in the middle. Here:

rc: 2
stdout: Selected user namespace base 280625152 and range 65536.
rpmbuild --define "_topdir `pwd`" -bs SPECS/plexmediaplayer.spec
error: Bad source:
/mnt/tmp/tmp3kv4mkdu/plexmediaplayer-fedora/SOURCES/plexmediaplayer-2.18.0.tar.gz:
No such file or directory
make: *** [/mnt/tmp/tmp3kv4mkdu/plexmediaplayer-fedora/.copr/Makefile:2:
srpm] Error 1
stderr: INFO: mock.py version 1.4.13 starting (python version = 3.6.5)...

rpmbuild is looking for
/mnt/tmp/tmp3kv4mkdu/plexmediaplayer-fedora/SOURCES/plexmediaplayer-2.18.0.tar.gz

but can't find it.

Maybe the file has been generated somwhere else...

Thank you.
M.

>
> Thanks,
>
> --
> Jonathan Leroy
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Re: GitHub webhooks not working

2018-07-01 Thread Jonathan Leroy
Hi Michal!


2018-07-01 19:37 GMT+02:00 Michal Novotny :
> The systematic fix for this will take time however so I would suggest
> switching to make_sprm method.

Thank you for your very detailed answer. I will look at that.

Regards,

-- 
Jonathan Leroy
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/RCHZRA7D24QNU24X4D27JDPLUOTBAACK/


Re: GitHub webhooks not working

2018-07-01 Thread Michal Novotny
Hello Jonathan!

On Sun, Jul 1, 2018 at 6:56 PM Jonathan Leroy  wrote:

> Hi,
>
> I've setup a GitHub webhook according to the documentation at
> https://copr.fedorainfracloud.org/coprs/jleroy/PlexMediaPlayer/webhooks/.
> When a push my commits to GitHub, a POST request is sent to the
> webhook URL by GitHub and and HTTP 200 response received according to
> GitHub logs. But nothing happens on Copr's side.
>

That's because you have set SOURCES as subdirectory, which causes filtering
out commits that did not modify a subpath of SOURCES/. Like e.g. if you
make a change in the spec file under SPECS, then this change won't get
rebuilt.

The problem here is that the 'Subdirectory' parameter is overloaded and
it does more than it probably should. The filtering on paths should be a
separate thing. We are assuming there that the spec file will be placed
next to sources, which is not true in this case.

The systematic fix for this will take time however so I would suggest
switching to make_sprm method. You can then leave subdirectory empty
and set 'Spec file' to SPECS/plexmediaplayer.spec. But you will additionally
need to write a Makefile placed at .copr/Makefile in you repository
with 'srpm' target. There you can manually invoke rpkg to build the srpm.
See docs here:
https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm

Example usage is here: https://github.com/att/ast/blob/master/.copr/Makefile

Note that you will probably need much more simpler script.


You could also use Custom build method with Custom webhook.
https://docs.pagure.org/copr.copr/custom_source_method.html#custom-source-method
That might be more simple although you will need to switch your Github
webhook for the Custom one (see "Custom webhook") at the bottom of
the 'webhooks' page. Again, manual invocation of either rpkg or
rpmbuild -bs will be needed to be build the srpm but this time, you
will write the command directly into Copr input form instead of using
the .copr/Makefile in your Git repository. If you use rpkg, you will also
need to add it to the 'builddeps' field.

This might take a bit of trial and error to get it up and running. Let us
know if you meet and difficulties.

Best regards
Copr team


>
> However, if I trigger the build manually using the "Rebuild" button,
> everything works fine.
>
> Any idea?
>
> --
> Jonathan Leroy
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/XI76WCQVKPSSLO4CRWMQJ4TJCT224FPG/
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/H4BUIS6JGJZQXZPOZHKVBV4HRQ47RNAY/


GitHub webhooks not working

2018-07-01 Thread Jonathan Leroy
Hi,

I've setup a GitHub webhook according to the documentation at
https://copr.fedorainfracloud.org/coprs/jleroy/PlexMediaPlayer/webhooks/.
When a push my commits to GitHub, a POST request is sent to the
webhook URL by GitHub and and HTTP 200 response received according to
GitHub logs. But nothing happens on Copr's side.

However, if I trigger the build manually using the "Rebuild" button,
everything works fine.

Any idea?

-- 
Jonathan Leroy
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/XI76WCQVKPSSLO4CRWMQJ4TJCT224FPG/