Project

General

Profile

Actions

Portage-archive » History » Revision 9

« Previous | Revision 9/10 (diff) | Next »
Андрей Волков, 2023-04-13 19:29


Архив portage

http://download.ekb-info.ru/gentoo/portage-archive/

Пересжимаем tar.xz на tmpfs в squashfs

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

Пересжимаем tar.bz2 на tmpfs в squashfs

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

Доработано и перенесено в xidbin:portage-pack.sh

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

cd /var/db/paludis/pre

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

Updated by Андрей Волков over 1 year ago · 10 revisions