]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Deal with ubuntu's special debug packages
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 23 Apr 2024 07:09:37 +0000 (09:09 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 23 Apr 2024 08:25:02 +0000 (10:25 +0200)
Building debug packages on ubuntu requires the "debug" option to be
specified explicitly. Debug packages on Ubuntu have the .ddeb extension,
so let's make sure we handle that by copying the .ddeb packages in the
build script as well.

mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot

index 061ed5b5a767154d51ea533be872f86d635a50b3..e4f589d6b6eb8b5ffe7f5bcfc24b3775e13b4068 100755 (executable)
@@ -45,7 +45,7 @@ build() {
     DEB_BUILD_OPTIONS=$(awk '$1=$1' <<<"\
         $( ((WITH_TESTS)) || echo nocheck) \
         $( ((WITH_DOCS)) || echo nodoc) \
-        $( ((WITH_DEBUG)) || echo nostrip) \
+        $( ((WITH_DEBUG)) && echo debug || echo nostrip) \
         terse \
         optimize=-lto \
         hardening=-fortify \
@@ -100,5 +100,8 @@ if ! build; then
     build
 fi
 
-cp ../*.deb "$PACKAGEDIR"
-cp ../*.deb "$OUTPUTDIR"
+(
+    shopt -s nullglob
+    cp ../*.deb ../*.ddeb "$PACKAGEDIR"
+    cp ../*.deb ../*.ddeb "$OUTPUTDIR"
+)