Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-02-01 Thread Topi Miettinen
On 01/27/15 22:19, Lennart Poettering wrote:
 On Tue, 27.01.15 21:58, Topi Miettinen (toiwo...@gmail.com) wrote:
 Well, the way I read the paragraph above if we set PR_SET_NO_NEW_PRIVS
 after forking, but before execing systemd-timesyncd, and that binary
 has an selinux label on it, that the selinux label would be ignore,
 and things would continue to run with the same label as we forked
 off. This pretty much renders SELinux usesless, since all services
 where we set the bit for would then run as init_t... and that's
 something we really shouldn't do.

 seccomp_filter.txt on the other hand says that
 Prior to use, the task must call prctl(PR_SET_NO_NEW_PRIVS, 1) or
 run with CAP_SYS_ADMIN privileges in its namespace.  If these are not
 true, -EACCES will be returned.  This requirement ensures that filter
 programs cannot be applied to child processes with greater privileges
 than the task that installed them.

 Does this mean that SELinux and seccomp are mutually exclusive? Awful
 design if so.
 
 Well, no it doesn't mean that. If systemd sets up a seccomp filter it
 has CAP_SYS_ADMIN, hence all is good. And it can leave
 PR_SET_NO_NEW_PRIVS off, and thus not break selinux.

So in conclusion, only the SecureBits part would be interesting. Looking
at the unit files, which of them expect to run setuid helpers? I looked
at the unit files and briefly at the corresponding programs (also to get
to know them better), so I offer my guesses below:

units/console-getty.service.m4.in

getty launches user shell, so no.

units/console-shell.service.m4.in

sulogin launches root shell, so no.

units/container-ge...@.service.m4.in

getty launches user shell, so no.

units/debug-shell.service.in

sushell launches root shell, so no.

units/emergency.service.in

sulogin launches root shell, so no.

units/getty@.service.m4

getty launches user shell, so no.

units/halt-local.service.in

Local scripts could launch anything, so no.

units/initrd-cleanup.service.in

Only calls systemctl, so yes.

units/initrd-parse-etc.service.in

Only calls systemctl, so yes.

units/initrd-switch-root.service.in

Only calls systemctl, so yes.

units/initrd-udevadm-cleanup-db.service.in

Only calls udevadm, so yes.

units/kmod-static-nodes.service.in

kmod is not part of systemd, but I wouldn't expect it to use setuid
helpers, so yes?

units/ldconfig.service

ldconfig is not part of systemd, but I wouldn't expect it to use setuid
helpers, so yes?

units/quotaon.service.in

quotaon is not part of systemd, but I wouldn't expect it to use setuid
helpers, so yes?

units/rc-local.service.in

Local scripts could launch anything, so no.

units/rescue.service.in

sulogin launches root shell, so no.

units/serial-getty@.service.m4

getty launches user shell, so no.

units/systemd-ask-password-console.service.in

Only calls systemd-ask-password-agent, so yes.

units/systemd-ask-password-wall.service.in

Only calls systemd-ask-password-agent, so yes.

units/systemd-backli...@.service.in

Only calls systemd-backlight, so yes.

units/systemd-binfmt.service.in

Only calls systemd-binfmt, so yes.

units/systemd-bootchart.service.in

Only calls systemd-bootchart, so yes.

units/systemd-bus-proxyd.service.m4.in

Only calls systemd-bus-proxyd, so yes.

units/systemd-firstboot.service.in

Only calls systemd-firstboot. It doesn't seem to use pam_unix (which
could launch setuid helper unix_chkpwd) for checking passwords, but
internal implementation, so yes.

units/systemd-fsck-root.service.in

Only calls systemd-fsck, so yes.

units/systemd-f...@.service.in

Only calls systemd-fsck, so yes.

units/systemd-halt.service.in

Only calls systemctl, so yes.

units/systemd-hibernate-res...@.service.in

Only calls systemd-hibernate-resume, so yes.

units/systemd-hibernate.service.in

Only calls systemd-sleep, so yes.

units/systemd-hostnamed.service.in

Only calls systemd-hostnamed, so yes.

units/systemd-hwdb-update.service.in

Only calls systemd-hwdb, so yes.

