Commit 0151ec85 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repo index: add support for --sign [--default-key=NN] (fix issue 296)

parent c2e6c50a
...@@ -37,10 +37,34 @@ __epm_repoindex_alt() ...@@ -37,10 +37,34 @@ __epm_repoindex_alt()
local archlist="i586 x86_64 x86_64-i586 aarch64 noarch" local archlist="i586 x86_64 x86_64-i586 aarch64 noarch"
local init='' local init=''
if [ "$1" = "--init" ] ; then local sign=''
init='--init' local default_key=''
shift
fi while [ -n "$1" ] ; do
case "$1" in
--init)
init='--init'
;;
--sign)
sign='--sign'
;;
--default-key=*)
default_key="--default-key=${1#*=}"
;;
--default-key)
shift
[ -n "$1" ] || fatal "Missed value for --default-key"
default_key="--default-key=$1"
;;
--*)
fatal "Unknown option $1"
;;
*)
break
;;
esac
shift
done
epm assure genbasedir apt-repo-tools || fatal epm assure genbasedir apt-repo-tools || fatal
REPO_DIR="$1" REPO_DIR="$1"
...@@ -80,14 +104,14 @@ __epm_repoindex_alt() ...@@ -80,14 +104,14 @@ __epm_repoindex_alt()
if [ -d "$REPO_DIR/RPMS.$REPO_NAME" ] ; then if [ -d "$REPO_DIR/RPMS.$REPO_NAME" ] ; then
mkdir -pv "$REPO_DIR/base/" mkdir -pv "$REPO_DIR/base/"
docmd genbasedir --bloat --progress --topdir=$(dirname $REPO_DIR) $(basename $REPO_DIR) $REPO_NAME docmd genbasedir --bloat --progress $sign $default_key --topdir=$(dirname $REPO_DIR) $(basename $REPO_DIR) $REPO_NAME
return return
fi fi
for arch in $archlist; do for arch in $archlist; do
[ -d "$REPO_DIR/$arch/RPMS.$REPO_NAME" ] || continue [ -d "$REPO_DIR/$arch/RPMS.$REPO_NAME" ] || continue
mkdir -pv "$REPO_DIR/$arch/base/" mkdir -pv "$REPO_DIR/$arch/base/"
docmd genbasedir --bloat --progress --topdir=$REPO_DIR $arch $REPO_NAME docmd genbasedir --bloat --progress $sign $default_key --topdir=$REPO_DIR $arch $REPO_NAME
done done
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment