LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   livecd-creator, kickstart files, adding files to /home directory. I.E. software dedicated livecd (http://www.linuxquestions.org/questions/fedora-35/livecd-creator-kickstart-files-adding-files-to-home-directory-i-e-software-dedicated-livecd-868260/)

Bastian123 03-13-2011 04:31 AM

livecd-creator, kickstart files, adding files to /home directory. I.E. software dedicated livecd
 
Hello,

I want to customize my livecd ISO image of fedora based on kickstart by adding my program to it. (I just want to make livecd based on fedora to distribute my program in dedicated live distro)
However the program is in sourcecode.
I would like to add it to the newly created ISO in compiled form ie excutable.
Now I know that I can add the required packages to my Live image by adding them in package section of kickstart.
Questions are:
1. How can I put the source code of my program in the /hoe/liveuser/myprogram?
2. how can I commit the followong:
Code:

ln -s /usr/bin/ccache gcc
ln -s /usr/bin/ccache g++
[me@localhost projectSrcfolder]$cd build
ccmake ..
make
make install

in my live system kickstart on source code ?
3. Is it possible at all to do it in fedora with kickstart or shall use maby other procedure or distro ?

EricTRA 03-13-2011 04:42 AM

Hello and Welcome to LinuxQuestions,

You can run your commands in the %post section of kickstart but you'll need to make sure that in your installation from CD or your live system you have a fully functional build environment. If you don't it'll be exiting with errors. I think it's a better idea, if you have a build environment for Fedore already set up, to compile your software and include it as RPM in your cd and install it from there as normal software. For some more information about kickstart you can consult the RedHat documentation on kickstart and kickstart options.

Kind regards,

Eric

Bastian123 03-13-2011 05:02 AM

Hello & hello LQ too :)

Well off course I have studied the docs.
Problem 1. The first problem is the following kickstart doesn't seem to work for me.
myKickstart.ks:
Code:

...
<list of packages required for compilation>
%post
#create folder for my source code
cat >> /etc/rc.d/init.d/livesys << EOF

mkdir /home/liveuser/myApp_src
chown -R liveuser.liveuser /home/liveuser/myApp_src
EOF
%end
%post --nochroot
cp -rf /home/bastian/myAppSrc/* $INSTALL_ROOT/home/liveuser/myApp_src
%end

i.e. after booting the live there is nothing in the /home/liveuser/myApp_src.
Problem 2.
I wasn't considering creating RPM as I think it probably is complicated to create such for a program that requires dependencies.The program compiles fine on host system but creating of an RPM would mean i have to make a local yum repo and add it to kickstart and it sound kind of difficult


All times are GMT -5. The time now is 05:29 AM.