Skip to main content

Configuring urpmi-proxy for Mageia


Not much has been mentioned about urpmi-proxy for Mageia. In theory, urpmi-proxy works as a local proxy for a Mageia repository. You set it as the source repository for all your machines and it downloads and distributes only what packages you need.

For the most part, little configuration is needed "out of the box". It is configured by default to use the existing repositories that are already configured on the host/server machine but as pointed out, this creates a recursive loop should you update the server itself. The Wiki docs explain how to circumvent this issue.

There are other package management systems available from Mageia, notably dnf which will become the standard system only after the Mageia build system, dependent on urpmi, can be translated to dnf

Configuring the Server

Simply invoke

$ sudo urpmi urpmi-proxy

And this will also install the apache webserver, which is used to serve the files to your other machines. Then restart Apache.

$ sudo systemctl restart httpd.service

This will configure your urpmi-proxy server. There are other configuration options that can be modified in the well-commented configuration file. It can now serve files for any release version and architecture that is available from the server you selected from the database.

Set apache to start at every boot and then start it.

$ sudo chkconfig httpd on
$ sudo systemctl start httpd.service


Configure the Client Machine

You need to remove the urpmi source already configured for the client machine by invoking

$ sudo urpmi.removemedia -a

And point it at your urpmi-proxy server with

$ sudo urpmi.addmedia --distrib http://my_server.com/mageia/distrib/9/x86_64

You can use your urpmi-proxy server to serve any version and any architecture by specifying the appropriate path in the command above.

My server is an older i586 box that has ample disk storage space and works fine for this purpose. I have not configured it to update itself with urpmi-proxy, so there is no recursion issue, but the Wiki docs explain how to address that.

Adding A Local Repository

I have a few self-made rpm files and some commercial applications. It would be nice to have these available to my network of Linux computers. Since my server install is slightly different (the i586 server I use does not use urpmi-proxy), I must create the expected file hierarchy from scratch, using the name extra as shown in the Wiki example.

$ sudo mkdir -p /var/lib/urpmi-proxy/repository/distrib/9/x86_64/media/extra/release/

Next, I populated the /release directory with files and created the index using

$ sudo genhdlist2 --allow-empty-media --no-bad-rpm --xml-info --clean /var/lib/urpmi-proxy/repository/distrib/9/x86_64/media/extra/release/

Finally, edit the media.cfg file to add

[extra/release]
hdlist=hdlist_extra_release.cz
name=Extra Release
media_type=release

and place the modified file in /var/lib/urpmi-proxy/repository/distrib/9/x86_64/media/media_info/

However, the Wiki is not clear as to where the media.cfg file can be found on the system. Add it to /etc/urpmi/mediacfg.d/Official-9-x86_64/media.cfg.

RESOURCES

HOWTO proxy rpm using urpmi-proxy, Mageia Forum

Urpmi-proxy, Mageia Wiki

Urpmi, Mageia Wiki

Mageia mirrors database

Add Special Repos to Mageia


Comments