Compare commits

...

19 Commits

Author SHA1 Message Date
Brian C. Lane
17262c9c55 Automatic commit of package [lorax] release [25.22-1].
Created by command:

/usr/bin/tito tag
2017-06-01 08:17:23 -07:00
Brian C. Lane
b8550cbfd6 Remove filegraft from arm.tmpl (#1457906)
It isn't used at all, so remove it instead of crashing.

(cherry picked from commit cd4d866e9f)
2017-06-01 08:16:56 -07:00
Stephen Gallagher
efb671e94f Use anaconda-core to detect buildarch
For historical reasons, lorax used the 'anaconda' package as a
touchstone to determine the architecture for the build. At some
point, this package became a metapackage that pulls in both the
GUI and headless installers.

In the modular world, it's possible that only the core and TUI bits
may be available for use. The only subpackage of anaconda that is
guaranteed to be on any viable system is anaconda-core, so let's
switch to using that for the touchstone instead of the metapackage.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
(cherry picked from commit 2c3007beb8)
2017-06-01 08:16:49 -07:00
Brian C. Lane
5a7f9dd91b Automatic commit of package [lorax] release [25.21-1].
Created by command:

/usr/bin/tito tag
2017-05-31 08:39:33 -07:00
Brian C. Lane
b1fa2de9fd arm.tmpl import basename (#1457055)
(cherry picked from commit f3d262c8f7)
2017-05-31 08:34:48 -07:00
Brian C. Lane
6459a9b96f Automatic commit of package [lorax] release [25.20-1].
Created by command:

/usr/bin/tito tag
2017-05-30 11:49:24 -07:00
Brian C. Lane
540b97e780 Try all packages when installpkg --optional is used.
Also sort the expanded list of packages so that any failures will
be consistent instead of depending on the randomness of a set().
And add better logging when things fail.

The core issue is that repodata may have packages that match globs, but
they cannot actually be installed (eg. sigrok-firmware). This can cause
*some* of the globbed packages to be installed before hitting the
failure package.

With this change it will log the expanded list of packages if a glob is
used. It will skip any packages that fail to install when using
--optional with the glob, and continue to install the rest.

Related: rhbz#1440417
(cherry picked from commit 1c6b083260)
2017-05-30 11:29:29 -07:00
Brian C. Lane
5b47874e58 livemedia-creator: Add release license files to / of the iso
This used to be handled by a %post section of the kickstart, but that
won't work with lmc, so do it in the template instead.

(cherry picked from commit c91278a17d)
2017-05-30 11:29:07 -07:00
Brian C. Lane
10e3ec0bac lorax: Add release license files to / of the iso
(cherry picked from commit 9fe59eed0b)
2017-05-30 11:29:00 -07:00
Brian C. Lane
e39c62584b INSTALL_ROOT and LIVE_ROOT are not available during %post
These were set by livecd-creator, and the %post section was used to
setup the license files on the / of the iso which will not work from
inside anaconda so drop it completely.

(cherry picked from commit 092c593d6b)
2017-05-30 11:28:54 -07:00
Brian C. Lane
228ae840fd Add --noverifyssl to lorax (#1430483)
Previously lorax had no way to use repos with self-signed certificates.
This adds the --noverifyssl cmdline option which will ignore certificate
errors.

Resolves: rhbz#1430483
(cherry picked from commit cc56a5b5c9)
2017-05-30 11:28:46 -07:00
Brian C. Lane
a27ec289ca Automatic commit of package [lorax] release [25.19-1].
Created by command:

/usr/bin/tito tag
2017-02-22 10:24:47 -08:00
Brian C. Lane
bd385419ad Create /dev/random and /dev/urandom before running rpm -qa (#1420523)
In order to run rpm inside the newly created image it now needs to
create a couple device nodes to satisfy nss, which is used by rpm.

(cherry picked from commit d95e69aa34)
2017-02-22 10:21:27 -08:00
Brian C. Lane
5c5fefaded Automatic commit of package [lorax] release [25.18-1].
Created by command:

/usr/bin/tito tag
2017-02-06 10:27:46 -08:00
Brian C. Lane
92e60d7dd1 Print the full NEVRA when installing packages. 2017-01-30 09:20:20 -08:00
Dennis Gilmore
c43c5f1a7f Only cleanup libhistory from readline
with readline 7 libreadline.so moved to libdir as a result it is
currently removed in the cleanup phase, however it is needed

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
(cherry picked from commit f1378dd443)
2017-01-30 09:04:17 -08:00
Brian C. Lane
8efc4aeb81 Automatic commit of package [lorax] release [25.17-1]. 2016-10-17 17:41:14 -07:00
Vendula Poncova
2cc4daa127 Add missing fonts (#1370118)
Added fonts to support Tibetan, Khmer and Burmese.

Signed-off-by: Brian C. Lane <bcl@redhat.com>
(cherry picked from commit 5dbc56bae9)
2016-10-17 09:16:59 -07:00
Dan Horák
ca53d65313 drop ssh server key generation for s390(x) (#1383641)
Let the keys to be created during runtime as on other arches.

Signed-off-by: Brian C. Lane <bcl@redhat.com>
(cherry picked from commit 362e116cb5)
2016-10-12 09:09:11 -07:00
21 changed files with 159 additions and 62 deletions

View File

@ -292,16 +292,6 @@ rm /var/lib/systemd/random-seed
rm -f /boot/*-rescue*
%end
%post --nochroot
cp $INSTALL_ROOT/usr/share/licenses/*-release/* $LIVE_ROOT/
# only works on x86, x86_64
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi
%end
%post
cat >> /etc/rc.d/init.d/livesys << EOF

View File

@ -3,7 +3,7 @@
%define debug_package %{nil}
Name: lorax
Version: 25.16
Version: 25.22
Release: 1%{?dist}
Summary: Tool for creating the anaconda install images
@ -148,6 +148,32 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%changelog
* Thu Jun 01 2017 Brian C. Lane <bcl@redhat.com> 25.22-1
- Remove filegraft from arm.tmpl (#1457906) (bcl@redhat.com)
- Use anaconda-core to detect buildarch (sgallagh@redhat.com)
* Wed May 31 2017 Brian C. Lane <bcl@redhat.com> 25.21-1
- arm.tmpl import basename (#1457055) (bcl@redhat.com)
* Tue May 30 2017 Brian C. Lane <bcl@redhat.com> 25.20-1
- Try all packages when installpkg --optional is used. (bcl@redhat.com)
- livemedia-creator: Add release license files to / of the iso (bcl@redhat.com)
- lorax: Add release license files to / of the iso (bcl@redhat.com)
- INSTALL_ROOT and LIVE_ROOT are not available during %%post (bcl@redhat.com)
- Add --noverifyssl to lorax (#1430483) (bcl@redhat.com)
* Wed Feb 22 2017 Brian C. Lane <bcl@redhat.com> 25.19-1
- Create /dev/random and /dev/urandom before running rpm -qa (#1420523)
(bcl@redhat.com)
* Mon Feb 06 2017 Brian C. Lane <bcl@redhat.com> 25.18-1
- Print the full NEVRA when installing packages. (bcl@redhat.com)
- Only cleanup libhistory from readline (dennis@ausil.us)
* Mon Oct 17 2016 Brian C. Lane <bcl@redhat.com> 25.17-1
- Add missing fonts (#1370118) (vponcova@redhat.com)
- drop ssh server key generation for s390(x) (#1383641) (dan@danny.cz)
* Mon Sep 26 2016 Brian C. Lane <bcl@redhat.com> 25.16-1
- Fix broken sshd.inst boot option (#1378378) (jjelen@redhat.com)
- Don't log dracut initrd regeneration messages into /tmp/syslog (#1369439) (rvykydal@redhat.com)

View File

@ -1 +1 @@
25.16-1 ./
25.22-1 ./

View File

@ -52,12 +52,12 @@ mkdir ${KERNELDIR}
%endif
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -65,9 +65,15 @@ mkdir ${KERNELDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
@ -75,6 +81,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
-graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${efigraft} ${imggraft}
${efigraft} ${filegraft}
treeinfo images-${basearch} boot.iso images/boot.iso
%endif

View File

@ -11,6 +11,8 @@ LORAXDIR="usr/share/lorax/"
# keep a comma-delimited list of platforms installed to add to .treeinfo
platforms = ""
delimiter = ''
from os.path import basename
%>
mkdir images
@ -48,11 +50,9 @@ treeinfo ${basearch} platforms ${platforms}
%endif
%endfor
# Inherit iso-graft/ if it exists from external templates
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
%endfor
## FIXME: ARM may need some extra boot config

View File

@ -6,6 +6,8 @@ BOOTDIR="boot"
KERNELDIR=PXEBOOTDIR
LIVEDIR="LiveOS"
LORAXDIR="usr/share/lorax/"
from os.path import basename
%>
mkdir ${LIVEDIR}
@ -41,5 +43,10 @@ mkdir ${KERNELDIR}
%endif
%endfor
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
%endfor
## FIXME: ARM may need some extra boot config

View File

@ -18,6 +18,8 @@ prepboot = ""
## Instead we'll just replace any non-ASCII characters in the isolabel
## with '_', which means we won't need any udev escapes.
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
from os.path import basename
%>
## Test ${runtime_img} to see if udf is needed
@ -90,15 +92,21 @@ install ${configdir}/mapping ${BOOTDIR}
%endfor
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${prepboot} -part -hfs -T -r -l -J \
@ -111,7 +119,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} ${imggraft}
${LIVEDIR}=${outroot}/${LIVEDIR} ${filegraft}
%for kernel in kernels:
treeinfo images-${kernel.arch} boot.iso images/boot.iso

View File

@ -7,6 +7,8 @@ INITRD_ADDRESS="0x02000000"
LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
from os.path import basename
%>
mkdir images
@ -34,11 +36,17 @@ treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
treeinfo images-${basearch} generic.ins generic.ins
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor

View File

@ -91,7 +91,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"]; compressargs=None; %>
<% filegraft=""; images=["product", "updates"]; compressargs=None; %>
%if basearch == 'i386':
# Limit the amount of memory xz uses on i386
<% compressargs="--xz -9 --memlimit-compress=3700MiB" %>
@ -100,10 +100,16 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
@ -113,6 +119,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \
${efigraft} ${imggraft}
${efigraft} ${filegraft}
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -21,6 +21,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
## Anaconda finds the CDROM device automatically
rootarg = ""
from os.path import basename
%>
## Test ${runtime_img} to see if udf is needed
@ -93,12 +95,12 @@ install ${configdir}/mapping ${BOOTDIR}
%endfor
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -106,9 +108,15 @@ install ${configdir}/mapping ${BOOTDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${prepboot} -part -hfs -T -r -l -J \
@ -120,7 +128,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
%for kernel in kernels:

View File

@ -14,6 +14,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
## Anaconda finds the CDROM device automatically
rootarg = ""
from os.path import basename
%>
## Test ${runtime_img} to see if udf is needed
@ -69,12 +71,12 @@ install ${configdir}/mapping ${BOOTDIR}
mkdir images/
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -82,9 +84,15 @@ mkdir images/
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -v -U -J -R -T \
-o ${outroot}/images/boot.iso \
@ -96,7 +104,7 @@ runcmd mkisofs -v -U -J -R -T \
-no-desktop -allow-multidot ${udfargs} -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
%for kernel in kernels:
treeinfo images-${kernel.arch} boot.iso images/boot.iso

View File

@ -292,7 +292,7 @@ removefrom procps /usr/bin/vmstat /usr/bin/w /usr/bin/watch
removefrom psmisc /usr/share/locale/*
removefrom pygtk2 /usr/bin/* /usr/${libdir}/pygtk/*
removefrom pykickstart /usr/bin/* /usr/share/locale/*
removefrom readline /usr/${libdir}/*
removefrom readline /usr/${libdir}/libhistory*
removefrom libreport /usr/bin/* /usr/share/locale/*
removefrom rpm /usr/bin/* /usr/share/locale/*
removefrom rsync /etc/*

View File

@ -152,6 +152,9 @@ installpkg xorg-x11-fonts-misc
installpkg aajohan-comfortaa-fonts
installpkg abattis-cantarell-fonts
installpkg sil-scheherazade-fonts
installpkg jomolhari-fonts
installpkg khmeros-base-fonts
installpkg sil-padauk-fonts
## debugging/bug reporting tools
installpkg gdb-gdbserver

View File

@ -87,15 +87,6 @@ append etc/shadow "install::14438:0:99999:7:::"
## remove root password
replace "root:\*:" "root::" etc/shadow
## s390-specific setup
%if basearch in ("s390", "s390x"):
## generate ssh keys
runcmd ssh-keygen -q -C "" -N "" -t rsa -f ${root}/etc/ssh/ssh_host_rsa_key
runcmd ssh-keygen -q -C "" -N "" -t dsa -f ${root}/etc/ssh/ssh_host_dsa_key
chmod etc/ssh/ssh_host*_key 600
chmod etc/ssh/ssh_host*_key.pub 644
%endif
## gconf settings
gconfset /desktop/gnome/interface/accessibility bool true
@ -127,6 +118,9 @@ remove etc/lvm/lvm.conf
append etc/lvm/lvm.conf "global {\n\tuse_lvmetad = 1\n}\n"
## Record the package versions used to create the image
runcmd chroot ${root} /bin/rpm -qa --pipe "tee /root/lorax-packages.log"
## rpm initializes nss, which requires /dev/urandom to be present, hence the mknod
runcmd chroot ${root} /usr/bin/mknod -m 666 /dev/random c 1 8
runcmd chroot ${root} /usr/bin/mknod -m 666 /dev/urandom c 1 9
runcmd chroot ${root} /usr/bin/rpm -qa --pipe "tee /root/lorax-packages.log"
## TODO: we could run prelink here if we wanted?

View File

@ -7,6 +7,8 @@ INITRD_ADDRESS="0x02000000"
LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
from os.path import basename
%>
mkdir images
@ -36,12 +38,12 @@ treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm
treeinfo images-${basearch} generic.ins generic.ins
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -49,5 +51,11 @@ treeinfo images-${basearch} generic.ins generic.ins
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor

View File

@ -93,7 +93,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"]; compressargs=None; %>
<% filegraft=""; images=["product", "updates"]; compressargs=None; %>
%if basearch == 'i386':
# Limit the amount of memory xz uses on i386
<% compressargs="--xz -9 --memlimit-compress=3700MiB" %>
@ -102,7 +102,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -110,9 +110,15 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
@ -122,6 +128,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${efigraft} ${imggraft}
${efigraft} ${filegraft}
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -371,12 +371,12 @@ def get_buildarch(dbo):
buildarch = None
q = dbo.sack.query()
a = q.available()
for anaconda in a.filter(name="anaconda"):
for anaconda in a.filter(name="anaconda-core"):
if anaconda.arch != "src":
buildarch = anaconda.arch
break
if not buildarch:
logger.critical("no anaconda package in the repository")
logger.critical("no anaconda-core package in the repository")
sys.exit(1)
return buildarch

View File

@ -107,6 +107,8 @@ def lorax_parser():
metavar="[repo]", help="Names of repos to disable")
optional.add_argument("--rootfs-size", type=int, default=2,
help="Size of root filesystem in GiB. Defaults to 2.")
optional.add_argument("--noverifyssl", action="store_true", default=False,
help="Do not verify SSL certificates")
# add the show version option
parser.add_argument("-V", help="show program's version number and exit",

View File

@ -97,7 +97,7 @@ class LoraxRpmCallback(dnf.callback.TransactionProgress):
return
self._last_ts = ts_done
msg = '(%d/%d) %s.%s' % (ts_done, ts_total, package.name, package.arch)
msg = '(%d/%d) %s' % (ts_done, ts_total, package)
logger.info(msg)
elif action == self.TRANS_POST:
msg = "Performing post-installation setup tasks"

View File

@ -570,8 +570,21 @@ class LoraxTemplateRunner(object):
for exclude in excludes:
pkgnames = {pkgname for pkgname in pkgnames if not fnmatch.fnmatch(pkgname, exclude)}
# Sort the results so that we have consistent results
pkgnames = sorted(pkgnames)
# If the request is a glob, expand it in the log
if any(g for g in ['*','?','.'] if g in p):
logger.info("installpkg: %s expands to %s", p, ",".join(pkgnames))
for pkgname in pkgnames:
self.dbo.install(pkgname)
try:
self.dbo.install(pkgname)
except Exception as e: # pylint: disable=broad-except
if required:
raise
# Not required, log it and continue processing pkgs
logger.error("installpkg %s failed: %s", pkgname, str(e))
except Exception as e: # pylint: disable=broad-except
logger.error("installpkg %s failed: %s", p, str(e))
errors = True

View File

@ -89,7 +89,7 @@ def main():
dnfbase = get_dnf_base_object(installtree, opts.source, opts.mirrorlist, opts.repos,
opts.enablerepos, opts.disablerepos,
dnftempdir, opts.proxy, opts.version, opts.cachedir,
os.path.dirname(opts.logfile))
os.path.dirname(opts.logfile), not opts.noverifyssl)
if dnfbase is None:
print("error: unable to create the dnf base object", file=sys.stderr)
@ -136,7 +136,7 @@ def main():
def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
enablerepos=None, disablerepos=None,
tempdir="/var/tmp", proxy=None, releasever="21",
cachedir=None, logdir=None):
cachedir=None, logdir=None, sslverify=True):
""" Create a dnf Base object and setup the repositories and installroot
:param string installroot: Full path to the installroot
@ -148,6 +148,7 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
:param string proxy: http proxy to use when fetching packages
:param string releasever: Release version to pass to dnf
:param string cachedir: Directory to use for caching packages
:param bool noverifyssl: Set to True to ignore the CA of ssl certs. eg. use self-signed ssl for https repos.
If tempdir is not set /var/tmp is used.
If cachedir is None a dnf.cache directory is created inside tmpdir
@ -195,6 +196,9 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
if proxy:
conf.proxy = proxy
if sslverify == False:
conf.sslverify = False
# Add .repo files
if repos:
reposdir = os.path.join(tempdir, "dnf.repos")