]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci/deb: post-process Packages to use branch-name as component
authorYann Dirson <yann.dirson@vates.fr>
Wed, 13 Dec 2023 11:34:49 +0000 (12:34 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Thu, 14 Dec 2023 08:55:21 +0000 (09:55 +0100)
This avoids the problem seen with HTTP 400 errors.

The sources.list entry for latest dev snapshot will be:

 deb [trusted=yes] https://gitlab.com/api/v4/projects/xen-project%252Fxen-guest-agent/packages/generic/deb-amd64/ main/

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
.gitlab-ci.yml
apt-ftparchive.conf

index 4af84355499fe883ec794914be6d7be2d0655664..2044414fcace60e83b64172bf28078f7b46ce331 100644 (file)
@@ -205,6 +205,10 @@ pkg-deb-amd64:
     - for FILE in *.deb; do mv $FILE $(echo $FILE | tr "~" "-"); done
 
     - apt-ftparchive generate ../../apt-ftparchive.conf
+
+    # post-processing so we can use `deb https://...generic/deb-amd64/ main/`
+    - 'sed -i "s,^Filename: ./,Filename: ${CI_COMMIT_REF_NAME}/," Packages'
+
     - apt-ftparchive release .
       -o APT::FTPArchive::Release::Description="xen-guest-agent CI packages for ${CI_COMMIT_REF_NAME}"
       -o APT::FTPArchive::Release::Label="xen-guest-agent-ci"
index b75fea7bf252e5f675742d229c6ea36cf9347493..c7196b47b344c2cbb0e6760aec42bf2d52179560 100644 (file)
@@ -3,7 +3,9 @@ Dir {
 };
 
 Default {
-        Packages::Compress ". gzip xz";
+        # don't compress, we'll post-process Packages
+        # (and anyway this layout would ignore compressed ones ¯\_(ツ)_/¯)
+        Packages::Compress ".";
         Contents::Compress "gzip xz";
 };