Showing posts with label packages. Show all posts
Showing posts with label packages. Show all posts

Saturday, May 2, 2020

non-standard application managers -- wine, python, git, latex (pacman conflicts)

In most Linux distributions, there's a package manager ("PM") application we use to update our OS and any installed applications. The Arch PM is pacman, and full updates require an internet connection for its use. It's a relatively simple process:

# pacman -Syu

The problems begin with applications that have built-in package managers specific to that application. There's only a few, but they are often called upon and u. For example:

  1. LaTeX package manager =tlmgr (TeXLive)
  2. Git package manager = complicated unless at user level. If at user level, install git with pacman and run it as a user, it will just make a directory of source. Otherwise, git apparently downloads "clones" (versions) into /opt, but then generally you want to chmod the clone to foo:foo and move it to a ~/ directory for building, then pacman to install it.
  3. Python package manager = pip
  4. Wine package manager = complicated. Each dll installing in Wine attempts to update itself and will prompt for it. None should be authorized. Also, building a version of Wine that is custom configured for the MSoft app is critical, but the underlying Arch version of wine tends to wipe them out any time it is called.

Using any of these application-specific updaters within Arch leads to failures during the next "pacman". Don't use them at all except when knowing the workarounds (see below). Essentially, there are zero problems for users who install and update the Arch Linux OS and applications using only pacman. Again, the most reliable complete update command:

# pacman -Syu

...or for application removal...

# pacman -Rs

There's also one workaround in Arch that doesn't f*ck up the index: if I download source into some directory and run...

$ makepkg -si [somepkg]

... it will make the package, and then prompt me for the password for install ("-i" flag) at the end and perform a pacman -U [package] at the end of the make. This # pacman -U properly updates the pacman index. As far as I know, # pacman -U is the only way to install outside packages without farking an install. This also means we can reliably use # pacman -Rs to uninstall packages put in through this method.

1. LaTeX - tlmgr 5Gb

2022 edit: I now use pacman, until work on thesis or something, then can do a -Rsn uninstall and do it here.

Don't install any version of LaTex with pacman. It doesn't have enough templates.

Install Tex-Live (LaTeX) directly into a user subdirectory (eg. "/home/foo/latex") and update it through the TexLive PM (tlmgr), but only at the user level, so that no admin level changes, or files used by pacman are affected.

$ cd /home/foo/latex/bin/x86_64-linux
$ tlmgr update --self
$ tlmgr update --all

UNLESS, it's the next year and haven't updated. This is called a "cross-release" update. I had to download that year's update-tlmgr.sh and run it. Described further down in post and here.

2. Git - pacman + manually configure

This took me the longest to learn, as this site agrees. Configuring for upstreaming -- if using as VCS -- is time consuming, but it's different if downloading some source. Update the git app with pacman, update the sources using git commands. Here's the Arch page.

  1. install the foundational Git application using # pacman -S git.

3.Python - pip 2Gb

Nearly every program uses Python, so we want to be sure not to break our Python installation.

The solution required three independent solutions, all three of which I install. I select one of the solutions depending on what the application requires/expects.This solution takes up several gigabytes.

  • initialize a Colab account in Google. See my post here, because there's a few steps to it. Colab handles Jupyter-type operations online. I do this development online (and save files .PY to Drive). I used to do Jupyter environment on the desktop, and this was the heaviest pip user, disrupting pacman almost entirely. IMO, Colab is practically a godsend from Google.
  • when an application requires it, a pacman install of Python. Other applications installed using pacman, may also call for additional Python modules which they add to the basic Python, and/or they may also require an older version of Python to be installed.
  • using pacman install a virtual environment for the
For Python, we can use pip, and for LaTex we can use tlmgr, to upgrade or add features to each app. The overall OS also has a package manager. For Arch, this is pacman. We can use pacman to upgrade or add packages to the Arch OS, including adding Arch versions of Python and LaTeX. The problem is, any actions accomplished with pip or tlmgr are not recorded in the pacman application index. Discrepancies between pacman's index and pip and tlmgr operations lead to significant application and OS problems. Prevention requires decisions during installation.
Contents

problems

The Python case is more complicated to *solve* than the LaTeX situation, because a variety of applications depend on Python, unlike LaTeX. However, both situations equally *cause* pacman update fails for the same, indexing, reason, so that both the Python and the LaTeX cases must be solved.

Python

Many applications rely upon Python. More technically, Python is a dependency for for many applications.

Imagine some application with a Python dependency, say youtube-dl. Imagine that both Python and youtube-dl were installed by pacman. They both work fine. Now suppose the user decides to add a Python module using pip instead of pacman. Everything might be fine with some applications that depend on Python, but youtube-dl is an example of an application sensitive to Python changes. The youtube-dl app looks for versions of Python installed by Arch, but will instead detect versions updated by pip. This discrepancy in turn leads youtube-dl to spawn errors, and errors in turn lead to the application exiting. How can this be solved?

$ youtube-dl https://www.youtube.com/watch?v=QLpz7PtiP2k
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3259, in
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3242, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3271, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))

More drastically, this can happen with an entire OS. Say the user keeps his OS up to date with pacman, and decides to install Python using pacman. Later, he upgrades Python using Python's pip manager. Still later, the user attempts to update the entire OS, which is a pacman action. As part of its upgrade procedure, pacman verifies the integrity of all installed applications against its index. Since the changes made to Python via pip were not registered into pacman's version index, pacman cannot resolve the pip installed modules against the pacman index. These discrepancies cause the pacman update to exit with errors. No update will be accomplished. How can this be solved?

LaTeX

If having any problems with LaTeX updates, even the tug.org website recommends just replacing with latest edition. However, there is one workaround if things aren't more than a year or two old.

$ tlmgr update --self
tlmgr: Local TeX Live (2020) is older than remote repository (2021).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) -- --upgrade
See https://tug.org/texlive/upgrade.html for details.

For the problem above, download update-tlmgr-latest.sh, make it executable (chmod +x or file manager), and put it in /home/foo/latex or wherever your latex user-level top directory is at. Go into that directory and:

$ sh update-tlmgr-latest.sh -- --upgrade
$ tlmgr update --self
$ tlmgr update --all
.

Wine

Wine also can pull-in specific packages, when we try to make wine bottles. However, any time there's an OS update, pacman will write a new wine directory in ~/.wine. After it's overwritten, it will use that vanilla version instead of the wine bottle we built for the app. How can this be solved?

solutions

In the case of an app like youtube-dl, it's easy to uninstall the entire app (# pacman -Rns) and reinstall. Or to play with uninstalling its pieces until one has a hit

The levels of involvement vary, but the strategy is the same for both Python and for LaTeX: install these independently of Arch from the start, in /home/user directory, and then update any path statements necessary for the Arch installed apps to find the program. Once these are in at the user level, there's no problem updating them with pip and tlmgr, because the updates are strictly within one's home directory, not the larger Arch installation. Accordingly, one can add features at will, which is often desirable when running the latest Spyder or what have you. For LaTeX, it's even less of a hassle, because there are no dependencies: one just needs to update $PATH statements following install. One can create an install in either case using, eg. $ mkdir /home/foo/latex and similarly with Python, though perhaps using a new folder for any version changes.


