mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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.
This commit is contained in:
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
@@ -17,3 +17,8 @@ updates:
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
open-pull-requests-limit: 2
|
||||
- package-ecosystem: "gitsubmodule"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 2
|
||||
|
||||
20
.gitmodules
vendored
Normal file
20
.gitmodules
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
[submodule "pkg/fedora"]
|
||||
path = pkg/fedora
|
||||
url = https://src.fedoraproject.org/rpms/systemd
|
||||
branch = rawhide
|
||||
[submodule "pkg/opensuse"]
|
||||
path = pkg/opensuse
|
||||
url = https://code.opensuse.org/package/systemd
|
||||
branch = master
|
||||
[submodule "pkg/debian"]
|
||||
path = pkg/debian
|
||||
url = https://salsa.debian.org/systemd-team/systemd
|
||||
branch = debian/master
|
||||
[submodule "pkg/centos"]
|
||||
path = pkg/centos
|
||||
url = https://git.centos.org/rpms/systemd
|
||||
branch = c9s-sig-hyperscale
|
||||
[submodule "pkg/arch"]
|
||||
path = pkg/arch
|
||||
url = https://gitlab.archlinux.org/daandemeyer/systemd
|
||||
branch = strip
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,8 +5,6 @@ Distribution=fedora
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
PKG_URL="https://src.fedoraproject.org/rpms/systemd"
|
||||
PKG_BRANCH="rawhide"
|
||||
PKG_SUBDIR="fedora"
|
||||
|
||||
Packages=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
1
pkg/arch
Submodule
1
pkg/arch
Submodule
Submodule pkg/arch added at 733045c8f6
1
pkg/centos
Submodule
1
pkg/centos
Submodule
Submodule pkg/centos added at 3cf45106c8
1
pkg/debian
Submodule
1
pkg/debian
Submodule
Submodule pkg/debian added at 49132a870d
1
pkg/fedora
Submodule
1
pkg/fedora
Submodule
Submodule pkg/fedora added at 2822a03dde
1
pkg/opensuse
Submodule
1
pkg/opensuse
Submodule
Submodule pkg/opensuse added at 37aca188c2
Reference in New Issue
Block a user