[opensuse-buildservice] OBS + GitHub integration
Hi ! After playing with OBS within my « own home project » namespace using OBS web UI, I successfully: * managed to build Debian packages for target Debian 10/Buster by reading this excellent guide: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds * use the link feature to ensure dependencies between my projects and subproject * everything is perfect so far as soon as I’m using « pristine tarball » As this is good to build « one time package », I’d like to have these build in sync with my Github repo. I’ve seen several youtube video showing the possibility to create a « _service » from GitHub URL, but still Debian build needs a pristine tarball whose name match the name of the tarball inside the dsc file. (Same goes for the *.debian.xz file) I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version » I tried to search the web by my GoogleFu could not lead me to a clear answer. Apology if this is something trivial, in that case I’d gladly accept a link to the proper resource (URL, video etc. I’m still fairly new to OBS) Thanks ! À bientôt, -- Frederic -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Aug 14 2019, Frédéric LOUI <frederic.loui@renater.fr> wrote:
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
You need to add openSUSE:Tools to the repository path. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, Thanks to your answer, I can now start deb build. However, I got a normal error related to the source tarball file name in the dsc file I uploaded. (I’m using the Web GUI , not OBS CLI) All the service are OK and I used: https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example... But adapted the example to obs_scm instead of tar_scm (indicated as deprecated). So in the log, conceptually a tarball is generated from the fetched github repo in the form: <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio The service param « tar » : <service name="tar" mode="buildtime"/> converted the *.obscpio file into a tarball. I manually put a dsc file and used the ops-service-set_version. Technically set_version should have altered the dsc files no ? (The documentation says: "obs-service-set_version: update package version in spec/dsc files") But the build stops and the log indicated that the files mentioned by the DSC files is missing (which is normal as the tarball filename has a « dynamic » name) In case it might be of use the log is here: https://build.opensuse.org/package/live_build_log/home:frederic-loui:p4lang:... And the URL to the project is here: https://build.opensuse.org/package/show/home:frederic-loui:p4lang:PI:stratum... Apology again, if this is something well-known. I’d love to get a link to an example or simply a doc in the wiki in order to conceptually visualise how to build a Debian package from github. Merci d’avance :-) À bientôt, -- Frederic
Le 14 août 2019 à 11:57, Andreas Schwab <schwab@suse.de> a écrit :
On Aug 14 2019, Frédéric LOUI <frederic.loui@renater.fr> wrote:
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
You need to add openSUSE:Tools to the repository path.
Andreas.
-- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi (again :-) ) After analysing the log in my manually uploaded dsc file I have my printing file name set to « pi_0.8.orig.tar.gz » In the log file the tarball generated has the name pi-0.8.orig.1553891655.af0b089.tar.gz A simple solution would be to generate a tarball that has a file name that map the one in the dsc file. I managed to use « filename » and « versionprefix » but I do I prevent abs-service-tar_scm to generate a file name that uses « <filename>-<versionprefix>.<commit_timestamp>.tar, with <commit_timestamp> » Behaviour as documented here ? : -> https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example... Merci ! À bientôt, -- Frederic
Le 14 août 2019 à 17:15, Frédéric LOUI <frederic.loui@renater.fr> a écrit :
Hi,
Thanks to your answer, I can now start deb build.
However, I got a normal error related to the source tarball file name in the dsc file I uploaded. (I’m using the Web GUI , not OBS CLI)
All the service are OK and I used: https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example... But adapted the example to obs_scm instead of tar_scm (indicated as deprecated).
So in the log, conceptually a tarball is generated from the fetched github repo in the form: <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio The service param « tar » : <service name="tar" mode="buildtime"/> converted the *.obscpio file into a tarball.
I manually put a dsc file and used the ops-service-set_version.
Technically set_version should have altered the dsc files no ? (The documentation says: "obs-service-set_version: update package version in spec/dsc files") But the build stops and the log indicated that the files mentioned by the DSC files is missing (which is normal as the tarball filename has a « dynamic » name)
In case it might be of use the log is here: https://build.opensuse.org/package/live_build_log/home:frederic-loui:p4lang:... And the URL to the project is here: https://build.opensuse.org/package/show/home:frederic-loui:p4lang:PI:stratum...
Apology again, if this is something well-known. I’d love to get a link to an example or simply a doc in the wiki in order to conceptually visualise how to build a Debian package from github.
Merci d’avance :-)
À bientôt, -- Frederic
Le 14 août 2019 à 11:57, Andreas Schwab <schwab@suse.de> a écrit :
On Aug 14 2019, Frédéric LOUI <frederic.loui@renater.fr> wrote:
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
You need to add openSUSE:Tools to the repository path.
Andreas.
-- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 8/14/19 8:31 PM, Frédéric LOUI wrote:
Hi (again :-) )
After analysing the log in my manually uploaded dsc file I have my printing file name set to « pi_0.8.orig.tar.gz » In the log file the tarball generated has the name pi-0.8.orig.1553891655.af0b089.tar.gz
A simple solution would be to generate a tarball that has a file name that map the one in the dsc file.
I managed to use « filename » and « versionprefix » but I do I prevent abs-service-tar_scm to generate a file name that uses « <filename>-<versionprefix>.<commit_timestamp>.tar, with <commit_timestamp> » Behaviour as documented here ? : -> https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example...
Merci !
À bientôt, -- Frederic
As far as I known, you can decide in the _service file to use any file name for the generated tarball. You can have a look here what placeholders are supported (found via 'rpm -ql obs-service-obs_scm'): /usr/lib/obs/service/obs_scm.service I'm not at all an expert in this, but my wild guess is that you have to use versionformat instead of versionprefix. E.g. in [1] I'm following upstream GNU hello, and first build the distribution tarball via './bootstrap && ./configure && make dist' as one would in an upstream git-clone (for details see the spec file), and then do the actual build from that just-created distribution tarball (again via './configure && make'). I only had to work around 'bootstrap' being unable to download the PO files in OBS environment, so this has also done by the _service (see SOURCE* in spec). [1] <https://build.opensuse.org/package/view_file/home:berny:branches:fromgit/hello/_service?expand=1> Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 19-08-14 11 h 40, Frédéric LOUI wrote:
Hi !
After playing with OBS within my « own home project » namespace using OBS web UI, I successfully:
* managed to build Debian packages for target Debian 10/Buster by reading this excellent guide: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds * use the link feature to ensure dependencies between my projects and subproject * everything is perfect so far as soon as I’m using « pristine tarball »
As this is good to build « one time package », I’d like to have these build in sync with my Github repo.
I’ve seen several youtube video showing the possibility to create a « _service » from GitHub URL, but still Debian build needs a pristine tarball whose name match the name of the tarball inside the dsc file. (Same goes for the *.debian.xz file)
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
I tried to search the web by my GoogleFu could not lead me to a clear answer.
Apology if this is something trivial, in that case I’d gladly accept a link to the proper resource (URL, video etc. I’m still fairly new to OBS)
Thanks !
À bientôt, -- Frederic
Salut Frédéric, The following link should be quite useful to you: https://kamarada.github.io/en/2019/03/19/integrating-the-open-build-service-... Let me know if it helps. Best regards -- Dany Marcoux <dmarcoux@suse.de> Full Stack Web Developer - Open Build Service SUSE Linux GmbH Maxfeldstrasse 5 90409 Nürnberg Germany GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi Dany, Thnaks for this link. Actually I already read it and does not answer the issue I encounter as: 1- In the example obs-service-tar_scm « extract » param is used and reflect the right dsc filename. ( The aim is to build deb package) 2- In my case obs-service-tar_scm generate a tarball with a name having the form: <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio 3- I upload the dsc and the <packageName>.debian.tar.xz file manually 4- For example, in my dsc file I have the tarball name file set to pi_0.8.orig.tar.gz And the « pristine » tarball generated by obs-service-tar_scm generate from the git URL the following filename: pi-0.8.orig.1553891655.af0b089.tar.gz 5- Therefore I have to possibility to resolve the problem: a. Find a way to mention modify during building the tarball filename in the dsc file. ( Replace pi_0.8.orig.tar.gz by pi-0.8.orig.1553891655.af0b089.tar.gz) b. Configure obs-service-tar_scm to generate a tarball with the name: pi_0.8.orig.tar.gz (But unfortunately I could not find it here https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar_scm.service.... neither here: https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar.service) I don’t know how to prevent the use of <commit_timestamp> in <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio Thanks anyway for you help ! Anyone else have any clue on how to do that ? Also I found DEBTRANSFORM, but I could not find a suitable documentation in order to use these tags properly, it can maybe an answer to my problem ... À bientôt, -- Frederic
Le 15 août 2019 à 10:07, Dany Marcoux <dmarcoux@suse.de> a écrit :
On 19-08-14 11 h 40, Frédéric LOUI wrote:
Hi !
After playing with OBS within my « own home project » namespace using OBS web UI, I successfully:
* managed to build Debian packages for target Debian 10/Buster by reading this excellent guide: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds * use the link feature to ensure dependencies between my projects and subproject * everything is perfect so far as soon as I’m using « pristine tarball »
As this is good to build « one time package », I’d like to have these build in sync with my Github repo.
I’ve seen several youtube video showing the possibility to create a « _service » from GitHub URL, but still Debian build needs a pristine tarball whose name match the name of the tarball inside the dsc file. (Same goes for the *.debian.xz file)
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
I tried to search the web by my GoogleFu could not lead me to a clear answer.
Apology if this is something trivial, in that case I’d gladly accept a link to the proper resource (URL, video etc. I’m still fairly new to OBS)
Thanks !
À bientôt, -- Frederic
Salut Frédéric,
The following link should be quite useful to you: https://kamarada.github.io/en/2019/03/19/integrating-the-open-build-service-...
Let me know if it helps.
Best regards
-- Dany Marcoux <dmarcoux@suse.de> Full Stack Web Developer - Open Build Service
SUSE Linux GmbH Maxfeldstrasse 5 90409 Nürnberg Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg)
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi ! I’ve progressed a bit by reading obs-service-tar_scm code. An particularly I’ve read :https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar_scm.service.... I’ve misinterpreted the line: « ===TAR_ONLY » so I assumed the following code was only related to tar_scm. But I found the « version » and « version tag » that helped me to set the pristine tarball name as expected in my dsc files. However now I’m facing an other issue as in the log here: https://build.opensuse.org/package/live_build_log/home:frederic-loui:p4lang:... I’ve the error: [ 186s] dpkg-source: error: file /usr/src/packages/SOURCES/pi-0.8.orig.tar.gz has size 2825250 instead of expected 2815136 Which is a normal error as the pristine tarball can have a different size after each commit. However I read here: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds#packageName.dsc And I refer to this section: " • Files: in theory, you must specify the MD5 sum and file size of the files used, but in practice, just put some values, it is not important if they are incorrect. What is important is that there are two lines with three field as shown in the template. (You can copy and paste the two lines in the template and substitute packageName with the name of the .deb you want to create and it will be ok. debtransform will do the rest.)" How do I alter the dsc file so that the pristine tarball file is updated with the right value inside the dsc file I manually uploaded ? How do I use debtransform to update this size ? Or simply how do I use debtransform ? Any link toward a doc/resources would be appreciated ! :-) ( —> I tried to read debtransform source code but as I’m not fluent with perl it is somewhat hard to get the idea behind debtransform … :-( ) Merci ! À bientôt, -- Frederic
Le 15 août 2019 à 10:52, Frédéric LOUI <frederic.loui@renater.fr> a écrit :
Hi Dany,
Thnaks for this link. Actually I already read it and does not answer the issue I encounter as:
1- In the example obs-service-tar_scm « extract » param is used and reflect the right dsc filename. ( The aim is to build deb package) 2- In my case obs-service-tar_scm generate a tarball with a name having the form: <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio 3- I upload the dsc and the <packageName>.debian.tar.xz file manually 4- For example, in my dsc file I have the tarball name file set to pi_0.8.orig.tar.gz And the « pristine » tarball generated by obs-service-tar_scm generate from the git URL the following filename: pi-0.8.orig.1553891655.af0b089.tar.gz 5- Therefore I have to possibility to resolve the problem: a. Find a way to mention modify during building the tarball filename in the dsc file. ( Replace pi_0.8.orig.tar.gz by pi-0.8.orig.1553891655.af0b089.tar.gz) b. Configure obs-service-tar_scm to generate a tarball with the name: pi_0.8.orig.tar.gz (But unfortunately I could not find it here https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar_scm.service.... neither here: https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar.service) I don’t know how to prevent the use of <commit_timestamp> in <filename>-<versionprefix>.<commit_timestamp>.-<field_i_could not_identify>.obscpio
Thanks anyway for you help !
Anyone else have any clue on how to do that ?
Also I found DEBTRANSFORM, but I could not find a suitable documentation in order to use these tags properly, it can maybe an answer to my problem ...
À bientôt, -- Frederic
Le 15 août 2019 à 10:07, Dany Marcoux <dmarcoux@suse.de> a écrit :
On 19-08-14 11 h 40, Frédéric LOUI wrote:
Hi !
After playing with OBS within my « own home project » namespace using OBS web UI, I successfully:
* managed to build Debian packages for target Debian 10/Buster by reading this excellent guide: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds * use the link feature to ensure dependencies between my projects and subproject * everything is perfect so far as soon as I’m using « pristine tarball »
As this is good to build « one time package », I’d like to have these build in sync with my Github repo.
I’ve seen several youtube video showing the possibility to create a « _service » from GitHub URL, but still Debian build needs a pristine tarball whose name match the name of the tarball inside the dsc file. (Same goes for the *.debian.xz file)
I’ve tried to trigger a build using simply the git URL and set the « revision » tag to « stable » but I get an « UNRESOLVED » error from OBS mentioning that « nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set-version »
I tried to search the web by my GoogleFu could not lead me to a clear answer.
Apology if this is something trivial, in that case I’d gladly accept a link to the proper resource (URL, video etc. I’m still fairly new to OBS)
Thanks !
À bientôt, -- Frederic
Salut Frédéric,
The following link should be quite useful to you: https://kamarada.github.io/en/2019/03/19/integrating-the-open-build-service-...
Let me know if it helps.
Best regards
-- Dany Marcoux <dmarcoux@suse.de> Full Stack Web Developer - Open Build Service
SUSE Linux GmbH Maxfeldstrasse 5 90409 Nürnberg Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg)
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Andreas Schwab
-
Bernhard Voelker
-
Dany Marcoux
-
Frédéric LOUI