In the case of the OS update failure, one has no pleasant choices :uninstall then reinstall all of Python (immense time drain), or update the OS using an override (# pacman -SyuI), which then leaves a potentially unstable Python install for its dependencies. This is true with LaTeX also, but nearly zero apps depend on LaTeX.

install notes

I've decided to use the 3rd party updaters to both install (Python - pip, LaTeX - tlmgr for TexLive), There are a couple of considerations.
  • Install in user-level directory
  • update path statements afterward, so the installation can find them. Path statements can be complex, because there are various Path statements to consider.

prevention

Sometimes one doesn't have a choice but to install packages via pip, but then what happens downstream with a pacman upgrade is ugly. It will look like this, and there's a couple of workarounds.
  • uninstall the pip upgrades, upgrade the system via pacman, then go back to pip and install whatever necessary pip packages.
  • add the --overwrite=* flag to the standard "Syu". This causes pacman to simply overwrite any python files that seem inaccurate. This places pacman in the boss position over pip, but it also farks-up the pip version of the installation which, downstream, is a b*tch.

Friday, November 18, 2016

pacman: update archlinux-keyring to solve corruption

I recently ran an update which did fine except for...
error: udiskie: signature from "Ambrevar " is unknown trust
:: File /var/cache/pacman/pkg/udiskie-1.5.1-1-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

After attempting several fixes and checking Arch forums, I stumbled across this manjaro forum. Sure enough:
# pacman -S archlinux-keyring
Following this, it was a simple
# pacman -S udiskie
to catch it up.

Friday, November 11, 2016

Rebuilding Fonts

Fonts, printers, scanners, sound, and usb connected items: have a sense a humor if you intend to deal seriously with these in Linux.

Anyway, too often during an Arch update, there will be a conflict in the fonts, sometimes between already installed fonts and one intending to update itself through pacman. When this happens, the entire update of all packages can be scotched when pacman exits, or perhaps the user will be forced to deal with /etc/fonts/fonts.conf in some immediate way.

Arch uses fontconfig, so I sometimes solve these conflicts by deleting everything inside /etc/fonts/. Since /etc/fonts/font.conf is eliminated along with other files, any conflicts in /etc/fonts are eliminated and pacman can complete its update. However, after this nuclear method, fonts will be mangled. They cannot be repaired with a simple # fc-cache -vf. Even that action will spew errors that it can't find a /etc/fonts/font.conf file instead of running a subroutine that simply builds such a file. Programmers.

So, how to rebuild /etc/fonts/font.conf? Turns out there's a lot of information about how to edit /etc/fonts/font.conf , but no information about re-building it. The solution was only obtained via frustration after attempting various manually constructed versions of /etc/fonts/font.conf which failed:
# pacman -S fontconfig
That's right, the only thing that worked for me was to re-install the f**king package. Of course, I'm an idiot, but still. Also, be sure to explicitly update one's fonts after a pacman update, in case pacman left any hanging chads.
# fc-cache -fv
Alternatively, when one runs into a font problem, a person can exit their update noting the name of the font that is causing the problem, and then rerun the update excluding that font until one has determined the conflict.
# pacman -Syu --ignore font-foo

Thursday, July 16, 2015

podcasts, audio cds, wine

Links: Overview of burning options :: Tutorial for Linux burning :: Mixed Data-Audio :: More TOC information

I download 60 minute podcasts and burn them to CD's to play when driving. The problem with a long CD is having to listen to, say, the first 20 minutes to skip to minute 21. MP3 players overcome this, but I don't like MP3 players in traffic: I need to look down at the time stamp. Instead, I break the hour podcast into 12 x 5 minute tracks and burn them to a CD. I can keep my eyes on the road and just twist the knob a couple of times to the track I want, without looking down. Below is my process (about 15 minutes long) for processing a podcast onto a CD. There's also some information related to one-time software installation.

Note: processing audio is not hugely resource-intensive on any system built in the last 15 years. Therefore, no "system requirements" or "rendering" time estimates are included here, unlike posts for video processing.

Steps

  1. Convert podcast into a .wav (audio CD format: 44Khz, 2chan, 16bit little endian)
  2. Set levels and so on
  3. Pick 11 break points and insert a second of silence at each
  4. Save each of the 12 segments using a numbering convention, eg "chunk01", "chunk02", etc
  5. Double-check the folder contains all 12 segments
  6. (optional, time permitting) Provide meta-information to display during CD playback (requires creation of a .toc file)
  7. Burn the segments to a CD as 12 tracks.

1. Convert to WAV (1 min)

Sometimes a podcast will be in a video format, sometimes just an MP3, etc. The line below will convert any format, since it nulls the video.
$ ffmpeg -i podcast.avi -vn -ar 44100 -ac 2 podcast.wav

2. Set levels (2 min)

You can always "normalize" the audio, something useful if you have several WAV's. That would be something like...
$ normalize-audio -m *.wav
For a single large WAV that I'm going to divide into sections, I'll need an audio editor, so I just set the level manually when I open the WAV in the editor.

  wine installation sidebar
If you (like me) prefer some outdated Windows audio editor from the 90's that's like an old glove, installing Wine is necessary to use the app. Wine however requires 32-bit libraries. Therefore, in addition to the 500Mb of extra multilib crap, you risk occasional 32-bit multilib conflicts with your modern x86_64 installation. Accepting that, in Arch, add the "multilib" Arch repository and let pacman do the heavy lifting. Enable the "multilib" repo inside pacman.conf, so pacman can locate and add the libraries.
# nano /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist
# pacman -Syu
# pacman -S wine winetricks lib32-alsa-lib lib32-ncurses
$ wine [path to some old app]
If some of the application sound controls don't work, open $ winecfg and check sound settings for the correct card, and so on.

3. Select, mark divisions (5 min)

With the WAV open in a sound editor, I can place 1 second breaks at the end of a sentence (or other pause in speech), about 5 minutes apart. The one hour podcast is thus divided into 12 segments, with 1 second silence pauses I can see on the timeline. Time permitting, if there are any commercials or unwanted portions of the podcast, I can trim them away at this point.

4. Save the segments (5 min)

Moving from silence divider to silence divider, I save each segment of the WAV as a smaller WAV, labeling each sequentially; "chunk01.wav","chunk02.wav", etc. Burning software will follow my numbering convention, re-assembling the segments, in numbered order, as tracks onto a CD.

5. Double check folder

Verify all 11 or 12 tracks (WAVs) are in the folder and are sequentially named.

6. (optional) provide track information, pre-listen

CD's have about 70-80 minutes available, given 700Mb. If you've trimmed a lot of the podcast, you might add additional tracks to the folder, change the order of play around, etc. Maybe you have time to listen to how the entire CD will ultimately sound, once burned. To do this, make a playlist using a text m3u or pls file and play the playlist using your media player. In this post, I reference simple .m3u files (see bottom of page), but I've used the more complex .pls format in other situations. Additionally, you may want to create a .toc text file for meta information during CD burning. An example of a .toc is
also at the bottom of the page.

7. Burn to CD (2 min)

  burning software sidebar
Because I added one second to each segment when dividing the WAV (see 4 above), I don't want to pad the tracks with additional silence when burning them -- too much silence between tracks. Avoiding padding means using DAO (Disk at Once) burning rather than TAO (Track at Once) burning. Secondly, in Arch, pacman cannot resolve both wodim (cdrkit) and cdrecord (cdrtools), because their libraries conflict. Pick one, in other words. I'm used to cdrecord, but Arch instructions only describe burning in terms of wodim and genisoimage (DVD), so I went with cdrkit. Cdrdao is the most important for my way of burning anyway, and that's a separate package.
# pacman -S cdrkit cdrdao


Installation completed, burning is available. Burn speeds may be tweaked up or down according to impatience or errors, but generally:

1) Burning without a Table of Contents, say from a folder in which WAV's are in numeric order:
$ wodim -v speed=1 dev=/dev/sr0 -dao *.wav
If you want to run a test on whether it burns OK first, insert the "-dummy" option in the line. For pads between tracks add the "-pad" option. Other options on the wodim man page.

