]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: Remove .gz compressed files and use apt helper tools
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Dec 2024 18:14:16 +0000 (18:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2024 17:03:49 +0000 (17:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Jenkinsfile

index 9b66263fedcd0a0719134746bc91b7e712ef43d3..876c4217c6ffb0bb415db6404a5f07ad63ec8d7e 100644 (file)
@@ -332,13 +332,13 @@ pipeline {
                                                                        // Copy all packages
                                                                        sh "cp -v uploads/*.deb pool/${DISTRO}/main/${ARCH}"
 
-                                                                       // Generate Packages.gz
+                                                                       // Generate Packages
                                                                        sh "dpkg-scanpackages pool/${DISTRO}/main/${ARCH} \
-                                                                               | gzip -9 > dists/${DISTRO}/main/binary-${ARCH}/Packages.gz"
+                                                                               > dists/${DISTRO}/main/binary-${ARCH}/Packages"
 
-                                                                       // Generate Sources.gz
+                                                                       // Generate Sources
                                                                        sh "dpkg-scansources pool/${DISTRO}/main/${ARCH} \
-                                                                               | gzip -9 > dists/${DISTRO}/main/source/Sources.gz"
+                                                                               > dists/${DISTRO}/main/source/Sources"
 
                                                                        // Stash the packages
                                                                        stash includes: "dists/**/*, pool/**/*",
@@ -362,6 +362,10 @@ pipeline {
                                        }
 
                                        steps {
+                                               // Install dependencies
+                                               sh "apt-get update"
+                                               sh "apt-get install -y apt-utils"
+
                                                // Unstash all stashed packages from the matrix build
                                                script {
                                                        for (distro in ["trixie", "bookworm"]) {
@@ -380,16 +384,10 @@ pipeline {
                                                                                echo "Architectures: amd64 arm64"
                                                                                echo "Components: main"
                                                                                echo "Description: Pakfire Jenkins Repository"
-                                                                               echo "Date: $(date -Ru)"
-
-                                                                               # MD5
-                                                                               echo "MD5Sum:"
-                                                                               for arch in amd64 arm64; do
-                                                                                       echo -n " \$(md5sum dists/$distro/main/binary-\${arch}/Packages.gz | awk '{ print \$1 }')"
-                                                                                       echo -n " \$(stat --format="%s" dists/$distro/main/binary-\${arch}/Packages.gz)"
-                                                                                       echo " main/binary-\${arch}/Packages.gz"
-                                                                               done
-                                                                       ) >> dists/${distro}/Release
+
+                                                                               # Do the rest automatically
+                                                                               apt-ftparchive release dists/$distro
+                                                                       ) >> dists/$distro/Release
                                                                """
                                                        }
                                                }