-
Posted: May 27th, 2008, 5:23pm CEST
pRunning your own local yum repo isn't all that hard as it turns out.
ol
li Allow building as a non-root user.
ol
liMake 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 tt;P/tt
blockquote
pre
mkdir -p /home/user/rpmbuild/fedora/{BUILD,SOURCES,SPECS,SRPMS,tmp,RPMS/{noarch,ppc,ppc64}}
/pre
/blockquote
/li
li Now create a tt~/.rpmmacros/tt file. To use those directories you
just created.
blockquote
pre
%_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
/pre
/blockquote
With this there you can ttrpm -i src.rpm/tt files, and run
ttrpmbuild/tt 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
tt%_sourcedir/tt macro, have one directory per
tt%{name}-%{version}-%{release}/tt. You could just as easily do:
blockquote
pre
%_sourcedir %{_topdir}/SOURCES
/pre
/blockquote
It's easiest to decide upfront as changing will be a little cumbersome.
/li
/ol
/li
li Make some RPMS. True this can be a little challenging at times but
fortunately the packages I'm interested presented little challenge ...
ttwoot!/tt/li
li Fedora has a util for rummaging through RPMs and makeing the repodata
files. It's called ttcreaterepo/tt. So install that: ttyum install -y createrepo/tt
li I then moved all my locally built RPMS into a separate directory structure.
I emtried/em to make this look at least a little like emreal/em Fedora repos.
Again I only care about powerpc, hence setting tt$basearch/tt. You don't
need to tt:)/tt. In case it isn't obvious I ran this script from the root
directory of the repo (in my case tt/opt/yum/tt).
blockquote
pre
#!/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
/pre
/blockquote
/li
li Setup apache to serve up that directory. This machine shouldn't need any other web services, so I just make tt//tt point at my tt/opt/yum/tt directory
blockquote
pre
NameVirtualHost *
lt;VirtualHost *gt;
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
lt;Directory /opt/yumgt;
Options Indexes
lt;/Directorygt;
lt;/VirtualHostgt;
/pre
/blockquote
/li
li Now create a yum config you use this new goodness.
blockquote
pre
[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
/pre
/blockquote
/li
li If that all went well then:
blockquote
pre
[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
/pre
/blockquote
p and ttdebuginfo-install/tt and ttyumdownloader/tt should do the
right things ttwoot!/tt
/li
/ol
pThere are probabluy all sorts of other cool things you can do here but this is enought to keep a few local machines in sync tt:)/tt/p
pUpdate: Type fixes, and add note about installign createrepo/p
-
Posted: May 27th, 2008, 3:23pm CEST
pRunning your own local yum repo isn't all that hard as it turns out.
ol
li Allow building as a non-root user.
ol
liMake 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 tt;P/tt
blockquote
pre
mkdir -p /home/user/rpmbuild/fedora/{BUILD,SOURCES,SPECS,SRPMS,tmp,RPMS/{noarch,ppc,ppc64}}
/pre
/blockquote
/li
li Now create a tt~/.rpmmacros/tt file. To use those directories you
just created.
blockquote
pre
%_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
/pre
/blockquote
With this there you can ttrpm -i src.rpm/tt files, and run
ttrpmbuild/tt 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
tt%_sourcedir/tt macro, have one directory per
tt%{name}-%{version}-%{release}/tt. You could just as easily do:
blockquote
pre
%_sourcedir %{_topdir}/SOURCES
/pre
/blockquote
It's easiest to decide upfront as changing will be a little cumbersome.
/li
/ol
/li
li Make some RPMS. True this can be a little challenging at times but
fortunately the packages I'm interested presented little challenge ...
ttwoot!/tt/li
li Fedora has a util for rummaging through RPMs and makeing the repodata
files. It's called ttcreaterepo/tt. So install that: ttyum install -y createrepo/tt
li I then moved all my locally built RPMS into a separate directory structure.
I emtried/em to make this look at least a little like emreal/em Fedora repos.
Again I only care about powerpc, hence setting tt$basearch/tt. You don't
need to tt:)/tt. In case it isn't obvious I ran this script from the root
directory of the repo (in my case tt/opt/yum/tt).
blockquote
pre
#!/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
/pre
/blockquote
/li
li Setup apache to serve up that directory. This machine shouldn't need any other web services, so I just make tt//tt point at my tt/opt/yum/tt directory
blockquote
pre
NameVirtualHost *
lt;VirtualHost *gt;
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
lt;Directory /opt/yumgt;
Options Indexes
lt;/Directorygt;
lt;/VirtualHostgt;
/pre
/blockquote
/li
li Now create a yum config you use this new goodness.
blockquote
pre
[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
/pre
/blockquote
/li
li If that all went well then:
blockquote
pre
[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
/pre
/blockquote
p and ttdebuginfo-install/tt and ttyumdownloader/tt should do the
right things ttwoot!/tt
/li
/ol
pThere are probabluy all sorts of other cool things you can do here but this is enought to keep a few local machines in sync tt:)/tt/p
pUpdate: Type fixes, and add note about installign createrepo/p
-
Posted: May 20th, 2008, 2:07pm CEST
pSo it's been a long time since I used RPM based distro quot;in angerquot;,
so I'm trying Fedora 9. First tips
ul
littyum check-update/tt Check all enabled repositories for update and
display them./li
littyumdownloader --source ${package}/tt To grab the source RPM
(tt*.src.rpm/tt) 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 ttyum/tt command./li
li Rename tt/etc/httpd/conf.d/welcome.conf/tt to something that doesn't
end in tt.conf/tt once you've setup your web content. Otherwise you just
get the std. quot;Welcome to Fedoraquot; page.
/ul
pstrongNote/strong: These may not be the embest/em ways to get the job done but they worked for me/p
pUpdate: fix typos/p
-
Posted: May 20th, 2008, 12:07pm CEST
pSo it's been a long time since I used RPM based distro quot;in angerquot;,
so I'm trying Fedora 9. First tips
ul
littyum check-update/tt Check all enabled repositories for update and
display them./li
littyumdownloader --source ${package}/tt To grab the source RPM
(tt*.src.rpm/tt) 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 ttyum/tt command./li
li Rename tt/etc/httpd/conf.d/welcome.conf/tt to something that doesn't
end in tt.conf/tt once you've setup your web content. Otherwise you just
get the std. quot;Welcome to Fedoraquot; page.
/ul
pstrongNote/strong: These may not be the embest/em ways to get the job done but they worked for me/p
pUpdate: fix typos/p
-
Posted: April 3rd, 2008, 2:28pm CEST
pLike 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/p
ol
liWhen you come back from an extended vacation, and even your fingers have forgotten/li
liWhen you can't use those muscles, because you've a href=http://svana.org/sjh/diary/2008/04/02#2008-04-02_01fractured/a the middle digit on your left hand :(:(/li
/ol
Ho Hum, took me far too long to get into my laptop this morning. I'm much better off than the other guys.
-
Posted: April 3rd, 2008, 11:28am CEST
pLike 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/p
ol
liWhen you come back from an extended vacation, and even your fingers have forgotten/li
liWhen you can't use those muscles, because you've a href=http://svana.org/sjh/diary/2008/04/02#2008-04-02_01fractured/a the middle digit on your left hand :(:(/li
/ol
Ho Hum, took me far too long to get into my laptop this morning. I'm much better off than the other guys.
-
Posted: February 12th, 2008, 9:59am CET
p
So a href=http://neuling.org/mikey/Mikey/a claims he can travel to a href=http://neuling.org/mikey/index.cgi/2008/02/09#Exchange2008Zurich/a and then $180m in artwork goes a href=http://www.abc.net.au/news/stories/2008/02/11/2159952.htmmissing/a.
Coincidence? ...
/p
-
Posted: February 12th, 2008, 7:59am CET
p
So a href=http://neuling.org/mikey/Mikey/a claims he can travel to a href=http://neuling.org/mikey/index.cgi/2008/02/09#Exchange2008Zurich/a and then $180m in artwork goes a href=http://www.abc.net.au/news/stories/2008/02/11/2159952.htmmissing/a.
Coincidence? ...
/p
-
Posted: January 4th, 2007, 8:27pm CET
p
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 ...
brbrstrongblog more/strong.
/p
p
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. nbsp;tt.../ttnbsp; The pressure
is on.
/p
pPS: Thanks a href=http://kyliewillison.blogspot.com/Kylie/a for the
a
href=http://kyliewillison.blogspot.com/2007/01/memes-which-file-extension-are-you-to.html
prod/a
/p
-
Posted: January 4th, 2007, 8:27pm CET
p
I was blinknot/blink a href=http://ozlabs.org/~rusty/index.cgi/self/2007-01-02.html
tagged/a by a href=http://ozlabs.org/~rusty/Rusty/a in the five things
meme. Below are 5 things about me that I've not blogged about.
/p
ul
liI'm addicted to a href=http://www.cbs.com/primetime/survivor13/
Survivor/a/li
liI think Abstract art is a waste of wall space, time, materials and
money./li
liI#39;ve eaten horse, and liked it. (sorry Alli)/li
liThe first time I used the Internet, I didn't know that was what I was
doing. I just thought it was a emreally/em popular BBS. Turns out it was
Usenet tt;P/tt. I'm waaay to embarrassed by my first post to link to it
but it emis/em in a href=http://groups.google.com/Google
Groups/a. I looked./li
liI fear heights tt.../tt well falling. To combat this I go rock
climbing whenever I can./li
/ul
p
I hereby tag
a href=http://svana.org/sjh/diarySteve/a,
a href=http://www.somewoman.com/diary.cgiSomewomen/a,
a href=http://azure.humbug.org.au/~aj/blogAJ/a,
a href=http://james.k-sit.com/James/a and
a href=http://leonbrooks.blogspot.com/index.htmlLeon/a
p
Also Rusty wonders if someone with more time than sensett^W^W^W/ttbandwidth
than him would trace it back. I did. This whole things seems to have begun
with a
href=http://sharon-jacobsen.co.uk/thewaterbutt/2006/5-things-people-collection-tag/this
post/a. The path between rusty and the origin (including a few detours
tt:(/tt) can be found a href=/~tony/five_things.htmlhere/a. I find it
interesting that it stayed in the quot;literary worldquot; for quite some
time but the root cause quot;people collectingquot; was lost rather
quickly.
/p
-
Posted: January 4th, 2007, 6:27pm CET
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.
PS: Thanks Kylie for the
prod
-
Posted: January 4th, 2007, 6:27pm CET
I was not 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.
-
Posted: January 4th, 2007, 6:27pm CET
p
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 ...
brbrstrongblog more/strong.
/p
p
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. nbsp;tt.../ttnbsp; The pressure
is on.
/p
pPS: Thanks a href=http://kyliewillison.blogspot.com/Kylie/a for the
a
href=http://kyliewillison.blogspot.com/2007/01/memes-which-file-extension-are-you-to.html
prod/a
/p
-
Posted: January 4th, 2007, 6:27pm CET
p
I was blinknot/blink a href=http://ozlabs.org/~rusty/index.cgi/self/2007-01-02.html
tagged/a by a href=http://ozlabs.org/~rusty/Rusty/a in the five things
meme. Below are 5 things about me that I've not blogged about.
/p
ul
liI'm addicted to a href=http://www.cbs.com/primetime/survivor13/
Survivor/a/li
liI think Abstract art is a waste of wall space, time, materials and
money./li
liI#39;ve eaten horse, and liked it. (sorry Alli)/li
liThe first time I used the Internet, I didn't know that was what I was
doing. I just thought it was a emreally/em popular BBS. Turns out it was
Usenet tt;P/tt. I'm waaay to embarrassed by my first post to link to it
but it emis/em in a href=http://groups.google.com/Google
Groups/a. I looked./li
liI fear heights tt.../tt well falling. To combat this I go rock
climbing whenever I can./li
/ul
p
I hereby tag
a href=http://svana.org/sjh/diarySteve/a,
a href=http://www.somewoman.com/diary.cgiSomewomen/a,
a href=http://azure.humbug.org.au/~aj/blogAJ/a,
a href=http://james.k-sit.com/James/a and
a href=http://leonbrooks.blogspot.com/index.htmlLeon/a
p
Also Rusty wonders if someone with more time than sensett^W^W^W/ttbandwidth
than him would trace it back. I did. This whole things seems to have begun
with a
href=http://sharon-jacobsen.co.uk/thewaterbutt/2006/5-things-people-collection-tag/this
post/a. The path between rusty and the origin (including a few detours
tt:(/tt) can be found a href=/~tony/five_things.htmlhere/a. I find it
interesting that it stayed in the quot;literary worldquot; for quite some
time but the root cause quot;people collectingquot; was lost rather
quickly.
/p
-
Posted: November 3rd, 2006, 3:04pm CET
p
At last week's a href=http://clug.org.au/CLUG/a meeting a
href=http://svana.org/sjh/diary/Steve/a pointed at this blog, and the lack of activity, and berrated me for being so slack.
/p
pSo I'm inventing stuff to blog about./p
p
Occaisonally I need to know what time it is in another timezone. This is
pretty easy with ttdate/tt, eg
blockquote
pre
$ TZ=Europe/Rome date -R
Fri, 03 Nov 2006 02:24:39 +0100
/pre
/blockquote
I discovered the other day that ttdate/tt 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.
blockquote
pre
$ TZ=Asia/Tokyo date --date='TZ=Europe/Rome 11:31pm' -R
Sat, 04 Nov 2006 07:31:00 +0900
/blockquote
/pre
p
Yet to determine if I'll use this in day to day life but I think it's pretty
cute tt:)/tt, and not too hard to remember either.
/p
-
Posted: November 3rd, 2006, 12:04pm CET
p
At last week's a href=http://clug.org.au/CLUG/a meeting a
href=http://svana.org/sjh/diary/Steve/a pointed at this blog, and the lack of activity, and berrated me for being so slack.
/p
pSo I'm inventing stuff to blog about./p
p
Occaisonally I need to know what time it is in another timezone. This is
pretty easy with ttdate/tt, eg
blockquote
pre
$ TZ=Europe/Rome date -R
Fri, 03 Nov 2006 02:24:39 +0100
/pre
/blockquote
I discovered the other day that ttdate/tt 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.
blockquote
pre
$ TZ=Asia/Tokyo date --date='TZ=Europe/Rome 11:31pm' -R
Sat, 04 Nov 2006 07:31:00 +0900
/blockquote
/pre
p
Yet to determine if I'll use this in day to day life but I think it's pretty
cute tt:)/tt, and not too hard to remember either.
/p
-
Posted: July 2nd, 2006, 2:13pm CEST
/p
p
Sung to the tune of quot;Happy Birthdayquot;:br
Happy graduation to mebr
Happy graduation to mebr
I got my degree-eebr
Happy graduation to mebr
/p
p
As a href=http://svana.org/sjh/diary/2006/06/26#2006-06-26_01Steve/a
mentions I went out and got me one of a href=http://www.giant-bicycles.com/au/030.000.000/030.000.000.asp?year=2006model=10015these/a.br
a href=/~tony/images/DSC01548.JPGimg border=1 src=/~tony/images/th_DSC01548.JPG/abr
Click for a larger image (1.4M)
/p
-
Posted: July 2nd, 2006, 12:13pm CEST
/p
p
Sung to the tune of quot;Happy Birthdayquot;:br
Happy graduation to mebr
Happy graduation to mebr
I got my degree-eebr
Happy graduation to mebr
/p
p
As a href=http://svana.org/sjh/diary/2006/06/26#2006-06-26_01Steve/a
mentions I went out and got me one of a href=http://www.giant-bicycles.com/au/030.000.000/030.000.000.asp?year=2006model=10015these/a.br
a href=/~tony/images/DSC01548.JPGimg border=1 src=/~tony/images/th_DSC01548.JPG/abr
Click for a larger image (1.4M)
/p
-
Posted: November 18th, 2005, 1:22pm CET
A meme and a Middle Earth meme at that!/pp
img src=http://images.quizilla.com/D/dphenreckson/1049378275_Hmiddleearthentish.jpg border=0 alt=EntishbrEntish
brbra href=http://quizilla.com/users/dphenreckson/quizzes/To%20which%20race%20of%20Middle%20Earth%20do%20you%20belong%3F/ To which race of Middle Earth do you belong?/aBR font size=-2brought to you by a href=http://quizilla.comQuizilla/a/font
-
Posted: November 18th, 2005, 12:30pm CET
Wishing a href=http://blog.andrew.net.au/Andrew/a and a
href=http://www.stillhq.com/Mikal/a a safe trip and lots of great times
at the other end.