Remove Linux package service configs and pre/post install scripts (#11831)

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
pull/11833/head
Wilken Rivera 4 years ago committed by GitHub
parent 08157fbdce
commit 805f8a4a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
#
# This GitHub action builds Packer binaries, linux packages,
# and Docker images from source, and uploads them to GitHub artifacts.
# This GitHub action builds Packer binaries, linux packages,
# and Docker images from source, and uploads them to GitHub artifacts.
# Note that artifacts available via GitHub Artifacts are not codesigned or notarized.
#
@ -40,7 +40,7 @@ jobs:
echo "::set-output name=product-version::$(make version)"
generate-metadata-file:
needs:
needs:
- get-product-version
runs-on: ubuntu-latest
outputs:
@ -75,7 +75,7 @@ jobs:
echo "::set-output name=ldflags::"-s -w -X \'$project/version.GitCommit=$sha\'""
build-other:
needs:
needs:
- get-product-version
- get-go-version
- set-ld-flags
@ -121,7 +121,7 @@ jobs:
path: out/${{ env.REPO_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
build-linux:
needs:
needs:
- get-product-version
- get-go-version
- set-ld-flags
@ -174,9 +174,6 @@ jobs:
binary: "dist/${{ env.REPO_NAME }}"
deb_depends: "openssl"
rpm_depends: "openssl"
config_dir: ".release/linux/package/"
preinstall: ".release/linux/preinst"
postremove: ".release/linux/postrm"
- name: Add Linux Package names to env
run: |
echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV
@ -191,7 +188,7 @@ jobs:
path: out/${{ env.DEB_PACKAGE }}
build-darwin:
needs:
needs:
- get-product-version
- get-go-version
- set-ld-flags

@ -1,23 +0,0 @@
[Unit]
Description="HashiCorp Packer - A tool for creating identical machine images for multiple platforms from a single source configuration"
Documentation=https://www.packer.io/docs
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
EnvironmentFile=-/etc/packer.d/packer.env
User=packer
Group=packer
ProtectSystem=full
ProtectHome=read-only
ExecStart=/usr/bin/packer server -config=/etc/packer.d
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
TimeoutStopSec=30
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target

@ -1,8 +0,0 @@
#!/bin/bash
if [ "$1" = "purge" ]
then
userdel packer
fi
exit 0

@ -1,13 +0,0 @@
#!/bin/bash
set -eu
USER="packer"
if ! id -u $USER > /dev/null 2>&1; then
useradd \
--system \
--user-group \
--shell /bin/false \
$USER
fi
Loading…
Cancel
Save