<div dir="ltr">Hi there, <div><br></div><div>No matter what I do, for some reason the spacewalk server won't let the releases be detected. </div><div><br></div><div>I've used pretty much the only guide around: <a href="http://www.devops-blog.net/spacewalk/registering-ubuntu-and-debian-servers-with-spacewalk">http://www.devops-blog.net/spacewalk/registering-ubuntu-and-debian-servers-with-spacewalk</a></div><div><br></div><div>And to release/sign the packages I went with secureApt.sh from here: <a href="https://www.redhat.com/archives/spacewalk-list/2017-March/msg00055.html">https://www.redhat.com/archives/spacewalk-list/2017-March/msg00055.html</a></div><div><br></div><div>The error keeps telling me that the repository is insecure and that it can't find the Release. </div><div><br></div><div><b><u>Client</u>:</b></div><div><div><i><div style="font-weight:bold"># cat /etc/apt/sources.list.d/spacewalk.list</div><div>deb spacewalk://spacewalk channels: main</div><div><div><b># rhn-channel --list</b></div><div>ubuntu_1604_lts_xenial</div></div></i></div><div><i><b># ls /etc/apt/</b></i></div><div><i>apt.conf.d  preferences.d  sources.list.bak  sources.list.d  sources.list.save  trusted.gpg  trusted.gpg~  trusted.gpg.d</i></div><div><i><b># apt update</b></i></div><div><i>Apt-Spacewalk: Updating sources.list</i></div><div><i>WARNING:root:could not open file '/etc/apt/sources.list'</i></div><div><i><br></i></div><div><i>Ign:1 spacewalk://<a href="http://spacewalk.dev.ableto.com">spacewalk.dev.ableto.com</a> channels: InRelease</i></div><div><i>Err:2 spacewalk://<a href="http://spacewalk.dev.ableto.com">spacewalk.dev.ableto.com</a> channels: Release</i></div><div><i>  404  Not Found</i></div><div><i>Hit:3 <a href="http://archive.canonical.com/ubuntu">http://archive.canonical.com/ubuntu</a> xenial InRelease</i></div><div><i>Reading package lists... Done</i></div><div><i>E: The repository 'spacewalk://<a href="http://spacewalk.dev.ableto.com">spacewalk.dev.ableto.com</a> channels: Release' does not have a Release file.</i></div><div><i>N: Updating from such a repository can't be done securely, and is therefore disabled by default.</i></div><div><i>N: See apt-secure(8) manpage for repository creation and user configuration details.</i></div><div><div class="gmail-m_5033576675444772943gmail_signature"><div dir="ltr"><p><span style="font-size:13.3333px"><br></span></p><p><span style="font-size:13.3333px"><b><u>Server</u>:</b></span></p><p><span style="font-size:13.3333px"><b># ls /var/cache/rhn/</b></span></p><p><span style="font-size:13.3333px">repodata/ reposync/ satsync/</span></p><p><span style="font-size:13.3333px"><b># ls /var/cache/rhn/repodata/ubuntu_1604_lts_xenial</b></span></p><p><span style="font-size:13.3333px">Packages  Packages.gz  Release  Release.gpg</span></p><p><span style="font-size:13.3333px">#</span></p><p><span style="font-size:13.3333px">#</span></p><p><span style="font-size:13.3333px"><b># cat /var/cache/rhn/repodata/ubuntu_1604_lts_xenial/Release</b></span></p><p><span style="font-size:13.3333px">Origin: Ubuntu</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">        </span>Label: Ubuntu</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">      </span>Suite: ubuntu_1604_lts_xenial</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">      </span>Version: 010818</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">    </span>Codename: ubuntu_1604_lts_xenial</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">   </span>Date: Mon, 08 Jan 2018 20:44:49 +0000</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">      </span>Architectures: amd64</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">       </span>Components: repodata</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">       </span>Description: Ubuntu ubuntu_1604_lts_xenial 010818</span></p><p><span style="font-size:13.3333px"><span style="white-space:pre">  </span>MD5Sum:</span></p><p><span style="font-size:13.3333px">  MD5HASH<span style="white-space:pre">  </span>6833993<span style="white-space:pre">      </span>repodata/binary-amd64/Packages</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px"> MD5HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">    </span>1352969<span style="white-space:pre">      </span>repodata/binary-amd64/Packages.gz</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px"> MD5HASH</span><span style="font-size:13.3333px"><span style="white-space:pre"> </span>6833993<span style="white-space:pre">      </span>repodata/binary-i386/Packages</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px"> MD5HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">     </span>1352969<span style="white-space:pre">      </span>repodata/binary-i386/Packages.gz</span></p><p><span style="font-size:13.3333px">SHA256:</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px">SHA256_HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">       </span>6833993<span style="white-space:pre">      </span>repodata/binary-amd64/Packages</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px">SHA256_HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">  </span>1352969<span style="white-space:pre">      </span>repodata/binary-amd64/Packages.gz</span></p><p><span style="font-size:13.3333px"> </span><span style="font-size:13.3333px">SHA256_HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">       </span>6833993<span style="white-space:pre">      </span>repodata/binary-i386/Packages</span></p><p></p><p><span style="font-size:13.3333px"> SHA256_HASH</span><span style="font-size:13.3333px"><span style="white-space:pre">       </span>1352969<span style="white-space:pre">      </span>repodata/binary-i386/Packages.gz</span></p><p><span style="font-size:13.3333px"><br></span></p><p><span style="font-size:13.3333px">I used this script to sign and release:</span></p><p><span style="font-size:13.3333px"><i># <b>cat apt.sh</b></i></span></p><p><span style="font-size:13.3333px"><i>#!/bin/bash</i></span></p><p><span style="font-size:13.3333px"><i>#</i></span></p><p><span style="font-size:13.3333px"><i># Creates the Release and Release.gpg files for APT repo</i></span></p><p><span style="font-size:13.3333px"><i># based on Packages and Packages.gz files</i></span></p><p><span style="font-size:13.3333px"><i># The created files make the repo a "signed" repo</i></span></p><p><span style="font-size:13.3333px"><i># Changed Input for independent distributions and made a loop for all channels</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p><span style="font-size:13.3333px"><i>if [ "$1" = "" -o "$2" = "" ]; then echo "Usage: secureApt.sh DISTNAME RELEASENUMBER";exit 1;fi</i></span></p><p><span style="font-size:13.3333px"><i>WOR_DIR='/var/cache/rhn/repodata'</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p><span style="font-size:13.3333px"><i>for I in $( ls -d $WOR_DIR/$1* )</i></span></p><p><span style="font-size:13.3333px"><i>do</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>DATE=`date "+%a, %d %b %Y %H:%M:%S %z"`</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>GPG_PASS='password'</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">     </span>HEADER="Origin: Ubuntu</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">     </span>Label: Ubuntu</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">   </span>Suite: $1</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>Version: $2</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">     </span>Codename: $1</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>Date: ${DATE}</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">   </span>Architectures: amd64</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>Components: repodata</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>Description: Ubuntu $1 $2</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>MD5Sum:"</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>PACKAGES_MD5=($(md5sum $I/Packages))</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>PACKAGES_SIZE=$(stat -c%s $I/Packages)</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">  </span>PACKAGESGZ_MD5=($(md5sum $I/Packages.gz))</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>PACKAGESGZ_SIZE=$(stat -c%s $I/Packages.gz)</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">     </span>PACKAGES_SHA256=($(sha256sum $I/Packages))</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">      </span>PACKAGESGZ_SHA256=($(sha256sum $I/Packages.gz))</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">  </span># write Release file with MD5s</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">  </span>rm -rf $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>echo -e "${HEADER}" > $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">   </span>echo -e " ${PACKAGES_MD5}\t${PACKAGES_SIZE}\trepodata/binary-amd64/Packages" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">      </span>echo -e " ${PACKAGESGZ_MD5}\t${PACKAGESGZ_SIZE}\trepodata/binary-amd64/Packages.gz" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>echo -e " ${PACKAGES_MD5}\t${PACKAGES_SIZE}\trepodata/binary-i386/Packages" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">       </span>echo -e " ${PACKAGESGZ_MD5}\t${PACKAGESGZ_SIZE}\trepodata/binary-i386/Packages.gz" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">        </span>echo -e "SHA256:" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre"> </span>echo -e " ${PACKAGES_SHA256}\t${PACKAGES_SIZE}\trepodata/binary-amd64/Packages" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">   </span>echo -e " ${PACKAGESGZ_SHA256}\t${PACKAGESGZ_SIZE}\trepodata/binary-amd64/Packages.gz" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>echo -e " ${PACKAGES_SHA256}\t${PACKAGES_SIZE}\trepodata/binary-i386/Packages" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">    </span>echo -e " ${PACKAGESGZ_SHA256}\t${PACKAGESGZ_SIZE}\trepodata/binary-i386/Packages.gz" >> $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">      </span># write the signature for Release file</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">  </span>rm -rf $I/Release.gpg</i></span></p><p><span style="font-size:13.3333px"><i><span style="white-space:pre">   </span>echo $GPG_PASS | gpg --armor --detach-sign -o $I/Release.gpg --batch --no-tty --passphrase-fd 0 --sign $I/Release</i></span></p><p><span style="font-size:13.3333px"><i><br></i></span></p><p></p><p><span style="font-size:13.3333px"><i>done</i></span></p><p><span style="font-size:13.3333px"><br></span></p><p><span style="font-size:13.3333px">Any help on this would be greatly appreciated!</span></p><p><span style="font-size:13.3333px"><br></span></p><p><span style="font-size:13.3333px">Thanks. </span></p><p><span style="font-size:13.3333px"><br></span></p><p><span style="font-size:13.3333px">Luis Lopez</span><br></p></div></div></div>
</div></div>

<br>
<br><p><font face="Arial"><font size="3"></font></font></p><hr style="font-family:Arial,Helvetica,sans-serif"><p><font face="Arial" size="1"><i>This
message is intended for use by the person(s) to whom it is addressed. It may
contain information that is privileged, confidential, or otherwise protected
from disclosure under applicable law. If you are not the intended recipient,
any dissemination, distribution, copying, or use of this information is
strictly prohibited, and you should destroy this communication without making
copies or further transmitting. </i></font><span style="font-family:"Times New Roman",serif;font-size:12pt"></span></p>