This best practice is a simple suggestion: Put every raw list in parenthesis. It’s good. Read the rest of this entry »
PBP: 049 Lists
October 16th, 2014PBP: 048 Low-Precedence Operators
October 13th, 2014The best practice is not to mix low and high precedence boolean operators. This is both good and bad, but following the rule can save your sanity. Read the rest of this entry »
PBP: 047 Thin Commas
October 9th, 2014The PBP cautions us not to use commas to separate and sequence statements. I think this is good advice most of the time. Read the rest of this entry »
PBP: 046 Fat Commas
October 6th, 2014Perl has a weird but cool operator, the “fat comma”, written as =>. It’s a comma, but with a special property that means a bareword on the left side is allowed. They’re often used for initializing hashes without having to quote every hash key.
The PBP suggests reserving => for items that go together, or, as it says “for pairs”. Name => value pairs, mostly. These things are related to each other and => makes that visible. Read the rest of this entry »
PBP: 045 Barewords
October 2nd, 2014Perl supports “barewords”, which are strings that just sit naked in your program. If it isn’t parsable code, it’s a bareword. The PBP says: Don’t. I agree, as does ‘use strict’, which I always use. Read the rest of this entry »
PBP: 044 Heredoc Quoters
September 29th, 2014The PBP suggests that all heredocs be explicitly and deliberately quoted. When I first read this, I didn’t know you could do that! It’s a great idea. Read the rest of this entry »
systemd: Failed at step NAMESPACE spawning …: Operation not permitted
September 25th, 2014If systemd refuses to start a service, and gives you a message like this:
Sep 25 17:22:11 mus systemd[1234]: Failed at step NAMESPACE spawning /usr/bin/whatever: Operation not permitted
… then you might have a symlink as your /var/tmp. Make it a real directory, or mount -o bind /tmp onto it. Then systemd can work. (In /etc/fstab, add a line, “/tmp /var/tmp ext3 rbind defaults,rbind 0 3”, where the final 3 is a number higher than your /tmp and /var mount at. I fully expect this to confuse SuSE’s upgrader later, but I can deal with that then.)
This only happens if something uses the
PrivateTmp=true
option in the service file.
SuSE’s exim does this. Others do it for CUPS or httpd.
Once again, systemd comes along and screws up a working system, and provides no feedback about what or why or how. This time searching the Internet wasn’t even useful. I’m so glad I found this bug.
The author (in a post I can not now find) says, “I see no reason to support /var/tmp as a symlink.” Lucky you! I do! What is the reason not to, and is it worth breaking Linux machines that have run for years this way?
Why, you ask, do you want a symlink for /var/tmp?
I don’t want to create a second /tmp partition. I use a separate partition for /tmp, so I can set nodev,noexec,nosuid on it. I’ve had security problems in the past from things executing a payload on /tmp – never again. It’s saved me more than once now.
I want /var/tmp to get that same protection, so it’s a symlink. Symlinks are standard Unix stuff, they’re well understood and work for simple things like this.
So, not only did you break a validly configured system because you’re a bunch of thoughtless, inexperienced jerks, you gave the world’s most useless error message in doing so!
I really want to like systemd. I think it’s trying to do good things. But the people around it, and the complete lack of availability of information it gives you are making that very, very hard. OpenBSD is looking better and better.
PBP: 043 Heredoc Terminators
September 25th, 2014Mr. Conway suggests making all heredoc terminators single uppercase identifiers which start with a standard prefix. This is part of naming things regularly, and I support it. Read the rest of this entry »