#!/bin/bash # Prepare a script to ease dnf/yum setup cat > mondorescue.repo << EOT [mondorescue] name=mandriva 2009.1 i386 - mondorescue Vanilla Packages baseurl=ftp://ftp.mondorescue.org//mandriva/2009.1/i386 enabled=1 gpgcheck=1 gpgkey=ftp://ftp.mondorescue.org//mandriva/2009.1/i386/mondorescue.pubkey EOT chmod 644 mondorescue.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 mondorescue.pubkey ]; then # Avoiding creating empty repomd.xml.key; fails on opensuse 12.1 (cd repodata ; ln -sf ../mondorescue.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 > mondorescue.addmedia << EOT #rpm --import ftp://ftp.mondorescue.org//mandriva/2009.1/i386/mondorescue.pubkey urpmi.addmedia mondorescue ftp://ftp.mondorescue.org//mandriva/2009.1/i386 with media_info/hdlist.cz EOT chmod 755 mondorescue.addmedia # Clean up old repo content rm -f hdlist.cz synthesis.hdlist.cz # Create urpmi repo genhdlist2 --clean . if [ $? -ne 0 ]; then genhdlist . fi (cd media_info ; ln -sf ../mondorescue.pubkey pubkey)