From 76f3203d1d6f847bb280ec01b14783ddd81ed49b Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sun, 2 Jul 2017 09:32:52 +0000 Subject: [PATCH] No image suffix --- .gitignore | 1 - README.md | 10 ---------- build.sh | 12 ------------ export-image/03-set-partuuid/00-run.sh | 2 +- export-image/04-finalise/01-run.sh | 8 ++++---- export-image/prerun.sh | 2 +- stage1/EXPORT_IMAGE | 1 - stage2/EXPORT_IMAGE | 1 - stage3/EXPORT_IMAGE | 1 - 9 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 stage1/EXPORT_IMAGE delete mode 100644 stage2/EXPORT_IMAGE delete mode 100644 stage3/EXPORT_IMAGE diff --git a/.gitignore b/.gitignore index 1327063..4f9dc29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ deploy/* work/* postrun.sh -SKIP .pc *-pc diff --git a/README.md b/README.md index bfe3ded..f2d6814 100755 --- a/README.md +++ b/README.md @@ -25,8 +25,6 @@ file is `[:]`. Stage Anatomy ------------- -### Raspbian Stage Overview - The build of Raspbian is divided up into several stages for logical clarity and modularity. This causes some initial complexity, but it simplifies maintenance and allows for more easy customization. @@ -65,11 +63,3 @@ maintenance and allows for more easy customization. - **Stage 3** - secure system. This stage configures SSH do disallow root login, adds iptables rules, etc. - -### Stage specification - -If you wish to build up to a specified stage (such as building up to stage 2 -for a lite system), place an empty file named `SKIP` in each of the `./stage` -directories you wish not to include. - -Then remove the `EXPORT*` files from `./stage2` (if building a minimal system). diff --git a/build.sh b/build.sh index 244960f..2f12208 100755 --- a/build.sh +++ b/build.sh @@ -137,9 +137,6 @@ run_stage() { unmount ${WORK_DIR}/${STAGE} STAGE_WORK_DIR=${WORK_DIR}/${STAGE} ROOTFS_DIR=${STAGE_WORK_DIR}/rootfs - if [ -f ${STAGE_DIR}/EXPORT_IMAGE ]; then - EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}" - fi if [ ! -f SKIP ]; then if [ "${CLEAN}" = "1" ]; then if [ -d ${ROOTFS_DIR} ]; then @@ -216,9 +213,6 @@ export PREV_STAGE export PREV_STAGE_DIR export ROOTFS_DIR export PREV_ROOTFS_DIR -export IMG_SUFFIX -export EXPORT_DIR -export EXPORT_ROOTFS_DIR export QUILT_PATCHES export QUILT_NO_DIFF_INDEX=1 @@ -239,12 +233,6 @@ for STAGE_DIR in ${BASE_DIR}/stage*; do done CLEAN=1 -for EXPORT_DIR in ${EXPORT_DIRS}; do - STAGE_DIR=${BASE_DIR}/export-image - source "${EXPORT_DIR}/EXPORT_IMAGE" - EXPORT_ROOTFS_DIR=${WORK_DIR}/$(basename ${EXPORT_DIR})/rootfs - run_stage -done if [ -x postrun.sh ]; then log "Begin postrun.sh" diff --git a/export-image/03-set-partuuid/00-run.sh b/export-image/03-set-partuuid/00-run.sh index f19884e..6240b75 100755 --- a/export-image/03-set-partuuid/00-run.sh +++ b/export-image/03-set-partuuid/00-run.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img" IMGID="$(fdisk -l ${IMG_FILE} | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')" diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index ee747b3..745f63b 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img" on_chroot << EOF /etc/init.d/fake-hwclock stop @@ -52,9 +52,9 @@ unmount_image ${IMG_FILE} mkdir -p ${DEPLOY_DIR} -rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip +rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip -echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip ${IMG_FILE} +echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip ${IMG_FILE} pushd ${STAGE_WORK_DIR} > /dev/null -zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip $(basename ${IMG_FILE}) +zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip $(basename ${IMG_FILE}) popd > /dev/null diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 34a6d78..ca77cf3 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img" unmount_image ${IMG_FILE} diff --git a/stage1/EXPORT_IMAGE b/stage1/EXPORT_IMAGE deleted file mode 100644 index f52c803..0000000 --- a/stage1/EXPORT_IMAGE +++ /dev/null @@ -1 +0,0 @@ -IMG_SUFFIX="-minimal" diff --git a/stage2/EXPORT_IMAGE b/stage2/EXPORT_IMAGE deleted file mode 100644 index 8ef6ebe..0000000 --- a/stage2/EXPORT_IMAGE +++ /dev/null @@ -1 +0,0 @@ -IMG_SUFFIX="-lite" diff --git a/stage3/EXPORT_IMAGE b/stage3/EXPORT_IMAGE deleted file mode 100644 index 3e1cd4d..0000000 --- a/stage3/EXPORT_IMAGE +++ /dev/null @@ -1 +0,0 @@ -IMG_SUFFIX="-secure"