Re: Addon Order

Alex Martin <[email protected]> Fri, 2 Jun 2017 12:50:06 +0100
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <CABRisCXsKv7-qa7Vu4_Vt_qZjnXOccgMo49XawU5HxjLVz0-Vw@mail.gmail.com>
--===============5644932768572445036==
Content-Type: multipart/alternative; boundary="94eb2c0958b02f66e70550f8c1e4"

--94eb2c0958b02f66e70550f8c1e4
Content-Type: text/plain; charset="UTF-8"

The org_fedora_oscap addon which does the remediation bits runs in the
/mnt/sysimage chroot environment and accesses the files in /etc/yum.repos.d
(looking at strace)
Because of this, I don't think it respects the repo or proxy lines in the
kickstart file, hence my attempt to edit the repo files directly before the
addon executing.

Just to check, the %pre section of the kickstart runs before the disk is
partitioned, is the correct?
And the %post sections run after the packages have been installed?

So is there anyway to get files onto the target system before the packages
are installed?

Thanks
Alex



On 1 June 2017 at 23:48, bishop <[email protected]> wrote:

>
> Alex,
>
> /etc/yum.repos.d/CentOS-Base.repo isn't replaced or updated:  it's a
> config file, and appears to be config(noreplace).  If you >it then your
> troubles with that one should be over.
>
> I had to wait until I could check, but I was sure of it.  And my own
> cobbler-installed systems have relied on this since at least centos4,
> despite many, many updates of the centos-release.
>
> (I use a modified %yum_repos macro in the kickstart to write a cron job
> that creates a new repo file, so the repos in my profiles always launder
> out into the subscribed hosts.  Works well)
>
> If you *delete* that repo file, though, yes, of course, it's going to be
> restored with a new copy.  Maybe don't do that.
>
>  - bish
>
>
> > On Thu, Jun 1, 2017 at 7:29 AM, Alex Martin <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     The problem is, once the centos-release package is installed, it
> >     replaces or updates the /etc/yum.repos.d/CentOS-Base.repo files back
> >     to their defaults.
> >
> >     This causes the installer to hang trying to download required scap
> >     files for that profile from the internet.
> >
>
> _______________________________________________
> Kickstart-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/kickstart-list
>

--94eb2c0958b02f66e70550f8c1e4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The org_fedora_oscap addon which does the remediation bits=
 runs in the /mnt/sysimage chroot environment and accesses the files in /et=
c/yum.repos.d (looking at strace)<div>Because of this, I don&#39;t think it=
 respects the repo or proxy lines in the kickstart file, hence my attempt t=
o edit the repo files directly before the addon executing.</div><div><br></=
div><div>Just to check, the %pre section of the kickstart runs before the d=
isk is partitioned, is the correct?</div><div>And the %post sections run af=
ter the packages have been installed?</div><div><br></div><div>So is there =
anyway to get files onto the target system before the packages are installe=
d?=C2=A0</div><div><br></div><div>Thanks</div><div>Alex</div><div><br></div=
><div><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_qu=
ote">On 1 June 2017 at 23:48, bishop <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a>&gt;</s=
pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex"><br>
Alex,<br>
<br>
/etc/yum.repos.d/CentOS-Base.<wbr>repo isn&#39;t replaced or updated:=C2=A0=
 it&#39;s a<br>
config file, and appears to be config(noreplace).=C2=A0 If you &gt;it then =
your<br>
troubles with that one should be over.<br>
<br>
I had to wait until I could check, but I was sure of it.=C2=A0 And my own<b=
r>
cobbler-installed systems have relied on this since at least centos4,<br>
despite many, many updates of the centos-release.<br>
<br>
(I use a modified %yum_repos macro in the kickstart to write a cron job<br>
that creates a new repo file, so the repos in my profiles always launder<br=
>
out into the subscribed hosts.=C2=A0 Works well)<br>
<br>
If you *delete* that repo file, though, yes, of course, it&#39;s going to b=
e<br>
restored with a new copy.=C2=A0 Maybe don&#39;t do that.<br>
<br>
=C2=A0- bish<br>
<span class=3D""><br>
<br>
&gt; On Thu, Jun 1, 2017 at 7:29 AM, Alex Martin &lt;<a href=3D"mailto:alex=
[email protected]">[email protected]</a><br>
</span><span class=3D"">&gt; &lt;mailto:<a href=3D"mailto:alexmartin.bu@gma=
il.com">alexmartin.bu@gmail.<wbr>com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0The problem is, once the centos-release package is =
installed, it<br>
&gt;=C2=A0 =C2=A0 =C2=A0replaces or updates the /etc/yum.repos.d/CentOS-Bas=
e.<wbr>repo files back<br>
&gt;=C2=A0 =C2=A0 =C2=A0to their defaults.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0This causes the installer to hang trying to downloa=
d required scap<br>
&gt;=C2=A0 =C2=A0 =C2=A0files for that profile from the internet.<br>
&gt;<br>
<br>
</span>______________________________<wbr>_________________<br>
Kickstart-list mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><=
br>
<a href=3D"https://www.redhat.com/mailman/listinfo/kickstart-list" rel=3D"n=
oreferrer" target=3D"_blank">https://www.redhat.com/<wbr>mailman/listinfo/k=
ickstart-<wbr>list</a><br>
</blockquote></div><br></div>

--94eb2c0958b02f66e70550f8c1e4--


--===============5644932768572445036==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
--===============5644932768572445036==--