Tag Archives: Yum

What I did today at Ohio LinuxFest – Salt

Yes, I was at the Ohio LinuxFest this weekend!

Even though I did attend several presentations on Saturday. My day was mostly taken up with something else…

I built rpm packages for salt!

If you aren’t sure what salt is, check out their site and read the authors blog. Essentially, salt makes it easy to run a set of commands on multiple machines all at the same time, returning results quickly and asynchronously.

If you are interested in trying out salt on your system(s) and run Fedora, RHEL, CentOS, etc. feel free to try out the rpms. I’ve currently got a review request on bugzilla as well if anyone is interested in providing a review.

Cheers,

herlo

Fedora Infrastructure will soon have fpaste-server

Today, I deployed the latest fpaste-server package on a development box within Fedora Infrastructure.

Test fpaste-server

I’d like to get some folks to hit it and do some testing. If you have time, I would love it if you could take a moment, read below and help.

On the development server

To help, just point your browser to http://paste01.dev.fedoraproject.org/ and add some pastes. In fact, it should be pretty sturdy. If you do happen to find a bug, please file it on our fedorahosted.org Trac instance.

Roll your own

Another way to help is to install your own instance of fpaste-server. I’ve posted some simple installation instructions for anyone who is interested.

We are always looking for helpers to make fpaste-server better. Please contact me (herlo AT fedoraproject doT Org) if you are interested in helping improve or maintain this simple and fun project.

Cheers,

herlo

Fpaste-Server: The new hotness of pastebins

If you have been on the internet for a while, you probably have seen or been told to use a pastebin when submitting large amounts of text or code in IRC. If not, you may have used a pastebin to show your buddy the code you are working through and getting advice.

My point…

PASTEBINS ARE EVERYWHERE

One of the pastebins that has been in use for a very long time is http://fpaste.org and the focus of my post today. Essentially, the Fedora community tends to use fpaste.org over other pastebins as it has a bunch of nice features and it’s Fedora branded. About 2 months ago, I was asked by Jonathan Steffan (aka daMaestro) if I would be interested in packaging fpaste.org’s code and get it into Fedora infrastructure (FI). I accepted that challenge.

As Jonathan will tell you, the code was hacked together over a weekend at a coffee shop. Thus, it needed a bit of clean-up to make things work without including libs from other projects (a big no-no when packaging a Fedora rpm). After a few weeks of clean-up and back-and-forth with Jonathan, fpaste-server was born. That was the first big step to get fpaste-server into FI.

Fpaste-Server is comprised of many other packages. Since I wasn’t the maintainer on many of them, I worked with the amazingly awesome Dave Riches (dcr226) to get django-mptt, django-tracking, django-simple-captcha and django-dpaste into the EPEL repositories for both EL5 and EL6. Dave was not only helpful, but went above and beyond to complete these builds. Thank you, sir!

Over the past month, I’ve been really busy, prepping for my wedding and what not, but found some time recently to finish the package builds of fpaste-server. The packages are all approved, save for el5 which was submitted this morning. This was the second big step to get fpaste-server into FI.

This week, and after my honeymoon, I plan to finish up the work to get fpaste-server into FI. All that’s really left is to get django-tracking into EPEL6.

If you haven’t tried fpaste-server yet, you should. It’s a pretty cool and stable pastebin, it’s also very hackable. Changing out the background to fit your own logos and such is very simple. Please comment here if you find any bugs or issues, have questions or comments.

Cheers,

Herlo

 

Anaconda is Awesome! How to force a network request with local media using kickstart

I sure love it when I solve my own problems, but the internets are a great help to enabling me.

Today, I found myself needing to enable the network (using dhcp) from the anaconda command line (the part that says boot: when you load a CentOS/RHEL/Fedora install disk).

I needed this because I was providing a bit of local media to our external employees for them to use to install, but I had 3 yum repositories I wanted them to be able to use for a few additional rpms I provided.

So, I popped into one of my common support channels and asked the question:

