From 257241b84b656b8457474723c885c32210baafbb Mon Sep 17 00:00:00 2001 From: James Jones Date: Thu, 8 Dec 2022 11:54:19 -0500 Subject: [PATCH] Adding the expect script to sign --- Dockerfile | 5 ++++- rpm-sign-expect | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 rpm-sign-expect diff --git a/Dockerfile b/Dockerfile index f54a795..c65268c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,16 @@ FROM quay.io/podman/stable:latest # Adding on the docker alias, docker-compose and other useful stuff RUN dnf install -y podman-docker buildah skopeo docker-compose \ util-linux ansible-core openssh-clients krb5-devel krb5-libs krb5-workstation git jq unzip coreutils \ - helm doctl kubernetes-client + helm doctl kubernetes-client expect # Adding some Ansible Key and Timeout setting ENV ANSIBLE_HOST_KEY_CHECKING=False ENV ANSIBLE_TIMEOUT=60 RUN printf "\nStrictHostKeyChecking no\n" >> /etc/ssh/ssh_config +COPY rpm-sign-expect /usr/bin + +RUN chmod +x /usr/bin/rpm-sign-expect # Remove the Emulate Docker CLI using podman messages RUN touch /etc/containers/nodocker \ No newline at end of file diff --git a/rpm-sign-expect b/rpm-sign-expect new file mode 100644 index 0000000..de17dfc --- /dev/null +++ b/rpm-sign-expect @@ -0,0 +1,13 @@ +#!/usr/bin/expect -f + +set rpm [lindex $argv 0] +set passphrase [lindex $argv 1] +set email [lindex $argv 2] +set name [lindex $argv 3] + +### rpm-sign-expect -- Sign RPMs by sending passphrase and other elements + +spawn rpm --define "_gpg_name $name <$email>" --addsign $rpm +expect -exact "Enter pass phrase: " +send -- "$passphrase\r" +expect eof \ No newline at end of file