Centos – disable gpgcheck when using the repo command in a kickstart file

centoskickstart

Is there a way to by-pass the gpgcheck when using the repo command in a kickstart file?

I'm trying to define the repository to use for "package" installation.

At the moment on install, the first package it tries to grab is, "iputils-20071127-16.el6.i686.rpm".

It appears to transfer ok, but then displays the error,

"The file cannot be opened. This is due to a missing file, a corrupt package or corrupt media….".

I'm assuming this is a gpgcheck error, or a checksum error.

UPDATE

On the VM I'm installing into I managed to drop to console after the error occurred, transfer the file manually via wget, and confirm that the hash matches the hash listed for the package in filelists.xml.

However, on running rpm -K iputils-20071127-16.el6.i686.rpm I get the message:

iputils-20071127-16.el6.i686.rpm: RSA sha1 ((MD5) PGP) md5 NOT OK (MISSING KEYS: (MD5) PGP#c105b9de)

So this appears to be the issue with the "corrupt error" showing up on installation. Can this check be disabled?

NOTE:

I've confirmed the file is ok by transferring it via the same transfer method and installing it via command line on a separate VM.

kickstart file

install
url --url http://192.168.240.79:8008
lang en_US.UTF-8
keyboard us
xconfig --startxonboot
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$CVbGwMaJ$.
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --disabled
timezone Asia/Tokyo
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
repo --name="Local-Repo"  --baseurl=http://192.168.240.79:8008/ --cost=100

%packages
@base
@core
@custom-shared
@custom-db
%end

filename

Best Answer

Ok, this is obscure, but let me post what I found in case someone else hits this.

For the HTTP server I was trying to use the python built-in SimpleHTTPServer. This worked fine downloading the initial image and other files, but would always return a "corrupt" error when it hit the first RPM.

It turns out this is because the SimpleHTTPServer does not support Range requests.

(See https://bugzilla.redhat.com/show_bug.cgi?id=624431)

After finding this out, I found that someone had already made a version of SimpleHTTPServer that supports Range, https://github.com/smgoller/rangehttpserver.

After dropping in RangeHTTPServer for SimpleHTTPServer installation proceeds as expected.

Related Topic