Re: [systemd-devel] newer systemd for rhel7/centos7

2014-11-20 Thread microcai
在 2014年11月20日 星期四 21:35:05,Lukáš Nykrýn 写道:
> "Jóhann B. Guðmundsson" píše v Čt 20. 11. 2014 v 18:10 +:
> > On 11/20/2014 04:24 PM, Lukáš Nykrýn wrote:
> > > Hi,
> > > 
> > > rhel7 / centos7 is shipped with heavily patched systemd 208, which does
> > > not contain new interesting features and for us it is a backporting
> > > nightmare.
> > > 
> > > I have prepared an experimental repo with newer version of systemd for
> > > epel7. Currently it is based on 217 from Fedora rawhide and final goal
> > > should be 218.
> > > 
> > > If you are interested, here is a COPR build. Feedback and bug reports
> > > are as always highly appreciated.
> > > 
> > > https://copr.fedoraproject.org/coprs/lnykryn/systemd/
> > > 
> > > Lukas
> > 
> > Wont you break your RHEL support if you run this?
> 
> Yes if you will use it on you rhel, it is not supported.
> 
> But this was not my point. I am downstream maintainer and I am just
> thinking if it is possible to rebase systemd in relatively conservative
> distribution. So I wanted to ask upstream where can I except potential
> issues.
> 
> I thought that this could be an interesting topics for upstream because
> I think that no distribution have  tried to do such huge rebase in one
> major version.
> 
> An maybe this could be helpful for other distribution (is debian still
> using 208? :) ).

upgrading systemd won't break anything. Archlinux and Gentoo rebase systemd 
every day.

But keep a mind of udev, this is the one that will break over time ;)

You should scroll over ChangeLogs to read if udev changes its beheavier.
Perhaps the biggest changes that you'll facing is the firmware loading 
mechanism. 

> 
> Lukas
> 
> ___
> 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] [PATCH 05/10] rules: skip 99-systemd.rules when not running systemd as init

2014-07-16 Thread microcai
在 2014年7月16日 星期三 20:45:56,Jon Severinsson 写道:
> The file still contains one RUN+="@rootlibexecdir@/systemd-sysctl ...",
> which  I don't think is desirable when systemd is installed but not running
> as PID 1 (which we also have to support).

support for the sake of support is a bad syndrom. 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] using /dev/root in fstab

2014-07-07 Thread microcai
在 2014年7月7日 星期一 11:14:40,Samuli Suominen 写道:
> On 07/07/14 07:29, microcai wrote:
> >  a long ago, /dev/root is an symblic to real root device. no matter it is
> >  on
> > 
> > NFS or HDD, we can use
> > 
> > /dev/root / auto defaults 0 0
> > 
> > in fstab to mount / as readwrite.
> > 
> > recently, I recall this old feature, and tryed to use it, but the system
> > failed to boot, waiting for /dev/root that never come up.
> > 
> > how to bring back the good old feature that re-use the root device
> > assigned on kernel command line ?
> 
> (This is ugly, I know.)
> 
> We restore the /dev/root symlink in Gentoo same way Debian is restoring
> it on non-systemd
> systems that still use sysvinit using a "workaround" like,
> 
> #!/bin/sh -e
> #
> # dev-root-link.sh: create /dev/root symlink
> #
> # Distributed under the terms of the GNU General Public License v2
> #
> # This is here because some software expects /dev/root to exist.
> # For more information, see this bug:
> # https://bugs.gentoo.org/show_bug.cgi?id=438380
> 
> RULESDIR=/run/udev/rules.d
> 
> [ -d $RULESDIR ] || mkdir -p $RULESDIR
> 
> eval $(udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/
> 
> || true)
> 
> [ "$ROOT_MAJOR" -a "$ROOT_MINOR" ] || exit 0
> 
> # btrfs filesystems have bogus major/minor numbers
> [ "$ROOT_MAJOR" != 0 ] || exit 0
> 
> echo 'ACTION=="add|change", SUBSYSTEM=="block",
> ENV{MAJOR}=="'$ROOT_MAJOR'", ENV{MINOR}=="'$ROOT_MINOR'",
> SYMLINK+="root"' > $RULESDIR/61-dev-root-link.rules
> 

that hack is bloody urgly, I hate to use that stupid hack.

I am not talk about bring back /dev/root, but just a way of refereing 
"whatever root device specified on kernel commandline" in fstab or in -.mount 
unit.

deserize root filesystem and configure the bootloader, and installation 
complete. Hate to change target fstab again.

also, I think it's rather stupid to specify root device twice, once in boot 
loader, once in fstab. keeping them sync is a burden.

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


Re: [systemd-devel] using /dev/root in fstab

2014-07-07 Thread microcai
在 2014年7月7日 星期一 10:54:13,您写道:
> rootfstype=, rootflags=.
> 
> ("rw" is a separate option, doesn't go in rootflags=.)

I failed with rootflags. kernel panic. can't work with  
rootflags=nodev,noatime,discard 

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


Re: [systemd-devel] using /dev/root in fstab

2014-07-07 Thread microcai
在 2014年7月7日 星期一 10:40:41,您写道:
> On Mon, Jul 7, 2014 at 10:38 AM, microcai  
wrote:
> > 在 2014年7月7日 星期一 08:41:37,您写道:
> > 
> >> On Mon, Jul 7, 2014 at 7:29 AM, microcai  
wrote:
> >> >  a long ago, /dev/root is an symblic to real root device. no matter it
> >> >  is
> >> >  on
> >> > 
> >> > NFS or HDD, we can use
> >> > 
> >> > /dev/root / auto defaults 0 0
> >> > 
> >> > in fstab to mount / as readwrite.
> >> 
> >> Is it any better than just using 'rw' in the kernel command line?
> > 
> > fsck will run on it.  if use 1 1 ;)
> 
> That's... not better, that's worse.
> 
> Run fsck from the initramfs, not when the root's already mounted.

can you set mount flags without fstab ?

> 
> (Besides, how does fsck even work if /dev/root is NFS?)

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


Re: [systemd-devel] using /dev/root in fstab

2014-07-07 Thread microcai
在 2014年7月7日 星期一 08:41:37,您写道:
> On Mon, Jul 7, 2014 at 7:29 AM, microcai  wrote:
> >  a long ago, /dev/root is an symblic to real root device. no matter it is
> >  on
> > 
> > NFS or HDD, we can use
> > 
> > /dev/root / auto defaults 0 0
> > 
> > in fstab to mount / as readwrite.
> 
> Is it any better than just using 'rw' in the kernel command line?

fsck will run on it.  if use 1 1 ;)



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


[systemd-devel] using /dev/root in fstab

2014-07-06 Thread microcai

 a long ago, /dev/root is an symblic to real root device. no matter it is on 
NFS or HDD, we can use  

/dev/root / auto defaults 0 0 

in fstab to mount / as readwrite.

recently, I recall this old feature, and tryed to use it, but the system 
failed to boot, waiting for /dev/root that never come up.

how to bring back the good old feature that re-use the root device assigned on 
kernel command line ?


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


Re: [systemd-devel] [PATCH] localed: search locale settings on kernel cmdline first

2014-07-01 Thread microcai
在 2014年6月30日 星期一 15:10:06,Lennart Poettering 写道:
> On Mon, 02.06.14 18:03, Michal Sekletar (msekl...@redhat.com) wrote:
> 
> Heya!
> 
> Sorry for the late response!
> 
> > systemd spawns services with locale settings taken from kernel
> > cmdline. If it doesn't find anything there, then it proceeds with
> > parsing settings from /etc/locale.conf.  localed should do the same and
> > look at kernel cmdline first.
> 
> Hmm, this would create the weird situation where changing the settings
> with localectl would have no effect on the settings it displays, right?
> 
> It's a weird thing: on one hand we want the rule that kernel cmdline
> args override configuration in /etc. On the other we want that
> localectl to be both getter and setter for the settings, and connect
> them directly. Of course localectl cannot change the kernel cmdline.
> 
> We could make localed refuse changing the settings if there's something
> on the kernel cmdline, but I think I'd hate that, since the admin should
> always be able to change the settings.
> 
> Maybe another option is to improve localectl on the client side to
> simply warn the user if there's something on the kernel cmdline
> specified? (this check should probably test this directly, bypassing
> localed, and thus get skipped if localectl is used on a remote host).
> 
> i.e. just a simple warning if you type "localectl" that says: "Warning:
> Locale configuration has been specified on the kernel command line,
> overriding the system settings below." or so...

kernel has BOOT time, etc settings has modified time, which one is newer, take 
that ?

well, them every time you reboot, kernel cmdline settings win. 

> 
> Opinions?
> 
> Lennart

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


Re: [systemd-devel] [RFC 6/8] HACK2: blocking ioctl(CMD_MSG_RECV)

2014-06-25 Thread microcai
2014-06-25 18:30 GMT+08:00 Kay Sievers :
> On Wed, Jun 25, 2014 at 11:13 AM, AKASHI Takahiro
>  wrote:
>> In the current implementation, ioctl(CMD_MSG_RECV) returns immediately if
>> no message has been queued, and so a service process has to wait by
>> explicitly calling poll() system call. If such a process needs to wait only
>> on a single connection, we can eliminate poll() system call by adding a
>> synchronous attribute in receiving a message.
>
> Why is this useful in general? The peer can call RECV in a loop until
> EAGAIN without ever needing to call poll() as long as data is
> available.
>
> When there is no more message to handle, poll() is used to suspend the
> process, and only when it is idle anyway.
>
> Busy processes, the use-case we would optimize for, should not see a
> real benefit here?

And library can simulate the sync calls by revc + poll anyway.
There is no real benefit.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] build-sys: Always install compat pkg-config files

2014-02-25 Thread microcai
2014-02-23 0:55 GMT+08:00 Kay Sievers :
> On Sat, Feb 22, 2014 at 3:21 PM, Armin K  wrote:
>> Packages are still looking for the old pkg-config files,
>> so until everything has been ported over, install them
>> always, no matter if compat-libs are built or not.
>
> So far, we think that compat should stay compat, and not mix with the
> non-compat stuff.
>


compat-libs are for *binary* stuff that *have to* look for  compat libs.

why provide compat-libs with pkg-config files? if you can rebuild the
code, then there is no need for  old .so files.
systemd provide compat .so files just because so you won't have to
rebuild the affected code.

why providing .so files when you can rebuild the code ?

so, compat-libs is only for binary only apps, the apps that came with
source code is all that fine with  old pkg-config files.

compat-libs is in conflict with pkg-config files.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Re: eudev fork and patches there

2012-12-18 Thread microcai

On 2012年12月17日星期一 CST下午10时36分48秒, Kay Sievers wrote:
On Mon, Dec 17, 2012 at 2:04 PM, Koen Kooi 
 wrote:
Op 17 dec. 2012, om 12:17 heeft Zbigniew Jędrzejewski-Szmek 
 het volgende geschreven:



eudev has made a project annoucement [1], and I thought it would be
worthwhile to go through their patches and cherry-pick. I've now done
that (until cc5c144a70fc37e 'Merge pull request #32') and the results
regarding patches which can be used directly are not very impressive:
one patch to fix clang warnings. There are quite a few
build/compiler-warning in their tree, but they just seem to be fixes
for problems introduced with their changes.

Potentially usefull would also be the patch c189ab 'Fix unused result
warnings', but it would be good if somebody familar with the code took
a look if it is enough to print warnings (or even if they should be
printed) or some more definite action should be taken.

Also potentially usefull are the changes to allow 'make distcheck'
without gtk-doc, but they are spread out over multiple commits in a
messy way, so could only be used as inspiration.

There's also nice patch bfc850 'Add fallback path when accept4() is
not available.' Do we care about kernels < 2.6.28? (This version is
according to man accept4(2), patch text mentions different versions.)




Keep in mind that your *libc has to support accept4() as well. 
I ran into that problem a long time ago [1]. Backporting 
support for accept4() is trivial. For systemd you'll need 2 
more backports: cgroup mountpoint and the active terminal 
thing.
Also note that epoll() was added to non-x86 architectures a 
lot later than x86.


We generally do not want to work around kernel or libc "bugs". So I'm
not interested in such a patch.

People who want or need to play these match-and-mix games with "new
userspace on old systems" should fix the dependencies where they are
missing, not expect "magic" workarounds from tools. There are many
subtle dependencies on various things which are not available on old
kernels and libc, this is just a very obvious one. We should not
pretend we support that model, we just don't. And it will get even
harder in the future, as we are trying to build a real OS now not a
"bag of bits".

We surely will not make anything harder than it needs to be, but
pretending bleeding edge tools will or should work on 2 years old
kernels is a promise we do not want to make with systemd/udev. In this
case, it would be the job of the libc, not the user of libc.

We surely support things the other way around, what the kernel is
doing, which is new kernels on old systems, but doing it both ways is
not really the goal for us.


agree. people should just upgrade their kernel. does kernel really remove old 
hardware support? if not, then why are we stick to old kernels?

for the people insistead on old kernel, they might be using old udev as well. I generally 
dislike "mixed workarround", that is, new kernel try to workarround old buggy 
userspace tools and new user space tools workarround buggy old kernels. This also apply 
to any lib and app.

why dont we just upgrade both and make both life (kernel side and userspace side) more easier ? 



Thanks,
Kay
___
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] GPIO Reset Button

2012-11-02 Thread microcai
On Friday 02 November 2012 09:56:53 Pawel Pastuszak wrote:
> Hi all,
> 
> I was wondering if there is an way to attach an GPIO line to reboot 
the
> system. I am currently working on an Embedded device that has an 
GPIO line
> which needs to act as an reboot button this GPIO comes up as an
> /sys/class/gpio/gpio103/ which i want to have it trigger when it 
switches
> state to low and do an system soft reboot. Does systemd allow any
> functionally like this?

why not write a evdev driver that report that button as poweroff  
button ?

> 
> Thanks,
> Pawel
-- 

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


Re: [systemd-devel] when will mount / df get fixed?

2012-10-10 Thread microcai
2012/10/11 Lennart Poettering :
> On Wed, 10.10.12 12:48, Marti Raudsepp (ma...@juffo.org) wrote:
>
>>
>> On Mon, Oct 1, 2012 at 8:22 PM, Jan Engelhardt  wrote:
>> >>and how they should do this after the change that there
>> >>is no flag? dispaly a RANDOM line?
>> >
>> > That is a possibility. Based upon that you are only interested
>> > in the device anyway, I conclude the mountpoint is irrelevant.
>>
>> I didn't read the whole thread so maybe this has already been proposed, 
>> but...
>> 1) we want df to show space usage by disk
>> 2) we want df to show mount points
>> 3) the mapping from disks to mount points is one-to-many
>>
>> Why not just collect all the relevant mount points on one line, for
>> each disk? This way we don't throw away any information, but prevent
>> repeating redundant information that's always the same for each disk.
>
> This comes very close to what I suggested, except that I suggested
> ellipsation before listing too many mount points per entry.

why not fix df

>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
> ___
> 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] [PATCH] execute: Fix seccomp support on x32

2012-08-03 Thread microcai
2012/8/4 Lennart Poettering :
> On Tue, 24.07.12 22:45, Jonathan Callen (a...@gentoo.org) wrote:
>
>> In the x32 ABI, syscall numbers start at 0x4000.  Mask that bit on
>> x32 for lookups in the syscall_names array and syscall_filter and ensure
>> that syscall.h is parsed correctly.
>
> Hmpf, can't say I find this patch particularly beautiful?
>
> Can we solve this differently? For example, I'd be open to replace the
> direct seccomp code in systemd by some code based on libseccomp (now
> that libseccomp actually fixed its static global state issues). That way
> we should get this portability for free?

looks like some  source-based distro will blame you again :)


>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
> ___
> 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] Minimal builds

2012-06-20 Thread microcai
2012/6/21 William Hubbs 

> On Wed, Jun 20, 2012 at 06:22:49PM +0200, Lennart Poettering wrote:
> > Heya,
> >
> > regarding the whole discussion on minimal builds and people wanting to
> > pick specific parts of the systemd build leaving out others, beyond what
> > the configure switches offer: Here are some guidelines how we recommend
> > people to do this:
> >
> > http://freedesktop.org/wiki/Software/systemd/MinimalBuilds
> >
> > From our side this should be enough to settle the discussion.
>
> It isn't for us, because, for example, if I use option 1, I have to do
> the opposite of the second half of it. Our pm installs everything in the
> place pointed to by DESTDIR, then I have to manually remove the things I
> don't need. As was pointed out in a thread earlier, this is very
> error-prone and definitely could lead to issues.
>
> Another thing to think about from our side is, although the main
> components compile quickly on a pc, how long would it take to compile
> everything on an ARM-based machine for example? I have no idea, so it
> could end up being really annoying to users of that platform  for us to
> compile all of the main components and turn around and remove most of
> them.
>
> Thanks for your consideration,
>
> William
>


If you don't want to use systemd, then don't use udev, use some thing else
old too.

most ARM-based machine actually don't use udev, they use busybox. Or an old
udev that don't require an recent kernel.

If you are stupid enough to use udev, then you probably will use systemd. :)

So, don't use the  "ARM" use-case.

I think the only reason is you want to support sysvinit. Oh, please, if
you're still using sysvinit, then don't use recent udev.

sysvinit is old, there is no reason to have a new udev with it. Use old
udev too.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] setting up to allow separate udev and systemd builds

2012-06-20 Thread microcai
2012/6/19 Kay Sievers 

> On Tue, Jun 19, 2012 at 1:10 PM, Michael Olbrich
>  wrote:
> > On Tue, Jun 19, 2012 at 11:21:58AM +0200, Lennart Poettering wrote:
> >> On Fri, 15.06.12 20:06, Bryan Kadzban (br...@kadzban.is-a-geek.net)
> wrote:
> >> > dbus
> >> > libcap
> >>
> >> I am quite happy with depending on these two as it makes little sense to
> >> build an OS without it, unless you go super minimal in which case
> >> sysemd/udev are not relevant.
> >
> > For embedded distros udev without systemd is a very real usecase.
> >
> >> > m4
> >> > intltool
> >> > gperf (--enable-keymap will require gperf for a udev build as well)
> >>
> >> These are only build-time deps, and hence are totally OK to have.
> >
> > I don't care about these. But cross-compiling dbus when it's not actually
> > wanted or needed is not ok.
>
> There are zero known problems with doing that with D-Bus. All you do
> is waste CPU cycles on the build system, which is what we all do
> anyway when we do your own stuff and don't use a pre-compiled package
> from a distro.
>
> I really don't see a problem here besides some inconvenience, which is
> justified at this moment, where everything is just newly introduced
> stuff.
>
> >> I mean, the next thing you come up with is a patch to not require
> >> automake and use only make, just because you have a problem with
> >> dependencies? I mean, seriously.
> >
> > This is uncalled for. Depending on a good build-system is ok. But it was
> > clearly stated that using udev without systemd will still be possible. I
> > don't see why it should not be possible to build udev without systemd and
> > therefore any extra dependencies.
>
> We said udev *runs* alone, not that you can tweak the build system to
> only build it. And that is still all true.
>
> Without patching the build sys, you can *probably* temporarily work
> around the build dependencies with things like:
>  $ export PKG_CONFIG_PATH=$PWD; \
>echo -e "Name: dbus-1\nDescription: stub\nVersion: 999" > dbus-1.pc
>  $ ./configure
>  $ make systemd-udevd udevadm ata_id 
>
> Longer-term plan is to move the D-Bus daemon functionality to the
> kernel, and let systemd talk directly to the kernel. The external
> D-Bus dependency might go entirely away with that. At that point, when
> there is no D-Bus daemon runtime dependency anymore, it is very likely
> that udevd/udevadm/libudev will use the kernel's D-Bus interfaces too
> instead of the home-grown IPC, and all of that build-sys splitting and
> fiddling makes not much sense anymore.
>


NOKIA married with M$ , so, this kdbus stuff is vanished, said.



>
> So, please keep that build-sys stuff local please and do not expect
> any of this to be merged upstream at this moment. We can merge
> reasonable and obvious patches to make things easier, like we removed
> the needless D-Bus tools linking for the udev binaries, but we do not
> want to make promises about full modularization, or things like
> disabling the build of systemd in the systemd tarball.
>
> We properly support *running* (and distros can do such packaging) a
> standalone udev, for people who run systems without systemd. We just
> do not support fully separated standalone *builds* at the moment, and
> maybe we never will.
>
> If things turn out differently in the future as we expect them to be,
> we can discuss that again, but that is unlikely to happen before the
> end of the year. We first need to see where we will end up with D-Bus
> when we get there, it might change all the assumptions people make
> about this sort dependency so far.
>
> Thanks,
> Kay
> ___
> 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] setting up to allow separate udev and systemd builds

2012-06-15 Thread microcai
2012/6/15 William Hubbs 

> On Fri, Jun 15, 2012 at 07:27:26PM +0800, microcai wrote:
> > 2012/6/15 William Hubbs 
> > > systemd has several more dependencies than udev. Because of that and
> > > because of the way the build system is setup to only do a full systemd
> > > build, I have to install all of systemd's dependencies on every gentoo
> > > user's system regardless of whether or not they are using systemd or
> > > udev standalone.
> > >
> >
> > That's not true. Please tell us exactly which lib is use only by systemd
> > and not by the rest of the system.
>
> At least dbus and intltool are not used by udev. There are probably more; I
> haven't really looked at all of the details yet.
>
> It isn't only libraries though; many things get built even when you use
> all of the --disable switches that are not needed on a system that is
> using udev standalone.
>

but others will do use dbus and intltool.


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


Re: [systemd-devel] setting up to allow separate udev and systemd builds

2012-06-15 Thread microcai
2012/6/15 William Hubbs 

> Hello Auke,
>
> On Fri, Jun 15, 2012 at 04:26:36AM +, Kok, Auke-jan H wrote:
> > On Fri, Jun 15, 2012 at 2:32 AM, William Hubbs 
> wrote:
> > > Hello Auke,
> > >
> > > I will answer your concerns as best as I can below.
> > >
> > > On Thu, Jun 14, 2012 at 03:35:09PM -0700, Kok, Auke-jan H wrote:
> > >> 1) Timing. systemd+udevd just got merged.  We had a huge build system
> > >> change. Let's not change it drastically again entirely now.
> > >
> > > From the point of view of a source based distro, the build system
> > > as it currently stands is broken. Upstream supports running udev
> without
> > > systemd, so why not building udev standalone as well, especially since
> > > there is interest in doing the work?
> >
> > It's not broken at all. What is broken is the assumption that one can
> just
> > run `make install` willy nilly in a source distro and overwrite files in
> > the live system.
> >
> > This is a design problem in ALL source based distro's (including the one
> > I worked on for years) and can't be fixed by upstream. Source distro's
> > should really work on doing a proper `make DESTDIR= install` or use
> > fakeroot/chroot installs and buffer the installation of files before the
> > real rootfs is overwritten.
> >
> > Not solving that is an error that the source distributions should solve,
> > and definitely should not be the reason for an upstream project to jump
> > to the aid of source distros.
>
> As Wulf already pointed out, gentoo already does this properly, and we
> also do our own sanity checks before we move the package to the live fs.
>
> This is definitely not an issue we expect upstream projects to solve
>  other than supporting DESTDIR, which udev and systemd already do.
>
> > >> 4) Can be maintained out of tree for now: Nothing prevents gentoo from
> > >> keeping this patch out of tree for their purposes.
> > >
> > >  Yes, we could, but what about exherbo, funtoo, linux from scratch and
> > >  the other source based distros that may be out there?
> >
> > they could pull the patch from gentoo's repository.
>
> I suppose they could if they were comfortable doing that, but I tend to
> agree with Wulf on this; I would rather not have custom patches being
> shared between distros. Honestly I would rather have as few custom
> patches as possible; custom patches can be a headache to maintain.
>
> > I think this patch would be a lot more acceptable if you drop the split
> > Makefile.am, remove the --disable-systemd option and just create an extra
> > "make install-udev" target.
> >
> > It would be a lot smaller too.
>
> I could rework it so I don't split up the makefiles, sure, but let me
> explain why the install-udev target does not solve the issue we are
> trying to solve.
>
> systemd has several more dependencies than udev. Because of that and
> because of the way the build system is setup to only do a full systemd
> build, I have to install all of systemd's dependencies on every gentoo
> user's system regardless of whether or not they are using systemd or
> udev standalone.
>

That's not true. Please tell us exactly which lib is use only by systemd
and not by the rest of the system.


>
> What I need is a way to tell the configure script and Makefiles that I
> am only interested in building udev and not a full systemd build.
>
> There was another patch that came from the linux from scratch community
> posted on the linux-hotplug list [1].
>
> I spoke with Kay about that patch, and he didn't sound like he liked it
> too much.
>
> William
>
> [1] http://www.spinics.net/lists/hotplug/msg05529.html
>
> ___
> 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] help on syslog-ng and systemd-kmsg-syslogd.service

2011-12-12 Thread microcai

Hi guys.

I had this issue since the release of systemd-37.

system start up hang on syslog-ng

If I comment out ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
then system boots successfull. But, dbus-daemon keep on poluting my screens.
dbus became quiet while I manully stop systemd-kmsg-syslogd.service.

So, that's why we need "ExecStartPre=/bin/systemctl stop
systemd-kmsg-syslogd.service" in the first place.

Question is , why system hang when I have "ExecStartPre=/bin/systemctl stop
systemd-kmsg-syslogd.service" in syslog-ng.service ?

syslog-ng = 3.2.4



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


Re: [systemd-devel] [PATCH 00/14] systemadm updates

2011-09-19 Thread microcai
Can you send git pull request and just mail  diff state ?

2011/9/19 Zbigniew Jędrzejewski-Szmek :
> Hi,
>
> here are some patches for systemadm. The goal is to make the output
> more readable (i.e. with sorted and colored dependencies, not
> ellipsized).  Also allow sorting on various columns, make text
> selectable, and a bit shorter someplaces to save space.
>
> A dependency on libgee is added, to have a hash map of units. Libgee
> is packaged for fedora and debian, and should not be a
> problem. Otherwise, units have to be looked up over dbus and this is
> slow. Also, a wrappable gtk label is added as a separate file, because
> gtk itself makes it hard to have a wrappable resizable label.
>
> All in all, those patches are far from perfect, but systemadm hasn't
> seen any changes in a long while and they should make stuff better.
>
>
> Zbigniew Jędrzejewski-Szmek (14):
>  systemadm: break timestamp formatting out into a seperate function
>  systemadm: allow sorting of jobs and units
>  systemadm: display dependencies sorted
>  systemadm: split the type+status combo box into type combo & status checkbox
>  systemadm: filter on swaps, paths, and timers too.
>  systemadm: add a wrappable label and use it for status lines
>  systemadm: add libgee as dependency and use it for a unit map
>  systemadm: use color for dependency links
>  systemadm: use bold for "requires", etc.
>  systemadm: make the dependency listing  selectable
>  systemadm: catch exceptions generated by dbus
>  systemadm: coalesce id and decription fields
>  systemadm: adjust row numbers after removing 'aliases'
>  systemadm: use colors for id too, remove color from fragment link
>
>  Makefile.am        |   15 ++-
>  configure.ac       |    8 ++-
>  src/.gitignore     |    1 +
>  src/systemadm.vala |  290 
> +++-
>  src/wraplabel.vala |   73 +
>  5 files changed, 263 insertions(+), 124 deletions(-)
>  create mode 100644 src/wraplabel.vala
>
> --
> 1.7.5.4
>
> ___
> 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] Chicken and egg problem when building a systemd enabled system

2011-05-26 Thread microcai
于 2011年05月26日 16:58, Koen Kooi 写道:
> Hi,
> 
> When building a complete system from scratch, especially in a crosscompile 
> environment there is a chicken and egg problem:
> 
> systemd needs dbus and udev to buid, but dbus and udev only install systemd 
> files when system has been built.
> 
> I'd like to confirm that passing '--with-systemdsystemunitdir' to udev and 
> dbus will fix this.

build them twice.

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




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


Re: [systemd-devel] combine old-style sysvinit daemon and new-style systemd

2011-05-26 Thread microcai
于 2011年05月26日 16:33, Vasiliy G Tolstov 写道:
> Hello. If i want to write daemon, that can be running by regular init
> system (openrc, upstart and others) and systemd, how can i check inside
> my daemon, that it runs from systemd?
> In compile phase, i can build with systemd support and install service
> file, but if i do not want to write and build separate binaries for two
> init daemons, how can i solve this?
> 

check sd-booted()




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


Re: [systemd-devel] [ PATCH-v2 ] dnsmasq ebuild and unit files for dnsmasq

2011-05-22 Thread microcai
于 2011年05月22日 23:22, Henry Gebhardt 写道:
> On Sun, May 22, 2011 at 02:50:00PM +0800, microcai wrote:
>> Heya,
>>
>> Here is the 2nd version.
>>
>> Split the DHCP and TFTP socket and use Servie=dnsmasq.servie to point to
>> dnsmasq.
>>
>> Add einfo to the user tell then how to do with the socket unit files.
>>
>> both DNS and tftp have been test. I haven't test DHCP activation,  But I
>> think it will works.
>>
>> CC systemd for other people to review the socket unit files.
> 
> CC'ing Michal, I hope you don't mind. But one question: Should
> services/sockets be enabled by default (e.g. using your
> systemd_enable_services() function)?
> 
>>
>> Thanks.
>>

Updated. Use systemd_dounit() and always intall systemd unit files.

Description changed.


Hope this time I did the right job, once for all. ;)

As for upstream, I've send him the patch. But we don't want to wait for
another release, do we?

[Unit]
Description=Small forwarding DNS server with DHCP and tftp support.
After=network.target

[Service]
StandardOutput=syslog
StandardError=syslog

ExecStart=/usr/sbin/dnsmasq -d -k 

[Unit]
Description=DNS Socket activation for dnsmasq - Small forwarding DNS server 
with DHCP and tftp support.

[Socket]

BindIPv6Only=ipv6-only

#DNS
ListenDatagram=0.0.0.0:53
ListenStream=0.0.0.0:53
ListenDatagram=[::]:53
ListenStream=[::]:53

[Install]
WantedBy=sockets.target
[Unit]
Description=DHCP Socket activation for dnsmasq - Small forwarding DNS server 
with DHCP and tftp support.

[Socket]

BindIPv6Only=ipv6-only


ListenDatagram=0.0.0.0:67
ListenDatagram=[::]:67

Service=dnsmasq.service

[Install]
WantedBy=sockets.target
[Unit]
Description=TFTP Socket activation for dnsmasq - Small forwarding DNS server 
with DHCP and tftp support.

[Socket]

BindIPv6Only=ipv6-only


#TFTP, uncomment this to have tftp support
ListenDatagram=[::]:69
ListenDatagram=0.0.0.0:69

Service=dnsmasq.service

[Install]
WantedBy=sockets.target
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57.ebuild,v 1.6 
2011/04/16 18:23:07 armin76 Exp $

EAPI=2

inherit eutils toolchain-funcs flag-o-matic systemd

MY_P="${P/_/}"
MY_PV="${PV/_/}"
DESCRIPTION="Small forwarding DNS server"
HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/";
SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma";

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ~ppc64 s390 sh sparc x86 
~sparc-fbsd ~x86-fbsd"
IUSE="dbus +dhcp idn ipv6 nls tftp"

RDEPEND="dbus? ( sys-apps/dbus )
idn? ( net-dns/libidn )
nls? (
sys-devel/gettext
net-dns/libidn
)
"

DEPEND="${RDEPEND}
dev-util/pkgconfig
|| ( app-arch/xz-utils app-arch/lzma-utils )"

S="${WORKDIR}/${PN}-${MY_PV}"

src_prepare() {
# dnsmasq on FreeBSD wants the config file in a silly location, this 
fixes
epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"

# apply systemd patch
epatch "${FILESDIR}/${P}-systemd.patch"
}

src_configure() {
COPTS=""
use tftp || COPTS+=" -DNO_TFTP"
use dhcp || COPTS+=" -DNO_DHCP"
use ipv6 || COPTS+=" -DNO_IPV6"
use dbus && COPTS+=" -DHAVE_DBUS"
use idn  && COPTS+=" -DHAVE_IDN"
}

src_compile() {
emake \
PREFIX=/usr \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
COPTS="${COPTS}" \
all$(use nls && echo "-i18n") || die
}

src_install() {
emake \
PREFIX=/usr \
MANDIR=/usr/share/man \
DESTDIR="${D}" \
install$(use nls && echo "-i18n") || die

dodoc CHANGELOG FAQ
dohtml *.html

newinitd "${FILESDIR}"/dnsmasq-init dnsmasq
newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq
insinto /etc
newins dnsmasq.conf.example dnsmasq.conf

if use dbus ; then
insinto /etc/dbus-1/system.d
doins dbus/dnsmasq.conf
fi

systemd_dounit "${FILESDIR}/dnsmasq.service"
systemd_dounit "${FILESDIR}/dnsmasq.socket"
use dhcp && systemd_dounit "${FILESDIR}/dnsmasq-dhcp.socket"
use tftp && systemd_dounit "${FILESDIR}/dnsmasq-tftp.socket"
}

