Created attachment 1075044 [details] Full output of the pungi command Description of problem: pungi fails to replace variables in the "repo" lines of kickstart files when it runs lorax. Version-Release number of selected component (if applicable): pungi-4.0.2-1.fc23.noarch fedora-kickstarts-0.23.4-1.fc23.noarch lorax-23.18-1.fc23.x86_64 How reproducible: Always. Steps to Reproduce: 1. Run the following commands as root: setenforce 0 time pungi --nomacboot --flavor="Kickstart" --name="Fedora" --ver="23" \ --config=/usr/share/spin-kickstarts/fedora-install-server.ks ("--nomacboot" is not required to reproduce the bug, I only have it because I have removed the Mac filesystem modules from my kernel). Actual results: See attachment pungi-lorax-mirrorlist-error.log for the full results. The last few lines of the results are: Pungi:INFO: lorax --workdir /data/install/pungi/work/Kickstart/x86_64 --logfile /data/install/pungi/logs/lorax-x86_64.log --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch --source file:///data/install/pungi/23/Kickstart/x86_64/os --product Fedora --version 23 --release Fedora 23 --variant Kickstart --bugurl https://bugzilla.redhat.com --volid Fedora-Kickstart-23-x86_64 --nomacboot --force /data/install/pungi/23/Kickstart/x86_64/os Pungi:INFO: Running lorax --workdir /data/install/pungi/work/Kickstart/x86_64 --logfile /data/install/pungi/logs/lorax-x86_64.log --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch --source file:///data/install/pungi/23/Kickstart/x86_64/os --product Fedora --version 23 --release "Fedora 23" --variant Kickstart --bugurl https://bugzilla.redhat.com --volid Fedora-Kickstart-23-x86_64 --nomacboot --force /data/install/pungi/23/Kickstart/x86_64/os Pungi:ERROR: Got an error from lorax Pungi:ERROR: 2015-09-18 19:29:53,639: Added 'lorax-repo-0': file:///data/install/pungi/23/Kickstart/x86_64/os 2015-09-18 19:29:53,639: Fetching metadata... 2015-09-18 19:29:53,676: Added 'lorax-mirrorlist-0': http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch 2015-09-18 19:29:53,676: Fetching metadata... 2015-09-18 19:29:54,153: Error fetching metadata for lorax-mirrorlist-0: Failed to synchronize cache for repo 'lorax-mirrorlist-0' from 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch': Cannot prepare internal mirrorlist: No URLs in mirrorlist error: unable to create the dnf base object Traceback (most recent call last): File "/usr/bin/pungi", line 324, in <module> main() File "/usr/bin/pungi", line 177, in main mypungi.doBuildinstall() File "/usr/lib/python2.7/site-packages/pungi/gather.py", line 1444, in doBuildinstall pungi.util._doRunCommand(cmd, self.logger) File "/usr/lib/python2.7/site-packages/pungi/util.py", line 47, in _doRunCommand raise OSError, "Got an error (%d) from %s: %s" % (p1.returncode, command[0], err) OSError: Got an error (1) from lorax: 2015-09-18 19:29:53,639: Added 'lorax-repo-0': file:///data/install/pungi/23/Kickstart/x86_64/os 2015-09-18 19:29:53,639: Fetching metadata... 2015-09-18 19:29:53,676: Added 'lorax-mirrorlist-0': http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch 2015-09-18 19:29:53,676: Fetching metadata... 2015-09-18 19:29:54,153: Error fetching metadata for lorax-mirrorlist-0: Failed to synchronize cache for repo 'lorax-mirrorlist-0' from 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch': Cannot prepare internal mirrorlist: No URLs in mirrorlist error: unable to create the dnf base object real 9m3.415s user 1m25.990s sys 0m17.030s [root@f23ksb pungi]# Expected results: pungi runs lorax successfully. Additional info:
Created attachment 1075045 [details] Proposed patch to fix the bug Attaching proposed patch to fix the bug.
I met the same problem, and Mark's patch fixes it.
This is still present as of f24
I have posted the patch to Pagure as a pull request (with full attribution to Mark): https://pagure.io/pungi/pull-request/422
The patch is merged and included in 4.1.10. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f00a05d7b9 https://bodhi.fedoraproject.org/updates/FEDORA-2016-6cb65ea55b