Changes since V1:
- Tuned some more 'tar'-command lines
- Included 'lfs/core-updates'
- Some fine-tuning
Hi,
Current results with V2 (clean builds):
'next':
'packages' => 255 MB
'ipfire-2.19.2gb-ext4.i586-full-core121.img.gz => 319 MB
'ipfire-2.19.i586-full-core121.iso' => 218 MB
Total => 792 MB
'xz-tuning':
'packages' => 228 MB
'ipfire-2.19.2gb-ext4.i586-full-core121.img.gz' => 318 MB
'ipfire-2.19.i586-full-core121.iso' => 207 MB
Total => 753 MB (-39 MB)
It would be nice if someone could review and test these. ;-)
If necessary, I can upload a complete patch.
Best,
Matthias
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# URLs that are common sources of downloads. If you're having trouble with
# a site you should change its URL to that of a suitable mirror site.
#
# URLs that are common sources of downloads. If you're having trouble with
# a site you should change its URL to that of a suitable mirror site.
#
tar xf /install/packages/package/files.tmp -C /install/packages/package/tmp/ \
-p --numeric-owner
rm -f /install/packages/package/files.tmp
tar xf /install/packages/package/files.tmp -C /install/packages/package/tmp/ \
-p --numeric-owner
rm -f /install/packages/package/files.tmp
- cd /install/packages/package/tmp/ && XZ_OPT="$(XZ_OPT)" tar -c -p --numeric-owner -J -f /install/packages/package/files.tar.xz *
+ cd /install/packages/package/tmp/ && XZ_OPT="$(XZ_OPT)" tar -c -p --numeric-owner -J -f /install/packages/package/files.tar.xz $(TAR_OPTIONS) *
rm -r /install/packages/package/tmp
-cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
rm -r /install/packages/package/tmp
-cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
- cd /install/packages/package && tar cf ../$(PROG)-$(VER)-$(PAK_VER).ipfire --files-from=/usr/src/src/paks/files
+ cd /install/packages/package && XZ_OPT="$(XZ_OPT)" tar cf ../$(PROG)-$(VER)-$(PAK_VER).ipfire $(TAR_OPTIONS) --files-from=/usr/src/src/paks/files
rm -rf /install/packages/package
sed -e s/NAME/$(PROG)/g \
-e s/VER/$(VER)/g \
rm -rf /install/packages/package
sed -e s/NAME/$(PROG)/g \
-e s/VER/$(VER)/g \
# Compress root filesystem
# Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
# Compress root filesystem
# Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
- XZ_OPT="$(XZ_OPT)" tar -c -C / --files-from=/tmp/ROOTFILES \
+ tar -c -C / --files-from=/tmp/ROOTFILES \
-f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
--exclude='proc/*' --exclude='tmp/ROOTFILES'
rm -f /tmp/ROOTFILES
tar -x -C /tmp -f /$(SNAME).tar
rm -f /$(SNAME).tar
@mkdir /tmp/sys
-f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
--exclude='proc/*' --exclude='tmp/ROOTFILES'
rm -f /tmp/ROOTFILES
tar -x -C /tmp -f /$(SNAME).tar
rm -f /$(SNAME).tar
@mkdir /tmp/sys
- cd /tmp && tar cf /install/cdrom/distro.img $(TAR_OPTIONS) * && rm -rf *
+ cd /tmp && XZ_OPT="$(XZ_OPT)" tar cf /install/cdrom/distro.img $(TAR_OPTIONS) * && rm -rf *
# Other files
touch /install/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media
# Other files
touch /install/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media
-THISAPP = core-updates
-TARGET = $(DIR_INFO)/$(THISAPP)
+THISAPP = core-updates
+TARGET = $(DIR_INFO)/$(THISAPP)
+TAR_OPTIONS = --xz
###############################################################################
# Top-level Rules
###############################################################################
# Top-level Rules
mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES
tar -p --numeric-owner -x -C /tmp -f /$(SNAME).tar
rm -f /$(SNAME).tar
mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES
tar -p --numeric-owner -x -C /tmp -f /$(SNAME).tar
rm -f /$(SNAME).tar
- cd /tmp && tar cJf /install/packages/package/files.tar.xz * && rm -rf *
+ cd /tmp && XZ_OPT="$(XZ_OPT)" tar cJf /install/packages/package/files.tar.xz $(TAR_OPTIONS) * && rm -rf *
cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
rm /install/packages/package/ROOTFILES
mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
rm /install/packages/package/ROOTFILES
mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
#Change xxxKVERxxx to Kernelversion
sed -e "s/xxxKVERxxx/$(KVER)/g" -i /install/packages/package/update.sh
#Change xxxKVERxxx to Kernelversion
sed -e "s/xxxKVERxxx/$(KVER)/g" -i /install/packages/package/update.sh
- cd /install/packages/package && tar cf ../core-upgrade-$(VERSION)-$$(basename $@).ipfire \
+ cd /install/packages/package && XZ_OPT="$(XZ_OPT)" tar cf ../core-upgrade-$(VERSION)-$$(basename $@).ipfire $(TAR_OPTIONS) \
update.sh files.tar.xz ROOTFILES
rm -rf /install/packages/package
sed -e "s/NAME/core-upgrade/g" \
update.sh files.tar.xz ROOTFILES
rm -rf /install/packages/package
sed -e "s/NAME/core-upgrade/g" \
buildtoolchain
echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
buildtoolchain
echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
- cd $BASEDIR && XZ_OPT="$(XZ_OPT)" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
+ cd $BASEDIR && XZ_OPT="$(XZ_OPT)" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz --xz \
build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5