From Fedora Project Wiki

< QA‎ | Test Days

(IRC channel #fedora-test-day)
(test day script accepted in spin-kickstarts project)
Line 9: Line 9:
1. Install required packages:
1. Install required packages:
<pre>
<pre>
yum install spin-kickstarts livecd-tools
yum install livecd-tools git
</pre>
</pre>


2. Save most recent [http://git.fedorahosted.org/git/spin-kickstarts.git?p=spin-kickstarts.git;a=blob_plain;f=fedora-live-base.ks;hb=HEAD fedora-live-base.ks] and [http://git.fedorahosted.org/git/spin-kickstarts.git?p=spin-kickstarts.git;a=blob_plain;f=fedora-livecd-desktop.ks;hb=HEAD fedora-livecd-desktop.ks] kickstart templates to a custom directory:
2. Download our most recent kickstart script:
<pre>
<pre>
wget 'http://git.fedorahosted.org/git/spin-kickstarts.git?p=spin-kickstarts.git;a=blob_plain;f=fedora-live-base.ks;hb=HEAD' -O fedora-live-base.ks
git clone 'git://git.fedorahosted.org/spin-kickstarts.git' spin-kickstarts
wget 'http://git.fedorahosted.org/git/spin-kickstarts.git?p=spin-kickstarts.git;a=blob_plain;f=fedora-livecd-desktop.ks;hb=HEAD' -O fedora-livecd-desktop.ks
</pre>
or if you have done it in the past, just update it:
<pre>
cd spin-kickstarts; git pull; cd ..
</pre>
</pre>


3. Create a new testday kickstart template ''fedora-livecd-testday.ks'' in the same directory, with this content:  
3. Create the live image:
<pre>
<pre>
%include fedora-livecd-desktop.ks
livecd-creator -c spin-kickstarts/custom/qa-test-day.ks --cache /var/cache/live -f "testday-`date +%Y%m%d`"
</pre>


%packages
{{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>.}}
gdb
 
strace
= Making custom changes =
ltrace
 
libdrm
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:
pidgin
mc
vim
nano
wget
xorg-x11-apps
gtk-recordmydesktop
gconf-editor
gimp
# save some space
-empathy
-@games
-brasero*
-sound-juicer
-gthumb
-gnome-backgrounds
-desktop-backgrounds*
-evolution
# brand as fedora test spin
fedora-logos
-generic-logos
%end


%post
<pre>
# Set Test_Day:Current as default browser homepage
%include spin-kickstarts/custom/qa-test-day.ks
cat << EOF > `ls -1 /usr/lib*/firefox*/browserconfig.properties`
browser.startup.homepage=https://fedoraproject.org/wiki/Test_Day:Current
EOF


# Create a .desktop link for Test Day wiki
#redefine repo to some local mirror
mkdir -p /etc/skel/Desktop
#repo --name=rawhide --baseurl=file:/mnt/globalsync/fedora/linux/development/$basearch/os/
cat << EOF > /etc/skel/Desktop/testday-wiki.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Participate in a Test Day
Type=Link
URL=https://fedoraproject.org/wiki/Test_Day:Current
Icon=gnome-fs-bookmark
EOF


# Create a .desktop link for Test Day IRC chat
%packages
cat << EOF > /etc/skel/Desktop/testday-irc.desktop
#packageYouWant
[Desktop Entry]
#wildcardedPackagesYouWant*
Encoding=UTF-8
#-packageYouDontWant
Name=Connect to a Test Day chat
%end
Type=Link
URL=http://webchat.freenode.net/?channels=fedora-test-day
Icon=gnome-fs-bookmark
EOF


# Add gnome-terminal shortcut to desktop
%post
cp /usr/share/applications/gnome-terminal.desktop /etc/skel/Desktop
#any shell commands
%end
%end
</pre>
</pre>


3. Create the live image:
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.
<pre>
livecd-creator -c fedora-livecd-testday.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>.}}
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 ==
== Rawhide repository broken ==
If current rawhide repository is broken and the livecd can't be built, and you have access to some mirror with older rawhide snapshot, you may edit ''fedora-livecd-testday.ks'' and redefine the rawhide repository after the <code>%include</code> line, for example looking like this:<br/>
If current rawhide repository is broken and the livecd can't be built, and you have access to some 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>
<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 11 packages with this definition:
In the worst case you can base the whole livecd on Fedora 11 packages with this definition:
Line 116: Line 80:


= Further references =
= Further references =
* [[QA Test Day Spin]]
* [[How to create and use a Live CD]]
* [[How to create and use a Live CD]]
* [[FedoraLiveCD/USBHowTo|How to write the live image to a USB stick]].   
* [[FedoraLiveCD/USBHowTo|How to write the live image to a USB stick]].   

Revision as of 13:45, 8 September 2009

QA.png


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.

Note.png
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:

git clone 'git://git.fedorahosted.org/spin-kickstarts.git' spin-kickstarts

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

cd spin-kickstarts; git pull; cd ..

3. Create the live image:

livecd-creator -c spin-kickstarts/custom/qa-test-day.ks --cache /var/cache/live -f "testday-`date +%Y%m%d`"
Idea.png
Different architecture
You can use setarch command to create a x86 Live CD/DVD on a x86_64 system. Example: setarch i686 livecd-creator <...>.

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:

%include spin-kickstarts/custom/qa-test-day.ks

#redefine repo to some local mirror
#repo --name=rawhide --baseurl=file:/mnt/globalsync/fedora/linux/development/$basearch/os/

%packages
#packageYouWant
#wildcardedPackagesYouWant*
#-packageYouDontWant
%end 

%post
#any shell commands
%end

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.

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

Solving problems

Rawhide repository broken

If current rawhide repository is broken and the livecd can't be built, and you have access to some mirror with older rawhide snapshot, create a new custom script and redefine the rawhide repository:

repo --name=rawhide --baseurl=protocol:/path-to-older-rawhide-repository/$basearch/os/

In the worst case you can base the whole livecd on Fedora 11 packages with this definition:

# not really rawhide, overriden with F11 'released' repo
repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-11&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f11&arch=$basearch

Don't forget to comment out these lines when rawhide repository gets fixed.

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 the fedora-livecd-testday.ks file and after %include line add a directive

selinux --permissive

Now the build should run fine.

Further references

Ideas For Improvement

  1. Create a .desktop file with a Test Day URL on the Desktop
  2. Make browser default homepage http://fedoraproject.org/wiki/Test_Day:Current (suggested by User:sgallagh)
  3. Setup a test day .repo for the running live image (suggested by User:sgallagh)