pkg_postinst(){
einfo "We have installed systemd unit files.If you're using systemd, 
enable dnsmasq with"

[systemd-devel] [ PATCH-v2 ] dnsmasq ebuild and unit files for dnsmasq

2011-05-21 Thread microcai
Heya,

Here is the 2nd version.

Split the DHCP and TFTP socket and use Servie=dnsmasq.servie to point to
dnsmasq.

Add einfo to the user tell then how to do with the socket unit files.

both DNS and tftp have been test. I haven't test DHCP activation,  But I
think it will works.

CC systemd for other people to review the socket unit files.

Thanks.

# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57.ebuild,v 1.6 
2011/04/16 18:23:07 armin76 Exp $

EAPI=2

inherit eutils toolchain-funcs flag-o-matic systemd systemd-local

MY_P="${P/_/}"
MY_PV="${PV/_/}"
DESCRIPTION="Small forwarding DNS server"
HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/";
SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma";

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ~ppc64 s390 sh sparc x86 
~sparc-fbsd ~x86-fbsd"
IUSE="dbus +dhcp idn ipv6 nls tftp systemd"

RDEPEND="dbus? ( sys-apps/dbus )
idn? ( net-dns/libidn )
nls? (
sys-devel/gettext
net-dns/libidn
)
systemd? (
>=sys-apps/systemd-26
)
"

DEPEND="${RDEPEND}
dev-util/pkgconfig
|| ( app-arch/xz-utils app-arch/lzma-utils )"

S="${WORKDIR}/${PN}-${MY_PV}"

src_prepare() {
# dnsmasq on FreeBSD wants the config file in a silly location, this 
fixes
epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
use systemd && epatch "${FILESDIR}/${P}-systemd.patch"
}

src_configure() {
COPTS=""
use tftp || COPTS+=" -DNO_TFTP"
use dhcp || COPTS+=" -DNO_DHCP"
use ipv6 || COPTS+=" -DNO_IPV6"
use dbus && COPTS+=" -DHAVE_DBUS"
use idn  && COPTS+=" -DHAVE_IDN"
}

src_compile() {
emake \
PREFIX=/usr \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
COPTS="${COPTS}" \
all$(use nls && echo "-i18n") || die
}

src_install() {
emake \
PREFIX=/usr \
MANDIR=/usr/share/man \
DESTDIR="${D}" \
install$(use nls && echo "-i18n") || die

dodoc CHANGELOG FAQ
dohtml *.html

newinitd "${FILESDIR}"/dnsmasq-init dnsmasq
newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq
insinto /etc
newins dnsmasq.conf.example dnsmasq.conf

if use dbus ; then
insinto /etc/dbus-1/system.d
doins dbus/dnsmasq.conf
fi

if use systemd ; then
doservices "${FILESDIR}/dnsmasq.service"
doservices "${FILESDIR}/dnsmasq.socket"
doservices "${FILESDIR}/dnsmasq-dhcp.socket"
doservices "${FILESDIR}/dnsmasq-tftp.socket"
fi
}

pkg_postinst(){
if use systemd ; then
einfo "You have enabled systemd use flag, enable dnsmasq with "
einfo "systemctl enable dnsmasq.socket"
einfo "If you want to enable dhcp and ftp support in ${PN}, 
don't forget to run "
einfo "systemctl enable dnsmasq-dhcp.socket "
einfo "and"
einfo "systemctl enable dnsmasq-tftp.socket"
einfo "When you enable it in the configure file"
fi
}

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=dnsmasq
After=syslog.socket

[Service]
StandardOutput=syslog
StandardError=syslog

ExecStart=/usr/sbin/dnsmasq -d -k 

[Unit]
Description=dnsmasq socket

[Socket]

BindIPv6Only=ipv6-only

#DNS
ListenDatagram=0.0.0.0:53
ListenStream=0.0.0.0:53
ListenDatagram=[::]:53
ListenStream=[::]:53

#DHCP uncomment this to use dhcp 
#ListenDatagram=0.0.0.0:67
#ListenDatagram=[::]:67

#TFTP, uncomment this to have tftp support
#ListenDatagram=[::]:69
#ListenDatagram=0.0.0.0:69

[Install]
WantedBy=sockets.target
[Unit]
Description=dnsmasq DHCP mode socket

[Socket]

BindIPv6Only=ipv6-only


ListenDatagram=0.0.0.0:67
ListenDatagram=[::]:67

Service=dnsmasq.service

[Install]
WantedBy=sockets.target
[Unit]
Description=dnsmasq tftp mode socket

[Socket]

BindIPv6Only=ipv6-only


#TFTP, uncomment this to have tftp support
ListenDatagram=[::]:69
ListenDatagram=0.0.0.0:69

Service=dnsmasq.service

[Install]
WantedBy=sockets.target


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


Re: [systemd-devel] [ANNOUNCE] systemd 27

2011-05-21 Thread microcai
于 2011年05月22日 04:09, Henry Gebhardt 写道:
> On Sat, May 21, 2011 at 06:48:35PM +0200, Henry Gebhardt wrote:
>> On Sat, May 21, 2011 at 09:25:52PM +0800, microcai wrote:
>>> 于 2011年05月21日 20:44, Kay Sievers 写道:
>>>> On Sat, May 21, 2011 at 14:39, Lennart Poettering
>>>>  wrote:
>>>>>
>>>>> Can you provide a backtrace?
>>>>
>>>> systemd 27 works fine here, the tab-completion too. Seems more like a
>>>> local problem.
>>>>
>>>> Kay
>>>
>>>
>>>
>>> Here is the core dump
>>>
>>
>> And here is mine, with a few more symbols:
> 
> Sorry, the dbus symbols were not there, so here is one also with them:
> 
> (gdb) bt
> #0  0x7f6d7094537b in raise () from /lib64/libpthread.so.0
> #1  0x00409acb in crash (sig=6) at src/main.c:121
> #2  
> #3  0x7f6d6fba8935 in raise () from /lib64/libc.so.6
> #4  0x7f6d6fba9db6 in abort () from /lib64/libc.so.6
> #5  0x7f6d70ba0795 in _dbus_abort () at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-sysdeps.c:94
> #6  0x7f6d70b8e815 in _dbus_warn_check_failed (
> format=0x7f6d70ba7f70 "Array or variant type requires that type %s be 
> written, but %s was written.\nThe overall signature expected here was '%s' 
> and we are on byte %d of that signature.\n")
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-internals.c:289
> #7  0x7f6d70b72b81 in write_or_verify_typecode (writer= out>, typecode=120)
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-marshal-recursive.c:1718
> #8  0x7f6d70b745dc in _dbus_type_writer_write_basic 
> (writer=0x7fffa8bf8210, type=120, value=0x7fffa8bf8158)
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-marshal-recursive.c:2314
> #9  0x7f6d70b79fa6 in dbus_message_iter_append_basic 
> (iter=0x7fffa8bf8200, type=120, value=0x7fffa8bf8158)
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-message.c:2596
> #10 0x004591de in bus_property_append_long (i=, 
> property=, 
> data=) at src/dbus-common.c:580
> #11 0x00459792 in bus_default_message_handler (c=0x2343d60, 
> message=0x230fa20, 
> introspection=0x489cf8 " Object Introspection 
> 1.0//EN\"\n\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\";>\n\n
>  \n"..., 
> interfaces=, properties=) at 
> src/dbus-common.c:343
> #12 0x004478d7 in bus_socket_message_handler (u=0x222f1a0, 
> c=0x2343d60, message=0x230fa20) at src/dbus-socket.c:119
> #13 0x00441be8 in bus_unit_message_dispatch (connection=0x2343d60, 
> message=0x230fa20, data=)
> at src/dbus-unit.c:395
> #14 bus_unit_message_handler (connection=0x2343d60, message=0x230fa20, 
> data=) at src/dbus-unit.c:570
> #15 0x7f6d70b7ff0c in _dbus_object_tree_dispatch_and_unlock 
> (tree=0x23097e0, message=0x230fa20)
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-object-tree.c:858
> #16 0x7f6d70b69dde in dbus_connection_dispatch (connection=0x2343d60)
> at 
> /var/tmp/portage/sys-apps/dbus-1.4.8-r1/work/dbus-1.4.8/dbus/dbus-connection.c:4688
> #17 0x0043d1ca in bus_dispatch (m=0x21d6350) at src/dbus.c:547
> #18 0x00411bbd in manager_loop (m=0x21d6350) at src/manager.c:2384
> #19 0x0040ab78 in main (argc=, argv= optimized out>) at src/main.c:1277
> 
> I am not finding the message in syslog that apparently is printed by #6
> above. Where can I find it/How can I enable it?
> 

Thanks for the test.



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


Re: [systemd-devel] [ANNOUNCE] systemd 27

2011-05-21 Thread microcai
于 2011年05月22日 00:07, Henry Gebhardt 写道:
> On Sat, May 21, 2011 at 08:53:14PM +0800, microcai wrote:
>> 于 2011年05月21日 20:44, Kay Sievers 写道:
>>> On Sat, May 21, 2011 at 14:39, Lennart Poettering
>>>  wrote:
>>>> On Sat, 21.05.11 15:22, microcai (micro...@fedoraproject.org) wrote:
>>>>>
>>>>>
>>>>> No, NO, NO! Don't use the release.
>>>>>
>>>>> It's totally unstable. do some systemctl  stuff, systemd crashed.
>>>>
>>>> Hmm?
>>>>
>>>> In which way?
>>>>
>>>> Can you provide a backtrace?
>>>
>>> systemd 27 works fine here, the tab-completion too. Seems more like a
>>> local problem.
>>
>> Try more times. say, 100 times. systemd will crash eventually.
>>
> 
> It only crashes with a socket, e.g. "systemctl status sshd.socket", even
> without tab-completion. The log message is:
> 
> May 21 17:30:23 bimsstein kernel: [   22.144845] systemd[1]: Got D-Bus 
> request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus
> May 21 17:30:23 bimsstein kernel: [   22.144864] systemd[1]: Running GC...
> May 21 17:30:23 bimsstein kernel: [   22.144879] systemd[1]: Got D-Bus 
> request: org.freedesktop.systemd1.Manager.LoadUnit() on 
> /org/freedesktop/systemd1
> May 21 17:30:23 bimsstein kernel: [   22.145347] systemd[1]: Got D-Bus 
> request: org.freedesktop.DBus.Properties.GetAll() on 
> /org/freedesktop/systemd1/unit/sshd_2esocket
> May 21 17:30:23 bimsstein kernel: [   22.187371] systemd[1]: Caught , 
> dumped core as pid 555.
> May 21 17:30:23 bimsstein kernel: [   22.187398] systemd[1]: Freezing 
> execution.
> 
> A manual bisect revealed it happens since commit 916abb "socket: add
> POSIX mqueue support". My core dump doesn't have any symbol names at
> all.
> 
> Another symptome to mention is that when it occurs, it changes from X to
> the console.
> 
> HTH,
> 
> Henry


Yes!!Yes! Exactly What I Face.



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


Re: [systemd-devel] [ANNOUNCE] systemd 27

2011-05-21 Thread microcai
于 2011年05月21日 20:44, Kay Sievers 写道:
> On Sat, May 21, 2011 at 14:39, Lennart Poettering
>  wrote:
>> On Sat, 21.05.11 15:22, microcai (micro...@fedoraproject.org) wrote:
>>
>>>> Ludwig Nussel (1):
>>>>   sysctl: apply /etc/sysctl.conf last
>>>>
>>>> Michael Olbrich (1):
>>>>   build-sys: create dbussystemservicedir
>>>>
>>>> Miklos Vajna (1):
>>>>   units: Enable plymouth for Frugalware
>>>>
>>>> Paul Menzel (1):
>>>>   util: include `stdarg.h`
>>>>
>>>> Lennart
>>>>
>>>
>>>
>>> No, NO, NO! Don't use the release.
>>>
>>> It's totally unstable. do some systemctl  stuff, systemd crashed.
>>
>> Hmm?
>>
>> In which way?
>>
>> Can you provide a backtrace?
> 
> systemd 27 works fine here, the tab-completion too. Seems more like a
> local problem.
> 
> Kay



Here is the core dump

---CUT HERE-
(gdb) bt
#0  0x003001e0edc0 in __pause_nocancel () from /lib64/libpthread.so.0
#1  0x0045b0fb in ?? ()
#2  0x00409ab0 in ?? ()
#3  
#4  0x003001632935 in raise () from /lib64/libc.so.6
#5  0x003001633db6 in abort () from /lib64/libc.so.6
#6  0x7fd41041b47c in ?? () from /usr/lib64/libdbus-1.so.3
#7  0x7fd41041474d in ?? () from /usr/lib64/libdbus-1.so.3
#8  0x7fd410405ac2 in ?? () from /usr/lib64/libdbus-1.so.3
#9  0x7fd4104067a9 in ?? () from /usr/lib64/libdbus-1.so.3
#10 0x7fd410409b89 in dbus_message_iter_append_basic ()
   from /usr/lib64/libdbus-1.so.3
#11 0x00450137 in ?? ()
#12 0x00450626 in ?? ()
#13 0x004401a3 in ?? ()
#14 0x0043a577 in ?? ()
#15 0x7fd41040cd59 in ?? () from /usr/lib64/libdbus-1.so.3
#16 0x7fd410401646 in dbus_connection_dispatch ()
   from /usr/lib64/libdbus-1.so.3
