[arch-general] Howto fix yum-createrepo PKGBUILD from AUR? (rpm is replaced by rpm-org - now rpm module missing?)
Guys, How do I fix the yum-createrepo PKGBUILD so that yum-createrepo looks for the module 'rpm-org' instead of looking for the outdated 'rpm' module? In the PKGBUILD, the depends currently is: depends=('python' 'python-lxml' 'rpm' 'yum') However, 'rpm-org' now provides 'rpm' so the depends line needs to be: depends=('python' 'python-lxml' 'rpm-org' 'yum') The problem is that when you build yum-createrepo with 'rpm-org' it fails with the following error: [12:19 archangel:/home/backup/rpms] # createrepo --update -d openSUSE_11.3/ Traceback (most recent call last): File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module> import createrepo File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 22, in <module> import yumbased File "/usr/lib/python2.6/site-packages/createrepo/yumbased.py", line 19, in <module> import rpm ImportError: No module named rpm So it looks to me like it tries to 'import rpm' and fails because 'package rpm' isn't installed, instead the new package 'rpm-org' is installed and provides rpm: 12:28 archangel:~/arch/pkg/bld/yum-createrepo> rpm --version RPM version 4.8.0 So what do I need to fix (by patch, symlink somewhere in python, or otherwise) to cure this problem? Currently I'm making an outline for what it takes to install createrepo and repoview on Arch for managing rpm repositories. There are quite a number of steps required to do this. For those interested, here is the sequence so far: Install beecrypt http://aur.archlinux.org/packages.php?ID=16387 (download tarball, untar/ungzip, cd into directory) makepkg -s sudo pacman -U beecrypt-4.2.1-2-x86_64.pkg.tar.xz Installl rpm-org http://aur.archlinux.org/packages.php?ID=30317 (download tarball, untar/ungzip, cd into directory) makepkg -s sudo pacman -U rpm-org-4.8.0-3-x86_64.pkg.tar.xz Install yum-metadata-parser http://aur.archlinux.org/packages.php?ID=22978 (OUT OF DATE -- here is the updated PKGBUILD) (download tarball, untar/ungzip, cd into directory) fix PKGBUILD as follows: # Maintainer: Chris Tusa <linisys@gmail.com> pkgname=yum-metadata-parser pkgver=1.1.4 pkgrel=2 pkgdesc="C-based metadata parser to quickly parse xml metadata into sqlite databases." arch=('i686' 'x86_64') license=('GPL') url="http://yum.baseurl.org/" groups=('lib') depends=('python' 'glib2') source=(http://yum.baseurl.org/download/yum-metadata-parser/${pkgname}-${pkgver}.tar.gz) md5sums=('05289971e5cfde532631f2a99f6c58c7') build() { cd ${srcdir}/${pkgname}-${pkgver} python ./setup.py build || return 1 python ./setup.py install --prefix=${pkgdir}/usr || return 1 } makepkg -s sudo pacman -U yum-metadata-parser-1.1.4-2-x86_64.pkg.tar.xz Install python-iniparse http://aur.archlinux.org/packages.php?ID=22977 (download tarball, untar/ungzip, cd into directory) makepkg -s sudo pacman -U python-iniparse-0.4-1-x86_64.pkg.tar.xz Install yum http://aur.archlinux.org/packages.php?ID=22976 (download tarball, untar/ungzip, cd into directory) makepkg -s Targets (2): python-pycurl-7.19.0-4 urlgrabber-3.9.1-1 <snip> sudo pacman -U yum-3.2.28-1-x86_64.pkg.tar.xz Install yum-createrepo http://aur.archlinux.org/packages.php?ID=22951 (OUT OF DATE -- here is the updated PKGBUILD) (download tarball, untar/ungzip, cd into directory) fix PKGBUILD as follows (In work - not finished) : # Maintainer: Chris Tusa <linisys@gmail.com> pkgname=yum-createrepo pkgver=0.9.8 pkgrel=3 pkgdesc="A tool to create yum repositories from ArchLinux systems." arch=('i686' 'x86_64') license=('GPL') url="http://createrepo.baseurl.org" groups=('system') depends=('python' 'python-lxml' 'rpm-org' 'yum') source=(http://createrepo.baseurl.org/download/createrepo-${pkgver}.tar.gz createrepo0.patch createrepo1.patch) md5sums=('e37418bebb559e7420532574c1bdb18c' 'b074d7ccf1327346570ce14592470b05' 'b63a92689cfb7d4aea1cd0c7a0f55c56') build() { cd ${srcdir}/createrepo-${pkgver} # Apply Makefile patches to rename files during install cd ${srcdir}/createrepo-${pkgver}/docs patch -p1 < ${srcdir}/createrepo0.patch cd ${srcdir}/createrepo-${pkgver}/bin patch -p1 < ${srcdir}/createrepo1.patch cd ${srcdir}/createrepo-${pkgver} make || return 1 make DESTDIR=${pkgdir} install || return 1 } makepkg -s Targets (1): python-lxml-2.2.8-1 <snip> sudo pacman -U yum-createrepo-0.9.8-3-x86_64.pkg.tar.xz NOTE: yum-createrepo fails (rpm/rpm-org issue) with: [12:19 archangel:/home/backup/rpms] # createrepo --update -d openSUSE_11.3/ Traceback (most recent call last): File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module> import createrepo File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 22, in <module> import yumbased File "/usr/lib/python2.6/site-packages/createrepo/yumbased.py", line 19, in <module> import rpm ImportError: No module named rpm Install kid http://aur.archlinux.org/packages.php?ID=2831 (download tarball, untar/ungzip, cd into directory) makepkg -s sudo pacman -U kid-0.9.6-4-x86_64.pkg.tar.xz Install repoview (to gen html pages for rpms) http://aur.archlinux.org/packages.php?ID=35377 (download tarball, untar/ungzip, cd into directory) makepkg -s sudo pacman -U repoview-0.6.5-1-any.pkg.tar.xz -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
On 09/14/2010 12:35 PM, David C. Rankin wrote:
Guys,
How do I fix the yum-createrepo PKGBUILD so that yum-createrepo looks for the module 'rpm-org' instead of looking for the outdated 'rpm' module? In the PKGBUILD, the depends currently is:
depends=('python' 'python-lxml' 'rpm' 'yum')
However, 'rpm-org' now provides 'rpm' so the depends line needs to be:
depends=('python' 'python-lxml' 'rpm-org' 'yum')
The problem is that when you build yum-createrepo with 'rpm-org' it fails with the following error:
[12:19 archangel:/home/backup/rpms] # createrepo --update -d openSUSE_11.3/ Traceback (most recent call last): File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module> import createrepo File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 22, in <module> import yumbased File "/usr/lib/python2.6/site-packages/createrepo/yumbased.py", line 19, in <module> import rpm ImportError: No module named rpm
So it looks to me like it tries to 'import rpm' and fails because 'package rpm' isn't installed, instead the new package 'rpm-org' is installed and provides rpm:
Here is a bit more info from the createrepo guys on the rpm/rpm-org module issue: <david_atty> Ok, I have beecrypt, rpm-org, yum-metadata-parser, python-iniparse, yum, and yum-createrepo installed, but I have a 'modules' problem because 'rpm-org' provides rpm for Arch and not a 'rpm' package. How do I fix createrepo to look for module 'rpm-org' instead of 'rpm'? <geppetto> AFAIK you can't have modules with a hyphen in them <geppetto> And, IMNSHO, calling the rpm module anything but rpm is insanity <geppetto> Either call rpm5 the rpm5 module … or fix it to make it compatible <geppetto> Or give up <david_atty> hmm.. I agree, can I symlink something in the python dir? <geppetto> Yeh, AFAIK symlinks work fine there … although as with anything you have the rpm problem where you can't change from a symlink to a dir. or back <david_atty> The funny thing is the executable 'rpm' is there and works fine, I'll poke around in python (which I no nothing about) to see if I can find the rpm-org module and either link or try to rebuild it so it thinks it's rpm. Thanks. Your thoughts devs? -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
On 09/14/2010 12:43 PM, David C. Rankin wrote:
Guys,
How do I fix the yum-createrepo PKGBUILD so that yum-createrepo looks for the module 'rpm-org' instead of looking for the outdated 'rpm' module? In the PKGBUILD, the depends currently is:
The key is to use the "orphaned" rpm package in AUR. The PKGBUILD is still current for rpm-5.1.9, so it works fine. After removing rpm-org and installing rpm, all is good. I'll update the notes I have and re-post under a new thread. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
participants (1)
-
David C. Rankin