Tue, 27 May 2008
Running your own local yum repo isn't all that hard as it turns out.
- Allow building as a non-root user.
- Make some important directories. I only care about powerpc packages, so I
make the ppc and ppc64 directories, clearly if you use another architecture you
should change that ;P
mkdir -p /home/user/rpmbuild/fedora/{BUILD,SOURCES,SPECS,SRPMS,tmp,RPMS/{noarch,ppc,ppc64}} - Now create a ~/.rpmmacros file. To use those directories you
just created.
With this there you can rpm -i src.rpm files, and run rpmbuild commands to generate RPMS (binary and source). I intend to have a bunch of packages on the go at any time so I use the %_sourcedir macro, have one directory per %{name}-%{version}-%{release}. You could just as easily do:%_topdir /home/user/rpmbuild/fedora/ %_builddir %{_topdir}/BUILD %_rpmdir %{_topdir}/RPMS %_specdir %{_topdir}/SPECS %_srcrpmdir %{_topdir}/SRPMS %_sourcedir %{_topdir}/SOURCES/%{name}-%{version}-%{release} %_tmppath %{_topdir}/tmp %_buildroot %{_topdir}/%{_tmppath}/%{name}-%{version}-root %packager user@example.com
It's easiest to decide upfront as changing will be a little cumbersome.%_sourcedir %{_topdir}/SOURCES
- Make some important directories. I only care about powerpc packages, so I
make the ppc and ppc64 directories, clearly if you use another architecture you
should change that ;P
- Make some RPMS. True this can be a little challenging at times but fortunately the packages I'm interested presented little challenge ... woot!
- Fedora has a util for rummaging through RPMs and makeing the repodata files. It's called createrepo. So install that: yum install -y createrepo
- I then moved all my locally built RPMS into a separate directory structure.
I tried to make this look at least a little like real Fedora repos.
Again I only care about powerpc, hence setting $basearch. You don't
need to :). In case it isn't obvious I ran this script from the root
directory of the repo (in my case /opt/yum).
#!/bin/sh basearch=ppc releasever=9 rpmbuild_base=/home/user/rpmbuild/fedora for i in local local-debuginfo local-source ; do d="$i/$releasever/$basearch" [ ! -d $d ] && mkdir -p $d done find $rpmbuild_base/RPMS/ -type f \ -exec /bin/cp {} ./local/$releasever/$basearch/. \; find $rpmbuild_base/SRPMS/ -type f \ -exec /bin/cp {} ./local-source/$releasever/$basearch/. \; find ./local/$releasever/$basearch/. -type f -name '*debug*' \ -exec /bin/mv {} ./local-debuginfo/$releasever/$basearch/. \; for i in local local-debuginfo local-source ; do cd "$i/$releasever/$basearch" /usr/bin/createrepo . cd - done - Setup apache to serve up that directory. This machine shouldn't need any other web services, so I just make / point at my /opt/yum directory
NameVirtualHost * <VirtualHost *> ServerAdmin user@example.com DocumentRoot /opt/yum/ ServerAlias host ServerName host.example.com ErrorLog /var/log/httpd/yum.repo-error_log CustomLog /var/log/httpd/yum.repo-access_log combined <Directory /opt/yum> Options Indexes </Directory> </VirtualHost> - Now create a yum config you use this new goodness.
[local] name=local $releasever - $basearch baseurl=http://host.example.com/local/$releasever/$basearch/ enabled=1 gpgcheck=0 [local-debuginfo] name=local $releasever - $basearch - Debug baseurl=http://host.example.com/local-debuginfo/$releasever/$basearch/ enabled=1 gpgcheck=0 [local-source] name=local $releasever - $basearch - Source baseurl=http://host.example.com/local-source/$releasever/$basearch/ enabled=1 gpgcheck=0
- If that all went well then:
[user@host ~]$ yum repolist Loaded plugins: refresh-packagekit repo id repo name status fedora Fedora 9 - ppc enabled fedora-debuginfo Fedora 9 - ppc - Debug enabled fedora-source Fedora 9 - Source enabled local local 9 - ppc enabled local-debuginfo local 9 - ppc - Debug enabled local-source local 9 - ppc - Source enabled updates Fedora 9 - ppc - Updates enabled updates-debuginfo Fedora 9 - ppc - Updates - Debug enabled updates-source Fedora 9 - Updates Source enabled
and debuginfo-install and yumdownloader should do the right things woot!
There are probabluy all sorts of other cool things you can do here but this is enought to keep a few local machines in sync :)
Update: Type fixes, and add note about installign createrepo
Tue, 20 May 2008
So it's been a long time since I used RPM based distro "in anger", so I'm trying Fedora 9. First tips
- yum check-update Check all enabled repositories for update and display them.
- yumdownloader --source ${package} To grab the source RPM (*.src.rpm) for ${package}. You must have the appropriate source repositories configured and enabled. It's a shame that this isn't available (or did I missit) with the yum command.
- Rename /etc/httpd/conf.d/welcome.conf to something that doesn't end in .conf once you've setup your web content. Otherwise you just get the std. "Welcome to Fedora" page.
Note: These may not be the best ways to get the job done but they worked for me
Update: fix typos
Thu, 03 Apr 2008
Like most of you that type passwords often I tend to let my finger's "muscle memory" do the hard work remembering my passwords. This works rather well except on two occasions
- When you come back from an extended vacation, and even your fingers have forgotten
- When you can't use those muscles, because you've fractured the middle digit on your left hand :(:(
Tue, 12 Feb 2008
So Mikey claims he can travel to Zurich and then $180m in artwork goes missing. Coincidence? ...
Thu, 04 Jan 2007
Do new years resolutions count if you make the 4 days in?. If they do then;
this is a new years resolution; if they don't then I've just decide to ...
blog more.
Given I only blogged twice in 2006, I've already equalled that so one more entry in the next 361 days and I'm set. ... The pressure is on.
I was tagged by Rusty in the five things meme. Below are 5 things about me that I've not blogged about.
- I'm addicted to Survivor
- I think Abstract art is a waste of wall space, time, materials and money.
- I've eaten horse, and liked it. (sorry Alli)
- The first time I used the Internet, I didn't know that was what I was doing. I just thought it was a really popular BBS. Turns out it was Usenet ;P. I'm waaay to embarrassed by my first post to link to it but it is in Google Groups. I looked.
- I fear heights ... well falling. To combat this I go rock climbing whenever I can.
I hereby tag Steve, Somewomen, AJ, James and Leon
Also Rusty wonders if someone with more time than sense^W^W^Wbandwidth than him would trace it back. I did. This whole things seems to have begun with this post. The path between rusty and the origin (including a few detours :() can be found here. I find it interesting that it stayed in the "literary world" for quite some time but the root cause "people collecting" was lost rather quickly.
Fri, 03 Nov 2006
At last week's CLUG meeting Steve pointed at this blog, and the lack of activity, and berrated me for being so slack.
So I'm inventing stuff to blog about.
Occaisonally I need to know what time it is in another timezone. This is pretty easy with date, eg
I discovered the other day that date can do some cool stuff. Say you know the time in Rome, and you'd like to know the time in Tokyo, all without leaving the east cost of Australia.$ TZ=Europe/Rome date -R Fri, 03 Nov 2006 02:24:39 +0100
$ TZ=Asia/Tokyo date --date='TZ="Europe/Rome" 11:31pm' -R Sat, 04 Nov 2006 07:31:00 +0900
Yet to determine if I'll use this in day to day life but I think it's pretty cute :), and not too hard to remember either.
Sun, 02 Jul 2006
Sung to the tune of "Happy Birthday":
Happy graduation to me
Happy graduation to me
I got my degree-ee
Happy graduation to me
As Steve
mentions I went out and got me one of these.
Click for a larger image (1.4M)
Fri, 18 Nov 2005
Who can resit?
A meme and a Middle Earth meme at that!

Entish
To which race of Middle Earth do you belong?
brought to you by Quizilla
Bon Voyage
Wishing Andrew and Mikal a safe trip and lots of great times
at the other end.
Thu, 27 Oct 2005
Why I use Linux
I was asked on the bus today[1] "So like Linux huh? Why?", well
words to that effect anyway. I was about to enter into a brain dump on
Opensource but decided to relate a story instead.
While a number of years elapsed between the first and second events I think it's still interesting.
Event 1:
When 100Mb networking was new, I had an occasion to
buy a brand spanking new server, I did my research and purchased a machine
(and more importantly PCI NIC) that was supported by the kernel(I think it was
a 1.3 kernel, but it may have in fact been 2.0).
It was with much
sadness that I discovered that under Linux there was no networking to be had,
The hardware detected a link etc but I got strange error messages which are
lost in time now.
It seems that the NIC I had has a different chip revision than the ones
currently supported. After a little to'ing and fro'ing with Donald Becker,
the card chipset was now supported. I think it took 2 days to get the card
going. I was happy. The server was in production for close to 7 years before
it finally became too old to perform it's task as was replaced.
Event 2:
My Wife needed a new machine. We settled on a name brand desktop system. It
wasn't the biggest baddest machine but it was more than adequate. Got the
box home set it up and all was good. Soon I decided to un-retire some old
games, all was good until one game would lock up and eventually BSOD[2].
I did
the windows driver shuffle to no avail. Contacted the game vendor, never got
a response. Contacted the hardware vendor, was told to run the recovery DVD
and that would fix things. I knew this was bogus, rang back in about 35mins
said I still had the same problem. I was told it had to be a problem with
the software and that they couldn't help. Not really the response I wanted.
I took the unprecedented (for me) step of filing a bug report with Microsoft.
Which was literally as easy as clicking a button.
This resulted in a nice web page in which Microsoft claimed that this was a
known bug with the soundcard and I should contact the vendor for help.
Actually this seemed like a good diagnosis. If I completely turned off
sound in the game (fortunately I could edit a .ini file to do this) the game
worked albeit silently. I recontacted the vendor with this new information
and was told to run the recovery DVD. Oh dear. I admit at this point I gave
up, it'd been more than a month
since I started this. It was something like 8 months later I once again got
bored enough to try things. I checked the vendors support site and saw that
there were updated drivers available for the box, and they'd only been released
3 days ago. I got brave and tried them. Lo and behold I could now
play the game, it's a shame it only took 9 months to get there.
So to my way of thinking, this illustrates the good things with Linux. If it doesn't work someone will be able to help, even if they're on the other side of the world working for NASA, with the other OS, not so much[3]. Now It's possible that I may have biased the outcome of the events with pre-conceived notions about the outcomes but I don't think so. I don't know if this help the person on the bus, or if it was just a way for them to pass a boring bus ride in Canberra.
I'll let you all get back to work now.
[1] insert witty comment about my dress sense, I didn't think the Tux was even
visible
[2] Yes I have windows on computers at home.
[3] I should note that I did try manufacturer (as opposed to vendor) drivers,
contacted other players of the game involved and used both manufacturer and
vendor forums/newsgroups to try and find a solution.
Wed, 28 Sep 2005
Blog Meme: File extension.
In trying to avoid Uni I decided to fill in the survey. I don't think the
result is accurate ;P
Which File Extension are You?
Thu, 01 Sep 2005
Appealing?
Well today I was asked when daylight savings comes into effect. After playing with the date command I discovered the following:
tony@balder:~$ date -R -d 'Sun, 30 Oct 2005 01:59:59'
Sun, 30 Oct 2005 01:59:59 +1000
tony@balder:~$ date -R -d 'Sun, 30 Oct 2005 01:59:59 + 1 second'
Sun, 30 Oct 2005 03:00:00 +1100
Which is far more humorous to me than it should be ;P( See I
told you all I could space, Now I can warp time). Perhaps that's
because unlike Hugh my
brain ran out my ears rather than exploding.
Wed, 17 Aug 2005
Fri, 03 Jun 2005
Fixed
Due to the way I installed blosxom my permanent links didn't work unless (like Mikey) you included the index.cgi in the URL. Well that's fixed now.
For those that may or may not care this is the apache magic
ScriptAlias /~tony/diary /home/bakeyournoodle.com/tony/public_html/diary/blosxom.cgi
# Keep Sage working
RewriteCond %{QUERY_STRING} ^flav=rss$
RewriteRule ^(/~tony/diary).*$ $1/index.rss? [L,R]
RewriteRule ^(/~tony/diary/)index.cgi(.+[^/])$ $1$2 [R]
I think this means that aside from the switch over period, no one should see anything break.
Tue, 31 May 2005
swsusp2 works!
Finally after trying every now and again it's working.
I think the key is vbetool, which Bernard told me about at LCA2005
Mon, 30 May 2005
I discovered today I can warp space
When I started riding to ANU with a trip computer on-board the distance was 17.1kms. Today my ride was 16.8kms. Wheee that's 300 meters I've saved. I haven't altered my route, so the only logical conclusion is that, by willing the pain to be over, I have shortened the ride.
If only I had shortened the time as well.
Sat, 28 May 2005
Back From NZ
Went to NZ for the ghosts meeting with the LCA2006 crew. Was lots of fun.
Recommend the Allan Court Motel for people needing self-catering accommodation,
and the Eureka
cafe/bar for those in need of good food and great beer (not the
radler though[1]).
After Ghosts travelled back to Wellington to catch up with my Mum (whom I haven't seen in a while) and my sister Leeanne (whom I've never met). Went to Midnight Espresso for a few coffee's The place hasn't changed much since high school. After that we went up the coast for a few days. It was great to see Mum, catch up with a few old friends. 2 days was too short though.
[1]: take a perfectly good pilsner and add a dose of lemon/lime cordial, yck[2]
[2]: Okay cartman I'll lay off now ;P
Wed, 18 May 2005
Shell Hacks
AJ is hereby awarded a UUOC for this
Sat, 07 May 2005
Bah!
Do "they" [whoever "they" are ] think we wont notice?
# egrep 'Failed password for root from.*ssh2' /var/tmp/munged.log | cut -d' ' -f12 | sort | uniq -c | sort -n
6 210.206.30.139
16 84.244.0.157
44 67.19.139.112
400 80.83.128.248
561 193.6.40.134
561 207.194.134.180
561 211.115.89.81
Thats in the last 4 hours.
Wed, 04 May 2005
Blogging leads to ....
... Needing an RSS feed and apparently an aggregator (sp?) tool locally.
I chose sage mostly because I always have firefox open, and partially because it was recommended to me.
This entirely superfluous blog is to see if sage works correctly. It seems not as I can't jump straight into a post. I wonder if it's me blosxom or sage ??
Tue, 26 Apr 2005
LCA is over, My brain hurts.
I've been assured that in order to blog you don't actually need to have anything
useful to say. I thought I start with the obligatory linux.conf.au is over
post. All things considered it was a blast and I'd happily do it all again.
In fact I am ;P. I'll be helping the nuts in Dunedin, out with some of
the planning.
Also I was lucky enough to get an extension on one of my Java assignments. It's due at 17:00 on Thursday. consequently I've leapt in to get it finished. I'm horribly embarrassed with the code, but that wont stop me from submitting it.
