Fedora Online Forum

Lavori in corso! I nostri pinguini sono all'opera e risolveranno i problemi il prima possibile ;-)

#1 20-02-2013 00:08:47

bebo_sudo
Collaboratore
Da Trento+Trieste
Registrato: 28-02-2011
Messaggi: 1'665
Sito web

Repository locale per mock

Ciao a tutti,
sono alcuni giorni che smanetto per creare un repository locale per mock.
La documentazione è poca per non dire inesistente, quindi sto andando un po' "a naso".

Intanto devo dire che lanciando mock "normalmente" tutto funziona, ma volevo creare un repository in cui inserire tutti i pacchetti necessari, per velocizzare il rebuild dentro mock e continuo a imbattermi in errori e/o bug.
Riepilogo la mia avventura: sono partito creando la cartella /mnt/mock_repo/x86_64/ ovviamente da root, ho dato uno:

# chown makerpm:mock /mnt/mock_repo/x86_64/

per poterla modificare da utente makerpm.

A questo punto ho scaricato e inserito gli rpm necessari alla compilazione usando un workaround su yumdownloader, perché ha un baco sull'opzione --resolve (anche qualcun altro l'ha notato?); ho usato createrepo per la creazione dei file necessari ai repo così:

$ createrepo /mnt/mock_repo/x86_64/
Spawning worker 0 with 86 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
$

ed ho quindi questi rpm:

$ ll /mnt/mock_repo/x86_64/
totale 63872
-rwxrw-r--. 1 makerpm makerpm   235024 19 feb 23.27 atk-2.6.0-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    77604 19 feb 23.27 atkmm-2.22.6-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    74472 19 feb 23.27 audit-libs-2.2.2-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    61016 19 feb 23.27 avahi-libs-0.6.31-6.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  1017316 19 feb 23.27 bash-4.2.42-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    52980 19 feb 23.27 bzip2-1.0.6-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   692688 19 feb 23.27 cairo-1.12.10-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    57836 19 feb 23.27 cairomm-1.10.0-5.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    77772 19 feb 23.27 celt-0.11.1-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  6487328 19 feb 23.27 cmake-2.8.10.2-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  3280320 19 feb 23.27 coreutils-8.17-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   213092 19 feb 23.27 cpio-2.11-12.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    79108 19 feb 23.27 cracklib-2.8.22-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   375772 19 feb 23.27 cups-libs-1.5.4-20.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   276972 19 feb 23.27 diffutils-3.2-11.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   538824 19 feb 23.27 findutils-4.5.10-5.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   875268 19 feb 23.27 gawk-4.0.1-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm 14693100 19 feb 23.27 gcc-4.7.2-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  6162512 19 feb 23.27 gcc-c++-4.7.2-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   542096 19 feb 23.27 gdk-pixbuf2-2.26.5-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   961424 19 feb 23.27 gettext-0.18.1.1-17.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   531196 19 feb 23.27 glibmm24-2.34.1-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   409336 19 feb 23.27 gnutls-2.12.22-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   337080 19 feb 23.27 grep-2.14-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  3549216 19 feb 23.27 gtk2-2.24.13-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   113648 19 feb 23.27 gtkglext-libs-1.2.0-18.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    45568 19 feb 23.27 gtkglextmm-1.2.0-15.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   298720 19 feb 23.27 gtkglextmm-devel-1.2.0-15.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   857672 19 feb 23.27 gtkmm24-2.24.2-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   130876 19 feb 23.27 gzip-1.5-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   478680 19 feb 23.27 harfbuzz-0.9.9-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   191960 19 feb 23.27 info-4.13a-18.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   536060 19 feb 23.27 jack-audio-connection-kit-1.9.9.5-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   147504 19 feb 23.27 jasper-libs-1.900.1-20.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    17916 19 feb 23.27 libattr-2.4.46-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    45016 19 feb 23.27 libcap-2.22-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    59496 19 feb 23.27 libconfig-1.4.8-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   706992 19 feb 23.27 libdb-5.3.21-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   647516 19 feb 23.27 libffado-2.1.0-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   250860 19 feb 23.27 libgcrypt-1.5.0-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    64740 19 feb 23.27 libglade2-2.6.4-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    37960 19 feb 23.27 libglademm24-2.6.7-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    33012 19 feb 23.27 libglademm24-devel-2.6.7-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   124304 19 feb 23.27 libGLEW-1.7.0-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    78772 19 feb 23.27 libgpg-error-1.10-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  5581004 19 feb 23.27 libicu-49.1.1-5.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    37748 19 feb 23.27 libiec61883-1.2.0-8.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    61652 19 feb 23.27 libraw1394-2.0.8-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  1094696 19 feb 23.27 libsamplerate-0.1.8-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    59876 19 feb 23.27 libsigc++20-2.2.11-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   330328 19 feb 23.27 libtasn1-2.14-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   190064 19 feb 23.27 libthai-0.1.14-6.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    22956 19 feb 23.27 libwayland-client-1.0.3-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    31600 19 feb 23.27 libwayland-server-1.0.3-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    21652 19 feb 23.27 libXcomposite-0.4.3-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    57520 19 feb 23.27 libXft-2.3.1-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   666608 19 feb 23.27 libxml2-2.9.0-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   104916 19 feb 23.27 libxml++-2.36.0-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    70116 19 feb 23.27 libXmu-1.1.1-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   428980 19 feb 23.27 make-3.82-13.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    82076 19 feb 23.27 mesa-libEGL-9.0.1-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    37612 19 feb 23.27 mesa-libgbm-9.0.1-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   198660 19 feb 23.27 mesa-libGLU-9.0.0-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   185840 19 feb 23.27 openal-soft-1.14-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    43700 19 feb 23.27 p11-kit-0.14-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   730412 19 feb 23.27 pam-1.1.6-3.fc18.1.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   287876 19 feb 23.27 pango-1.32.3-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    64012 19 feb 23.27 pangomm-2.28.4-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    57040 19 feb 23.27 pangox-compat-0.0.2-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    96824 19 feb 23.27 patch-2.6.1-14.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   215780 19 feb 23.27 pixman-0.26.2-5.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    89220 19 feb 23.27 portaudio-19-14.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  1600296 19 feb 23.27 portaudio-devel-19-14.fc18.x86_64.rpm
drwxrwxr-x. 2 makerpm makerpm     4096 19 feb 23.29 repodata
-rwxrw-r--. 1 makerpm makerpm   134692 19 feb 23.27 rpm-build-4.10.3.1-1.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   361060 19 feb 23.27 SDL-devel-1.2.15-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   222616 19 feb 23.27 sed-4.2.1-10.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   396960 19 feb 23.27 SFML-1.6-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   879556 19 feb 23.27 SFML-devel-1.6-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  1140288 19 feb 23.27 shadow-utils-4.1.5.1-2.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    51892 19 feb 23.27 SOIL-1.07-7.20080706.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   131668 19 feb 23.27 systemd-libs-197-1.fc18.1.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   852004 19 feb 23.27 tar-1.26-9.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   163612 19 feb 23.27 unzip-6.0-7.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm  1747172 19 feb 23.27 util-linux-2.22.2-3.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm    41300 19 feb 23.27 which-2.20-4.fc18.x86_64.rpm
-rwxrw-r--. 1 makerpm makerpm   102852 19 feb 23.27 xz-libs-5.1.2-2alpha.fc18.x86_64.rpm
$

Sono andato dunque a modificare i file di configurazione di mock, creandone uno per l'occasione.

$ cat /etc/mock/mock_fedora-18-x86_64.cfg 
config_opts['root'] = 'mock_fedora-18-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'fc18'  # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=


# repos

[local]
name=F18 x86_64 - local
failovermethod=priority
baseurl=file:///mnt/mock_repo/x86_64
"""

$

ed ora, lanciando mock e indicandogli di usare la versione modificata delle impostazioni questo è il risultato:

$ mock -r mock_fedora-18-x86_64 --rebuild ~/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm
INFO: mock.py version 1.1.28 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Start(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm)  Config(mock_fedora-18-x86_64)
Start: lock buildroot
Start: clean chroot
INFO: chroot (/var/lib/mock/mock_fedora-18-x86_64) unlocked and deleted
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
Start: lock buildroot
Mock Version: 1.1.28
INFO: Mock Version: 1.1.28
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Start: device setup
Finish: device setup
Start: yum update
Finish: yum update
ERROR: Exception(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm) Config(mock_fedora-18-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/mock_fedora-18-x86_64/result
ERROR: Could not find useradd in chroot, maybe the install failed?
$

Come detto lanciandolo e indicando un file di config "classico" tutto va, e lo killo con un ctrl+c da terminale mentre sta scaricando i nuovi pacchetti.
Questo è un output più verboso:

$ mock -r mock_fedora-18-x86_64 --rebuild ~/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm -v
INFO: mock.py version 1.1.28 starting...
Start: init plugins
DEBUG: ensuring that dir exists: /var/cache/mock/mock_fedora-18-x86_64/yum_cache/
INFO: selinux enabled
Finish: init plugins
Start: run
DEBUG: mock final configuration:
DEBUG:     scm:  False
DEBUG:     resultdir:  %(basedir)s/%(root)s/result
DEBUG:     legal_host_arches:  ('x86_64',)
DEBUG:     dist:  fc18
DEBUG:     internal_setarch:  True
DEBUG:     scm_opts:  {'git_get': 'git clone SCM_BRN git://localhost/SCM_PKG.git SCM_PKG', 'cvs_get': 'cvs -d /srv/cvs co SCM_BRN SCM_PKG', 'git_timestamps': False, 'ext_src_dir': '/dev/null', 'spec': 'SCM_PKG.spec', 'write_tar': False, 'method': 'git', 'svn_get': 'svn co file:///srv/svn/SCM_PKG/SCM_BRN SCM_PKG'}
DEBUG:     use_host_resolv:  True
DEBUG:     more_buildreqs:  {}
DEBUG:     createrepo_command:  /usr/bin/createrepo -d -q -x *.src.rpm
DEBUG:     yum_builddep_opts:  
DEBUG:     yum.conf:  
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=


# repos

[local]
name=F18 x86_64 - local
failovermethod=priority
baseurl=file:///mnt/mock_repo/x86_64

DEBUG:     cleanup_on_failure:  False
DEBUG:     plugins:  ['tmpfs', 'root_cache', 'yum_cache', 'bind_mount', 'ccache', 'selinux', 'mount', 'package_state']
DEBUG:     chrootuid:  1006
DEBUG:     no_root_shells:  False
DEBUG:     priorities.conf:  
[main]
enabled=0
DEBUG:     yum_common_opts:  []
DEBUG:     chroothome:  /builddir
DEBUG:     basedir:  /var/lib/mock
DEBUG:     internal_dev_setup:  True
DEBUG:     environment:  {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG:     macros:  {'%_rpmfilename': '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm', '%_topdir': '/builddir/build'}
DEBUG:     version:  1.1.28
DEBUG:     online:  True
DEBUG:     build_log_fmt_name:  unadorned
DEBUG:     chrootgid:  983
DEBUG:     files:  {}
DEBUG:     rpmbuild_arch:  x86_64
DEBUG:     log_config_file:  logging.ini
DEBUG:     rpmbuild_timeout:  0
DEBUG:     cleanup_on_success:  False
DEBUG:     chroot_setup_cmd:  groupinstall buildsys-build
DEBUG:     useradd:  /usr/sbin/useradd -o -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s
DEBUG:     root_log_fmt_name:  detailed
DEBUG:     chroot_name:  mock_fedora-18-x86_64
DEBUG:     plugin_conf:  {'package_state_enable': False, 'yum_cache_opts': {'max_metadata_age_days': 30, 'root': 'mock_fedora-18-x86_64', 'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'online': True, 'cache_topdir': '/var/cache/mock', 'max_age_days': 30, 'dir': '%(cache_topdir)s/%(root)s/yum_cache/'}, 'mount_opts': {'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'root': 'mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'cache_topdir': '/var/cache/mock'}, 'bind_mount_opts': {'dirs': [], 'create_dirs': False, 'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'cache_topdir': '/var/cache/mock', 'root': 'mock_fedora-18-x86_64'}, 'root_cache_enable': True, 'selinux_opts': {'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'root': 'mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'cache_topdir': '/var/cache/mock'}, 'ccache_opts': {'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'compress': None, 'max_cache_size': '4G', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'cache_topdir': '/var/cache/mock', 'root': 'mock_fedora-18-x86_64', 'dir': '%(cache_topdir)s/%(root)s/ccache/'}, 'bind_mount_enable': True, 'root_cache_opts': {'exclude_dirs': ['./proc', './sys', './dev', './tmp/ccache', './var/cache/yum'], 'compress_program': 'pigz', 'extension': '.gz', 'root': 'mock_fedora-18-x86_64', 'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'age_check': True, 'cache_topdir': '/var/cache/mock', 'max_age_days': 15, 'dir': '%(cache_topdir)s/%(root)s/root_cache/'}, 'selinux_enable': True, 'yum_cache_enable': True, 'tmpfs_enable': False, 'tmpfs_opts': {'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'required_ram_mb': 900, 'cache_topdir': '/var/cache/mock', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'max_fs_size': None, 'root': 'mock_fedora-18-x86_64'}, 'ccache_enable': True, 'package_state_opts': {'basedir': '/var/lib/mock/mock_fedora-18-x86_64', 'root': 'mock_fedora-18-x86_64', 'cachedir': '/var/cache/mock/mock_fedora-18-x86_64', 'cache_topdir': '/var/cache/mock'}, 'mount_enable': False}
DEBUG:     state_log_fmt_str:  %(asctime)s - %(message)s
DEBUG:     config_paths:  ['/etc/mock/site-defaults.cfg', '/etc/mock/mock_fedora-18-x86_64.cfg']
DEBUG:     rhnplugin.conf:  
[main]
enabled=0
DEBUG:     build_log_fmt_str:  %(message)s
DEBUG:     state_log_fmt_name:  state
DEBUG:     plugin_dir:  /usr/lib/python2.7/site-packages/mockbuild/plugins
DEBUG:     root_log_fmt_str:  %(levelname)s %(filename)s:%(lineno)d:  %(message)s
DEBUG:     clean:  True
DEBUG:     createrepo_on_rpms:  False
DEBUG:     cache_topdir:  /var/cache/mock
DEBUG:     root:  mock_fedora-18-x86_64
DEBUG:     target_arch:  x86_64
DEBUG: Unsharing. Flags: 738328576
DEBUG: unshare(738328576) failed, falling back to unshare(67239936)
DEBUG: Unsharing. Flags: 67239936
INFO: Start(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm)  Config(mock_fedora-18-x86_64)
Start: lock buildroot
Start: clean chroot
DEBUG: kill orphans
DEBUG: remove tree: /var/lib/mock/mock_fedora-18-x86_64.tmp
INFO: chroot (/var/lib/mock/mock_fedora-18-x86_64) unlocked and deleted
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/result
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/result
Start: lock buildroot
Mock Version: 1.1.28
INFO: Mock Version: 1.1.28
INFO: Mock Version: 1.1.28
DEBUG: rootdir = /var/lib/mock/mock_fedora-18-x86_64/root/
DEBUG: resultdir = /var/lib/mock/mock_fedora-18-x86_64/result
INFO: calling preinit hooks
INFO: enabled root cache
DEBUG: ensuring that dir exists: /var/cache/mock/mock_fedora-18-x86_64/root_cache/
INFO: enabled yum cache
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/cache/yum
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/cache/yum
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/tmp/ccache
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/tmp/ccache
DEBUG: ensuring that dir exists: /var/cache/mock/mock_fedora-18-x86_64/ccache/
DEBUG: create skeleton dirs
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/rpm
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/rpm
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/yum
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/yum
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/dbus
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/lib/dbus
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/log
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/log
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/lock/rpm
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/lock/rpm
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/cache/yum
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/etc/rpm
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/etc/rpm
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/tmp
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/tmp/ccache
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/var/tmp
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/var/tmp
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum.repos.d
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum.repos.d
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/proc
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/proc
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/sys
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/sys
DEBUG: touch required files
DEBUG: touching file: /var/lib/mock/mock_fedora-18-x86_64/root/etc/mtab
DEBUG: touching file: /var/lib/mock/mock_fedora-18-x86_64/root/etc/fstab
DEBUG: touching file: /var/lib/mock/mock_fedora-18-x86_64/root/var/log/yum.log
DEBUG: configure yum
DEBUG: configure yum priorities
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum/pluginconf.d
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum/pluginconf.d
DEBUG: configure yum rhnplugin
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/etc/yum/pluginconf.d
Start: device setup
DEBUG: remove tree: /var/lib/mock/mock_fedora-18-x86_64/root/dev
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/dev/pts
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/dev/pts
DEBUG: ensuring that dir exists: /var/lib/mock/mock_fedora-18-x86_64/root/dev/shm
DEBUG: creating dir: /var/lib/mock/mock_fedora-18-x86_64/root/dev/shm
DEBUG: kver == 3.7.8-202.fc18.x86_64
Finish: device setup
Start: yum update
DEBUG: Executing command: ['/bin/mount', '-n', '-t', 'proc', 'proc', '/var/lib/mock/mock_fedora-18-x86_64/root/proc'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '-t', 'sysfs', 'mock_chroot_sys', '/var/lib/mock/mock_fedora-18-x86_64/root/sys'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '-t', 'tmpfs', 'mock_chroot_shmfs', '/var/lib/mock/mock_fedora-18-x86_64/root/dev/shm'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '-t', 'devpts', '-o', 'gid=5,mode=0620,ptmxmode=0666,newinstance', 'mock_chroot_devpts', '/var/lib/mock/mock_fedora-18-x86_64/root/dev/pts'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '--bind', '/var/cache/mock/mock_fedora-18-x86_64/yum_cache/', '/var/lib/mock/mock_fedora-18-x86_64/root/var/cache/yum'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '--bind', '/var/cache/mock/mock_fedora-18-x86_64/ccache/', '/var/lib/mock/mock_fedora-18-x86_64/root/tmp/ccache'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/mount', '-n', '--bind', '/tmp/mock-selinux-plugin.IFZwJ5', '/var/lib/mock/mock_fedora-18-x86_64/root/proc/filesystems'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: ['/usr/bin/yum', '--installroot', '/var/lib/mock/mock_fedora-18-x86_64/root/', 'groupinstall', 'buildsys-build']
DEBUG: Executing command: ['/usr/bin/yum', '--installroot', '/var/lib/mock/mock_fedora-18-x86_64/root/', 'groupinstall', 'buildsys-build', '--setopt=tsflags=nocontexts'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}
DEBUG: Attenzione: Il gruppo buildsys-build non esiste.
DEBUG: Child return code was: 0
Finish: yum update
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/mock_fedora-18-x86_64/root/proc/filesystems'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/mock_fedora-18-x86_64/root/tmp/ccache'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/mock_fedora-18-x86_64/root/var/cache/yum'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/mock_fedora-18-x86_64/root/dev/pts'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/mock_fedora-18-x86_64/root/dev/shm'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/mock_fedora-18-x86_64/root/sys'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/mock_fedora-18-x86_64/root/proc'] with env {'LANG': 'it_IT.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG: Child return code was: 0
ERROR: Exception(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm) Config(mock_fedora-18-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/mock_fedora-18-x86_64/result
ERROR: Could not find useradd in chroot, maybe the install failed?
DEBUG: kill orphans
$

Inoltre, se si prova a passare il comando --shell a mock, che mi aiuterebbe a risolvere la questione, l'applicativo mi dice che non trova il file o la directory e restituisce questo:

$ mock -r fedora-18-x86_64 --rebuild ~/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm --shell
INFO: mock.py version 1.1.28 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: lock buildroot
Start: device setup
Finish: device setup
Start: shell
Finish: shell
Traceback (most recent call last):
  File "/usr/sbin/mock", line 539, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 798, in main
    sys.exit(chroot.shell(options, cmd))
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 729, in shell
    cmd=cmd)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 409, in doshell
    return subprocess.call(cmdstr, preexec_fn=preexec, env=environ, shell=True)
  File "/usr/lib64/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
$

è un bug o sono io che sbaglio?

Ho provato rimuovendo dal file di config di mock tutte le voci relative ai repo e creando in altro modo il repo, aggiungendo questo al file /etc/mock/mock_fedora-18-x86_64.cfg:

config_opts['files']['/etc/yum.repos.d/local.repo'] = """
[local]
name=F18 x86_64 - local
failovermethod=priority
baseurl=file:///mnt/mock_repo/x86_64
enabled=1
"""

ma ancora non funziona e dice:

[...]
Start: device setup
Finish: device setup
Start: yum update
ERROR: Exception(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm) Config(mock_fedora-18-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/mock_fedora-18-x86_64/result
ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/mock_fedora-18-x86_64/root/', 'groupinstall', 'buildsys-build', '--setopt=tsflags=nocontexts']
Non ci sono repository abilitati.
 Eseguire "yum repolist all" per vedere la lista dei repository.
 E' possibile abilitare i repository desiderati con yum-config-manager --enable <repo>

$

ma non so come dare quel comando dentro a un chroot "automatico"; il comando comunque dovrebbe essere inutile perché è già selezionato enabled=1.


Qualcuno ha un idea del perché mi restituisce Could not find useradd in chroot, maybe the install failed? e dove sbaglio? San google mi ha trovato solo questa mail interessante, però è del 2006.

Intanto grazie a tutti per l'attenzione,
buona serata.


Documentation Admin                ~~~~~                La pigrizia sterminerà l'umanità.

Non in linea

#2 20-02-2013 00:17:27

mailga
Fedora Ambassador
Da Verderio Superiore (LC)
Registrato: 09-01-2006
Messaggi: 10'003

Re: Repository locale per mock

Lascio più che volentieri l'incombenza a Giallu.... Ne sa certo più di me.

:yeah:


e non diciamolo in un forum come questo e davanti a Virus...

Non in linea

#3 20-02-2013 00:19:49

bebo_sudo
Collaboratore
Da Trento+Trieste
Registrato: 28-02-2011
Messaggi: 1'665
Sito web

Re: Repository locale per mock

Questi moderatori........ :hammer:

Buonanotte smile


Documentation Admin                ~~~~~                La pigrizia sterminerà l'umanità.

Non in linea

#4 20-02-2013 10:17:03

MarioS
Master of the unknown Universe
Da Trieste
Registrato: 31-12-2005
Messaggi: 10'935
Sito web

Re: Repository locale per mock

Ti basta creare un normale repo per yum locale...Poi crei il file di configurazione per mock in modo che punti a quel determinato repo.
Ma non vedo molto il senso di ciò. Se il tuo obiettivo è velocizzare la creazione dei pacchetti meglio usare l'opzione --no-clean di mock finché aggiusti il tuo spec file. Poi quando hai completato il tutto dai una ricostruzione del pacchetto "da zero" per sicurezza.


Ciao da me che sono io!!!!!
E...Partecipa al Fedora Project

Non in linea

#5 20-02-2013 21:32:37

giallu
Collaboratore
Da Perugia
Registrato: 22-01-2009
Messaggi: 103
Sito web

Re: Repository locale per mock

Quello che ha detto MarioS smile. Aggiungo che mock usa un caching abbastanza aggressivo dei pacchetti. Dopo la prima volta che viene invocato si salva un archivio con i pacchetti base e questo viene riutilizzato per i run successivi invece di andare online. Anche i buildrequire del pacchetto corrente sono nella cache (di yum) quindi a meno di avere già un mirror locale per altri motivi non mi aspetto grossi miglioramenti.

Nello specifico, il bug non è un bug: tu hai una root incompleta e non mi stupisce che non riesci ad entrarci con mock --shell. Comunque, lo devi sistemare da fuori: è lo yum del sistema che si occupa di popolare la chroot.

Prova, tanto per vedere che sia tutto a posto:

mock -r fedora-18-x86_64 init

e poi

mock -r fedora-18-x86_64 shell

in questo modo dovresti riuscire ad entrare correttamente.

Ultima modifica di giallu (21-02-2013 22:17:03)


Gianluca Sforna - Fedora Ambassador
http://morefedora.blogspot.com

Non in linea

#6 25-02-2013 12:12:41

bebo_sudo
Collaboratore
Da Trento+Trieste
Registrato: 28-02-2011
Messaggi: 1'665
Sito web

Re: Repository locale per mock

Ciao, intanto grazie per le risposte.
Intendevo fare un repository in locale, per provare questo, perché nel wiki del fedoraproject non è documentato. C'è una pagina di bozza, ma è vecchia e non credo sinceramente funzioni.

MarioS ha scritto:

Ti basta creare un normale repo per yum locale...Poi crei il file di configurazione per mock in modo che punti a quel determinato repo.

è quello che avevo già tentato di fare, ma non funziona, da sempre lo stesso errore.

[...]
Start: device setup
Finish: device setup
Start: yum update
ERROR: Exception(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.1.fc18.src.rpm) Config(mock_fedora-18-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/mock_fedora-18-x86_64/result
ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/mock_fedora-18-x86_64/root/', 'groupinstall', 'buildsys-build', '--setopt=tsflags=nocontexts']
Non ci sono repository abilitati.
 Eseguire "yum repolist all" per vedere la lista dei repository.
 E' possibile abilitare i repository desiderati con yum-config-manager --enable <repo>
$

Forse è perché ho inserito uno "slash" di troppo?

/etc/mock/site-defaults.cfg ha scritto:

[...]
# config_opts['files']['path/name/no/leading/slash'] = "put file contents here."
[...]

Ho un altro dubbio..forse l'errore è perché mock è un chroot e quindi non può vedere le cartelle nel mio hard disk "reale"?
Creando un semplice server http, magari con SimpleHTTPServer, si può bypassare il problema? O magari inserendo il percorso alla cartella con gli rpm dentro alle configurazioni di mock, in modo che li integri nel chroot, si può risolvere??

Ciao a tutti e grazie per l'attenzione smile

Edit:
@giallu
provato con init e shell, ma non ho il computer sotto mano e non posso riportarti il risultato. Comunque non funzionava.

Ultima modifica di bebo_sudo (25-02-2013 12:13:45)


Documentation Admin                ~~~~~                La pigrizia sterminerà l'umanità.

Non in linea

#7 10-03-2013 00:56:37

bebo_sudo
Collaboratore
Da Trento+Trieste
Registrato: 28-02-2011
Messaggi: 1'665
Sito web

Re: Repository locale per mock

@giallu
Chiedo perdono, avevi ragione smile

$ mock -r fedora-18-x86_64 init
INFO: mock.py version 1.1.29 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: lock buildroot
Start: clean chroot
INFO: chroot (/var/lib/mock/fedora-18-x86_64) unlocked and deleted
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
Start: lock buildroot
Mock Version: 1.1.29
INFO: Mock Version: 1.1.29
INFO: calling preinit hooks
INFO: enabled root cache
Start: unpacking root cache
Finish: unpacking root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Start: device setup
Finish: device setup
Start: yum update
Start: Outputting list of available packages
Finish: Outputting list of available packages
Finish: yum update
Finish: lock buildroot
Finish: chroot init
INFO: Installed packages:
Finish: run
[makerpm@alb-fedo ~]$ mock -r fedora-18-x86_64 shell
INFO: mock.py version 1.1.29 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: lock buildroot
Start: device setup
Finish: device setup
Start: shell
<mock-chroot>[root@alb-fedo /]# ll /etc/yum.repos.d/
totale 12
-rw-r--r--. 1 root root 1145 20 dic 06.21 fedora.repo
-rw-r--r--. 1 root root 1105 20 dic 06.21 fedora-updates.repo
-rw-r--r--. 1 root root 1163 20 dic 06.21 fedora-updates-testing.repo
<mock-chroot>[root@alb-fedo /]# 

A causa della mia connessione però ci ha messo una ventina di minuti per scaricare il necessario a una configurazione "normale". Ormai oltre alla connessione è diventata anche una questione di principio.

Credo che il mio dubbio che essendo dentro a un chroot non vedesse le mie partizioni fosse fondato. Credo che dovrei montare la directory che uso come repository dentro al chroot (qualcosa del genere), ma da mock non saprei come fare.

Ho provato invece questa strada:

$ cd /mnt/mock_repo/
$ createrepo -c .cache x86_64/
Spawning worker 0 with 86 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
$ 

ed ora:

$ cd /mnt/mock_repo/x86_64/ && python -m SimpleHTTPServer &
[1] 22089
Serving HTTP on 0.0.0.0 port 8000 ...

e collegandomi a me stesso:

$ lynx 127.0.0.1:8000
Directory listing for /
     ______________________________________________________________________________________________________________________________

     * .cache/
     * atk-2.6.0-1.fc18.x86_64.rpm
     * atkmm-2.22.6-2.fc18.x86_64.rpm
     * audit-libs-2.2.2-3.fc18.x86_64.rpm
     * avahi-libs-0.6.31-6.fc18.x86_64.rpm
     * bash-4.2.42-3.fc18.x86_64.rpm
     * bzip2-1.0.6-7.fc18.x86_64.rpm
     * cairo-1.12.10-2.fc18.x86_64.rpm
     * cairomm-1.10.0-5.fc18.x86_64.rpm
     * celt-0.11.1-4.fc18.x86_64.rpm
     * cmake-2.8.10.2-3.fc18.x86_64.rpm
     * coreutils-8.17-8.fc18.x86_64.rpm
     * cpio-2.11-12.fc18.x86_64.rpm
     * cracklib-2.8.22-2.fc18.x86_64.rpm
     * cups-libs-1.5.4-20.fc18.x86_64.rpm
     * diffutils-3.2-11.fc18.x86_64.rpm
     * findutils-4.5.10-5.fc18.x86_64.rpm
     * gawk-4.0.1-2.fc18.x86_64.rpm
....
     * pixman-0.26.2-5.fc18.x86_64.rpm
     * portaudio-19-14.fc18.x86_64.rpm
     * portaudio-devel-19-14.fc18.x86_64.rpm
     * repodata/
     * rpm-build-4.10.3.1-1.fc18.x86_64.rpm
     * SDL-devel-1.2.15-3.fc18.x86_64.rpm
     * sed-4.2.1-10.fc18.x86_64.rpm
     * SFML-1.6-7.fc18.x86_64.rpm
     * SFML-devel-1.6-7.fc18.x86_64.rpm
     * shadow-utils-4.1.5.1-2.fc18.x86_64.rpm
     * SOIL-1.07-7.20080706.fc18.x86_64.rpm
     * systemd-libs-197-1.fc18.1.x86_64.rpm
     * tar-1.26-9.fc18.x86_64.rpm
     * unzip-6.0-7.fc18.x86_64.rpm
     * util-linux-2.22.2-3.fc18.x86_64.rpm
     * which-2.20-4.fc18.x86_64.rpm
     * xz-libs-5.1.2-2alpha.fc18.x86_64.rpm

Il file di configurazione di mock è così adesso:

[makerpm@alb-fedo mock_repo]$ cat /etc/mock/mock_fedora-18-x86_64.cfg 
config_opts['root'] = 'mock_fedora-18-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'fc18'  # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=


# repos

[local]
name=F18 x86_64 - local
failovermethod=priority
baseurl=http://localhost:8000
enabled=1

"""

ma provando a lanciare il mock ottengo questo:

$ mock -r mock_fedora-18-x86_64 --rebuild ~/rpmbuild/SRPMS/vbam-1.8.0-r1159.2.fc18.src.rpm
INFO: mock.py version 1.1.29 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Start(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.2.fc18.src.rpm)  Config(mock_fedora-18-x86_64)
Start: lock buildroot
Start: clean chroot
INFO: chroot (/var/lib/mock/mock_fedora-18-x86_64) unlocked and deleted
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
Start: lock buildroot
Mock Version: 1.1.29
INFO: Mock Version: 1.1.29
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Start: device setup
Finish: device setup
Start: yum update
localhost.localdomain - - [10/Mar/2013 00:49:30] "GET /repodata/repomd.xml HTTP/1.1" 200 -
Start: Outputting list of available packages
localhost.localdomain - - [10/Mar/2013 00:49:31] "GET /repodata/repomd.xml HTTP/1.1" 200 -
Finish: Outputting list of available packages
Finish: yum update
ERROR: Exception(/home/makerpm/rpmbuild/SRPMS/vbam-1.8.0-r1159.2.fc18.src.rpm) Config(mock_fedora-18-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/mock_fedora-18-x86_64/result
ERROR: Could not find useradd in chroot, maybe the install failed?
$

Quelle righe in mezzo mi assicurano che i file sono stati scaricati, ma non sembra che yum li "digerisca"? Secondo me manca un dettaglio stupido...

Se qualcuno ha idee è il benvenuto, intanto buonanotte. smile


Documentation Admin                ~~~~~                La pigrizia sterminerà l'umanità.

Non in linea

Piè di pagina