Portage-archive » История » Версия 10
Андрей Волков, 2024-06-18 00:53
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> |
||
60 | 7 | Андрей Волков | |
61 | |||
62 | h1. Доработано и перенесено в xidbin:portage-pack.sh |
||
63 | 8 | Андрей Волков | |
64 | h1. Перезапаковка на simba |
||
65 | 1 | Андрей Волков | |
66 | 10 | Андрей Волков | <pre> |
67 | 9 | Андрей Волков | cd /var/db/paludis/pre |
68 | |||
69 | 1 | Андрей Волков | YEAR=2021; for MON in {01..12}; do mkdir {/var/db/paludis/sqfs.templates/,}C_${YEAR}_${MON}_R1; wget -P C_${YEAR}_${MON}_R1 http://files.ekb-info.ru/gentoo/snapshots/portage-${YEAR}${MON}15.tar.xz; cd C_${YEAR}_${MON}_R1/; tar -xf portage-${YEAR}${MON}15.tar.xz; cd ..; ln -fns C_${YEAR}_${MON}_R1/portage sync; /etc/init.d/repositories.testing sync; cp -a ../sqfs.testing/gentoo.sqfs ../sqfs.templates/C_${YEAR}_${MON}_R1/; touch -r C_${YEAR}_${MON}_R1/portage-${YEAR}${MON}15.tar.xz ../sqfs.templates/C_${YEAR}_${MON}_R1/gentoo.sqfs; rm -rf C_${YEAR}_${MON}_R1; done |
70 | 10 | Андрей Волков | </pre> |