Discussion:
Packaging Add-on in ISO
sad man
2015-07-09 23:34:21 UTC
Permalink
Hello I am new to add-on development and have a question on how can I
create ISO with my custom add-ons.
From the guide
<http://rhinstaller.github.io/anaconda-addon-development-guide/sect-anaconda-addon-deploying-testing.html>,
we can place the .img file in the *images *directory of ISO and the
installer will pickup the add-on automatically.

But the part on creating RPM is a little vague. Once the RPM is created,
how/where should we place it in the ISO? and how can we direct anaconda to
use the add-on RPM?
--
Cheers,

Asadullah Hussain
LAUTERWASSER Stefan
2015-07-10 07:40:25 UTC
Permalink
Hello,


I use following for Fedora:



== ISO Repo Update ==


groupsXmlTemplate=$(ls -1 ${LINUX_MEDIUM_RESOURCE}/repodata/*comps.xml)
groupsXml=$TEMPS/$(basename $groupsXmlTemplate | sed 's!.*\(Fedora.*\)!\1!g')
packages=$TEMPS/packages.list
rpmdir=$TEMPS/rpms

rm -f $packages
rm -f $groupsXml

cd ${LINUX_MEDIUM_RESOURCE}


# reuse package groups xml file

mkdir -p $(dirname $groupsXml)
cp $groupsXmlTemplate $groupsXml


# move all packages somewhere else and move the actual/latest versions back
mkdir -p $rpmdir
find Packages -type f -name "*.rpm" | xargs mv -t $rpmdir
repomanage --new $rpmdir | xargs mv -t Packages

# update repodata

find Packages -name "*.rpm" >$packages
rm -rf repodata/*
createrepo -g $groupsXml -i $packages .



== ISO Creation ==


mkisofs \
-V "$INSTALL_MEDIUM_LABEL" \
-R -T -iso-level 4 \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-uid 0 \
-gid 0 \
-o "$INSTALL_MEDIUM_ISO" \
"$LINUX_MEDIUM_RESOURCE"

implantisomd5 "$INSTALL_MEDIUM_ISO"


HINT: ${LINUX_MEDIUM_RESOURCE}/isolinux/isolinux.cfg may contain medium lable name!



== Image?? ==


Do you talk about anaconda version update via image?



Mit freundlichen Grüßen/Best regards

Stefan Lauterwasser
________________________________
Von: anaconda-devel-list-***@redhat.com <anaconda-devel-list-***@redhat.com> im Auftrag von sad man <***@gmail.com>
Gesendet: Freitag, 10. Juli 2015 01:34
An: anaconda-devel-***@redhat.com
Betreff: Packaging Add-on in ISO

Hello I am new to add-on development and have a question on how can I create ISO with my custom add-ons.
From the guide<http://rhinstaller.github.io/anaconda-addon-development-guide/sect-anaconda-addon-deploying-testing.html>, we can place the .img file in the images directory of ISO and the installer will pickup the add-on automatically.
But the part on creating RPM is a little vague. Once the RPM is created, how/where should we place it in the ISO? and how can we direct anaconda to use the add-on RPM?

--
Cheers,

Asadullah Hussain
Martin Kolman
2015-07-10 15:57:41 UTC
Permalink
----- Original Message -----
Sent: Friday, July 10, 2015 1:34:21 AM
Subject: Packaging Add-on in ISO
Hello I am new to add-on development and have a question on how can I create
ISO with my custom add-ons.
You basically just need to ensure that the addon folder is present in the /usr/share/anaconda/addons/
on the filesystem on the ISO. Anaconda checks this directory on startup and loads any addons it can find
from it.

As described in the guide[0] there are 2 possible ways how you can do that.
From the guide , we can place the .img file in the images directory of ISO
and the installer will pickup the add-on automatically.
This is they first way - you "add" the addon to an existing ISO at runtime by using the Anaconda updates image functionality[1].
This can be handy if you don't want to change the ISO or during testing - as long as updates image drops the addon to the correct
path it will all work just fine.
But the part on creating RPM is a little vague. Once the RPM is created,
how/where should we place it in the ISO?
The is the second way - it basically expects you are making your own ISOs from RPM packages, using Lorax[2] or a similar tool.
The general idea is that your just add the addon RPM to the repo you are using form making the image and make sure it is installed.
This will result in addon being installed to the correct path, so that Anaconda can pick it up during the installation.
and how can we direct anaconda to use the add-on RPM?
There is currently no mechanism for telling Anaconda to fetch Addons from anywhere other than /usr/share/anaconda/addons/ on the
local file system, but using an updates image provides similar functionality.
--
Cheers,
Asadullah Hussain
Kind Regards
Martin Kolman

[0] http://rhinstaller.github.io/anaconda-addon-development-guide/sect-anaconda-addon-deploying-testing.html
[1] https://fedoraproject.org/wiki/Anaconda/Updates
[2] https://github.com/rhinstaller/lorax
_______________________________________________
Anaconda-devel-list mailing list
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Loading...