2) Burning with a Table of Contents (.toc file) can utilize individualized track names and folder locations while burning, and can include track meta-information to display during playback. The application for this type of burning is cdrdao, but note that cdrdao actually requires a TOC file to burn:
$ cdrdao write --device /dev/sr0 --speed 6 --eject --driver generic-mmc-raw [tocfilename].toc

Other Audio Notes

BPM information: The Mixxx application (pacman -S mixxx) in the Arch repositories will calculate Beats Per Minute.

VLC note: During playback, to disable the orange cone when there is no album art: Tools, Preferences, Select All (Bottom), Interface, Main interface, Qt, unselect "Display background cone or art".

.m3u

This file type is good for doing a test of the CD before we burn it. Inside the m3u, we can move the track order around until it sounds the way we prefer. Below is a minimal example with two tracks -- you can expand the number of tracks using as many WAV's as desired, for example you may want to make a 4 hour playlist for a party. However, a CD cannot contain more than 70-80 minutes of audio, unless you have a stereo that plays MP3 format (a different post), so keep a general idea of your minute total if you ultimately intend to burn it.
$ cat sample.m3u
#EXTM3U

#EXTINF:-1,July 15 Podcast - Part 1 (4:08)
chunk01.wav

#EXTINF:-1,Musical Interlude (3:00)
/home/foo/tracks/sunnyday.wav

