Проект

Общее

Профиль

Portage-archive » История » Редакция 8

Редакция 7 (Андрей Волков, 2014-07-12 14:38) → Редакция 8/10 (Андрей Волков, 2023-04-13 19:24)

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 


 h1. Перезапаковка на simba 

 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