Portage-archive » История » Редакция 7
Редакция 6 (Андрей Волков, 2014-07-12 13:52) → Редакция 7/10 (Андрей Волков, 2014-07-12 14:38)
h1. Архив portage
http://download.ekb-info.ru/gentoo/portage-archive/
h2. Пересжимаем tar.xz на tmpfs в squashfs
<pre>
for NAME in portage-*.tar.xz; do \
tar -xJf $NAME; \
mv -v portage ${NAME/.tar.xz/}; \
mksquashfs ${NAME/.tar.xz/} ${NAME/.tar.xz/.sqfs} -force-uid portage -force-gid paludisbuild -no-duplicates -b 1M; \
rm -rf ${NAME/.tar.xz/}; \
mkdir -p storage/${NAME/.tar.xz/}; \
sudo mount -o loop,ro ${NAME/.tar.xz/.sqfs} storage/${NAME/.tar.xz/}; \
done;
mksquashfs storage portage-2012.sqfs -force-uid portage -force-gid paludisbuild -b 1M -comp xz;
sudo umount storage/*
rm -rf storage
</pre>
h2. Пересжимаем tar.bz2 на tmpfs в squashfs
<pre>
mkdir unpack
sudo mount -t tmpfs -o size=4g unpack unpack
FILES=$(ls portage-*.tar.bz2)
cd unpack
for NAME in ${FILES}; do \
tar -xjf ${NAME}; \
DNAME=${NAME/.tar.bz2/}
mv -v portage ${DNAME}; \
mksquashfs ${DNAME} ${DNAME}.sqfs -force-uid portage -force-gid paludisbuild -no-duplicates -b 1M; \
rm -rf ${DNAME}; \
mkdir -p storage/${DNAME}; \
sudo mount -o loop,ro ${DNAME}.sqfs storage/${DNAME}; \
done;
mksquashfs storage portage-2013.sqfs -force-uid portage -force-gid paludisbuild -b 1M -comp xz;
sudo umount storage/*
rm -rf storage
mv -v portage-*.sqfs ../
cd ..
sudo umount unpack
rmdir unpack
</pre>
h1. Доработано и перенесено в xidbin:portage-pack.sh