Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628564 - app-admin/puppetserver - [/etc/systemd/system/puppetserver.service.d/gentoo.conf:6] Assignment outside of section. Ignoring.
Summary: app-admin/puppetserver - [/etc/systemd/system/puppetserver.service.d/gentoo.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 01:55 UTC by Georgi Georgiev
Modified: 2017-08-26 23:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fix (puppetserver.diff,1.84 KB, patch)
2017-08-26 23:41 UTC, Matthew Thode ( prometheanfire )
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgi Georgiev 2017-08-22 01:55:55 UTC
After installing =app-admin/puppetserver-5.0.0-r1, systemd prints the following errors in the journal:

[/etc/systemd/system/puppetserver.service.d/gentoo.conf:6] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:9] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:12] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:13] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:14] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:15] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:18] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:23] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:29] Assignment outside of section. Ignoring.
[/etc/systemd/system/puppetserver.service.d/gentoo.conf:34] Assignment outside of section. Ignoring.

This is because /etc/systemd/system/puppetserver.service.d/gentoo.conf is shell syntax, and not a systemd unit syntax as expected by files in that location.
Comment 1 Georgi Georgiev 2017-08-22 01:59:12 UTC
For the record, quite a few packages are still using /etc/conf.d for *environment* file locations.

> grep -r ^EnvironmentFile=.*conf.d /usr/lib/systemd
/usr/lib/systemd/system/saslauthd.service:EnvironmentFile=/etc/conf.d/saslauthd
/usr/lib/systemd/system/timidity.service:EnvironmentFile=-/etc/conf.d/timidity
/usr/lib/systemd/system/apache2.service:EnvironmentFile=/etc/conf.d/apache2

I really see nothing wrong with that. And apache being a very important package for Gentoo, why would you not follow its style. ;)
Comment 2 Georgi Georgiev 2017-08-22 02:12:05 UTC
If I may summarize the options I see for solving this issue:

a) Just use /etc/conf.d/puppetserver file as it is

b) Move the /etc/systemd/system/puppetserver.service.d/gentoo.conf file somewhere else. (/etc/systemd/system is excepted to hold unit files and you are putting an environment file in there; not good)

c) (1) Remove EnvironmentFile= from puppetserver.service and (2) prefix every assignment in /etc/systemd/system/puppetserver.service.d/gentoo.conf with "Environment=". E.g., Environment=JAVA_BIN=/usr/bin/java (some of these are probably not needed, e.g. START_TIMEOUT).
Comment 3 Georgi Georgiev 2017-08-22 05:23:38 UTC
Looked more into it. It does seem that the correct action is to

1) Move the configuration file from /etc/conf.d/puppetserver to /etc/default/puppetserver
2) Remove references to the environment from /usr/lib/systemd/system/puppetserver.service

I am basing this one the fact that the wrapper already sources this configuration file:

$ head /opt/puppetlabs/server/apps/puppetserver/bin/puppetserver
#!/bin/bash

#set default privileges to -rw-r-----
umask 027

set -a
if [ -r "/etc/default/puppetserver" ] ; then
    . /etc/default/puppetserver
elif [ -r "/etc/systemd/system/puppetserver.service.d/gentoo.conf" ] ; then
    . /etc/systemd/system/puppetserver.service.d/gentoo.conf

And as mentioned already, there is no need for the "elif", simply remove that file.
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2017-08-26 23:41:25 UTC
Created attachment 490768 [details, diff]
fix

fixed in 5.0.0-r2