Merge pull request #3 from JamesJonesConsulting/develop
Some checks failed
Build podman-dind-like / build-and-push (GITHUB_TOKEN, ghcr.io, GITHUB_DOCKER_USER) (push) Has been cancelled
Build podman-dind-like / build-and-push (HOME_NEXUS_DOCKER_PASSWORD, nexus.jamjon3.sytes.net:5443, NEXUS_DOCKER_USER) (push) Has been cancelled

Adding a expect script for RPM signing to simplify this process a bit
This commit is contained in:
James Jones
2022-12-08 12:41:18 -05:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ 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 gnupg2 pinentry
helm doctl kubernetes-client gnupg2 pinentry expect
# Adding the Azure CLI
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
@@ -21,6 +21,9 @@ RUN dnf install -y rpm-build rpm-sign rubygems ruby-devel gcc gcc-c++ make libff
RUN gem install ffi \
&& gem install fpm
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