16:11 < herlo> looking for an option that I can put on the anaconda boot: prompt that will force a
               dhcp request even though the install is from a local disk.  I have repos that are not
               being accessed because the network is not being enabled.
16:11 < herlo> things I have tried
16:11 < herlo> ip=dhcp
16:12 < herlo> boot: linux noipv6 ks=hd:sdb1:media/kickstart.cfg ip=dhcp
16:20 < herlo> okay, so for those who might care
16:20 < herlo> if you do
16:20 < herlo> boot: linux asknetwork ip=dhcp noipv6 ks=hd:sdb1:media/kickstart.cfg
16:20 < herlo> anaconda will force a network dhcp request :)
16:20  * herlo is happy again

As you may have noticed above, I resolved this issue without any assistance from the channel, and it only took me 10 minutes to do so.  I found my answer by trial and error from a great page on the fedora wiki: https://fedoraproject.org/wiki/Anaconda/Options

Probably the only thing I wish was documented on that page was when each of the options started being supported in anaconda.  Otherwise, thank you to the folks that wrote and maintain that page.

Cheers,

Herlo

Fedora Classroom: Sessions this Weekend

So, we’ve been slacking.  Probably the economy.  Or maybe it was FUDCon aftermath.  Maybe, just maybe, we were in fact, just lazy.  I don’t know…..but!!

It’s time again for the Fedora Classroom!!

If you aren’t familiar with the Fedora Classroom IRC sessions, we hold them about once a month in #fedora-classroom in irc.freenode.net.

This month’s session will be just on Saturday from 01:30 to 06:30 UTC (see this guide if you aren’t sure what times those are in your neighborhood).  We’ve got some good coverage of how Yum works, a little internationalization and updates on the new features in Fedora 11 (the Alpha just came out today).

I always find these sessions enlightening so come on by and participate!

Cheers,

Herlo

Yum Update: 482:07

As I usually do while teaching class, I installed a Fedora 8 machine, and ran yum update.  Today I noticed a strange amount of time for one particular download:

foomatic

While this is hilarious, its shouldn’t happen.  Any ideas?  I know it didn’t take 28927 seconds (or about 1/3 of a day) to download that foomatic package.

Cheers,

Herlo

Werewolf (Fedora 8) Upgrade in 3 Easy Steps Using yum

Recently, there was a request in one of my comments on this post. The request was for an easy way to upgrade from Fedora 7 to Fedora 8. So I took this on as a bit of a challenge. I feel pretty comfortable with yum and I thought it would be a good and easy task.

A bit of warning here, make sure your current Moonshine ( Fedora 7 ) release is update by running yum update. Also, it is recommended that backups be made of files being modified. If you don’t backup the file, it may be impossible to fix in the future. YOU HAVE BEEN WARNED

Let’s upgrade Moonshine ( Fedora 7 ) to Werewolf ( Fedora 8 ) in three easy steps:

First things first, lets print out some version info:

$ cat /etc/*release
Fedora release 7 (Moonshine)
Fedora release 7 (Moonshine)
$ uname -r
2.6.23.1-21.fc7

Its easy to tell that this machine is indeed using Moonshine ( Fedora 7 ), so let’s upgrade!

Step 1 – Modify the yum repo files

Located in /etc/yum.repos.d directory are where the yum repository files are stored. We need to modify one line so that yum will know where to look:

$ su -
# vim /etc/yum.repos.d/fedora.repo

Find the first line that starts:

mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch

and change it:

mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch

What changed? Well, the $releasever value is the current value for our version of fedora, in this case 7. By changing it to 8, it’ll load the correct repositories for Werewolf (F8) instead of Moonshine (F7). Save the file, and now we’re ready to move onto the next step.

Step 1 (Alternate)

Since posting this, I’ve learned that another option is available. To update the repositories, its possible to install an rpm to accomplish the same as above and it won’t require Step 3.

Choose your mirror from http://mirrors.fedoraproject.org. I picked University of Oregon’s site because it was close to me.

# rpm -Uvh \
ftp://ftp.osuosl.org/pub/fedora/linux/releases/8/Everything/i386/os/Packages/fedora-release-*.rpm

Your ftp/http line here may be different, that is fine. This command installs the updated repositories for Werewolf ( Fedora 8 )

Step 2 – Upgrade

In this step, we just need to run (as root):

# yum update
fedora               100% |===============| 2.1 kB   00:00
primary.sqlite.bz2   100% |===============| 4.9 MB   00:03
Setting up Update Process
Resolving Dependencies
.. snip ..

A few prompts will appear, after the repository data is loaded, a list of several hundred megs (possibly a gigabyte or more) of packages will be ready to install. This is the moment of truth.

Transaction Summary
============================
Install     88 Package(s)
Update     836 Package(s)
Remove       1 Package(s)

Total download size: 1.0 G
Is this ok [y/N]:

Start the download of over 800 packages (in my case) and install and update your system. If you feel a bit of trepidation, I concur. Its still exciting though, isn’t it?

Is this ok [y/N]: y

Now aren’t you excited! In about 30-45 minutes, you’ll have a newly upgraded Werewolf ( Fedora 8 ).

Downloading Packages:
orca-2.20.0.1-1. 100% |=========================| 1.5 MB    00:01
.. snip ..

Step 3 – Cleanup and Reboot

Welcome to your new Werewolf. Treat it wisely. First things first though, we need to clean up our editing from step 1:

# vim /etc/yum.repos.d/fedora.repo

Find the first line that starts:

mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch

and change it:

mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch

Save the file, or if you prefer, copy the backup you made over the modified repo file.

In addition, there are some items that aren’t in Fedora 8 the same way they were in Fedora 7. For these, read this guide. I didn’t have these problems myself, ymmv.

To get the newly updated kernel and all the new goodness of Werewolf, a reboot is necessary. Enjoy your new Lycanthrope on the flip side.

Cheers,

Herlo

Thoughts on the Fedora Upgrade – Part 1

So its been a whole two days since I upgraded to Werewolf. I love it! Most everything works out of the box (OOTB), wireless, bluetooth, even suspend/resume seem to be possible for the first time!

But one of the oddities I encountered while upgrading was the names of the packages. Mind you, this is just my twisted mind being interested in some of the funny odd or strange package names I found while the yum upgrade was taking place.

So here’s the list anyway, with a short description of each. Enjoy:

  • gwenhywfar – A multi-platform helper library for networking and security applications and libraries.
  • meanwhile – Lotus Sametime session functionality.
  • neon – An HTTP and WebDAV client library.
  • coolkey – Linux Driver support for the CoolKey and CAC products.
  • rarian – Designed as a replacement for scrollkeeper; A documentation meta-data library.
  • openjade – An implementation of the ISO/IEC 10179:1996 standard DSSSL.
  • sox – (Sound eXchange) is a sound file format converter.
  • cadaver – A command-line WebDAV client.
  • booty – Small python library for use with bootloader configuration.
  • orca – A flexible, extensible, and powerful assistive technology.
  • zenity – Lets you display Gtk+ dialog boxes from the command line and through shell scripts.
  • eog – Eye of GNOME (EOG) is an image viewer.
  • gok – Enables users to control their computer without relying on a standard keyboard or mouse, leveraging GNOME’s accessibility framework
  • devilspie – A window-matching utility.*

This information was gathered using the command ‘rpm -qi <packagename>’.  This provided enough information to help understand at least the basics of each of these packages and whether to consider using them in the future.

The packages in italics above are packages that I consider interesting, and I plan to attempt to blog about each of them in turn as part of my POW series.

The devilspie package has a * which means that I’ve used this program before.  I quite enjoyed using the Devil’s Pie, and plan to take a look at it again in Fedora 8 as the previous package had some real limitations and lacked needed flexibility.

Please watch for the upcoming articles on these utilities.  Also, if there are packages that you found interesting during your upgrade, please comment and let me know what they are so I can learn and possibly use them as well.

Cheers,

Herlo

POW: Yum installation by groups

The second in the Program of the Week (POW) is here.

Yum, the Yellowdog Updater Modifer, has a very interesting feature. One which you might find useful if you want to install an entire set of packages for say a new “Windows File Server”.

Yum provides this feature right out of the box these days, and its quite a nice feature. SUSE 10.1 has rug which is a very similar feature, called bundles. I would guess that Ubuntu either already has this feature, or will in the near future.

So how does installation by groups work? Pretty simple really, first we must learn a few new options in yum:

First is “grouplist”. Grouplist will tell you which groups of packages you have installed and which ones haven’t been installed.

$ yum grouplist
Setting up Group Process

Installed Groups:
  Office/Productivity
  Engineering and Scientific
  .. snip ..

Available Groups:
  .. snip ..

  Windows File Server
  .. snip ..

  Development Tools
Done

In my case, you can see that I’ve not yet installed “Windows File Server”. Interestingly enough, I’m not sure what’s in that group of packages, so its time to check:

$ yum groupinfo "Windows File Server"
Setting up Group Process
Group: Windows File Server
 Description: This package group allows you to share files
 between Linux and MS Windows(tm) systems.

 Mandatory Packages:
   samba
   samba-client
 Default Packages:
   system-config-samba

Wow, quite a few packages, there’s also some good information here. We now know that there are 10 optional packages and 1 conditional package that can be installed. To get the details on any of these packages, yum can tell us:

$ yum info samba
  .. snip ..

Available Packages
Name   : samba
Arch   : i386
Version: 3.0.26a
Release: 0.fc7
Size   : 3.1 M
Repo   : updates
Summary: The Samba Suite of programs
Description:Samba is the suite of programs by which a lot of
PC-related machines share files, printers, and other
information (such as lists of available files and printers).
The Windows NT, OS/2, and Linux operating systems support
this natively, and add-on packages can enable the same thing
for DOS, Windows, VMS, UNIX of all kinds, MVS,
and more..

Yum informs us that the “samba” package is useful for setting up file sharing between Windows and Linux. Other packages from the list above will also be installed so we’ll get to play with some of those as well. If desired, ‘yum info’ can be run for each of the packages found in the grouplist. However, for us, lets move on and install the group of packages:

$ su -# yum groupinstall "Windows File Server"
.. snip ..

============================================================
Package               Arch    Version        Repo      Size
============================================================
Installing:
system-config-samba   noarch  1.2.52-1.fc7   updates  287 k
Installing for dependencies:
samba                 i386    3.0.26a-0.fc7  updates  3.1 M
Transaction Summary
============================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 3.4 M
Is this ok [y/N]:

At this point, we need to choose whether we’re going to install the 2 packages that will enable samba for us. Hitting enter will answer no, so we need to type a ‘y’ and hit enter. The packages are then downloaded, and installed:

Is this ok [y/N]: y
Downloading Packages:
(1/2): system-config-samb 100% |=============| 287 kB  00:00
(2/2): samba-3.0.26a-0.fc 100% |=============| 3.1 MB  00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: samba                 ################## [1/2]
Installing: system-config-samba   ################## [2/2]
Installed: system-config-samba.noarch 0:1.2.52-1.fc7
Dependency Installed: samba.i386 0:3.0.26a-0.fc7
Complete!

As you can see, its pretty nice to be able to install a group of packages together, letting yum do the work to figure out the details. In another article in the near future, I’ll cover how we create these relationships and build a back end yum server from the ground up.

Cheers,

Herlo

POW: bash-completion – Bash Auto Completion in Fedora using yum (and more)

In an attempt to consistently blog, I am starting a new series here on fedora-tutorials.com. Program of the Week (POW). Hopefully, this will excite and inform all of us about the cool programs available in Fedora. So see you next Wednesday for another program.

Over the past year or so, I’ve been on the hunt for several things that I find in other Linux distros that I cannot find in Fedora. Its not very common, but on occasion I do run into something that’s not there on Fedora. One of them was the ability to automagically complete many of the command lines for many things.

One of them, and probably one of the biggest, was the fact that yum did not have tab completion for available packages. Today is my lucky day! While chatting and helping my students with their labs today, one of them mentioned to me that he could tab complete a particular command on his box. I of course inquired, because it interested me, as to the package name. It turns out my bash tab completion dreams were just about to come true! He told me about this amazing package that would let me use tab completions for things like the service command, man and of course, yum.

I was blown away! So immediately after this discussion, I started searching for this elusive package I’ve never heard of before. Sure enough, as he informed me, bash-completion does exist and does some amazing things. After hunting around a little on google, here’s some of the stuff I found. I’ll also include the links at the bottom of this post.

as root try this: (note [Tab] means you should hit the tab key)

# service ht[Tab]

What you’ll notice is that one of three things happen. If you’ve got the bash-completion package installed already because you’re ahead of the game, it should auto-complete for you. Without bash-completion, this doesn’t happen, but its also possible that since bash already has some completion in place, it might auto complete a directory for you, but that’s definitely not what you want.

If you’ve not already installed bash-completion, I’d suggest you do it now. On Fedora 7, run the following command:

# yum install -y bash-completion
..snip..
Installed: bash-completion.noarch 0:20060301-3.fc7
Complete!

Now that bash-completion is installed, we need to invoke the tools. Normally, this is not needed, and a reboot/re-login will take care of this as well, but since I wanted to use this right away, I did the following as an unprivileged user:

$ source /etc/bash_completion

This doesn’t seem to do much, but its actually quite powerful. The source (or .) will load the environment variables from the /etc/bash_completion script into my current environment. Luckily for us, when we now log into root, /etc/bashrc will accomplish this for us without any intervention. To test that it worked, try running the following command as the same unprivileged user:

$ unalias[Tab]
.=     ll=     ls=     vi=     which=

Note that when I pressed twice, a list of the currently available aliases appeared. Nice ey? Let’s complete this:

$ unalias w[Tab]

Now produces:

$ unalias which

And completes the string as expected. Now we’re getting somewhere! But why did I really want to explain this?

Oh yeah! yum

With bash-completion, yum can now provide us with a list of available packages, similar to the auto completion capability in apt-get or aptitude from Ubuntu or Debian. Say for instance you want to see all of the packages available for install that match what you’re looking for, but don’t want to run yum list or yum search because, in truth, it just takes to long! Now you have an alternative:

# yum -y install bal[Tab]

Produces:

ballbuster.i386  ballz.i386       balsa.i386

Adding another ‘lb’ to the end of that string (and then the tab key of course) should help us to complete to the package we’d like to install.

# yum -y install  ballb[Tab]

Then completes to:

# yum -y install  ballbuster.i386

Hitting enter then installs the ballbuster package, and its quite a fun game!

.. snip ..
Installed: ballbuster.i386 0:1.0-1.fc6
Dependency Installed: ClanLib.i386 0:0.8.0-4.fc7
Complete!

Of course, there are hundreds of others tab completions available (and there’s a good way to list many of them too, even if its a bit cryptic). Try these on for size:

Are you a developer?

$ svn c[Tab]
cat checkout  ci     cleanup   co     commit    copy    cp
$ make [Tab]
all clean dist-clean

What about a systems administrator?

# modprobe -r b[Tab]
battery    bay        blkcipher  bluetooth  bridge     button
$ man cron[Tab]
cron     crond    crontab
$ ssh herlo[Tab]
herlo-f7   herlo-lap  herlo.org
$ grep --[Tab][Tab]
 --after-context=  --directories=   --invert-match   --only-matching
 --basic-regexp    --exclude=       --label=         --perl-regexp
.. snip ..

To help you wade further through, try out the following two commands:

  • complete -p
  • declare -f

Be aware that these are advanced components and can really be confusing if you’re not a developer and just want to use the features. The complete command seems to provides some tools to do additional auto-completion. I also think that its nice to be able to extend this functionality to other applications as well.

As promised, here’s a few links to help your completion introduction. Note: Some of these links provide more than just the simple tab completion: