ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Re: ...в общее chroot-окружение -- apt+rpm problem
  @ 2003-01-05 19:22       ` Alexey Tourbin
  0 siblings, 0 replies; only message in thread
From: Alexey Tourbin @ 2003-01-05 19:22 UTC (permalink / raw)
  To: sisyphus; +Cc: devel


[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-05 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-05 19:22       ` [devel] Re: ...в общее chroot-окружение -- apt+rpm problem Alexey Tourbin

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