<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You clone the repo inside the rpmbuild/SOURCES folder, so you get all sources inside
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">
rpmbuild/SOURCES/</span>fedora-32-x86_64-ez folder, not inside rpmbuild/SOURCES itself.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Just copy the files to the SOURCES folder directly, e.g.:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
v<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255); display: inline !important">rpmbuild/SOURCES</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255); display: inline !important">#
cd rpmbuild/SOURCES</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255); display: inline !important">#
git clone -b dist-vz7-u15 <a href="https://src.openvz.org/scm/ovzt/fedora-32-x86_64-ez.git" id="LPlnk763963">
https://src.openvz.org/scm/ovzt/fedora-32-x86_64-ez.git</a><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
# cp fedora-32-x86_64-ez/os* <span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">fedora-32-x86_64-ez/*packages .</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
...</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also make sure that there no other files in rpmbuild/SOURCES, otherwise the template can pick up them.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The root of the problem is that template authors are quite lazy to declare every source file separately in spec, so the <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">spec looks for sources in a rather
tricky way:</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
%define sources_lst() \
<div>%((cd %_sourcedir;\</div>
<div>s=1;\</div>
<div>for tmpl in %1; do\</div>
<div>sources=$tmpl"_*";\</div>
<div>for file in $sources; do\</div>
<div>echo Source$s: $file;\</div>
<div>s=$((s+1))\</div>
<div>done;\</div>
<div>done))\</div>
%nil<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
%define templates_list() %((cd %_sourcedir; for f in *_packages; do echo -n "${f%_*} "; done))<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The latter command scans _sourcedir recursively so it finds *_packages files even in subfolders. But the former macro doesn't look into subfolders so at least os* files are missing.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users-bounces@openvz.org <users-bounces@openvz.org> on behalf of Peter Schultze <petersch@cs.ucla.edu><br>
<b>Sent:</b> Thursday, August 6, 2020 3:17 AM<br>
<b>To:</b> OpenVZ users <users@openvz.org><br>
<b>Subject:</b> Re: [Users] Fedora-3x template packages</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Wed, 5 Aug 2020, Denis Silakov wrote:<br>
<br>
> I guess there are no docs, but the process is rather simple - clone the repo, checkout a branch corresponding to the development version (dist-vz7-u15 atm), copy all files to your ~/rpmbuild/SOURCES folder and launch rpmbuild -bb *spec.<br>
<br>
I am evidently still missing something. Building and installing an rpm <br>
ran without errors:<br>
<br>
# cd rpmbuild/SOURCES<br>
# git clone -b dist-vz7-u15 <a href="https://src.openvz.org/scm/ovzt/fedora-32-x86_64-ez.git">
https://src.openvz.org/scm/ovzt/fedora-32-x86_64-ez.git</a><br>
<br>
# cd<br>
# rpmbuild -bb rpmbuild/SOURCES/fedora-32-x86_64-ez/fedora-32-x86_64-ez.spec<br>
# yum localinstall rpmbuild/RPMS/noarch/fedora-32-x86_64-ez-7.0.0-1.vl7.noarch.rpm<br>
<br>
However, the resulting rpm contains no os files:<br>
<br>
# rpm -ql fedora-32-x86_64-ez-7.0.0-1.vl7.noarch<br>
/vz/template/fedora/32/x86_64/config/app/*/default<br>
/vz/template/fedora/32/x86_64/config/app/*/default/description<br>
/vz/template/fedora/32/x86_64/config/app/*/default/release<br>
/vz/template/fedora/32/x86_64/config/app/*/default/summary<br>
/vz/template/fedora/32/x86_64/config/app/*/default/version<br>
<br>
and container generation of course fails:<br>
# prlctl create F32 --vmtype ct --ostemplate fedora-32-x86_64<br>
Creating the Container...<br>
Failed to register the CT: PRL_ERR_VZCTL_OPERATION_FAILED (Details: Error: <br>
Unable to find ostemplate: fedora-32-x86_64<br>
Creation of Container private area failed)<br>
Failed to create the virtual machine.<br>
<br>
<br>
What am I missing?<br>
<br>
<br>
<br>
> ________________________________<br>
> From: users-bounces@openvz.org <users-bounces@openvz.org> on behalf of Peter Schultze <petersch@cs.ucla.edu><br>
> Sent: Wednesday, August 5, 2020 11:01 PM<br>
> To: users@openvz.org <users@openvz.org><br>
> Subject: [Users] Fedora-3x template packages<br>
><br>
> Hello,<br>
><br>
> <a href="https://src.openvz.org/projects/OVZT">https://src.openvz.org/projects/OVZT</a> has entries for Fedora-30 and<br>
> Fedora-32. However, the most recent rpm package available in the normal<br>
> OpenVZ 7.0 repository is fedora-23-x86_64-ez<br>
><br>
> Does documentation exist on how to build a template from the available<br>
> sources?<br>
><br>
> Peter S.<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@openvz.org<br>
> <a href="https://lists.openvz.org/mailman/listinfo/users">https://lists.openvz.org/mailman/listinfo/users</a><br>
><br>
<br>
--<br>
Peter Schultze<br>
UCLA Computer Science Department 310-825-9929<br>
_______________________________________________<br>
Users mailing list<br>
Users@openvz.org<br>
<a href="https://lists.openvz.org/mailman/listinfo/users">https://lists.openvz.org/mailman/listinfo/users</a><br>
</div>
</span></font></div>
</body>
</html>