ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Денис Смирнов" <mithraen@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] double chroot
Date: Tue, 7 Nov 2006 23:31:43 +0300
Message-ID: <20061107203143.GB13108@localhost.localdomain> (raw)
In-Reply-To: <20061107122536.63135418@localhost.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 831 bytes --]

On Tue, Nov 07, 2006 at 12:25:36PM +0300, Alex V. Myltsev wrote:

AVM> * инструменты (mksquashfs, genromfs, mkisofs и прочие необходимые
AVM>   для сборки вещи) нельзя выполнять в чруте, потому что мы их туда не
AVM>   устанавливаем (они не нужны на получающемся образе, их может не
AVM>   быть в исходном репозитарии).
AVM> * инструменты нельзя выполнять в хост-системе, потому что тогда
AVM>   потеряется информация, которую хранит fakeroot.

Какой кошмар. Пример скрипта который без этого всего обходится в аттаче.
Все что требуется -- _библиотеки_, которые требует этот пакет (в
большинстве случаев речь всего лишь о glibc).

-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
Настоящие программисты делают так: COPY CON PROGRAM. EXE.

[-- Attachment #1.2: aptbox2cpio --]
[-- Type: text/plain, Size: 1264 bytes --]

#!/bin/bash
#=============================================================================#
#                  Make cpios image from fakeroot directory                   #
#=============================================================================#
# Requires:
#	hasher by Dmitry V. Levin (ldv)
#   	cpio
#=============================================================================#
# (C) Denis Smirnov <mithraen@freesource.info                     12.06.2006  #
#=============================================================================#
set +e

WORKDIR=`realpath $1`
touch "$2"
RESULT=`realpath $2`
chroot="$WORKDIR/chroot/"

T=`mktemp`
echo -en '/etc\0/etc/group\0/etc/passwd\0' > $T

cp -a `which cpio` $chroot/.host/

echo "Creating $RESULT" | csed '/.*/ p green' >&2
hsh-run "$WORKDIR" --rooter --save-fakeroot -- /.host/find / \
	-mindepth 1 \
	-name .in -prune -o \
	-name .out -prune -o \
	-name .host -prune -o \
	-name .fakedata -prune -o \
	-name .altlinux.img -prune -o \
	-wholename /usr/lib*/*fakeroot* -prune -o \
	-print0 \
	| grep -vz ^/etc$ \
	| grep -vz ^/etc/passwd$ \
	| grep -vz ^/etc/group$ \
	>> $T \
	2> /dev/null

hsh-run "$WORKDIR"  --rooter --save-fakeroot -- /.host/cpio \
	-0 -c --create --quiet > "$RESULT" < $T

rm -f $T


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-11-07 20:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-10 18:59 [devel] rpm macros Alexey Tourbin
2006-09-11  4:00 ` Alexey Tourbin
2006-11-05 21:21   ` [devel] spt/spt3 Денис Смирнов
2006-11-05 21:36     ` Dmitry V. Levin
2006-11-06  5:37       ` Hihin Ruslan
2006-11-06 16:03       ` Денис Смирнов
2006-11-07  8:14         ` Konstantin A. Lepikhov
2006-11-07  8:33           ` Денис Смирнов
2006-11-07  8:36             ` Konstantin A. Lepikhov
2006-11-07  9:25               ` [devel] double chroot Alex V. Myltsev
2006-11-07 20:31                 ` Денис Смирнов [this message]
2006-11-07 21:32                   ` [devel] [JT] " Alex V. Myltsev
2006-11-07 23:24                     ` Денис Смирнов
2006-11-08  5:55                       ` Alex V. Myltsev
2006-11-07 10:17           ` [devel] spt/spt3 Mikhail Yakshin
2006-11-07 10:36             ` Konstantin A. Lepikhov
2006-11-07 11:29               ` Mikhail Yakshin
2006-11-07 11:44                 ` Konstantin A. Lepikhov
2006-11-07 12:41                 ` Sergey Vlasov
2006-11-07 13:01                   ` Konstantin A. Lepikhov
2006-11-07 13:08                     ` Dmitry V. Levin
2006-11-07 13:40                       ` [devel] vzctl Slava Dubrovskiy
2006-11-07 15:17                         ` Dmitry V. Levin
2006-11-07 20:34                 ` [devel] spt/spt3 Денис Смирнов
2006-11-07 22:09                   ` Dmitry V. Levin
2006-12-09  9:29                     ` Hihin Ruslan
2006-12-10  0:54                       ` Mikhail Yakshin
2006-12-10  6:21                         ` Hihin Ruslan
2006-12-10  9:28                         ` Konstantin A. Lepikhov
2006-11-07 22:17                 ` Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061107203143.GB13108@localhost.localdomain \
    --to=mithraen@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git