git: 193166dd12bc - main - devel/electron2[2-5]: force directory/file permissions in yarn cache archive

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Tue, 18 Jul 2023 07:57:26 UTC
The branch main has been updated by tagattie:

URL: https://cgit.FreeBSD.org/ports/commit/?id=193166dd12bcaa5e1df13202d794017e7cabc7a6

commit 193166dd12bcaa5e1df13202d794017e7cabc7a6
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2023-07-18 07:54:02 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2023-07-18 07:57:20 +0000

    devel/electron2[2-5]: force directory/file permissions in yarn cache archive
    
    There has been a size/checksum mismatch when creating a yarn cache
    archive for users with umask other than 022. To ensure reproducibility
    of the cache file, force use of 755 and 644 permissions regardless of
    umask value.
    
    Reported by:    Joe Hu <vegertar_at_gmail_dot_com> (private mail)
    MFH:            2023Q3
---
 devel/electron22/Makefile | 2 ++
 devel/electron23/Makefile | 2 ++
 devel/electron24/Makefile | 2 ++
 devel/electron25/Makefile | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/devel/electron22/Makefile b/devel/electron22/Makefile
index f50df653d65e..112363552c65 100644
--- a/devel/electron22/Makefile
+++ b/devel/electron22/Makefile
@@ -282,6 +282,8 @@ pre-fetch:
 		${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
 			-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
 			-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
+			-e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \
+			-e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \
 			-e 's:flags=.*:flags=none:' \
 			-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
 		${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \
diff --git a/devel/electron23/Makefile b/devel/electron23/Makefile
index 2953e03844c9..6ca7fefa3221 100644
--- a/devel/electron23/Makefile
+++ b/devel/electron23/Makefile
@@ -283,6 +283,8 @@ pre-fetch:
 		${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
 			-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
 			-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
+			-e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \
+			-e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \
 			-e 's:flags=.*:flags=none:' \
 			-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
 		${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \
diff --git a/devel/electron24/Makefile b/devel/electron24/Makefile
index 188650594abf..23b7bcacf836 100644
--- a/devel/electron24/Makefile
+++ b/devel/electron24/Makefile
@@ -282,6 +282,8 @@ pre-fetch:
 		${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
 			-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
 			-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
+			-e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \
+			-e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \
 			-e 's:flags=.*:flags=none:' \
 			-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
 		${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \
diff --git a/devel/electron25/Makefile b/devel/electron25/Makefile
index 735a15b82c10..bdcd90640843 100644
--- a/devel/electron25/Makefile
+++ b/devel/electron25/Makefile
@@ -293,6 +293,8 @@ pre-fetch:
 		${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
 			-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
 			-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
+			-e 's:mode=\([0-9]\)7[0-9][0-9]:mode=\1755:' \
+			-e 's:mode=\([0-9]\)6[0-9][0-9]:mode=\1644:' \
 			-e 's:flags=.*:flags=none:' \
 			-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
 		${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \