Portage-archive » История » Версия 6
Андрей Волков, 2014-07-12 13:52
1 | 1 | Андрей Волков | h1. Архив portage |
---|---|---|---|
2 | |||
3 | http://download.ekb-info.ru/gentoo/portage-archive/ |
||
4 | 2 | Андрей Волков | |
5 | |||
6 | 3 | Андрей Волков | h2. Пересжимаем tar.xz на tmpfs в squashfs |
7 | 2 | Андрей Волков | |
8 | 1 | Андрей Волков | <pre> |
9 | 3 | Андрей Волков | for NAME in portage-*.tar.xz; do \ |
10 | tar -xJf $NAME; \ |
||
11 | mv -v portage ${NAME/.tar.xz/}; \ |
||
12 | 1 | Андрей Волков | mksquashfs ${NAME/.tar.xz/} ${NAME/.tar.xz/.sqfs} -force-uid portage -force-gid paludisbuild -no-duplicates -b 1M; \ |
13 | rm -rf ${NAME/.tar.xz/}; \ |
||
14 | 3 | Андрей Волков | mkdir -p storage/${NAME/.tar.xz/}; \ |
15 | sudo mount -o loop,ro ${NAME/.tar.xz/.sqfs} storage/${NAME/.tar.xz/}; \ |
||
16 | done; |
||
17 | |||
18 | mksquashfs storage portage-2012.sqfs -force-uid portage -force-gid paludisbuild -b 1M -comp xz; |
||
19 | |||
20 | 5 | Андрей Волков | sudo umount storage/* |
21 | 4 | Андрей Волков | rm -rf storage |
22 | |||
23 | 2 | Андрей Волков | </pre> |
24 | 6 | Андрей Волков | |
25 | |||
26 | h2. Пересжимаем tar.bz2 на tmpfs в squashfs |
||
27 | |||
28 | <pre> |
||
29 | mkdir unpack |
||
30 | sudo mount -t tmpfs -o size=4g unpack unpack |
||
31 | |||
32 | FILES=$(ls portage-*.tar.bz2) |
||
33 | |||
34 | cd unpack |
||
35 | |||
36 | for NAME in ${FILES}; do \ |
||
37 | tar -xjf ${NAME}; \ |
||
38 | DNAME=${NAME/.tar.bz2/} |
||
39 | mv -v portage ${DNAME}; \ |
||
40 | mksquashfs ${DNAME} ${DNAME}.sqfs -force-uid portage -force-gid paludisbuild -no-duplicates -b 1M; \ |
||
41 | rm -rf ${DNAME}; \ |
||
42 | mkdir -p storage/${DNAME}; \ |
||
43 | sudo mount -o loop,ro ${DNAME}.sqfs storage/${DNAME}; \ |
||
44 | done; |
||
45 | |||
46 | mksquashfs storage portage-2013.sqfs -force-uid portage -force-gid paludisbuild -b 1M -comp xz; |
||
47 | |||
48 | sudo umount storage/* |
||
49 | rm -rf storage |
||
50 | |||
51 | mv -v portage-*.sqfs ../ |
||
52 | |||
53 | cd .. |
||
54 | |||
55 | sudo umount unpack |
||
56 | |||
57 | rmdir unpack |
||
58 | |||
59 | </pre> |