Skip to content

Commit

Permalink
devel/electron2[2-5]: force directory/file permissions in yarn cache …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Hiroki Tagato authored and Hiroki Tagato committed Jul 18, 2023
1 parent 4050f55 commit 193166d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions devel/electron22/Makefile
Expand Up @@ -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} \
Expand Down
2 changes: 2 additions & 0 deletions devel/electron23/Makefile
Expand Up @@ -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} \
Expand Down
2 changes: 2 additions & 0 deletions devel/electron24/Makefile
Expand Up @@ -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} \
Expand Down
2 changes: 2 additions & 0 deletions devel/electron25/Makefile
Expand Up @@ -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} \
Expand Down

0 comments on commit 193166d

Please sign in to comment.