[Bug 793411] New: systemd doesn't recognize continuation lines in environment files /etc/sysconfig/xxxx
https://bugzilla.novell.com/show_bug.cgi?id=793411 https://bugzilla.novell.com/show_bug.cgi?id=793411#c0 Summary: systemd doesn't recognize continuation lines in environment files /etc/sysconfig/xxxx Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: per@computer.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 I'm updating some stuff to work on 12.2 with systemd, and it looks like systemd doesn't recognize continuation lines in /etc/sysconfig/xxxx ? For instance, I copied over the following from the previous system: SPAMD_ARGS="--socketpath=/var/lib/bulwark/spamd \ --nouser-config \ --virtual-config-dir=/var/lib/bulwark/domains/%l/%d \ --siteconfigpath=/var/lib/bulwark/config \ --username=bulwark \ --max-children=25 \ --timeout-child=600" When I tried to start the spamd service, it failed: spamd[4547]: warn: Unknown option: -socketpath SPAMD_ARGS only went as far as "--socketpath=/var/lib/bulwark/spamd \", the rest was ignored. Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c
Jiaying ren
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c1
--- Comment #1 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c2
--- Comment #2 from Per Jessen
could you fill a bug report on https://bugs.freedesktop,org/ since it is an upstream issue ? Thanks.
Okay, https://bugs.freedesktop.org/show_bug.cgi?id=58083 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c3
Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c4
--- Comment #4 from Frederic Crozat
Heya, I've sent a patch, which is now upstream
http://cgit.freedesktop.org/systemd/systemd/commit/?id=565d91fdf198b88f7c2d7...
@frederic: feel free to backport or close it as fixed in next openSUSE release
I'll put it on my TODO list for 12.2 + Factory/12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c5
--- Comment #5 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c6
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c7
--- Comment #7 from Frederic Crozat
note that continuation lines are illegal in sysconfig files. fillup will corrupt the file on next package update.
not an issue for systemd (which only reads file) but worth noting for people. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c8
--- Comment #8 from Per Jessen
patch went into Factory.
I've put it on my 12.2 update package (systemd-44-10.20.1), should be available in one hour maximum: http://download.opensuse.org/repositories/home:/fcrozat:/branches:/openSUSE:...
please test.
Hi Frederic something is really wrong with that - afaict, environment variables set with EnvironmentFile are now just substituted as blank. Whether or not I've used continuation lines in the file. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c9
--- Comment #9 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c10
--- Comment #10 from Per Jessen
Did you test only on 12.2 or also on Factory ? I might have miscorrectly backported the patch.
Sofar, I only tested your 12.2 update package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c11
--- Comment #11 from Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c12
--- Comment #12 from Frederic Crozat
something is really wrong with that - afaict, environment variables set with EnvironmentFile are now just substituted as blank. Whether or not I've used continuation lines in the file.
I'm not seeing such behaviour on my test (on 12.2 and Factory), in single or continuated lines. Could you share your testcase ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c13
--- Comment #13 from Per Jessen
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c14
--- Comment #14 from Frederic Crozat
Because I was seeing variables replaced only as blanks, I trimmed my test to roughly this:
/etc/sysconfig/spamd :
KLOP=99
/etc/systemd/system/spamd.service :
ExecStart=/usr/local/bin/kk $KLOP
/usr/local/bin/kk :
#!/bin/sh echo $@ >/tmp/list sleep 30
My system is 12.2 + your systemd-44-10.20.1.i586.rpm.
(truncated "ps axfl" display:)
0:00 /bin/sh /usr/local/bin/kk 0:00 \_ sleep 30
The $KLOP is clearly being substituted with blanks.
Because it is incorrect use (check the manpage). You should use: ExecStart=/usr/local/bin/kk ${KLOP} an easier way to check the environment is : strings /proc/<PID>/environ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c15
--- Comment #15 from Per Jessen
(In reply to comment #13)
Because I was seeing variables replaced only as blanks, I trimmed my test to roughly this:
/etc/sysconfig/spamd :
KLOP=99
/etc/systemd/system/spamd.service :
ExecStart=/usr/local/bin/kk $KLOP
/usr/local/bin/kk :
#!/bin/sh echo $@ >/tmp/list sleep 30
My system is 12.2 + your systemd-44-10.20.1.i586.rpm.
(truncated "ps axfl" display:)
0:00 /bin/sh /usr/local/bin/kk 0:00 \_ sleep 30
The $KLOP is clearly being substituted with blanks.
Because it is incorrect use (check the manpage). You should use:
ExecStart=/usr/local/bin/kk ${KLOP}
an easier way to check the environment is : strings /proc/<PID>/environ
My use without {} works with systemd-44-10.8.1.i586. Besides, I've also tried using {} and (), same result. FYI, I see a couple of other service unit in /lib/systemd/system using the variable form without {}. (sshd, ypbind) To test which form was the correct one I used: ExecStart=/usr/local/bin/kk $KLOP ${KLOP} $(KLOP) If I check /proc/<PID>/environ, none of the variables from my sysconfig file are set. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c16
--- Comment #16 from Frederic Crozat
My use without {} works with systemd-44-10.8.1.i586. Besides, I've also tried using {} and (), same result. FYI, I see a couple of other service unit in /lib/systemd/system using the variable form without {}. (sshd, ypbind)
There is a slight difference between $FOO and ${FOO} as explained on man systemd.service Anyway, please attach both .service and sysconfig files you are using -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c17
--- Comment #17 from Per Jessen
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c18
--- Comment #18 from Per Jessen
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c19
--- Comment #19 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c20
--- Comment #20 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c21
--- Comment #21 from Michal Vyskocil
Michal, it looks like the commented lines are processed after multiline (I didn't check the code yet).
Yeah, the comment code is below the continuation logic ... will write a fix tomorrow. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c22
--- Comment #22 from Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c23
--- Comment #23 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c24
--- Comment #24 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c25
--- Comment #25 from Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c26
--- Comment #26 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c27
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c28
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c29
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c30
Benjamin Brunner
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c31
Benjamin Brunner
https://bugzilla.novell.com/show_bug.cgi?id=793411
https://bugzilla.novell.com/show_bug.cgi?id=793411#c32
--- Comment #32 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com