summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-09 13:46:21 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:07 +0100
commit2bc0dad3fb1c5ee2a182dc2170c7245d8242ac12 (patch)
tree1e2d0588b8510520f7a54d3d302e55b0bcc63351
parentd71e07c601f3e0cd7beb54ad75b377816f615840 (diff)
downloadvyos-live-build-2bc0dad3fb1c5ee2a182dc2170c7245d8242ac12.tar.gz
vyos-live-build-2bc0dad3fb1c5ee2a182dc2170c7245d8242ac12.zip
Seperating source tarballs into to, one for debian, one for debian-live.
-rwxr-xr-xexamples/cron/images.sh8
-rwxr-xr-xhelpers/source_checksums48
-rwxr-xr-xhelpers/source_debian-live13
-rwxr-xr-xhelpers/source_tar15
4 files changed, 41 insertions, 43 deletions
diff --git a/examples/cron/images.sh b/examples/cron/images.sh
index 8abdf39e3..fe96b0f34 100755
--- a/examples/cron/images.sh
+++ b/examples/cron/images.sh
@@ -170,10 +170,12 @@ do
then
lh config --source true
- lh source 2>&1 | tee debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz.log
+ lh source 2>&1 | tee debian-live-${DISTRIBUTION}-source-${FLAVOUR}.log
- mv source.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz
- mv source.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz.list
+ mv source.debian.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz
+ mv source.debian.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz.list
+ mv source.debian-live.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz
+ mv source.debian-live.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz.list
fi
done
done
diff --git a/helpers/source_checksums b/helpers/source_checksums
index 972b4045c..6fcee76b5 100755
--- a/helpers/source_checksums
+++ b/helpers/source_checksums
@@ -40,23 +40,30 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-for CHECKSUM in ${LH_CHECKSUMS}
+for DIRECTORY in source/debian source/debian-live
do
- Echo_message "Begin creating source ${CHECKSUM}sum.txt..."
-
- # Remove old checksums
- if [ -f source/${CHECKSUM}sum.txt ]
+ if [ ! -d ${DIRECTORY} ]
then
- rm -f source/${CHECKSUM}sum.txt
+ continue
fi
- # Calculating checksums
- cd source
- find . -type f \
- \! -path './md5sum.txt' \
- \! -path './sha1sum.txt' \
- \! -path './sha256sum.txt' \
- -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUM}sum.txt
+ for CHECKSUM in ${LH_CHECKSUMS}
+ do
+ Echo_message "Begin creating source ${CHECKSUM}sum.txt..."
+
+ # Remove old checksums
+ if [ -f ${DIRECTORY}/${CHECKSUM}sum.txt ]
+ then
+ rm -f ${DIRECTORY}/${CHECKSUM}sum.txt
+ fi
+
+ # Calculating checksums
+ cd ${DIRECTORY}
+ find . -type f \
+ \! -path './md5sum.txt' \
+ \! -path './sha1sum.txt' \
+ \! -path './sha256sum.txt' \
+ -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUM}sum.txt
cat > ${CHECKSUM}sum.txt << EOF
This file contains the list of ${CHECKSUM} checksums of all files on this medium.
@@ -67,16 +74,17 @@ or, manually with: '${CHECKSUM}sum -c ${CHECKSUM}sum.txt'.
EOF
- cat ../${CHECKSUM}sum.txt >> ${CHECKSUM}sum.txt
- rm -f ../${CHECKSUM}sum.txt
+ cat ../${CHECKSUM}sum.txt >> ${CHECKSUM}sum.txt
+ rm -f ../${CHECKSUM}sum.txt
+ cd "${OLDPWD}"
+ done
+
+ # File list
+ cd ${DIRECTORY}
+ find . | sed -e 's|^.||g' | grep "^/" | sort > ../../$(echo ${DIRECTORY} | sed -e 's|/|.|').list
cd "${OLDPWD}"
done
-# File list
-cd source
-find . | sed -e 's|^.||g' | grep "^/" | sort > ../source.list
-cd "${OLDPWD}"
-
# Creating stage file
Create_stagefile .stage/source_checksums
diff --git a/helpers/source_debian-live b/helpers/source_debian-live
index 6afcfbfbd..b3626ecd4 100755
--- a/helpers/source_debian-live
+++ b/helpers/source_debian-live
@@ -57,18 +57,5 @@ then
cp -a auto source/debian-live
fi
-# Create tarball
-cd source
-
-SUFFIX="$(date +%Y%m%d.%s)"
-
-tar cf debian-live-config_${SUFFIX}.tar debian-live
-gzip ${GZIP_OPTIONS} debian-live-config_${SUFFIX}.tar
-
-cd "${OLDPWD}"
-
-rm -rf source/debian-live/config
-mv source/debian-live-config_${SUFFIX}.tar.gz source/debian-live
-
# Creating stage file
Create_stagefile .stage/source_debian-live
diff --git a/helpers/source_tar b/helpers/source_tar
index da858c42b..207e3b409 100755
--- a/helpers/source_tar
+++ b/helpers/source_tar
@@ -49,14 +49,15 @@ Check_lockfile .lock
Create_lockfile .lock
# Remove old source
-if [ -f source.tar.gz ]
-then
- rm -f source.tar.gz
-fi
+rm -f source.debian.tar.gz
+rm -f source.debian-live.tar.gz
+
+# Create tarballs
+tar cf source.debian.tar source/debian
+gzip ${GZIP_OPTIONS} source.debian.tar
-# Create tarball
-tar cf source.tar source
-gzip ${GZIP_OPTIONS} source.tar
+tar cf source.debian-live.tar source/debian-live
+gzip ${GZIP_OPTIONS} source.debian-live.tar
# Creating stage file
Create_stagefile .stage/source_tar