<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10343">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmocom-nightly-packages: Ensure PACKAGE_VERSION is set correctly<br><br>At the "autorecon -fi" stage, Osmocom programs either need the .git<br>directory peresent, or a .tarball-version file in order to determine<br>the exact source code version.<br><br>Normally, "make dist" exists exactly for this purpose: It runs<br>git-version-gen and saves the result to .tarball-version, and we then<br>include this file in the .tar.gz we generate.<br><br>However, as the nightly paackaging scripts use git-buildpackage, it<br>bypasses the "make dist" logic and hence we need to<br><br>1) manually generate the .tarball-version file<br>2) copy it over to the directory specified as --git-export-dir<br><br>This way, the .tarball-version is inside the tar.xz generated by gbp,<br>and autoreconf then has something to use as PACKAGE_VERSION.<br><br>This commit fixes "UNKNOWN-dirty" in .pc files of libraries, as well<br>as in "show version" commands on the vty.<br><br>Closes: OS#3449<br>Change-Id: I76e3713f0b01a6110091ff90e8e53aa79533c374<br>---<br>M scripts/osmocom-nightly-packages.sh<br>1 file changed, 4 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/43/10343/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh</span><br><span>index b616a8f..320e376 100755</span><br><span>--- a/scripts/osmocom-nightly-packages.sh</span><br><span>+++ b/scripts/osmocom-nightly-packages.sh</span><br><span>@@ -42,8 +42,8 @@</span><br><span>   local version</span><br><span>   local date</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  # git version</span><br><span style="color: hsl(0, 100%, 40%);">-  version=$(test -x ./git-version-gen && ./git-version-gen . 2>/dev/null)</span><br><span style="color: hsl(120, 100%, 40%);">+  # determine git version *and generate the .tarball-version file*</span><br><span style="color: hsl(120, 100%, 40%);">+  version=$(test -x ./git-version-gen && ./git-version-gen . > .tarball-version 2>/dev/null)</span><br><span>   # debian doesn't allow '-' in version.</span><br><span>   version=$(echo "$version" | sed  's/-/./g' )</span><br><span> </span><br><span>@@ -88,7 +88,8 @@</span><br><span> </span><br><span>   mkdir -p "$DATA/$name"</span><br><span>   # source code build without dependency checks and unsigned source and unsigned change log</span><br><span style="color: hsl(0, 100%, 40%);">-  gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" $gitbpargs</span><br><span style="color: hsl(120, 100%, 40%);">+  gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" \</span><br><span style="color: hsl(120, 100%, 40%);">+            --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' $gitbpargs</span><br><span> </span><br><span>   mv "$DATA/$name/"*.tar* "$DATA/$name/"*.dsc "$oscdir/"</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10343">change 10343</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10343"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I76e3713f0b01a6110091ff90e8e53aa79533c374 </div>
<div style="display:none"> Gerrit-Change-Number: 10343 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>