units/systemd-hybrid-sleep.service.in

Only calls systemd-sleep, so yes.

units/systemd-importd.service.in

Calls systemd-importd, which in turn executes several helpers,
especially gpg which could be setuid to lock memory, so no.

units/systemd-initctl.service.in

Only calls systemd-initctl, so yes.

units/systemd-journal-catalog-update.service.in

Only calls systemd-journalctl, so yes.

units/systemd-journald.service.in

Only calls systemd-journald, so yes.

units/systemd-journal-flush.service.in

Only calls systemd-journalctl, so yes.

units/systemd-journal-gatewayd.service.in

Only calls systemd-journal-gatewayd, so yes.

units/systemd-journal-remote.service.in

Calls systemd-journal-remote, which in turn uses microhttpd that uses
several external libs, maybe no?

units/systemd-journal-upload.service.in

Only calls systemd-journal-upload (uses curl), so yes.

units/systemd-kexec.service.in

Only calls systemctl, so yes.

units/systemd-localed.service.in

Only calls systemd-localed, so yes.


Re: [systemd-devel] [PATCH] timesyncd: Make saving clock to disk on NTP fix optional

2015-02-01 Thread Cristian Rodríguez
El 01/02/2015 06:36, Kay Sievers k...@vrfy.org escribió:

 On Feb 1, 2015 5:34 AM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl
wrote:
 
  Kay, Lennart,
  comments?

 Sounds like overkill to me for such an exotic requirement. Just link the
file to /dev/null and be done?

Yeah, I do not see the point on providing this option,  only the file
timestamp is updated. That causes very little io.
Symlink to null is the best solution IMHO.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Mediacast to TV - MiracleCast - Open-Source Miracast - Wifi-Display on linux

2015-02-01 Thread poma
On 01.02.2015 10:18, poma wrote:
 On 01.02.2015 05:38, poma wrote:
 On 31.01.2015 17:28, Patrick O'Callaghan wrote:
 I have a smart TV (Sony Bravia) and can use Android Cast Screen from my
 phone or tablet to see content. Apparently it also works with the Apple
 equivalent. Is there a way to do this from my F21 desktop?

 poc

 ...

 Ref.
 On Wifi-Display, Democratic Republics and Miracles
   
 https://dvdhrm.wordpress.com/2014/02/17/on-wifi-democratic-republics-and-miracles/
 MiracleCast - Wifi-Display/Miracast Implementation
   http://cgit.freedesktop.org/~dvdhrm/miracle/

 Review Request: libwfd - A stand-alone implementation of the Wifi-Display 
 protocol
   https://bugzilla.redhat.com/show_bug.cgi?id=1066707

 MiracleCast - libwfd
   http://www.freedesktop.org/wiki/Software/miracle/libwfd/
 build: remove libwfd dependency
   http://cgit.freedesktop.org/~dvdhrm/miracle/commit/?id=7a73bee

 
 systemd.spec-enable-kdbus.patch:
 
 Without
 --enable-kdbus
 in
 systemd.spec
 
 src/wifi/wifid.c:30:28: fatal error: systemd/sd-bus.h: No such file or 
 directory
 src/shared/rtsp.c:31:30: fatal error: systemd/sd-event.h: No such file or 
 directory
 src/shared/wpas.c:31:30: fatal error: systemd/sd-event.h: No such file or 
 directory
 
 ---
  systemd.spec | 10 +-
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/systemd.spec b/systemd.spec
 index d3c7012..55265bb 100644
 --- a/systemd.spec
 +++ b/systemd.spec
 @@ -502,7 +502,7 @@ CONFIGURE_OPTS=(
  --with-sysvinit-path=/etc/rc.d/init.d
  --with-rc-local-script-path-start=/etc/rc.d/rc.local
  --with-ntp-servers='0.%{ntpvendor}.pool.ntp.org 
 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 
 3.%{ntpvendor}.pool.ntp.org'
 ---disable-kdbus
 +--enable-kdbus
  --disable-terminal
  )
  
 @@ -988,6 +988,14 @@ getent passwd systemd-journal-upload /dev/null 21 || 
 useradd -r -l -g systemd
  %{_includedir}/systemd/sd-id128.h
  %{_includedir}/systemd/sd-messages.h
  %{_includedir}/systemd/_sd-common.h
 +%{_includedir}/systemd/sd-bus-protocol.h
 +%{_includedir}/systemd/sd-bus-vtable.h
 +%{_includedir}/systemd/sd-bus.h
 +%{_includedir}/systemd/sd-event.h
 +%{_includedir}/systemd/sd-path.h
 +%{_includedir}/systemd/sd-resolve.h
 +%{_includedir}/systemd/sd-rtnl.h
 +%{_includedir}/systemd/sd-utf8.h
  %{_includedir}/libudev.h
  %{_libdir}/pkgconfig/libudev.pc
  %{_libdir}/pkgconfig/libsystemd.pc
 
 ~~
 ~~
 
 miracle-include-stdio.h.patch:
 
 Without
 #include stdio.h
 in
 src/wifi/wifid.h
 src/wifi/wifid-supplicant.c:2447:2: error: unknown type name ‘FILE’
 
 src/ctl/ctl.h
 /usr/include/readline/rltypedefs.h:71:28: error: unknown type name ‘FILE’
 /usr/include/readline/readline.h:423:20: error: unknown type name ‘FILE’
 /usr/include/readline/readline.h:550:8: error: unknown type name ‘FILE’
 /usr/include/readline/readline.h:551:8: error: unknown type name ‘FILE’
 /usr/include/readline/readline.h:580:8: error: unknown type name 
 ‘rl_getc_func_t’
 /usr/include/readline/readline.h:899:3: error: unknown type name ‘FILE’
 /usr/include/readline/readline.h:900:3: error: unknown type name ‘FILE’
 src/ctl/ctl-cli.c:326:15: error: ‘stdin’ undeclared (first use in this 
 function)
 
 ---
  src/ctl/ctl.h| 1 +
  src/wifi/wifid.h | 1 +
  2 files changed, 2 insertions(+)
 
 diff --git a/src/ctl/ctl.h b/src/ctl/ctl.h
 index 47c37ae..19ad34d 100644
 --- a/src/ctl/ctl.h
 +++ b/src/ctl/ctl.h
 @@ -20,6 +20,7 @@
  #include errno.h
  #include stdarg.h
  #include stdbool.h
 +#include stdio.h
  #include stdlib.h
  #include string.h
  #include sys/socket.h
 diff --git a/src/wifi/wifid.h b/src/wifi/wifid.h
 index 62d5346..728136e 100644
 --- a/src/wifi/wifid.h
 +++ b/src/wifi/wifid.h
 @@ -20,6 +20,7 @@
  #include errno.h
  #include libudev.h
  #include stdbool.h
 +#include stdio.h
  #include stdlib.h
  #include systemd/sd-bus.h
  #include systemd/sd-event.h
 
 ~~
 ~~
 
 $ git clone git://people.freedesktop.org/~dvdhrm/miracle
 $ cd miracle/
 $ patch -p1  ../miracle-include-stdio.h.patch
 $ test -f ./configure || NOCONFIGURE=1 ./autogen.sh
 $ ./configure --disable-static
 $ make
 $ su
 # make install
 
 $ ls -1 /usr/local/bin/miracle*
 /usr/local/bin/miracled
 /usr/local/bin/miracle-dhcp
 /usr/local/bin/miracle-gst.sh
 /usr/local/bin/miracle-sinkctl
 /usr/local/bin/miracle-wifictl
 /usr/local/bin/miracle-wifid
 
 
 MiracleCast - Howto
   
 http://web.archive.org/web/20140807221926/http://www.freedesktop.org/wiki/Software/miracle/howto
 
 FOSDEM 2014
 Open-Source Miracast
 Wifi-Display on linux
   https://archive.fosdem.org/2014/schedule/event/miracast/
 


MiracleCast - Howto
Current State
...
We require direct access to the wpa_supplicant interface. No 
network-manager (including ConnMan, NetworkManager, wicd) provides a Wifi-P2P 
API so we implemented it ourselves. We really want to drop this once 
network-managers start exposing such APIs.
We use our own miracle-dhcp binary as DHCP 

