git: f3216dad74a0 - main - Mk/Uses/npm.mk: Always use X' for denoting BLOB data type
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Aug 2026 04:45:46 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f3216dad74a016485bfcf09c6acbc830129cdf86
commit f3216dad74a016485bfcf09c6acbc830129cdf86
Author: Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-08-13 04:43:54 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-08-13 04:45:37 +0000
Mk/Uses/npm.mk: Always use X' for denoting BLOB data type
SQLite's .dump always uses X' (capital X) for BLOB. So it's better we
use X' in the code for securing reproducibility of node modules
tarball created by pnpm.
Also, conversion from x' to X' in output dump file in case x' is
accidentally mixed in.
Reported by: pkg-fallout
---
Mk/Uses/npm.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Mk/Uses/npm.mk b/Mk/Uses/npm.mk
index 266a0eac8452..3e998efa5fbe 100644
--- a/Mk/Uses/npm.mk
+++ b/Mk/Uses/npm.mk
@@ -383,14 +383,14 @@ npm-archive-node-modules:
while [ $${i} -le $${total_files} ]; do \
real_key=`${CAT} $${tmpdir}/$${i}.key`; \
{ \
- ${PRINTF} "INSERT INTO package_index (key, data) VALUES ('%s', x'" "$${real_key}"; \
+ ${PRINTF} "INSERT INTO package_index (key, data) VALUES ('%s', X'" "$${real_key}"; \
hexdump -v -e '/1 "%02x"' $${tmpdir}/$${i}.normalized.msgpack; \
${PRINTF} "');\n"; \
} | sqlite3 $${output_db}; \
i=$$((i + 1)); \
done; \
sqlite3 $${output_db} "REINDEX; VACUUM;"; \
- sqlite3 $${output_db} ".dump" > $${output_db_dump}; \
+ sqlite3 $${output_db} ".dump" | ${SED} -e "s/x'/X'/" > $${output_db_dump}; \
${RM} -r $${input_db} $${storedir}/tmp; \
fi
. else