[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 <jren@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jren@suse.com AssignedTo|bnc-team-screening@forge.pr |fcrozat@suse.com |ovo.novell.com | -- 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#c1 --- Comment #1 from Frederic Crozat <fcrozat@suse.com> 2012-12-10 13:48:39 UTC --- could you fill a bug report on https://bugs.freedesktop,org/ since it is an upstream issue ? Thanks. -- 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#c2 --- Comment #2 from Per Jessen <per@computer.org> 2012-12-10 13:59:37 UTC --- (In reply to comment #1)
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 <mvyskocil@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mvyskocil@suse.com --- Comment #3 from Michal Vyskocil <mvyskocil@suse.com> 2013-01-21 08:46:36 UTC --- 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 -- 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#c4 --- Comment #4 from Frederic Crozat <fcrozat@suse.com> 2013-01-21 08:54:07 UTC --- (In reply to comment #3)
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 <fcrozat@suse.com> 2013-01-23 17:12:23 UTC --- 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. -- 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#c6 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lnussel@suse.com --- Comment #6 from Ludwig Nussel <lnussel@suse.com> 2013-01-30 08:40:55 CET --- note that continuation lines are illegal in sysconfig files. fillup will corrupt the file on next package update. -- 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#c7 --- Comment #7 from Frederic Crozat <fcrozat@suse.com> 2013-01-30 08:58:31 UTC --- (In reply to comment #6)
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 <per@computer.org> 2013-01-30 09:40:44 UTC --- (In reply to comment #5)
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 <fcrozat@suse.com> 2013-01-30 09:57:27 UTC --- Did you test only on 12.2 or also on Factory ? I might have miscorrectly backported the patch. -- 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#c10 --- Comment #10 from Per Jessen <per@computer.org> 2013-01-30 10:27:32 UTC --- (In reply to comment #9)
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 <mvyskocil@suse.com> 2013-01-30 11:29:16 UTC --- Patch looks correct to me - @per, what is your sysconfig file? The one you have mentioned in commenct#1? Are you sure there are no blank characters after continuation character? Code works only for '\\\n', everything else is not considered as continuation - it's upon an upstream request. -- 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#c12 --- Comment #12 from Frederic Crozat <fcrozat@suse.com> 2013-01-30 12:12:08 UTC --- (In reply to comment #8)
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 <per@computer.org> 2013-01-30 12:50:36 UTC --- 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. -- 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#c14 --- Comment #14 from Frederic Crozat <fcrozat@suse.com> 2013-01-30 13:04:02 UTC --- (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 -- 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 <per@computer.org> 2013-01-30 13:30:34 UTC --- (In reply to comment #14)
(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 <fcrozat@suse.com> 2013-01-30 14:38:14 UTC --- (In reply to comment #15)
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 <per@computer.org> 2013-01-30 14:51:58 UTC --- Created an attachment (id=522657) --> (http://bugzilla.novell.com/attachment.cgi?id=522657) /etc/systemd/system/spamd.service from dupont5 -- 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#c18 --- Comment #18 from Per Jessen <per@computer.org> 2013-01-30 14:52:33 UTC --- Created an attachment (id=522658) --> (http://bugzilla.novell.com/attachment.cgi?id=522658) /etc/sysconfig/spamd from dupont5 -- 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#c19 --- Comment #19 from Frederic Crozat <fcrozat@suse.com> 2013-01-31 13:41:34 UTC --- removing : #SPAMD_ARGS="-d --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" fixed the parsing (or uncommenting it too) on 12.2 (I didn't test Factory yet) Michal, it looks like the commented lines are processed after multiline (I didn't check the code yet). -- 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#c20 --- Comment #20 from Frederic Crozat <fcrozat@suse.com> 2013-01-31 14:27:25 UTC --- same issue on Factory -- 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#c21 --- Comment #21 from Michal Vyskocil <mvyskocil@suse.com> 2013-01-31 15:29:38 UTC --- (In reply to comment #19)
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 <mvyskocil@suse.com> 2013-02-01 13:48:18 UTC --- Well, the problem was code did not properly delete the auxiliary buffer, so after first commented multi-line definition, all new lines were added to this one, but as it have started by '#', it was just ignored. Sent a fix to systemd-devel and Frederic. -- 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#c23 --- Comment #23 from Frederic Crozat <fcrozat@suse.com> 2013-02-01 17:19:26 UTC --- I confirm the fix works. I've pushed it to my 12.2 test systemd repository (already published) and sr to Base:System for Factory (150752) -- 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#c24 --- Comment #24 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-02-01 20:00:29 CET --- This is an autogenerated message for OBS integration: This bug (793411) was mentioned in https://build.opensuse.org/request/show/150761 Factory / systemd -- 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#c25 --- Comment #25 from Michal Vyskocil <mvyskocil@suse.com> 2013-02-08 08:34:10 UTC --- Hi, the last and hopefully complete patch has been sent to systemd-devel. It deals with a comments inside multiline definition and as it comes with a decent test, it'd be now 100% correct. In short - systemd ignores comments inside definitions, and if it does not ends on \\\n, it is considered as end of a definition. Please note that systemd behaves differently than a shell, because it does not take quoting into account. On the other hand, the most common case FOO="multi \ line \ definition" will be handled exactly like a shell. http://lists.freedesktop.org/archives/systemd-devel/2013-February/008723.htm... -- 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#c26 --- Comment #26 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-02-12 11:00:25 CET --- This is an autogenerated message for OBS integration: This bug (793411) was mentioned in https://build.opensuse.org/request/show/155190 Factory / systemd -- 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#c27 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #27 from Frederic Crozat <fcrozat@suse.com> 2013-03-13 09:54:54 UTC --- I think we can close this bug now. -- 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#c28 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #28 from Frederic Crozat <fcrozat@suse.com> 2013-06-12 10:57:13 UTC --- requesting maintenance update for 12.2 -- 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#c29 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |maintenance@opensuse.org --- Comment #29 from Frederic Crozat <fcrozat@suse.com> 2013-06-12 10:57:37 UTC --- mr 178807 for 12.2 -- 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#c30 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED InfoProvider|maintenance@opensuse.org | --- Comment #30 from Benjamin Brunner <bbrunner@suse.com> 2013-06-13 05:34:05 CEST --- Update started for openSUSE 12.2. See openSUSE:Maintenance:1775. Thanks for your submission. -- 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#c31 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #31 from Benjamin Brunner <bbrunner@suse.com> 2013-06-20 09:07:58 CEST --- Update released for openSUSE 12.2. Resolved fixed. -- 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#c32 --- Comment #32 from Swamp Workflow Management <swamp@suse.de> 2013-06-20 08:04:23 UTC --- openSUSE-RU-2013:1055-1: An update that has four recommended fixes can now be installed. Category: recommended (moderate) Bug References: 793411,796171,804575,808144 CVE References: Sources used: openSUSE 12.2 (src): systemd-44-10.15.1, systemd-gtk-44-10.15.1 -- 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.
participants (1)
-
bugzilla_noreply@novell.com