Re: [systemd-devel] [PATCH] timesyncd: tighten unit file

2015-02-01 Thread Cristian Rodríguez

El 27/01/15 a las 21:18, Lennart Poettering escribió:

On Tue, 27.01.15 15:12, Cameron Norman (camerontnor...@gmail.com) wrote:


Lennart: if you really want to test the profile, you just need to spin
up an OpenSuSE, Ubuntu, or Debian VM (on debian you need to install
and enable apparmor, which takes a short while).


Well, I have no personal interest in AppArmor, and I really have
enough stuff to do. If AA shall be supported in systemd, then I am
happy to merge stuff for it, if it is reviewed properly, but I am not
the one to test it. Sorry...



Hi Lennart:

To make apparmor work, only the initial policy loading bits (like 
selinux, smack..etc) needs to be implemented..currently it is done by 
some really ugly init script.Appamor policies however, just like the 
case of selinux have to go somewhere else, namely the apparmor upstream 
repository.





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


Re: [systemd-devel] [PATCH] timesyncd: Make saving clock to disk on NTP fix optional

2015-02-01 Thread Kay Sievers
On Feb 1, 2015 5:34 AM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl
wrote:

 Kay, Lennart,
 comments?

Sounds like overkill to me for such an exotic requirement. Just link the
file to /dev/null and be done?

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


Re: [systemd-devel] [PATCH] timesyncd: Make saving clock to disk on NTP fix optional

2015-02-01 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Feb 01, 2015 at 10:56:39AM -0300, Cristian Rodríguez wrote:
 El 01/02/2015 06:36, Kay Sievers k...@vrfy.org escribió:
 
  On Feb 1, 2015 5:34 AM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl
 wrote:
  
   Kay, Lennart,
   comments?
 
  Sounds like overkill to me for such an exotic requirement. Just link the
 file to /dev/null and be done?
 
 Yeah, I do not see the point on providing this option,  only the file
 timestamp is updated. That causes very little io.
 Symlink to null is the best solution IMHO.

OK, I didn't think about that.

Philipp, I'll close the bug then, since the symlink thing works just as well.

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


Re: [systemd-devel] [PATCH] timesyncd: Make saving clock to disk on NTP fix optional

2015-02-01 Thread Colin Guthrie
Zbigniew Jędrzejewski-Szmek wrote on 01/02/15 15:58:
 On Sun, Feb 01, 2015 at 10:56:39AM -0300, Cristian Rodríguez wrote:
 El 01/02/2015 06:36, Kay Sievers k...@vrfy.org escribió:

 On Feb 1, 2015 5:34 AM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl
 wrote:

 Kay, Lennart,
 comments?

 Sounds like overkill to me for such an exotic requirement. Just link the
 file to /dev/null and be done?

 Yeah, I do not see the point on providing this option,  only the file
 timestamp is updated. That causes very little io.
 Symlink to null is the best solution IMHO.
 
 OK, I didn't think about that.
 
 Philipp, I'll close the bug then, since the symlink thing works just as well.

In the commit message it says that it still touches the file on shutdown
which gives the cross-boot monotonic features between boots but
sacrifices it for unexpected reboots.

Surely the symlink to /dev/null only solves the disabling of the feature
fully, and doesn't have the option to still get the benefits on
controlled circumstances.

Not suggesting that this makes the patch worthwhile, but just
highlighting that the just as well comment isn't quite correct in the
context of the patch (not read the bug tho' so it may just be asking for
a completely disable it option :)

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [Patch 0/6] Small adjustments to make QEMU tests work under Debian/Ubuntu

2015-02-01 Thread Martin Pitt
Hey all,

as discussed on the hackfest, I'd like to revive the QEMU/nspawn integration
tests, such as adding one for EFI or swap discovery (cf. the bugs fixed last
week). As an initial step I wrote a couple of rather simple patches to make the
QEMU tests work at all under Debian and derivatives (Ubuntu, Mint, etc.).

Most of them aren't particularly Debian specific but rather apply to different
./configure options such as --enable-split-usr. The only truly Debian specific
one is 6/6; if you really don't like that, I'm ok with carrying that in the
Debian package, but (a) I think there's a certain value of making the upstream
tests work under Debian (makes it *much* easier to test master often for CI),
and (2) this is nothing that affects the behaviour on installations, so it
should be rather harmless.

