summaryrefslogtreecommitdiffstats
path: root/mkosi.images
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-08 11:33:25 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-13 12:07:49 +0100
commit37bd860c22b60d6d389ebf1a27c93a32d4af9bc1 (patch)
treedd6c29ba5cb740c137f60ccc06b01e0138112a28 /mkosi.images
parentmkosi: Remove some leftover shell debugging (diff)
downloadsystemd-37bd860c22b60d6d389ebf1a27c93a32d4af9bc1.tar.xz
systemd-37bd860c22b60d6d389ebf1a27c93a32d4af9bc1.zip
mkosi: Introduce packaging sources as submodules
By always cloning the latest branch commit, we can't bisect properly using mkosi as when bisecting wildly different packaging sources will be used compared to when the commit was merged. By using submodules, we track individual commits which means when bisecting the same packaging sources will be used. We use git submodules as dependabot has support for automatically making PRs to update git submodules. This commit also includes the necessary dependabot configuration to enable this. We make ubuntu/debian use the same submodule instead of adding the debian packaging sources twice by introducing a new $PKG_SUBDIR environment variable and using it instead of $DISTRIBUTION.
Diffstat (limited to 'mkosi.images')
-rw-r--r--mkosi.images/base/mkosi.conf.d/10-arch/mkosi.conf2
-rw-r--r--mkosi.images/base/mkosi.conf.d/10-centos/mkosi.conf2
-rw-r--r--mkosi.images/base/mkosi.conf.d/10-debian-ubuntu/mkosi.conf2
-rw-r--r--mkosi.images/base/mkosi.conf.d/10-fedora/mkosi.conf2
-rw-r--r--mkosi.images/base/mkosi.conf.d/10-opensuse/mkosi.conf2
-rwxr-xr-xmkosi.images/base/mkosi.sync11
6 files changed, 3 insertions, 18 deletions
diff --git a/mkosi.images/base/mkosi.conf.d/10-arch/mkosi.conf b/mkosi.images/base/mkosi.conf.d/10-arch/mkosi.conf
index 75dbbb2dde..9cb45cc954 100644
--- a/mkosi.images/base/mkosi.conf.d/10-arch/mkosi.conf
+++ b/mkosi.images/base/mkosi.conf.d/10-arch/mkosi.conf
@@ -10,8 +10,6 @@ InitrdInclude=initrd/
# https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/merge_requests/8 is merged.
[Content]
Environment=
- PKG_URL="https://gitlab.archlinux.org/daandemeyer/systemd"
- PKG_BRANCH="strip"
PKG_SUBDIR="arch"
SYSTEMD_PACKAGES="systemd systemd-ukify systemd-sysvcompat systemd-resolvconf"
diff --git a/mkosi.images/base/mkosi.conf.d/10-centos/mkosi.conf b/mkosi.images/base/mkosi.conf.d/10-centos/mkosi.conf
index 607c2d2daf..0f57319c2a 100644
--- a/mkosi.images/base/mkosi.conf.d/10-centos/mkosi.conf
+++ b/mkosi.images/base/mkosi.conf.d/10-centos/mkosi.conf
@@ -5,8 +5,6 @@ Distribution=centos
[Content]
Environment=
- PKG_URL="https://git.centos.org/rpms/systemd"
- PKG_BRANCH="c9s-sig-hyperscale"
PKG_SUBDIR="centos"
Packages=
diff --git a/mkosi.images/base/mkosi.conf.d/10-debian-ubuntu/mkosi.conf b/mkosi.images/base/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
index f6fc43a848..47f3b7f488 100644
--- a/mkosi.images/base/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
+++ b/mkosi.images/base/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
@@ -9,8 +9,6 @@ InitrdInclude=initrd/
[Content]
Environment=
- PKG_URL="https://salsa.debian.org/systemd-team/systemd"
- PKG_BRANCH="debian/master"
PKG_SUBDIR="debian"
SYSTEMD_PACKAGES="systemd
systemd-userdbd
diff --git a/mkosi.images/base/mkosi.conf.d/10-fedora/mkosi.conf b/mkosi.images/base/mkosi.conf.d/10-fedora/mkosi.conf
index 1424709cef..a0b9f6f0fe 100644
--- a/mkosi.images/base/mkosi.conf.d/10-fedora/mkosi.conf
+++ b/mkosi.images/base/mkosi.conf.d/10-fedora/mkosi.conf
@@ -5,8 +5,6 @@ Distribution=fedora
[Content]
Environment=
- PKG_URL="https://src.fedoraproject.org/rpms/systemd"
- PKG_BRANCH="rawhide"
PKG_SUBDIR="fedora"
Packages=
diff --git a/mkosi.images/base/mkosi.conf.d/10-opensuse/mkosi.conf b/mkosi.images/base/mkosi.conf.d/10-opensuse/mkosi.conf
index 1fca47b7cb..63498c5098 100644
--- a/mkosi.images/base/mkosi.conf.d/10-opensuse/mkosi.conf
+++ b/mkosi.images/base/mkosi.conf.d/10-opensuse/mkosi.conf
@@ -8,8 +8,6 @@ InitrdInclude=initrd/
[Content]
Environment=
- PKG_URL="https://code.opensuse.org/package/systemd"
- PKG_BRANCH="master"
PKG_SUBDIR="opensuse"
SYSTEMD_PACKAGES="systemd
udev
diff --git a/mkosi.images/base/mkosi.sync b/mkosi.images/base/mkosi.sync
index b95a73bc08..72b5cf7c33 100755
--- a/mkosi.images/base/mkosi.sync
+++ b/mkosi.images/base/mkosi.sync
@@ -2,12 +2,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
-if ((CACHED)); then
- exit 0
-fi
-
-if [ -z "$(ls --almost-all "pkg/$PKG_SUBDIR")" ]; then
- git clone "$PKG_URL" --branch "$PKG_BRANCH" "pkg/$PKG_SUBDIR"
-elif [ -d "pkg/$PKG_SUBDIR/.git" ] && [ "$(git -C "pkg/$PKG_SUBDIR" rev-parse --abbrev-ref HEAD)" = "$PKG_BRANCH" ]; then
- git -C "pkg/$PKG_SUBDIR" pull
+if [ -z "$(ls --almost-all "pkg/$PKG_SUBDIR")" ] || [ -f "pkg/$PKG_SUBDIR/.git" ]; then
+ git submodule sync "pkg/$PKG_SUBDIR"
+ git submodule update --init "pkg/$PKG_SUBDIR"
fi