#17 0x0043651b in ?? ()
#18 0x0041073a in ?? ()
#19 0x0040ad48 in ?? ()
#20 0x00300161eebd in __libc_start_main () from /lib64/libc.so.6
---Type  to continue, or q  to quit---
#21 0x00408ae9 in ?? ()
#22 0x7fffd1b5ea38 in ?? ()
#23 0x001c in ?? ()
#24 0x000a in ?? ()
#25 0x7fffd1b5ff1e in ?? ()
#26 0x7fffd1b5ff2b in ?? ()
#27 0x7fffd1b5ff37 in ?? ()
#28 0x7fffd1b5ff3c in ?? ()
#29 0x7fffd1b5ff49 in ?? ()
#30 0x7fffd1b5ff58 in ?? ()
#31 0x7fffd1b5ff61 in ?? ()
#32 0x7fffd1b5ff6d in ?? ()
#33 0x7fffd1b5ff7d in ?? ()
#34 0x7fffd1b5ff8b in ?? ()
#35 0x in ?? ()





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


Re: [systemd-devel] [ANNOUNCE] systemd 27

2011-05-21 Thread microcai
于 2011年05月21日 20:44, Kay Sievers 写道:
> On Sat, May 21, 2011 at 14:39, Lennart Poettering
>  wrote:
>> On Sat, 21.05.11 15:22, microcai (micro...@fedoraproject.org) wrote:
>>
>>>> Ludwig Nussel (1):
>>>>   sysctl: apply /etc/sysctl.conf last
>>>>
>>>> Michael Olbrich (1):
>>>>   build-sys: create dbussystemservicedir
>>>>
>>>> Miklos Vajna (1):
>>>>   units: Enable plymouth for Frugalware
>>>>
>>>> Paul Menzel (1):
>>>>   util: include `stdarg.h`
>>>>
>>>> Lennart
>>>>
>>>
>>>
>>> No, NO, NO! Don't use the release.
>>>
>>> It's totally unstable. do some systemctl  stuff, systemd crashed.
>>
>> Hmm?
>>
>> In which way?
>>
>> Can you provide a backtrace?
> 
> systemd 27 works fine here, the tab-completion too. Seems more like a
> local problem.

Try more times. say, 100 times. systemd will crash eventually.

> 
> Kay




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


Re: [systemd-devel] [ANNOUNCE] systemd 27

2011-05-21 Thread microcai
于 2011年05月20日 08:09, Lennart Poettering 写道:
> Heya!
> 
> http://www.freedesktop.org/software/systemd/systemd-27.tar.bz2
> 
> Nothing too fancy. But a few new features.
> 
> Kay Sievers (4):
>   binfmt, modules-load, sysctl, tmpfiles: read /usr/local/lib and where 
> appropriate /lib directories
>   binfmt, modules-load, sysctl, tmpfiles: add missing 
> ConditionDirectoryNotEmpty=
>   sysctl: correct /usr/local/lib path
>   update TODO
> 
> Koen Kooi (2):
>   build-sys: Angstrom support
>   systemd-analyze: print hostname, kernelversion and arch at the top of 
> the plot
> 
> Lennart Poettering (21):
>   units: enable automount units only if the kernel supports them
>   update TODO
>   update TODO
>   vconsole: use open_terminal() instead of open()
>   unit: make ignoring in snapshots a per unit property, instead of a per 
> unit type property
>   user-sessions: ignore EROFS when unlinking /etc/nologin if the file 
> doesn't exist anyway
>   hostnamed: SetPrettyHostname() should check PK action 
> org.freedesktop.hostname1.set-static-hostname
>   pam: downgrade a few log msgs
>   update TODO
>   hostnamed: check that nss-myhostname is installed
>   README: document relation to nss-myhostname
>   socket: add POSIX mqueue support
>   socket: use 666 socket mode by default since neither fifos, nor 
> sockets, nor mqueues need to be executable
>   exec: hangup/reset/deallocate VTs in gettys
>   socket: expose IP_TRANSPARENT
>   exec: expose tty reset options in dbus introspection data
>   git: add .mailmap
>   socket: expose SO_BROADCAST
>   util: use open_terminal() in chvt() too
>   update TODO
>   build-sys: prepare new release 27
> 
> Ludwig Nussel (1):
>   sysctl: apply /etc/sysctl.conf last
> 
> Michael Olbrich (1):
>   build-sys: create dbussystemservicedir
> 
> Miklos Vajna (1):
>   units: Enable plymouth for Frugalware
> 
> Paul Menzel (1):
>   util: include `stdarg.h`
> 
> Lennart
> 


No, NO, NO! Don't use the release.

It's totally unstable. do some systemctl  stuff, systemd crashed.




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


Re: [systemd-devel] udev took too long to start

2011-05-20 Thread microcai
于 2011年05月21日 00:50, Harald Hoyer 写道:
> Am 20.05.2011 18:49, schrieb microcai:
>> 于 2011年05月20日 23:35, Kay Sievers 写道:
>>> On Fri, May 20, 2011 at 17:32, microcai 
>>> wrote:
>>>
>>>> Now I've full relized that, the problem is fsck-root.service.
>>>>
>>>> udev.service stay idle as soon as fsck-root.service exit.
>>>>
>>>> It is fsck-root.service that took so long to do the job.
>>>
>>> Check that the clock is right, that rtc is set by the kernel:
>>>[0.851573] rtc_cmos 00:07: setting system clock to 2011-05-20
>>> 15:24:49 UTC (1305905089)
>>>
>>> so that fsck does not think it needs to check?
>>>
>>> Kay
>>
>> It's some kinds wired strange.
>>
>> When I disable readahead, fsck-root.service done in less than 1s.
>>
>> But when I enable readahead, fsck-root.service took more thatn 8s to
>> finish.
>>
>> It's that strange?
> 
> No.. it isn't... both do heavy I/O and share the same slow disk :)

No, I've change the fsck-root.service to use /sbin/fsck -p /dev/sda2
directly

systemd-anaylz shows that systemd started fsck-root.service very early.

But I notice fsck's  ouput only at the end of the boot process.

Wired strange thing!

It means, fsck speed 8s more to initialize it self!

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




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


Re: [systemd-devel] udev took too long to start

2011-05-20 Thread microcai
于 2011年05月20日 23:35, Kay Sievers 写道:
> On Fri, May 20, 2011 at 17:32, microcai  wrote:
> 
>> Now I've full relized that, the problem is fsck-root.service.
>>
>> udev.service stay idle as soon as fsck-root.service exit.
>>
>> It is fsck-root.service that took so long to do the job.
> 
> Check that the clock is right, that rtc is set by the kernel:
>   [0.851573] rtc_cmos 00:07: setting system clock to 2011-05-20
> 15:24:49 UTC (1305905089)
> 
> so that fsck does not think it needs to check?
> 
> Kay

It's some kinds wired strange.

When I disable readahead, fsck-root.service done in less than 1s.

But when I enable readahead, fsck-root.service took more thatn 8s to finish.

It's that strange?



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


Re: [systemd-devel] udev took too long to start

2011-05-20 Thread microcai
于 2011年05月20日 12:10, microcai 写道:
> 于 2011年05月20日 18:39, Lennart Poettering 写道:
>> On Fri, 20.05.11 17:40, Chen Jie (ch...@lemote.com) wrote:
>>
>>> 2011/5/19 Chen Jie :
>>>> 2011/5/18 Kay Sievers :
>>>>>
>>>>> Completely different! That's an Intel Core Duo 1.4 GHz laptop:
>>>>>  systemd-analyze blame | grep udev
>>>>>  87ms udev-trigger.service
>>>>>  13ms udev.service
>>>> I updated systemd(to v26) and udev(to 168), still got ~1s startup time
>>>> of udev.service plus udev-trigger.service.
>>>>
>>>> May be some distribution added udev rules cause this? I'll do a
>>>> bootchart to see the detail.
>>> See the attachment.
>>
>> There are a ton of things udev seems to be calling. A lot of it doesn't
>> look right. i.e. systemctl being called from udev doesn't look
>> right. And ps? grep? hdparm?? sync??? alsa-utils looks wrong too? mount?
>>
>> The exim script looks really borked too. And the mkdir/rm sprinkled
>> around dbus/rsyslog is suspicous too.
>>
>> I think the distro you are using is a bit too hack-happy... Your
>> downstream udev maintainers really should spend some time on cleaning up
>> those udev rules. Upstream udev doesn't ship that nonsense!
>>
>> Lennart
>>
> 
> 
> 
> Thanks ALL ~~~
> 
> My system now boots faster ~~~
> 
> See my new system boot time as attachment.
> 
> cairo.SVGSurface have problem here, so I change it to PDFSurface.
> 
> 
> 

Wait a second here!

udev.service slow down again~~~


Now I've full relized that, the problem is fsck-root.service.

udev.service stay idle as soon as fsck-root.service exit.

It is fsck-root.service that took so long to do the job.

Seems fsck always did a full check on /. Does systemd have a bug when
umount / @ shutdown?




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


Re: [systemd-devel] Problems with setting up systemd

2011-05-20 Thread microcai
于 2011年05月20日 21:57, Kay Sievers 写道:
> On Fri, May 20, 2011 at 15:34, Gustavo Sverzut Barbieri
>  wrote:
>> On Fri, May 20, 2011 at 10:15 AM, Kay Sievers  wrote:
>>>
>>> On Fri, May 20, 2011 at 13:56, Maciej Piechotka  
>>> wrote:
>>>
 # systemctl enable hwclock-load.service
 Cannot link /lib64/systemd/system/hwclock-load.service
>>>
>>> Yikes, please fix that before trying anything else. And please hit the
>>> misguided Gentoo folks with a cluebat. :)
>>>
>>> There is never ever a valid /lib64/systemd/ for any service files on
>>> any system. /lib64 is for shared object only!
>>
>> It should be a link anyway:
>>
>> gustavo@solid ~ $ ls -l /lib
>> lrwxrwxrwx 1 root root 5 Mar 20 14:49 /lib -> lib64
> 
> *Should* does not matter. It's well defined and expected to be /lib.
> No way around that.
> 
> It's completely broken what you are doing there. Same nonsense that
> Gentoo is doing with udev, No! support for that broken stuff. Please
> fix it.

Yes, I ripout the Gentoo patch for udev, and udev now start up quickly.

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




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


Re: [systemd-devel] Problems with setting up systemd

2011-05-20 Thread microcai
于 2011年05月20日 21:15, Kay Sievers 写道:
> On Fri, May 20, 2011 at 13:56, Maciej Piechotka  wrote:
> 
>> # systemctl enable hwclock-load.service
>> Cannot link /lib64/systemd/system/hwclock-load.service
> 
> Yikes, please fix that before trying anything else. And please hit the
> misguided Gentoo folks with a cluebat. :)
> 
> There is never ever a valid /lib64/systemd/ for any service files on
> any system. /lib64 is for shared object only!

Kay, it is you and lennart that make systemdunit dir configurable.

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




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


Re: [systemd-devel] udev took too long to start

2011-05-20 Thread microcai
于 2011年05月20日 18:39, Lennart Poettering 写道:
> On Fri, 20.05.11 17:40, Chen Jie (ch...@lemote.com) wrote:
> 
>> 2011/5/19 Chen Jie :
>>> 2011/5/18 Kay Sievers :

 Completely different! That's an Intel Core Duo 1.4 GHz laptop:
  systemd-analyze blame | grep udev
  87ms udev-trigger.service
  13ms udev.service
>>> I updated systemd(to v26) and udev(to 168), still got ~1s startup time
>>> of udev.service plus udev-trigger.service.
>>>
>>> May be some distribution added udev rules cause this? I'll do a
>>> bootchart to see the detail.
>> See the attachment.
> 
> There are a ton of things udev seems to be calling. A lot of it doesn't
> look right. i.e. systemctl being called from udev doesn't look
> right. And ps? grep? hdparm?? sync??? alsa-utils looks wrong too? mount?
> 
> The exim script looks really borked too. And the mkdir/rm sprinkled
> around dbus/rsyslog is suspicous too.
> 
> I think the distro you are using is a bit too hack-happy... Your
> downstream udev maintainers really should spend some time on cleaning up
> those udev rules. Upstream udev doesn't ship that nonsense!
> 
> Lennart
> 



Thanks ALL ~~~

My system now boots faster ~~~

See my new system boot time as attachment.

cairo.SVGSurface have problem here, so I change it to PDFSurface.





systemd-boot.pdf
Description: Adobe PDF document


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


Re: [systemd-devel] udev took too long to start

2011-05-20 Thread microcai
于 2011年05月20日 17:40, Chen Jie 写道:
> 2011/5/19 Chen Jie :
>> 2011/5/18 Kay Sievers :
>>>
>>> Completely different! That's an Intel Core Duo 1.4 GHz laptop:
>>>  systemd-analyze blame | grep udev
>>>  87ms udev-trigger.service
>>>  13ms udev.service
>> I updated systemd(to v26) and udev(to 168), still got ~1s startup time
>> of udev.service plus udev-trigger.service.
>>
>> May be some distribution added udev rules cause this? I'll do a
>> bootchart to see the detail.
> See the attachment.
> 

Can't beleve that 龙芯 boots faster than my AMD machine ~~~

There must be something wrong in my kernel.

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




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


Re: [systemd-devel] How to do IP_TRANSPARENT on socket? squid need that

2011-05-19 Thread microcai
于 2011年05月19日 20:43, Lennart Poettering 写道:
> On Thu, 19.05.11 20:41, microcai (micro...@fedoraproject.org) wrote:
> 
>> 于 2011年05月19日 19:25, microcai 写道:
>>> 于 2011年05月19日 19:23, Lennart Poettering 写道:
>>>> On Thu, 19.05.11 18:54, microcai (micro...@fedoraproject.org) wrote:
>>>>
>>>>> Heya:
>>>>>
>>>>> Yesterday, I ported dnsmasq to systemd.
>>>>> Now,  it's squid.
>>>>>
>>>>> Almost done now, but transparent support should not be enabled,
>>>>> otherwise squid will not be able to process request.
>>>>>
>>>>> But I want this feature back.
>>>>>
>>>>> So, is there an option to set IP_TRANSPARENT on the listen socket ?
>>>>
>>>> Yes, there is now. Just added it for you in git. ;-)
>>>
>>> Wow, Thanks !
>>>
>>>>
>>>> Transparent=yes in the .socket unit.
>>>>
>>>> Lennart
>>>>
>>>
>>>
>>
>> Works now.
>>
>> By the way, can I set Transparent on specific socket, not for all? ;)
> 
> No, right now the socket options you place in a socket file apply to all
> sockets spcified therein. If you want different socket options you can
> split up the socket file into to, and use Service= to redirect both to
> the same service unit.

Wow ! Thanks ! Works perfectly now!

> 
> Lennart
> 




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


Re: [systemd-devel] How to do IP_TRANSPARENT on socket? squid need that

2011-05-19 Thread microcai
于 2011年05月19日 19:25, microcai 写道:
> 于 2011年05月19日 19:23, Lennart Poettering 写道:
>> On Thu, 19.05.11 18:54, microcai (micro...@fedoraproject.org) wrote:
>>
>>> Heya:
>>>
>>> Yesterday, I ported dnsmasq to systemd.
>>> Now,  it's squid.
>>>
>>> Almost done now, but transparent support should not be enabled,
>>> otherwise squid will not be able to process request.
>>>
>>> But I want this feature back.
>>>
>>> So, is there an option to set IP_TRANSPARENT on the listen socket ?
>>
>> Yes, there is now. Just added it for you in git. ;-)
> 
> Wow, Thanks !
> 
>>
>> Transparent=yes in the .socket unit.
>>
>> Lennart
>>
> 
> 

Works now.

By the way, can I set Transparent on specific socket, not for all? ;)

Any way. It works. Thanks.



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


Re: [systemd-devel] How to do IP_TRANSPARENT on socket? squid need that

2011-05-19 Thread microcai
于 2011年05月19日 19:23, Lennart Poettering 写道:
> On Thu, 19.05.11 18:54, microcai (micro...@fedoraproject.org) wrote:
> 
>> Heya:
>>
>> Yesterday, I ported dnsmasq to systemd.
>> Now,  it's squid.
>>
>> Almost done now, but transparent support should not be enabled,
>> otherwise squid will not be able to process request.
>>
>> But I want this feature back.
>>
>> So, is there an option to set IP_TRANSPARENT on the listen socket ?
> 
> Yes, there is now. Just added it for you in git. ;-)

Wow, Thanks !

> 
> Transparent=yes in the .socket unit.
> 
> Lennart
> 




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


[systemd-devel] How to do IP_TRANSPARENT on socket? squid need that

2011-05-19 Thread microcai
Heya:

Yesterday, I ported dnsmasq to systemd.
Now,  it's squid.

Almost done now, but transparent support should not be enabled,
otherwise squid will not be able to process request.

But I want this feature back.

So, is there an option to set IP_TRANSPARENT on the listen socket ?






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


Re: [systemd-devel] [bug?] screen not working correctly under systemd

2011-05-19 Thread microcai
于 2011年05月19日 15:49, Marius Tolzmann 写道:
> hi..
> 
> may be the complete session of the user gets killed after logout..
> 
> to prevent this i have set
> 
> session required pam_systemd.so create-session=1 kill-user=0 kill-session=0
> 
> in my PAM config.. see pam_systemd(8) ..
> 
> so screen sessions do continue to run after logout here..
> 
> bye m.

Oh, Thanks !

> 
> On 05/19/11 08:47, microcai wrote:
>> When you ssh to an systemd machine, and start a screen session, detach
>> and logout.
>>
>> Then this screen session will be wipe out by systemd, so , when you
>> login back, there will be no screen session out there.
>>
>> Is this a bug? of screen or systemd?
> 
> 




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


Re: [systemd-devel] [bug?] screen not working correctly under systemd

2011-05-19 Thread microcai
于 2011年05月19日 15:10, Michał Piotrowski 写道:
> W dniu 19 maja 2011 09:05 użytkownik microcai
>  napisał:
>> 于 2011年05月19日 14:50, Michał Piotrowski 写道:
>>> Hi,
>>>
>>> 2011/5/19 microcai :
>>>> When you ssh to an systemd machine, and start a screen session, detach
>>>> and logout.
>>>>
>>>> Then this screen session will be wipe out by systemd, so , when you
>>>> login back, there will be no screen session out there.
>>>
>>> Works fine here - I use F15. systemd v26
>>
>> I guess you use sshd.service, not sshd.socket.
>>
>> Fedora not using native systemd unit files.
> 
> I've got a native ssh service

No, You should use sshd.socket , not sshd.service.

Problems solved by using PAM and move screen to another cgroups.

Thanks anyway.


> 
> [Unit]
> Description=OpenSSH server daemon
> After=syslog.target network.target
> 
> [Service]
> Type=forking
> ExecStart=/usr/sbin/sshd
> 
> [Install]
> WantedBy=multi-user.target
> 
>> Only Gentoo with systemd overlay does. :)
> 
> I have a few extra services that was not submited to
> https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/compatability
> :)
> 
>>
>>>
>>>>
>>>>
>>>> Is this a bug? of screen or systemd?
>>>>
>>>>
>>>>
>>>> ___
>>>> systemd-devel mailing list
>>>> systemd-devel@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
> 
> 
> 




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


Re: [systemd-devel] [bug?] screen not working correctly under systemd

2011-05-19 Thread microcai
于 2011年05月19日 14:50, Michał Piotrowski 写道:
> Hi,
> 
> 2011/5/19 microcai :
>> When you ssh to an systemd machine, and start a screen session, detach
>> and logout.
>>
>> Then this screen session will be wipe out by systemd, so , when you
>> login back, there will be no screen session out there.
> 
> Works fine here - I use F15. systemd v26

I guess you use sshd.service, not sshd.socket.

Fedora not using native systemd unit files.
Only Gentoo with systemd overlay does. :)

> 
>>
>>
>> Is this a bug? of screen or systemd?
>>
>>
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>>
> 
> 
> 




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


[systemd-devel] [bug?] screen not working correctly under systemd

2011-05-18 Thread microcai
When you ssh to an systemd machine, and start a screen session, detach
and logout.

Then this screen session will be wipe out by systemd, so , when you
login back, there will be no screen session out there.


Is this a bug? of screen or systemd?




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


Re: [systemd-devel] udev took too long to start

2011-05-18 Thread microcai
于 2011年05月19日 13:24, Canek Peláez Valdés 写道:
> On Wed, May 18, 2011 at 11:58 PM, microcai  wrote:
>> 于 2011年05月18日 21:59, Canek Peláez Valdés 写道:
>>> On Wed, May 18, 2011 at 5:14 AM, microcai  
>>> wrote:
>>> [...]
>>>> I'm not saying to rip-out udev, but speed up the udev.
>>>
>>> It's probably not udev fault, but a udev rule in Gentoo (I suppose you
>>> use Gentoo, you mentioned an overlay) that calls an OpenRC script.
>>> That slows down the whole boot for whole minutes sometimes.
>>
>> No, I use bootchard to monitor the whole boot sequence,
>> the only process get spawned by udev is modprobe.
>>
>> It just slow for no reason.
> 
> Did you try booting with /etc/init.d renamed? Bootchart can be funny 
> sometimes.

Yes, remove /etc/init.d , but udev still takes long time.

> 
> Regards.




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


Re: [systemd-devel] udev took too long to start

2011-05-18 Thread microcai
于 2011年05月18日 21:59, Canek Peláez Valdés 写道:
> On Wed, May 18, 2011 at 5:14 AM, microcai  wrote:
> [...]
>> I'm not saying to rip-out udev, but speed up the udev.
> 
> It's probably not udev fault, but a udev rule in Gentoo (I suppose you
> use Gentoo, you mentioned an overlay) that calls an OpenRC script.
> That slows down the whole boot for whole minutes sometimes.

No, I use bootchard to monitor the whole boot sequence,
the only process get spawned by udev is modprobe.

It just slow for no reason.

> 
> Usual suspects are bluez and NetworkManager (although I think the
> later was patched in the systemd overlay). A quick test consist on
> renaming /etc/init.d to any other name, and try booting that way. If
> it's considerable faster, then some udev rule is calling an OpenRC
> script.
> 
> Regards.




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


Re: [systemd-devel] RFC , dnsmasq patch

2011-05-18 Thread microcai
于 2011年05月19日 01:48, Lennart Poettering 写道:
> On Thu, 19.05.11 01:43, microcai (micro...@fedoraproject.org) wrote:
> 
>> Heya,
>>
>> Here is the patch for dnsmasq to support systemd socket activation. Just
>> put it here for you guys to review before submitting to upstream.
>>
>> Is it good? Or just ugly ?
> 
> Looks pretty much correct. Of course, I haven't tested this, and don't
> know the dnsmasq source code, but to me the patch looks alright.

Oh, Thanks ;). I thought it was not correct this way. ;)

> 
> (Uses C99 stuff though, i.e. variable declarations after code, and //
> comments. Might not be acceptable upstream as is)

I must follow the dnsmasq's coding style. They don't use C99.

> 
> Thanks,
> 
> Lennart
> 




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


[systemd-devel] RFC , dnsmasq patch

2011-05-18 Thread microcai
Heya,

Here is the patch for dnsmasq to support systemd socket activation. Just
put it here for you guys to review before submitting to upstream.

Is it good? Or just ugly ?


For gentoo users, feel free to add my overlay here
https://github.com/microcai/myoverlay/raw/master/repo.xml


From: microcai 
Date: Thu, 19 May 2011 01:04:16 +0800
Subject: [PATCH] systemd socket patch

---
 Makefile|2 +-
 src/dhcp.c  |   10 ++
 src/dnsmasq.c   |   10 +-
 src/dnsmasq.h   |2 +
 src/network.c   |   16 ++
 src/sd-daemon.c |  439
