[systemd-devel] kexec returns error code 1
I'm trying to get kexec reboots to work on my box with systemd. I can get kexec -l ... and kexec -e to work when ran straight from the command line, but when I run kexec -l ... and systemctl kexec I get kexec returned error code 1 and it falls back to a full reboot. I've puzzled over this for a while, but I can't figure out the difference between the two situations that would prevent the later from working. (error code 1 doesn't tell me much) Ideas?___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] nspawn: No Return key in machinectl login?
Hello, I am having a problem with one of my containers set up with systemd-nspawn. For some reason the return key will not work most of the time (19 out of 20 attemps) after doing machinectl login into that machine. This effects not all programs: bash works, fish-shell does not. Sudo password entry does not work either. Git is broken (but hardly ever requires user input, so that is not that tragic;-), vi works fine. I only have this one one container image, even though it is built based on an image that is also used by container images that work fine. So I think the image should have all the important bits and pieces in place. I am kind of lost that close to the termcap:-) Does somebody have any ideas on how I can debug this? infocmp produces this output: # Reconstructed via infocmp from file: /usr/share/terminfo/l/linux linux|linux console, am, bce, ccc, eo, mir, msgr, xenl, xon, colors#8, it#8, ncv#18, pairs#64, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l\E[?1c, clear=\E[H\E[J, cnorm=\E[?25h\E[?0c, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h\E[?8c, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h\E[?5l$200/, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, rmam=\E[?7l, rmir=\E[4l, rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h, smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd, I did try editing the agetty set-up by container-getty@.service to use different terminfos (in fact the infocmp is with linux instead of the default $TERM), but no change. Best Regards, Tobias ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] fix typos in systemd-nspawn man page
Patchset imported to github. Pull request: https://github.com/systemd-devs/systemd/compare/master...systemd-mailing-devs:1432350661-26824-1-git-send-email-jonathan.boulle%40coreos.com -- Generated by https://github.com/haraldh/mail2git ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] fix typos in systemd-nspawn man page
--- man/systemd-nspawn.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index 6a5db86cec3c..06285edc0bb3 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -330,7 +330,7 @@ first host UID to assign to the container, the second parameter specifies the number of host UIDs to assign to the container. If the second parameter is omitted, 65536 UIDs are -assigned. If the first parameter is also ommitted (and hence +assigned. If the first parameter is also omitted (and hence no parameter passed at all), the first UID assigned to the container is read from the owner of the root directory of the container's directory tree. By default no user namespacing is @@ -454,7 +454,7 @@ container port number in the range from 1 to 65535. The protocol specifier and its separating colon may be omitted, in which case literaltcp/literal is assumed. The container -port number and its colon may be ommitted, in which case the +port number and its colon may be omitted, in which case the same port as the host port is implied. This option is only supported if private networking is used, such as option--network-veth/option or -- 1.9.3 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] No cgroups in cpu,cpuacct despite autogrouping
On Fri, 22.05.15 12:41, Jan Engelhardt (jeng...@inai.de) wrote: In my kernel, there is CONFIG_SCHED_AUTOGROUP=y set. I believe that since systemd is capable of, and is doing grouping on its own, the kernel option has no effect. This seems reflected in /sys/fs/cgroups/cpu,cpuacct having no subdirectories: AFAIK autogroup was never reflected in the cgroup tree. 12:34 ares40:../cgroup/cpu,cpuacct ls -Fax ./ ../ cgroup.clone_children cgroup.procs cgroup.sane_behavior cpu.cfs_period_uscpu.cfs_quota_us cpu.rt_period_us cpu.rt_runtime_uscpu.shares cpu.stat cpuacct.stat cpuacct.usagecpuacct.usage_percpu notify_on_release release_agent tasks As a result of this, all processes get equal shares, rather than all SID groups getting equal shares, causing BOINC to outmonopolize VirtualBox: /$ systemd-cgls ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 20 [...] └─user.slice └─user-25121.slice ├─session-3.scope │ ├─ 376 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2200 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2578 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2826 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 3162 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 3697 SCREEN │ ├─ 3698 -/bin/bash │ ├─ 6070 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 6554 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─14171 /usr/lib/virtualbox/VBoxXPCOMIPCD │ ├─14176 /usr/lib/virtualbox/VBoxSVC --auto-shutdown │ ├─14255 /usr/lib/virtualbox/VBoxNetDHCP --ip-address 192.168.100.100 --... │ ├─25859 boinc │ └─30167 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... How would one re-enable the SID-style cpuacct grouping with systemd? Quite frankly I have no idea how the cpu controller hierarchy interacts with autogrouping. For normal system services you can ask systemd however to move things into the cpu hierarchy, so that explicit groups are created in /sys/fs/cgroup/cpu. Do this via systemctl set-property foobar.service CPUShares=1500. But if i see that correctly, your two services are not actually system services, but session processes. And to that I can only say: this is simply not supported in systemd and the kernel: since cgroupfs controller access is security sensitive unprivileged processes will not get access to anything but the name=systemd cgroup hierarchy, and hence cannot managed their own set of CPUShares= currently. Sorry, Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] 220: --disable-audit broken?
Hi, On 22 May 2015 at 11:16, baldu...@units.it wrote: hello, while building 220 I get: In file included from src/journal/audit-type.c:32:0: src/journal/audit_type-to-name.h: In function 'audit_type_to_string': src/journal/audit_type-to-name.h:23:14: error: 'AUDIT_USER_AUTH' undeclared (first use in this function) case AUDIT_USER_AUTH: return USER_AUTH; ^ I got the same here rm src/journal/audit_type-to-name.h src/udev/keyboard-keys-from-name.gperf Solved this one and another udev-related. These generated files are in the tarball when they shouldn't. Btw src/boot/efi is missing from the tarball, too. Regards, Marc-Antoine ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages
On Fri, 22.05.15 12:30, Jan Synacek (jsyna...@redhat.com) wrote: What about this: introduce a new type: typedef struct SizeParameter { uint64_t value; bool relative; } SizeParameter; When .relative is false, then .value is an absolute value, otherwise it's a relative value normalized to let's say 0x1 (so that this value equals 100%, and values below it 100% and above it 100%). Would you mind explaining this a bit more? I'm not sure if I understand this correctly, especially the 100% and %100 parts. It doesn't seem to be needed at all. You always need the info from statvfs anyway, if the value is a percentage. If not, the value can be used as-is. Well, basically what I am saying is that you should not store a *percentage*, but a value relative to UINT32_MAX+1. e.g.0% would map to value=0 50% would map to (UINT32_MAX+1)/2 100% would map to UINT32_MAX+1 120% would map to ((UINT32_MAX+1)*6)/5 200% would map to (UINT32_MAX+1)*2 Or to put this differently, consider .value a fixed point number with 32bit before and 32bit after the point... The point is simply that 0..100 is a weird range on computers, that calculate in binary. Hence expose 0..100 in the UI, but internally calculate with something more appropriate. Then add new helper calls: int size_parameter_from_string(const char *s, SizeParameter *ret); uint64 size_parameter_evaluate(SizeParameter *p, uint64_t base); The latter should return .value as-is if p-relative is false, and (base * .value) 32 otherwise. Why is base needed here? base is the value you get from statfs. The idea is basically that instead of storing just an absolute value, you store either a relative or an absolute value, and remember which one in a boolean. And then, when you actually need to evaluate things you pass the statvfs data in and it will translate the relative value to an absolute value -- but only at the time you actually need it. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] fsckd needs to go
2015-05-22 20:23 GMT+08:00 Martin Pitt martin.p...@ubuntu.com: Hello Lennart, sorry for the late answer, got stuck in different things in the past two weeks.. Lennart Poettering [2015-04-28 17:33 +0200]: On Fri, 03.04.15 14:58, Lennart Poettering (lenn...@poettering.net) wrote: systemd-fsckd would try to connect to some AF_UNIX/SOCK_STREAM socket in the fs, after forking and before execing fsck in the child, and pass the connected socket to fsck via the -C switch. If the socket is not connectable it would avoid any -C switch. With this simple change you can make this work for you: simply write a daemon (outside of systemd) that listens on that sockets and reads the progress data from it. Using SO_PEERCRED you can query which fsck PID this is from and use it to kill it. You could even add this to ply natively if you wish, since it's kinda strange to bump this all off another daemon in the middle, unnecessarily. I implemented this now, and removed fsckd in the progress. The progress data is now available on /run/systemd/fsck.progress which should be an AF_UNIX/SOCK_STREAM socket. Great, thanks! This works fine, it's very similar to what Didier did before. I. e. fsckd essentially works almost unmodified (except for adjusting the socket path). So we'll maintain that patch downstream now. It makes maintaining translations harder, but so be it. Please test this, I only did some artifical testing myself, since I don't use file systems that require fsck anymore myself. Neither do I, but there's always test/mocks/fsck which works very nicely. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel Hey, Just mention it, we've implemented similar fsck progress report in LOonux3[1] several years ago. FYI: * http://lists.freedesktop.org/archives/systemd-devel/2011-June/002654.html * patch for systemd: https://github.com/cee1/systemd/commit/c04c709880f0619434ff58580609300d892f281b * patch for plymouth: https://github.com/cee1/plymouth/commit/5be1bb7751b547fe5c125a42c3f2fe607568fa0f -- 1. http://dev.lemote.com/category/loonux3 Regards, - cee1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] nspawn: be verbose about interface names
Allowed interface name is relatively small. Lets not make users go in to the source code to figure out what happened. --machine=debian-tree conflicts with --machine=debian-tree2 ex: Failed to add new veth \ interfaces (host0, vb-debian-tree): File exists --- src/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 5009363..646edea 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2627,7 +2627,7 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ], int *ifi) { r = sd_rtnl_call(rtnl, m, 0, NULL); if (r 0) -return log_error_errno(r, Failed to add new veth interfaces: %m); +return log_error_errno(r, Failed to add new veth interfaces (host0, %s): %m, iface_name); i = (int) if_nametoindex(iface_name); if (i = 0) -- 2.1.4 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] Remove accelerometer helper
It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 - 5 files changed, 323 deletions(-) delete mode 100644 rules/61-accelerometer.rules delete mode 12 src/udev/accelerometer/Makefile delete mode 100644 src/udev/accelerometer/accelerometer.c diff --git a/.gitignore b/.gitignore index d2f1a1f..0eaa65f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /GRTAGS /GSYMS /GTAGS -/accelerometer /ata_id /bootctl /build-aux diff --git a/Makefile.am b/Makefile.am index f84a28d..90a78a9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4087,21 +4087,6 @@ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules # --- --- -accelerometer_SOURCES = \ - src/udev/accelerometer/accelerometer.c - -accelerometer_LDADD = \ - libudev-internal.la \ - libsystemd-internal.la \ - libsystemd-shared.la - -udevlibexec_PROGRAMS += \ - accelerometer - -dist_udevrules_DATA += \ - rules/61-accelerometer.rules - -# --- --- if ENABLE_GUDEV if ENABLE_GTK_DOC SUBDIRS += \ diff --git a/rules/61-accelerometer.rules b/rules/61 -accelerometer.rules deleted file mode 100644 index a6a2bfd..000 --- a/rules/61-accelerometer.rules +++ /dev/null @@ -1,3 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM==input, ACTION!=remove, ENV{ID_INPUT_ACCELEROMETER}==1, IMPORT{program}=accelerometer %p diff --git a/src/udev/accelerometer/Makefile b/src/udev/accelerometer/Makefile deleted file mode 12 index d0b0e8e..000 --- a/src/udev/accelerometer/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c deleted file mode 100644 index 9e2c590..000 --- a/src/udev/accelerometer/accelerometer.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * accelerometer - exports device orientation through property - * - * When an change event is received on an accelerometer, - * open its device node, and from the value, as well as the previous - * value of the property, calculate the device's new orientation, - * and export it as ID_INPUT_ACCELEROMETER_ORIENTATION. - * - * Possible values are: - * undefined - * * normal - * * bottom-up - * * left-up - * * right-up - * - * The property will be persistent across sessions, and the new - * orientations can be deducted from the previous one (it allows - * for a threshold for switching between opposite ends of the - * orientation). - * - * Copyright (C) 2011 Red Hat, Inc. - * Author: - * Bastien Nocera had...@hadess.net - * - * orientation_calc() from the sensorfw package - * Copyright (C) 2009-2010 Nokia Corporation - * Authors: - * Üstün Ergenoglu ext-ustun.ergeno...@nokia.com - * Timo Rongas ext-timo.2.ron...@nokia.com - * Lihan Guo lihan@digia.com - * - * This program 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include stdio.h -#include string.h -#include math.h -#include stdlib.h -#include getopt.h -#include limits.h -#include linux/input.h - -#include libudev.h -#include libudev-private.h - -/* we must use this kernel-compatible implementation */ -#define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define BIT(x) (1ULOFF(x)) -#define LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array)((array[LONG(bit)] OFF(bit)) 1) - -typedef enum { -ORIENTATION_UNDEFINED, -ORIENTATION_NORMAL, -ORIENTATION_BOTTOM_UP, -ORIENTATION_LEFT_UP, -ORIENTATION_RIGHT_UP -} OrientationUp; - -static const char *orientations[] = { -undefined, -normal, -bottom-up, -left-up, -right-up, -NULL -}; - -#define ORIENTATION_UP_UP ORIENTATION_NORMAL - -#define DEFAULT_THRESHOLD 250 -#define RADIANS_TO_DEGREES 180.0/M_PI -#define SAME_AXIS_LIMIT 5 - -#define THRESHOLD_LANDSCAPE 25 -#define
Re: [systemd-devel] fsckd needs to go
Hello Lennart, sorry for the late answer, got stuck in different things in the past two weeks.. Lennart Poettering [2015-04-28 17:33 +0200]: On Fri, 03.04.15 14:58, Lennart Poettering (lenn...@poettering.net) wrote: systemd-fsckd would try to connect to some AF_UNIX/SOCK_STREAM socket in the fs, after forking and before execing fsck in the child, and pass the connected socket to fsck via the -C switch. If the socket is not connectable it would avoid any -C switch. With this simple change you can make this work for you: simply write a daemon (outside of systemd) that listens on that sockets and reads the progress data from it. Using SO_PEERCRED you can query which fsck PID this is from and use it to kill it. You could even add this to ply natively if you wish, since it's kinda strange to bump this all off another daemon in the middle, unnecessarily. I implemented this now, and removed fsckd in the progress. The progress data is now available on /run/systemd/fsck.progress which should be an AF_UNIX/SOCK_STREAM socket. Great, thanks! This works fine, it's very similar to what Didier did before. I. e. fsckd essentially works almost unmodified (except for adjusting the socket path). So we'll maintain that patch downstream now. It makes maintaining translations harder, but so be it. Please test this, I only did some artifical testing myself, since I don't use file systems that require fsck anymore myself. Neither do I, but there's always test/mocks/fsck which works very nicely. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 - 5 files changed, 323 deletions(-) delete mode 100644 rules/61-accelerometer.rules delete mode 12 src/udev/accelerometer/Makefile delete mode 100644 src/udev/accelerometer/accelerometer.c diff --git a/.gitignore b/.gitignore index d2f1a1f..0eaa65f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /GRTAGS /GSYMS /GTAGS -/accelerometer /ata_id /bootctl /build-aux diff --git a/Makefile.am b/Makefile.am index f84a28d..90a78a9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4087,21 +4087,6 @@ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules # --- --- -accelerometer_SOURCES = \ - src/udev/accelerometer/accelerometer.c - -accelerometer_LDADD = \ - libudev-internal.la \ - libsystemd-internal.la \ - libsystemd-shared.la - -udevlibexec_PROGRAMS += \ - accelerometer - -dist_udevrules_DATA += \ - rules/61-accelerometer.rules - -# --- --- if ENABLE_GUDEV if ENABLE_GTK_DOC SUBDIRS += \ diff --git a/rules/61-accelerometer.rules b/rules/61 -accelerometer.rules deleted file mode 100644 index a6a2bfd..000 --- a/rules/61-accelerometer.rules +++ /dev/null @@ -1,3 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM==input, ACTION!=remove, ENV{ID_INPUT_ACCELEROMETER}==1, IMPORT{program}=accelerometer %p diff --git a/src/udev/accelerometer/Makefile b/src/udev/accelerometer/Makefile deleted file mode 12 index d0b0e8e..000 --- a/src/udev/accelerometer/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c deleted file mode 100644 index 9e2c590..000 --- a/src/udev/accelerometer/accelerometer.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * accelerometer - exports device orientation through property - * - * When an change event is received on an accelerometer, - * open its device node, and from the value, as well as the previous - * value of the property, calculate the device's new orientation, - * and export it as ID_INPUT_ACCELEROMETER_ORIENTATION. - * - * Possible values are: - * undefined - * * normal - * * bottom-up - * * left-up - * * right-up - * - * The property will be persistent across sessions, and the new - * orientations can be deducted from the previous one (it allows - * for a threshold for switching between opposite ends of the - * orientation). - * - * Copyright (C) 2011 Red Hat, Inc. - * Author: - * Bastien Nocera had...@hadess.net - * - * orientation_calc() from the sensorfw package - * Copyright (C) 2009-2010 Nokia Corporation - * Authors: - * Üstün Ergenoglu ext-ustun.ergeno...@nokia.com - * Timo Rongas ext-timo.2.ron...@nokia.com - * Lihan Guo lihan@digia.com - * - * This program 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include stdio.h -#include string.h -#include math.h -#include stdlib.h -#include getopt.h -#include limits.h -#include linux/input.h - -#include libudev.h -#include libudev-private.h - -/* we must use this kernel-compatible implementation */ -#define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define BIT(x) (1ULOFF(x)) -#define LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array)((array[LONG(bit)] OFF(bit)) 1) - -typedef enum { -ORIENTATION_UNDEFINED, -ORIENTATION_NORMAL, -ORIENTATION_BOTTOM_UP, -ORIENTATION_LEFT_UP, -ORIENTATION_RIGHT_UP -} OrientationUp; - -static const char
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Fri, 2015-05-22 at 17:00 +0200, Tom Gundersen wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? It was released as 1.0 today, so, no, I don't expect all distros to have it, in fact, I don't expect any to have it ;) It probably doesn't hurt leaving it in systemd for now, but I wanted to be sure to post the patch as early as possible. Cheers ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] 220 tarball erroneously ships keyboard-keys-from-name.gperf
Hello, while packaging 220, I got the audit related build failure that was already reported [1], but also another one: | In file included from ../src/udev/udev-builtin-keyboard.c:29:0: | ./src/udev/keyboard-keys-from-name.h: In function 'keyboard_lookup_key': | ./src/udev/keyboard-keys-from-name.h:253:21: error: 'KEY_NUMERIC_A' undeclared (first use in this function) |{numeric_a, KEY_NUMERIC_A}, | ^ | ./src/udev/keyboard-keys-from-name.h:253:21: note: each undeclared identifier is reported only once for each function it appears in | ./src/udev/keyboard-keys-from-name.h:275:21: error: 'KEY_NUMERIC_C' undeclared (first use in this function) |{numeric_c, KEY_NUMERIC_C}, | ^ | ./src/udev/keyboard-keys-from-name.h:347:21: error: 'KEY_NUMERIC_D' undeclared (first use in this function) |{numeric_d, KEY_NUMERIC_D}, | ^ | ./src/udev/keyboard-keys-from-name.h:420:21: error: 'KEY_NUMERIC_B' undeclared (first use in this function) |{numeric_b, KEY_NUMERIC_B}, | ^ | ./src/udev/keyboard-keys-from-name.h:464:26: error: 'KEY_ROTATE_DISPLAY' undeclared (first use in this function) |{rotate_display, KEY_ROTATE_DISPLAY}, This is because unlike 219 and earlier, the 220 tarball ships a pregenerated src/udev/keyboard-keys-from-name.gperf. In Debian sid, the above constants are not defined (in the kernel headers, I presume). I think src/udev/keyboard-keys-from-name.gperf is supposed to be built during package build? I see that somewhere between 219 and 220 this happened in Makefile.am: -CLEANFILES += \ - src/udev/keyboard-keys-from-name.gperf \ - src/udev/keyboard-keys.txt \ - src/udev/net/link-config-gperf.c but apparently this wasn't put back someplace else? Thanks, Martin [1] http://lists.freedesktop.org/archives/systemd-devel/2015-May/032148.html -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] nspawn: be verbose about interface names
Patchset imported to github. Pull request: https://github.com/systemd-devs/systemd/compare/master...systemd-mailing-devs:1432303329-9184-1-git-send-email-umut.tezduyar%40axis.com -- Generated by https://github.com/haraldh/mail2git ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] 220 tarball erroneously ships keyboard-keys-from-name.gperf
On Fri, May 22, 2015 at 05:28:01PM +0200, Martin Pitt wrote: Hello, while packaging 220, I got the audit related build failure that was already reported [1], but also another one: | In file included from ../src/udev/udev-builtin-keyboard.c:29:0: | ./src/udev/keyboard-keys-from-name.h: In function 'keyboard_lookup_key': | ./src/udev/keyboard-keys-from-name.h:253:21: error: 'KEY_NUMERIC_A' undeclared (first use in this function) |{numeric_a, KEY_NUMERIC_A}, | ^ | ./src/udev/keyboard-keys-from-name.h:253:21: note: each undeclared identifier is reported only once for each function it appears in | ./src/udev/keyboard-keys-from-name.h:275:21: error: 'KEY_NUMERIC_C' undeclared (first use in this function) |{numeric_c, KEY_NUMERIC_C}, | ^ | ./src/udev/keyboard-keys-from-name.h:347:21: error: 'KEY_NUMERIC_D' undeclared (first use in this function) |{numeric_d, KEY_NUMERIC_D}, | ^ | ./src/udev/keyboard-keys-from-name.h:420:21: error: 'KEY_NUMERIC_B' undeclared (first use in this function) |{numeric_b, KEY_NUMERIC_B}, | ^ | ./src/udev/keyboard-keys-from-name.h:464:26: error: 'KEY_ROTATE_DISPLAY' undeclared (first use in this function) |{rotate_display, KEY_ROTATE_DISPLAY}, This is because unlike 219 and earlier, the 220 tarball ships a pregenerated src/udev/keyboard-keys-from-name.gperf. In Debian sid, the above constants are not defined (in the kernel headers, I presume). I think src/udev/keyboard-keys-from-name.gperf is supposed to be built during package build? I see that somewhere between 219 and 220 this happened in Makefile.am: -CLEANFILES += \ - src/udev/keyboard-keys-from-name.gperf \ - src/udev/keyboard-keys.txt \ - src/udev/net/link-config-gperf.c but apparently this wasn't put back someplace else? This was replaced by uniform rules for all gperf files. Those generic rules probably need fixing. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] 220: --disable-audit broken?
hello, while building 220 I get: In file included from src/journal/audit-type.c:32:0: src/journal/audit_type-to-name.h: In function 'audit_type_to_string': src/journal/audit_type-to-name.h:23:14: error: 'AUDIT_USER_AUTH' undeclared (first use in this function) case AUDIT_USER_AUTH: return USER_AUTH; ^ [...bunch of errors like above...] Makefile:17228: recipe for target 'src/journal/libsystemd_la-audit-type.lo' failed make[3]: *** [src/journal/libsystemd_la-audit-type.lo] Error 1 Makefile:19901: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 Makefile:9976: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/balducci/tmp/install-us-d/systemd-219.d/systemd-220' 219 built just fine with exactly the same build/install script I use for 220 Trying to run w/ --disable-audit doesn't fix things As far as I seem to understand, audit_type-to-name.h is *unconditionally* using macros defined in libaudit.h... Here is my configure call: ./configure --prefix=/usr \ --libdir=/usr/lib64 \ --sysconfdir=/etc \ --disable-nls \ --disable-silent-rules \ --with-rootprefix=/usr \ --with-rootlibdir=/usr/lib64 \ --with-dbuspolicydir=/usr/share/dbus-1/policy \ --with-dbussessionservicedir=/usr/share/dbus-1/services \ --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ --disable-manpages \ --disable-audit Am I missing something? thanks ciao gabriele ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages
Lennart Poettering lenn...@poettering.net writes: On Wed, 20.05.15 10:37, jsyna...@redhat.com (jsyna...@redhat.com) wrote: From: Jan Synacek jsyna...@redhat.com Allow certain configuration options to be specified as percentages. For example, in journald.conf, SystemMaxUse= can now also be specified as 33%. There is a slight problem with the patch. It parses option names to determine what filesystem it should use to get the available space from. This approach is probably not the rigth thing to do, but I couldn't think of a better one. Another approach that came to my mind was to use the highest bit of the off_t value returned by the parser to indicate if the value was a percentage, or a normal value. This would require to rewrite a significant amount of code which now counts on the values being definite (not percentages), and would, IMHO, be hardly any improvement at all. What do you think? Is there a better way to implement this functionality? Is it a real problem to parse the option lvalues like that? Yes, it's ugly! Also, it's problematic since disk sizes and space change dynamically, hence evaluating this only when parsing is not enough. What about this: introduce a new type: typedef struct SizeParameter { uint64_t value; bool relative; } SizeParameter; When .relative is false, then .value is an absolute value, otherwise it's a relative value normalized to let's say 0x1 (so that this value equals 100%, and values below it 100% and above it 100%). Would you mind explaining this a bit more? I'm not sure if I understand this correctly, especially the 100% and %100 parts. It doesn't seem to be needed at all. You always need the info from statvfs anyway, if the value is a percentage. If not, the value can be used as-is. Then add new helper calls: int size_parameter_from_string(const char *s, SizeParameter *ret); uint64 size_parameter_evaluate(SizeParameter *p, uint64_t base); The latter should return .value as-is if p-relative is false, and (base * .value) 32 otherwise. Why is base needed here? THen, change the appropriate places to use SizeParameter instead of simple uint64_t where necessary, and use size_parameter_evaluate() with the data from statvfs when the actual value is required. Maybe I totally misunderstood your suggestion:) However, I tried to implement something similar and it turned out to be non-trivial, since there are quite a few places that need to be rewritten and tested, plus there is some duplicate code in coredump.c that needs the testing as well, so it may take a while. Lennart Cheers, -- 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
[systemd-devel] No cgroups in cpu,cpuacct despite autogrouping
In my kernel, there is CONFIG_SCHED_AUTOGROUP=y set. I believe that since systemd is capable of, and is doing grouping on its own, the kernel option has no effect. This seems reflected in /sys/fs/cgroups/cpu,cpuacct having no subdirectories: 12:34 ares40:../cgroup/cpu,cpuacct ls -Fax ./ ../ cgroup.clone_children cgroup.procs cgroup.sane_behavior cpu.cfs_period_uscpu.cfs_quota_us cpu.rt_period_us cpu.rt_runtime_uscpu.shares cpu.stat cpuacct.stat cpuacct.usagecpuacct.usage_percpu notify_on_release release_agent tasks As a result of this, all processes get equal shares, rather than all SID groups getting equal shares, causing BOINC to outmonopolize VirtualBox: /$ systemd-cgls ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 20 [...] └─user.slice └─user-25121.slice ├─session-3.scope │ ├─ 376 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2200 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2578 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 2826 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 3162 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 3697 SCREEN │ ├─ 3698 -/bin/bash │ ├─ 6070 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─ 6554 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... │ ├─14171 /usr/lib/virtualbox/VBoxXPCOMIPCD │ ├─14176 /usr/lib/virtualbox/VBoxSVC --auto-shutdown │ ├─14255 /usr/lib/virtualbox/VBoxNetDHCP --ip-address 192.168.100.100 --... │ ├─25859 boinc │ └─30167 ../../projects/boinc.fzk.de_poem/poempp_2.21_x86_64-pc-linux-gn... How would one re-enable the SID-style cpuacct grouping with systemd? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
Hi On Fri, May 22, 2015 at 5:10 PM, Bastien Nocera had...@hadess.net wrote: On Fri, 2015-05-22 at 17:00 +0200, Tom Gundersen wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? It was released as 1.0 today, so, no, I don't expect all distros to have it, in fact, I don't expect any to have it ;) Awesome! Much appreciated! I think we wanna do another systemd release soon (with the sd-bus/event exports), we can apply this patch afterwards then (with the gudev removal, too). Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel