#!/bin/bash # Prepare a script to ease yum setup cat > pb.repo << EOT [pb] name=mandriva 2006.0 i386 - pb Vanilla Packages baseurl=ftp://ftp.project-builder.org//mandriva/2006.0/i386 enabled=1 gpgcheck=1 gpgkey=ftp://ftp.project-builder.org//mandriva/2006.0/i386/pb.pubkey EOT chmod 644 pb.repo # Clean up old repo content rm -rf headers/ repodata/ # Create yum repo if [ -x /usr/bin/yum-arch ]; then yum-arch . fi # Create repodata createrepo -s sha256 . # Link to the key if [ -s pb.pubkey ]; then # Avoiding creating empty repomd.xml.key; fails on opensuse 12.1 (cd repodata ; ln -sf ../pb.pubkey repomd.xml.key) fi # sign the repomd (at least useful for SLES - which requires a local key) # gpg -a --detach-sign repodata/repomd.xml # SLES also looks for media.1/info.txt # Prepare a script to ease urpmi setup cat > pb.addmedia << EOT urpmi.addmedia pb ftp://ftp.project-builder.org//mandriva/2006.0/i386 with media_info/hdlist.cz EOT chmod 755 pb.addmedia # Clean up old repo content rm -f hdlist.cz synthesis.hdlist.cz # Create urpmi repo genhdlist2 --clean . if [ $? -ne 0 ]; then genhdlist . fi