mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
Merge pull request #33106 from DaanDeMeyer/submodule
mkosi: Replace submodules with our own thing
This commit is contained in:
commit
17740f28a8
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
|
@ -17,8 +17,3 @@ updates:
|
|||
schedule:
|
||||
interval: "monthly"
|
||||
open-pull-requests-limit: 2
|
||||
- package-ecosystem: "gitsubmodule"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 2
|
||||
|
|
20
.gitmodules
vendored
20
.gitmodules
vendored
|
@ -1,20 +0,0 @@
|
|||
[submodule "pkg/fedora"]
|
||||
path = pkg/fedora
|
||||
url = https://src.fedoraproject.org/rpms/systemd.git
|
||||
branch = rawhide
|
||||
[submodule "pkg/opensuse"]
|
||||
path = pkg/opensuse
|
||||
url = https://code.opensuse.org/package/systemd.git
|
||||
branch = master
|
||||
[submodule "pkg/debian"]
|
||||
path = pkg/debian
|
||||
url = https://salsa.debian.org/systemd-team/systemd.git
|
||||
branch = debian/master
|
||||
[submodule "pkg/centos"]
|
||||
path = pkg/centos
|
||||
url = https://git.centos.org/rpms/systemd.git
|
||||
branch = c9s-sig-hyperscale
|
||||
[submodule "pkg/arch"]
|
||||
path = pkg/arch
|
||||
url = https://gitlab.archlinux.org/archlinux/packaging/packages/systemd.git
|
||||
branch = main
|
|
@ -22,15 +22,6 @@ If adding a new source file, consider adding a matching test executable.
|
|||
For features at a higher level, tests in `src/test/` are very strongly recommended.
|
||||
If that is not possible, integration tests in `test/` are encouraged.
|
||||
|
||||
```shell
|
||||
$ git config submodule.recurse true
|
||||
$ git config fetch.recurseSubmodules on-demand
|
||||
$ git config push.recurseSubmodules no
|
||||
$ cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||
$ cp tools/git-submodule-update-hook.sh .git/hooks/post-rewrite
|
||||
$ cp tools/git-submodule-update-hook.sh .git/hooks/post-checkout
|
||||
```
|
||||
|
||||
Please always test your work before submitting a PR.
|
||||
For many of the components of systemd testing is straightforward as you can simply compile systemd and run the relevant tool from the build directory.
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ Packages=
|
|||
util-linux
|
||||
valgrind
|
||||
which
|
||||
wireguard-tools
|
||||
xfsprogs
|
||||
zsh
|
||||
zstd
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
GIT_URL=https://gitlab.archlinux.org/archlinux/packaging/packages/systemd.git
|
||||
GIT_BRANCH=main
|
||||
GIT_COMMIT=dc6c099e0785753c1c88b4adcbcbfc209a8d12e3
|
||||
|
||||
VolatilePackages=
|
||||
systemd
|
||||
systemd-libs
|
||||
|
@ -53,6 +58,7 @@ Packages=
|
|||
tpm2-tools
|
||||
tpm2-tss
|
||||
vim
|
||||
wireguard-tools
|
||||
|
||||
InitrdPackages=
|
||||
btrfs-progs
|
||||
|
|
|
@ -20,13 +20,15 @@ else
|
|||
TS="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
fi
|
||||
|
||||
# Fix the %install override so debuginfo packages are generated even when --build-in-place is used.
|
||||
# See https://github.com/rpm-software-management/rpm/issues/3042.
|
||||
tee --append /usr/lib/rpm/redhat/macros <<'EOF'
|
||||
if systemd-analyze compare-versions "$(rpm --version | cut -d ' ' -f3)" lt "4.19.91"; then
|
||||
# Fix the %install override so debuginfo packages are generated even when --build-in-place is used.
|
||||
# See https://github.com/rpm-software-management/rpm/issues/3042.
|
||||
tee --append /usr/lib/rpm/redhat/macros <<'EOF'
|
||||
%install %{?_enable_debug_packages:%{debug_package}}\
|
||||
%%install\
|
||||
%{nil}
|
||||
EOF
|
||||
fi
|
||||
|
||||
VERSION="$(cat meson.version)"
|
||||
RELEASE="$(date "+%Y%m%d%H%M%S" --date "@$TS")"
|
||||
|
@ -70,10 +72,12 @@ ANNOBIN="no-active-checks" rpmbuild \
|
|||
--define "__brp_strip_comment_note %{nil}" \
|
||||
--define "__brp_strip_static_archive %{nil}" \
|
||||
--define "__brp_check_rpaths %{nil}" \
|
||||
--undefine __brp_add_determinism \
|
||||
--define "__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$" \
|
||||
--define "__script_requires %{nil}" \
|
||||
--define "_find_debuginfo_dwz_opts %{nil}" \
|
||||
--define "_fortify_level 0" \
|
||||
--define "_fixperms true" \
|
||||
--undefine _lto_cflags \
|
||||
--undefine _package_note_flags \
|
||||
--noclean \
|
||||
|
|
|
@ -65,6 +65,7 @@ Packages=
|
|||
util-linux
|
||||
veritysetup
|
||||
vim-common
|
||||
wireguard-tools
|
||||
|
||||
InitrdPackages=
|
||||
tpm2-tools
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
Distribution=centos
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
GIT_URL=https://git.centos.org/rpms/systemd.git
|
||||
GIT_BRANCH=c9s-sig-hyperscale
|
||||
GIT_COMMIT=8cf2aed0181920611421384f7374720db269d6c7
|
||||
|
||||
Packages=
|
||||
kernel-modules # For squashfs
|
||||
rpmautospec-rpm-macros
|
||||
|
|
|
@ -5,6 +5,11 @@ Distribution=|debian
|
|||
Distribution=|ubuntu
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
GIT_URL=https://salsa.debian.org/systemd-team/systemd.git
|
||||
GIT_BRANCH=debian/master
|
||||
GIT_COMMIT=18201fa98d74172fa1a17242326e3275995cde13
|
||||
|
||||
VolatilePackages=
|
||||
libnss-myhostname
|
||||
libnss-mymachines
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
Distribution=fedora
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
GIT_URL=https://src.fedoraproject.org/rpms/systemd.git
|
||||
GIT_BRANCH=rawhide
|
||||
GIT_COMMIT=74810c5bc4fe7d872e54c253447ffd61bbc8839f
|
||||
|
||||
Packages=
|
||||
btrfs-progs
|
||||
compsize
|
||||
|
|
|
@ -26,12 +26,14 @@ fi
|
|||
# extension.
|
||||
find "pkg/$ID" -name "files.*" -exec sed --in-place 's/\.gz$//' {} \;
|
||||
|
||||
# Fix the %install override so debuginfo packages are generated.
|
||||
tee --append /usr/lib/rpm/suse/macros <<'EOF'
|
||||
if systemd-analyze compare-versions "$(rpm --version | cut -d ' ' -f3)" lt "4.20"; then
|
||||
# Fix the %install override so debuginfo packages are generated.
|
||||
tee --append /usr/lib/rpm/suse/macros <<'EOF'
|
||||
%install %{debug_package}\
|
||||
%%install\
|
||||
%{nil}
|
||||
EOF
|
||||
fi
|
||||
|
||||
VERSION="$(cat meson.version)"
|
||||
RELEASE="$(date "+%Y%m%d%H%M%S" --date "@$TS")"
|
||||
|
@ -74,6 +76,7 @@ build() {
|
|||
--define "__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$" \
|
||||
--define "__script_requires %{nil}" \
|
||||
--define "_find_debuginfo_dwz_opts %{nil}" \
|
||||
--define "_fixperms true" \
|
||||
--noclean \
|
||||
"$@" \
|
||||
"pkg/$ID/systemd.spec"
|
||||
|
|
|
@ -7,6 +7,11 @@ Distribution=opensuse
|
|||
InitrdInclude=initrd/
|
||||
|
||||
[Content]
|
||||
Environment=
|
||||
GIT_URL=https://src.opensuse.org/rpm/systemd
|
||||
GIT_BRANCH=factory
|
||||
GIT_COMMIT=28c9bef337dd47c88adc1d948cedfdc79c788e2955f17a534bd76da6419722dd
|
||||
|
||||
VolatilePackages=
|
||||
systemd
|
||||
systemd-boot
|
||||
|
@ -80,6 +85,7 @@ Packages=
|
|||
user(root)
|
||||
veritysetup
|
||||
vim
|
||||
wireguard-tools
|
||||
xz
|
||||
|
||||
InitrdPackages=
|
||||
|
|
|
@ -8,3 +8,4 @@ Packages=
|
|||
linux-image-generic
|
||||
linux-tools-common
|
||||
linux-tools-virtual
|
||||
wireguard-tools
|
||||
|
|
|
@ -2,8 +2,21 @@
|
|||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
if [ -z "$(ls --almost-all "pkg/$DISTRIBUTION")" ] || [ -f "pkg/$DISTRIBUTION/.git" ]; then
|
||||
PKG_SUBDIR="$(realpath "pkg/$DISTRIBUTION" --relative-to "$PWD")"
|
||||
git submodule sync "$PKG_SUBDIR"
|
||||
git submodule update --init "$PKG_SUBDIR"
|
||||
if ((NO_SYNC)); then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PKG_SUBDIR="$(realpath --canonicalize-missing "pkg/$DISTRIBUTION" --relative-to "$PWD")"
|
||||
|
||||
if [[ -d "$PKG_SUBDIR/.git" ]] && [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" == "$GIT_COMMIT" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ! -e "$PKG_SUBDIR" ]] || [[ -z "$(ls --almost-all "$PKG_SUBDIR")" ]]; then
|
||||
git clone "$GIT_URL" --branch "$GIT_BRANCH" "$PKG_SUBDIR"
|
||||
else
|
||||
git -C "$PKG_SUBDIR" remote set-url origin "$GIT_URL"
|
||||
git -C "$PKG_SUBDIR" fetch origin "$GIT_BRANCH"
|
||||
fi
|
||||
|
||||
git -C "$PKG_SUBDIR" -c advice.detachedHead=false checkout "$GIT_COMMIT"
|
||||
|
|
1
pkg/arch
1
pkg/arch
|
@ -1 +0,0 @@
|
|||
Subproject commit b578e90bb68deaae28300300c57b6a99c916b201
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 61bb5f47014707a927bc033a21e8dbf685c5d2c5
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 824c52fafc3afda4c8ad3892596e8243c3b45c91
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 8fe1f037d21c9d68d96728843f22e5036d769521
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c3399411ac70a440ca9080d6df391eb897bba4e9
|
|
@ -4,12 +4,6 @@ set -eu
|
|||
|
||||
cd "${MESON_SOURCE_ROOT:?}"
|
||||
|
||||
if [ -e .git ]; then
|
||||
git config submodule.recurse true
|
||||
git config fetch.recurseSubmodules on-demand
|
||||
git config push.recurseSubmodules no
|
||||
fi
|
||||
|
||||
ret=2
|
||||
|
||||
if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
|
||||
|
@ -19,16 +13,4 @@ if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
|
|||
ret=0
|
||||
fi
|
||||
|
||||
if [ ! -f .git/hooks/post-rewrite ]; then
|
||||
cp -p tools/git-submodule-update-hook.sh .git/hooks/post-rewrite
|
||||
echo 'Activated post-rewrite hook'
|
||||
ret=0
|
||||
fi
|
||||
|
||||
if [ ! -f .git/hooks/post-checkout ]; then
|
||||
cp -p tools/git-submodule-update-hook.sh .git/hooks/post-checkout
|
||||
echo 'Activated post-checkout hook'
|
||||
ret=0
|
||||
fi
|
||||
|
||||
exit $ret
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
exec git submodule update
|
Loading…
Reference in a new issue