mirror of
https://pagure.io/fedora-kickstarts.git
synced 2025-12-10 00:50:32 +08:00
Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a3ed8b47d | ||
|
|
a7a0a92a80 | ||
|
|
921d0847c1 | ||
|
|
ea689030c8 | ||
|
|
6aab50009c | ||
|
|
947627c6e4 | ||
|
|
4a19e27d9d | ||
|
|
d56e42d0ea | ||
|
|
71dffbe915 | ||
|
|
d59f4195df | ||
|
|
08cc5d8884 | ||
|
|
0cfc3295ba | ||
|
|
3e9a228db5 | ||
|
|
ba34c74b4a | ||
|
|
16dd11b611 | ||
|
|
3112149d65 | ||
|
|
c8791014ed | ||
|
|
e875df9b80 | ||
|
|
4ecca276e8 | ||
|
|
2b5fc6b2c6 | ||
|
|
f34fc22406 | ||
|
|
c6c1a42cb0 | ||
|
|
b2f4ab4a3a | ||
|
|
41dcd0a870 | ||
|
|
53529140a4 | ||
|
|
9ea1fad3c8 | ||
|
|
a1b275fd30 | ||
|
|
2a6485f10a | ||
|
|
97db030843 | ||
|
|
c1a0eda13b | ||
|
|
5220de9de2 | ||
|
|
a2dbd83cf6 | ||
|
|
40d13b5b31 | ||
|
|
3d7df42f17 | ||
|
|
5ee5afac70 | ||
|
|
4cfcb783a1 | ||
|
|
a085b22db0 |
@@ -14,9 +14,6 @@ fedora-release-cinnamon
|
||||
@^cinnamon-desktop-environment
|
||||
|
||||
@libreoffice
|
||||
rhythmbox
|
||||
|
||||
# extra backgrounds
|
||||
f36-backgrounds-extras-gnome
|
||||
exaile
|
||||
|
||||
%end
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Description: Packages for the NeuroFedora computational neuroscience lab image.
|
||||
#
|
||||
# Maintained by the NeuroFedora SIG:
|
||||
# https://neuro.fedoraproject.org
|
||||
# mailto:neuro-sig@lists.fedoraproject.org
|
||||
|
||||
%packages
|
||||
fedora-release-compneuro
|
||||
# Includes numpy, scipy, jupyter, pandas, scikit, scipy, statsmodels, sympy, matplotlib
|
||||
@python-science
|
||||
|
||||
#Computational neuroscience packages
|
||||
arbor
|
||||
genesis-simulator
|
||||
moose
|
||||
nest
|
||||
neuron
|
||||
neuron-devel
|
||||
python3
|
||||
python3-brian2
|
||||
python3-ipython
|
||||
python3-lfpy
|
||||
python3-nest
|
||||
python3-netpyne
|
||||
python3-neuron
|
||||
python3-pynn
|
||||
python3-steps
|
||||
|
||||
%end
|
||||
@@ -1,6 +0,0 @@
|
||||
%include fedora-disk-base.ks
|
||||
%include fedora-minimal-common.ks
|
||||
|
||||
services --enabled=sshd,NetworkManager,chronyd,initial-setup
|
||||
|
||||
autopart --type=plain --noswap
|
||||
@@ -7,5 +7,7 @@ autopart --type=btrfs --noswap
|
||||
%packages
|
||||
-initial-setup
|
||||
-initial-setup-gui
|
||||
gnome-initial-setup
|
||||
anaconda-webui
|
||||
|
||||
%end
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
# This is the kickstart for Fedora IoT disk images.
|
||||
|
||||
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
timezone --utc Etc/UTC
|
||||
|
||||
selinux --enforcing
|
||||
rootpw --lock --iscrypted locked
|
||||
|
||||
bootloader --timeout=1 --append="modprobe.blacklist=vc4"
|
||||
|
||||
network --bootproto=dhcp --device=link --activate --onboot=on
|
||||
services --enabled=NetworkManager,sshd
|
||||
|
||||
zerombr
|
||||
clearpart --all --initlabel --disklabel=msdos
|
||||
autopart --nohome --noswap --type=plain
|
||||
|
||||
# Equivalent of %include fedora-repo.ks
|
||||
# Pull from the ostree repo that was created during the compose
|
||||
ostreesetup --nogpg --osname=fedora-iot --remote=fedora-iot --url=https://kojipkgs.fedoraproject.org/compose/iot/repo/ --ref=fedora/41/${basearch}/iot
|
||||
|
||||
reboot
|
||||
|
||||
%post --erroronfail
|
||||
|
||||
# Find the architecture we are on
|
||||
arch=$(uname -m)
|
||||
# Setup Raspberry Pi firmware
|
||||
if [[ $arch == "aarch64" ]]; then
|
||||
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
|
||||
fi
|
||||
|
||||
# Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes.
|
||||
# We want consumers of this image to track the two week releases.
|
||||
ostree admin set-origin --index 0 fedora-iot https://dl.fedoraproject.org/iot/repo/ "fedora/41/${arch}/iot"
|
||||
|
||||
# Make sure the ref we're supposedly sitting on (according
|
||||
# to the updated origin) exists.
|
||||
ostree refs "fedora-iot:fedora/41/${arch}/iot" --create "fedora-iot:fedora/41/${arch}/iot"
|
||||
|
||||
# Remove the old ref so that the commit eventually gets cleaned up.
|
||||
ostree refs "fedora-iot:fedora/41/${arch}/iot" --delete
|
||||
|
||||
# delete/add the remote with new options to enable gpg verification
|
||||
# and to point them at the cdn url
|
||||
ostree remote delete fedora-iot
|
||||
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/ --set=contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist fedora-iot 'https://ostree.fedoraproject.org/iot'
|
||||
|
||||
# We're getting a stray console= from somewhere, work around it
|
||||
rpm-ostree kargs --delete=console=tty0
|
||||
|
||||
# older versions of livecd-tools do not follow "rootpw --lock" line above
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=964299
|
||||
passwd -l root
|
||||
|
||||
# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1193590
|
||||
cp /etc/skel/.bash* /var/roothome
|
||||
|
||||
# Remove any persistent NIC rules generated by udev
|
||||
rm -vf /etc/udev/rules.d/*persistent-net*.rules
|
||||
|
||||
echo "Removing random-seed so it's not the same in every image."
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
echo "Packages within this iot image:"
|
||||
echo "-----------------------------------------------------------------------"
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
echo "-----------------------------------------------------------------------"
|
||||
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
rm -f /var/tmp/zeros
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
|
||||
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
||||
|
||||
# Anaconda is writing an /etc/resolv.conf from the install environment.
|
||||
# The system should start out with an empty file, otherwise cloud-init
|
||||
# will try to use this information and may error:
|
||||
# https://bugs.launchpad.net/cloud-init/+bug/1670052
|
||||
truncate -s 0 /etc/resolv.conf
|
||||
|
||||
%end
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
# Maintainer: Christian Dersch <lupinix@fedoraproject.org>
|
||||
# https://fedoraproject.org/wiki/User:Lupinix
|
||||
# Co-Maintainer: JT Pennington <q5sys@fedoraproject.org>
|
||||
# https://fedoraproject.org/wiki/User:q5sys
|
||||
|
||||
%include fedora-live-kde-base.ks
|
||||
%include fedora-live-minimization.ks
|
||||
@@ -42,10 +44,10 @@ skyviewer
|
||||
swarp
|
||||
wcstools
|
||||
|
||||
# Observatory: KStars + INDI drivers
|
||||
indi-3rdparty-drivers
|
||||
# Observatory: KStars + INDI
|
||||
indistarter
|
||||
kstars
|
||||
libindi
|
||||
|
||||
# misc. astronomy
|
||||
#celestia
|
||||
@@ -81,7 +83,6 @@ python3-astroML
|
||||
python3-astroquery
|
||||
python3-astroscrappy
|
||||
python3-APLpy
|
||||
python3-ATpy
|
||||
python3-ccdproc
|
||||
python3-fitsio
|
||||
python3-gatspy
|
||||
|
||||
@@ -31,7 +31,6 @@ kernel-modules
|
||||
kernel-modules-extra
|
||||
|
||||
# The point of a live image is to install
|
||||
anaconda
|
||||
anaconda-install-env-deps
|
||||
anaconda-live
|
||||
@anaconda-tools
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
%include fedora-live-base.ks
|
||||
%include fedora-cinnamon-common.ks
|
||||
|
||||
part / --size=8192
|
||||
part / --size=9216
|
||||
|
||||
%post
|
||||
# cinnamon configuration
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# Description: The Workstation based NeuroFedora computational neuroscience lab image.
|
||||
# https://fedoraproject.org/wiki/Changes/Comp_Neuro_Lab
|
||||
#
|
||||
# Maintained by the NeuroFedora SIG:
|
||||
# https://neuro.fedoraproject.org
|
||||
# mailto:neuro-sig@lists.fedoraproject.org
|
||||
|
||||
%include fedora-live-workstation.ks
|
||||
%include fedora-comp-neuro-common.ks
|
||||
%include fedora-neuro-gnome-common.ks
|
||||
|
||||
part / --size 10240
|
||||
@@ -17,8 +17,7 @@
|
||||
|
||||
%include fedora-live-xfce.ks
|
||||
|
||||
# The recommended part size for DVDs is too close to use for the games spin
|
||||
part / --size 14336
|
||||
part / --size 15360
|
||||
|
||||
%packages
|
||||
|
||||
@@ -27,8 +26,7 @@ part / --size 14336
|
||||
|
||||
-wine
|
||||
|
||||
# Remove libreoffice since it just got added to livecd-desktop and
|
||||
# will likely put the games spin over size and it is freeze time.
|
||||
# Remove libreoffice, we're here to have fun!
|
||||
-libreoffice*
|
||||
|
||||
# Extra screensavers isn't much help for the games spin
|
||||
@@ -46,12 +44,10 @@ armacycles-ad
|
||||
asc
|
||||
asc-music
|
||||
astromenace
|
||||
# beneath-a-steel-sky-cd scummvm games cut for size
|
||||
boswars
|
||||
bzflag
|
||||
crossfire-client
|
||||
extremetuxracer
|
||||
# flight-of-the-amazon-queen-cd scummvm games cut for size
|
||||
freeciv
|
||||
freecol
|
||||
freedoom
|
||||
@@ -59,9 +55,6 @@ freedroidrpg
|
||||
frozen-bubble
|
||||
# glob2 - currently broken
|
||||
lincity-ng
|
||||
#tmw - currently broken
|
||||
#maniadrive - currently broken
|
||||
#maniadrive-music - has been retired
|
||||
megaglest
|
||||
nethack-vultures
|
||||
netpanzer
|
||||
@@ -99,7 +92,6 @@ knights
|
||||
lbrickbuster2
|
||||
# liquidwar # Would pull in fluid-soundfont-lite-patches
|
||||
lordsawar
|
||||
# lure scummvm games cut for size
|
||||
# machineball # Would pull in fluid-soundfont-lite-patches
|
||||
nethack
|
||||
openlierox
|
||||
@@ -107,7 +99,7 @@ pachi
|
||||
pioneers
|
||||
quarry
|
||||
# Ri-li cut for size
|
||||
# rogue # recently abandoned. Someone picked it up. Waiting for approval.
|
||||
rogue
|
||||
# scorchwentbonkers # Would pull in fluid-soundfont-lite-patches
|
||||
solarwolf
|
||||
sopwith
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
%include fedora-lxde-common.ks
|
||||
|
||||
# increate the disk size for compose
|
||||
part / --size 6144
|
||||
part / --size 7168
|
||||
|
||||
%post
|
||||
# LXDE and LXDM configuration
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
%include fedora-mate-common.ks
|
||||
%include fedora-live-minimization.ks
|
||||
|
||||
part / --size 8192
|
||||
part / --size 9216
|
||||
|
||||
%post
|
||||
# set livesys session type
|
||||
|
||||
@@ -16,9 +16,6 @@ part / --size 10752
|
||||
|
||||
# Add robotics development packages
|
||||
@robotics-suite
|
||||
pcl-devel
|
||||
player-devel
|
||||
stage-devel
|
||||
|
||||
# Add version control packages
|
||||
git
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
%include fedora-live-minimization.ks
|
||||
%include fedora-scientific-common.ks
|
||||
|
||||
part / --size 17000
|
||||
part / --size 18000
|
||||
|
||||
%post
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ gnome-keyring-pam
|
||||
-binwalk
|
||||
-bkhive
|
||||
-bonesi
|
||||
-bro
|
||||
-cmospwd
|
||||
-dnstop
|
||||
-etherape
|
||||
@@ -79,7 +78,6 @@ gnome-keyring-pam
|
||||
-pdfcrack
|
||||
-proxychains
|
||||
-pyrit
|
||||
-raddump
|
||||
-rkhunter
|
||||
-safecopy
|
||||
-samdump2
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
%include fedora-live-minimization.ks
|
||||
%include fedora-sway-common.ks
|
||||
|
||||
part / --size 6144
|
||||
|
||||
%packages
|
||||
# To be able to show installation instructions on background
|
||||
nwg-wrapper
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
part / --size 8576
|
||||
|
||||
%packages
|
||||
gnome-initial-setup
|
||||
anaconda-webui
|
||||
%end
|
||||
|
||||
%post
|
||||
|
||||
# set livesys session type
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
%packages
|
||||
dnf5
|
||||
-@standard
|
||||
-initial-setup-gui
|
||||
-generic-release*
|
||||
-glibc-all-langpacks
|
||||
# recommended by iproute, we don't want it in minimal
|
||||
-iproute-tc
|
||||
# recommended by gnutls, we don't want it in minimal
|
||||
-trousers
|
||||
glibc-langpack-en
|
||||
iw
|
||||
NetworkManager-wifi
|
||||
%end
|
||||
|
||||
%post
|
||||
|
||||
# setup systemd to boot to the right runlevel
|
||||
echo -n "Setting default runlevel to multiuser text mode"
|
||||
systemctl set-default multi-user.target
|
||||
echo .
|
||||
|
||||
%end
|
||||
@@ -1,30 +0,0 @@
|
||||
# Description: Common gnome based configuration for NeuroFedora spin images.
|
||||
#
|
||||
# Maintained by the NeuroFedora SIG:
|
||||
# https://neuro.fedoraproject.org
|
||||
# mailto:neuro-sig@lists.fedoraproject.org
|
||||
|
||||
# Please specify the individual package sets in their own ks files:
|
||||
# - fedora-comp-neuro-common.ks
|
||||
|
||||
%packages
|
||||
@firefox
|
||||
|
||||
# Editors
|
||||
emacs
|
||||
vim-X11
|
||||
|
||||
# This is no longer workstation
|
||||
-@workstation-product
|
||||
|
||||
# No Workstation backgrounds
|
||||
#-desktop-backgrounds-basic
|
||||
#-*backgrounds-extras
|
||||
%end
|
||||
|
||||
%post
|
||||
|
||||
#Override the favorite desktop application in Dash
|
||||
sed -i "s/favorite-apps=."'*'"/favorite-apps=['firefox.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.gedit.desktop', 'anaconda.desktop']/" /etc/rc.d/init.d/livesys
|
||||
|
||||
%end
|
||||
@@ -3,7 +3,7 @@
|
||||
# Exactly one of the following should be uncommented
|
||||
|
||||
# For the master branch the following should be uncommented
|
||||
# %include fedora-repo-rawhide.ks
|
||||
%include fedora-repo-rawhide.ks
|
||||
|
||||
# For non-master branches the following should be uncommented
|
||||
%include fedora-repo-not-rawhide.ks
|
||||
# %include fedora-repo-not-rawhide.ks
|
||||
|
||||
@@ -162,6 +162,10 @@ if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then
|
||||
sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
|
||||
fi
|
||||
|
||||
# Trigger lvm-devices-import.path and .service to create
|
||||
# a new /etc/lvm/devices/system.devices for the root VG.
|
||||
rm -f /etc/lvm/devices/system.devices
|
||||
touch /etc/lvm/devices/auto-import-rootvg
|
||||
|
||||
# Remove machine-id on pre generated images
|
||||
rm -f /etc/machine-id
|
||||
|
||||
@@ -20,6 +20,10 @@ maintainers = [ "Rex Dieter", "Marc Deop", "Neal Gompa" ]
|
||||
fas = [ "grinnz" ]
|
||||
maintainers = [ "Dan Book" ]
|
||||
|
||||
[spins.mate_compiz.x86_64]
|
||||
fas = [ "raveit65" ]
|
||||
maintainers = [ "Wolfgang Ulbrich" ]
|
||||
|
||||
[spins.lxde.x86_64]
|
||||
fas = [ "cwickert", "mtasaka" ]
|
||||
maintainers = [ "Christoph Wickert", "Mamoru TASAKA" ]
|
||||
@@ -35,24 +39,20 @@ fas = [ "chimosky", "aperezbios", ]
|
||||
maintainers = [ "Chihurumnaya Ibiam", "Alex Perez" ]
|
||||
|
||||
[labs.astronomy_kde.x86_64]
|
||||
fas = [ "lupinix" ]
|
||||
maintainers = [ "Christian Dersch" ]
|
||||
fas = [ "lupinix", "q5sys" ]
|
||||
maintainers = [ "Christian Dersch", "JT Pennington" ]
|
||||
|
||||
[labs.security.x86_64]
|
||||
fas = [ "fab", "jsimon", "q5sys"]
|
||||
maintainers = [ "Fabian Affolter", "Joerg Simon", "JT Pennington" ]
|
||||
|
||||
[labs.comp_neuro.x86_64]
|
||||
fas = [ "bt0dotninja", "dan1mal", "ankursinha", "neuro-sig" ]
|
||||
maintainers = [ "Alberto Rodriguez Sanchez", "Danny Lee", "Ankur Sinha", "NeuroFedora SIG" ]
|
||||
|
||||
[labs.design_suite.x86_64]
|
||||
fas = [ "luya" ]
|
||||
maintainers = [ "Luya Tshimbalanga" ]
|
||||
|
||||
[labs.games.x86_64]
|
||||
fas = [ "dagostinelli", "richardanaya" ]
|
||||
maintainers = [ "Darryl T. Agostinelli", "Richard Anaya" ]
|
||||
fas = [ "ngompa", "q5sys" ]
|
||||
maintainers = [ "Neal Gompa", "JT Pennington" ]
|
||||
|
||||
[labs.jam_kde.x86_64]
|
||||
fas = [ "q5sys" ]
|
||||
@@ -100,9 +100,6 @@ maintainers = [ "Timothée Ravier", "Tomáš Popela" ]
|
||||
[silverblue.aarch64]
|
||||
fas = [ "siosm", "tpopela" ]
|
||||
maintainers = [ "Timothée Ravier", "Tomáš Popela" ]
|
||||
[silverblue.ppc64le]
|
||||
fas = [ "siosm", "tpopela" ]
|
||||
maintainers = [ "Timothée Ravier", "Tomáš Popela" ]
|
||||
|
||||
[kinoite.x86_64]
|
||||
fas = [ "siosm" ]
|
||||
@@ -110,9 +107,6 @@ maintainers = [ "Timothée Ravier" ]
|
||||
[kinoite.aarch64]
|
||||
fas = [ "siosm" ]
|
||||
maintainers = [ "Timothée Ravier" ]
|
||||
[kinoite.ppc64le]
|
||||
fas = [ "siosm" ]
|
||||
maintainers = [ "Timothée Ravier" ]
|
||||
|
||||
[sericea.x86_64]
|
||||
fas = [ "alebastr", "jkonecny", "anthr76", "fale" ]
|
||||
@@ -120,9 +114,6 @@ maintainers = [ "Aleksei Bavshin", "Jiří Konečný", "Anthony Rabbito", "Fabio
|
||||
[sericea.aarch64]
|
||||
fas = [ "alebastr", "jkonecny", "anthr76", "fale" ]
|
||||
maintainers = [ "Aleksei Bavshin", "Jiří Konečný", "Anthony Rabbito", "Fabio Alessandro Locati" ]
|
||||
[sericea.ppc64le]
|
||||
fas = [ "alebastr", "jkonecny", "anthr76", "fale" ]
|
||||
maintainers = [ "Aleksei Bavshin", "Jiří Konečný", "Anthony Rabbito", "Fabio Alessandro Locati" ]
|
||||
|
||||
[onyx.x86_64]
|
||||
fas = [ "joshstrobl" ]
|
||||
@@ -130,6 +121,3 @@ maintainers = [ "Joshua Strobl" ]
|
||||
[onyx.aarch64]
|
||||
fas = [ "joshstrobl" ]
|
||||
maintainers = [ "Joshua Strobl" ]
|
||||
[onyx.ppc64le]
|
||||
fas = [ "joshstrobl" ]
|
||||
maintainers = [ "Joshua Strobl" ]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
# Given as input a comps definition and a .ks file, list
|
||||
# the packages which would be installed. This list is
|
||||
# NOT depsolved, it's merely a textual list of explicitly
|
||||
@@ -11,38 +11,40 @@
|
||||
import os
|
||||
import sys
|
||||
import getopt
|
||||
import xml.etree.cElementTree as ElementTree
|
||||
import xml.etree.ElementTree as ElementTree
|
||||
|
||||
import pykickstart
|
||||
import pykickstart.parser
|
||||
import pykickstart.version
|
||||
|
||||
|
||||
def usage(ecode):
|
||||
print "Usage: %s [--version=VERSION] COMPS.xml KICKSTART.ks" % (sys.argv[0], )
|
||||
print "List packages installed by KICKSTART."
|
||||
print("Usage: {} [--version=VERSION] COMPS.xml KICKSTART.ks".format(sys.argv[0]))
|
||||
print("List packages installed by KICKSTART.")
|
||||
sys.exit(ecode)
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
opts,args = getopt.getopt(sys.argv[1:], 'h', ['help', 'version=', 'debug'])
|
||||
except getopt.GetoptError, e:
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'h', ['help', 'version=', 'debug'])
|
||||
except getopt.GetoptError as e:
|
||||
usage(1)
|
||||
|
||||
|
||||
version = None
|
||||
debug = False
|
||||
for o,a in opts:
|
||||
for o, a in opts:
|
||||
if o in ('-h', '--help'):
|
||||
usage(0)
|
||||
elif o in ('--debug', ):
|
||||
elif o in ('--debug',):
|
||||
debug = True
|
||||
elif o in ('--version', ):
|
||||
elif o in ('--version',):
|
||||
version = a
|
||||
|
||||
|
||||
if len(args) != 2:
|
||||
usage(1)
|
||||
comps_filename = args[0]
|
||||
kickstart_filename = args[1]
|
||||
|
||||
|
||||
if version:
|
||||
version_cls = pykickstart.version.stringToVersion(version)
|
||||
else:
|
||||
@@ -55,10 +57,10 @@ def main():
|
||||
working_directory = os.path.dirname(kickstart_filename)
|
||||
if working_directory:
|
||||
os.chdir(working_directory)
|
||||
|
||||
|
||||
parser = pykickstart.parser.KickstartParser(version_cls)
|
||||
parser.readKickstart(kickstart_filename)
|
||||
|
||||
|
||||
comps_groups = comps.findall('group')
|
||||
packages_for_group = {}
|
||||
for group in comps_groups:
|
||||
@@ -74,27 +76,29 @@ def main():
|
||||
packages_for_group[group_id.text] = pkglist
|
||||
|
||||
pkg_list = set()
|
||||
|
||||
|
||||
for group in parser.handler.packages.groupList:
|
||||
if debug:
|
||||
print >>sys.stderr, "# Including %d packages from group %r" % (len(packages_for_group[group.name]), group.name)
|
||||
for pkg in packages_for_group[group.name]:
|
||||
print("# Including {} packages from group '{}'".format(len(packages_for_group.get(group.name, [])),
|
||||
group.name), file=sys.stderr)
|
||||
for pkg in packages_for_group.get(group.name, []):
|
||||
pkg_list.add(pkg)
|
||||
if debug:
|
||||
print >>sys.stderr, "# Adding %d explicitly specified packages" % (len(parser.handler.packages.packageList), )
|
||||
print("# Adding {} explicitly specified packages".format(len(parser.handler.packages.packageList)),
|
||||
file=sys.stderr)
|
||||
for pkg in parser.handler.packages.packageList:
|
||||
pkg_list.add(pkg)
|
||||
if debug:
|
||||
print >>sys.stderr, "# Processing %d explicitly excluded packages" % (len(parser.handler.packages.excludedList), )
|
||||
print("# Processing {} explicitly excluded packages".format(len(parser.handler.packages.excludedList)),
|
||||
file=sys.stderr)
|
||||
for pkg in parser.handler.packages.excludedList:
|
||||
if pkg in pkg_list:
|
||||
pkg_list.remove(pkg)
|
||||
pkg_list.discard(pkg)
|
||||
|
||||
for pkg in sorted(pkg_list):
|
||||
print "%s" % (pkg, )
|
||||
print(pkg)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user