/usr/share/anaconda/addons/
directory, which is expected to contain your add-ons Python packages (directory trees).
~/temp/usr/share/anaconda/addons/
), place a copy of your add-on's package into it, and then execute the following command:
$
find . | cpio -c -o | gzip -9 > addon_updates.img
inst.updates=
boot option. The image will then be loaded and its contents will be used to add or replace any files in the installation environment.
[5]
Example 15. Sample RPM Spec File
Name: example-anaconda-addon Version: 0.1 Release: 1%{?dist} Summary: Anaconda addon useful for something in the installation process License: GPLv2+ URL: https://git.fedorahosted.org/cgit/example-anaconda-addon.git Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: anaconda >= 19 Requires: anaconda >= 19 %description This is an addon that brings some useful additional functionality to the Anaconda installer. %prep %setup -q %build %check make test %install make install DESTDIR=%{buildroot} %files %{_datadir}/anaconda/addons/org_fedora_example %doc COPYING ChangeLog README %changelog * Mon Jan 6 2014 Great Author <great.author@example.com> - 0.1-1 - Initial RPM for the example-anaconda-addon
make
utility with the following example Makefile:
Example 16. Sample Makefile
NAME = example-anaconda-addon VERSION = 0.1 ADDON = org_fedora_example TESTS = tests FILES = $(ADDON) \ $(TESTS) \ COPYING \ Makefile \ README EXCLUDES = \ *.pyc all: @echo "usage: make dist" @echo " make test" @echo " make install" @echo " make uninstall" DISTNAME = $(NAME)-$(VERSION) ADDONDIR = /usr/share/anaconda/addons/ DISTBALL = $(DISTNAME).tar.gz install: mkdir -p $(DESTDIR)$(ADDONDIR) cp -rv $(ADDON) $(DESTDIR)$(ADDONDIR) uninstall: rm -rfv $(DESTDIR)$(ADDONDIR) dist: rm -rf $(DISTNAME) mkdir -p $(DISTNAME) @if test -d ".git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generate automatically. Do not edit.'; echo; \ git log --stat --date=short ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(DISTNAME)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi for file in $(FILES); do \ cp -rpv $$file $(DISTNAME)/$$file; \ done for excl in $(EXCLUDES); do \ find $(DISTNAME) -name "$$excl" -delete; \ done tar -czvf $(DISTBALL) $(DISTNAME) rm -rf $(DISTNAME) test: PYTHONPATH=. nosetests --processes=-1 -vw tests/