ext/src/mcde is a submodule of its own repository
The fork's history is split out (git subtree split -P ext/src/mcde, 404 commits) and pushed to git.kropa.tech/hiddenbox/mcde. This tree records the commit 3d79fc80ca01e5afc94ea87db3c5a5f16c2284b5, whose tree is byte for byte the tree of the last in-tree commitc723c7f277for this path. tools/mcde-dist.sh archives the submodule now: `git archive REV:ext/src/mcde' in the parent writes an empty directory, because git does not descend into a gitlink. The key beside the archive is hashed with sha256 when sha256sum is missing -- NetBSD has no sha256sum, so the key was empty and the "archive unchanged" comparison meaningless (measured 2026-11-22). ext/AGENTS.md: a change to MCDE is a commit in the submodule, then a gitlink bump here. Measured: git submodule status -> 3d79fc80...; git rev-parse c723c7f277:ext/src/mcde, mcde-split^{tree} and HEAD:ext/src/mcde are all7469d5a621.
This commit is contained in:
1 parent
fdc4565421
commit
7e20c712e8
4 files changed
+45
-13
No files matched your search
@@ -38,3 +38,6 @@
|
||||
[submodule "ext/src/mikronix"]
|
||||
path = ext/src/mikronix
|
||||
url = https://git.kropa.tech/hiddenbox/mikronix
|
||||
[submodule "ext/src/mcde"]
|
||||
path = ext/src/mcde
|
||||
url = https://git.kropa.tech/hiddenbox/mcde
|
||||
+11
-2
@@ -10,7 +10,13 @@ its recipe in `pkgsrc-<part>/` and becomes `<category>/<name>-<part>`
|
||||
|
||||
## What is in it
|
||||
|
||||
- `src/mcde/` -- MCDE, the fork of CDE 2.5.3 (`src/mcde/AGENTS.md`).
|
||||
- `src/mcde/` -- MCDE, the fork of CDE 2.5.3 (`src/mcde/AGENTS.md`). It is a
|
||||
**submodule** of `git.kropa.tech/hiddenbox/mcde` since 2026-11-22; the
|
||||
parent records the commit, the history is split out of this repository
|
||||
(`git subtree split -P ext/src/mcde`, 404 commits, head 3d79fc80) and
|
||||
complete in the submodule. A change to MCDE is a commit in that repository
|
||||
and then a gitlink bump here -- `git -C ext/src/mcde commit`, `git add
|
||||
ext/src/mcde`.
|
||||
- `src/afpfs-ng/` -- AFP client, with recipe `pkgsrc/`.
|
||||
- `src/glibc/` -- glibc 2.44 for Makronix/Linux; no `pkgsrc/`: its recipe is
|
||||
`mx/`, a NetBSD-style Makefile run by the Makronix/Linux build (LFS-style,
|
||||
@@ -19,7 +25,10 @@ its recipe in `pkgsrc-<part>/` and becomes `<category>/<name>-<part>`
|
||||
## What may be changed
|
||||
|
||||
- The forks, as ordinary commits. After changing one, `tools/ext-dist.sh` (or
|
||||
`tools/mcde-dist.sh`) renews the distfile and the recipe's `distinfo`.
|
||||
`tools/mcde-dist.sh`) renews the distfile and the recipe's `distinfo`. For
|
||||
MCDE the archive is made inside the submodule from the commit the parent's
|
||||
gitlink names -- `git archive` of a gitlink in the parent would write an
|
||||
empty directory.
|
||||
- An update to a newer upstream is a merge onto the fork with `IMPORT`
|
||||
renewed, never a silent overwrite.
|
||||
|
||||
|
||||
Submodule
+1
Submodule ext/src/mcde added at 3d79fc80ca.
+30
-11
@@ -5,8 +5,9 @@
|
||||
#
|
||||
# usage: tools/mcde-dist.sh [-r REV]
|
||||
#
|
||||
# MCDE is a fork kept in this repository (ext/src/mcde, ext/AGENTS.md); pkgsrc
|
||||
# builds it from an archive like any other package. The archive is made with
|
||||
# MCDE is a fork of its own now (ext/src/mcde is the submodule
|
||||
# git.kropa.tech/hiddenbox/mcde, ext/AGENTS.md); pkgsrc builds it from an
|
||||
# archive like any other package. The archive is made with
|
||||
# `git archive' from a commit (default HEAD), so the same commit always gives
|
||||
# the same bytes and the checksums in distinfo stay valid: uncommitted edits are
|
||||
# not in it on purpose. ext/src/mcde/pkgsrc (the recipe) is left out.
|
||||
@@ -87,26 +88,44 @@ fi
|
||||
|
||||
mkdir -p "$DISTDIR"
|
||||
OUT=$DISTDIR/$NAME.tar.gz
|
||||
# MCDE is a submodule since 2026-11-22: the source revision is the commit the
|
||||
# parent records for the gitlink, and the archive is made inside the submodule.
|
||||
# `git archive REV:ext/src/mcde' in the parent would write an empty directory --
|
||||
# git does not descend into a gitlink -- so REV names the parent and SRCREV the
|
||||
# submodule commit.
|
||||
SUB=$TOP/ext/src/mcde
|
||||
SRCREV=$(git -C "$TOP" rev-parse "$REV:ext/src/mcde") || {
|
||||
echo "mcde-dist: $REV has no ext/src/mcde gitlink" >&2; exit 1; }
|
||||
# The time of every entry: the last commit that changed the source (not the
|
||||
# recipe). Given a tree, git archive would use the current time, and every run
|
||||
# gave other bytes (measured 2026-11-09); a commit of distinfo alone must not
|
||||
# change the archive either. Needs git 2.42 or later (--mtime).
|
||||
MTIME=$(git -C "$TOP" log -1 --format=%ct "$REV" -- ext/src/mcde \
|
||||
':(exclude)ext/src/mcde/pkgsrc' ':(exclude)ext/src/mcde/pkgsrc-*')
|
||||
MTIME=$(git -C "$SUB" log -1 --format=%ct "$SRCREV" -- . \
|
||||
':(exclude)pkgsrc' ':(exclude)pkgsrc-*')
|
||||
# The archive is made again only when what goes into it changed: the source
|
||||
# trees (git ls-tree, the recipes left out, as in the archive) and the time.
|
||||
# Every make userland made it anew, 16 s for an unchanged tree (measured
|
||||
# 2026-11-17). The key is kept beside the archive.
|
||||
key=$( { echo "$MTIME"; git -C "$TOP" ls-tree "$REV:ext/src/mcde" |
|
||||
grep -v ' pkgsrc'; } | sha256sum | cut -d' ' -f1)
|
||||
# 2026-11-17). The key is kept beside the archive. NetBSD has sha256, not
|
||||
# sha256sum; with the wrong name the key was empty and the comparison
|
||||
# meaningless (measured 2026-11-22), so the tool is asked for by name.
|
||||
hash_of()
|
||||
{
|
||||
if command -v sha256sum > /dev/null 2>&1; then
|
||||
sha256sum | cut -d' ' -f1
|
||||
else
|
||||
sha256 | sed 's/.*) = //'
|
||||
fi
|
||||
}
|
||||
key=$( { echo "$MTIME"; git -C "$SUB" ls-tree "$SRCREV" |
|
||||
grep -v ' pkgsrc'; } | hash_of)
|
||||
if [ -s "$OUT" ] && [ "$(cat "$OUT.key" 2>/dev/null)" = "$key" ]; then
|
||||
echo "mcde-dist: archive unchanged ($REV $(git -C "$TOP" rev-parse --short "$REV"))"
|
||||
echo "mcde-dist: archive unchanged ($REV $(git -C "$TOP" rev-parse --short "$REV"), mcde $(git -C "$SUB" rev-parse --short "$SRCREV"))"
|
||||
else
|
||||
# gzip -n: no name and no time stamp in the header, so the bytes do not
|
||||
# change. -6, not -9: 6.0 s instead of 15.7 s for 0.9 % more bytes
|
||||
# (67069914 against 66472043, measured 2026-11-17).
|
||||
git -C "$TOP" archive --format=tar --mtime="@$MTIME" --prefix="$NAME/" \
|
||||
"$REV:ext/src/mcde" ':(exclude)pkgsrc' ':(exclude)pkgsrc-*' > "$OUT.tar.tmp"
|
||||
git -C "$SUB" archive --format=tar --mtime="@$MTIME" --prefix="$NAME/" \
|
||||
"$SRCREV" ':(exclude)pkgsrc' ':(exclude)pkgsrc-*' > "$OUT.tar.tmp"
|
||||
gzip -n -6 < "$OUT.tar.tmp" > "$OUT.tmp"
|
||||
rm -f "$OUT.tar.tmp"
|
||||
mv "$OUT.tmp" "$OUT"
|
||||
@@ -139,4 +158,4 @@ for r in "$TOP"/ext/src/mcde/pkgsrc-*; do
|
||||
[ -f "$r/Makefile" ] && cp "$RECIPE/distinfo" "$r/distinfo"
|
||||
done
|
||||
|
||||
echo "mcde-dist: $OUT, $size bytes, from $REV ($(git -C "$TOP" rev-parse --short "$REV"))"
|
||||
echo "mcde-dist: $OUT, $size bytes, from $REV ($(git -C "$TOP" rev-parse --short "$REV"), mcde $(git -C "$SUB" rev-parse --short "$SRCREV"))"
|
||||
Reference in new issue
Block a user