Compare commits
19 Commits
master
...
f25-branch
Author | SHA1 | Date | |
---|---|---|---|
|
17262c9c55 | ||
|
b8550cbfd6 | ||
|
efb671e94f | ||
|
5a7f9dd91b | ||
|
b1fa2de9fd | ||
|
6459a9b96f | ||
|
540b97e780 | ||
|
5b47874e58 | ||
|
10e3ec0bac | ||
|
e39c62584b | ||
|
228ae840fd | ||
|
a27ec289ca | ||
|
bd385419ad | ||
|
5c5fefaded | ||
|
92e60d7dd1 | ||
|
c43c5f1a7f | ||
|
8efc4aeb81 | ||
|
2cc4daa127 | ||
|
ca53d65313 |
@ -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
|
||||
|
28
lorax.spec
28
lorax.spec
@ -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)
|
||||
|
@ -1 +1 @@
|
||||
25.16-1 ./
|
||||
25.22-1 ./
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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/*
|
||||
|
@ -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
|
||||
|
@ -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?
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
|
@ -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:
|
||||
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
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user