From Fedora Project Wiki

< QA‎ | Test Days

m (Add to QA SOP category)
(update according to latest spin-kickstarts; say that this is for F-14 and update when F-14 is stable)
Line 7: Line 7:
{{admon/note|This guide is intended mainly for Fedora QA team|Ordinary users who want to participate on a test day don't have to follow this guide, the pre-built images will be published and available for them to download on a [[QA/Test_Days|Test Day pages]].}}
{{admon/note|This guide is intended mainly for Fedora QA team|Ordinary users who want to participate on a test day don't have to follow this guide, the pre-built images will be published and available for them to download on a [[QA/Test_Days|Test Day pages]].}}


1. Install required packages:
<ol>
<li>Install required packages:
<pre>
<pre>
yum install livecd-tools git
yum install livecd-tools git
</pre>
</pre>
</li>


2. Download our most recent kickstart script:
<li>Download our most recent kickstart script in F-14 branch:
<pre>
<pre>
git clone 'git://git.fedorahosted.org/spin-kickstarts.git' spin-kickstarts
git clone 'git://git.fedorahosted.org/spin-kickstarts.git' -b F-14
</pre>
</pre>
or if you have done it in the past, just update it:
or if you have done it in the past, just update it:
<pre>
<pre>
cd spin-kickstarts; git pull; cd ..
cd spin-kickstarts; git checkout F-14; git pull; cd ..
</pre>
</pre>
</li>


3. Create the live image:
<li>OPTIONAL: Create your custom kickstart file ''my-test-day.ks'', if you need some changes from the default configuration:
<pre>
livecd-creator -c spin-kickstarts/custom/qa-test-day.ks --cache /var/cache/live -f "testday-`date +%Y%m%d`"
</pre>
 
{{Admon/tip|Different architecture|You can use <code>setarch</code> command to create a x86 Live CD/DVD on a x86_64 system. Example: <code>setarch i686 livecd-creator <...></code>.}}
 
= Making custom changes =
 
You can make any number of custom changes in the script. Just create a new file ''qa-test-day-custom.ks'' in the parent directory looking like this:
 
<pre>
<pre>
%include spin-kickstarts/custom/qa-test-day.ks
%include spin-kickstarts/custom/qa-test-day.ks


#redefine repo to some local mirror
#redefine repos as you need (e.g. point it to local mirror with --baseurl, etc)
#repo --name=rawhide --baseurl=file:/mnt/globalsync/fedora/linux/development/$basearch/os/
#repo --name=fedora --baseurl=file:/mnt/globalsync/fedora/linux/development/14/$basearch/os/
#repo --name=updates --baseurl=file:/mnt/globalsync/fedora/linux/updates/14/$basearch/


%packages
%packages
#provide list of packages (normal, wildcarded, @comps) to be added or removed - dependencies are handled
#provide list of packages to be added or removed - dependencies are handled
#packageYouWant
#packageYouWant
#wildcardedPackagesYouWant*
#wildcardedPackagesYouWant*
#@CompYouWant
#@GroupYouWant
#-packageYouDontWant
#-packageYouDontWant
%end
%end
Line 50: Line 44:
%end
%end
</pre>
</pre>
</li>


If you have some local mirror of Rawhide, it is recommended to redefine the repository and you will download the packages much faster than from the Internet. You can also install or uninstall any packages or run any commands in the shell.
<li>Create the live image:
<pre>
livecd-creator -c spin-kickstarts/custom/qa-test-day.ks --cache /var/cache/live -f "testday-`date +%Y%m%d`"
</pre>
(of course replace ''spin-kickstarts/custom/qa-test-day.ks'' with ''my-test-day.ks'' if you have created your custom kickstart file)
 
{{Admon/tip|Different architecture|You can use <code>setarch</code> command to create a x86 Live CD/DVD on a x86_64 system. Example: <code>setarch i686 livecd-creator <...></code>. (Or you can hardcode the architecture inside the kickstart by replacing <code>$basearch</code> variable.)}}
</li>
</ol>


After you have made your changes, just run the <code>livecd-creator</code> and point it to your new script.


= Solving problems =
= Solving problems =
== Rawhide repository broken ==
If current rawhide repository is broken and the livecd can't be built, find [http://kojipkgs.fedoraproject.org/mash/ a mirror with older rawhide snapshot], create [[#Making_custom_changes|a new custom script]] and redefine the rawhide repository:<br/>
<pre>repo --name=rawhide --baseurl=protocol:/path-to-older-rawhide-repository/$basearch/os/</pre>
In the worst case you can base the whole livecd on Fedora 12 packages with this definition:
<pre>
# not really rawhide, overriden with F12 'released' repo
repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=$basearch
</pre>
Don't forget to comment out these lines when rawhide repository gets fixed.


== Anaconda dependencies broken ==
== Anaconda dependencies broken ==
Sometimes the image can't be built because of broken package dependencies. You may solve the problem by removing <code>anaconda</code> package. Anaconda requires a lot of dependencies and it may very often be the culprit. To remove anaconda you just create a [[#Making_custom_changes|custom script]] with <code>-anaconda</code> line in the <code>%packages</code> directive.
Sometimes the image can't be built because of broken package dependencies. You may solve the problem by removing <code>anaconda</code> package. Anaconda requires a lot of dependencies and it may very often be the culprit. To remove anaconda you just put <code>-anaconda</code> line in the <code>%packages</code> section.


== SELinux complaints ==
== SELinux complaints ==
Line 77: Line 68:
</pre>
</pre>


If that doesn't help, you may also modify the ''fedora-livecd-testday.ks'' file and after <code>%include</code> line add a directive
If that doesn't help, you may also modify your ''my-test-day.ks'' kickstart file and after <code>%include</code> line add a directive
<pre>
<pre>
selinux --permissive
selinux --permissive
</pre>
</pre>
(Note: Due to {{bz|547152}} you may also need to add <code>/usr/sbin/lokkit</code> inside <code>%packages</code>.)


Now the build should run fine.
Now the build should run fine.
Line 91: Line 84:
* [[How_to_create_and_use_a_Live_CD#Testing_your_Live_CD_using_KVM_or_qemu|How to load the live image in KVM or qemu]].
* [[How_to_create_and_use_a_Live_CD#Testing_your_Live_CD_using_KVM_or_qemu|How to load the live image in KVM or qemu]].


= Ideas For Improvement =
# <s>Create a .desktop file with a Test Day URL on the Desktop</s>
# <s>Make browser default homepage http://fedoraproject.org/wiki/Test_Day:Current (suggested by [[User:sgallagh]])</s>
# Setup a test day .repo for the running live image (suggested by [[User:sgallagh]])


[[Category:Test Days]]
[[Category:Test Days]]
[[Category:QA_SOPs]]
[[Category:QA_SOPs]]

Revision as of 11:17, 14 October 2010

Creating a Test Day Live Image

The following steps outline how to create a Fedora live image based on current Rawhide packages for use during Test Days.

This guide is intended mainly for Fedora QA team
Ordinary users who want to participate on a test day don't have to follow this guide, the pre-built images will be published and available for them to download on a Test Day pages.
  1. Install required packages:
    yum install livecd-tools git
    
  2. Download our most recent kickstart script in F-14 branch:
    git clone 'git://git.fedorahosted.org/spin-kickstarts.git' -b F-14
    

    or if you have done it in the past, just update it:

    cd spin-kickstarts; git checkout F-14; git pull; cd ..
    
  3. OPTIONAL: Create your custom kickstart file my-test-day.ks, if you need some changes from the default configuration:
    %include spin-kickstarts/custom/qa-test-day.ks
    
    #redefine repos as you need (e.g. point it to local mirror with --baseurl, etc)
    #repo --name=fedora --baseurl=file:/mnt/globalsync/fedora/linux/development/14/$basearch/os/
    #repo --name=updates --baseurl=file:/mnt/globalsync/fedora/linux/updates/14/$basearch/
    
    %packages
    #provide list of packages to be added or removed - dependencies are handled
    #packageYouWant
    #wildcardedPackagesYouWant*
    #@GroupYouWant
    #-packageYouDontWant
    %end
    
    %post
    #put any shell commands here
    %end
    
  4. Create the live image:
    livecd-creator -c spin-kickstarts/custom/qa-test-day.ks --cache /var/cache/live -f "testday-`date +%Y%m%d`"
    

    (of course replace spin-kickstarts/custom/qa-test-day.ks with my-test-day.ks if you have created your custom kickstart file)

    Different architecture
    You can use setarch command to create a x86 Live CD/DVD on a x86_64 system. Example: setarch i686 livecd-creator <...>. (Or you can hardcode the architecture inside the kickstart by replacing $basearch variable.)


Solving problems

Anaconda dependencies broken

Sometimes the image can't be built because of broken package dependencies. You may solve the problem by removing anaconda package. Anaconda requires a lot of dependencies and it may very often be the culprit. To remove anaconda you just put -anaconda line in the %packages section.

SELinux complaints

For building Test Days LiveCD you must have SELinux installed and enabled. Ideally it should be in the enforcing mode and everything should run fine. In case you have problems with that, you may switch the mode temporarily into permissive mode with this command run as root:

setenforce 0

If that doesn't help, you may also modify your my-test-day.ks kickstart file and after %include line add a directive

selinux --permissive

(Note: Due to RHBZ #547152 you may also need to add /usr/sbin/lokkit inside %packages.)

Now the build should run fine.

Further references