diff options
Diffstat (limited to 'mkmodular')
| -rwxr-xr-x | mkmodular | 27 | 
1 files changed, 27 insertions, 0 deletions
| @@ -327,7 +327,31 @@ function createRepo($dest, $mod) {  $old = getcwd();  chdir($dest); +// Key +[$dis,$ver]=explode("/", $dest); +$GPG_NAME="Remi's RPM repository"; +if ($dis == "fedora") { +	if ($ver >= 34) { +		$GPG_PATH="/home/remi/.gnupg2021"; +	} else if ($ver >= 32) { +		$GPG_PATH="/home/remi/.gnupg2020"; +	} else { +		$GPG_PATH="/home/remi/.gnupg2019"; +	} +} else { +	if ($ver >= 8) { +		$GPG_PATH="/home/remi/.gnupg2018"; +	} else { +		$GPG_PATH="/home/remi/.gnupgrpm"; +		$GPG_NAME="Remi Collet"; +	} +} +echo "Metadata, signing with $GPG_PATH, "; + +// Repository content  exec("mkrepo nocheck noclean"); + +// Modular data  $data = '/tmp/modules.yaml';  file_put_contents($data, $mod);  $hash = hash('sha256', $mod); @@ -335,6 +359,9 @@ exec("modifyrepo_c --mdtype=modules $data repodata >/dev/null");  $arch = basename($dest);  rename($data, "$data.$arch"); +// Sign +@unlink("repodata/repomd.xml.asc"); +exec("gpg --armor --detach-sign --default-key \"$GPG_NAME\" --homedir \"$GPG_PATH\" repodata/repomd.xml");  chdir($old);  }  /* | 