.toc

Links: TOC metadata explanation :: More TOC information :: Script for simple TOC production
The TOC is critical during DAO burning, so it's worth reading a couple of posts on them (see links above). A user may wish to modify the TOC from an existing audio CD, produce a TOC from scratch, etc. To examine a TOC from an existing audio CD:
$ cdrdao read-cd --device 0,1,0 --driver generic-mmc-raw somename.toc
These TOC files are easily manipulated with any text editor. Use two forward slashes ("//") to add comments inside the file. I make very simple TOC's, but there are many tweaks available for those who have the time to invest: get into those three links above.

Here's a truncated view of a TOC I made for a divided podcast burn. The actual TOC for the burn is obviously longer since it has more tracks, but you'll get the picture:
$ cat sample.toc
CD_DA

//Track 01
TRACK AUDIO
CD_TEXT {
LANGUAGE 0 {
TITLE "Part 1: 2014-09-24 Speech"
PERFORMER "Matteo Renzi"}
}
FILE "chunk01.wav" 0

//Track 02
TRACK AUDIO
CD_TEXT {
LANGUAGE 0 {
TITLE "Part 2: 2014-09-24 Speech"
PERFORMER "Matteo Renzi"}
}
FILE "chunk02.wav" 0
The information will be displayed for each track. Also, the tracks are only 5 minutes each: when driving, I can spin the knob between tracks without looking down. When stopped, I can glance down to see the actual title of the portion. Have fun and be safe!

Saturday, November 29, 2014

[solved] arch - update and java

Following Oracle's purchase of Java (2010), Java users can't be certain when Oracle attorneys or developers might make users' lives uncomfortable. If one wants Java functionality however, Oracle can't be avoided entirely. I am not a lawyer, but Oracle's open-source version of Java, OpenJDK, may be the most legally prudent Java option. That said, not every application plays nice with OpenJDK, of course, or Oracle wouldn't be able to profit from licensing its more user-friendly proprietary versions of Java.

What has the above meant to me operationally? When upgrading Arch with OpenJDK onboard, I've sometimes experienced conflicts which required a solution of, 1) uninstalling Java, 2) running the Arch update(s), and, 3) reinstalling or upgrading to the latest OpenJDK.

Arch update Java conflicts may look something like these (during pacman -Syu):
error: failed to commit transaction (conflicting files)
java-runtime-common: /usr/bin/java exists in filesystem
java-runtime-common: /usr/bin/keytool exists in filesystem
java-runtime-common: /usr/bin/orbd exists in filesystem
java-runtime-common: /usr/bin/pack200 exists in filesystem
java-runtime-common: /usr/bin/policytool exists in filesystem
java-runtime-common: /usr/bin/rmid exists in filesystem
java-runtime-common: /usr/bin/rmiregistry exists in filesystem
java-runtime-common: /usr/bin/servertool exists in filesystem
java-runtime-common: /usr/bin/tnameserv exists in filesystem
java-runtime-common: /usr/bin/unpack200 exists in filesystem
java-runtime-common: /usr/lib/jvm/default exists in filesystem
java-runtime-common: /usr/lib/jvm/default-runtime exists in filesystem
Errors occurred, no packages were upgraded.

The shortest path appears to be removing "java-common". Not so fast: OpenJDK requires java-common as a dependency; pacman typically will not allow its removal. The solution is to remove OpenJDK (at this writing version 7), update the system, and then reinstall OpenJDK:
# pacman -Rns jre7-openjdk
# pacman -Syu
# pacman -S jre7-openjdk

Applications (eg, geogebra, icedtea-web) that bark at this removal may also have to be removed prior to the Arch update, and then reinstalled (after jre).

location in system

$ ls -an /usr/bin/java
/usr/bin/java -> /usr/lib/jvm/default-runtime/bin/java

$ locate /bin/java
locate /bin/java
/usr/bin/java
/usr/bin/javaws
/usr/lib/jvm/java-8-openjdk/jre/bin/java
/usr/lib/libreoffice/ure/bin/javaldx
/usr/share/icedtea-web/bin/javaws

$ ls /usr/lib/mozilla/plugins
IcedTeaPlugin.so libflashplayer.so [missing java-plugin libnpjp2.so]

# find -name libjava.so
/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libjava.so
You can't find libnpjp2.so because you don't have normal java installed. Typically, you make a soft link between libnpjp2.so and the mozilla plugin directory. But in this case WITH OPEN JDK, our java soft link for mozilla (when we need it) is the icedtea plugin so we're actually set. All you have to do is go into "Add-Ons" in your browser and enable/disable it.


LibreOffice

After an Arch OpenJDK update, the LibreOffice portion sometimes still will notice you...
Optional dependencies for libreoffice-still
java-runtime: adds java support
java-environment: required by extension-wiki-publisher and extension-nlpsolver
...telling you for sure LibreOffice didn't detect OpenJDK. I opened LibreOffice -->Tools --> Options --> Advanced.



I selected the radio button for the Oracle option and then "OK". These actions seemed to activate Java.

Blackboard and Pipelight apps

Only Firefox has the stuff needed to process Moonlight, instead of Silverlight. Software must be installed that allows geolocating and so forth. These can be turned on and off by creating a softlink.

On the Blackboard account, also use Firefox (JRE).
ln -s /usr/lib/pipelight/libpipelight-silverlight5.1.so /usr/lib/mozilla/plugins/libpipelight-silverlight5.1.so

Saturday, July 6, 2013

fuduntu - yum/rpm stuff

links: yum setup :: yum command examples

why yum/rpm?

In the previous post, I noted an install of Fuduntu, a recently orphaned distro. The idea was to establish a simple system which might retain its stability against the tide of media player updates. An expected side benefit was the opportunity to learn yum. Specifically, it's necessary to modify Fuduntu's default yum files because Fuduntu's yum URL's are now invalid. Note: the final Fuduntu release appears to be based on Fedora 17 (or roughly Enterprise Linux 6), plus some Ubuntu features.

/etc/yum.conf

No notable differences between Fedora and Fuduntu in the global /etc/yum.conf file. Standard.

repos to remove - /etc/yum.repos.d/

The helpful System > Administration > Software Sources window:


We can see the Fuduntu repository entries are there, though they no longer point anywhere. To follow good housekeeping, toggle enable to "enable=0" inside each undesired repo entry in /etc/yum.repos.d/. To be more thorough, we could delete unwanted repo files(in /etc/yum.repos.d/) and gpg keys (in /etc/pki/gpg-keys/). In my simple world, I renamed all the repos with a .bak extension and kept them -- I might want to look inside one later. This also allows me to change the extension back to ".repo" if I wanted to reactivate one for some reason.
# cd /etc/yum.repos.d/
# rename .repo .bak *.repo

