Adding the expect script to sign

This commit is contained in:
James Jones
2022-12-08 11:54:19 -05:00
parent 982a623d04
commit 257241b84b
2 changed files with 17 additions and 1 deletions

View File

@@ -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

13
rpm-sign-expect Normal file
View File

@@ -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