Page 1 of 1

[SOLVED] URPMI and local repo problem.

PostPosted: Apr 1st, '12, 19:46
by richardwest
I'm attempting to build my own mini distro for my EeePC 701 with KDE-3.5.

I've been using Unity-Linux but as I use Mageia as my desktop, I thought I'd try building on a Mageia base.

That's the background but the problem is that when I add my own repo to URPM, it doesn't read the RPM correctly and thus fails to install.

For instance:-
Code: Select all
Installation failed, some files are missing:
    /home/richard/data/repo/acpi-eeepc-generic-1.0-0.20100925.2.noarch.rpm
You may need to update your urpmi database.

However the real name of the package is:-
Code: Select all
acpi-eeepc-generic-1.0-0.20100925.2-rose2011.noarch.rpm

Note that URPMI misses out the "rose2011" bit.

It seems to be related to http://permalink.gmane.org/gmane.linux.mandrake.cooker.devel/308403

Is this a bug or am I missing something obvious?

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 20:26
by doktor5000
How do you add your repository, and are you running Mageia 1 or cauldron?
Also how did you generate the metadata (hdlists) for this repository?

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 20:57
by richardwest
Hi, I'm running Mageia 1.
Added repo manually
Code: Select all
urpmi.addmedia local file://home/richard/data/repo/
and via MCC>Configure media sources for install and update>file>add a custom medium.(After deleting it.)

metadata generated with
Code: Select all
genhdlist2 --clean /home/richard/data/repo


I get the same results on two machines, one fully updated and one fresh install.

It gives the same results on a local folder, a NFS share and on an ftp remote site.

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 21:20
by doktor5000
Under which distribution were those packages created, and what did the .rpmmacros file used during building contain, if you happen to know?
Also please show the output of
Code: Select all
rpm -qpi /home/richard/data/repo/acpi-eeepc-generic-1.0-0.20100925.2-rose2011.noarch.rpm

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 21:52
by wilcal
I ran a local repo for Mandriva for years and then
switched over to Mageia. I now have a full local
repo for both Mageia 1 and Cauldron ( Mageia 2 ).
Three steps for this.

1. What mirror do I use and how do I copy that mirror
to a local directory?

2. How do I install using the local repo

3. How do I set up my local repo as my media source.


#1 I create a cron script file in /etc/cron.daily that
executes the following command:

rsync -aruH --delete rsync://mirrors.kernel.org/mirrors/mage ... ib/1/i586/ /home/mageia/distrib/1/i586

Do note that I am using mirrors.kernel.org as my source.
I can get upwards of 2MB/s data rates from this source.
I also have built a Custom Command in Webmin such that
I can execute this script file whenever I want. So every
morning when I get up, and if needed, look to see what
got updated at the 4AM cron execution time.


#2 Using the boot.iso file I can install via LAN and
my local repo. When asked in the boot.iso menu

IP is 192.168.1.2
Directory: /distrib/1/i586
ID: mageia
PW: xxxxxx

boot.iso will now load the install program from my
local repo and install using all the latest updates.


#3 If I install using a Live-CD or DVD release when
that is finished I use the following script to set
up the new install with my local repo:

In an su terminal

urpmi.removemedia -a

to remove any preexisting sources

then:

clear
urpmi.addmedia core ftp://mageia:xxxxx@192.168.1.2//distrib ... re/release with media_info/hdlist.cz
urpmi.addmedia --update core_updates ftp://mageia:xxxxx@192.168.1.2//distrib ... re/updates with media_info/hdlist.cz
urpmi.addmedia nonfree ftp://mageia:xxxxx@192.168.1.2//distrib ... ee/release with media_info/hdlist.cz
urpmi.addmedia --update nonfree_updates ftp://mageia:xxxxx@192.168.1.2//distrib ... ee/updates with media_info/hdlist.cz
urpmi.addmedia tainted ftp://mageia:xxxxx@192.168.1.2//distrib ... ed/release with media_info/hdlist.cz
urpmi.addmedia --update tainted_updates ftp://mageia:xxxxx@192.168.1.2//distrib ... ed/updates with media_info/hdlist.cz
clear
urpmi.update -a
sleep 10
exit
exit
(1 space)

this script then adds, and checks, only the above parts of the
repos then closes the terminal. I could add more but for a first
install this works for me.

Do count on about 40GB for each part of the distro. 40GB for
32-bit Mageia, 40GB for 64-bit Mageia. Mandriva was getting
upwards of 50GB for 32-bit Mandriva. Mageia 1, 32-bit in
my local repo is right at 41.4GB today. Mageia 2 32-bit
is at 33.9GB today. These things can easily have upwards
of 30,000 files in them. I figure I need at or more then
200GB of disk space to house Mageia 1 & 2. Figure another
80GB for Cauldron ( Mageia 3 ). My LAN Server ( Mageia 1 )
has a 1TB drive in it. My ISP allows me 250GB of bandwidth
usage per month. I'll typically use about 100GB of that.

Depending on your WAN bandwidth it only kinda makes sense
if you have more then three computers. Or. When I do a test
install I control when the repo updates so therefore I can
do an install, and update, and not have the repo move when
I do that.

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 22:17
by richardwest
doktor5000,

The RPMs were built under what is basically a Unity-Linux 2010 system with RPM5, yes, I know, asking for trouble.

.rpmmacros
Code: Select all
%_topdir        /home/richard/src/rpm
%_tmppath       /home/richard/src/tmp
 
%_enable_debug_packages  %{nil}
%debug_package           %{nil}
%distribution    rose
%vendor          rose
%distsuffix      rose
%packager   richardwest


Code: Select all
[richard@elliott ~]$ rpm -qpi /home/richard/data/repo/acpi-eeepc-generic-1.0-0.20100925.2-rose2011.noarch.rpm
Name        : acpi-eeepc-generic           Relocations: (not relocatable)
Version     : 1.0                               Vendor: rose
Release     : 0.20100925.2                  Build Date: Wed 14 Mar 2012 22:04:48 GMT
Install Date: (not installed)               Build Host: localhost.localdomain
Group       : Monitor                       Source RPM: acpi-eeepc-generic-1.0-0.20100925.2.src.rpm
Size        : 119149                           License: GPLv3
Signature   : (none)
Packager    : richardwest
URL         : http://code.google.com/p/acpi-eeepc-generic/
Summary     : ACPI scripts for EeePC netbook computers
Description :
ACPI scripts for EeePC netbook computers (700, 701, 900, 900A, 901,
904HD, S101, 1000, 1000H, 1000HD, 1000HE, 1005HA, 1005-HA-H, 1005PE,
1006P, 1008HA, 1201N, 1201T T91MT

It is recommended that you append acpi_osi=Linux to your kernel boot
options, and only after rebooting with that option can you "modprobe
eeepc_laptop"


I CAN install the RPMs . If I click on the file it opens with URPMI and installs without a problem. In fact I'm happily running KDE3 Quanta from the same repo, on this Mageia 1 install, although I had to install it and it's dependancies manually.

If I can sort out the repo problem, I intend to rebuild all my packages under Mageia anyway.

--------------------------------

wilcal,

Thanks for your reply but my problem is not setting up local repos for Mageia but additional repo for my own packages and URPMI or genhdlist2 not reading the filenames correctly.

Re: URPMI and local repo problem.

PostPosted: Apr 1st, '12, 23:02
by richardwest
Renamed the RPM file and took out the "-rose2011", reran genhdlist2 reloaded and it then installed without a hitch, so it is only the naming that is a problem. Why though, is the question.

Re: URPMI and local repo problem.

PostPosted: Apr 2nd, '12, 22:41
by doktor5000
Well, the rose2011 should appear in the release string, then it would be no problem. Under Mageia and older Mandriva with rpm.org this is done through the mkrel macro via distsuffix and distversion macros, for mandriva's and unity's rpm5 implementation best ask Per Oyving or one of the Unity guys, maybe Matthew Dawkins can explain you the difference.

Re: URPMI and local repo problem.

PostPosted: Apr 3rd, '12, 00:15
by richardwest
doktor5000 wrote:Well, the rose2011 should appear in the release string, then it would be no problem. Under Mageia and older Mandriva with rpm.org this is done through the mkrel macro via distsuffix and distversion macros, for mandriva's and unity's rpm5 implementation best ask Per Oyving or one of the Unity guys, maybe Matthew Dawkins can explain you the difference.


I won't pretend to understand, but rebuilding from the same SRPM on a Mageia system, I end up with a slightly different RPM name which works as expected so the problem is an incompatibility between RPM5 and RPM.org packages. Not too unexpected really ;)

In other words the perceived problem is one of my own making.

I think this can now be marked as solved.

Re: URPMI and local repo problem.

PostPosted: Apr 3rd, '12, 23:15
by doktor5000
richardwest wrote:the problem is an incompatibility between RPM5 and RPM.org packages. Not too unexpected really ;)

Definitely, i could have told you before if you would have mentioned explicitly that you tried to directly install RPM5 packages.

Re: URPMI and local repo problem.

PostPosted: Apr 4th, '12, 14:31
by richardwest
doktor5000 wrote:
richardwest wrote:the problem is an incompatibility between RPM5 and RPM.org packages. Not too unexpected really ;)

Definitely, i could have told you before if you would have mentioned explicitly that you tried to directly install RPM5 packages.


I was sidetracked by the fact that the RPMs would install manually and worked fine.

Thanks for your time and sorry I wasted some of it. :oops:

Re: [SOLVED] URPMI and local repo problem.

PostPosted: Apr 6th, '12, 18:52
by doktor5000
Well, it depends whether you install it via urpmi or use rpm directly. And no, you certainly didn't waste any time, don't hesitate to ask questions if something is unclear to you.