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

Regression in 1.12.0 when building deb package #1749

Open
rmanus opened this issue Jan 20, 2021 · 3 comments
Open

Regression in 1.12.0 when building deb package #1749

rmanus opened this issue Jan 20, 2021 · 3 comments

Comments

@rmanus
Copy link

rmanus commented Jan 20, 2021

Since the upgrade to 1.12.0, my deb package cannot install anymore with the following error:

/var/lib/dpkg/info/jagos.postinst: 71: /var/lib/dpkg/info/jagos.postinst: Syntax error: \"else\" unexpected
dpkg: error processing package jagos (--install):
installed jagos package post-installation script subprocess returned error exit status 2

The culprit code around line 71 is

systemctl --system daemon-reload >/dev/null || true
debsystemctl=$(command -v deb-systemd-invoke || echo systemctl)
if ! systemctl is-enabled setup-hugepages >/dev/null
then
else
    $debsystemctl restart setup-hugepages >/dev/null || true
fi

Notice that there is no code in 'if' section and this is causing the error.

Fyi, my package is built with

--deb-systemd ./resources/build/jagos/setup-hugepages.service
@dev-gto
Copy link

dev-gto commented Jan 20, 2021

Hi!
I can also confirm this issue. It seems to be related to the lines beginning at

<% if attributes[:deb_systemd_enable?]-%>

I'm using fpm within Ubuntu 18.04

@jordansissel
Copy link
Owner

I can probably provide a workaround in a patch, but I don't have the bandwidth to determine if it is the correct fix.

@jordansissel
Copy link
Owner

#1752 is an attempt to resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants