Some lesser-known urpmi tricks I’ve had to figure out today. The situation is that the machine that had my mirrored files has been moved somewhere else in order to ease up on rsync being an absolute bandwidth pig (great for downloading, bad when it’s throwing nagios checks into fits).

Anyways, I’ve setup both a private rsync repository to get stuff from and an IP-restricted anonymous FTP. Both instances didn’t work “out of the box” with urpmi. For one, with rsync it wasn’t possible to use the password transparently. That can be fixed with the $RSYNC_PASSWORD environment variable but it’s fugly. With curl, I’m behind a firewall and so is the remote system, and when it dropped into PASSV mode, it was using the remote’s internal 192.* IP address rather than it’s external IP, which was causing curl to do a whole lot of nothing.

The rsync fix consisted of writing the rsync password for the user into /root/.rsyncpw (only root calls urpmi anyways), then putting at the top of /etc/urpmi/urpmi.cfg this:

{ rsync-options: --password-file /root/.rsyncpw }

Thanks, Pixel, for that. Which led me to figuring out the curl issue. At first I set “ftp-skip-pasv-ip” into ~/.curlrc and then realized (when it didn’t work) that urpmi calls curl with “-q” which basically tells curl to completely ignore any config files. Aaarg! So back to /etc/urpmi/urpmi.cfg to set:

{ curl-options: --ftp-skip-passv-ip }

And now everything works peachy (if you need both, like me, then you’d have both options defined, one per line, in between the initial “{ … }” of the file. A comment in there indicating that’s for custom configuration would be nice. =)

Anyways, this may help a few people out there… googling for this led me nowhere.

Share on: TwitterLinkedIn

Related Posts





Stay in touch