Re: [systemd-devel] [PATCH] python-systemd: add version number

2013-04-29 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 23, 2013 at 08:11:03PM +0100, Steven Hiscocks wrote:
> From: Steven Hiscocks 
> 
> ---
> Hi,
> 
> I thought it would be useful to have a version number in the python systemd 
> module.
Hi,
I haven't replied to this before because of one reservation. Namely,
right now all systemd modules are independent, and could be packaged
separately, with systemd being an implicit namespace package à la
PEP 420. I think that this makes a lot of sense, since systemd itself
is composed of many loosely linked parts and and we're unlikely to
ever put any functionality in systemd package itself. But adding
systemd.__version__ and encouraging people to use it will make such
a step harder. OTOH, adding __version__ to individual packages would
definitely be worthwhile. As an additional bonus, all those packages
have compiled components, so __version__ could be added without any
sed postprocessing.

Zbyszek

> I'm not overly familiar with Make, etc. but hopefully I've taken the right 
> approach. :)
> 
> Thanks
> Steven Hiscocks
> 
>  Makefile.am| 3 +++
>  src/python-systemd/{__init__.py => __init__.py.in} | 1 +
>  2 files changed, 4 insertions(+)
>  rename src/python-systemd/{__init__.py => __init__.py.in} (95%)
> 
> diff --git a/Makefile.am b/Makefile.am
> index d594a3d..718e6f8 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -3868,6 +3868,9 @@ src/%.policy.in: src/%.policy.in.in Makefile
>  %.rules: %.rules.in Makefile
>   $(SED_PROCESS)
>  
> +src/python-systemd/%: src/python-systemd/%.in
> + $(SED_PROCESS)
> +
>  %.sh: %.sh.in Makefile
>   $(SED_PROCESS)
>   $(AM_V_GEN)chmod +x $@
> diff --git a/src/python-systemd/__init__.py 
> b/src/python-systemd/__init__.py.in
> similarity index 95%
> rename from src/python-systemd/__init__.py
> rename to src/python-systemd/__init__.py.in
> index 0d56b99..7109f2a 100644
> --- a/src/python-systemd/__init__.py
> +++ b/src/python-systemd/__init__.py.in
> @@ -16,3 +16,4 @@
>  #
>  #  You should have received a copy of the GNU Lesser General Public License
>  #  along with systemd; If not, see .
> +__version__ = '@PACKAGE_VERSION@'
> -- 
> 1.8.2.1
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] login problems

2013-04-29 Thread Christian Hesse
Zbigniew Jędrzejewski-Szmek  on Tue, 2013/04/30 01:05:
> On Tue, Apr 30, 2013 at 12:03:24AM +0200, Christian Hesse wrote:
> > Hello everybody,
> > 
> > ok, this looks very tricky... I have no idea what happens and I have no
> > way to reproduce this. It just happens from time to time - very seldom.
> > 
> > If this happens I am not able to log in from lxdm and getty. The only way
> > back into the system is getting a failed login from getty, it succeeds
> > after the process has been restarted. From there I can restart lxdm unit.
> > 
> > Looks like lxdm-binary gets 'permission denied' when accessing some file.
> > This is strace from lxdm-binary, grepped for 'EACCES':
> > 
> > open("/etc/pam.d/eworm-yubico-otp", O_RDONLY) = -1 EACCES (Permission
> > denied) open("/var/log/faillog", O_RDWR)= -1 EACCES (Permission
> > denied) open("/var/log/faillog", O_RDONLY)  = -1 EACCES (Permission
> > denied) open("/dev/bus/usb/001/002", O_RDWR)= -1 EACCES (Permission
> > denied) open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission
> > denied)
> > 
> > lxdm-binary is running with user and group 'root' so I do not understand
> > why permissions for other take effect.
> > 
> > This is an Arch Linux system with Linux 3.8.8-1-ARCH and systemd 202-1.
> > Any ideas?
> Are you using selinux, runinng in enforcing mode? How soon after boot,
> and how soon after selinux policy is loaded, does this happen?

No selinux, just the standard Arch kernel.

It happens once a week or even less.
Once I thought this was triggered by dkms unit recompiling kernel modules.
Possibly dkms is a factor, but not the only one.

I suppose there is any kind of race condition involved. This is a fast system
- i7 3rd gen with Crucial SSD.
-- 
Schoene Gruesse
Chris
 O< ascii ribbon campaign
   stop html mail - www.asciiribbon.org


signature.asc
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] login problems

2013-04-29 Thread Jan Alexander Steffens
On Tue, Apr 30, 2013 at 1:05 AM, Zbigniew Jędrzejewski-Szmek
 wrote:
>> This is an Arch Linux system with Linux 3.8.8-1-ARCH and systemd 202-1.
>> Any ideas?
> Are you using selinux, runinng in enforcing mode? How soon after boot,
> and how soon after selinux policy is loaded, does this happen?

The ARCH kernel does not have SELinux.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] login problems