Thanks for considering,

Martin

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


[systemd-devel] [PATCH 5/6] tests: install hostname debug tool

2015-02-01 Thread Martin Pitt
This is mostly a vehicle to pull in libnsl.so which gets dlopen()ed by NSS
under certain NSS configurations.
---
 test/test-functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test-functions b/test/test-functions
index 34af32a..80e0f65 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -13,7 +13,7 @@ if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir 
systemd); then
 fi
 
 BASICTOOLS=sh bash setsid loadkeys setfont login sulogin gzip sleep echo 
mount umount cryptsetup date dmsetup modprobe
-DEBUGTOOLS=df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping 
dhclient strace less grep id tty touch du sort
+DEBUGTOOLS=df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping 
dhclient strace less grep id tty touch du sort hostname
 
 function find_qemu_bin() {
 # SUSE and Red Hat call the binary qemu-kvm
-- 
2.1.4

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


[systemd-devel] [PATCH 3/6] tests: don't hardcode systemctl path

2015-02-01 Thread Martin Pitt
Get it from type -P instead, to support --enable-split-usr.
---
 Makefile.am | 2 +-
 test/end.service| 6 --
 test/end.service.in | 6 ++
 test/test-functions | 3 ++-
 4 files changed, 9 insertions(+), 8 deletions(-)
 delete mode 100644 test/end.service
 create mode 100644 test/end.service.in

diff --git a/Makefile.am b/Makefile.am
index e3ba11c..0fd5ca3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1433,7 +1433,7 @@ EXTRA_DIST += \
test/c.service \
test/daughter.service \
test/d.service \
-   test/end.service \
+   test/end.service.in \
test/e.service \
test/f.service \
test/grandchild.service \
diff --git a/test/end.service b/test/end.service
deleted file mode 100644
index 0f04dfe..000
--- a/test/end.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=End the test
-After=testsuite.service
-
-[Service]
-ExecStart=/usr/bin/systemctl poweroff --no-block
diff --git a/test/end.service.in b/test/end.service.in
new file mode 100644
index 000..4857ffe
--- /dev/null
+++ b/test/end.service.in
@@ -0,0 +1,6 @@
+[Unit]
+Description=End the test
+After=testsuite.service
+
+[Service]
+ExecStart=@SYSTEMCTL@ poweroff --no-block
diff --git a/test/test-functions b/test/test-functions
index a0f1bf4..42c954d 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -293,7 +293,8 @@ install_terminfo() {
 }
 
 setup_testsuite() {
-cp $TEST_BASE_DIR/{testsuite.target,end.service} 
$initdir/etc/systemd/system/
+cp $TEST_BASE_DIR/testsuite.target $initdir/etc/systemd/system/
+sed s#@SYSTEMCTL@#$(type -P systemctl)#g $TEST_BASE_DIR/end.service.in  
$initdir/etc/systemd/system/end.service
 
 mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
 ln -fs $TEST_BASE_DIR/testsuite.service 
$initdir/etc/systemd/system/testsuite.target.wants/testsuite.service
-- 
2.1.4

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


[systemd-devel] [PATCH 1/6] tests: Make sushell optional in image creation

2015-02-01 Thread Martin Pitt
sushell does not exist in all distributions, and it can be changed with
configure --with-debug-shell, so make installation of it optional.
---
 test/test-functions | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test-functions b/test/test-functions
index 4fa0c59..91f3ecd 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -7,7 +7,7 @@ export PATH
 KERNEL_VER=${KERNEL_VER-$(uname -r)}
 KERNEL_MODS=/lib/modules/$KERNEL_VER/
 
-BASICTOOLS=sh bash setsid loadkeys setfont login sushell sulogin gzip sleep 
echo mount umount cryptsetup date dmsetup modprobe
+BASICTOOLS=sh bash setsid loadkeys setfont login sulogin gzip sleep echo 
mount umount cryptsetup date dmsetup modprobe
 DEBUGTOOLS=df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping 
dhclient strace less grep id tty touch du sort
 
 function find_qemu_bin() {
@@ -227,6 +227,7 @@ EOF
 
 install_basic_tools() {
 [[ $BASICTOOLS ]]  dracut_install $BASICTOOLS
+dracut_install -o sushell
 }
 
 install_debug_tools() {
-- 
2.1.4

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


[systemd-devel] [PATCH 4/6] tests: install all required libnss modules

2015-02-01 Thread Martin Pitt
Don't assume files for everything in nsswitch. Instead, ask getent passwd
about which libnss modules it dlopen()s, and install these.
---
 test/test-functions | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/test-functions b/test/test-functions
index 42c954d..34af32a 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -241,7 +241,10 @@ install_debug_tools() {
 
 install_libnss() {
 # install libnss_files for login
-inst_libdir_file libnss_files*
+NSS_LIBS=$(LD_DEBUG=files getent passwd 21 /dev/null |sed -n '/calling 
init: .*libnss_/ {s!^.* /!/!; p}')
+for l in $NSS_LIBS; do
+dracut_install $l
+done
 }
 
 install_dbus() {
-- 
2.1.4

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


[systemd-devel] [PATCH 2/6] tests: determine rootlibdir from pkg-config

2015-02-01 Thread Martin Pitt
Prefer asking pkg-config for the rootlibdir, to also support systems with
--enable-split-usr. Fall back to the hardcoded /usr/lib/systemd if that fails.
---
 test/test-functions | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/test/test-functions b/test/test-functions
index 91f3ecd..a0f1bf4 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -7,6 +7,11 @@ export PATH
 KERNEL_VER=${KERNEL_VER-$(uname -r)}
 KERNEL_MODS=/lib/modules/$KERNEL_VER/
 
+if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then
+echo WARNING! Cannot determine rootlibdir from pkg-config, assuming 
/usr/lib/systemd 2
+ROOTLIBDIR=/usr/lib/systemd
+fi
+
 BASICTOOLS=sh bash setsid loadkeys setfont login sulogin gzip sleep echo 
mount umount cryptsetup date dmsetup modprobe
 DEBUGTOOLS=df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping 
dhclient strace less grep id tty touch du sort
 
@@ -47,7 +52,7 @@ run_qemu() {
 systemd.log_level=debug \
 raid=noautodetect \
 loglevel=2 \
-init=/usr/lib/systemd/systemd \
+init=$ROOTLIBDIR/systemd \
 ro \
 console=ttyS0 \
 selinux=0 \
@@ -72,7 +77,7 @@ $KERNEL_APPEND \
 
 run_nspawn() {
 set -x
-../../systemd-nspawn --boot --directory=$TESTDIR/nspawn-root 
/usr/lib/systemd/systemd $KERNEL_APPEND
+../../systemd-nspawn --boot --directory=$TESTDIR/nspawn-root 
$ROOTLIBDIR/systemd $KERNEL_APPEND
 }
 
 setup_basic_environment() {
@@ -240,8 +245,8 @@ install_libnss() {
 }
 
 install_dbus() {
-inst /usr/lib/systemd/system/dbus.socket
-inst /usr/lib/systemd/system/dbus.service
+inst $ROOTLIBDIR/system/dbus.socket
+inst $ROOTLIBDIR/system/dbus.service
 
 find \
 /etc/dbus-1 -xtype f \
-- 
2.1.4

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


[systemd-devel] [PATCH 6/6] tests: install ldconfig.real for Debian based distros

2015-02-01 Thread Martin Pitt
In Debian based distributions ldconfig is just a shell wrapper around
ldconfig.real, for deferring it during package installation.
---
 test/test-functions | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/test-functions b/test/test-functions
index 80e0f65..b9468a4 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -233,6 +233,8 @@ EOF
 install_basic_tools() {
 [[ $BASICTOOLS ]]  dracut_install $BASICTOOLS
 dracut_install -o sushell
+# in Debian ldconfig is just a shell script wrapper around ldconfig.real
+dracut_install -o ldconfig.real
 }
 
 install_debug_tools() {
-- 
2.1.4

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


Re: [systemd-devel] [PATCH] config_parse_set_status: put signals in the correct set

2015-02-01 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jan 30, 2015 at 09:49:55AM +0100, Michael Olbrich wrote:
 This was broken when the code was rearranged in 1e2fd62d70ff
 core/load-fragment.c: correct argument sign and split up long lines
With this change, the new code is similarly complicated as the old code,
so a (partial) revert would have worked too. But the patch is OK.

Applied.

Zbyszek


 ---
  src/core/load-fragment.c | 9 ++---
  1 file changed, 6 insertions(+), 3 deletions(-)
 
 diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
 index 516731aba26c..571bb64b7824 100644
 --- a/src/core/load-fragment.c
 +++ b/src/core/load-fragment.c
 @@ -3150,6 +3150,7 @@ int config_parse_set_status(
  FOREACH_WORD(word, l, rvalue, state) {
  _cleanup_free_ char *temp;
  int val;
 +Set **set;
  
  temp = strndup(word, l);
  if (!temp)
 @@ -3162,21 +3163,23 @@ int config_parse_set_status(
  if (val = 0) {
  log_syntax(unit, LOG_ERR, filename, line, 
 -val,
 Failed to parse value, ignoring: 
 %s, word);
 -return 0;
 +continue;
  }
 +set = status_set-signal;
  } else {
  if (val  0 || val  255) {
  log_syntax(unit, LOG_ERR, filename, line, 
 ERANGE,
 Value %d is outside range 0-255, 
 ignoring, val);
  continue;
  }
 +set = status_set-status;
  }
  
 -r = set_ensure_allocated(status_set-status, NULL);
 +r = set_ensure_allocated(set, NULL);
  if (r  0)
  return log_oom();
  
 -r = set_put(status_set-status, INT_TO_PTR(val));
 +r = set_put(*set, INT_TO_PTR(val));
  if (r  0) {
  log_syntax(unit, LOG_ERR, filename, line, -r,
 Unable to store: %s, word);
 -- 
 2.1.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] Programmatically setting udev properties

2015-02-01 Thread Peter Hutterer
On Fri, Jan 30, 2015 at 09:22:51AM +0100, Martin Pitt wrote:
 Tomasz Torcz [2015-01-29 23:42 +0100]:
Have you seen umockdev? https://github.com/martinpitt/umockdev/
 
 Right, with that you can run your tests as normal user, completely
 isolated from the actual system, and you can set up/change devices,
 attributes and properties at any time without restrictions.
 
 umockdev supports its own device and ioctl dump/restore format, but it
 can also read and write the evemu format (that might be useful for
 you).
 
 https://github.com/martinpitt/umockdev has a summary of what this does
 and how to use it.  I'm happy to discuss that further with you
 (perhaps on PM/IRC/etc.) if you are interested.

thanks, I've started looking through it. For now dumping into
/run/udev/rules.d is a lot easier to add than hooking up umockdev - we have
our own test framework around check, umockdev would be a bit more extensive
to change bits and pieces around.

That's mainly because we don't use the evemu format, we have a bunch struct
input_event arrays or wrappers around it. We don't use the recordings, it'd
be a bit unwieldly for the various interactions that we're testing.
So to switch to umockdev we'd have to juggle a lot more things than we do
now, that'll take time to write.

Cheers,
   Peter

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


Re: [systemd-devel] [RFC PATCH 2/2] localed: add LANGUAGE= fallback when LANG= is specified

2015-02-01 Thread Jan Janssen
Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl writes:

 I think the implementation is fine, since it is rather trivial, but I'm
 less certain about the implications of setting LANGUAGE in addtion to
 LANG.
 
 Zbyszek

Isn't this something that should be in glibc's lang/locale handling code?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] test-dhcp-client failing in mock builds

2015-02-01 Thread Jan Synacek
Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl writes:

 Hi,

 I was trying to enable tests in the %check part of systemd rpm.
 Something strange happens which causes test-dhcp-client when building
 in mock:

 FAIL: test-dhcp-client
 ==

http://lists.freedesktop.org/archives/systemd-devel/2014-December/026190.html

I haven't got time to properly analyze the problem since then...

-- 
Jan Synacek
Software Engineer, Red Hat


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