<div dir="ltr"><div>Hi,</div><br><div class="gmail_quote"><span class="gmail-im" style="color:rgb(80,0,80)"><div dir="ltr" class="gmail_attr">On Wed, Feb 12, 2020 at 11:51 PM Sandro Knauß <<a href="mailto:hefee@debian.org" target="_blank">hefee@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br><br>> There is a "debian" directory under admin/linux/debian, which has the<br>> standard Debian layout. And besides this "debian" directory, there are<br>> other "debian.<distribution>" directories. When building a source package<br>> for a certain distribution, the build script copies the "debian" directory<br>> to the root of the source tree and then copies any files from the<br>> corresponding "debian.<distribution>" directory over the copy of the<br>> "debian" directory in the root of the source tree. This way the standard<br>> Debian layout is created and the source package can be built. The<br>> "debian.<distribution>" directories thus serve as a klnd of simple<br>> "patches".<br><br>Okay, well in order to handle this in a Debian known way, you should translate<br>this to different branches.<br><br>> The changelog is automatically generated from the commit messages (starting<br>> from a certain commit) and the result is prepended to the "changelog" file<br>> in the repository.<br><br>mmh I see, but than you don't need to ship different changelogs for different<br>distributions. If the rest of the package data is not changed.<br></blockquote><div><br></div></span><div>I build only source packages and upload them to Launchpad where the actual build takes place. To be able to indicate which distribution the source package is uploaded for, its version must end with a tilde followed by the distribution's name (e.g. ~bionic, see <a href="https://help.launchpad.net/Packaging/PPA/BuildingASourcePackage" target="_blank">https://help.launchpad.net/Packaging/PPA/BuildingASourcePackage</a>). AFAIK, the version comes from the changelog file only, or is there a better way to use the same changelog for different distributions?</div><span class="gmail-im" style="color:rgb(80,0,80)"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>> An automated build is performed for each commit merged to the upstream<br>> master branch and one should also start for the stable branches, which is<br>> not triggerred currently, but it should (so I trigger it by handÖ :)<br>> Anyway, the solution we find should support this use case. Storing the<br>> packaging data in your repository in different branches could work, as the<br>> build script could fetch the salsa repository and use the "debian"<br>> directory from ther appropriate branch. The situation is somewhat<br>> complicated by the requirement that one should be able to build both the<br>> master and the current stable branch, where the packaging data could<br>> differ. So perhaps occasionally distribution-and-upstream-branch-specific<br>> branches should be created if that is OK with you.<br><br>You can have different upstream branches if you update the upstream-branch in<br>debian/gbp.conf for the different branches, but you already need to touch that<br>file to update the master-branch.<br><br>So in my mind we would end up in branches something like this:<br><br>ppa-nextcloud/debian/buster/{stable,master}<br>upstream/ppa-nextcloud/buster/{stable,master}<br><br>so you are able to control everything and we can even use the salsa ci to test<br>packages.<br></blockquote><div><br></div></span><div>OK, it seems that this branching approach could work.</div><span class="gmail-im" style="color:rgb(80,0,80)"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>> That said I think this having to support multiple upstream branches is a<br>> strong reason for storing the debian packaging data in the upstream<br>> repository, if it could suit your build workflow. I am aware that at some<br>> point the standard Debian directory layout must be present, but couldn't<br>> you perform a similar copy operation during your build process?<br><br>well there is also a Debian layout, where the upstream data is not part of.<br>But this has also a lot of disadvantages, as I can't easy cherry-pick upstream<br>patches into Debian.<br><br>Instead of coping stuff around, you can use the current layout you simply merge<br>upstream master into the debian branch, update the version and<br><br>gbp buildpackage --git-force-create<br><br>and boom done ;) So you see it is possible to support your usecases.<br><br></blockquote><div><br></div></span><div>I want to keep the build as much automated as it is nows. Currently each merge to the master branch triggers a new build in the Drone system of Nextcloud. I would also like to extend to any stable branches as well, but the only issue with that is that the current Drone setup does not trigger builds on branches, neither for tagging. However, as far as the current build script goes, it should work.<br></div><div><br></div><div>Now, let us consider, say, the master branch only. After a major release, the version number is stepped there and then several builds are made for that version for each new merge. The build system creates only source packages, which are then uploaded to Launchpad and the real building happens there. For a certain main version (like 2.7.0), each source package should be based on the same orig tar, because it can be uploaded only once to Launchpad. This means that there are an increasing number of changes between that orig tar and the actual code. The way I solve it in the current build system is to run the command:</div><div><br></div><div>    EDITOR=true dpkg-source --commit . local-changes</div><div><br></div><div>before the build. With gbp it seems that I can do this with:</div><div><br></div><div>   gbp buildpackage --git-prebuild='EDITOR=true dpkg-source --commit . local-changes'</div><div><br></div><div>Is this the correct way to do it, or is there a better way?</div><div><br></div><div>Istvan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">hefee</blockquote></div></div>