2013-04-29 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 30, 2013 at 12:03:24AM +0200, Christian Hesse wrote:
> Hello everybody,
> 
> ok, this looks very tricky... I have no idea what happens and I have no way
> to reproduce this. It just happens from time to time - very seldom.
> 
> If this happens I am not able to log in from lxdm and getty. The only way back
> into the system is getting a failed login from getty, it succeeds after the
> process has been restarted. From there I can restart lxdm unit.
> 
> Looks like lxdm-binary gets 'permission denied' when accessing some file.
> This is strace from lxdm-binary, grepped for 'EACCES':
> 
> open("/etc/pam.d/eworm-yubico-otp", O_RDONLY) = -1 EACCES (Permission denied)
> open("/var/log/faillog", O_RDWR)= -1 EACCES (Permission denied)
> open("/var/log/faillog", O_RDONLY)  = -1 EACCES (Permission denied)
> open("/dev/bus/usb/001/002", O_RDWR)= -1 EACCES (Permission denied)
> open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
> 
> lxdm-binary is running with user and group 'root' so I do not understand why
> permissions for other take effect.
> 
> This is an Arch Linux system with Linux 3.8.8-1-ARCH and systemd 202-1.
> Any ideas?
Are you using selinux, runinng in enforcing mode? How soon after boot,
and how soon after selinux policy is loaded, does this happen?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] login problems

2013-04-29 Thread Christian Hesse
Hello everybody,

ok, this looks very tricky... I have no idea what happens and I have no way
to reproduce this. It just happens from time to time - very seldom.

If this happens I am not able to log in from lxdm and getty. The only way back
into the system is getting a failed login from getty, it succeeds after the
process has been restarted. From there I can restart lxdm unit.

Looks like lxdm-binary gets 'permission denied' when accessing some file.
This is strace from lxdm-binary, grepped for 'EACCES':

open("/etc/pam.d/eworm-yubico-otp", O_RDONLY) = -1 EACCES (Permission denied)
open("/var/log/faillog", O_RDWR)= -1 EACCES (Permission denied)
open("/var/log/faillog", O_RDONLY)  = -1 EACCES (Permission denied)
open("/dev/bus/usb/001/002", O_RDWR)= -1 EACCES (Permission denied)
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)

lxdm-binary is running with user and group 'root' so I do not understand why
permissions for other take effect.

This is an Arch Linux system with Linux 3.8.8-1-ARCH and systemd 202-1.
Any ideas?
-- 
Schoene Gruesse
Chris
 O< ascii ribbon campaign
   stop html mail - www.asciiribbon.org


signature.asc
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] journal file corruption again

2013-04-29 Thread Allin Cottrell
This refers back to 
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010272.html 
where I reported journal files containing "Invalid object 
contents". At the time I was running systemd 200, and Cristian 
Rodríguez replied that this issue was a "journal corruption 
thingy, well known, fixed in 201".


I'm now running systemd 202. After a period in which all 
journal files passed "journalctl --verify" I'm now seeing some 
corruption again. My files for April 23 and 25 show "Invalid 
object contents at 1092360 (of 1097728, 99%)" and "Invalid 
object contents at 63840 (of 1396736, 4%)", respectively. 
Nothing bad happened to the system on those days. Again, 
debugging shows


o->data.entry_offset = 0
o->object.flags = 0
o->object.type = 1

for the offending objects. journald.conf is all defaults apart 
from


SplitMode=none
SystemMaxUse=16M

--
Allin Cottrell
Department of Economics
Wake Forest University, NC
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] nspawn: add -M option to optstring

2013-04-29 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Apr 29, 2013 at 01:12:28PM +0300, Evangelos Foutras wrote:
> This was missed in commit 7027ff61a34a12487712b382a061c654acc3a679 and
> means that the --machine option would work but not its shorthand, -M.
For the sake of mail archives, patch applied by Dave Reisner.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] nspawn: add -M option to optstring

2013-04-29 Thread Dave Reisner
On Mon, Apr 29, 2013 at 01:12:28PM +0300, Evangelos Foutras wrote:
> This was missed in commit 7027ff61a34a12487712b382a061c654acc3a679 and
> means that the --machine option would work but not its shorthand, -M.
> ---

Thanks, applied.

>  src/nspawn/nspawn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
> index 7b41571..a49cbc2 100644
> --- a/src/nspawn/nspawn.c
> +++ b/src/nspawn/nspawn.c
> @@ -173,7 +173,7 @@ static int parse_argv(int argc, char *argv[]) {
>  assert(argc >= 0);
>  assert(argv);
>  
> -while ((c = getopt_long(argc, argv, "+hD:u:C:bj", options, NULL)) >= 
> 0) {
> +while ((c = getopt_long(argc, argv, "+hD:u:C:bM:j", options, NULL)) 
> >= 0) {
>  
>  switch (c) {
>  
> -- 
> 1.8.2.2
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] nspawn: add -M option to optstring

2013-04-29 Thread Evangelos Foutras
This was missed in commit 7027ff61a34a12487712b382a061c654acc3a679 and
means that the --machine option would work but not its shorthand, -M.
---
 src/nspawn/nspawn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7b41571..a49cbc2 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -173,7 +173,7 @@ static int parse_argv(int argc, char *argv[]) {
 assert(argc >= 0);
 assert(argv);
 
-while ((c = getopt_long(argc, argv, "+hD:u:C:bj", options, NULL)) >= 
0) {
+while ((c = getopt_long(argc, argv, "+hD:u:C:bM:j", options, NULL)) >= 
0) {
 
 switch (c) {
 
-- 
1.8.2.2

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel