Re: [gentoo-dev] debootstrap equivalent for Gentoo?

2015-01-01 Thread Sebastian Pipping
Hi!


On 28.12.2014 11:26, Johann Schmitz (ercpe) wrote:
 I wrote gentoo-bootstrap
 (https://github.com/ercpe/gentoo-bootstrap) some time ago to
 automate the creation of Gentoo Xen DomU's at work. It can do a lot
 of more things (e.g. installing packages, overlays, etc.).

Interesting tool!


 (shame on me) it doesn't do signature verification yet.

I've opened a ticket for it on GitHub now:

https://github.com/ercpe/gentoo-bootstrap/issues/1

Best,



Sebastian



Re: [gentoo-dev] debootstrap equivalent for Gentoo?

2014-12-28 Thread Matthias Maier

 I'm wondering if there is an equivalent of debootstrap of Debian
 anywhere.  By equivalent I mean a tool that ..

Given the fact that such a tool only has to handle 3 files (tarball,
digest + signature file) I guess there was never much need for such a
thing.

  * I can run like command FOLDER with a chroot-able
Gentoo system in FOLDER after and

  * for both stage3 and portage tarballs
* Downloading tarball
* Downloading signature file
* Verifying signature
* Extracting

 Has anyone seen something like that?

I have a very rudimentary script that automates part of this procedure
(without portage snapshot). Maybe this can serve as a starting
point. Please find it attached.

Best,
Matthias

--


#!/bin/bash -eu

ARCH=${1:-amd64}
MIRROR=http://ftp.uni-erlangen.de/pub/mirrors/gentoo;

if [[ $ARCH =~ ^i.86$ ]]
then
  SUBDIR=/releases/x86/autobuilds
else
  SUBDIR=/releases/${ARCH}/autobuilds
fi

CONTROL_FILE=latest-stage3-${ARCH}.txt

wget -c ${MIRROR}${SUBDIR}/${CONTROL_FILE}

STAGE=$(tail -n 1 ${CONTROL_FILE})

if [[ ! $STAGE =~ ^([a-z0-9]|/|-|\.)+$ ]]
then
  echo invalid content
  exit 1
fi

wget -c ${MIRROR}${SUBDIR}/${STAGE}
wget -c ${MIRROR}${SUBDIR}/${STAGE}.CONTENTS
wget -c ${MIRROR}${SUBDIR}/${STAGE}.DIGESTS.asc

STAGE=$(basename ${STAGE})

gpg --trust-model=always --no-options --batch --no-tty \
--no-default-keyring --keyring=/etc/portage/keyring/pubring.gpg \
--verify ${STAGE}.DIGESTS.asc

gpg --trust-model=always --no-options --batch --no-tty \
--no-default-keyring --keyring=/etc/portage/keyring/pubring.gpg \
--decrypt ${STAGE}.DIGESTS.asc ${STAGE}.DIGESTS

sed -i -e '7,8d' -e '3,4d' ${STAGE}.DIGESTS
sha512sum -c ${STAGE}.DIGESTS

read -p Continue? y/n:  yesno
if [[ $yesno != y ]]; then
  exit 1
fi

tar -xvf ${STAGE}


signature.asc
Description: PGP signature


Re: [gentoo-dev] debootstrap equivalent for Gentoo?

2014-12-28 Thread Johann Schmitz (ercpe)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 28.12.2014 03:11, Sebastian Pipping wrote:
 I'm wondering if there is an equivalent of debootstrap of Debian 
 anywhere.  By equivalent I mean a tool that ..

I wrote gentoo-bootstrap (https://github.com/ercpe/gentoo-bootstrap)
some time ago to automate the creation of Gentoo Xen DomU's at work.
It can do a lot of more things (e.g. installing packages, overlays, etc.).

I stopped at the works for me state, so some work might be
neccessary to work for you.

 * I can run like command FOLDER with a chroot-able Gentoo system
 in FOLDER after and

It only has a LVM storage backend, but a folder storage backend should
by easy to implement.

 * for both stage3 and portage tarballs * Downloading tarball *
 Downloading signature file * Verifying signature * Extracting

(shame on me) it doesn't do signature verification yet.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBAgAGBQJUn9rQAAoJEKCEBkJ3xQHtFVYH/AoroRwFvH6u1TYuGgxlsGAM
A8siVENR8hhlIdSCBc17tI8YCD3A+u2G/duv1gygXAWHSXHtzCZm0mLg4kPhEBgp
G4529V3pfyQYknN1fDQn16N4F8XPaikvOnWaEnlqtaWmTfreDgddaDiVAk5kTyrJ
M0x/UjBcvw/YFM62kcrTROeVkFTv+j0Gq7mb1eMLx9NMVCogfIWJ5Iujb5Sev45d
IRHDrN/I0XF3cRhdJpwwDKioxGABKhWz1JA26brDzyZNDW9SqM1tc/RR75sjw8SI
AKcNLPMi4i0Y8TijttcW9fYxakDz47hY0yTxejvBjAp4s5zUOKQNVcqa6xvyigo=
=0HLA
-END PGP SIGNATURE-



[gentoo-dev] debootstrap equivalent for Gentoo?

2014-12-27 Thread Sebastian Pipping
Hi!


I'm wondering if there is an equivalent of debootstrap of Debian
anywhere.  By equivalent I mean a tool that ..

 * I can run like command FOLDER with a chroot-able
   Gentoo system in FOLDER after and

 * for both stage3 and portage tarballs
   * Downloading tarball
   * Downloading signature file
   * Verifying signature
   * Extracting

Has anyone seen something like that?

Thanks,



Sebastian