Re: kickstart -- refreshing rpm's.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





stan-56 wrote:
> 
> 
>> I have a "recipe" for running mock/pungi if there is interest ...
> 
> Sure, I would like to see the recipe.  I tried making such a thing and
> failed miserably.  It was like I was reading an instruction book where
> pages were missing. :-)
> 
> 

Yes I found it very hard to find what I needed also when I first looked -
there is still very little in the way of a guide on this.  Anyway from my
notes which I did in the past few days on a machine running f11 and worked
fine in producing a "re-mix" DVD iso.

You will have to tweak for your situation (eg change for x86_64, ppc etc):

0) Make sure mock and pungi are installed.

1) I wanted to have the files in the /opt partition so as not to use up the
limited space in the root partition so I did this, but it is not essential.
Changed the directory where the mock files are going to be on the /opt
partition
As root:
mkdir /opt/Local/mock
Check the mock directory has the correct permissions
 ll -Zd /opt/Local/mock
drwxrwsr-x. root mock system_u:object_r:var_lib_t:s0   /opt/Local/mock
 ll -Zd /var/lib/mock
drwxrwsr-x. root mock system_u:object_r:var_lib_t:s0   /var/lib/mock

Then cd /var/lib
mv mock mock.orig
mkdir mock
give it the correct permissions. Note that there is an "s" in the
permissions!
Add line to fstab
/opt/Local/mock         /var/lib/mock           none    bind            0 0
Now mount it by doing:
mount /var/lib/mock

Next we can start the preparation process (change the user "mike" to whoever
the user will be that runs the build):
As root:
2) gpasswd -a mike mock

3) Then as user mike I did 
$ cd /opt/spins
$ mock -r fedora-11-i386 --init

This takes a while - seems to do lots of stuff - then clearly creates
files somewhere!

Note that mock files are in /etc/mock and new files will be placed in
/var/lib/mock

4) As user mike
mock -r fedora-11-i386 --install pungi

This puts pungi into the chroot - again it takes a while !

5) Need to install spin-kickstarts in the chroot so:
Again as user mike:
mock -r fedora-11-i386 --install spin-kickstarts

6) Should probably also install vim into the chroot the same way so that the
vim command can be used to edit the kickstarts later.

7) Now get a shell within the chroot
mock -r fedora-11-i386 --shell

This gives a mock-chroot> prompt to indicate we are in the shell
Can come out using "exit" at any time.

8) Note that the files are accessible from outside the chroot as
/var/lib/mock/

9) Edit the kickstart file of your choice as needed - they are in
/usr/share/spin-kickstarts/
eg edit the kickstart file for i386 install iso.
Can do this outside the chroot and then copy in to the correct dir from
outside the chroot if you like. Or edit within the chroot if you installed
vim as a package as above.

Edit the mirror lines to suit, and also change the package list if you wish.
I remove all the unwanted language support to make a large saving in iso
size produced.

My repo lines are of the style:
repo --name=f11
--baseurl=http://my-chosen-mirror/pub/fedora/linux/releases/11/Ever
ything/$basearch/os/ --exclude kernel*debug* --exclude kernel-kdump*
--exclude s
yslog-ng --exclude java-1.5.0-gcj-devel --exclude astronomy-bookmarks
--exclude 
generic* --exclude java-1.5.0-gcj-javadoc --exclude btanks --exclude
GConf2-dbus
 --exclude bluez-gnome
repo --name=f11-updates
--baseurl=http://my-chosen-mirror/pub/fedora/linux/updates/
$releasever/$basearch/ --exclude kernel*debug* --exclude kernel-kdump*
--exclude
 syslog-ng --exclude java-1.5.0-gcj-devel --exclude astronomy-bookmarks
--exclud
e generic* --exclude java-1.5.0-gcj-javadoc --exclude btanks --exclude
GConf2-db
us --exclude bluez-gnome

However referral to the mirrorlist as in the original files should work
fine.

10) Can cleanup the rpm database as
mock-chroot> rm -f /var/lib/rpm/__db.00*

This turned out to be necessary for me before it would work.

Supposed to be not vital if composing for same arch. But I did it anyway.

11) Now we can finally run the build...

mock-chroot> pungi -c /usr/share/spin-kickstarts/my-chosen-kickstart-file.ks
--des
tdir=/compose --nosplitmedia --nosource

This will likely take a long time - very long time and should trawl the repo
and
 collect what it needs.

12) From outside the chroot environment the files are at /var/lib/mock/....

The files are finally produced in the sub-directories of /compose visible
from outside the chroot as in my case where the system was initiated with
name "fedora-11-i386":

ls /var/lib/mock/fedora-11-i386/root/compose/20091008/i386/iso/
Fedora-20091008-i386-CHECKSUM  Fedora-20091008-i386-netinst.iso
Fedora-20091008-i386-DVD.iso

Within the chroot they will be from directory "fedora-11-i386/"

I hope this helps get going generating remix isos......

-- 
View this message in context: http://www.nabble.com/kickstart----refreshing-rpm%27s.-tp25811684p25823852.html
Sent from the Fedora List mailing list archive at Nabble.com.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux