Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in PREIN scriptlet in rpm package packer-1.8.1-1.x86_64 #11828

Closed
anthony-alessi-acquia opened this issue Jun 1, 2022 · 2 comments · Fixed by #11831
Closed

Error in PREIN scriptlet in rpm package packer-1.8.1-1.x86_64 #11828

anthony-alessi-acquia opened this issue Jun 1, 2022 · 2 comments · Fixed by #11831
Labels
bug build Relating to aspects of compilation or continuous integration

Comments

@anthony-alessi-acquia
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

Hello everyone. I manage a Jenkins job that is responsible for creating and deploying an AWS Linux v2 image using Packer. The automation runs weekly. Last week everything ran as expected and the version of packer installed / used was 1.8.0-1. This week the job failed after a new version of packer was installed / used which was 1.8.1-1. I checked the logs of the failed automation and found the following error.

/var/tmp/rpm-tmp.GmHVM2: line 9: useradd: command not found
error: %pre(packer-0:1.8.1-1.x86_64) scriptlet failed, exit status 127
Error in PREIN scriptlet in rpm package packer-1.8.1-1.x86_64

As a result, the main dependency packer failed to install causing the build failed as well. Any help would be greatly appreciated. Thank you.

Packer is installed on the Jenkins instance by the following method:
yum install -y yum-utils
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
yum -y install packer jq tar gzip

Packer version

packer-0:1.8.1-1.x86_64 or how it is being installed does not appear to be working properly.

Log Fragments and crash.log files

Here is a larger snippet of the Jenkins build log at the point that packer fails to install.

Running transaction
Installing : 1:make-3.82-24.amzn2.x86_64 1/7
Installing : 1:openssl-1.0.2k-24.amzn2.0.2.x86_64 2/7
Installing : oniguruma-5.9.6-1.amzn2.0.4.x86_64 3/7
Installing : jq-1.5-1.amzn2.0.2.x86_64 4/7
/var/tmp/rpm-tmp.GmHVM2: line 9: useradd: command not found
error: %pre(packer-0:1.8.1-1.x86_64) scriptlet failed, exit status 127
Error in PREIN scriptlet in rpm package packer-1.8.1-1.x86_64
Installing : gzip-1.5-10.amzn2.0.1.x86_64 6/7
error: packer-0:1.8.1-1.x86_64: install failed
Installing : 2:tar-1.26-35.amzn2.x86_64 7/7
Verifying : 1:openssl-1.0.2k-24.amzn2.0.2.x86_64 1/7
Verifying : 2:tar-1.26-35.amzn2.x86_64 2/7
Verifying : gzip-1.5-10.amzn2.0.1.x86_64 3/7
Verifying : jq-1.5-1.amzn2.0.2.x86_64 4/7
Verifying : oniguruma-5.9.6-1.amzn2.0.4.x86_64 5/7
Verifying : 1:make-3.82-24.amzn2.x86_64 6/7
Verifying : packer-1.8.1-1.x86_64 7/7

Installed:
gzip.x86_64 0:1.5-10.amzn2.0.1 jq.x86_64 0:1.5-1.amzn2.0.2
tar.x86_64 2:1.26-35.amzn2

Dependency Installed:
make.x86_64 1:3.82-24.amzn2 oniguruma.x86_64 0:5.9.6-1.amzn2.0.4
openssl.x86_64 1:1.0.2k-24.amzn2.0.2

Failed:
packer.x86_64 0:1.8.1-1

@github-actions github-actions bot removed the bug label Jun 1, 2022
nywilken added a commit that referenced this issue Jun 1, 2022
Packer does not require the installation of a Packer user or a service for Packer.
This change removes the preinst and postrm user scripts, and the config_dir directive for Packer rpm installations.

Closes #11828
@nywilken
Copy link
Contributor

nywilken commented Jun 1, 2022

Hi @anthony-alessi-acquia thanks for bubbling this up. It looks like there is a pre-install script for adding a Packer user, which is not needed. We've opened a PR to address this. We anticipate having a new version of the rpm available once merged and released.

@nywilken nywilken added bug build Relating to aspects of compilation or continuous integration labels Jun 1, 2022
nywilken added a commit that referenced this issue Jun 1, 2022
…1831)

Packer does not require the installation of a Packer user or a service for Packer.
This change removes the preinst and postrm user scripts, and the config_dir directive for Packer rpm installations.

Closes #11828
@github-actions
Copy link

github-actions bot commented Jul 2, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug build Relating to aspects of compilation or continuous integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants