ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@turbinal.org>
To: sisyphus@altlinux.ru
Cc: devel@altlinux.ru
Subject: [sisyphus] Re: ...в общее chroot-окружение -- apt+rpm problem
Date: Sun, 5 Jan 2003 22:22:11 +0300
Message-ID: <20030105192211.GA27254@ungrund> (raw)
In-Reply-To: <20030105114459.GA4930@ungrund>


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

On Sun, Jan 05, 2003 at 02:44:59PM +0300, Alexey Tourbin wrote:
> Используя --root, можно создать отдельную виртуальную среду с отдельной
> RPM базой.

Я слабал скрипт (прилагается). Он работает, но на одном месте
обламывается. rpm с ним не может пересобрать cвою базу, хотя сам 
по себе -- может. Т.е. лог кончается тем, что:

...
0 packages upgraded, 34 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/6996kB of archives. After unpacking 16,8MB will be used.
Do you want to continue? [Y/n]
Rebuilding RPM database (this may take a few minutes)...
error: temporary database /home/at/CHROOT/beta/var/lib/rpm already exists
E: could not rebuild RPM database for upgrade of RPM
$

Причем:

$ sudo rpm -v --rebuilddb --root /home/at/CHROOT/beta
rebuilding database /home/at/CHROOT/beta/var/lib/rpm
$ rpm -q apt rpm
apt-0.3.19cnc55-alt3
rpm-4.0.4-alt12
$

Прилагается вывод команд
$ sudo ./mkchroot $HOME/CHROOT/beta coreutils sh
$ sudo ./mkchroot $HOME/CHROOT/beta rpm


-- 
WBR, Alexey Tourbin
BIOZAK Ltd., Russia

[-- Attachment #1.2: mkchroot --]
[-- Type: text/plain, Size: 662 bytes --]

#!/bin/sh -ex
#
# mkchroot /chroot_path [packages]
# setup chrooted environment in $HOME/CHROOT*
#

CHROOT=$1; shift

if [ -z "$HOME" ] || [ -z "$CHROOT" ] || [ -n "${CHROOT##$HOME/CHROOT*}" ] ; then
	echo "bad CHROOT=$CHROOT" 
	exit 1
fi

rm -rf $CHROOT
mkdir -p $CHROOT/{bin,etc/rpm,usr/lib/rpm,var/lib/rpm}
cp -a /bin/rpm $CHROOT/bin/
cp -a /usr/lib/rpm/{rpmrc,macros} $CHROOT/usr/lib/rpm/
echo "%_dbapi 3" > $CHROOT/etc/rpm/macros.db1
rpm --initdb --root $CHROOT
apt-get install -o RPM::RootDir=$CHROOT setup
apt-get install -o RPM::RootDir=$CHROOT glibc-core
apt-get install -o RPM::RootDir=$CHROOT $*
chroot $CHROOT /bin/echo 'hi!'
chroot $CHROOT /bin/sh


[-- Attachment #1.3: chroot-coreutils-sh.log --]
[-- Type: text/plain, Size: 3285 bytes --]

+ CHROOT=/home/at/CHROOT/beta
+ shift
+ '[' -z /home/at ']'
+ '[' -z /home/at/CHROOT/beta ']'
+ '[' -n '' ']'
+ rm -rf /home/at/CHROOT/beta
+ mkdir -p /home/at/CHROOT/beta/bin /home/at/CHROOT/beta/etc/rpm /home/at/CHROOT/beta/usr/lib/rpm /home/at/CHROOT/beta/var/lib/rpm
+ cp -a /bin/rpm /home/at/CHROOT/beta/bin/
+ cp -a /usr/lib/rpm/rpmrc /usr/lib/rpm/macros /home/at/CHROOT/beta/usr/lib/rpm/
+ echo '%_dbapi 3'
+ rpm --initdb --root /home/at/CHROOT/beta
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta setup
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  setup 
0 packages upgraded, 1 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/25,1kB of archives. After unpacking 35,6kB will be used.
Executing RPM (/bin/rpm -r /home/at/CHROOT/beta -Uv --replacepkgs -h --fancypercent)...
Preparing...                 ##################################################
setup                        ##################################################
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta glibc-core
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  glibc-core 
0 packages upgraded, 1 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/947kB of archives. After unpacking 2167kB will be used.
Executing RPM (/bin/rpm -r /home/at/CHROOT/beta -Uv --replacepkgs -h --fancypercent)...
Preparing...                 ##################################################
glibc-core                   ##################################################
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta coreutils sh
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following extra packages will be installed:
  bzip2 bzlib gzip info-install libtinfo terminfo 
The following NEW packages will be installed:
  bzip2 bzlib coreutils gzip info-install libtinfo sh terminfo 
0 packages upgraded, 8 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/2426kB of archives. After unpacking 6059kB will be used.
Do you want to continue? [Y/n] Executing RPM (/bin/rpm -r /home/at/CHROOT/beta -Uv --replacepkgs -h --fancypercent)...
Preparing...                 ##################################################
terminfo                     ##################################################
gzip                         ##################################################
libtinfo                     ##################################################
sh                           ##################################################
warning: created %_tmppath directory /var/tmp
coreutils                    ##################################################
/var/tmp/rpm-tmp.96704: line 6: /sbin/install-info: No such file or directory
error: execution of %post scriptlet from coreutils-4.5.3-alt2 failed, exit status 127
bzlib                        ##################################################
bzip2                        ##################################################
info-install                 ##################################################
E: Sub-process /bin/rpm returned an error code (8)

[-- Attachment #1.4: chroot-rpm.log --]
[-- Type: text/plain, Size: 2863 bytes --]

+ CHROOT=/home/at/CHROOT/beta
+ shift
+ '[' -z /home/at ']'
+ '[' -z /home/at/CHROOT/beta ']'
+ '[' -n '' ']'
+ rm -rf /home/at/CHROOT/beta
+ mkdir -p /home/at/CHROOT/beta/bin /home/at/CHROOT/beta/etc/rpm /home/at/CHROOT/beta/usr/lib/rpm /home/at/CHROOT/beta/var/lib/rpm
+ cp -a /bin/rpm /home/at/CHROOT/beta/bin/
+ cp -a /usr/lib/rpm/rpmrc /usr/lib/rpm/macros /home/at/CHROOT/beta/usr/lib/rpm/
+ echo '%_dbapi 3'
+ rpm --initdb --root /home/at/CHROOT/beta
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta setup
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  setup 
0 packages upgraded, 1 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/25,1kB of archives. After unpacking 35,6kB will be used.
Executing RPM (/bin/rpm -r /home/at/CHROOT/beta -Uv --replacepkgs -h --fancypercent)...
Preparing...                 ##################################################
setup                        ##################################################
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta glibc-core
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
  glibc-core 
0 packages upgraded, 1 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/947kB of archives. After unpacking 2167kB will be used.
Executing RPM (/bin/rpm -r /home/at/CHROOT/beta -Uv --replacepkgs -h --fancypercent)...
Preparing...                 ##################################################
glibc-core                   ##################################################
+ apt-get install -o RPM::RootDir=/home/at/CHROOT/beta rpm
Processing File Dependencies...
Reading Package Lists...
Building Dependency Tree...
The following extra packages will be installed:
  alt-gpgkeys bzip2 bzlib coreutils crontabs gawk grep gzip info-install
  libbeecrypt libdb2 libdb4 libpam libpcre libpopt librpm libtcb libtinfo
  logrotate mktemp nss_tcb pam pam-config pam_passwdqc pam_tcb pam_userpass
  perl-base sh shadow-convert shadow-utils tcb-utils terminfo zlib 
The following NEW packages will be installed:
  alt-gpgkeys bzip2 bzlib coreutils crontabs gawk grep gzip info-install
  libbeecrypt libdb2 libdb4 libpam libpcre libpopt librpm libtcb libtinfo
  logrotate mktemp nss_tcb pam pam-config pam_passwdqc pam_tcb pam_userpass
  perl-base rpm sh shadow-convert shadow-utils tcb-utils terminfo zlib 
0 packages upgraded, 34 newly installed, 0 to remove(replace) and 0 not upgraded.
Need to get 0B/6996kB of archives. After unpacking 16,8MB will be used.
Do you want to continue? [Y/n] Rebuilding RPM database (this may take a few minutes)...
error: temporary database /home/at/CHROOT/beta/var/lib/rpm already exists
E: could not rebuild RPM database for upgrade of RPM

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

  parent reply	other threads:[~2003-01-05 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-05  7:38 [sisyphus] Установка нескольких пакетов в общее chroot-окружение Konstantin Klimchev
2003-01-05 10:52 ` [sisyphus] " Alexey Tourbin
2003-01-05 11:26   ` Konstantin Klimchev
2003-01-05 11:44     ` Alexey Tourbin
2003-01-05 12:13       ` Konstantin Klimchev
2003-01-05 12:58         ` Alexey Tourbin
2003-01-05 13:31           ` Konstantin Klimchev
2003-01-05 12:39       ` Konstantin Klimchev
2003-01-05 19:22       ` Alexey Tourbin [this message]
2003-01-05 13:43 ` [sisyphus] " 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=20030105192211.GA27254@ungrund \
    --to=at@turbinal.org \
    --cc=devel@altlinux.ru \
    --cc=sisyphus@altlinux.ru \
    /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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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