repos to add

As noted at the top, I assumed Fuduntu's nearest releases were F17 and EL6.
(1) REPOFORGE (formerly RPM Forge)
# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
However, rpm for some reason could not resolve the host and was providing the following error
Retrieving http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
curl: (6) Could not resolve host: pkgs.repoforge.org; Cannot allocate memory
error: skipping http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm - transfer failed
This is not a small problem, and requires a separate post on IPv4 and IPv6 addressing, which will be my next post. Essentially, curl does the DNS and downloading for rpm/yum actions. Users can specify "--ipv4" in direct CLI curl requests, but there are no such switches when rpm calls curl as a subroutine, out of sight of the user. If it doesn't receive IPv6 information, curl fails, causing rpm to fail.

So, for now, downloaded the rpm repo file directly via my browser, and then...
# yum --nogpgcheck localinstall rpmforge-release-0.5.3-1.el6.rf.i686.rpm
...and finally
# yum install --enablerepo=rpmforge-extras
Looking at its file, it performs a gpg check on the downloaded packages. There are many settings available, a simple example is the one above -- to toggle a repo in a file on or off, change the state in the "enabled" line.

(2) ATRPMS Below is the repair for curl IPv6 finickiness. Then one can directly download and install the file using rpm.
[verify]
# nano /etc/host.conf
order hosts,bind

[enter]
# nano /etc/hosts
::ffff:a02d:fe1a packages.atrpms.net
160.45.254.26 packages.atrpms.net
::ffff:a02d:fe16 dl.atrpms.net
160.45.254.22 dl.atrpms.net

[test]
# curl --ipv6 packages.atrpms.net

[install key]
# rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms

[install]
# rpm -ivh http://dl.atrpms.net/all/atrpms-repo-17-6.fc17.i686.rpm
Retrieving http://dl.atrpms.net/all/atrpms-repo-17-6.fc17.i686.rpm
Preparing... ########################################### [100%]
1:atrpms-repo ########################################### [100%]

# ldconfig

# yum clean all

(3) RPMFUSION
[verify]
# nano /etc/host.conf
order hosts,bind

[enter]
# nano /etc/hosts
::ffff:c11c:eb3c download1.rpmfusion.org
193.28.235.60 download1.rpmfusion.org

[test]
# curl --ipv6 download1.rpmfusion.org

[install]
# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-17.noarch.rpm
Retrieving http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-17.noarch.rpm
warning: /var/tmp/rpm-tmp.QSSeST: Header V3 RSA/SHA256 Signature, key ID 8296fa0f: NOKEY
Preparing... ########################################### [100%]
1:rpmfusion-free-release ########################################### [100%]

# ldconfig

# yum clean all

manual repo pointing

Let's create a new repo file, fedora1.repo. Permissions of the file should be 644...
# chown 644 /etc/yum.repos.d/fedora1.repo
...it should appear in System > Administration > Software Sources:


quick test - yum repolist

Fast way to check if everything is operating correctly


NOTES: gpg keys

On first cut, the new repository did not work. Note that in the above repo listing, we requested a gpg check and provided the folder to find it...
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
... but then of course we only had Fuduntu keys in that folder, no Fedora keys. Further, the Fedora project has moved on, it's no longer operating repos for Fedora 17. So we could use rpm to import the keys and automatically create softlinks... /etc/pki/rpm-gpg/...
# rpm --import RPM-GPG-KEY-fedora-17-primary
# rpm --import RPM-GPG-KEY-fedora-17-secondary
...but Fedora does not maintain older packages, so we'd have the keys to nothing. We could even add the old F17 keys manually...
# gedit /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-17-primary
...post the key block from the link into that file, then made a softlink for housekeeping...
# ln -s /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-17-primary /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
...but again this would be pointless since no F17 software is available at Fedora.

There are also these sorts of possible yum problems.