openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 103 forks source link

OBS source services fail with "Files could not be expanded: service error: RuntimeWarning" #306

Open shundhammer opened 5 years ago

shundhammer commented 5 years ago

OBS Project

https://build.opensuse.org/package/show/home:shundhammer:qdirstat-git/qdirstat

Problem

Builds for all platforms fail with "broken" in the "Build Results" panel.

Below "Source Files" I now see

Sources could not be expanded: service error: RuntimeWarning)

Detailed error:

Files could not be expanded: service error: RuntimeWarning)

service set_version failed: 
/srv/obs/service/17773 
/srv/obs/service/17773/src 
/srv/obs/service/17773/src/_service 
/srv/obs/service/17773/src/qdirstat.changes 
/srv/obs/service/17773/src/qdirstat.spec 
/srv/obs/service/17773/src/.old 
/srv/obs/service/17773/src/_service:tar_scm:qdirstat-beforepkgview+git.ce3e793.tar 
/srv/obs/service/17773/var 
/srv/obs/service/17773/var/cache 
/srv/obs/service/17773/var/cache/obs 
/srv/obs/service/17773/var/cache/obs/oDYxgESkWkI5 
/srv/obs/service/17773/var/cache/obs/3pPDcliRJdQm 
/srv/obs/service/17773/var/cache/obs/3pPDcliRJdQm/scripts 
/srv/obs/service/17773/var/cache/obs/3pPDcliRJdQm/scripts/inner.sh 
/srv/obs/service/17773/var/cache/obs/3pPDcliRJdQm/scripts/inner.sh.command 
/srv/obs/service/17773/home 
/srv/obs/service/17773/out 
+ echo Running /usr/lib/obs/service//set_version --outdir /var/cache/obs/3pPDcliRJdQm/out 
+ export HOME=/var/cache/obs/3pPDcliRJdQm/home 
+ HOME=/var/cache/obs/3pPDcliRJdQm/home 
+ /usr/lib/obs/service//set_version --outdir /var/cache/obs/3pPDcliRJdQm/out 
Running /usr/lib/obs/service//set_version --outdir /var/cache/obs/3pPDcliRJdQm/out 
unable to detect the version 
/usr/lib/obs/service//set_version:33: RuntimeWarning: install 'packaging' to improve python package versions 
RuntimeWarning)

Service File

https://build.opensuse.org/package/view_file/home:shundhammer:qdirstat-git/qdirstat/_service?expand=0

<services>
  <service name="tar_scm">
    <param name="url">https://github.com/shundhammer/qdirstat.git</param>
    <param name="scm">git</param>
    <!-- replace 0.x with @PARENT_TAG@ when git repo has proper
         version tags     -->
    <!-- <param name="versionformat">0.86+git.%ct.%h  </param> -->
    <param name="versionformat">@PARENT_TAG@+git.%h</param>
  </service>
  <service name="set_version"/>
  <service name="recompress">
    <param name="file">*.tar</param>
    <param name="compression">bz2</param>
  </service>
</services>

Contact Information

shundhammer@suse.de

HuHa on SUSE IRC (#suse) or on #yast on Freenode

shundhammer commented 5 years ago

It appears that the problem was caused by a tag before-pkg-view on the source repo.

After deleting that tag, the source service runs flawlessly again, and package building starts.

Since there is this line

    <param name="versionformat">@PARENT_TAG@+git.%h</param>

in the _service file, it looks likely to me that it failed because together with that non-numeric tag it could not be interpreted as a proper version number; it would have been before-pkg-view+git.7c15db which of course is not a valid version number for RPM.

So complaining about this was probably correct, but the error message was very confusing. Please consider an error message that gives some hint to what exactly was wrong.