mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit 3323ff541db2c4d8a41cd0c8568629f1d7fd1d0c
parent a73daf7bbbf41b8c378a35a5964b04ff9b600748
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Tue, 13 Jun 2023 11:04:13 +0200

Symbolic access to current commit of submodules, add execline

Diffstat:
Mgenpkg.py | 20++++++++++++++++++++
Mpackages/default.environment | 5+++--
Mpackages/execline | 3++-
Mpackages/skalibs | 1+
Mtemplates/pkg/default.environment | 1+
Mtemplates/pkg/execline | 1+
Mtemplates/pkg/skalibs | 1+
7 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/genpkg.py b/genpkg.py @@ -2,11 +2,30 @@ import hashlib import os.path from pathlib import Path +import subprocess import jinja2 import yaml +class SubmoduleInfo: + def __init__(self): + self._current_commits = None + + @property + def current(self): + if self._current_commits is not None: + return self._current_commits + out = subprocess.check_output(("git", "submodule", "status", "--cached")).decode('utf8') + lines = out.strip('\n').split('\n') + records = [[line[0]] + line[1:].split() for line in lines] + self._current_commits = { + r[2][8:]: r[1] + for r in records if r[2].startswith("sources/") + } + return self._current_commits + + class Main: def __init__(self, out_dir="packages", template_dir="templates"): self.out_dir = Path(out_dir) @@ -18,6 +37,7 @@ class Main: self.env.globals["pkg_sha256"] = self.pkg_sha256 self.env.globals["pkg_install_name"] = self.pkg_install_name self.env.globals["pkg_install_dir"] = self.pkg_install_dir + self.env.globals["submodule"] = SubmoduleInfo() self.package_hashes = {} self.rendering = [] diff --git a/packages/default.environment b/packages/default.environment @@ -1,3 +1,4 @@ #+busybox.676a12450c8cf4d1a6bac35e656eec9732866a40ddc774ed9436e3947eabb4a7 #+gnu-make.2e633e8bbb381ae47cb5211f49debc6559bf7d30159c00dc8ca865f1e0347cef -#+musl-cross-make.ac9b24d1802d03dfc89bdd862a2ea834cbc9b62bf6ef4e7d0615797decc2d778- \ No newline at end of file +#+musl-cross-make.ac9b24d1802d03dfc89bdd862a2ea834cbc9b62bf6ef4e7d0615797decc2d778 +#+execline.cc95ab7b12d8311aebe68a09c6490610599081226b9c016ea4d8cd63eee27de7+ \ No newline at end of file diff --git a/packages/execline b/packages/execline @@ -3,7 +3,8 @@ #+musl-cross-make.ac9b24d1802d03dfc89bdd862a2ea834cbc9b62bf6ef4e7d0615797decc2d778 #+gnu-make.2e633e8bbb381ae47cb5211f49debc6559bf7d30159c00dc8ca865f1e0347cef #+busybox.676a12450c8cf4d1a6bac35e656eec9732866a40ddc774ed9436e3947eabb4a7 -#+skalibs.0e5a4535abe333c25acccc7e98a0e1b86974b1fcd25a8858da2b9e7f97d1056d +#+skalibs.5a056dca9253da7d83492d23ecfe7377655cb8a73cdc36860fa802e82a782413 +#@git:85315b3e709f65781dd221fd3f13d3a989a748d4:execline : ${JOBS:=1} diff --git a/packages/skalibs b/packages/skalibs @@ -3,6 +3,7 @@ #+musl-cross-make.ac9b24d1802d03dfc89bdd862a2ea834cbc9b62bf6ef4e7d0615797decc2d778 #+gnu-make.2e633e8bbb381ae47cb5211f49debc6559bf7d30159c00dc8ca865f1e0347cef #+busybox.676a12450c8cf4d1a6bac35e656eec9732866a40ddc774ed9436e3947eabb4a7 +#@git:c555cd2ba1682f90fb5344d2865713fcd0f3c3e1:skalibs : ${JOBS:=1} diff --git a/templates/pkg/default.environment b/templates/pkg/default.environment @@ -1,3 +1,4 @@ #+{{pkg_install_name("busybox")}} #+{{pkg_install_name("gnu-make")}} #+{{pkg_install_name("musl-cross-make")}} +#+{{pkg_install_name("execline")}} diff --git a/templates/pkg/execline b/templates/pkg/execline @@ -5,6 +5,7 @@ #+{{pkg_install_name("gnu-make")}} #+{{pkg_install_name("busybox")}} #+{{pkg_install_name("skalibs")}} +#@git:{{submodule.current.execline}}:execline : ${JOBS:=1} diff --git a/templates/pkg/skalibs b/templates/pkg/skalibs @@ -4,6 +4,7 @@ #+{{pkg_install_name("musl-cross-make")}} #+{{pkg_install_name("gnu-make")}} #+{{pkg_install_name("busybox")}} +#@git:{{submodule.current.skalibs}}:skalibs : ${JOBS:=1}