+++
 src/sd-daemon.h |  265 +
 7 files changed, 738 insertions(+), 6 deletions(-)
 create mode 100644 src/sd-daemon.c
 create mode 100644 src/sd-daemon.h

diff --git a/Makefile b/Makefile
index 16c69e4..4cf9181 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ SUNOS_LIBS= `if uname | grep SunOS 2>&1 >/dev/null;
then echo -lsocket -lnsl -lp

 OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \
-   helper.o tftp.o log.o
+   helper.o tftp.o log.o sd-daemon.o

 all :
@cd $(SRC) && $(MAKE) \
diff --git a/src/dhcp.c b/src/dhcp.c
index 29ddf24..df5edd1 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -29,6 +29,16 @@ static int complete_context(struct in_addr local, int
if_index,

 static int make_fd(int port)
 {
+  int fd_base, listen_fds = sd_listen_fds(0);
+  // first check if systemd already did that for us
+  for( fd_base = 0 ; fd_base < listen_fds ; fd_base ++)
+  {
+  if (sd_is_socket_inet(fd_base + SD_LISTEN_FDS_START, PF_INET,
SOCK_DGRAM,0, port))
+{
+  return fd_base + SD_LISTEN_FDS_START;
+}
+  }
+
   int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
   struct sockaddr_in saddr;
   int oneopt = 1;
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 827b0dc..cd38cfe 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -126,11 +126,11 @@ int main (int argc, char **argv)
 }
 #endif

-  /* Close any file descriptors we inherited apart from std{in|out|err} */
-  for (i = 0; i < max_fd; i++)
-if (i != STDOUT_FILENO && i != STDERR_FILENO && i != STDIN_FILENO)
-  close(i);
-
+   if( sd_listen_fds(0) < 0){
+  /* Close any file descriptors we inherited apart from
std{in|out|err} */
+   for (i = 3 ; i < max_fd; i++)
+   close(i);
+   }
 #ifdef HAVE_LINUX_NETWORK
   netlink_init();
 #elif !(defined(IP_RECVDSTADDR) && \
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index a386a31..8d1b87f 100644
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -122,6 +122,8 @@ extern int capget(cap_user_header_t header,
cap_user_data_t data);
 #include 
 #endif

+#include "sd-daemon.h"
+
 /* daemon is function in the C library */
 #define daemon dnsmasq_daemon

diff --git a/src/network.c b/src/network.c
index 7b2e905..0b84b2d 100644
--- a/src/network.c
+++ b/src/network.c
@@ -362,6 +362,21 @@ static int make_sock(union mysockaddr *addr, int type)
 #ifdef HAVE_IPV6
   static int dad_count = 0;
 #endif
+  int fd_base, listen_fds = sd_listen_fds(0);
+  // first check if systemd already did that for us
+  for( fd_base = 0 ; fd_base < listen_fds ; fd_base ++)
+  {
+  int port = prettyprint_addr(addr, daemon->namebuff);
+
+  if (sd_is_socket_inet(fd_base + SD_LISTEN_FDS_START, family,
type, type==SOCK_STREAM? 1:0, port))
+{
+  fd = fd_base + SD_LISTEN_FDS_START;
+
+  if (type != SOCK_STREAM)
+goto setup;
+  return fd;
+}
+  }

   if ((fd = socket(family, type, 0)) == -1)
 {
@@ -412,6 +427,7 @@ static int make_sock(union mysockaddr *addr, int type)
   if (rc == -1)
 goto err;

+setup:
   if (type == SOCK_STREAM)
 {
   if (listen(fd, 5) == -1)
diff --git a/src/sd-daemon.c b/src/sd-daemon.c
new file mode 100644
index 000..47da2fd
--- /dev/null
+++ b/src/sd-daemon.c
@@ -0,0 +1,439 @@
+#ifndef _WIN32
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  Copyright 2010 Lennart Poettering
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO

Re: [systemd-devel] udev took too long to start

2011-05-18 Thread microcai
于 2011年05月18日 17:54, fykc...@gmail.com 写道:
> Hi,
> 
> udev.service doesn't include 'settle' action, it is simplely because
> udev starting/adding spends some time.
> 
> Many services depends on udev directly or indirectly, so the boot
> process is serialized when udev starting.
> 
> Currently, systemd is deeply integrated with udev, it was not easy to
> "First do coldplug stage which is not using udev, and then do hotplug
> later through udev".

I'm not saying to rip-out udev, but speed up the udev.

> 
> 
> 2011/5/18 microcai 
>>
>> OK, here is my problem:
>>
>>
>> udev and systemd are from systemd overlay.
>>
>> udev is udev-168-r1
>> systemd is systemd-26
>>
>> All compiled with CFLAGS="-Os -march=native"
>>
>> systemd-analyze plot have problem generationg SVG file, so I change the
>> code to make a PDF.
>>
>>
>> Will anyone please lookat my boot analyze PDF?
>>
>> Why udev took so long to settle down ?!
>>
>> Thanks.
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
> 
> 
> 
> --
> Regards,
> - cee1




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


[systemd-devel] udev took too long to start

2011-05-18 Thread microcai
OK, here is my problem:


udev and systemd are from systemd overlay.

udev is udev-168-r1
systemd is systemd-26

All compiled with CFLAGS="-Os -march=native"

systemd-analyze plot have problem generationg SVG file, so I change the
code to make a PDF.


Will anyone please lookat my boot analyze PDF?

Why udev took so long to settle down ?!

Thanks.


systemd-boot.pdf
Description: Adobe PDF document
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] device units rely on udev rules?

2011-05-09 Thread microcai
于 2011年05月10日 03:51, Koen Kooi 写道:
> 
> Op 9 mei 2011, om 21:43 heeft Lennart Poettering het volgende geschreven:
> 
>> On Mon, 09.05.11 11:53, Scott James Remnant (sc...@netsplit.com) wrote:
>>
>>> Another question I wasn't able to find an answer to in the documentation
>>> I've read so far.
>>>
>>> The use of device units seems to very much rely on udevd running on the
>>> system, and not only that, udev rules having been parsed for the device and
>>> a systemd tag "set" in the udevdb. udev obviously starts after systemd, and
>>> systemd starts after the kernel.
>>
>> Correct.
>>
>>> This means there are a large number of devices already known to the kernel
>>> at the point that systemd starts, especially if you build the drivers into
>>> the kernel for those devices. It's possible to get going straight away with
>>> those devices. But relying on udevd tagging them means you end up waiting
>>> around for udevd to start, and worse! since udevd doesn't apply rules to
>>> existing devices on startup, you have to wait around for "udevadm trigger"
>>> to be run.
>>
>> That's actually dead fast
> 
> It's still in the 10 second range on a 600MHz cortex-a8 machine booting from 
> an SD card. I need to dig out my 400MHz arm920t to see how long it takes 
> there. So having udev-less operation in systemd would be nice, even if it's 
> only used on 'embedded'

I had an ARM9  with Gentoo + systemd installed.

Systemd itself boot system in about 20s. But it tooks 10s+ to mount the
yaffs2 root fs. So, 30s+ to boot.

Hope this data will be useful to you.


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




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


Re: [systemd-devel] Parallel startup with sockets and without killing the machine?

2011-05-09 Thread microcai
于 2011年05月10日 00:10, Scott James Remnant 写道:
> Hey, I've been reading through the documentation on systemd and the Mailing
> List Archives and have had some questions, so I figured I'd post them here.
> These might be fairly complicated or unusual cases, and there may be no good
> answers now, and maybe no good answers ever, but I'd still like to get an
> idea of what you think.
ok, i'm trying to express.
> 
> First up, parallel startup using sockets.
> 
> We know that the theory of this goes something like this: you have a service
> that many other services and processes depend on, and connect to via a
> socket. Rather than manually express that dependency in the configuration,
> you instead have the socket created by the init daemon in advance. Now you
> simply start the service and all of the other services and processes
> together, and let the blocking nature of those sockets (or the software
> polling a non-blocking socket) sort out the ordering for you.
> 
> This seems to assume that it's a free cost to start a service or process and
> have it block on a socket. But that isn't true, to get to the point where it
> connects to the socket, that service or process first has to be loaded from
> disk, its shared libraries mapped and relocated, it probably has to do a
> bunch of initialization including reading its own configuration files, etc.

No, we don't. It does not matter how long your server takes to fully
start up.

> That's fine for "low priority" services out of the critical path for user
> interaction, but not for services we need as fast as possible.
As fast as possible, this can only be done in systemd way. And service
won't lost any request. In traditional way, it lost.

> 
> The best example I can think is the X server itself. It's pretty much the
> definition of the critical path. Everything started before the X server are
> those basic system components needed to start the X server, I understand in
> systemd that this core part would be a different target to the X part and a
> dep of it. Everything started after the X server is up are components of the
> user's session that aren't totally critical for them to login or use their
> computer.

Currently, gdm wait for X to be ready before move on.
And to be worse, they use busy pull, not by some notification way.
In systemd way, gdm don't have to wait. And don't even have to X itself.
Just connect to X and X is there. No matter if X is currently running at
all.

> 
> It's during the X startup that things get interesting. There are a few
> discreet phases of it.
> 
> Firstly we have to spawn the X server, load the executable, map and relocate
> shared libraries, all of that jazz. You don't want anything else happening
> on the system alongside this, and you most certainly don't want every X
> client (Chromium/Firefox!) being loaded at the same time. The default
> behaviour of systemd seems to be to do just this :-(

No, systemd will not do this anyway. And even it really do this way,
what's the point? why X must been the only running process will it is
initializing ?

> 
> Secondly you have the period after the X server has "loaded" while
> it initializes but before it's "ready" to receive clients. In a perfect
> world this would be fast, but we all know that it isn't. In practice the X
> server takes countable seconds to do this work. This is a prime place in
> boot optimization to start other services alongside while X does its thang.
> But you wouldn't want to flood the system, as you don't want to delay X's
> startup, just use the spare resource to get more done. Can systemd discern
> "X has been spawned" and "X has initialized". Can systemd serialize services
> in this period (perhaps limited to one or two starting at a time)? Can it
> prioritize the order of those services in the X target?

Yeah , we have the *period* for every server. In upstart way, it use
complex  method to  indicate that stages. But with systemd ? We don't
even have to care about that.

> 
> Lastly there's the processes you'd start after X is up and services are
> connecting to it; again I assume this would be a different target - how
> would systemd know that X, and the critical X services/processes are fully
> up and that it can begin starting these. The important thing here is user
> latency - the startup of these services need to not noticeably impact system
> performance - not as simple as prioritization because the service itself may
> well need a different priority once its up. Any thoughts here?

This is no such thing called, XX service is initializing, or XX service
is up. No, systemd pressent us only one thing: There is XX service that
is connect-able. And the first connection may took long to response. But
you don't have to wait for the "running" stage any more. The XX servie
is connect-able throughout the way.  You don't have to care if XX is
running or not. Just connect to it.

> 
> Thanks,
> 
> Scott
> 



signature.asc
Description: OpenPGP digital signat

Re: [systemd-devel] pivot_root to a tmpfs directory to properly umount root

2011-05-05 Thread microcai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

于 2011年05月05日 18:47, har...@redhat.com 写道:
> With this patch series, it is possible to umount the root device and 
> deconstruct it.
> 
> You can copy a bash to /lib/systemd/system-shutdown/ and it will be executed 
> at the end.
> Then you can cat /proc/mounts with:
> 
> # while read line; do echo $line; done < /proc/mounts
> 
> And your root device should not be showing up.
> 
> See:
> http://www.harald-hoyer.de/files/systemd-pivot.png

Wow~~~ Such a good move!

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

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNwoX5AAoJEKT4Uz7oTANZkDMH/3SK9TH4659x+snH592mJG8a
H0rGvJWU4GMo1nqgpeO/0F20bn4h45Yf/5StEZWg2XNQpypGqXXlZiaAJDiD4sRU
NKYnofdzS1mLdYYy7y+0KUPPIihQkDmmzPQGoKJ+7MbdLUCc9pzsRDr+CrBJ8M6q
gyZ6LMedbrkPdjjSU3Czt9v4pzmAU2tGCLaD/5Xy1mCU2bOYerCR8KSNVMs0zZcH
tWdeX7PS7CYhaYB/CyRvR7YooSgeHDI3yjOmqX1MZUB2PTXubkIn17YTkrPkVq7N
ZiDbSWUtO/79WLeKPuPe9bICsx3kMepFgW85FiN/N7h/rfEftxVGoppYeyic7LY=
=zUjo
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] What makes systemd-nspawn "not suitable for secure container setups"?

2011-04-25 Thread microcai
于 2011年04月25日 20:43, Daniel J Walsh 写道:
> SELinux  would be a good start.

No, root inside can still change SE-Linux policy.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] What makes systemd-nspawn "not suitable for secure container setups"?

2011-04-22 Thread microcai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

于 2011年04月23日 12:16, Josh Triplett 写道:
> On Sat, Apr 23, 2011 at 11:28:58AM +0800, microcai wrote:
>> 于 2011年04月23日 10:55, Josh Triplett 写道:
>>> The systemd-nspawn manpage lists the various mechanisms used to isolate
>>> the container, and then says "Note that even though these security
>>> precautions are taken systemd-nspawn is not suitable for secure
>>> container setups. Many of the security features may be circumvented and
>>> are hence primarily useful to avoid accidental changes to the host
>>> system from the container."
>>>
>>> How can a process in a systemd-nspawn container circumvent the container
>>
>> remount /proc and /sys
> 
> Ah, good point.  So, root inside the container can trivially circumvent
> the container that way.  Any way to prevent that with current kernel
> support, or would fixing this require additional kernel changes to lock
> down other /proc and /sys mounts?


OpenVZ is what you need that way. OpenVZ is much like systemd-nspawn,
but with more secure. So it can be used to provide VPS ;)

> 
> That particular problem only applies if running code within the
> container as root.  How about if running code as an unprivileged user?
> With that addition, does systemd-nspawn provide a secure container
> (modulo local privilege escalation vulnerabilities)?
> 
> Thanks,
> Josh Triplett

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNsmPCAAoJEKT4Uz7oTANZ5DEH/1xAJvN0UqGv4JNMTuy/Hl8/
P7+6BkmhbE8wXtQt37z5QQNaDoNKNiTrdkppPWboFCsf4ulZyf02jkJGqN0BJoWg
IC9xTWv2dE8RK+r3cnD1Nx0jpHuTq56Bo/W1UGeY+JKKNC/Ox8M81i+7M8xKrOB7
zhNnElNRTnHOHmzqSlcC1ODMnDw69lVpxZ0HusxpTAKLp1ms49PlhnFcXokHsD6/
GwhSNR7zjlimxUvoVbOPXqiIty37LgMn/Sl6+kvzWsngvCyBzpURmo9tp785iijL
ZxtX5AIo1rlgFTt8TXphp3477M0P3Nfmg9R1iRJGD19631etr7IJYF4hd+x3Z5A=
=meKC
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] What makes systemd-nspawn "not suitable for secure container setups"?

2011-04-22 Thread microcai
于 2011年04月23日 10:55, Josh Triplett 写道:
> The systemd-nspawn manpage lists the various mechanisms used to isolate
> the container, and then says "Note that even though these security
> precautions are taken systemd-nspawn is not suitable for secure
> container setups. Many of the security features may be circumvented and
> are hence primarily useful to avoid accidental changes to the host
> system from the container."
> 
> How can a process in a systemd-nspawn container circumvent the container

remount /proc and /sys

> setup?  What additional steps would systemd-nspawn need to take to
> provide a secure container setup?
> 
> - Josh Triplett
> ___
> 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] Suggestting (maybe?)better name escape for .mount and .automount unit file

2011-04-12 Thread microcai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

于 2011年04月12日 22:44, Zbigniew Jędrzejewski-Szmek wrote:
> On 04/12/2011 04:33 PM, microcai wrote:
>> > Shell is evil as Lennart said.
>> > 
>> > Then I say, escaping non-ascii char is also evil.
>> > 
>> > mount point should use only printable and type-able name, aka, valid
>> > UTF-8 string.
>> > 
>> > Among them, / and - can be used, since unit file name can't contain /, /
>> > is escaped as -.
>> > What about - ? Lennart said, Oh, please use \xAB ...
>> > 
>> > That is not *elegant* and *obvious*.
>> > And \ is then also need to be escaped.
>> > 
>> > SO, please, escape '-' as '--' (double '-'),  no more further escaping.
> Hi,
> 
> this is something that I suggested before, but Lennart didn't like the idea.
> But I still think that '--' is so much better.
> 
> dev-disk-by\x2duuid-72c96b94\x2d9fe6\x2d4a85\x2d93b6\x2d7e8f7d0991fe.device: 
> please no :)
> 
> Zbyszek

Yeah, unit file like this is totally nonsense.

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNpGXfAAoJEKT4Uz7oTANZ6KMH/16QDdKCw/vurcuGlbwRGHHN
rK6EAN/xSQbEiLAFq6QDhx+PvSmdg/vS6xPJWF8XiPSfeNJGXLHiHefAxbAJLKbJ
wd3YgYwbmRdqTUOmGFYYYRN2XkJvA8VWztUb1Vzkjgbmlmy9dM9yJiBxM4BomIsQ
QoZdijwBFlpcatnVfZKqT48mTFuXOIM0e1aVf+yOeKG5ttcUyDTZeoJQY2TGoAv9
0dh4BJYtKe1xIFj1kWQGYv83B1Y660inE5PReU+pvBiL/IWJHvFt4lRWIBhT2qIC
TJh+OxZSD9ojeCskrYHbCqvasnfon1QeEt9JxaIFwVcMhzqelzmktMdkPiehENI=
=GIJF
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Suggestting (maybe?)better name escape for .mount and .automount unit file

2011-04-12 Thread microcai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shell is evil as Lennart said.

Then I say, escaping non-ascii char is also evil.

mount point should use only printable and type-able name, aka, valid
UTF-8 string.

Among them, / and - can be used, since unit file name can't contain /, /
is escaped as -.
What about - ? Lennart said, Oh, please use \xAB ...

That is not *elegant* and *obvious*.
And \ is then also need to be escaped.

SO, please, escape '-' as '--' (double '-'),  no more further escaping.

If user want to use *valid* but non-printable path as mount point, they
are simply doing the wrong way. Still, I doubt any one would do that.


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNpGKdAAoJEKT4Uz7oTANZBJAH/1wTuNJpyVNXuyDP1HPOfoZh
L/749247MBS8D27/iKCrREZ/T9kBur1T33JjhCyIPlf8MDp7ATXv44aDngZeeg1v
5gBsbb2RVXsZFo0KsndmPN3vkm5MEy7S9b1LSFNcqaUXnjGdq9J8k1Nta5W2e6XI
R4z8fovgLVbu3/8KazHulzRAde72RjhdD//JjRW1ao6WNtlL6UEAkLk8V4DRMTpi
B7VAuXCCA29TsnU7pwKYWlxmrMAYC8pCHFGRZW1thSVYAKtV/YVw+zW8/1+eb84m
P2WiK4sMA0ZTSWvL3OC0qCKtQdyRRcc4fPcR4KIG9rXPpx80l/Oc7UolT5exQjw=
=8hKe
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] user startable services in systemd context

2011-04-07 Thread microcai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

? 2011?04?07? 20:55, Marius Tolzmann ??:
> 
> Hi again..
> 
> we have a setup where every user can start its own services
> (e.g. a webserver, database server, whatever).
> 
> if the user wants this service to be started after a reboot he just
> tells us the name of its startup files and we add those to our startup
> system. The service is then started with user privileges.
> 
> the user is able to stop and start the service any time..
> 
> is there a way this kind of setup can be configured in systemd?
> 
> thats what we would like to do:
> - start services unprivileged (this already works with systemd)
> - let the user start, stop, restart his service

use systemd --user

> 
> currently the user is able to stop his service (e.g. just kill it) but
> then systemd complains about a "stopped" service. if the user starts his
> service again he starts it in his user session/cgroup which gets moved
> to the users master session/cgroup after a logout. this is not very nice.
> 
> so i like to clean this mess up a bit but havn't found much information
> how this could already be done or if it is even planned to be a possible
> configuration in the future.
> 
> bye marius
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNnce8AAoJEKT4Uz7oTANZ8VIIAIrp/ZszRX1/6+M+f1P7fa4J
K0UvEwoh37tduu1TXo1q8T2aOV7eTg6HuVwoMPe3HjBOJAyl+lOKf62luAR2PXLS
d8xTPiCvr5HW2JZnR9B8iaF5PscHuWtUB+Uk4oAUJ2wTMZOIw0HJ6/OgL2XAYot/
PRmrdIw4n8ogBJRbF4R3083ozb96JOpcdJ1St+iSK4xCaN0EYjwgT/xNrP5zIabj
SVjz2W1MFOika8NvA4AMIN+Wz8jV095HcQhvjxJzQ1Flg+Htp++sYjUXFZ+7cN1Y
KS3niy5t7w5hXhHkI+MgAB0xzTfiDUmL+BkB9CXJ56yRlQDaqDjbpoZO4XzUZro=
=H+/7
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] use /run instead of /dev/.run

2011-03-28 Thread microcai
于 2011年03月28日 22:36, Jan Engelhardt 写道:
> On Monday 2011-03-28 16:25, Ludwig Nussel wrote:
> 
>> Kay Sievers wrote:
>>> On Mon, Mar 28, 2011 at 13:28, Ludwig Nussel  wrote:
 Bill Nottingham wrote:
> Andrey Borzenkov (arvidj...@gmail.com) said:
>> On Fri, Mar 25, 2011 at 7:07 AM, Kay Sievers  
>> wrote:
>>> Instead of the /dev/.run trick we have currently implemented, we decided
>>> to move the early-boot runtime dir to /run.
>>>
>>
>> What is the benefit? /var/run is well known and established; what is
>> the reason to move it in another place?
>
> /var/run depends on /var, which is allowed to be a separate filesystem, 
> and
> therefore not available during all portions of the boot process or 
> shutdown.

 mount --bind /var/run /mnt
 mount /var
 mount -M /mnt /var/run
>>>
>>> We would need to make sure that /var/run exists on the rootfs then. We
>>> could probably do that on shutdown, but it's not really fun to rely on
>>> such things.
>>
>> If it's not there and / is ro you can put /var on tmpfs temporarily too (or
>> even reuse the one for /var/run via bind mount or symlink).
> 
> But sounds more work than it currently is.

And yes, it useless. currently method is just fine. KISS.

> ___
> 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] use /run instead of /dev/.run

2011-03-28 Thread microcai
/dev/.run is just fine, and /dev is tmpfs backend, so that is fast.
/var is not tmpfs backend.

2011/3/28 Ludwig Nussel :
> Bill Nottingham wrote:
>> Andrey Borzenkov (arvidj...@gmail.com) said:
>> > On Fri, Mar 25, 2011 at 7:07 AM, Kay Sievers  wrote:
>> > > Instead of the /dev/.run trick we have currently implemented, we decided
>> > > to move the early-boot runtime dir to /run.
>> > >
>> >
>> > What is the benefit? /var/run is well known and established; what is
>> > the reason to move it in another place?
>>
>> /var/run depends on /var, which is allowed to be a separate filesystem, and
>> therefore not available during all portions of the boot process or shutdown.
>
> mount --bind /var/run /mnt
> mount /var
> mount -M /mnt /var/run
>
> cu
> Ludwig
>
> --
>  (o_   Ludwig Nussel
>  //\
>  V_/_  http://www.suse.de/
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
> ___
> 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