Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib Initial pass to be unaffected by build umask on buil...
details: https://anonhg.NetBSD.org/src/rev/a44a647d48ce
branches: trunk
changeset: 821598:a44a647d48ce
user: christos <christos%NetBSD.org@localhost>
date: Fri Feb 10 16:43:59 2017 +0000
description:
Initial pass to be unaffected by build umask on build artifacts
1. ${MKDIR} -> ${MKDIR} ${MKDIRPERM}
2. ${CP} -> ${INSTALL} ${COPY} -m <perm>
diffstat:
distrib/amd64/cdroms/Makefile.cdrom | 10 ++++----
distrib/amd64/uefi-installimage/Makefile.bootimage | 23 +++++++++---------
distrib/amd64/uefi-installimage/Makefile.installimage | 4 +-
distrib/common/Makefile.bootcd | 23 +++++++++---------
distrib/common/bootimage/Makefile.bootimage | 19 +++++++--------
distrib/common/bootimage/Makefile.installimage | 4 +-
distrib/common/bootimage/Makefile.liveimage | 4 +-
distrib/i386/cdroms/Makefile.cdrom | 6 ++--
distrib/ofppc/cdroms/installcd/Makefile | 6 ++--
distrib/sparc64/cdroms/installcd/Makefile | 4 +-
distrib/vax/cdroms/installcd/Makefile | 8 +++---
11 files changed, 54 insertions(+), 57 deletions(-)
diffs (truncated from 424 to 300 lines):
diff -r 4c3408f8d939 -r a44a647d48ce distrib/amd64/cdroms/Makefile.cdrom
--- a/distrib/amd64/cdroms/Makefile.cdrom Fri Feb 10 13:48:06 2017 +0000
+++ b/distrib/amd64/cdroms/Makefile.cdrom Fri Feb 10 16:43:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.21 2017/01/24 11:27:55 nonaka Exp $
+# $NetBSD: Makefile.cdrom,v 1.22 2017/02/10 16:43:59 christos Exp $
.include <bsd.own.mk>
.include <bsd.endian.mk>
@@ -22,8 +22,8 @@
${EFIBOOTIMG}: ${DESTDIR}/usr/mdec/bootx64.efi ${DESTDIR}/usr/mdec/bootia32.efi
${RM} -f ${EFIBOOTIMG}
${RM} -rf efiboot/EFI/boot
- ${MKDIR} efiboot/EFI/boot
- ${CP} ${.ALLSRC} efiboot/EFI/boot/
+ ${MKDIR} ${MKDIRPERM} efiboot/EFI/boot
+ ${INSTALL} ${COPY} -m 0444 ${.ALLSRC} efiboot/EFI/boot/
${TOOL_MAKEFS} -M 1m -m 1m -B ${TARGET_ENDIANNESS} \
-t msdos -o F=12,c=1 ${EFIBOOTIMG} efiboot
@@ -33,6 +33,6 @@
${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys
${INSTALL} ${COPY} ${.CURDIR}/../etc.rc cdrom/etc/rc
${INSTALL} ${COPY} -m 0555 ${.CURDIR}/../install.sh cdrom/install.sh
- ${MKDIR} cdrom/mnt2 cdrom/targetroot
+ ${MKDIR} ${MKDIRPERM} cdrom/mnt2 cdrom/targetroot
${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom/usr/share/sysinst/catalog/
- ${MKDIR} cdrom/var
+ ${MKDIR} ${MKDIRPERM} cdrom/var
diff -r 4c3408f8d939 -r a44a647d48ce distrib/amd64/uefi-installimage/Makefile.bootimage
--- a/distrib/amd64/uefi-installimage/Makefile.bootimage Fri Feb 10 13:48:06 2017 +0000
+++ b/distrib/amd64/uefi-installimage/Makefile.bootimage Fri Feb 10 16:43:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootimage,v 1.1 2017/01/24 11:16:50 nonaka Exp $
+# $NetBSD: Makefile.bootimage,v 1.2 2017/02/10 16:43:59 christos Exp $
#
# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved.
#
@@ -149,7 +149,6 @@
# should be defined elsewhere?
CAT?= cat
CHMOD?= chmod
-CP?= cp
DD?= dd
MKDIR?= mkdir -p
RM?= rm
@@ -254,7 +253,7 @@
echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \
false; \
fi;
- @${MKDIR} ${WORKDIR}
+ @${MKDIR} ${MKDIRPERM} ${WORKDIR}
.for set in ${IMG_SETS}
@if [ ! -f ${SETS_DIR}/${set}.tgz ]; then \
echo "Missing ${SETS_DIR}/${set}.tgz, aborting"; \
@@ -265,7 +264,7 @@
.endfor
.if defined(SECONDARY_BOOT)
@echo Copying secondary boot...
- ${CP} -f ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
+ ${INSTALL} ${COPY} -m 0444 ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
.endif
@echo Preparing /etc/fstab ...
.if ${USE_GPT} != "no"
@@ -290,11 +289,11 @@
< ${FSTAB_IN} > ${WORKFSTAB}
.endif
.endif # USE_GPT != "no"
- ${CP} ${WORKFSTAB} ${WORKDIR}/etc/fstab
+ ${INSTALL} ${COPY} -m 0644 ${WORKFSTAB} ${WORKDIR}/etc/fstab
@echo Setting rc_configured=YES in /etc/rc.conf ...
${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/" \
< ${WORKDIR}/etc/rc.conf > ${WORKRCCONF}
- ${CP} ${WORKRCCONF} ${WORKDIR}/etc/rc.conf
+ ${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf
.if defined(IMGDIR_EXTRA)
@echo Copying extra dirs...
.for _SRCDIR _TARGET in ${IMGDIR_EXTRA}
@@ -302,7 +301,7 @@
echo "${_SRCDIR} is not directory, aborting"; \
false; \
fi
- ${MKDIR} ${WORKDIR}/${_TARGET}
+ ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET}
(cd ${_SRCDIR} ; \
${TOOL_PAX} -rw -pe -v \
${IMGDIR_EXCLUDE} \
@@ -317,8 +316,8 @@
false; \
fi
@if [ -f ${_SRC} ]; then \
- echo ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \
- ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \
+ echo ${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
+ ${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
fi
.endfor
.endif
@@ -406,10 +405,10 @@
${IMGBASE}.img: ${TARGETFS}
@echo create EFI system partition...
- @${MKDIR} ${EFIWORKDIR}/EFI/boot
+ @${MKDIR} ${MKDIRPERM} ${EFIWORKDIR}/EFI/boot
.if !empty(EFIBOOT)
.for f in ${EFIBOOT}
- ${CP} -f ${f} ${EFIWORKDIR}/EFI/boot/`basename ${f}`
+ ${INSTALL} ${COPY} -m 0644 -f ${f} ${EFIWORKDIR}/EFI/boot/`basename ${f}`
.endfor
.endif
${RM} -f ${WORKEFI}
@@ -455,7 +454,7 @@
${DD} if=${WORKMBR} count=${LABELSECTORS} | \
${CAT} - ${TARGETFS} > ${WORKIMG}
.else # USE_MBR == "no"
- ${CP} ${TARGETFS} ${WORKIMG}
+ ${INSTALL} ${COPY} -m 0644 ${TARGETFS} ${WORKIMG}
.endif # USE_MBR != "no"
.endif # USE_GPT != "no"
.if ${OMIT_SWAPIMG} == "no"
diff -r 4c3408f8d939 -r a44a647d48ce distrib/amd64/uefi-installimage/Makefile.installimage
--- a/distrib/amd64/uefi-installimage/Makefile.installimage Fri Feb 10 13:48:06 2017 +0000
+++ b/distrib/amd64/uefi-installimage/Makefile.installimage Fri Feb 10 16:43:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.installimage,v 1.1 2017/01/24 11:16:50 nonaka Exp $
+# $NetBSD: Makefile.installimage,v 1.2 2017/02/10 16:43:59 christos Exp $
#
# Common Makefile to create a bootable installation image for USB flash etc.
#
@@ -62,7 +62,7 @@
MKDIR?= mkdir -p
install_image: check_INSTIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
- ${MKDIR} ${INSTIMG_RELEASEDIR}
+ ${MKDIR} ${MKDIRPERM} ${INSTIMG_RELEASEDIR}
${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
# note ${MAKESUM} will be calculated in src/etc/Makefile
diff -r 4c3408f8d939 -r a44a647d48ce distrib/common/Makefile.bootcd
--- a/distrib/common/Makefile.bootcd Fri Feb 10 13:48:06 2017 +0000
+++ b/distrib/common/Makefile.bootcd Fri Feb 10 16:43:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootcd,v 1.35 2016/06/19 08:44:34 isaki Exp $
+# $NetBSD: Makefile.bootcd,v 1.36 2017/02/10 16:43:59 christos Exp $
#
# Makefile snipped to create a CD/DVD ISO
#
@@ -87,7 +87,6 @@
.endif
# Stuff that should come from elsewhere - XXX where? - HF
-CP?= cp
RM?= rm
MKDIR?= mkdir -p
CHMOD?= chmod
@@ -143,16 +142,16 @@
.endif
prepare:
- ${MKDIR} "${CUROBJDIR}/cdrom"
+ ${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom"
.if defined(CDKERNELS)
.for kernel target in ${CDKERNELS}
- ${CP} ${_INSTKERNELNOBJDIR}/${kernel} cdrom/${target}
+ ${INSTALL} ${COPY} -m 0644 ${_INSTKERNELNOBJDIR}/${kernel} cdrom/${target}
.endfor
.if exists(${DESTDIR}/usr/mdec/bootxx_cd9660)
${RM} -f cdrom/${BOOT2}
- ${CP} ${DESTDIR}/usr/mdec/${BOOT2} cdrom/${BOOT2}
+ ${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/${BOOT2} cdrom/${BOOT2}
${RM} -f bootxx.${MACHINE}
- ${CP} ${DESTDIR}/usr/mdec/bootxx_cd9660 bootxx.${MACHINE}
+ ${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/bootxx_cd9660 bootxx.${MACHINE}
${CHMOD} +w bootxx.${MACHINE}
.if defined(CDBOOTOPTIONS)
${TOOL_INSTALLBOOT} -m${MACHINE} -e ${CDBOOTOPTIONS} bootxx.${MACHINE}
@@ -178,7 +177,7 @@
echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \
exit 1; \
fi; \
- ${MKDIR} "${CUROBJDIR}/cdrom/${MACHINE}"; \
+ ${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom/${MACHINE}"; \
release_destdir="${CUROBJDIR}/cdrom/${MACHINE}"; \
cd ${RELEASEDIR}/${RELEASEMACHINEDIR}; \
echo Copying $$(pwd) to $$release_destdir ...; \
@@ -193,7 +192,7 @@
echo "Missing ${RELEASEDIR}/source, aborting"; \
exit 1; \
fi; \
- ${MKDIR} "${CUROBJDIR}/cdrom/source"; \
+ ${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom/source"; \
release_destdir="${CUROBJDIR}/cdrom/source"; \
cd ${RELEASEDIR}/source; \
echo Copying $$(pwd) to $$release_destdir ...; \
@@ -230,7 +229,7 @@
release_destdir="${CUROBJDIR}/cdrom"; \
if [ -f $${cde} ]; then \
echo Copying $${cde} to $$release_destdir ...; \
- ${CP} -f $${cde} $${release_destdir}; \
+ ${INSTALL} ${COPY} -m 0644 -f $${cde} $${release_destdir}; \
elif [ -d $${cde} ]; then \
cd $${cde}; \
echo Copying $$(pwd) to $$release_destdir ...; \
@@ -245,7 +244,7 @@
done; \
fi
.if !empty(CD_SETS)
- ${MKDIR} "${CUROBJDIR}/cdrom/etc/mtree"
+ ${MKDIR} ${MKDIRPERM} "${CUROBJDIR}/cdrom/etc/mtree"
.for set in ${CD_SETS}
if [ -f ${CUROBJDIR:Q}/cdrom/etc/mtree/set.${set} ]; then \
${CHMOD} +w ${CUROBJDIR:Q}/cdrom/etc/mtree/set.${set}; \
@@ -289,7 +288,7 @@
.if ${CDRELEASE} == false
release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post
- ${MKDIR} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
+ ${MKDIR} ${MKDIRPERM} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
${RELEASE_INSTALL} ${CDIMAGE} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
iso_image:
@@ -297,7 +296,7 @@
release:
iso_image: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post
- ${MKDIR} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
+ ${MKDIR} ${MKDIRPERM} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
${RELEASE_INSTALL} ${CDIMAGE} ${RELEASEDIR}/${CDROMS_RELEASEDIR}
.endif
diff -r 4c3408f8d939 -r a44a647d48ce distrib/common/bootimage/Makefile.bootimage
--- a/distrib/common/bootimage/Makefile.bootimage Fri Feb 10 13:48:06 2017 +0000
+++ b/distrib/common/bootimage/Makefile.bootimage Fri Feb 10 16:43:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootimage,v 1.13 2017/01/24 18:01:07 christos Exp $
+# $NetBSD: Makefile.bootimage,v 1.14 2017/02/10 16:43:59 christos Exp $
#
# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved.
#
@@ -140,7 +140,6 @@
# should be defined elsewhere?
CAT?= cat
CHMOD?= chmod
-CP?= cp
DD?= dd
MKDIR?= mkdir -p
RM?= rm
@@ -229,7 +228,7 @@
echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \
false; \
fi;
- @${MKDIR} ${WORKDIR}
+ @${MKDIR} ${MKDIRPERM} ${WORKDIR}
.for set in ${IMG_SETS}
@if [ ! -f ${SETS_DIR}/${set}.tgz ]; then \
echo "Missing ${SETS_DIR}/${set}.tgz, aborting"; \
@@ -240,15 +239,15 @@
.endfor
.if defined(SECONDARY_BOOT)
@echo Copying secondary boot...
- ${CP} -f ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
+ ${INSTALL} ${COPY} -m 0644 -f ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR}
.endif
@echo Preparing /etc/fstab ...
${TOOL_SED} "s/@@BOOTDISK@@/${BOOTDISK}/" < ${FSTAB_IN} > ${WORKFSTAB}
- ${CP} ${WORKFSTAB} ${WORKDIR}/etc/fstab
+ ${INSTALL} ${COPY} -m 0644 ${WORKFSTAB} ${WORKDIR}/etc/fstab
@echo Setting rc_configured=YES in /etc/rc.conf ...
${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/" \
< ${WORKDIR}/etc/rc.conf > ${WORKRCCONF}
- ${CP} ${WORKRCCONF} ${WORKDIR}/etc/rc.conf
+ ${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf
.if defined(IMGDIR_EXTRA)
@echo Copying extra dirs...
.for _SRCDIR _TARGET in ${IMGDIR_EXTRA}
@@ -256,7 +255,7 @@
echo "${_SRCDIR} is not directory, aborting"; \
false; \
fi
- ${MKDIR} ${WORKDIR}/${_TARGET}
+ ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET}
(cd ${_SRCDIR} ; \
${TOOL_PAX} -rw -pe -v \
${IMGDIR_EXCLUDE} \
@@ -271,8 +270,8 @@
false; \
fi
@if [ -f ${_SRC} ]; then \
- echo ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \
- ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \
+ echo ${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
+ ${INSTALL} ${COPY} -m 0644 ${_SRC} ${WORKDIR}/${_TARGET}; \
fi
.endfor
.endif
@@ -371,7 +370,7 @@
${DD} if=${WORKMBR} count=${LABELSECTORS} | \
${CAT} - ${TARGETFS} > ${WORKIMG}
.else
- ${CP} ${TARGETFS} ${WORKIMG}
Home |
Main Index |
Thread Index |
Old Index