From 3da8cf6436be569ff005907a5ee9c59b9ebf78d831a21f69e81e77c9306e8ce3 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Fri, 30 May 2014 11:13:04 +0000 Subject: [PATCH 01/43] Accepting request 235811 from home:rmilasan:branches:Base:System - Re-add persistent rules to have a backup option if predictable rules are disabled at boot time with 'net.ifnames=0' option. add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch - Re-add persistent rules to have a backup option if predictable rules are disabled at boot time with 'net.ifnames=0' option. add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch OBS-URL: https://build.opensuse.org/request/show/235811 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=649 --- 1021-udev-re-add-persistent-net-rules.patch | 501 ++++++ ...um-API-and-all-assumptions-about-seq.patch | 1443 +++++++++++++++++ systemd-mini.changes | 9 + systemd-mini.spec | 9 + systemd.changes | 9 + systemd.spec | 9 + 6 files changed, 1980 insertions(+) create mode 100644 1021-udev-re-add-persistent-net-rules.patch create mode 100644 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch diff --git a/1021-udev-re-add-persistent-net-rules.patch b/1021-udev-re-add-persistent-net-rules.patch new file mode 100644 index 00000000..b329e1a5 --- /dev/null +++ b/1021-udev-re-add-persistent-net-rules.patch @@ -0,0 +1,501 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -0,0 +1,105 @@ ++# do not edit this file, it will be overwritten on update ++ ++# these rules generate rules for persistent network device naming ++# ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++ACTION!="add", GOTO="persistent_net_generator_end" ++SUBSYSTEM!="net", GOTO="persistent_net_generator_end" ++ ++# ignore the interface if a name has already been set ++NAME=="?*", GOTO="persistent_net_generator_end" ++ ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}!="0", GOTO="persistent_net_generator_end" ++ ++# device name whitelist ++KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" ++ ++# ignore Xen virtual interfaces ++SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" ++ ++# read MAC address ++ENV{MATCHADDR}="$attr{address}" ++ ++# match interface type ++ENV{MATCHIFTYPE}="$attr{type}" ++ ++# ignore KVM virtual interfaces ++ENV{MATCHADDR}=="52:54:00:*", GOTO="persistent_net_generator_end" ++# ignore VMWare virtual interfaces ++ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" ++# ignore Hyper-V virtual interfaces ++ENV{MATCHADDR}=="00:15:5d:*", GOTO="persistent_net_generator_end" ++ ++# These vendors are known to violate the local MAC address assignment scheme ++# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom ++ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" ++# 3Com ++ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist" ++# 3Com IBM PC; Imagen; Valid; Cisco; Apple ++ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist" ++# Intel ++ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist" ++# Olivetti ++ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist" ++# CMC Masscomp; Silicon Graphics; Prime EXL ++ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist" ++# Prominet Corporation Gigabit Ethernet Switch ++ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist" ++# BTI (Bus-Tech, Inc.) IBM Mainframes ++ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist" ++# Realtek ++ENV{MATCHADDR}=="52:54:00:*", GOTO="globally_administered_whitelist" ++# Novell 2000 ++ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist" ++# Realtec ++ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist" ++# Kingston Technologies ++ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist" ++# Xensource ++ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" ++ ++# match interface dev_id ++ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++ ++# do not use "locally administered" MAC address ++ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" ++ ++# do not use empty address ++ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" ++ ++LABEL="globally_administered_whitelist" ++ ++# build comment line for generated rule: ++SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" ++SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" ++SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" ++ ++# ibmveth likes to use "locally administered" MAC addresses ++DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}", ENV{COMMENT}="ibmveth ($id)" ++ ++# S/390 uses id matches only, do not use MAC address match ++SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" ++ ++# see if we got enough data to create a rule ++ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", GOTO="persistent_net_generator_end" ++ ++# default comment ++ENV{COMMENT}=="", ENV{COMMENT}="net device ($attr{driver})" ++ ++# write rule ++DRIVERS=="?*", IMPORT{program}="write_net_rules" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ ++LABEL="persistent_net_generator_end" +Index: systemd-210/src/udev/rule_generator/rule_generator.functions +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/rule_generator.functions +@@ -0,0 +1,113 @@ ++# functions used by the udev rule generator ++ ++# Copyright (C) 2006 Marco d'Itri ++ ++# 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, see . ++ ++PATH='/usr/bin:/bin:/usr/sbin:/sbin' ++ ++# Read a single line from file $1 in the $DEVPATH directory. ++# The function must not return an error even if the file does not exist. ++sysread() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ local value ++ read value < "/sys$DEVPATH/$file" || return 0 ++ echo "$value" ++} ++ ++sysreadlink() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ readlink -f /sys$DEVPATH/$file 2> /dev/null || true ++} ++ ++# Return true if a directory is writeable. ++writeable() { ++ if ln -s test-link $1/.is-writeable 2> /dev/null; then ++ rm -f $1/.is-writeable ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++# Create a lock file for the current rules file. ++lock_rules_file() { ++ RUNDIR="/run/udev" ++ [ -e "$RUNDIR" ] || return 0 ++ ++ RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}" ++ ++ retry=30 ++ while ! mkdir $RULES_LOCK 2> /dev/null; do ++ if [ $retry -eq 0 ]; then ++ echo "Cannot lock $RULES_FILE!" >&2 ++ exit 2 ++ fi ++ sleep 1 ++ retry=$(($retry - 1)) ++ done ++} ++ ++unlock_rules_file() { ++ [ "$RULES_LOCK" ] || return 0 ++ rmdir $RULES_LOCK || true ++} ++ ++# Choose the real rules file if it is writeable or a temporary file if not. ++# Both files should be checked later when looking for existing rules. ++choose_rules_file() { ++ RUNDIR="/run/udev" ++ local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}" ++ [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 ++ ++ if writeable ${RULES_FILE%/*}; then ++ RO_RULES_FILE='/dev/null' ++ else ++ RO_RULES_FILE=$RULES_FILE ++ RULES_FILE=$tmp_rules_file ++ fi ++} ++ ++# Return the name of the first free device. ++raw_find_next_available() { ++ local links="$1" ++ ++ local basename=${links%%[ 0-9]*} ++ local max=-1 ++ for name in $links; do ++ local num=${name#$basename} ++ [ "$num" ] || num=0 ++ [ $num -gt $max ] && max=$num ++ done ++ ++ local max=$(($max + 1)) ++ # "name0" actually is just "name" ++ [ $max -eq 0 ] && return ++ echo "$max" ++} ++ ++# Find all rules matching a key (with action) and a pattern. ++find_all_rules() { ++ local key="$1" ++ local linkre="$2" ++ local match="$3" ++ ++ local search='.*[[:space:],]'"$key"'"('"$linkre"')".*' ++ echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \ ++ $RO_RULES_FILE \ ++ $([ -e $RULES_FILE ] && echo $RULES_FILE) \ ++ 2>/dev/null) ++} +Index: systemd-210/src/udev/rule_generator/write_net_rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/write_net_rules +@@ -0,0 +1,141 @@ ++#!/bin/sh -e ++ ++# This script is run to create persistent network device naming rules ++# based on properties of the device. ++# If the interface needs to be renamed, INTERFACE_NEW= will be printed ++# on stdout to allow udev to IMPORT it. ++ ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDEVID dev_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++# Copyright (C) 2006 Marco d'Itri ++# Copyright (C) 2007 Kay Sievers ++# ++# 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, see . ++ ++# debug, if UDEV_LOG= ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' ++ ++. /usr/lib/udev/rule_generator.functions ++ ++interface_name_taken() { ++ local value="$(find_all_rules 'NAME=' $INTERFACE)" ++ if [ "$value" ]; then ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++find_next_available() { ++ raw_find_next_available "$(find_all_rules 'NAME=' "$1")" ++} ++ ++write_rule() { ++ local match="$1" ++ local name="$2" ++ local comment="$3" ++ ++ { ++ if [ "$PRINT_HEADER" ]; then ++ PRINT_HEADER= ++ echo "# This file was automatically generated by the $0" ++ echo "# program, run by the persistent-net-generator.rules rules file." ++ echo "#" ++ echo "# You can modify it, as long as you keep each rule on a single" ++ echo "# line, and change only the value of the NAME= key." ++ fi ++ ++ echo "" ++ [ "$comment" ] && echo "# $comment" ++ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" ++ } >> $RULES_FILE ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++# Prevent concurrent processes from modifying the file at the same time. ++lock_rules_file ++ ++# Check if the rules file is writeable. ++choose_rules_file ++ ++# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces ++if [ "$MATCHADDR" ]; then ++ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" ++fi ++ ++if [ "$MATCHDRV" ]; then ++ match="$match, DRIVERS==\"$MATCHDRV\"" ++fi ++ ++if [ "$MATCHDEVID" ]; then ++ match="$match, ATTR{dev_id}==\"$MATCHDEVID\"" ++fi ++ ++if [ "$MATCHID" ]; then ++ match="$match, KERNELS==\"$MATCHID\"" ++fi ++ ++if [ "$MATCHIFTYPE" ]; then ++ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" ++fi ++ ++if [ -z "$match" ]; then ++ echo "missing valid match" >&2 ++ unlock_rules_file ++ exit 1 ++fi ++ ++basename=${INTERFACE%%[0-9]*} ++match="$match, KERNEL==\"$basename*\"" ++ ++if [ "$INTERFACE_NAME" ]; then ++ # external tools may request a custom name ++ COMMENT="$COMMENT (custom name provided by external tool)" ++ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then ++ INTERFACE=$INTERFACE_NAME; ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++else ++ # if a rule using the current name already exists, find a new name ++ if interface_name_taken; then ++ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" ++ # prevent INTERFACE from being "eth" instead of "eth0" ++ [ "$INTERFACE" = "${INTERFACE%%[ \[\]0-9]*}" ] && INTERFACE=${INTERFACE}0 ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++fi ++ ++write_rule "$match" "$INTERFACE" "$COMMENT" ++ ++unlock_rules_file ++ ++exit 0 +Index: systemd-210/Makefile.am +=================================================================== +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -2552,7 +2552,14 @@ dist_udevrules_DATA += \ + rules/75-tty-description.rules \ + rules/78-sound-card.rules \ + rules/80-net-setup-link.rules \ +- rules/95-udev-late.rules ++ rules/95-udev-late.rules \ ++ src/udev/rule_generator/75-persistent-net-generator.rules \ ++ src/udev/rule_generator/76-net-sriov-names.rules ++ ++udevlibexec_PROGRAMS += \ ++ src/udev/rule_generator/rule_generator.functions \ ++ src/udev/rule_generator/write_net_rules \ ++ src/udev/rule_generator/net-set-sriov-names + + dist_udevhwdb_DATA = \ + hwdb/20-pci-vendor-model.hwdb \ +Index: systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +@@ -0,0 +1,18 @@ ++# do not edit this file, it will be overwritten on update ++# ++# rename SRIOV virtual function interfaces ++ ++ACTION=="remove", GOTO="net-sriov-names_end" ++SUBSYSTEM!="net", GOTO="net-sriov-names_end" ++ ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}!="0", GOTO="net-sriov-names_end" ++ ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", NAME=="?*", ENV{INTERFACE_NEW}="$name" ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", IMPORT{program}="net-set-sriov-names" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ENV{INTERFACE_NEW}=="", DRIVERS=="cxgb4vf|igbvf|ixgbevf", NAME="vf$attr{ifindex}" ++ ++LABEL="net-sriov-names_end" +Index: systemd-210/src/udev/rule_generator/net-set-sriov-names +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/net-set-sriov-names +@@ -0,0 +1,79 @@ ++#!/bin/bash -e ++# ++# This script is run to rename virtual interfaces ++# ++ ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++# according to dev_new_index(), ifindex is within [1, INT_MAX] ++int_max=$(/usr/bin/getconf INT_MAX) ++ifindex_before() { ++ a=$1 ++ b=$2 ++ ++ ((0 < (b - a) && (b - a) < int_max / 2 || ++ -1 * int_max < (b - a) && (b - a) < -1 * int_max / 2)) ++} ++ ++rename_interface() { ++ local src_net=$1 ++ local dest_net=$2 ++ local err=0 ++ ++ /sbin/ip link set dev $src_net down ++ /sbin/ip link set dev $src_net name $dest_net ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++if [ -e "/sys/class/net/$INTERFACE/device/physfn" ]; then ++ pf=$(ls -1 "/sys/class/net/$INTERFACE/device/physfn/net") ++ if [ $(echo "$pf" | wc -l) -ne 1 ]; then ++ echo "too many pf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$INTERFACE/ifindex" ++ read pfindex < "/sys/class/net/$pf/ifindex" ++ if ifindex_before $pfindex $vfindex; then ++ bus_info=$(basename $(readlink "/sys/class/net/$INTERFACE/device")) ++ for virtfn in "/sys/class/net/$pf/device/"virtfn*; do ++ if [ "$(basename $(readlink "$virtfn"))" = "$bus_info" ]; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ echo "INTERFACE_NEW=$pf.vf$vfnum" ++ exit 0 ++ fi ++ done ++ fi ++fi ++ ++read pfindex < "/sys/class/net/$INTERFACE/ifindex" ++shopt -s nullglob ++for virtfn in "/sys/class/net/$INTERFACE/device/"virtfn*; do ++ vf=$(ls -1 "$virtfn/net") ++ if [ $(echo "$vf" | wc -l) -ne 1 ]; then ++ echo "too many vf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$vf/ifindex" ++ if ifindex_before $vfindex $pfindex; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ if [ "$INTERFACE_NEW" ]; then ++ new_name=$INTERFACE_NEW ++ else ++ new_name=$INTERFACE ++ fi ++ new_name="$new_name.vf$vfnum" ++ if [ "$vf" != "$new_name" ]; then ++ rename_interface "$vf" "$new_name" ++ fi ++ fi ++done diff --git a/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch new file mode 100644 index 00000000..db403e31 --- /dev/null +++ b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch @@ -0,0 +1,1443 @@ +From 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 12 Apr 2014 22:35:50 -0700 +Subject: [PATCH] udev: remove seqnum API and all assumptions about seqnums + +The way the kernel namespaces have been implemented breaks assumptions +udev made regarding uevent sequence numbers. Creating devices in a +namespace "steals" uevents and its sequence numbers from the host. It +confuses the "udevadmin settle" logic, which might block until util a +timeout is reached, even when no uevent is pending. + +Remove any assumptions about sequence numbers and deprecate libudev's +API exposing these numbers; none of that can reliably be used anymore +when namespaces are involved. + +Signed-off-by: Robert Milasan +--- + Makefile.am | 6 +- + man/udevadm.xml | 22 -- + src/libudev/libudev-monitor.c | 17 +- + src/libudev/libudev-queue-private.c | 406 ------------------------------------ + src/libudev/libudev-queue.c | 302 ++------------------------- + src/libudev/libudev.h | 10 +- + src/shared/udev-util.h | 2 - + src/test/test-libudev.c | 24 --- + src/udev/udev-ctrl.c | 2 +- + src/udev/udevadm-settle.c | 131 ++---------- + src/udev/udevd.c | 59 +++--- + 11 files changed, 84 insertions(+), 897 deletions(-) + delete mode 100644 src/libudev/libudev-queue-private.c + +Index: systemd-210/Makefile.am +=================================================================== +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -2520,8 +2520,7 @@ noinst_LTLIBRARIES += \ + + libudev_internal_la_SOURCES =\ + $(libudev_la_SOURCES) \ +- src/libudev/libudev-device-private.c \ +- src/libudev/libudev-queue-private.c ++ src/libudev/libudev-device-private.c + + libudev_internal_la_CFLAGS = \ + $(AM_CFLAGS) \ +@@ -5063,6 +5062,9 @@ test_libsystemd_sym_LDADD = \ + + test_libudev_sym_SOURCES = \ + test-libudev-sym.c ++test_libudev_sym_CFLAGS = \ ++ $(AM_CFLAGS) \ ++ -Wno-deprecated-declarations + test_libudev_sym_LDADD = \ + libudev.la + +Index: systemd-210/man/udevadm.xml +=================================================================== +--- systemd-210.orig/man/udevadm.xml ++++ systemd-210/man/udevadm.xml +@@ -339,21 +339,6 @@ + + + +- +- +- +- Wait only for events after the given sequence +- number. +- +- +- +- +- +- +- Wait only for events before the given sequence number. +- +- +- + + + +@@ -361,13 +346,6 @@ + + + +- +- +- +- Do not print any output, like the remaining queue entries when reaching the timeout. +- +- +- + + + +Index: systemd-210/src/libudev/libudev-monitor.c +=================================================================== +--- systemd-210.orig/src/libudev/libudev-monitor.c ++++ systemd-210/src/libudev/libudev-monitor.c +@@ -147,21 +147,6 @@ static bool udev_has_devtmpfs(struct ude + return false; + } + +-/* we consider udev running when we have running udev service */ +-static bool udev_has_service(struct udev *udev) { +- struct udev_queue *queue; +- bool active; +- +- queue = udev_queue_new(udev); +- if (!queue) +- return false; +- +- active = udev_queue_get_udev_is_active(queue); +- udev_queue_unref(queue); +- +- return active; +-} +- + struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd) + { + struct udev_monitor *udev_monitor; +@@ -185,7 +170,7 @@ struct udev_monitor *udev_monitor_new_fr + * We do not set a netlink multicast group here, so the socket + * will not receive any messages. + */ +- if (!udev_has_service(udev) && !udev_has_devtmpfs(udev)) { ++ if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) { + udev_dbg(udev, "the udev service seems not to be active, disable the monitor\n"); + group = UDEV_MONITOR_NONE; + } else +Index: systemd-210/src/libudev/libudev-queue-private.c +=================================================================== +--- systemd-210.orig/src/libudev/libudev-queue-private.c ++++ /dev/null +@@ -1,406 +0,0 @@ +-/*** +- This file is part of systemd. +- +- Copyright 2008-2012 Kay Sievers +- Copyright 2009 Alan Jenkins +- +- systemd is free software; you can redistribute it and/or modify it +- under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2.1 of the License, or +- (at your option) any later version. +- +- systemd 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 +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public License +- along with systemd; If not, see . +-***/ +- +-/* +- * DISCLAIMER - The file format mentioned here is private to udev/libudev, +- * and may be changed without notice. +- * +- * The udev event queue is exported as a binary log file. +- * Each log record consists of a sequence number followed by the device path. +- * +- * When a new event is queued, its details are appended to the log. +- * When the event finishes, a second record is appended to the log +- * with the same sequence number but a devpath len of 0. +- * +- * Example: +- * { 0x0000000000000001 } +- * { 0x0000000000000001, 0x0019, "/devices/virtual/mem/null" }, +- * { 0x0000000000000002, 0x001b, "/devices/virtual/mem/random" }, +- * { 0x0000000000000001, 0x0000 }, +- * { 0x0000000000000003, 0x0019, "/devices/virtual/mem/zero" }, +- * +- * Events 2 and 3 are still queued, but event 1 has finished. +- * +- * The queue does not grow indefinitely. It is periodically re-created +- * to remove finished events. Atomic rename() makes this transparent to readers. +- * +- * The queue file starts with a single sequence number which specifies the +- * minimum sequence number in the log that follows. Any events prior to this +- * sequence number have already finished. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "libudev.h" +-#include "libudev-private.h" +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export); +- +-struct udev_queue_export { +- struct udev *udev; +- int queued_count; /* number of unfinished events exported in queue file */ +- FILE *queue_file; +- unsigned long long int seqnum_max; /* earliest sequence number in queue file */ +- unsigned long long int seqnum_min; /* latest sequence number in queue file */ +- int waste_bytes; /* queue file bytes wasted on finished events */ +-}; +- +-struct udev_queue_export *udev_queue_export_new(struct udev *udev) +-{ +- struct udev_queue_export *udev_queue_export; +- unsigned long long int initial_seqnum; +- +- if (udev == NULL) +- return NULL; +- +- udev_queue_export = new0(struct udev_queue_export, 1); +- if (udev_queue_export == NULL) +- return NULL; +- udev_queue_export->udev = udev; +- +- initial_seqnum = udev_get_kernel_seqnum(udev); +- udev_queue_export->seqnum_min = initial_seqnum; +- udev_queue_export->seqnum_max = initial_seqnum; +- +- udev_queue_export_cleanup(udev_queue_export); +- if (rebuild_queue_file(udev_queue_export) != 0) { +- free(udev_queue_export); +- return NULL; +- } +- +- return udev_queue_export; +-} +- +-struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return NULL; +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- free(udev_queue_export); +- return NULL; +-} +- +-void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return; +- unlink("/run/udev/queue.tmp"); +- unlink("/run/udev/queue.bin"); +-} +- +-static int skip_to(FILE *file, long offset) +-{ +- long old_offset; +- +- /* fseek may drop buffered data, avoid it for small seeks */ +- old_offset = ftell(file); +- if (offset > old_offset && offset - old_offset <= BUFSIZ) { +- size_t skip_bytes = offset - old_offset; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, skip_bytes, 1, file) != skip_bytes) +- return -1; +- } +- +- return fseek(file, offset, SEEK_SET); +-} +- +-struct queue_devpaths { +- unsigned int devpaths_first; /* index of first queued event */ +- unsigned int devpaths_size; +- long devpaths[]; /* seqnum -> offset of devpath in queue file (or 0) */ +-}; +- +-/* +- * Returns a table mapping seqnum to devpath file offset for currently queued events. +- * devpaths[i] represents the event with seqnum = i + udev_queue_export->seqnum_min. +- */ +-static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_export) +-{ +- struct queue_devpaths *devpaths; +- unsigned long long int range; +- long devpath_offset; +- ssize_t devpath_len; +- unsigned long long int seqnum; +- unsigned long long int n; +- unsigned int i; +- +- /* seek to the first event in the file */ +- rewind(udev_queue_export->queue_file); +- udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum); +- +- /* allocate the table */ +- range = udev_queue_export->seqnum_min - udev_queue_export->seqnum_max; +- if (range - 1 > INT_MAX) { +- udev_err(udev_queue_export->udev, "queue file overflow\n"); +- return NULL; +- } +- devpaths = malloc0(sizeof(struct queue_devpaths) + (range + 1) * sizeof(long)); +- if (devpaths == NULL) +- return NULL; +- devpaths->devpaths_size = range + 1; +- +- /* read all records and populate the table */ +- for (;;) { +- if (udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum) < 0) +- break; +- n = seqnum - udev_queue_export->seqnum_max; +- if (n >= devpaths->devpaths_size) +- goto read_error; +- +- devpath_offset = ftell(udev_queue_export->queue_file); +- devpath_len = udev_queue_skip_devpath(udev_queue_export->queue_file); +- if (devpath_len < 0) +- goto read_error; +- +- if (devpath_len > 0) +- devpaths->devpaths[n] = devpath_offset; +- else +- devpaths->devpaths[n] = 0; +- } +- +- /* find first queued event */ +- for (i = 0; i < devpaths->devpaths_size; i++) { +- if (devpaths->devpaths[i] != 0) +- break; +- } +- devpaths->devpaths_first = i; +- +- return devpaths; +- +-read_error: +- udev_err(udev_queue_export->udev, "queue file corrupted\n"); +- free(devpaths); +- return NULL; +-} +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) +-{ +- unsigned long long int seqnum; +- struct queue_devpaths *devpaths = NULL; +- FILE *new_queue_file = NULL; +- unsigned int i; +- +- /* read old queue file */ +- if (udev_queue_export->queue_file != NULL) { +- devpaths = build_index(udev_queue_export); +- if (devpaths != NULL) +- udev_queue_export->seqnum_max += devpaths->devpaths_first; +- } +- if (devpaths == NULL) { +- udev_queue_export->queued_count = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- } +- +- /* create new queue file */ +- new_queue_file = fopen("/run/udev/queue.tmp", "w+e"); +- if (new_queue_file == NULL) +- goto error; +- seqnum = udev_queue_export->seqnum_max; +- fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file); +- +- /* copy unfinished events only to the new file */ +- if (devpaths != NULL) { +- for (i = devpaths->devpaths_first; i < devpaths->devpaths_size; i++) { +- char devpath[UTIL_PATH_SIZE]; +- int err; +- unsigned short devpath_len; +- +- if (devpaths->devpaths[i] != 0) +- { +- skip_to(udev_queue_export->queue_file, devpaths->devpaths[i]); +- err = udev_queue_read_devpath(udev_queue_export->queue_file, devpath, sizeof(devpath)); +- devpath_len = err; +- +- fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file); +- fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file); +- fwrite(devpath, 1, devpath_len, new_queue_file); +- } +- seqnum++; +- } +- free(devpaths); +- devpaths = NULL; +- } +- fflush(new_queue_file); +- if (ferror(new_queue_file)) +- goto error; +- +- /* rename the new file on top of the old one */ +- if (rename("/run/udev/queue.tmp", "/run/udev/queue.bin") != 0) +- goto error; +- +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = new_queue_file; +- udev_queue_export->waste_bytes = 0; +- +- return 0; +- +-error: +- udev_err(udev_queue_export->udev, "failed to create queue file: %m\n"); +- udev_queue_export_cleanup(udev_queue_export); +- +- if (udev_queue_export->queue_file != NULL) { +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- } +- if (new_queue_file != NULL) +- fclose(new_queue_file); +- +- if (devpaths != NULL) +- free(devpaths); +- udev_queue_export->queued_count = 0; +- udev_queue_export->waste_bytes = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- +- return -1; +-} +- +-static int write_queue_record(struct udev_queue_export *udev_queue_export, +- unsigned long long int seqnum, const char *devpath, size_t devpath_len) +-{ +- unsigned short len; +- +- if (udev_queue_export->queue_file == NULL) +- return -1; +- +- if (fwrite(&seqnum, sizeof(unsigned long long int), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- +- len = (devpath_len < USHRT_MAX) ? devpath_len : USHRT_MAX; +- if (fwrite(&len, sizeof(unsigned short), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- if (len > 0) { +- if (fwrite(devpath, 1, len, udev_queue_export->queue_file) != len) +- goto write_error; +- } +- +- /* *must* flush output; caller may fork */ +- if (fflush(udev_queue_export->queue_file) != 0) +- goto write_error; +- +- return 0; +- +-write_error: +- /* if we failed half way through writing a record to a file, +- we should not try to write any further records to it. */ +- udev_err(udev_queue_export->udev, "error writing to queue file: %m\n"); +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- +- return -1; +-} +- +-enum device_state { +- DEVICE_QUEUED, +- DEVICE_FINISHED, +-}; +- +-static inline size_t queue_record_size(size_t devpath_len) +-{ +- return sizeof(unsigned long long int) + sizeof(unsigned short int) + devpath_len; +-} +- +-static int update_queue(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- unsigned long long int seqnum = udev_device_get_seqnum(udev_device); +- const char *devpath = NULL; +- size_t devpath_len = 0; +- int bytes; +- int err; +- +- /* FINISHED records have a zero length devpath */ +- if (state == DEVICE_QUEUED) { +- devpath = udev_device_get_devpath(udev_device); +- devpath_len = strlen(devpath); +- } +- +- /* recover from an earlier failed rebuild */ +- if (udev_queue_export->queue_file == NULL) { +- if (rebuild_queue_file(udev_queue_export) != 0) +- return -1; +- } +- +- /* if we're removing the last event from the queue, that's the best time to rebuild it */ +- if (state != DEVICE_QUEUED && udev_queue_export->queued_count == 1) { +- /* we don't need to read the old queue file */ +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- rebuild_queue_file(udev_queue_export); +- return 0; +- } +- +- /* try to rebuild the queue files before they grow larger than one page. */ +- bytes = ftell(udev_queue_export->queue_file) + queue_record_size(devpath_len); +- if ((udev_queue_export->waste_bytes > bytes / 2) && bytes > 4096) +- rebuild_queue_file(udev_queue_export); +- +- /* don't record a finished event, if we already dropped the event in a failed rebuild */ +- if (seqnum < udev_queue_export->seqnum_max) +- return 0; +- +- /* now write to the queue */ +- if (state == DEVICE_QUEUED) { +- udev_queue_export->queued_count++; +- udev_queue_export->seqnum_min = seqnum; +- } else { +- udev_queue_export->waste_bytes += queue_record_size(devpath_len) + queue_record_size(0); +- udev_queue_export->queued_count--; +- } +- err = write_queue_record(udev_queue_export, seqnum, devpath, devpath_len); +- +- /* try to handle ENOSPC */ +- if (err != 0 && udev_queue_export->queued_count == 0) { +- udev_queue_export_cleanup(udev_queue_export); +- err = rebuild_queue_file(udev_queue_export); +- } +- +- return err; +-} +- +-static int update(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- if (update_queue(udev_queue_export, udev_device, state) != 0) +- return -1; +- +- return 0; +-} +- +-int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_QUEUED); +-} +- +-int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_FINISHED); +-} +Index: systemd-210/src/libudev/libudev-queue.c +=================================================================== +--- systemd-210.orig/src/libudev/libudev-queue.c ++++ systemd-210/src/libudev/libudev-queue.c +@@ -24,8 +24,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + +@@ -36,10 +34,7 @@ + * SECTION:libudev-queue + * @short_description: access to currently active events + * +- * The udev daemon processes events asynchronously. All events which do not have +- * interdependencies run in parallel. This exports the current state of the +- * event processing queue, and the current event sequence numbers from the kernel +- * and the udev daemon. ++ * This exports the current state of the udev processing queue. + */ + + /** +@@ -50,7 +45,6 @@ + struct udev_queue { + struct udev *udev; + int refcount; +- struct udev_list queue_list; + }; + + /** +@@ -72,9 +66,9 @@ _public_ struct udev_queue *udev_queue_n + udev_queue = new0(struct udev_queue, 1); + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount = 1; + udev_queue->udev = udev; +- udev_list_init(udev, &udev_queue->queue_list, false); + return udev_queue; + } + +@@ -90,6 +84,7 @@ _public_ struct udev_queue *udev_queue_r + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount++; + return udev_queue; + } +@@ -107,10 +102,11 @@ _public_ struct udev_queue *udev_queue_u + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount--; + if (udev_queue->refcount > 0) + return NULL; +- udev_list_cleanup(&udev_queue->queue_list); ++ + free(udev_queue); + return NULL; + } +@@ -130,141 +126,30 @@ _public_ struct udev *udev_queue_get_ude + return udev_queue->udev; + } + +-unsigned long long int udev_get_kernel_seqnum(struct udev *udev) +-{ +- unsigned long long int seqnum; +- int fd; +- char buf[32]; +- ssize_t len; +- +- fd = open("/sys/kernel/uevent_seqnum", O_RDONLY|O_CLOEXEC); +- if (fd < 0) +- return 0; +- len = read(fd, buf, sizeof(buf)); +- close(fd); +- if (len <= 2) +- return 0; +- buf[len-1] = '\0'; +- seqnum = strtoull(buf, NULL, 10); +- return seqnum; +-} +- + /** + * udev_queue_get_kernel_seqnum: + * @udev_queue: udev queue context + * +- * Get the current kernel event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- +- if (udev_queue == NULL) +- return -EINVAL; +- +- seqnum = udev_get_kernel_seqnum(udev_queue->udev); +- return seqnum; +-} +- +-int udev_queue_read_seqnum(FILE *queue_file, unsigned long long int *seqnum) +-{ +- if (fread(seqnum, sizeof(unsigned long long int), 1, queue_file) != 1) +- return -1; +- + return 0; + } + +-ssize_t udev_queue_skip_devpath(FILE *queue_file) +-{ +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) == 1) { +- char *devpath = alloca(len); +- +- /* use fread to skip, fseek might drop buffered data */ +- if (fread(devpath, 1, len, queue_file) == len) +- return len; +- } +- +- return -1; +-} +- +-ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t size) +-{ +- unsigned short int read_bytes = 0; +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) != 1) +- return -1; +- +- read_bytes = (len < size - 1) ? len : size - 1; +- if (fread(devpath, 1, read_bytes, queue_file) != read_bytes) +- return -1; +- devpath[read_bytes] = '\0'; +- +- /* if devpath was too long, skip unread characters */ +- if (read_bytes != len) { +- unsigned short int skip_bytes = len - read_bytes; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, 1, skip_bytes, queue_file) != skip_bytes) +- return -1; +- } +- +- return read_bytes; +-} +- +-static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long int *seqnum_start) +-{ +- FILE *queue_file; +- +- queue_file = fopen("/run/udev/queue.bin", "re"); +- if (queue_file == NULL) +- return NULL; +- +- if (udev_queue_read_seqnum(queue_file, seqnum_start) < 0) { +- udev_err(udev_queue->udev, "corrupt queue file\n"); +- fclose(queue_file); +- return NULL; +- } +- +- return queue_file; +-} +- + /** + * udev_queue_get_udev_seqnum: + * @udev_queue: udev queue context + * +- * Get the last known udev event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_udev; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 0; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- if (devpath_len > 0) +- seqnum_udev = seqnum; +- } +- +- fclose(queue_file); +- return seqnum_udev; ++ return 0; + } + + /** +@@ -277,15 +162,7 @@ _public_ unsigned long long int udev_que + **/ + _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_start; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_start); +- if (queue_file == NULL) +- return 0; +- +- fclose(queue_file); +- return 1; ++ return access("/run/udev/control", F_OK) >= 0; + } + + /** +@@ -298,48 +175,7 @@ _public_ int udev_queue_get_udev_is_acti + **/ + _public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_kernel; +- unsigned long long int seqnum_udev = 0; +- int queued = 0; +- int is_empty = 0; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 1; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- if (devpath_len > 0) { +- queued++; +- seqnum_udev = seqnum; +- } else { +- queued--; +- } +- } +- +- if (queued > 0) +- goto out; +- +- seqnum_kernel = udev_queue_get_kernel_seqnum(udev_queue); +- if (seqnum_udev < seqnum_kernel) +- goto out; +- +- is_empty = 1; +- +-out: +- fclose(queue_file); +- return is_empty; ++ return access("/run/udev/queue", F_OK) >= 0; + } + + /** +@@ -348,63 +184,15 @@ out: + * @start: first event sequence number + * @end: last event sequence number + * +- * Check if udev is currently processing any events in a given sequence number range. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if any of the sequence numbers in the given range is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, + unsigned long long int start, unsigned long long int end) + { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- int unfinished; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return 1; +- if (start < seqnum) +- start = seqnum; +- if (start > end) { +- fclose(queue_file); +- return 1; +- } +- if (end - start > INT_MAX - 1) { +- fclose(queue_file); +- return -EOVERFLOW; +- } +- +- /* +- * we might start with 0, and handle the initial seqnum +- * only when we find an entry in the queue file +- **/ +- unfinished = end - start; +- +- do { +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- /* +- * we might start with an empty or re-build queue file, where +- * the initial seqnum is not recorded as finished +- */ +- if (start == seqnum && devpath_len > 0) +- unfinished++; +- +- if (devpath_len == 0) { +- if (seqnum >= start && seqnum <= end) +- unfinished--; +- } +- } while (unfinished > 0); +- +- fclose(queue_file); +- +- return (unfinished == 0); ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** +@@ -412,69 +200,25 @@ _public_ int udev_queue_get_seqnum_seque + * @udev_queue: udev queue context + * @seqnum: sequence number + * +- * Check if udev is currently processing a given sequence number. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if the given sequence number is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) + { +- if (!udev_queue_get_seqnum_sequence_is_finished(udev_queue, seqnum, seqnum)) +- return 0; +- +- return 1; ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** + * udev_queue_get_queued_list_entry: + * @udev_queue: udev queue context + * +- * Get the first entry of the list of queued events. ++ * This function is deprecated. + * +- * Returns: a udev_list_entry. ++ * Returns: NULL. + **/ + _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return NULL; +- udev_list_cleanup(&udev_queue->queue_list); +- +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return NULL; +- +- for (;;) { +- char syspath[UTIL_PATH_SIZE]; +- char *s; +- size_t l; +- ssize_t len; +- char seqnum_str[32]; +- struct udev_list_entry *list_entry; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- snprintf(seqnum_str, sizeof(seqnum_str), "%llu", seqnum); +- +- s = syspath; +- l = strpcpy(&s, sizeof(syspath), "/sys"); +- len = udev_queue_read_devpath(queue_file, s, l); +- if (len < 0) +- break; +- +- if (len > 0) { +- udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str); +- } else { +- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) { +- if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) { +- udev_list_entry_delete(list_entry); +- break; +- } +- } +- } +- } +- fclose(queue_file); +- +- return udev_list_get_entry(&udev_queue->queue_list); ++ return NULL; + } +Index: systemd-210/src/libudev/libudev.h +=================================================================== +--- systemd-210.orig/src/libudev/libudev.h ++++ systemd-210/src/libudev/libudev.h +@@ -170,14 +170,14 @@ struct udev_queue *udev_queue_ref(struct + struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue); + struct udev *udev_queue_get_udev(struct udev_queue *udev_queue); + struct udev_queue *udev_queue_new(struct udev *udev); +-unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue); +-unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue); ++unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); ++unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); + int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); +-int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum); ++int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) __attribute__ ((deprecated)); + int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, +- unsigned long long int start, unsigned long long int end); +-struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue); ++ unsigned long long int start, unsigned long long int end) __attribute__ ((deprecated)); ++struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + + /* + * udev_hwdb +Index: systemd-210/src/shared/udev-util.h +=================================================================== +--- systemd-210.orig/src/shared/udev-util.h ++++ systemd-210/src/shared/udev-util.h +@@ -31,7 +31,6 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); +-DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); + + #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) + #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) +@@ -40,5 +39,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ + #define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) + #define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) + #define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp) +-#define _cleanup_udev_queue_unref_ _cleanup_(udev_queue_unrefp) + #define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup) +Index: systemd-210/src/test/test-libudev.c +=================================================================== +--- systemd-210.orig/src/test/test-libudev.c ++++ systemd-210/src/test/test-libudev.c +@@ -303,38 +303,14 @@ out: + + static int test_queue(struct udev *udev) { + struct udev_queue *udev_queue; +- unsigned long long int seqnum; +- struct udev_list_entry *list_entry; + + udev_queue = udev_queue_new(udev); + if (udev_queue == NULL) + return -1; +- seqnum = udev_queue_get_kernel_seqnum(udev_queue); +- printf("seqnum kernel: %llu\n", seqnum); +- seqnum = udev_queue_get_udev_seqnum(udev_queue); +- printf("seqnum udev : %llu\n", seqnum); + + if (udev_queue_get_queue_is_empty(udev_queue)) + printf("queue is empty\n"); +- printf("get queue list\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); +- printf("get queue list again\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); + +- list_entry = udev_queue_get_queued_list_entry(udev_queue); +- if (list_entry != NULL) { +- printf("event [%llu] is queued\n", seqnum); +- seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10); +- if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum)) +- printf("event [%llu] is not finished\n", seqnum); +- else +- printf("event [%llu] is finished\n", seqnum); +- } +- printf("\n"); + udev_queue_unref(udev_queue); + return 0; + } +Index: systemd-210/src/udev/udev-ctrl.c +=================================================================== +--- systemd-210.orig/src/udev/udev-ctrl.c ++++ systemd-210/src/udev/udev-ctrl.c +@@ -275,7 +275,7 @@ static int ctrl_send(struct udev_ctrl *u + + pfd[0].fd = uctrl->sock; + pfd[0].events = POLLIN; +- r = poll(pfd, 1, timeout * 1000); ++ r = poll(pfd, 1, timeout * MSEC_PER_SEC); + if (r < 0) { + if (errno == EINTR) + continue; +Index: systemd-210/src/udev/udevadm-settle.c +=================================================================== +--- systemd-210.orig/src/udev/udevadm-settle.c ++++ systemd-210/src/udev/udevadm-settle.c +@@ -41,42 +41,28 @@ + static void help(void) { + printf("Usage: udevadm settle OPTIONS\n" + " -t,--timeout= maximum time to wait for events\n" +- " -s,--seq-start= first seqnum to wait for\n" +- " -e,--seq-end= last seqnum to wait for\n" + " -E,--exit-if-exists= stop waiting if file exists\n" +- " -q,--quiet do not print list after timeout\n" + " -h,--help\n\n"); + } + + static int adm_settle(struct udev *udev, int argc, char *argv[]) + { + static const struct option options[] = { +- { "seq-start", required_argument, NULL, 's' }, +- { "seq-end", required_argument, NULL, 'e' }, ++ { "seq-start", required_argument, NULL, '\0' }, /* removed */ ++ { "seq-end", required_argument, NULL, '\0' }, /* removed */ + { "timeout", required_argument, NULL, 't' }, + { "exit-if-exists", required_argument, NULL, 'E' }, +- { "quiet", no_argument, NULL, 'q' }, ++ { "quiet", no_argument, NULL, 'q' }, /* removed */ + { "help", no_argument, NULL, 'h' }, + {} + }; +- usec_t start_usec = now(CLOCK_MONOTONIC); +- usec_t start = 0; +- usec_t end = 0; +- int quiet = 0; + const char *exists = NULL; + unsigned int timeout = 120; + struct pollfd pfd[1] = { {.fd = -1}, }; +- _cleanup_udev_queue_unref_ struct udev_queue *udev_queue = NULL; + int rc = EXIT_FAILURE, c; + +- while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) ++ while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) { + switch (c) { +- case 's': +- start = strtoull(optarg, NULL, 0); +- break; +- case 'e': +- end = strtoull(optarg, NULL, 0); +- break; + case 't': { + int r; + +@@ -91,9 +77,6 @@ static int adm_settle(struct udev *udev, + case 'E': + exists = optarg; + break; +- case 'q': +- quiet = 1; +- break; + case 'h': + help(); + exit(EXIT_SUCCESS); +@@ -102,44 +85,13 @@ static int adm_settle(struct udev *udev, + default: + assert_not_reached("Unknown argument"); + } ++ } + + if (optind < argc) { + fprintf(stderr, "Extraneous argument: '%s'\n", argv[optind]); + exit(EXIT_FAILURE); + } + +- udev_queue = udev_queue_new(udev); +- if (udev_queue == NULL) +- exit(2); +- +- if (start > 0) { +- unsigned long long kernel_seq; +- +- kernel_seq = udev_queue_get_kernel_seqnum(udev_queue); +- +- /* unless specified, the last event is the current kernel seqnum */ +- if (end == 0) +- end = udev_queue_get_kernel_seqnum(udev_queue); +- +- if (start > end) { +- log_error("seq-start larger than seq-end, ignoring"); +- start = 0; +- end = 0; +- } +- +- if (start > kernel_seq || end > kernel_seq) { +- log_error("seq-start or seq-end larger than current kernel value, ignoring"); +- start = 0; +- end = 0; +- } +- log_debug("start=%llu end=%llu current=%llu", (unsigned long long)start, (unsigned long long)end, kernel_seq); +- } else { +- if (end > 0) { +- log_error("seq-end needs seq-start parameter, ignoring"); +- end = 0; +- } +- } +- + /* guarantee that the udev daemon isn't pre-processing */ + if (getuid() == 0) { + struct udev_ctrl *uctrl; +@@ -160,73 +112,34 @@ static int adm_settle(struct udev *udev, + pfd[0].fd = inotify_init1(IN_CLOEXEC); + if (pfd[0].fd < 0) { + log_error("inotify_init failed: %m"); +- } else { +- if (inotify_add_watch(pfd[0].fd, "/run/udev" , IN_MOVED_TO) < 0) { +- log_error("watching /run/udev failed"); +- close(pfd[0].fd); +- pfd[0].fd = -1; +- } ++ goto out; + } + +- for (;;) { +- struct stat statbuf; ++ if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { ++ log_debug("watching /run/udev failed"); ++ goto out; ++ } + +- if (exists != NULL && stat(exists, &statbuf) == 0) { ++ for (;;) { ++ if (exists && access(exists, F_OK) >= 0) { + rc = EXIT_SUCCESS; + break; + } + +- if (start > 0) { +- /* if asked for, wait for a specific sequence of events */ +- if (udev_queue_get_seqnum_sequence_is_finished(udev_queue, start, end) == 1) { +- rc = EXIT_SUCCESS; +- break; +- } +- } else { +- /* exit if queue is empty */ +- if (udev_queue_get_queue_is_empty(udev_queue)) { +- rc = EXIT_SUCCESS; +- break; +- } +- } +- +- if (pfd[0].fd >= 0) { +- int delay; +- +- if (exists != NULL || start > 0) +- delay = 100; +- else +- delay = 1000; +- /* wake up after delay, or immediately after the queue is rebuilt */ +- if (poll(pfd, 1, delay) > 0 && pfd[0].revents & POLLIN) { +- char buf[sizeof(struct inotify_event) + PATH_MAX]; +- +- read(pfd[0].fd, buf, sizeof(buf)); +- } +- } else { +- sleep(1); ++ /* exit if queue is empty */ ++ if (access("/run/udev/queue", F_OK) < 0) { ++ rc = EXIT_SUCCESS; ++ break; + } + +- if (timeout > 0) { +- usec_t age_usec; ++ /* wake up when "queue" file is deleted */ ++ if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN) { ++ char buf[sizeof(struct inotify_event) + PATH_MAX]; + +- age_usec = now(CLOCK_MONOTONIC) - start_usec; +- if (age_usec / (1000 * 1000) >= timeout) { +- struct udev_list_entry *list_entry; +- +- if (!quiet && udev_queue_get_queued_list_entry(udev_queue) != NULL) { +- log_debug("timeout waiting for udev queue"); +- printf("\nudevadm settle - timeout of %i seconds reached, the event queue contains:\n", timeout); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf(" %s (%s)\n", +- udev_list_entry_get_name(list_entry), +- udev_list_entry_get_value(list_entry)); +- } +- +- break; +- } ++ read(pfd[0].fd, buf, sizeof(buf)); + } + } ++ + out: + if (pfd[0].fd >= 0) + close(pfd[0].fd); +@@ -236,5 +149,5 @@ out: + const struct udevadm_cmd udevadm_settle = { + .name = "settle", + .cmd = adm_settle, +- .help = "wait for the event queue to finish", ++ .help = "wait for pending udev events", + }; +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -61,7 +61,6 @@ void udev_main_log(struct udev *udev, in + } + + static struct udev_rules *rules; +-static struct udev_queue_export *udev_queue_export; + static struct udev_ctrl *udev_ctrl; + static struct udev_monitor *monitor; + static int worker_watch[2] = { -1, -1 }; +@@ -140,14 +139,9 @@ static inline struct worker *node_to_wor + return container_of(node, struct worker, node); + } + +-static void event_queue_delete(struct event *event, bool export) ++static void event_queue_delete(struct event *event) + { + udev_list_node_remove(&event->node); +- +- if (export) { +- udev_queue_export_device_finished(udev_queue_export, event->dev); +- log_debug("seq %llu done with %i", udev_device_get_seqnum(event->dev), event->exitcode); +- } + udev_device_unref(event->dev); + free(event); + } +@@ -226,7 +220,6 @@ static void worker_new(struct event *eve + free(worker); + worker_list_cleanup(udev); + event_queue_cleanup(udev, EVENT_UNDEF); +- udev_queue_export_unref(udev_queue_export); + udev_monitor_unref(monitor); + udev_ctrl_unref(udev_ctrl); + close(fd_signal); +@@ -477,7 +470,6 @@ static int event_queue_insert(struct ude + event->nodelay = true; + #endif + +- udev_queue_export_device_queued(udev_queue_export, dev); + log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), + udev_device_get_action(dev), udev_device_get_subsystem(dev)); + +@@ -608,7 +600,7 @@ static void event_queue_cleanup(struct u + if (match_type != EVENT_UNDEF && match_type != event->state) + continue; + +- event_queue_delete(event, false); ++ event_queue_delete(event); + } + } + +@@ -633,7 +625,7 @@ static void worker_returned(int fd_worke + /* worker returned */ + if (worker->event) { + worker->event->exitcode = msg.exitcode; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + if (worker->state != WORKER_KILLED) +@@ -825,7 +817,8 @@ static void handle_signal(struct udev *u + log_error("worker [%u] failed while handling '%s'", + pid, worker->event->devpath); + worker->event->exitcode = -32; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + } +@@ -1104,14 +1097,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024); +- +- /* create queue file before signalling 'ready', to make sure we block 'settle' */ +- udev_queue_export = udev_queue_export_new(udev); +- if (udev_queue_export == NULL) { +- log_error("error creating queue file"); +- goto exit; +- } ++ udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024); + + if (daemonize) { + pid_t pid; +@@ -1269,12 +1255,12 @@ int main(int argc, char *argv[]) + worker_kill(udev); + + /* exit after all has cleaned up */ +- if (udev_list_node_is_empty(&event_list) && udev_list_node_is_empty(&worker_list)) ++ if (udev_list_node_is_empty(&event_list) && children == 0) + break; + + /* timeout at exit for workers to finish */ +- timeout = 30 * 1000; +- } else if (udev_list_node_is_empty(&event_list) && !children) { ++ timeout = 30 * MSEC_PER_SEC; ++ } else if (udev_list_node_is_empty(&event_list) && children == 0) { + /* we are idle */ + timeout = -1; + +@@ -1283,8 +1269,20 @@ int main(int argc, char *argv[]) + cg_kill(SYSTEMD_CGROUP_CONTROLLER, udev_cgroup, SIGKILL, false, true, NULL); + } else { + /* kill idle or hanging workers */ +- timeout = 3 * 1000; ++ timeout = 3 * MSEC_PER_SEC; + } ++ ++ /* tell settle that we are busy or idle */ ++ if (!udev_list_node_is_empty(&event_list)) { ++ int fd; ++ ++ fd = open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); ++ if (fd >= 0) ++ close(fd); ++ } else { ++ unlink("/run/udev/queue"); ++ } ++ + fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), timeout); + if (fdcount < 0) + continue; +@@ -1311,18 +1309,18 @@ int main(int argc, char *argv[]) + if (worker->state != WORKER_RUNNING) + continue; + +- if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) { + log_error("worker [%u] %s timeout; kill it", worker->pid, + worker->event ? worker->event->devpath : ""); + kill(worker->pid, SIGKILL); + worker->state = WORKER_KILLED; ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + if (worker->event) { +- log_error("seq %llu '%s' killed", +- udev_device_get_seqnum(worker->event->dev), worker->event->devpath); ++ log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath); + worker->event->exitcode = -64; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + } +@@ -1345,7 +1343,7 @@ int main(int argc, char *argv[]) + } + + /* check for changed config, every 3 seconds at most */ +- if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * USEC_PER_SEC) { + if (udev_rules_check_timestamp(rules)) + reload = true; + if (udev_builtin_validate(udev)) +@@ -1420,8 +1418,8 @@ int main(int argc, char *argv[]) + + rc = EXIT_SUCCESS; + exit: +- udev_queue_export_cleanup(udev_queue_export); + udev_ctrl_cleanup(udev_ctrl); ++ unlink("/run/udev/queue"); + exit_daemonize: + if (fd_ep >= 0) + close(fd_ep); +@@ -1436,7 +1434,6 @@ exit_daemonize: + if (worker_watch[WRITE_END] >= 0) + close(worker_watch[WRITE_END]); + udev_monitor_unref(monitor); +- udev_queue_export_unref(udev_queue_export); + udev_ctrl_connection_unref(ctrl_conn); + udev_ctrl_unref(udev_ctrl); + label_finish(); diff --git a/systemd-mini.changes b/systemd-mini.changes index 70662ea3..9477cc57 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com + +- Re-add persistent rules to have a backup option if predictable + rules are disabled at boot time with 'net.ifnames=0' option. + add: 1021-udev-re-add-persistent-net-rules.patch +- udev: remove seqnum API and all assumptions about seqnums + add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue May 27 07:23:47 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 6c0acde3..88c5a306 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -558,6 +558,10 @@ Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch # PATCHFIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch +# PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch +Patch1021: 1021-udev-re-add-persistent-net-rules.patch +# PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -989,6 +993,8 @@ cp %{SOURCE7} m4/ %patch1018 -p0 %patch1019 -p0 %patch1020 -p0 +%patch1021 -p1 +%patch1022 -p1 # ensure generate files are removed rm -f units/emergency.service @@ -1731,6 +1737,9 @@ exit 0 %{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule +%{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/rule_generator.functions +%{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules diff --git a/systemd.changes b/systemd.changes index 70662ea3..9477cc57 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com + +- Re-add persistent rules to have a backup option if predictable + rules are disabled at boot time with 'net.ifnames=0' option. + add: 1021-udev-re-add-persistent-net-rules.patch +- udev: remove seqnum API and all assumptions about seqnums + add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue May 27 07:23:47 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index f7024fae..17b10ce1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -553,6 +553,10 @@ Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch # PATCHFIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch +# PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch +Patch1021: 1021-udev-re-add-persistent-net-rules.patch +# PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -984,6 +988,8 @@ cp %{SOURCE7} m4/ %patch1018 -p0 %patch1019 -p0 %patch1020 -p0 +%patch1021 -p1 +%patch1022 -p1 # ensure generate files are removed rm -f units/emergency.service @@ -1726,6 +1732,9 @@ exit 0 %{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule +%{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/rule_generator.functions +%{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules From 6005e197358389b9ab56be59009d4d5dcd803c5e0335dc70fa6c41aefc327361 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Fri, 30 May 2014 12:08:42 +0000 Subject: [PATCH 02/43] Accepting request 235824 from home:rmilasan:branches:Base:System rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). OBS-URL: https://build.opensuse.org/request/show/235824 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=650 --- systemd-mini.changes | 2 +- systemd.changes | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 9477cc57..d61f0d1a 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -2,7 +2,7 @@ Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com - Re-add persistent rules to have a backup option if predictable - rules are disabled at boot time with 'net.ifnames=0' option. + rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch diff --git a/systemd.changes b/systemd.changes index 9477cc57..d61f0d1a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -2,7 +2,7 @@ Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com - Re-add persistent rules to have a backup option if predictable - rules are disabled at boot time with 'net.ifnames=0' option. + rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch From 2c74e752b5305033242d8bc9c93361b78579c50537cf6b552382b84ba52f16f5 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 14:25:18 +0000 Subject: [PATCH 03/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=651 --- ...irt-rework-container-detection-logic.patch | 159 ++++++++++++++++++ ...ice-name-in-the-message-about-missin.patch | 26 +++ ...de-mixed-for-systemd-nspawn-.service.patch | 26 +++ ...e-should-not-allow-files-ending-with.patch | 28 +++ ...-agent-Do-tell-what-directory-we-fai.patch | 26 +++ ...d-add-Plantronics-.Audio-mute-button.patch | 32 ++++ ...board-do-tell-on-which-device-EVIOCS.patch | 31 ++++ ...ev-always-close-lock-file-descriptor.patch | 48 ++++++ systemd.changes | 15 ++ systemd.spec | 25 +++ 10 files changed, 416 insertions(+) create mode 100644 0001-virt-rework-container-detection-logic.patch create mode 100644 0002-fsck-include-device-name-in-the-message-about-missin.patch create mode 100644 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch create mode 100644 0004-util-ignore_file-should-not-allow-files-ending-with.patch create mode 100644 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch create mode 100644 0007-keyboard-add-Plantronics-.Audio-mute-button.patch create mode 100644 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch create mode 100644 1024-udev-always-close-lock-file-descriptor.patch diff --git a/0001-virt-rework-container-detection-logic.patch b/0001-virt-rework-container-detection-logic.patch new file mode 100644 index 00000000..4adc20a2 --- /dev/null +++ b/0001-virt-rework-container-detection-logic.patch @@ -0,0 +1,159 @@ +Based on fdd25311706bd32580ec4d43211cdf4665d2f9de Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 28 May 2014 18:37:11 +0800 +Subject: [PATCH] virt: rework container detection logic + +Instead of accessing /proc/1/environ directly, trying to read the +$container variable from it, let's make PID 1 save the contents of that +variable to /run/systemd/container. This allows us to detect containers +without the need for CAP_SYS_PTRACE, which allows us to drop it from a +number of daemons and from the file capabilities of systemd-detect-virt. + +Also, don't consider chroot a container technology anymore. After all, +we don't consider file system namespaces container technology anymore, +and hence chroot() should be considered a container even less. +--- + Makefile.am | 3 --- + configure.ac | 2 -- + src/core/main.c | 12 ++++++++++++ + src/shared/virt.c | 48 ++++++++++++++++++++++++++++++------------------ + 4 files changed, 42 insertions(+), 23 deletions(-) + +diff --git Makefile.am Makefile.am +index 5b26bc3..f66ef42 100644 +--- Makefile.am ++++ Makefile.am +@@ -1798,9 +1798,6 @@ systemd_detect_virt_SOURCES = \ + systemd_detect_virt_LDADD = \ + libsystemd-shared.la + +-systemd-detect-virt-install-hook: +- -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt +- + INSTALL_EXEC_HOOKS += \ + systemd-detect-virt-install-hook + +--- configure.ac ++++ configure.ac 2014-06-03 14:16:45.046237826 +0000 +@@ -68,8 +68,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc]) + AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon]) + AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck]) + +-AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap]) +- + AC_PATH_PROG([KILL], [kill], [/usr/bin/kill]) + + AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod]) +diff --git src/core/main.c src/core/main.c +index 77cc2fb..d5d1ee2 100644 +--- src/core/main.c ++++ src/core/main.c +@@ -1261,6 +1261,16 @@ static int status_welcome(void) { + isempty(pretty_name) ? "Linux" : pretty_name); + } + ++static int write_container_id(void) { ++ const char *c; ++ ++ c = getenv("container"); ++ if (isempty(c)) ++ return 0; ++ ++ return write_string_file("/run/systemd/container", c); ++} ++ + int main(int argc, char *argv[]) { + Manager *m = NULL; + int r, retval = EXIT_FAILURE; +@@ -1544,6 +1554,8 @@ int main(int argc, char *argv[]) { + if (virtualization) + log_info("Detected virtualization '%s'.", virtualization); + ++ write_container_id(); ++ + log_info("Detected architecture '%s'.", architecture_to_string(uname_architecture())); + + if (in_initrd()) +diff --git src/shared/virt.c src/shared/virt.c +index 0db0514..1e227c5 100644 +--- src/shared/virt.c ++++ src/shared/virt.c +@@ -217,8 +217,8 @@ int detect_container(const char **id) { + static thread_local int cached_found = -1; + static thread_local const char *cached_id = NULL; + +- _cleanup_free_ char *e = NULL; +- const char *_id = NULL; ++ _cleanup_free_ char *m = NULL; ++ const char *_id = NULL, *e = NULL; + int r; + + if (_likely_(cached_found >= 0)) { +@@ -229,17 +229,6 @@ int detect_container(const char **id) { + return cached_found; + } + +- /* Unfortunately many of these operations require root access +- * in one way or another */ +- +- r = running_in_chroot(); +- if (r < 0) +- return r; +- if (r > 0) { +- _id = "chroot"; +- goto finish; +- } +- + /* /proc/vz exists in container and outside of the container, + * /proc/bc only outside of the container. */ + if (access("/proc/vz", F_OK) >= 0 && +@@ -249,11 +238,32 @@ int detect_container(const char **id) { + goto finish; + } + +- r = getenv_for_pid(1, "container", &e); +- if (r < 0) +- return r; +- if (r == 0) +- goto finish; ++ if (getpid() == 1) { ++ /* If we are PID 1 we can just check our own ++ * environment variable */ ++ ++ e = getenv("container"); ++ if (isempty(e)) { ++ r = 0; ++ goto finish; ++ } ++ } else { ++ ++ /* Otherwise, PID 1 dropped this information into a ++ * file in /run. This is better than accessing ++ * /proc/1/environ, since we don't need CAP_SYS_PTRACE ++ * for that. */ ++ ++ r = read_one_line_file("/run/systemd/container", &m); ++ if (r == -ENOENT) { ++ r = 0; ++ goto finish; ++ } ++ if (r < 0) ++ return r; ++ ++ e = m; ++ } + + /* We only recognize a selected few here, since we want to + * enforce a redacted namespace */ +@@ -266,6 +276,8 @@ int detect_container(const char **id) { + else + _id = "other"; + ++ r = 1; ++ + finish: + cached_found = r; + +-- +1.7.9.2 + diff --git a/0002-fsck-include-device-name-in-the-message-about-missin.patch b/0002-fsck-include-device-name-in-the-message-about-missin.patch new file mode 100644 index 00000000..7ec3506f --- /dev/null +++ b/0002-fsck-include-device-name-in-the-message-about-missin.patch @@ -0,0 +1,26 @@ +Based on 8d2a6145334257c8a9ceabc9dd52dff06cca818e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 26 May 2014 23:03:11 -0400 +Subject: [PATCH] fsck: include device name in the message about missing fsck + +--- + src/fsck/fsck.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- src/fsck/fsck.c ++++ src/fsck/fsck.c 2014-06-03 14:15:15.746235301 +0000 +@@ -284,10 +284,12 @@ int main(int argc, char *argv[]) { + r = access(checker, X_OK); + if (r < 0) { + if (errno == ENOENT) { +- log_info("%s doesn't exist, not checking file system.", checker); ++ log_info("%s doesn't exist, not checking file system on %s", ++ checker, device); + return EXIT_SUCCESS; + } else +- log_warning("%s cannot be used: %m", checker); ++ log_warning("%s cannot be used for %s: %m", ++ checker, device); + } + } + diff --git a/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch b/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch new file mode 100644 index 00000000..15c8d7f5 --- /dev/null +++ b/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch @@ -0,0 +1,26 @@ +From d8e40d62ab871a87fde421c4b246bb45bc3cbe2d Mon Sep 17 00:00:00 2001 +From: Jonathan Liu +Date: Thu, 29 May 2014 01:17:25 +1000 +Subject: [PATCH] units: use KillMode=mixed for systemd-nspawn@.service + +This causes the container to shut down cleanly when the service is +stopped. +--- + units/systemd-nspawn@.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git units/systemd-nspawn@.service.in units/systemd-nspawn@.service.in +index ff36e90..e373628 100644 +--- units/systemd-nspawn@.service.in ++++ units/systemd-nspawn@.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1) + + [Service] + ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i ++KillMode=mixed + Type=notify + + [Install] +-- +1.7.9.2 + diff --git a/0004-util-ignore_file-should-not-allow-files-ending-with.patch b/0004-util-ignore_file-should-not-allow-files-ending-with.patch new file mode 100644 index 00000000..a30b4c4f --- /dev/null +++ b/0004-util-ignore_file-should-not-allow-files-ending-with.patch @@ -0,0 +1,28 @@ +From 93f1a06374e335e8508d89e1bdaadf45be6ab777 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Sat, 31 May 2014 21:36:23 +0200 +Subject: [PATCH] util: ignore_file should not allow files ending with '~' + +ignore_file currently allows any file ending with '~' while it +seems that the opposite was intended: +a228a22fda4faa9ecb7c5a5e499980c8ae5d2a08 +--- + src/shared/util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/shared/util.c src/shared/util.c +index 0c27394..17b0ae1 100644 +--- src/shared/util.c ++++ src/shared/util.c +@@ -1371,7 +1371,7 @@ bool ignore_file(const char *filename) { + assert(filename); + + if (endswith(filename, "~")) +- return false; ++ return true; + + return ignore_file_allow_backup(filename); + } +-- +1.7.9.2 + diff --git a/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch b/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch new file mode 100644 index 00000000..aa77e4cc --- /dev/null +++ b/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch @@ -0,0 +1,26 @@ +From 267b3e41df5a2181f2911433539f81de2fa1511a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Thu, 29 May 2014 14:17:37 -0400 +Subject: [PATCH] tty-ask-password-agent: Do tell what directory we failed to + open + +--- + .../tty-ask-password-agent.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c +index 3203474..55a2215 100644 +--- src/tty-ask-password-agent/tty-ask-password-agent.c ++++ src/tty-ask-password-agent/tty-ask-password-agent.c +@@ -501,7 +501,7 @@ static int show_passwords(void) { + if (errno == ENOENT) + return 0; + +- log_error("opendir(): %m"); ++ log_error("opendir(/run/systemd/ask-password): %m"); + return -errno; + } + +-- +1.7.9.2 + diff --git a/0007-keyboard-add-Plantronics-.Audio-mute-button.patch b/0007-keyboard-add-Plantronics-.Audio-mute-button.patch new file mode 100644 index 00000000..53c701bd --- /dev/null +++ b/0007-keyboard-add-Plantronics-.Audio-mute-button.patch @@ -0,0 +1,32 @@ +From 9e3dbf6b2b99d0e16989d9cedb458729db5a60c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 1 Jun 2014 14:01:23 -0400 +Subject: [PATCH] keyboard: add Plantronics .Audio mute button + +https://bugs.freedesktop.org/show_bug.cgi?id=79495 +--- + hwdb/60-keyboard.hwdb | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb +index 05e6a04..d053766 100644 +--- hwdb/60-keyboard.hwdb ++++ hwdb/60-keyboard.hwdb +@@ -866,6 +866,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* + KEYBOARD_KEY_f3=volumeup + + ########################################################### ++# Plantronics ++########################################################### ++ ++# Plantronics .Audio 626 DSP ++keyboard:usb:v047fpC006* ++ KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute ++ ++########################################################### + # Quanta + ########################################################### + +-- +1.7.9.2 + diff --git a/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch b/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch new file mode 100644 index 00000000..75da64fa --- /dev/null +++ b/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch @@ -0,0 +1,31 @@ +From a52ec8ed881537627869afa8f0486db7e20ce2db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Fri, 30 May 2014 13:16:56 -0400 +Subject: [PATCH] udev-builtin-keyboard: do tell on which device EVIOCSKEYCODE + failed. + +I am getting + +"Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid +argument", the error message does not tell on which specific device the +problem is, add that info. +--- + src/udev/udev-builtin-keyboard.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/udev/udev-builtin-keyboard.c src/udev/udev-builtin-keyboard.c +index 614e44e..9b66bfd 100644 +--- src/udev/udev-builtin-keyboard.c ++++ src/udev/udev-builtin-keyboard.c +@@ -143,7 +143,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo + log_debug("keyboard: mapping scan code %d (0x%x) to key code %d (0x%x)", + map[i].scan, map[i].scan, map[i].key, map[i].key); + if (ioctl(fd, EVIOCSKEYCODE, &map[i]) < 0) +- log_error("Error calling EVIOCSKEYCODE (scan code 0x%x, key code %d): %m", map[i].scan, map[i].key); ++ log_error("Error calling EVIOCSKEYCODE on device node '%s' (scan code 0x%x, key code %d): %m", node, map[i].scan, map[i].key); + } + + /* install list of force-release codes */ +-- +1.7.9.2 + diff --git a/1024-udev-always-close-lock-file-descriptor.patch b/1024-udev-always-close-lock-file-descriptor.patch new file mode 100644 index 00000000..1ed41230 --- /dev/null +++ b/1024-udev-always-close-lock-file-descriptor.patch @@ -0,0 +1,48 @@ +From 3d06f4183470d42361303086ed9dedd29c0ffc1b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 3 Jun 2014 10:46:51 +0200 +Subject: [PATCH] udev: always close lock file descriptor + +https://bugs.freedesktop.org/show_bug.cgi?id=79576 +--- + src/udev/udevd.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git src/udev/udevd.c src/udev/udevd.c +index 1c9488e..819ea3b 100644 +--- src/udev/udevd.c ++++ src/udev/udevd.c +@@ -301,6 +301,7 @@ static void worker_new(struct event *event) + if (fd_lock >= 0 && flock(fd_lock, LOCK_SH|LOCK_NB) < 0) { + log_debug("Unable to flock(%s), skipping event handling: %m", udev_device_get_devnode(d)); + err = -EWOULDBLOCK; ++ fd_lock = safe_close(fd_lock); + goto skip; + } + } +@@ -317,8 +318,7 @@ static void worker_new(struct event *event) + udev_device_update_db(dev); + } + +- if (fd_lock >= 0) +- close(fd_lock); ++ safe_close(fd_lock); + + /* send processed event back to libudev listeners */ + udev_monitor_send_device(worker_monitor, NULL, dev); +@@ -377,10 +377,8 @@ skip: + } + out: + udev_device_unref(dev); +- if (fd_signal >= 0) +- close(fd_signal); +- if (fd_ep >= 0) +- close(fd_ep); ++ safe_close(fd_signal); ++ safe_close(fd_ep); + close(fd_inotify); + close(worker_watch[WRITE_END]); + udev_rules_unref(rules); +-- +1.7.9.2 + diff --git a/systemd.changes b/systemd.changes index d61f0d1a..2d39c6ed 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-virt-rework-container-detection-logic.patch + 0002-fsck-include-device-name-in-the-message-about-missin.patch + 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch + 0004-util-ignore_file-should-not-allow-files-ending-with.patch + 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +- Add upstream patches to update keyboard data base + 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +- Add upstream patches for udev + 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch + 1024-udev-always-close-lock-file-descriptor.patch + ------------------------------------------------------------------- Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 17b10ce1..472ce207 100644 --- a/systemd.spec +++ b/systemd.spec @@ -33,6 +33,7 @@ Summary: A System and Session Manager License: LGPL-2.1+ Group: System/Base BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: acl BuildRequires: audit-devel %if %{with compat_libs} # See gold_archs in binutils.spec @@ -506,6 +507,18 @@ Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch # PATCHFIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch262: 0001-virt-rework-container-detection-logic.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch # UDEV PATCHES # ============ @@ -557,6 +570,10 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch1024: 1024-udev-always-close-lock-file-descriptor.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -965,6 +982,12 @@ cp %{SOURCE7} m4/ %patch259 -p0 %patch260 -p0 %patch261 -p0 +%patch262 -p0 +%patch263 -p0 +%patch264 -p0 +%patch265 -p0 +%patch266 -p0 +%patch267 -p0 # udev patches %patch1001 -p1 @@ -990,6 +1013,8 @@ cp %{SOURCE7} m4/ %patch1020 -p0 %patch1021 -p1 %patch1022 -p1 +%patch1023 -p0 +%patch1024 -p0 # ensure generate files are removed rm -f units/emergency.service From 219b5d9da98e2b1daefc0fd4da6222f27d306714b79e9499c1a5c5c2fd8a4d67 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 14:52:37 +0000 Subject: [PATCH 04/43] Accepting request 236155 from home:sndirsch:branches:Base:System - apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm device (bnc#879767). OBS-URL: https://build.opensuse.org/request/show/236155 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=652 --- apply-ACL-for-nvidia-uvm-device-node.patch | 26 ++++++++++++++++++++++ systemd-mini.changes | 6 +++++ systemd-mini.spec | 3 +++ systemd.changes | 6 +++++ systemd.spec | 3 +++ 5 files changed, 44 insertions(+) create mode 100644 apply-ACL-for-nvidia-uvm-device-node.patch diff --git a/apply-ACL-for-nvidia-uvm-device-node.patch b/apply-ACL-for-nvidia-uvm-device-node.patch new file mode 100644 index 00000000..6471d229 --- /dev/null +++ b/apply-ACL-for-nvidia-uvm-device-node.patch @@ -0,0 +1,26 @@ +From c79437b7967cf5a23faa881bc5da6b88b63a1ada Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Tue, 3 Jun 2014 15:05:55 +0200 +Subject: [PATCH] apply ACL for nvidia-uvm device node + +set ACL on nvidia-uvm device (bnc#879767). +--- + src/login/logind-acl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c +index 54bc16b..a40af21 100644 +--- a/src/login/logind-acl.c ++++ b/src/login/logind-acl.c +@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev, + if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) + break; + } ++ /* required for additional CUDA support (nvidia-uvm module with appropriate device), bnc#879767 */ ++ devnode_acl("/dev/nvidia-uvm", flush, del, old_uid, add, new_uid); + } + + return r; +-- +1.8.4.5 + diff --git a/systemd-mini.changes b/systemd-mini.changes index d61f0d1a..c5e8aefa 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com + +- apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm + device (bnc#879767). + ------------------------------------------------------------------- Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 88c5a306..fc5190a7 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -189,6 +189,8 @@ Patch21: allow-multiple-sulogin-to-be-started.patch Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch # PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device +Patch28: apply-ACL-for-nvidia-uvm-device-node.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch # PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. @@ -810,6 +812,7 @@ cp %{SOURCE7} m4/ # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1 +%patch28 -p1 %patch37 -p1 %ifarch %arm %patch38 -p1 diff --git a/systemd.changes b/systemd.changes index 2d39c6ed..5267615a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com + +- apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm + device (bnc#879767). + ------------------------------------------------------------------- Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 472ce207..a7b3888c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -185,6 +185,8 @@ Patch21: allow-multiple-sulogin-to-be-started.patch Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch # PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device +Patch28: apply-ACL-for-nvidia-uvm-device-node.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch # PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. @@ -822,6 +824,7 @@ cp %{SOURCE7} m4/ # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1 +%patch28 -p1 %patch37 -p1 %ifarch %arm %patch38 -p1 From 4dd0a4a7fa528446b39c350d93663ce3ec2cbc2b99a029cd073cfd2111457ce3 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 14:53:17 +0000 Subject: [PATCH 05/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=653 --- systemd-mini.changes | 15 +++++++++++++++ systemd-mini.spec | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index c5e8aefa..5267615a 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -4,6 +4,21 @@ Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com - apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm device (bnc#879767). +------------------------------------------------------------------- +Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-virt-rework-container-detection-logic.patch + 0002-fsck-include-device-name-in-the-message-about-missin.patch + 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch + 0004-util-ignore_file-should-not-allow-files-ending-with.patch + 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +- Add upstream patches to update keyboard data base + 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +- Add upstream patches for udev + 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch + 1024-udev-always-close-lock-file-descriptor.patch + ------------------------------------------------------------------- Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index fc5190a7..1e956950 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -38,6 +38,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: %{real} = %{version}-%{release} +BuildRequires: acl BuildRequires: audit-devel %if %{with compat_libs} # See gold_archs in binutils.spec @@ -513,6 +514,18 @@ Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch # PATCHFIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch262: 0001-virt-rework-container-detection-logic.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch # UDEV PATCHES # ============ @@ -564,6 +577,10 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch1024: 1024-udev-always-close-lock-file-descriptor.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -973,6 +990,12 @@ cp %{SOURCE7} m4/ %patch259 -p0 %patch260 -p0 %patch261 -p0 +%patch262 -p0 +%patch263 -p0 +%patch264 -p0 +%patch265 -p0 +%patch266 -p0 +%patch267 -p0 # udev patches %patch1001 -p1 @@ -998,6 +1021,8 @@ cp %{SOURCE7} m4/ %patch1020 -p0 %patch1021 -p1 %patch1022 -p1 +%patch1023 -p0 +%patch1024 -p0 # ensure generate files are removed rm -f units/emergency.service From 27ff257b45f2305508601fcc7848d104153642c68af9e27bfb8467f82affff06 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 15:17:17 +0000 Subject: [PATCH 06/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=654 --- 1024-udev-always-close-lock-file-descriptor.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1024-udev-always-close-lock-file-descriptor.patch b/1024-udev-always-close-lock-file-descriptor.patch index 1ed41230..aea66faf 100644 --- a/1024-udev-always-close-lock-file-descriptor.patch +++ b/1024-udev-always-close-lock-file-descriptor.patch @@ -1,4 +1,4 @@ -From 3d06f4183470d42361303086ed9dedd29c0ffc1b Mon Sep 17 00:00:00 2001 +Based on 3d06f4183470d42361303086ed9dedd29c0ffc1b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 3 Jun 2014 10:46:51 +0200 Subject: [PATCH] udev: always close lock file descriptor @@ -16,7 +16,7 @@ index 1c9488e..819ea3b 100644 if (fd_lock >= 0 && flock(fd_lock, LOCK_SH|LOCK_NB) < 0) { log_debug("Unable to flock(%s), skipping event handling: %m", udev_device_get_devnode(d)); err = -EWOULDBLOCK; -+ fd_lock = safe_close(fd_lock); ++ close_nointr_nofail(fd_lock); fd_lock = -1; goto skip; } } @@ -26,7 +26,7 @@ index 1c9488e..819ea3b 100644 - if (fd_lock >= 0) - close(fd_lock); -+ safe_close(fd_lock); ++ close_nointr_nofail(fd_lock); /* send processed event back to libudev listeners */ udev_monitor_send_device(worker_monitor, NULL, dev); @@ -38,8 +38,8 @@ index 1c9488e..819ea3b 100644 - close(fd_signal); - if (fd_ep >= 0) - close(fd_ep); -+ safe_close(fd_signal); -+ safe_close(fd_ep); ++ close_nointr_nofail(fd_signal); ++ close_nointr_nofail(fd_ep); close(fd_inotify); close(worker_watch[WRITE_END]); udev_rules_unref(rules); From eb0eb3e60f26f85152e6ccfb7c58fdb329fc3632fafff0fa2880873bf106346e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 15:41:13 +0000 Subject: [PATCH 07/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=655 --- ...ev-always-close-lock-file-descriptor.patch | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/1024-udev-always-close-lock-file-descriptor.patch b/1024-udev-always-close-lock-file-descriptor.patch index aea66faf..aaa4b296 100644 --- a/1024-udev-always-close-lock-file-descriptor.patch +++ b/1024-udev-always-close-lock-file-descriptor.patch @@ -5,14 +5,12 @@ Subject: [PATCH] udev: always close lock file descriptor https://bugs.freedesktop.org/show_bug.cgi?id=79576 --- - src/udev/udevd.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) + src/udev/udevd.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -diff --git src/udev/udevd.c src/udev/udevd.c -index 1c9488e..819ea3b 100644 --- src/udev/udevd.c -+++ src/udev/udevd.c -@@ -301,6 +301,7 @@ static void worker_new(struct event *event) ++++ src/udev/udevd.c 2014-06-03 15:34:42.778346368 +0000 +@@ -301,6 +301,7 @@ static void worker_new(struct event *eve if (fd_lock >= 0 && flock(fd_lock, LOCK_SH|LOCK_NB) < 0) { log_debug("Unable to flock(%s), skipping event handling: %m", udev_device_get_devnode(d)); err = -EWOULDBLOCK; @@ -20,29 +18,24 @@ index 1c9488e..819ea3b 100644 goto skip; } } -@@ -317,8 +318,7 @@ static void worker_new(struct event *event) - udev_device_update_db(dev); +@@ -318,7 +319,7 @@ static void worker_new(struct event *eve } -- if (fd_lock >= 0) + if (fd_lock >= 0) - close(fd_lock); -+ close_nointr_nofail(fd_lock); ++ close_nointr_nofail(fd_lock); /* send processed event back to libudev listeners */ udev_monitor_send_device(worker_monitor, NULL, dev); -@@ -377,10 +377,8 @@ skip: - } +@@ -378,9 +379,9 @@ skip: out: udev_device_unref(dev); -- if (fd_signal >= 0) + if (fd_signal >= 0) - close(fd_signal); -- if (fd_ep >= 0) ++ close_nointr_nofail(fd_signal); + if (fd_ep >= 0) - close(fd_ep); -+ close_nointr_nofail(fd_signal); -+ close_nointr_nofail(fd_ep); ++ close_nointr_nofail(fd_ep); close(fd_inotify); close(worker_watch[WRITE_END]); udev_rules_unref(rules); --- -1.7.9.2 - From 6ee449814f02a417017d11d38fdc76d574f16669ef8642d05b351af4a520e782 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 3 Jun 2014 16:28:48 +0000 Subject: [PATCH 08/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=656 --- ...ibc-s-xattr-support-instead-of-requi.patch | 215 ++++++++++++++++++ keep-crypt-password-prompt.patch | 2 +- systemd-mini.changes | 18 ++ systemd-mini.spec | 8 +- systemd.changes | 18 ++ systemd.spec | 8 +- 6 files changed, 266 insertions(+), 3 deletions(-) create mode 100644 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch diff --git a/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch b/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch new file mode 100644 index 00000000..f8632b99 --- /dev/null +++ b/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch @@ -0,0 +1,215 @@ +Based on d2edfae0f9bdbecf6a8518e2a5bcf06f470e0d9e Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 28 May 2014 17:36:40 +0800 +Subject: [PATCH] build-sys: use glibc's xattr support instead of requiring + libattr + +--- + configure.ac | 53 ++----------------------------------------- + src/core/mount-setup.c | 2 - + src/core/socket.c | 4 --- + src/journal/journal-file.c | 7 ----- + src/journal/journal-vacuum.c | 10 -------- + src/shared/label.c | 2 - + src/shared/smack-util.c | 4 --- + 7 files changed, 7 insertions(+), 75 deletions(-) + +--- configure.ac ++++ configure.ac 2014-06-03 00:00:00.000000000 +0000 +@@ -526,44 +526,6 @@ AC_SUBST(ACL_LIBS) + AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) + + # ------------------------------------------------------------------------------ +-AC_ARG_ENABLE([xattr], +- AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]), +- [case "${enableval}" in +- yes) have_xattr=yes ;; +- no) have_xattr=no ;; +- *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;; +- esac], +- [have_xattr=auto]) +- +-if test "x${have_xattr}" != xno ; then +- AC_CHECK_HEADERS( +- [attr/xattr.h], +- [have_xattr=yes], +- [if test "x$have_xattr" = xyes ; then +- AC_MSG_ERROR([*** XATTR headers not found.]) +- fi]) +- +- AC_CHECK_LIB( +- [attr], +- [fsetxattr], +- [have_xattr=yes], +- [if test "x$have_xattr" = xyes ; then +- AC_MSG_ERROR([*** libattr not found.]) +- fi]) +- +- if test "x$have_xattr" = xyes ; then +- XATTR_LIBS="-lattr" +- AC_DEFINE(HAVE_XATTR, 1, [XATTR available]) +- else +- have_xattr=no +- fi +-else +- XATTR_LIBS= +-fi +-AC_SUBST(XATTR_LIBS) +-AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno]) +- +-# ------------------------------------------------------------------------------ + AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]), + [case "${enableval}" in + yes) have_smack=yes ;; +@@ -572,17 +534,9 @@ AC_ARG_ENABLE([smack], AS_HELP_STRING([- + esac], + [have_smack=auto]) + +-if test "x${have_xattr}" = xno; then +- if test "x${have_smack}" = xyes; then +- AC_MSG_ERROR(SMACK requires xattr support) +- else +- have_smack=no +- fi +-else +- if test "x${have_smack}" = xauto; then +- M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" +- have_smack=yes +- fi ++if test "x${have_smack}" = xauto; then ++ M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" ++ have_smack=yes + fi + + AC_ARG_WITH(smack-run-label, +@@ -1131,7 +1085,6 @@ AC_MSG_RESULT([ + SMACK: ${have_smack} + XZ: ${have_xz} + ACL: ${have_acl} +- XATTR: ${have_xattr} + GCRYPT: ${have_gcrypt} + QRENCODE: ${have_qrencode} + MICROHTTPD: ${have_microhttpd} +--- src/core/mount-setup.c ++++ src/core/mount-setup.c 2014-06-03 00:00:00.000000000 +0000 +@@ -93,10 +93,8 @@ static const MountPoint mount_table[] = + NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, + NULL, MNT_IN_CONTAINER }, +-#ifdef HAVE_XATTR + { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_IN_CONTAINER }, +-#endif + { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_IN_CONTAINER }, + { "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +--- src/core/socket.c ++++ src/core/socket.c 2014-06-03 00:00:00.000000000 +0000 +@@ -29,9 +29,7 @@ + #include + #include + #include +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "sd-event.h" + #include "log.h" +--- src/journal/journal-file.c ++++ src/journal/journal-file.c 2014-06-03 00:00:00.000000000 +0000 +@@ -26,10 +26,7 @@ + #include + #include + #include +- +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "journal-def.h" + #include "journal-file.h" +@@ -2515,7 +2512,6 @@ int journal_file_open( + } + + if (f->last_stat.st_size == 0 && f->writable) { +-#ifdef HAVE_XATTR + uint64_t crtime; + + /* Let's attach the creation time to the journal file, +@@ -2530,7 +2526,6 @@ int journal_file_open( + + crtime = htole64((uint64_t) now(CLOCK_REALTIME)); + fsetxattr(f->fd, "user.crtime_usec", &crtime, sizeof(crtime), XATTR_CREATE); +-#endif + + #ifdef HAVE_GCRYPT + /* Try to load the FSPRG state, and if we can't, then +--- src/journal/journal-vacuum.c ++++ src/journal/journal-vacuum.c 2014-06-03 00:00:00.000000000 +0000 +@@ -24,10 +24,7 @@ + #include + #include + #include +- +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "journal-def.h" + #include "journal-file.h" +@@ -79,11 +76,8 @@ static void patch_realtime( + unsigned long long *realtime) { + + usec_t x; +- +-#ifdef HAVE_XATTR + uint64_t crtime; + _cleanup_free_ const char *path = NULL; +-#endif + + /* The timestamp was determined by the file name, but let's + * see if the file might actually be older than the file name +@@ -106,7 +100,6 @@ static void patch_realtime( + if (x > 0 && x != (usec_t) -1 && x < *realtime) + *realtime = x; + +-#ifdef HAVE_XATTR + /* Let's read the original creation time, if possible. Ideally + * we'd just query the creation time the FS might provide, but + * unfortunately there's currently no sane API to query +@@ -125,7 +118,6 @@ static void patch_realtime( + if (crtime > 0 && crtime != (uint64_t) -1 && crtime < *realtime) + *realtime = crtime; + } +-#endif + } + + static int journal_file_empty(int dir_fd, const char *name) { +--- src/shared/label.c ++++ src/shared/label.c 2014-06-03 00:00:00.000000000 +0000 +@@ -27,9 +27,7 @@ + #include + #include + #include +-#ifdef HAVE_XATTR + #include +-#endif + #ifdef HAVE_SELINUX + #include + #include +--- src/shared/smack-util.c ++++ src/shared/smack-util.c 2014-06-03 00:00:00.000000000 +0000 +@@ -23,9 +23,7 @@ + + #include + #include +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "smack-util.h" + diff --git a/keep-crypt-password-prompt.patch b/keep-crypt-password-prompt.patch index 3caffec8..10ddf398 100644 --- a/keep-crypt-password-prompt.patch +++ b/keep-crypt-password-prompt.patch @@ -9,10 +9,10 @@ + struct dirent *de; + + if (!(d = opendir("/run/systemd/ask-password"))) { -+ log_error("opendir(): %m"); + + if (errno == ENOENT) + return 1; ++ log_error("opendir(/run/systemd/ask-password): %m"); + + return -errno; + } diff --git a/systemd-mini.changes b/systemd-mini.changes index 5267615a..d22a2a12 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -4,6 +4,24 @@ Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com - apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm device (bnc#879767). +------------------------------------------------------------------- +Tue Jun 3 15:56:01 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * fix keep-crypt-password-prompt.patch which floods the system + logs with bogus opendir failures, still the wrong thing to do however. + * Use %find_lang to collect locale files + * systemd-no-libattr.patch: systemd does not require libattr + but just sys/xattr.h, therefore drop the dependency. + (from upstream) + * Again, drop tcp-devel from buildRequires, this time it is not a + SUSE specific feature removal, tcpd supportdisappeared in systemd + 212 and we shouldn't keep it around. +- Add patch 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch + that is rename systemd-no-libattr.patch to git format +- Drop tcp-devel only for *next* openSUSE and not for SLES-12 nor + for openSUSE 13.1 + ------------------------------------------------------------------- Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 1e956950..27b205c5 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -60,7 +60,6 @@ BuildRequires: gtk-doc %endif BuildRequires: intltool BuildRequires: libacl-devel -BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libkmod-devel BuildRequires: libsepol-devel @@ -73,7 +72,9 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif +%if 0%{?suse_version} > 1315 BuildRequires: tcpd-devel +%endif BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 %if ! 0%{?bootstrap} @@ -526,6 +527,8 @@ Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch # UDEV PATCHES # ============ @@ -996,6 +999,7 @@ cp %{SOURCE7} m4/ %patch265 -p0 %patch266 -p0 %patch267 -p0 +%patch268 -p0 # udev patches %patch1001 -p1 @@ -1298,6 +1302,8 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +%find_lang systemd + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 diff --git a/systemd.changes b/systemd.changes index 5267615a..d22a2a12 100644 --- a/systemd.changes +++ b/systemd.changes @@ -4,6 +4,24 @@ Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com - apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm device (bnc#879767). +------------------------------------------------------------------- +Tue Jun 3 15:56:01 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * fix keep-crypt-password-prompt.patch which floods the system + logs with bogus opendir failures, still the wrong thing to do however. + * Use %find_lang to collect locale files + * systemd-no-libattr.patch: systemd does not require libattr + but just sys/xattr.h, therefore drop the dependency. + (from upstream) + * Again, drop tcp-devel from buildRequires, this time it is not a + SUSE specific feature removal, tcpd supportdisappeared in systemd + 212 and we shouldn't keep it around. +- Add patch 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch + that is rename systemd-no-libattr.patch to git format +- Drop tcp-devel only for *next* openSUSE and not for SLES-12 nor + for openSUSE 13.1 + ------------------------------------------------------------------- Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index a7b3888c..991319ac 100644 --- a/systemd.spec +++ b/systemd.spec @@ -55,7 +55,6 @@ BuildRequires: gtk-doc %endif BuildRequires: intltool BuildRequires: libacl-devel -BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libkmod-devel BuildRequires: libsepol-devel @@ -68,7 +67,9 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif +%if 0%{?suse_version} > 1315 BuildRequires: tcpd-devel +%endif BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 %if ! 0%{?bootstrap} @@ -521,6 +522,8 @@ Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +# PATCHFIX-UPSTREAM added at 2014/06/03 +Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch # UDEV PATCHES # ============ @@ -991,6 +994,7 @@ cp %{SOURCE7} m4/ %patch265 -p0 %patch266 -p0 %patch267 -p0 +%patch268 -p0 # udev patches %patch1001 -p1 @@ -1293,6 +1297,8 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +%find_lang systemd + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 From c0dc4c2f346c757920a1e6006f0981667a504bd15003db96ad4a09dd12a2cade Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 5 Jun 2014 06:57:37 +0000 Subject: [PATCH 09/43] Accepting request 236331 from home:elvigia:branches:Base:System - Correct the libseccomp distribution version test must be >= 13.1 - In order to use unit directive AppArmorProfile= libapparmor-devel must be present in buildRequires. - Correct the libseccomp distribution version test must be >= 13.1 - In order to use unit directive AppArmorProfile= libapparmor-devel must be present in buildRequires. OBS-URL: https://build.opensuse.org/request/show/236331 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=657 --- systemd-mini.changes | 7 +++++++ systemd-mini.spec | 3 ++- systemd.changes | 7 +++++++ systemd.spec | 3 ++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index d22a2a12..2b522a98 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org + +- Correct the libseccomp distribution version test must be >= 13.1 +- In order to use unit directive AppArmorProfile= libapparmor-devel + must be present in buildRequires. + ------------------------------------------------------------------- Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 27b205c5..c40ae1d6 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -100,11 +100,12 @@ BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 %endif -%if 0%{?suse_version} > 1310 +%if 0%{?suse_version} >= 1310 %ifarch %ix86 x86_64 x32 %arm BuildRequires: pkgconfig(libseccomp) %endif %endif +BuildRequires: libapparmor-devel BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 diff --git a/systemd.changes b/systemd.changes index d22a2a12..2b522a98 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org + +- Correct the libseccomp distribution version test must be >= 13.1 +- In order to use unit directive AppArmorProfile= libapparmor-devel + must be present in buildRequires. + ------------------------------------------------------------------- Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com diff --git a/systemd.spec b/systemd.spec index 991319ac..5310cc46 100644 --- a/systemd.spec +++ b/systemd.spec @@ -95,11 +95,12 @@ BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 %endif -%if 0%{?suse_version} > 1310 +%if 0%{?suse_version} >= 1310 %ifarch %ix86 x86_64 x32 %arm BuildRequires: pkgconfig(libseccomp) %endif %endif +BuildRequires: libapparmor-devel BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 From cfa3656e684f3f08226ee1209d02cac4fa9ee19196f0fa5c50fd00b7fa3e20d1 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 5 Jun 2014 08:47:12 +0000 Subject: [PATCH 10/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=658 --- ...etup-after-md-dmraid-lvm-are-started.patch | 45 ------------------- ...e-started-before-local-fs-pre-target.patch | 17 ------- ...assword-wall-starts-after-getty-tty1.patch | 11 +++-- systemd-mini.changes | 19 ++++++++ systemd-mini.spec | 42 +++++++++++++---- systemd.changes | 19 ++++++++ systemd.spec | 42 +++++++++++++---- 7 files changed, 111 insertions(+), 84 deletions(-) delete mode 100644 delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch delete mode 100644 ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch diff --git a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch deleted file mode 100644 index 1bde222f..00000000 --- a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Frederic Crozat -Date: Wed, 9 Nov 2011 11:10:49 +0100 -Subject: delay fsck / cryptsetup after md / dmraid are started - ---- - src/cryptsetup/cryptsetup-generator.c | 1 + - units/systemd-fsck@.service.in | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -Index: systemd-208/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-208.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-208/src/cryptsetup/cryptsetup-generator.c -@@ -119,6 +119,7 @@ static int create_disk( - "DefaultDependencies=no\n" - "BindsTo=dev-mapper-%i.device\n" - "IgnoreOnIsolate=true\n" -+ "After=md.service dmraid.service\n" - "After=systemd-readahead-collect.service systemd-readahead-replay.service\n", - f); - -Index: systemd-208/units/systemd-fsck@.service.in -=================================================================== ---- systemd-280.orig/units/systemd-fsck@.service.in -+++ systemd-280/units/systemd-fsck@.service.in -@@ -10,7 +10,7 @@ - Documentation=man:systemd-fsck@.service(8) - DefaultDependencies=no - BindsTo=%i.device --After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service md.service dmraid.service - Before=shutdown.target - - [Service] ---- systemd-280.orig/units/systemd-fsck-root.service.in -+++ systemd-280/units/systemd-fsck-root.service.in -@@ -9,7 +9,7 @@ - Description=File System Check on Root Device - Documentation=man:systemd-fsck-root.service(8) - DefaultDependencies=no --After=systemd-readahead-collect.service systemd-readahead-replay.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service md.service dmraid.service - Before=local-fs.target shutdown.target - - ConditionPathIsReadWrite=!/ diff --git a/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch b/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch deleted file mode 100644 index d53eb948..00000000 --- a/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Frederic Crozat -Date: Thu, 9 Feb 2012 16:19:38 +0000 -Subject: ensure DM and dmraid are started before local-fs-pre-target - -ensure md / dmraid is started before mounting partitions, -if fsck was disabled for them (bnc#733283). ---- - units/local-fs-pre.target | 1 + - 1 file changed, 1 insertion(+) - ---- systemd-206_git201308300826.orig/units/local-fs-pre.target -+++ systemd-206_git201308300826/units/local-fs-pre.target -@@ -9,3 +9,4 @@ - Description=Local File Systems (Pre) - Documentation=man:systemd.special(7) - RefuseManualStart=yes -+After=md.service dmraid.service diff --git a/ensure-ask-password-wall-starts-after-getty-tty1.patch b/ensure-ask-password-wall-starts-after-getty-tty1.patch index 17d2e05e..ac8dbcfd 100644 --- a/ensure-ask-password-wall-starts-after-getty-tty1.patch +++ b/ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -1,20 +1,23 @@ From: Frederic Crozat +Cc: Werner Fink Date: Wed, 24 Aug 2011 13:02:12 +0000 Subject: ensure ask-password-wall starts after getty@tty1 ensure passphrase is handled before starting getty on tty1. + --- - units/systemd-ask-password-wall.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + units/systemd-ask-password-wall.service.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) --- systemd-206_git201308300826.orig/units/systemd-ask-password-wall.service.in +++ systemd-206_git201308300826/units/systemd-ask-password-wall.service.in -@@ -8,7 +8,7 @@ +@@ -8,7 +8,8 @@ [Unit] Description=Forward Password Requests to Wall Documentation=man:systemd-ask-password-console.service(8) -After=systemd-user-sessions.service -+After=systemd-user-sessions.service getty@tty1.service ++Wants=getty.target ++After=systemd-user-sessions.service getty.target [Service] ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service diff --git a/systemd-mini.changes b/systemd-mini.changes index 2b522a98..1cff13ed 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * The patches + delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch and + ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch + indeed mention unit files which do not exist anymore. +- Make sure that systemd-ask-password-wall.service has a tty as + it is not sure that a tty1 exists +- Avoid broken firmware loading on newer distributions as 13.1 + +------------------------------------------------------------------- +Thu Jun 5 07:24:35 UTC 2014 - werner@suse.de + +- Correct version check for the tcp-devel drop +- Use correct permissions for /var/log/journal +- Use ACLs for /var/log/journal as described in man:systemd-journald.service(8) + ------------------------------------------------------------------- Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index c40ae1d6..a0e21503 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -72,7 +72,7 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif -%if 0%{?suse_version} > 1315 +%if 0%{?suse_version} <= 1315 BuildRequires: tcpd-devel %endif BuildRequires: xz @@ -138,6 +138,8 @@ Requires(post): findutils %if ! 0%{?bootstrap} Requires(post): pam-config %endif +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 @@ -171,10 +173,8 @@ Patch6: insserv-generator.patch Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch -Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch -Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch @@ -586,6 +586,8 @@ Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +%define ul_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%2.2d%2.2d%2.2d", $1, $2, $3}') + %description Systemd is a system and service manager, compatible with SysV and LSB init scripts for Linux. systemd provides aggressive parallelization @@ -640,12 +642,19 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq +PreReq: /bin/rm +PreReq: %insserv_prereq +PreReq: %fillup_prereq +PreReq: /usr/bin/sg_inq +Requires(pre): /usr/bin/stat +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/bin/getent Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): sed -Requires(post): systemd +Requires(post): /usr/bin/systemctl %if %{defined regenerate_initrd_post} Requires(post): coreutils +Requires(post): /usr/bin/stat Requires(postun): coreutils Requires(posttrans): suse-module-tools Requires(posttrans): /sbin/mkinitrd @@ -747,6 +756,11 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl +Requires(post): /usr/bin/systemctl Conflicts: otherproviders(syslog) %description logger @@ -813,10 +827,8 @@ cp %{SOURCE7} m4/ %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 @@ -1063,7 +1075,9 @@ export V=1 --enable-selinux \ --enable-split-usr \ --disable-static \ +%if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ @@ -1111,7 +1125,9 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 %endif +%if 0%{?suse_version} <= 1310 ln -sf /lib/firmware %{buildroot}/usr/lib/firmware +%endif %if ! 0%{?bootstrap} install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config @@ -1389,7 +1405,7 @@ elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules -/usr/sbin/groupadd -r tape 2> /dev/null || : +getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root ; then if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then @@ -1468,7 +1484,13 @@ fi %postun -n libgudev-1_0-0 -p /sbin/ldconfig +%pre logger +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +exit 0 + %post logger +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx /var/log/journal/ || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx /var/log/journal/ || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : @@ -1761,7 +1783,9 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm +%if 0%{?suse_version} <= 1310 %{_prefix}/lib/firmware +%endif %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/ata_id @@ -1852,7 +1876,7 @@ exit 0 %files logger %defattr(-,root,root) -%dir %{_localstatedir}/log/journal +%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal %{_localstatedir}/log/README /etc/init.d/systemd-journald diff --git a/systemd.changes b/systemd.changes index 2b522a98..1cff13ed 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * The patches + delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch and + ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch + indeed mention unit files which do not exist anymore. +- Make sure that systemd-ask-password-wall.service has a tty as + it is not sure that a tty1 exists +- Avoid broken firmware loading on newer distributions as 13.1 + +------------------------------------------------------------------- +Thu Jun 5 07:24:35 UTC 2014 - werner@suse.de + +- Correct version check for the tcp-devel drop +- Use correct permissions for /var/log/journal +- Use ACLs for /var/log/journal as described in man:systemd-journald.service(8) + ------------------------------------------------------------------- Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index 5310cc46..a0a48baf 100644 --- a/systemd.spec +++ b/systemd.spec @@ -67,7 +67,7 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif -%if 0%{?suse_version} > 1315 +%if 0%{?suse_version} <= 1315 BuildRequires: tcpd-devel %endif BuildRequires: xz @@ -133,6 +133,8 @@ Requires(post): findutils %if ! 0%{?bootstrap} Requires(post): pam-config %endif +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 @@ -166,10 +168,8 @@ Patch6: insserv-generator.patch Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch -Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch -Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch @@ -581,6 +581,8 @@ Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +%define ul_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%2.2d%2.2d%2.2d", $1, $2, $3}') + %description Systemd is a system and service manager, compatible with SysV and LSB init scripts for Linux. systemd provides aggressive parallelization @@ -635,12 +637,19 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq +PreReq: /bin/rm +PreReq: %insserv_prereq +PreReq: %fillup_prereq +PreReq: /usr/bin/sg_inq +Requires(pre): /usr/bin/stat +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/bin/getent Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): sed -Requires(post): systemd +Requires(post): /usr/bin/systemctl %if %{defined regenerate_initrd_post} Requires(post): coreutils +Requires(post): /usr/bin/stat Requires(postun): coreutils Requires(posttrans): suse-module-tools Requires(posttrans): /sbin/mkinitrd @@ -742,6 +751,11 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl +Requires(post): /usr/bin/systemctl Conflicts: otherproviders(syslog) %description logger @@ -808,10 +822,8 @@ cp %{SOURCE7} m4/ %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 @@ -1058,7 +1070,9 @@ export V=1 --enable-selinux \ --enable-split-usr \ --disable-static \ +%if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ @@ -1106,7 +1120,9 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 %endif +%if 0%{?suse_version} <= 1310 ln -sf /lib/firmware %{buildroot}/usr/lib/firmware +%endif %if ! 0%{?bootstrap} install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config @@ -1384,7 +1400,7 @@ elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules -/usr/sbin/groupadd -r tape 2> /dev/null || : +getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root ; then if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then @@ -1463,7 +1479,13 @@ fi %postun -n libgudev-1_0-0 -p /sbin/ldconfig +%pre logger +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +exit 0 + %post logger +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx /var/log/journal/ || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx /var/log/journal/ || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : @@ -1756,7 +1778,9 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm +%if 0%{?suse_version} <= 1310 %{_prefix}/lib/firmware +%endif %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/ata_id @@ -1847,7 +1871,7 @@ exit 0 %files logger %defattr(-,root,root) -%dir %{_localstatedir}/log/journal +%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal %{_localstatedir}/log/README /etc/init.d/systemd-journald From 9e47c9039e4e07c2b57c6f68c20a4b7fc28f2913fedea4a96000aa35f4ab1e76 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 5 Jun 2014 13:40:35 +0000 Subject: [PATCH 11/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=659 --- 0001-hwdb-fix-case-sensitive-match.patch | 25 ++++++++++++++++++++++++ systemd-mini.changes | 11 +++++++++++ systemd-mini.spec | 11 ++++++++++- systemd.changes | 11 +++++++++++ systemd.spec | 11 ++++++++++- 5 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 0001-hwdb-fix-case-sensitive-match.patch diff --git a/0001-hwdb-fix-case-sensitive-match.patch b/0001-hwdb-fix-case-sensitive-match.patch new file mode 100644 index 00000000..64642714 --- /dev/null +++ b/0001-hwdb-fix-case-sensitive-match.patch @@ -0,0 +1,25 @@ +From 4c02dd7153f970244950b5e00f7bdfea8d2ff0be Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 17:55:14 +0200 +Subject: [PATCH] hwdb: fix case-sensitive match + +--- + hwdb/60-keyboard.hwdb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb +index d053766..c7ff4e4 100644 +--- hwdb/60-keyboard.hwdb ++++ hwdb/60-keyboard.hwdb +@@ -870,7 +870,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* + ########################################################### + + # Plantronics .Audio 626 DSP +-keyboard:usb:v047fpC006* ++keyboard:usb:v047FpC006* + KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute + + ########################################################### +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 1cff13ed..6b41709d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de + +- Add upstream patch 0001-hwdb-fix-case-sensitive-match.patch + +------------------------------------------------------------------- +Thu Jun 5 13:23:24 UTC 2014 - werner@suse.de + +- Add dynamic detection of util-linux version to be able to + disable the fsck option -l for version less than 2.25.0 + ------------------------------------------------------------------- Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index a0e21503..a577ed3d 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -530,6 +530,8 @@ Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch +# PATCHFIX-UPSTREAM added at 2014/06/05 +Patch269: 0001-hwdb-fix-case-sensitive-match.patch # UDEV PATCHES # ============ @@ -586,7 +588,7 @@ Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch -%define ul_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%2.2d%2.2d%2.2d", $1, $2, $3}') +%define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1013,6 +1015,7 @@ cp %{SOURCE7} m4/ %patch266 -p0 %patch267 -p0 %patch268 -p0 +%patch269 -p0 # udev patches %patch1001 -p1 @@ -1044,6 +1047,12 @@ cp %{SOURCE7} m4/ # ensure generate files are removed rm -f units/emergency.service +# disable "-l" option for fsck if it does not support new locking scheme +# compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +%if 0%{util_linux_version} < 22500 +sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +%endif + %build autoreconf -fiv # prevent pre-generated and distributed files from re-building diff --git a/systemd.changes b/systemd.changes index 1cff13ed..6b41709d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de + +- Add upstream patch 0001-hwdb-fix-case-sensitive-match.patch + +------------------------------------------------------------------- +Thu Jun 5 13:23:24 UTC 2014 - werner@suse.de + +- Add dynamic detection of util-linux version to be able to + disable the fsck option -l for version less than 2.25.0 + ------------------------------------------------------------------- Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index a0a48baf..6faa3995 100644 --- a/systemd.spec +++ b/systemd.spec @@ -525,6 +525,8 @@ Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch +# PATCHFIX-UPSTREAM added at 2014/06/05 +Patch269: 0001-hwdb-fix-case-sensitive-match.patch # UDEV PATCHES # ============ @@ -581,7 +583,7 @@ Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCHFIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch -%define ul_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%2.2d%2.2d%2.2d", $1, $2, $3}') +%define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1008,6 +1010,7 @@ cp %{SOURCE7} m4/ %patch266 -p0 %patch267 -p0 %patch268 -p0 +%patch269 -p0 # udev patches %patch1001 -p1 @@ -1039,6 +1042,12 @@ cp %{SOURCE7} m4/ # ensure generate files are removed rm -f units/emergency.service +# disable "-l" option for fsck if it does not support new locking scheme +# compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +%if 0%{util_linux_version} < 22500 +sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +%endif + %build autoreconf -fiv # prevent pre-generated and distributed files from re-building From b76bf34f26bf97ec4d71f6a11f912271ba8800341f6c44259454c747499fb77c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 6 Jun 2014 11:40:36 +0000 Subject: [PATCH 12/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=660 --- ...nt-restore-correct-timeout-behaviour.patch | 37 +++++++++ ...sd_bus_try_close-in-exit-on-idle-ser.patch | 59 +++++++++++++ systemd-mini.changes | 7 ++ systemd-mini.spec | 83 +++++++++++-------- systemd.changes | 7 ++ systemd.spec | 83 +++++++++++-------- 6 files changed, 208 insertions(+), 68 deletions(-) create mode 100644 0001-sd-event-restore-correct-timeout-behaviour.patch create mode 100644 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch diff --git a/0001-sd-event-restore-correct-timeout-behaviour.patch b/0001-sd-event-restore-correct-timeout-behaviour.patch new file mode 100644 index 00000000..8787f3f3 --- /dev/null +++ b/0001-sd-event-restore-correct-timeout-behaviour.patch @@ -0,0 +1,37 @@ +Based on eec6022cf039e62233139000b9e95db943959e48 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 13:43:30 +0200 +Subject: [PATCH] sd-event: restore correct timeout behaviour + +--- + src/libsystemd/sd-event/sd-event.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- src/libsystemd/sd-event/sd-event.c ++++ src/libsystemd/sd-event/sd-event.c 2014-06-06 10:26:51.422235695 +0000 +@@ -2047,6 +2047,7 @@ _public_ int sd_event_run(sd_event *e, u + unsigned ev_queue_max; + sd_event_source *p; + int r, i, m; ++ bool timedout; + + assert_return(e, -EINVAL); + assert_return(!event_pid_changed(e), -ECHILD); +@@ -2084,6 +2085,8 @@ _public_ int sd_event_run(sd_event *e, u + goto finish; + } + ++ timedout = m == 0; ++ + dual_timestamp_get(&e->timestamp); + + for (i = 0; i < m; i++) { +@@ -2123,7 +2126,7 @@ _public_ int sd_event_run(sd_event *e, u + + p = event_next_pending(e); + if (!p) { +- r = 1; ++ r = !timedout; + goto finish; + } + diff --git a/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch b/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch new file mode 100644 index 00000000..3961c020 --- /dev/null +++ b/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch @@ -0,0 +1,59 @@ +From b27adf354a83ad25f4a209c0a6f7989ecab7b4e2 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 13:31:25 +0200 +Subject: [PATCH] bus: make use of sd_bus_try_close() in exit-on-idle services + +--- + src/libsystemd/sd-bus/bus-util.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git src/libsystemd/sd-bus/bus-util.c src/libsystemd/sd-bus/bus-util.c +index 6bd21cc..6441c5b 100644 +--- src/libsystemd/sd-bus/bus-util.c ++++ src/libsystemd/sd-bus/bus-util.c +@@ -43,7 +43,9 @@ static int name_owner_change_callback(sd_bus *bus, sd_bus_message *m, void *user + assert(m); + assert(e); + ++ sd_bus_close(bus); + sd_event_exit(e, 0); ++ + return 1; + } + +@@ -121,11 +123,30 @@ int bus_event_loop_with_idle( + return r; + + if (r == 0 && !exiting) { +- r = bus_async_unregister_and_exit(e, bus, name); ++ ++ r = sd_bus_try_close(bus); ++ if (r == -EBUSY) ++ continue; ++ ++ if (r == -ENOTSUP) { ++ /* Fallback for dbus1 connections: we ++ * unregister the name and wait for ++ * the response to come through for ++ * it */ ++ ++ r = bus_async_unregister_and_exit(e, bus, name); ++ if (r < 0) ++ return r; ++ ++ exiting = true; ++ continue; ++ } ++ + if (r < 0) + return r; + +- exiting = true; ++ sd_event_exit(e, 0); ++ break; + } + } + +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 6b41709d..e003b59b 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-sd-event-restore-correct-timeout-behaviour.patch + 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch + ------------------------------------------------------------------- Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index a577ed3d..c4b1885b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -140,6 +140,9 @@ Requires(post): pam-config %endif Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/awk +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 @@ -482,56 +485,60 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch -# PATCHFIX-UPSTREAM added at 2014/05/20 +# PATCH-FIX-UPSTREAM added at 2014/05/20 Patch245: 0007-logind-fix-Display-property-of-user-objects.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch246: 0001-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch247: 0002-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch249: 0004-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch250: 0005-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch252: 0002-journal-properly-detect-language-specified-in-line.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch254: 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch255: 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch256: 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch257: 0002-nspawn-restore-journal-directory-is-empty-check.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch258: 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch262: 0001-virt-rework-container-detection-logic.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch -# PATCHFIX-UPSTREAM added at 2014/06/05 +# PATCH-FIX-UPSTREAM added at 2014/06/05 Patch269: 0001-hwdb-fix-case-sensitive-match.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch # UDEV PATCHES # ============ @@ -577,15 +584,15 @@ Patch1017: 1017-udev-serialize-synchronize-block-device-event-handli.patch Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch -# PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch %define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') @@ -1016,6 +1023,8 @@ cp %{SOURCE7} m4/ %patch267 -p0 %patch268 -p0 %patch269 -p0 +%patch270 -p0 +%patch271 -p0 # udev patches %patch1001 -p1 @@ -1304,7 +1313,7 @@ do done %endif -%if 0%{suse_version} < 1310 +%if 0%{suse_version} <= 1310 cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' [Unit] Description=Fix against deadlock at shutdown @@ -1345,8 +1354,14 @@ exit 0 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : -chmod g+s %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : +chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +if read ID < /etc/machine-id > /dev/null 2>&1 ; then + chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : + chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : +fi +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -1498,8 +1513,8 @@ getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 %post logger -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx /var/log/journal/ || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx /var/log/journal/ || : +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : diff --git a/systemd.changes b/systemd.changes index 6b41709d..e003b59b 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-sd-event-restore-correct-timeout-behaviour.patch + 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch + ------------------------------------------------------------------- Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 6faa3995..3e710b39 100644 --- a/systemd.spec +++ b/systemd.spec @@ -135,6 +135,9 @@ Requires(post): pam-config %endif Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/awk +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 @@ -477,56 +480,60 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch -# PATCHFIX-UPSTREAM added at 2014/05/20 +# PATCH-FIX-UPSTREAM added at 2014/05/20 Patch245: 0007-logind-fix-Display-property-of-user-objects.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch246: 0001-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch247: 0002-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch249: 0004-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch250: 0005-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch252: 0002-journal-properly-detect-language-specified-in-line.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch254: 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch255: 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch256: 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch257: 0002-nspawn-restore-journal-directory-is-empty-check.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch258: 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch262: 0001-virt-rework-container-detection-logic.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch -# PATCHFIX-UPSTREAM added at 2014/06/05 +# PATCH-FIX-UPSTREAM added at 2014/06/05 Patch269: 0001-hwdb-fix-case-sensitive-match.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch # UDEV PATCHES # ============ @@ -572,15 +579,15 @@ Patch1017: 1017-udev-serialize-synchronize-block-device-event-handli.patch Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch -# PATCHFIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch -# PATCHFIX-UPSTREAM added at 2014/06/03 +# PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch %define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') @@ -1011,6 +1018,8 @@ cp %{SOURCE7} m4/ %patch267 -p0 %patch268 -p0 %patch269 -p0 +%patch270 -p0 +%patch271 -p0 # udev patches %patch1001 -p1 @@ -1299,7 +1308,7 @@ do done %endif -%if 0%{suse_version} < 1310 +%if 0%{suse_version} <= 1310 cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' [Unit] Description=Fix against deadlock at shutdown @@ -1340,8 +1349,14 @@ exit 0 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : -chmod g+s %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : +chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +if read ID < /etc/machine-id > /dev/null 2>&1 ; then + chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : + chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : +fi +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -1493,8 +1508,8 @@ getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 %post logger -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx /var/log/journal/ || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx /var/log/journal/ || : +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : From dd8c34690ce8c4b808fc02b65c489289cc96fff26a931b8929b040ad919c4ed6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 6 Jun 2014 12:45:20 +0000 Subject: [PATCH 13/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=661 --- systemd-mini.spec | 2 ++ systemd.spec | 2 ++ 2 files changed, 4 insertions(+) diff --git a/systemd-mini.spec b/systemd-mini.spec index c4b1885b..b16b2607 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -105,7 +105,9 @@ BuildRequires: pkgconfig(usbutils) >= 0.82 BuildRequires: pkgconfig(libseccomp) %endif %endif +%if ! 0%{?bootstrap} BuildRequires: libapparmor-devel +%endif BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 diff --git a/systemd.spec b/systemd.spec index 3e710b39..bc62626c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -100,7 +100,9 @@ BuildRequires: pkgconfig(usbutils) >= 0.82 BuildRequires: pkgconfig(libseccomp) %endif %endif +%if ! 0%{?bootstrap} BuildRequires: libapparmor-devel +%endif BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 From 3595bbe8f892874dd595f1d6d83eea9f1125d274e1693ea5bd65b21d7beffe51 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Mon, 9 Jun 2014 08:41:53 +0000 Subject: [PATCH 14/43] Accepting request 236618 from home:rmilasan:branches:Base:System - Add upstream patches 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch 1026-udevd-inotify-modernizations.patch 1027-udev-synthesize-change-events-for-partitions-when-to.patch 1028-udev-link-config-fix-mem-leak.patch 1029-udev-try-first-re-reading-the-partition-table.patch 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch 1031-udev-make-sure-we-always-get-change-for-the-disk.patch 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch - Add upstream patches 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch 1026-udevd-inotify-modernizations.patch 1027-udev-synthesize-change-events-for-partitions-when-to.patch 1028-udev-link-config-fix-mem-leak.patch 1029-udev-try-first-re-reading-the-partition-table.patch 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch 1031-udev-make-sure-we-always-get-change-for-the-disk.patch 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch OBS-URL: https://build.opensuse.org/request/show/236618 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=662 --- ...ice-mapper-from-block-device-ownersh.patch | 39 ++++++++ 1026-udevd-inotify-modernizations.patch | 85 ++++++++++++++++ ...change-events-for-partitions-when-to.patch | 84 ++++++++++++++++ 1028-udev-link-config-fix-mem-leak.patch | 34 +++++++ ...first-re-reading-the-partition-table.patch | 94 ++++++++++++++++++ ...guard-REREADP-logic-with-open-O_ECXL.patch | 23 +++++ ...re-we-always-get-change-for-the-disk.patch | 98 +++++++++++++++++++ ...DPT-by-exclusive-lock-instead-of-O_E.patch | 29 ++++++ systemd-mini.changes | 13 +++ systemd-mini.spec | 24 +++++ systemd.changes | 13 +++ systemd.spec | 24 +++++ 12 files changed, 560 insertions(+) create mode 100644 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch create mode 100644 1026-udevd-inotify-modernizations.patch create mode 100644 1027-udev-synthesize-change-events-for-partitions-when-to.patch create mode 100644 1028-udev-link-config-fix-mem-leak.patch create mode 100644 1029-udev-try-first-re-reading-the-partition-table.patch create mode 100644 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch create mode 100644 1031-udev-make-sure-we-always-get-change-for-the-disk.patch create mode 100644 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch diff --git a/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch b/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch new file mode 100644 index 00000000..2dc531f4 --- /dev/null +++ b/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch @@ -0,0 +1,39 @@ +From e918a1b5a94f270186dca59156354acd2a596494 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 3 Jun 2014 16:49:38 +0200 +Subject: [PATCH] udev: exclude device-mapper from block device ownership event + locking + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 819ea3b..6c05104 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -290,7 +290,19 @@ static void worker_new(struct event *event) + * acquired the lock, the external process will block until + * udev has finished its event handling. + */ +- if (streq_ptr("block", udev_device_get_subsystem(dev))) { ++ ++ /* ++ * since we make check - device seems unused - we try ++ * ioctl to deactivate - and device is found to be opened ++ * sure, you try to take a write lock ++ * if you get it udev is out ++ * if you can't get it, udev is busy ++ * we cannot deactivate openned device (as it is in-use) ++ * maybe we should just exclude dm from that thing entirely ++ * IMHO this sounds like a good plan for this moment ++ */ ++ if (streq_ptr("block", udev_device_get_subsystem(dev)) && ++ !startswith("dm-", udev_device_get_sysname(dev))) { + struct udev_device *d = dev; + + if (streq_ptr("partition", udev_device_get_devtype(d))) +-- +1.8.4.5 + diff --git a/1026-udevd-inotify-modernizations.patch b/1026-udevd-inotify-modernizations.patch new file mode 100644 index 00000000..c63093ff --- /dev/null +++ b/1026-udevd-inotify-modernizations.patch @@ -0,0 +1,85 @@ +From edd32000c806e4527c5f376d138f7bff07724c26 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 11:05:45 +0200 +Subject: [PATCH] udevd: inotify - modernizations + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 45 ++++++++++++++++++++++----------------------- + 1 file changed, 22 insertions(+), 23 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -736,20 +736,30 @@ out: + return udev_ctrl_connection_unref(ctrl_conn); + } + ++static void synthesize_change(struct udev_device *dev) { ++ char filename[UTIL_PATH_SIZE]; ++ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++} ++ + /* read inotify messages */ + static int handle_inotify(struct udev *udev) + { + int nbytes, pos; + char *buf; + struct inotify_event *ev; ++ int r; + +- if ((ioctl(fd_inotify, FIONREAD, &nbytes) < 0) || (nbytes <= 0)) +- return 0; ++ r = ioctl(fd_inotify, FIONREAD, &nbytes); ++ if (r < 0 || nbytes <= 0) ++ return -errno; + + buf = malloc(nbytes); +- if (buf == NULL) { ++ if (!buf) { + log_error("error getting buffer for inotify"); +- return -1; ++ return -ENOMEM; + } + + nbytes = read(fd_inotify, buf, nbytes); +@@ -759,27 +769,16 @@ static int handle_inotify(struct udev *u + + ev = (struct inotify_event *)(buf + pos); + dev = udev_watch_lookup(udev, ev->wd); +- if (dev != NULL) { +- log_debug("inotify event: %x for %s", ev->mask, udev_device_get_devnode(dev)); +- if (ev->mask & IN_CLOSE_WRITE) { +- char filename[UTIL_PATH_SIZE]; +- int fd; +- +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- fd = open(filename, O_WRONLY|O_CLOEXEC); +- if (fd >= 0) { +- if (write(fd, "change", 6) < 0) +- log_debug("error writing uevent: %m"); +- close(fd); +- } +- } +- if (ev->mask & IN_IGNORED) +- udev_watch_end(udev, dev); ++ if (!dev) ++ continue; + +- udev_device_unref(dev); +- } ++ log_debug("inotify event: %x for %s", ev->mask, udev_device_get_devnode(dev)); ++ if (ev->mask & IN_CLOSE_WRITE) ++ synthesize_change(dev); ++ else if (ev->mask & IN_IGNORED) ++ udev_watch_end(udev, dev); + ++ udev_device_unref(dev); + } + + free(buf); diff --git a/1027-udev-synthesize-change-events-for-partitions-when-to.patch b/1027-udev-synthesize-change-events-for-partitions-when-to.patch new file mode 100644 index 00000000..ab09c1b2 --- /dev/null +++ b/1027-udev-synthesize-change-events-for-partitions-when-to.patch @@ -0,0 +1,84 @@ +From f3a740a5dae792fb6b2d411022ce8c29ced1c3f1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 12:16:28 +0200 +Subject: [PATCH] udev: synthesize "change' events for partitions when tools + change the disk + +This should make sure that fdisk-like programs will automatically +cause an update of all partitions, just like mkfs-like programs cause +an update of the partition. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 42 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -46,6 +46,7 @@ + #include + + #include "udev.h" ++#include "udev-util.h" + #include "sd-daemon.h" + #include "cgroup-util.h" + #include "dev-setup.h" +@@ -736,15 +737,54 @@ out: + return udev_ctrl_connection_unref(ctrl_conn); + } + +-static void synthesize_change(struct udev_device *dev) { ++static int synthesize_change(struct udev_device *dev) { + char filename[UTIL_PATH_SIZE]; ++ int r; + + log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); + strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); + write_string_file(filename, "change"); ++ ++ /* for disks devices, re-trigger all partitions too */ ++ if (streq_ptr("block", udev_device_get_subsystem(dev)) && ++ streq_ptr("disk", udev_device_get_devtype(dev))) { ++ struct udev *udev = udev_device_get_udev(dev); ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; ++ struct udev_list_entry *item; ++ ++ e = udev_enumerate_new(udev); ++ if (!e) ++ return -ENOMEM; ++ ++ r = udev_enumerate_add_match_parent(e, dev); ++ if (r < 0) ++ return r; ++ ++ r = udev_enumerate_add_match_subsystem(e, "block"); ++ if (r < 0) ++ return r; ++ ++ r = udev_enumerate_scan_devices(e); ++ udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { ++ _cleanup_udev_device_unref_ struct udev_device *d = NULL; ++ ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ continue; ++ ++ if (!streq_ptr("partition", udev_device_get_devtype(d))) ++ continue; ++ ++ log_debug("device %s closed, synthesising partition '%s' 'change'", ++ udev_device_get_devnode(dev), udev_device_get_devnode(d)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(d), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ } ++ } ++ ++ return 0; + } + +-/* read inotify messages */ + static int handle_inotify(struct udev *udev) + { + int nbytes, pos; diff --git a/1028-udev-link-config-fix-mem-leak.patch b/1028-udev-link-config-fix-mem-leak.patch new file mode 100644 index 00000000..265009f0 --- /dev/null +++ b/1028-udev-link-config-fix-mem-leak.patch @@ -0,0 +1,34 @@ +From edf029b7fd9a5853a87d3ca99aac2922bb8a277e Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Wed, 4 Jun 2014 12:34:23 +0200 +Subject: [PATCH] udev: link-config - fix mem leak + +Reported by Kay. + +Signed-off-by: Robert Milasan +--- + src/udev/net/link-config.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: systemd-210/src/udev/net/link-config.c +=================================================================== +--- systemd-210.orig/src/udev/net/link-config.c ++++ systemd-210/src/udev/net/link-config.c +@@ -118,6 +118,7 @@ static void link_configs_free(link_confi + free(link->match_type); + free(link->description); + free(link->alias); ++ free(link->name_policy); + + free(link); + } +@@ -205,7 +206,8 @@ static bool enable_name_policy(void) { + + int link_config_load(link_config_ctx *ctx) { + int r; +- char **files, **f; ++ _cleanup_strv_free_ char **files; ++ char **f; + + link_configs_free(ctx); + diff --git a/1029-udev-try-first-re-reading-the-partition-table.patch b/1029-udev-try-first-re-reading-the-partition-table.patch new file mode 100644 index 00000000..fa20002b --- /dev/null +++ b/1029-udev-try-first-re-reading-the-partition-table.patch @@ -0,0 +1,94 @@ +From ede344452a54e1c53f541cad12a06269a4fe96a9 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 13:30:24 +0200 +Subject: [PATCH] udev: try first re-reading the partition table + +mounted partitions: + # dd if=/dev/zero of=/dev/sda bs=1 count=1 + UDEV [4157.369250] change .../0:0:0:0/block/sda (block) + UDEV [4157.375059] change .../0:0:0:0/block/sda/sda1 (block) + UDEV [4157.397088] change .../0:0:0:0/block/sda/sda2 (block) + UDEV [4157.404842] change .../0:0:0:0/block/sda/sda4 (block) + +unmounted partitions: + # dd if=/dev/zero of=/dev/sdb bs=1 count=1 + UDEV [4163.450217] remove .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block) + UDEV [4163.593167] change .../target6:0:0/6:0:0:0/block/sdb (block) + UDEV [4163.713982] add .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block) + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 39 +++++++++++++++++++++++++++++++++------ + 1 file changed, 33 insertions(+), 6 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -741,17 +742,37 @@ static int synthesize_change(struct udev + char filename[UTIL_PATH_SIZE]; + int r; + +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- write_string_file(filename, "change"); +- +- /* for disks devices, re-trigger all partitions too */ + if (streq_ptr("block", udev_device_get_subsystem(dev)) && +- streq_ptr("disk", udev_device_get_devtype(dev))) { ++ streq_ptr("disk", udev_device_get_devtype(dev)) && ++ !startswith("dm-", udev_device_get_sysname(dev))) { ++ int fd; + struct udev *udev = udev_device_get_udev(dev); + _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item; + ++ /* ++ * Try to re-read the partition table, this only succeeds if ++ * none of the devices is busy. ++ * ++ * The kernel will send out a change event for the disk, and ++ * "remove/add" for all partitions. ++ */ ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ if (fd >= 0) { ++ r = ioctl(fd, BLKRRPART, 0); ++ close(fd); ++ if (r >= 0) ++ return 0; ++ } ++ ++ /* ++ * Re-reading the partition table did not work, synthesize "change" ++ * events for the disk and all partitions. ++ */ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + e = udev_enumerate_new(udev); + if (!e) + return -ENOMEM; +@@ -780,8 +801,14 @@ static int synthesize_change(struct udev + strscpyl(filename, sizeof(filename), udev_device_get_syspath(d), "/uevent", NULL); + write_string_file(filename, "change"); + } ++ ++ return 0; + } + ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + return 0; + } + diff --git a/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch b/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch new file mode 100644 index 00000000..6fb7b15f --- /dev/null +++ b/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch @@ -0,0 +1,23 @@ +From 10fab50a3091e0b819c3ddab5a7c07acf750c050 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 14:09:31 +0200 +Subject: [PATCH] udev: guard REREADP logic with open(O_ECXL) + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -757,7 +757,7 @@ static int synthesize_change(struct udev + * The kernel will send out a change event for the disk, and + * "remove/add" for all partitions. + */ +- fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { + r = ioctl(fd, BLKRRPART, 0); + close(fd); diff --git a/1031-udev-make-sure-we-always-get-change-for-the-disk.patch b/1031-udev-make-sure-we-always-get-change-for-the-disk.patch new file mode 100644 index 00000000..4f48cd3a --- /dev/null +++ b/1031-udev-make-sure-we-always-get-change-for-the-disk.patch @@ -0,0 +1,98 @@ +From e9fc29f4ecc9509ccc02eb8a014341e26c0d7831 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 15:17:15 +0200 +Subject: [PATCH] udev: make sure we always get "change" for the disk + +The kernel will return 0 for REREADPT when no partition table +is found, we have to send out "change" ourselves. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 53 +++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 39 insertions(+), 14 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -745,34 +745,28 @@ static int synthesize_change(struct udev + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && + !startswith("dm-", udev_device_get_sysname(dev))) { ++ bool part_table_read = false; ++ bool has_partitions = false; + int fd; + struct udev *udev = udev_device_get_udev(dev); + _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item; + + /* +- * Try to re-read the partition table, this only succeeds if +- * none of the devices is busy. +- * +- * The kernel will send out a change event for the disk, and +- * "remove/add" for all partitions. ++ * Try to re-read the partition table. This only succeeds if ++ * none of the devices is busy. The kernel returns 0 if no ++ * partition table is found, and we will not get an event for ++ * the disk. + */ + fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { + r = ioctl(fd, BLKRRPART, 0); + close(fd); + if (r >= 0) +- return 0; ++ part_table_read = true; + } + +- /* +- * Re-reading the partition table did not work, synthesize "change" +- * events for the disk and all partitions. +- */ +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- write_string_file(filename, "change"); +- ++ /* search for partitions */ + e = udev_enumerate_new(udev); + if (!e) + return -ENOMEM; +@@ -786,6 +780,37 @@ static int synthesize_change(struct udev + return r; + + r = udev_enumerate_scan_devices(e); ++ ++ udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { ++ _cleanup_udev_device_unref_ struct udev_device *d = NULL; ++ ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ continue; ++ ++ if (!streq_ptr("partition", udev_device_get_devtype(d))) ++ continue; ++ ++ has_partitions = true; ++ break; ++ } ++ ++ /* ++ * We have partitions and re-read the table, the kernel already sent ++ * out a "change" event for the disk, and "remove/add" for all ++ * partitions. ++ */ ++ if (part_table_read && has_partitions) ++ return 0; ++ ++ /* ++ * We have partitions but re-reading the partition table did not ++ * work, synthesize "change" for the disk and all partitions. ++ */ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; + diff --git a/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch b/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch new file mode 100644 index 00000000..4a6d7c13 --- /dev/null +++ b/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch @@ -0,0 +1,29 @@ +From 02ba8fb3357daf57f6120ac512fb464a4c623419 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 16:21:19 +0200 +Subject: [PATCH] udev: guard REREADPT by exclusive lock instead of O_EXCL + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -758,9 +758,12 @@ static int synthesize_change(struct udev + * partition table is found, and we will not get an event for + * the disk. + */ +- fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { +- r = ioctl(fd, BLKRRPART, 0); ++ r = flock(fd, LOCK_EX|LOCK_NB); ++ if (r >= 0) ++ r = ioctl(fd, BLKRRPART, 0); ++ + close(fd); + if (r >= 0) + part_table_read = true; diff --git a/systemd-mini.changes b/systemd-mini.changes index e003b59b..c1fec0fe 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch + 1026-udevd-inotify-modernizations.patch + 1027-udev-synthesize-change-events-for-partitions-when-to.patch + 1028-udev-link-config-fix-mem-leak.patch + 1029-udev-try-first-re-reading-the-partition-table.patch + 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch + 1031-udev-make-sure-we-always-get-change-for-the-disk.patch + 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch + ------------------------------------------------------------------- Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index b16b2607..85a34e4b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -596,6 +596,22 @@ Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +# PATCH-FIX-UPSTREAM 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +Patch1025: 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +# PATCH-FIX-UPSTREAM 1026-udevd-inotify-modernizations.patch +Patch1026: 1026-udevd-inotify-modernizations.patch +# PATCH-FIX-UPSTREAM 1027-udev-synthesize-change-events-for-partitions-when-to.patch +Patch1027: 1027-udev-synthesize-change-events-for-partitions-when-to.patch +# PATCH-FIX-UPSTREAM 1028-udev-link-config-fix-mem-leak.patch +Patch1028: 1028-udev-link-config-fix-mem-leak.patch +# PATCH-FIX-UPSTREAM 1029-udev-try-first-re-reading-the-partition-table.patch +Patch1029: 1029-udev-try-first-re-reading-the-partition-table.patch +# PATCH-FIX-UPSTREAM 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +# PATCH-FIX-UPSTREAM 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +# PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch %define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') @@ -1054,6 +1070,14 @@ cp %{SOURCE7} m4/ %patch1022 -p1 %patch1023 -p0 %patch1024 -p0 +%patch1025 -p1 +%patch1026 -p1 +%patch1027 -p1 +%patch1028 -p1 +%patch1029 -p1 +%patch1030 -p1 +%patch1031 -p1 +%patch1032 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index e003b59b..c1fec0fe 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch + 1026-udevd-inotify-modernizations.patch + 1027-udev-synthesize-change-events-for-partitions-when-to.patch + 1028-udev-link-config-fix-mem-leak.patch + 1029-udev-try-first-re-reading-the-partition-table.patch + 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch + 1031-udev-make-sure-we-always-get-change-for-the-disk.patch + 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch + ------------------------------------------------------------------- Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index bc62626c..af5763a9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -591,6 +591,22 @@ Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +# PATCH-FIX-UPSTREAM 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +Patch1025: 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +# PATCH-FIX-UPSTREAM 1026-udevd-inotify-modernizations.patch +Patch1026: 1026-udevd-inotify-modernizations.patch +# PATCH-FIX-UPSTREAM 1027-udev-synthesize-change-events-for-partitions-when-to.patch +Patch1027: 1027-udev-synthesize-change-events-for-partitions-when-to.patch +# PATCH-FIX-UPSTREAM 1028-udev-link-config-fix-mem-leak.patch +Patch1028: 1028-udev-link-config-fix-mem-leak.patch +# PATCH-FIX-UPSTREAM 1029-udev-try-first-re-reading-the-partition-table.patch +Patch1029: 1029-udev-try-first-re-reading-the-partition-table.patch +# PATCH-FIX-UPSTREAM 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +# PATCH-FIX-UPSTREAM 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +# PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch %define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') @@ -1049,6 +1065,14 @@ cp %{SOURCE7} m4/ %patch1022 -p1 %patch1023 -p0 %patch1024 -p0 +%patch1025 -p1 +%patch1026 -p1 +%patch1027 -p1 +%patch1028 -p1 +%patch1029 -p1 +%patch1030 -p1 +%patch1031 -p1 +%patch1032 -p1 # ensure generate files are removed rm -f units/emergency.service From d46737b201923ec3202411c6df3648f6eac43d8f4a9c5744b69c149acf5569ba Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 10 Jun 2014 11:19:53 +0000 Subject: [PATCH 15/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=663 --- 1021-udev-re-add-persistent-net-rules.patch | 39 +++++++++++++++-- systemd-mini.changes | 19 ++++++++- systemd-mini.spec | 46 +++++++++++++++++++-- systemd.changes | 19 ++++++++- systemd.spec | 46 +++++++++++++++++++-- 5 files changed, 155 insertions(+), 14 deletions(-) diff --git a/1021-udev-re-add-persistent-net-rules.patch b/1021-udev-re-add-persistent-net-rules.patch index b329e1a5..e8cd290c 100644 --- a/1021-udev-re-add-persistent-net-rules.patch +++ b/1021-udev-re-add-persistent-net-rules.patch @@ -22,12 +22,12 @@ Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +# ignore the interface if a name has already been set +NAME=="?*", GOTO="persistent_net_generator_end" + -+IMPORT{cmdline}="net.ifnames" -+ENV{net.ifnames}!="0", GOTO="persistent_net_generator_end" -+ +# device name whitelist +KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" + ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}=="1", GOTO="persistent_net_generator_end" ++ +# ignore Xen virtual interfaces +SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" + @@ -405,7 +405,7 @@ Index: systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +SUBSYSTEM!="net", GOTO="net-sriov-names_end" + +IMPORT{cmdline}="net.ifnames" -+ENV{net.ifnames}!="0", GOTO="net-sriov-names_end" ++ENV{net.ifnames}=="1", GOTO="net-sriov-names_end" + +SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", NAME=="?*", ENV{INTERFACE_NEW}="$name" +SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", IMPORT{program}="net-set-sriov-names" @@ -499,3 +499,34 @@ Index: systemd-210/src/udev/rule_generator/net-set-sriov-names + fi + fi +done +Index: systemd-210/src/udev/net/link-config.c +=================================================================== +--- systemd-210.orig/src/udev/net/link-config.c ++++ systemd-210/src/udev/net/link-config.c +@@ -193,6 +193,18 @@ static bool enable_name_policy(void) { + r = proc_cmdline(&line); + if (r < 0) + log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r)); ++#if defined(NET_IFNAMES) && (NET_IFNAMES == 1) ++# warning Using persistent rules as a default ++ if (r <= 0) ++ return false; ++ ++ FOREACH_WORD_QUOTED(w, l, line, state) ++ if (strneq(w, "net.ifnames=1", l)) ++ return true; ++ ++ return false; ++#else ++# warning Using predictable rules as a default + if (r <= 0) + return true; + +@@ -201,6 +213,7 @@ static bool enable_name_policy(void) { + return false; + + return true; ++#endif + } + + int link_config_load(link_config_ctx *ctx) { diff --git a/systemd-mini.changes b/systemd-mini.changes index c1fec0fe..26dbb209 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de + +- Change 1021-udev-re-add-persistent-net-rules.patch to use persistent + rules as a default on SLES-12 and predictable rules as a default + otherwise +- Add cflags shell function to check possible flags for the compiler + as well as for the linker + ------------------------------------------------------------------- Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com @@ -94,11 +103,17 @@ Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch 1024-udev-always-close-lock-file-descriptor.patch +------------------------------------------------------------------- +Tue Jun 3 12:55:53 UTC 2014 - rmilasan@suse.com + +- Fix enabling predictable rules when using net.ifnames=1. + update: 1021-udev-re-add-persistent-net-rules.patch + ------------------------------------------------------------------- Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com -- Re-add persistent rules to have a backup option if predictable - rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). +- Re-add persistent rules as a default and make predictable rules as + fallback (bnc#880732). add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch diff --git a/systemd-mini.spec b/systemd-mini.spec index 85a34e4b..9b6b5086 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1089,10 +1089,51 @@ sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/ %endif %build +cflags () +{ + local flag=$1; shift + local var=$1; shift + local gold + test -n "${flag}" -a -n "${var}" || return + case "${!var}" in + *${flag}*) return + esac + if type ld.gold > /dev/null 2>&1 ; then + gold=-Wl,-fuse-ld=gold + fi + set -o noclobber + case "$flag" in + -Wl,*) + if echo 'int main () { return 0; }' | \ + ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + rm -f ldtest.c + ;; + *) + if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + esac + set +o noclobber +} autoreconf -fiv # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; -export V=1 +export V=e +export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)" +export LDFLAGS +%if 0%{?suse_version} == 1315 + CFLAGS="$CFLAGS -DNET_IFNAMES=1" +%else + CFLAGS="$CFLAGS -DNET_IFNAMES=0" +%endif +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --docdir=%{_docdir}/systemd \ @@ -1133,8 +1174,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif - --disable-kdbus \ - CFLAGS="%{optflags}" + --disable-kdbus make %{?_smp_mflags} %if ! 0%{?bootstrap} make %{?_smp_mflags} update-man-list man diff --git a/systemd.changes b/systemd.changes index c1fec0fe..26dbb209 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de + +- Change 1021-udev-re-add-persistent-net-rules.patch to use persistent + rules as a default on SLES-12 and predictable rules as a default + otherwise +- Add cflags shell function to check possible flags for the compiler + as well as for the linker + ------------------------------------------------------------------- Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com @@ -94,11 +103,17 @@ Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch 1024-udev-always-close-lock-file-descriptor.patch +------------------------------------------------------------------- +Tue Jun 3 12:55:53 UTC 2014 - rmilasan@suse.com + +- Fix enabling predictable rules when using net.ifnames=1. + update: 1021-udev-re-add-persistent-net-rules.patch + ------------------------------------------------------------------- Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com -- Re-add persistent rules to have a backup option if predictable - rules are disabled at boot time with 'net.ifnames=0' option (bnc#880732). +- Re-add persistent rules as a default and make predictable rules as + fallback (bnc#880732). add: 1021-udev-re-add-persistent-net-rules.patch - udev: remove seqnum API and all assumptions about seqnums add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch diff --git a/systemd.spec b/systemd.spec index af5763a9..1165efc6 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1084,10 +1084,51 @@ sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/ %endif %build +cflags () +{ + local flag=$1; shift + local var=$1; shift + local gold + test -n "${flag}" -a -n "${var}" || return + case "${!var}" in + *${flag}*) return + esac + if type ld.gold > /dev/null 2>&1 ; then + gold=-Wl,-fuse-ld=gold + fi + set -o noclobber + case "$flag" in + -Wl,*) + if echo 'int main () { return 0; }' | \ + ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + rm -f ldtest.c + ;; + *) + if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + esac + set +o noclobber +} autoreconf -fiv # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; -export V=1 +export V=e +export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)" +export LDFLAGS +%if 0%{?suse_version} == 1315 + CFLAGS="$CFLAGS -DNET_IFNAMES=1" +%else + CFLAGS="$CFLAGS -DNET_IFNAMES=0" +%endif +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --docdir=%{_docdir}/systemd \ @@ -1128,8 +1169,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif - --disable-kdbus \ - CFLAGS="%{optflags}" + --disable-kdbus make %{?_smp_mflags} %if ! 0%{?bootstrap} make %{?_smp_mflags} update-man-list man From f6821b93013ed58693d406b08165115a9fff64693b71edb4d0b63b20dc961404 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 10 Jun 2014 15:30:38 +0000 Subject: [PATCH 16/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=664 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 10 +++++----- systemd.changes | 5 +++++ systemd.spec | 10 +++++----- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 26dbb209..c1a39877 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de + +- Change detection of new locking scheme of fsck + ------------------------------------------------------------------- Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 9b6b5086..61787e83 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -613,8 +613,6 @@ Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch -%define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') - %description Systemd is a system and service manager, compatible with SysV and LSB init scripts for Linux. systemd provides aggressive parallelization @@ -1084,9 +1082,11 @@ rm -f units/emergency.service # disable "-l" option for fsck if it does not support new locking scheme # compare with commit c343be283b7152554bac0c02493a4e1759c163f7 -%if 0%{util_linux_version} < 22500 -sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c -%endif +PATH_FSCK=$(type -p fsck) +if grep -q /run/fsck/%%s\\.lock $PATH_FSCK +then + sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +fi %build cflags () diff --git a/systemd.changes b/systemd.changes index 26dbb209..c1a39877 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de + +- Change detection of new locking scheme of fsck + ------------------------------------------------------------------- Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 1165efc6..90619c6f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -608,8 +608,6 @@ Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch -%define util_linux_version %(rpm -q util-linux --qf '%%{VERSION}' | awk -F . '{printf "%%2.2d%%2.2d%%2.2d", $1, $2, $3}') - %description Systemd is a system and service manager, compatible with SysV and LSB init scripts for Linux. systemd provides aggressive parallelization @@ -1079,9 +1077,11 @@ rm -f units/emergency.service # disable "-l" option for fsck if it does not support new locking scheme # compare with commit c343be283b7152554bac0c02493a4e1759c163f7 -%if 0%{util_linux_version} < 22500 -sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c -%endif +PATH_FSCK=$(type -p fsck) +if grep -q /run/fsck/%%s\\.lock $PATH_FSCK +then + sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +fi %build cflags () From cb6391da838b1deb2e8b4ab6f91d88d362de5b4e06d3dce16c7c6e22e7217c3b Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 10 Jun 2014 16:23:39 +0000 Subject: [PATCH 17/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=665 --- systemd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/systemd.spec b/systemd.spec index 90619c6f..b4f96881 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1077,6 +1077,7 @@ rm -f units/emergency.service # disable "-l" option for fsck if it does not support new locking scheme # compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +PATH=${PATH}:/sbin:/usr/sbin PATH_FSCK=$(type -p fsck) if grep -q /run/fsck/%%s\\.lock $PATH_FSCK then From 7d2f8965e5267e8be4b26307db184e0da76cda72923407b53e2eeb6e39b8ff5d Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Tue, 10 Jun 2014 20:00:15 +0000 Subject: [PATCH 18/43] Accepting request 236796 from home:rmilasan:branches:Base:System - Add upstream patches 1033-udev-really-exclude-device-mapper-from-block-device.patch 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch - Add upstream patches 1033-udev-really-exclude-device-mapper-from-block-device.patch 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch OBS-URL: https://build.opensuse.org/request/show/236796 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=666 --- ...lude-device-mapper-from-block-device.patch | 39 +++++++++++++++++++ ...eturn-value-from-udev_enumerate_scan.patch | 26 +++++++++++++ systemd-mini.changes | 7 ++++ systemd-mini.spec | 7 ++++ systemd.changes | 7 ++++ systemd.spec | 6 +++ 6 files changed, 92 insertions(+) create mode 100644 1033-udev-really-exclude-device-mapper-from-block-device.patch create mode 100644 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch diff --git a/1033-udev-really-exclude-device-mapper-from-block-device.patch b/1033-udev-really-exclude-device-mapper-from-block-device.patch new file mode 100644 index 00000000..594331c3 --- /dev/null +++ b/1033-udev-really-exclude-device-mapper-from-block-device.patch @@ -0,0 +1,39 @@ +From 638ca89c53e2b897cfb3f627f4acbc7d09af2f4c Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Tue, 10 Jun 2014 15:51:15 +0200 +Subject: [PATCH] udev: really exclude device-mapper from block device + ownership event locking + +Arguments were wrong order, no? +This fixes commits: + +e918a1b5a94f270186dca59156354acd2a596494 +3d06f4183470d42361303086ed9dedd29c0ffc1b + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -304,7 +304,7 @@ static void worker_new(struct event *eve + * IMHO this sounds like a good plan for this moment + */ + if (streq_ptr("block", udev_device_get_subsystem(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + struct udev_device *d = dev; + + if (streq_ptr("partition", udev_device_get_devtype(d))) +@@ -744,7 +744,7 @@ static int synthesize_change(struct udev + + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + bool part_table_read = false; + bool has_partitions = false; + int fd; diff --git a/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch new file mode 100644 index 00000000..c2a21fce --- /dev/null +++ b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch @@ -0,0 +1,26 @@ +From 47a3fa0f7679521b85f7aeba9e245c52cc7bb2cb Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Wed, 4 Jun 2014 23:40:43 +0200 +Subject: [PATCH] udev: check the return value from udev_enumerate_scan_devices + +The return value from udev_enumerate_scan_devices was stored but +never used. I assume this was meant to be checked. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -783,6 +783,8 @@ static int synthesize_change(struct udev + return r; + + r = udev_enumerate_scan_devices(e); ++ if (r < 0) ++ return r; + + udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; diff --git a/systemd-mini.changes b/systemd-mini.changes index c1a39877..cf1ac9fd 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + ------------------------------------------------------------------- Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 61787e83..336e49e8 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -612,6 +612,10 @@ Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1076,12 +1080,15 @@ cp %{SOURCE7} m4/ %patch1030 -p1 %patch1031 -p1 %patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 # ensure generate files are removed rm -f units/emergency.service # disable "-l" option for fsck if it does not support new locking scheme # compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +PATH=${PATH}:/sbin:/usr/sbin PATH_FSCK=$(type -p fsck) if grep -q /run/fsck/%%s\\.lock $PATH_FSCK then diff --git a/systemd.changes b/systemd.changes index c1a39877..cf1ac9fd 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + ------------------------------------------------------------------- Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index b4f96881..10039fd2 100644 --- a/systemd.spec +++ b/systemd.spec @@ -607,6 +607,10 @@ Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1071,6 +1075,8 @@ cp %{SOURCE7} m4/ %patch1030 -p1 %patch1031 -p1 %patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 # ensure generate files are removed rm -f units/emergency.service From 175e4a4fba444b6aa22d505069eac7e120cd5bcfb0df62212b2ba5cdc28dbb20 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 11 Jun 2014 13:37:55 +0000 Subject: [PATCH 19/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=667 --- 0001-umount-modernizations.patch | 119 +++++++++++++++++ ...etting-up-an-inaccessible-mount-poin.patch | 122 ++++++++++++++++++ 0003-core-allow-transient-mount-units.patch | 115 +++++++++++++++++ ...d-detect-virt-only-discover-Xen-domU.patch | 79 ++++++++++++ ...ght-Do-not-clamp-brightness-for-LEDs.patch | 60 +++++++++ ...-the-kernel-s-quiet-cmdline-argument.patch | 29 +++++ systemd-detect-xendom.patch | 35 ----- systemd-mini.changes | 18 +++ systemd-mini.spec | 27 +++- systemd.changes | 18 +++ systemd.spec | 27 +++- 11 files changed, 608 insertions(+), 41 deletions(-) create mode 100644 0001-umount-modernizations.patch create mode 100644 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch create mode 100644 0003-core-allow-transient-mount-units.patch create mode 100644 0004-systemd-detect-virt-only-discover-Xen-domU.patch create mode 100644 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch create mode 100644 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch delete mode 100644 systemd-detect-xendom.patch diff --git a/0001-umount-modernizations.patch b/0001-umount-modernizations.patch new file mode 100644 index 00000000..1397d155 --- /dev/null +++ b/0001-umount-modernizations.patch @@ -0,0 +1,119 @@ +From c3544e8d2c2d870a2aff0944aff4ab7824b9ae6b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 21:35:15 +0200 +Subject: [PATCH] umount: modernizations + +--- + src/core/umount.c | 65 ++++++++++++++++++++++------------------------------- + 1 file changed, 27 insertions(+), 38 deletions(-) + +diff --git src/core/umount.c src/core/umount.c +index d1258f0..a30f674 100644 +--- src/core/umount.c ++++ src/core/umount.c +@@ -61,52 +61,46 @@ static void mount_points_list_free(MountPoint **head) { + } + + static int mount_points_list_get(MountPoint **head) { +- FILE *proc_self_mountinfo; +- char *path, *p; ++ _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; + unsigned int i; +- int r; + + assert(head); + +- if (!(proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"))) ++ proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); ++ if (!proc_self_mountinfo) + return -errno; + + for (i = 1;; i++) { +- int k; ++ _cleanup_free_ char *path = NULL; ++ char *p = NULL; + MountPoint *m; ++ int k; + +- path = p = NULL; +- +- if ((k = fscanf(proc_self_mountinfo, +- "%*s " /* (1) mount id */ +- "%*s " /* (2) parent id */ +- "%*s " /* (3) major:minor */ +- "%*s " /* (4) root */ +- "%ms " /* (5) mount point */ +- "%*s" /* (6) mount options */ +- "%*[^-]" /* (7) optional fields */ +- "- " /* (8) separator */ +- "%*s " /* (9) file system type */ +- "%*s" /* (10) mount source */ +- "%*s" /* (11) mount options 2 */ +- "%*[^\n]", /* some rubbish at the end */ +- &path)) != 1) { ++ k = fscanf(proc_self_mountinfo, ++ "%*s " /* (1) mount id */ ++ "%*s " /* (2) parent id */ ++ "%*s " /* (3) major:minor */ ++ "%*s " /* (4) root */ ++ "%ms " /* (5) mount point */ ++ "%*s" /* (6) mount options */ ++ "%*[^-]" /* (7) optional fields */ ++ "- " /* (8) separator */ ++ "%*s " /* (9) file system type */ ++ "%*s" /* (10) mount source */ ++ "%*s" /* (11) mount options 2 */ ++ "%*[^\n]", /* some rubbish at the end */ ++ &path); ++ if (k != 1) { + if (k == EOF) + break; + + log_warning("Failed to parse /proc/self/mountinfo:%u.", i); +- +- free(path); + continue; + } + + p = cunescape(path); +- free(path); +- +- if (!p) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!p) ++ return -ENOMEM; + + /* Ignore mount points we can't unmount because they + * are API or because we are keeping them open (like +@@ -118,22 +112,17 @@ static int mount_points_list_get(MountPoint **head) { + continue; + } + +- if (!(m = new0(MountPoint, 1))) { ++ m = new0(MountPoint, 1); ++ if (!m) { + free(p); +- r = -ENOMEM; +- goto finish; ++ return -ENOMEM; + } + + m->path = p; + LIST_PREPEND(mount_point, *head, m); + } + +- r = 0; +- +-finish: +- fclose(proc_self_mountinfo); +- +- return r; ++ return 0; + } + + static int swap_list_get(MountPoint **head) { +-- +1.7.9.2 + diff --git a/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch b/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch new file mode 100644 index 00000000..dfbf403c --- /dev/null +++ b/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch @@ -0,0 +1,122 @@ +Based on 6d313367d9ef780560e117e886502a99fa220eac Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 21:35:35 +0200 +Subject: [PATCH] namespace: when setting up an inaccessible mount point, + unmounting everything below + +This has the benefit of not triggering any autofs mount points +unnecessarily. + +--- + src/core/namespace.c | 6 ++++ + src/shared/util.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/shared/util.h | 2 + + 3 files changed, 76 insertions(+) + +--- src/core/namespace.c ++++ src/core/namespace.c 2014-06-11 00:00:00.000000000 +0000 +@@ -220,6 +220,12 @@ static int apply_mount( + return mount_dev(m); + + case INACCESSIBLE: ++ ++ /* First, get rid of everything that is below if there ++ * is anything... Then, overmount it with an ++ * inaccessible directory. */ ++ umount_recursive(m->path, 0); ++ + what = "/run/systemd/inaccessible"; + break; + +--- src/shared/util.c ++++ src/shared/util.c 2014-06-11 00:00:00.000000000 +0000 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -4635,6 +4636,73 @@ char *strjoin(const char *x, ...) { + return r; + } + ++int umount_recursive(const char *prefix, int flags) { ++ bool again; ++ int n = 0, r; ++ ++ /* Try to umount everything recursively below a ++ * directory. Also, take care of stacked mounts, and keep ++ * unmounting them until they are gone. */ ++ ++ do { ++ _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; ++ ++ again = false; ++ r = 0; ++ ++ proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); ++ if (!proc_self_mountinfo) ++ return -errno; ++ ++ for (;;) { ++ _cleanup_free_ char *path = NULL, *p = NULL; ++ int k; ++ ++ k = fscanf(proc_self_mountinfo, ++ "%*s " /* (1) mount id */ ++ "%*s " /* (2) parent id */ ++ "%*s " /* (3) major:minor */ ++ "%*s " /* (4) root */ ++ "%ms " /* (5) mount point */ ++ "%*s" /* (6) mount options */ ++ "%*[^-]" /* (7) optional fields */ ++ "- " /* (8) separator */ ++ "%*s " /* (9) file system type */ ++ "%*s" /* (10) mount source */ ++ "%*s" /* (11) mount options 2 */ ++ "%*[^\n]", /* some rubbish at the end */ ++ &path); ++ ++ if (k != 1) { ++ if (k == EOF) ++ break; ++ ++ continue; ++ } ++ ++ p = cunescape(path); ++ if (!p) ++ return -ENOMEM; ++ ++ if (!path_startswith(p, prefix)) ++ continue; ++ ++ if (umount2(p, flags) < 0) { ++ r = -errno; ++ continue; ++ } ++ ++ again = true; ++ n++; ++ ++ break; ++ } ++ ++ } while (again); ++ ++ return r ? r : n; ++} ++ + bool is_main_thread(void) { + static thread_local int cached = 0; + +--- src/shared/util.h ++++ src/shared/util.h 2014-06-11 10:10:08.000000000 +0000 +@@ -890,3 +890,5 @@ union file_handle_union { + struct file_handle handle; + char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ]; + }; ++ ++int umount_recursive(const char *target, int flags); diff --git a/0003-core-allow-transient-mount-units.patch b/0003-core-allow-transient-mount-units.patch new file mode 100644 index 00000000..607bdaea --- /dev/null +++ b/0003-core-allow-transient-mount-units.patch @@ -0,0 +1,115 @@ +From 0e252f6b375af59eac9bd6d2fe8dd6ee2f51998d Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Fri, 6 Jun 2014 15:10:20 +0200 +Subject: [PATCH] core: allow transient mount units + +For now only What=, Options=, Type= are supported, and Where= is deduced +from the unit name. +--- + src/core/dbus-mount.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- + src/core/mount.c | 2 ++ + 2 files changed, 65 insertions(+), 1 deletion(-) + +diff --git src/core/dbus-mount.c src/core/dbus-mount.c +index e64d3ea..e27019d 100644 +--- src/core/dbus-mount.c ++++ src/core/dbus-mount.c +@@ -124,6 +124,47 @@ const sd_bus_vtable bus_mount_vtable[] = { + SD_BUS_VTABLE_END + }; + ++static int bus_mount_set_transient_property( ++ Mount *m, ++ const char *name, ++ sd_bus_message *message, ++ UnitSetPropertiesMode mode, ++ sd_bus_error *error) { ++ ++ const char *new_property; ++ char **property; ++ char *p; ++ int r; ++ ++ assert(m); ++ assert(name); ++ assert(message); ++ ++ if (streq(name, "What")) ++ property = &m->parameters_fragment.what; ++ else if (streq(name, "Options")) ++ property = &m->parameters_fragment.options; ++ else if (streq(name, "Type")) ++ property = &m->parameters_fragment.fstype; ++ else ++ return 0; ++ ++ r = sd_bus_message_read(message, "s", &new_property); ++ if (r < 0) ++ return r; ++ ++ if (mode != UNIT_CHECK) { ++ p = strdup(new_property); ++ if (!p) ++ return -ENOMEM; ++ ++ free(*property); ++ *property = p; ++ } ++ ++ return 1; ++} ++ + int bus_mount_set_property( + Unit *u, + const char *name, +@@ -132,12 +173,33 @@ int bus_mount_set_property( + sd_bus_error *error) { + + Mount *m = MOUNT(u); ++ int r; + + assert(m); + assert(name); + assert(message); + +- return bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); ++ r = bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ if (u->transient && u->load_state == UNIT_STUB) { ++ /* This is a transient unit, let's load a little more */ ++ ++ r = bus_mount_set_transient_property(m, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ r = bus_exec_context_set_transient_property(u, &m->exec_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ r = bus_kill_context_set_transient_property(u, &m->kill_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ } ++ ++ return 0; + } + + int bus_mount_commit_properties(Unit *u) { +diff --git src/core/mount.c src/core/mount.c +index a979837..14ac0a0 100644 +--- src/core/mount.c ++++ src/core/mount.c +@@ -1819,6 +1819,8 @@ const UnitVTable mount_vtable = { + + .get_timeout = mount_get_timeout, + ++ .can_transient = true, ++ + .enumerate = mount_enumerate, + .shutdown = mount_shutdown, + +-- +1.7.9.2 + diff --git a/0004-systemd-detect-virt-only-discover-Xen-domU.patch b/0004-systemd-detect-virt-only-discover-Xen-domU.patch new file mode 100644 index 00000000..246e09b3 --- /dev/null +++ b/0004-systemd-detect-virt-only-discover-Xen-domU.patch @@ -0,0 +1,79 @@ +From 37287585b6ba9a55065c8f94458f6db3c0abe0af Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Fri, 6 Jun 2014 16:36:45 +0200 +Subject: [PATCH] systemd-detect-virt: only discover Xen domU + +The current vm detection lacks the distinction between Xen dom0 and Xen domU. +Both, dom0 and domU are running inside the hypervisor. +Therefore systemd-detect-virt and the ConditionVirtualization directive detect +dom0 as a virtual machine. + +dom0 is not using virtual devices but is accessing the real hardware. +Therefore dom0 should be considered the virtualisation host and not a virtual +machine. + +https://bugs.freedesktop.org/show_bug.cgi?id=77271 +--- + src/shared/virt.c | 34 +++++++++++++++++++++++++++------- + 1 file changed, 27 insertions(+), 7 deletions(-) + +diff --git src/shared/virt.c src/shared/virt.c +index 1e227c5..774915f 100644 +--- src/shared/virt.c ++++ src/shared/virt.c +@@ -148,7 +148,7 @@ static int detect_vm_dmi(const char **_id) { + + /* Returns a short identifier for the various VM implementations */ + int detect_vm(const char **id) { +- _cleanup_free_ char *hvtype = NULL, *cpuinfo_contents = NULL; ++ _cleanup_free_ char *domcap = NULL, *cpuinfo_contents = NULL; + static thread_local int cached_found = -1; + static thread_local const char *cached_id = NULL; + const char *_id = NULL; +@@ -162,17 +162,37 @@ int detect_vm(const char **id) { + return cached_found; + } + +- /* Try high-level hypervisor sysfs file first: ++ /* Try xen capabilities file first, if not found try high-level hypervisor sysfs file: + * +- * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */ +- r = read_one_line_file("/sys/hypervisor/type", &hvtype); ++ * https://bugs.freedesktop.org/show_bug.cgi?id=77271 */ ++ r = read_one_line_file("/proc/xen/capabilities", &domcap); + if (r >= 0) { +- if (streq(hvtype, "xen")) { ++ char *cap, *i = domcap; ++ ++ while ((cap = strsep(&i, ","))) ++ if (streq(cap, "control_d")) ++ break; ++ ++ if (!i) { + _id = "xen"; + r = 1; +- goto finish; + } +- } else if (r != -ENOENT) ++ ++ goto finish; ++ ++ } else if (r == -ENOENT) { ++ _cleanup_free_ char *hvtype = NULL; ++ ++ r = read_one_line_file("/sys/hypervisor/type", &hvtype); ++ if (r >= 0) { ++ if (streq(hvtype, "xen")) { ++ _id = "xen"; ++ r = 1; ++ goto finish; ++ } ++ } else if (r != -ENOENT) ++ return r; ++ } else + return r; + + /* this will set _id to "other" and return 0 for unknown hypervisors */ +-- +1.7.9.2 + diff --git a/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch b/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch new file mode 100644 index 00000000..37c42d2e --- /dev/null +++ b/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch @@ -0,0 +1,60 @@ +From 4cd2b2cf8ca585d15ebc859701b346658262b5bb Mon Sep 17 00:00:00 2001 +From: Denis Tikhomirov +Date: Thu, 5 Jun 2014 23:59:40 +0400 +Subject: [PATCH] backlight: Do not clamp brightness for LEDs + +https://bugs.freedesktop.org/show_bug.cgi?id=77092 + +On Thu, Jun 05, 2014 at 08:37:20AM +0200, Lennart Poettering wrote: +> The patch is line-broken, please send an uncorrupted patch! +I am very sorry, I forgot that my client limits line width. I will use +mutt now on. +> clamp_brightness() clamps the brightness value to the range of the +> actual device. This is a recent addition that was added to deal with +> driver updates where the resolution is changed. I don't think this part +> should be dropped for LED devices. The clamp_brightness() call hence +> should be called unconditionally, however, internally it should use a +> different min_brightness value if something is an !backlight devices... +Thank you for explanation, this sounds very reasonable to me. Please, +see updated patch: +--- + src/backlight/backlight.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git src/backlight/backlight.c src/backlight/backlight.c +index 691472c..4d94ebf 100644 +--- src/backlight/backlight.c ++++ src/backlight/backlight.c +@@ -225,11 +225,13 @@ static unsigned get_max_brightness(struct udev_device *device) { + + /* Some systems turn the backlight all the way off at the lowest levels. + * clamp_brightness clamps the saved brightness to at least 1 or 5% of +- * max_brightness. This avoids preserving an unreadably dim screen, which +- * would otherwise force the user to disable state restoration. */ ++ * max_brightness in case of 'backlight' subsystem. This avoids preserving ++ * an unreadably dim screen, which would otherwise force the user to ++ * disable state restoration. */ + static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) { + int r; + unsigned brightness, new_brightness, min_brightness; ++ const char *subsystem; + + r = safe_atou(*value, &brightness); + if (r < 0) { +@@ -237,7 +239,12 @@ static void clamp_brightness(struct udev_device *device, char **value, unsigned + return; + } + +- min_brightness = MAX(1U, max_brightness/20); ++ subsystem = udev_device_get_subsystem(device); ++ if (streq_ptr(subsystem, "backlight")) ++ min_brightness = MAX(1U, max_brightness/20); ++ else ++ min_brightness = 0; ++ + new_brightness = CLAMP(brightness, min_brightness, max_brightness); + if (new_brightness != brightness) { + char *old_value = *value; +-- +1.7.9.2 + diff --git a/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch b/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch new file mode 100644 index 00000000..e76abb48 --- /dev/null +++ b/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch @@ -0,0 +1,29 @@ +From e683212f049ac5d3f95fb17300cfa2fd971f78f3 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Tue, 3 Jun 2014 19:44:03 +0200 +Subject: [PATCH] log: honour the kernel's quiet cmdline argument + +It was forgotten in b1e90ec515408aec2702522f6f68c4920b56375b + +See https://bugs.freedesktop.org/show_bug.cgi?id=79582 +--- + src/shared/log.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git src/shared/log.c src/shared/log.c +index 9039db3..6f17705 100644 +--- src/shared/log.c ++++ src/shared/log.c +@@ -878,6 +878,9 @@ void log_parse_environment(void) { + if (l == 5 && startswith(w, "debug")) { + log_set_max_level(LOG_DEBUG); + break; ++ } else if (l == 5 && startswith(w, "quiet")) { ++ log_set_max_level(LOG_WARNING); ++ break; + } + } + } +-- +1.7.9.2 + diff --git a/systemd-detect-xendom.patch b/systemd-detect-xendom.patch deleted file mode 100644 index 7c02a07a..00000000 --- a/systemd-detect-xendom.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur systemd-210/src/shared/virt.c systemd-210-mod/src/shared/virt.c ---- systemd-210/src/shared/virt.c 2014-02-24 15:38:03.909784909 +0100 -+++ systemd-210/src/shared/virt.c 2014-04-10 13:48:05.568766957 +0200 -@@ -149,7 +149,7 @@ - - /* Returns a short identifier for the various VM implementations */ - int detect_vm(const char **id) { -- _cleanup_free_ char *hvtype = NULL, *cpuinfo_contents = NULL; -+ _cleanup_free_ char *domcap = NULL, *cpuinfo_contents = NULL; - static thread_local int cached_found = -1; - static thread_local const char *cached_id = NULL; - const char *_id = NULL; -@@ -166,13 +166,18 @@ - /* Try high-level hypervisor sysfs file first: - * - * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */ -- r = read_one_line_file("/sys/hypervisor/type", &hvtype); -+ r = read_one_line_file("/proc/xen/capabilities", &domcap); - if (r >= 0) { -- if (streq(hvtype, "xen")) { -- _id = "xen"; -+ if (strstr(domcap, "control_d")) { -+ r = 0; -+ _id = "xen-dom0"; -+ } else { - r = 1; -- goto finish; -+ _id = "xen-domU"; - } -+ -+ goto finish; -+ - } else if (r != -ENOENT) - return r; - diff --git a/systemd-mini.changes b/systemd-mini.changes index cf1ac9fd..5c0a5fc0 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de + +- Do not override predictable names for openSUSE + +------------------------------------------------------------------- +Wed Jun 11 11:03:45 UTC 2014 - werner@suse.de + +- Remove systemd-detect-xendom.patch as it becomes obsolete with + upstream patch 0004-systemd-detect-virt-only-discover-Xen-domU.patch +- Add upstream patches + 0001-umount-modernizations.patch + 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch + 0003-core-allow-transient-mount-units.patch + 0004-systemd-detect-virt-only-discover-Xen-domU.patch + 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch + 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch + ------------------------------------------------------------------- Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 336e49e8..490a0753 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -391,8 +391,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -# PATCH-FIX-SUSE Detect XEN dom0 as well as domU -Patch196: systemd-detect-xendom.patch +## # PATCH-FIX-SUSE Detect XEN dom0 as well as domU +## Patch196: systemd-detect-xendom.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -541,6 +541,18 @@ Patch269: 0001-hwdb-fix-case-sensitive-match.patch Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch # PATCH-FIX-UPSTREAM added at 2014/06/06 Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch272: 0001-umount-modernizations.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch273: 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch274: 0003-core-allow-transient-mount-units.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 - Detect XEN dom0 as well as domU +Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch # UDEV PATCHES # ============ @@ -970,7 +982,6 @@ cp %{SOURCE7} m4/ %patch193 -p1 %patch194 -p0 %patch195 -p0 -%patch196 -p1 %patch197 -p1 %patch198 -p1 %patch199 -p0 @@ -1045,6 +1056,12 @@ cp %{SOURCE7} m4/ %patch269 -p0 %patch270 -p0 %patch271 -p0 +%patch272 -p0 +%patch273 -p0 +%patch274 -p0 +%patch275 -p0 +%patch276 -p0 +%patch277 -p0 # udev patches %patch1001 -p1 @@ -1137,6 +1154,10 @@ export LDFLAGS CFLAGS="$CFLAGS -DNET_IFNAMES=1" %else CFLAGS="$CFLAGS -DNET_IFNAMES=0" + for rules in 75-persistent-net-generator 76-net-sriov-names + do + sed -ri '/^ENV\{net.ifnames\}=="1", GOTO="[^"]*"$/{ s/=="1"/!="0"/ }' src/udev/rule_generator/${rules}.rules + done %endif cflags -pipe CFLAGS cflags -Wl,-O2 LDFLAGS diff --git a/systemd.changes b/systemd.changes index cf1ac9fd..5c0a5fc0 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de + +- Do not override predictable names for openSUSE + +------------------------------------------------------------------- +Wed Jun 11 11:03:45 UTC 2014 - werner@suse.de + +- Remove systemd-detect-xendom.patch as it becomes obsolete with + upstream patch 0004-systemd-detect-virt-only-discover-Xen-domU.patch +- Add upstream patches + 0001-umount-modernizations.patch + 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch + 0003-core-allow-transient-mount-units.patch + 0004-systemd-detect-virt-only-discover-Xen-domU.patch + 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch + 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch + ------------------------------------------------------------------- Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 10039fd2..da704c3c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -386,8 +386,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -# PATCH-FIX-SUSE Detect XEN dom0 as well as domU -Patch196: systemd-detect-xendom.patch +## # PATCH-FIX-SUSE Detect XEN dom0 as well as domU +## Patch196: systemd-detect-xendom.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -536,6 +536,18 @@ Patch269: 0001-hwdb-fix-case-sensitive-match.patch Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch # PATCH-FIX-UPSTREAM added at 2014/06/06 Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch272: 0001-umount-modernizations.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch273: 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch274: 0003-core-allow-transient-mount-units.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 - Detect XEN dom0 as well as domU +Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch # UDEV PATCHES # ============ @@ -965,7 +977,6 @@ cp %{SOURCE7} m4/ %patch193 -p1 %patch194 -p0 %patch195 -p0 -%patch196 -p1 %patch197 -p1 %patch198 -p1 %patch199 -p0 @@ -1040,6 +1051,12 @@ cp %{SOURCE7} m4/ %patch269 -p0 %patch270 -p0 %patch271 -p0 +%patch272 -p0 +%patch273 -p0 +%patch274 -p0 +%patch275 -p0 +%patch276 -p0 +%patch277 -p0 # udev patches %patch1001 -p1 @@ -1132,6 +1149,10 @@ export LDFLAGS CFLAGS="$CFLAGS -DNET_IFNAMES=1" %else CFLAGS="$CFLAGS -DNET_IFNAMES=0" + for rules in 75-persistent-net-generator 76-net-sriov-names + do + sed -ri '/^ENV\{net.ifnames\}=="1", GOTO="[^"]*"$/{ s/=="1"/!="0"/ }' src/udev/rule_generator/${rules}.rules + done %endif cflags -pipe CFLAGS cflags -Wl,-O2 LDFLAGS From e01ca7cf15be76b4063088e84723b2744d49fa51a256fc6ca68739af7a68eff6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 11 Jun 2014 14:10:42 +0000 Subject: [PATCH 20/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=668 --- systemd-mini.changes | 8 +++++++ systemd-mini.spec | 5 +++-- systemd.changes | 8 +++++++ systemd.spec | 5 +++-- ...s-do-not-clean-for-mandb-index-files.patch | 22 +++++++++++++++++++ 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 tmpfiles-do-not-clean-for-mandb-index-files.patch diff --git a/systemd-mini.changes b/systemd-mini.changes index 5c0a5fc0..21cf4200 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de + +- Add patch tmpfiles-do-not-clean-for-mandb-index-files.patch + there is no need to clean out all 30 days the index data base + files nor the cachedir tags of mandb. Those files are used + for whatis(1) as well as for apropos(1). + ------------------------------------------------------------------- Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 490a0753..502577af 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -391,8 +391,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -## # PATCH-FIX-SUSE Detect XEN dom0 as well as domU -## Patch196: systemd-detect-xendom.patch +# PATCH-FIX-SUSE Do not clean the data base files of the manual pages +Patch196: tmpfiles-do-not-clean-for-mandb-index-files.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -981,6 +981,7 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 +%patch196 -p0 %patch195 -p0 %patch197 -p1 %patch198 -p1 diff --git a/systemd.changes b/systemd.changes index 5c0a5fc0..21cf4200 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de + +- Add patch tmpfiles-do-not-clean-for-mandb-index-files.patch + there is no need to clean out all 30 days the index data base + files nor the cachedir tags of mandb. Those files are used + for whatis(1) as well as for apropos(1). + ------------------------------------------------------------------- Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index da704c3c..4f0f58c7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -386,8 +386,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -## # PATCH-FIX-SUSE Detect XEN dom0 as well as domU -## Patch196: systemd-detect-xendom.patch +# PATCH-FIX-SUSE Do not clean the data base files of the manual pages +Patch196: tmpfiles-do-not-clean-for-mandb-index-files.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -976,6 +976,7 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 +%patch196 -p0 %patch195 -p0 %patch197 -p1 %patch198 -p1 diff --git a/tmpfiles-do-not-clean-for-mandb-index-files.patch b/tmpfiles-do-not-clean-for-mandb-index-files.patch new file mode 100644 index 00000000..3bfd928f --- /dev/null +++ b/tmpfiles-do-not-clean-for-mandb-index-files.patch @@ -0,0 +1,22 @@ +There is no need to clean out all 30 days the index data base +files nor the cachedir tags of mandb. Those files are used +for whatis(1) as well as for apropos(1). + +--- + systemd-210/tmpfiles.d/systemd.conf | 5 +++++ + 1 file changed, 5 insertions(+) + +--- systemd-210/tmpfiles.d/systemd.conf ++++ systemd-210/tmpfiles.d/systemd.conf 2014-06-11 13:47:59.470236564 +0000 +@@ -14,6 +14,11 @@ f /var/log/wtmp 0664 root utmp - + f /var/log/btmp 0600 root root - + + d /var/cache/man - - - 30d ++# mandb uses data base file which should not be cleared ++x /var/cache/man/index.* ++x /var/cache/man/CACHEDIR.TAG ++x /var/cache/man/*/index.* ++x /var/cache/man/*/CACHEDIR.TAG + + d /run/systemd/ask-password 0755 root root - + d /run/systemd/seats 0755 root root - From aa39d53e6301bbc8324cb1d8b085689c94a9ef35cca22a0eefbd6385bb3b9e97 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 11 Jun 2014 14:11:11 +0000 Subject: [PATCH 21/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=669 --- systemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd.spec b/systemd.spec index 4f0f58c7..2e056141 100644 --- a/systemd.spec +++ b/systemd.spec @@ -976,7 +976,7 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 -%patch196 -p0 +%patch196 -p1 %patch195 -p0 %patch197 -p1 %patch198 -p1 From b2bf22c06907f5f0fa40aeaeb1baa61121d6dece7a3585bb08d2c5718999c699 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 11 Jun 2014 14:21:16 +0000 Subject: [PATCH 22/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=670 --- systemd-mini.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd-mini.spec b/systemd-mini.spec index 502577af..561b0d77 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -981,7 +981,7 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 -%patch196 -p0 +%patch196 -p1 %patch195 -p0 %patch197 -p1 %patch198 -p1 From ba88f714dd0edb0abfde0df28f3bc3e774354635dbc6af48c5e14c05ec58b0ec Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 12 Jun 2014 09:30:28 +0000 Subject: [PATCH 23/43] Accepting request 236925 from home:elvigia:branches:Base:System - Do not build EFI support code in architectures on which the kernel does not support CONFIG_EFI, it won't work. (ia64 also supports it, but that's dead so is not included) - Do not build EFI support code in architectures on which the kernel does not support CONFIG_EFI, it won't work. (ia64 also supports it, but that's dead so is not included) OBS-URL: https://build.opensuse.org/request/show/236925 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=671 --- systemd-mini.changes | 7 +++++++ systemd-mini.spec | 12 +++++++++++- systemd.changes | 7 +++++++ systemd.spec | 12 +++++++++++- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 21cf4200..57433928 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org + +- Do not build EFI support code in architectures on which + the kernel does not support CONFIG_EFI, it won't work. + (ia64 also supports it, but that's dead so is not included) + ------------------------------------------------------------------- Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 561b0d77..b263d4a0 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -26,6 +26,11 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%ifarch %{ix86} x86_64 aarch64 +%define has_efi 1 +%else +%define has_efi 0 +%endif Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd @@ -1191,6 +1196,9 @@ cflags -Wl,--hash-size=8599 LDFLAGS --disable-static \ %if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif +%if ! 0%{has_efi} + --disable-efi \ %endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ @@ -1647,7 +1655,6 @@ exit 0 /bin/systemd-ask-password /bin/systemctl %{_bindir}/systemd-sleep-grub -%{_bindir}/bootctl %{_bindir}/busctl %{_bindir}/kernel-install %{_bindir}/hostnamectl @@ -1735,7 +1742,10 @@ exit 0 %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%if 0%{has_efi} +%{_bindir}/bootctl %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator diff --git a/systemd.changes b/systemd.changes index 21cf4200..57433928 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org + +- Do not build EFI support code in architectures on which + the kernel does not support CONFIG_EFI, it won't work. + (ia64 also supports it, but that's dead so is not included) + ------------------------------------------------------------------- Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 2e056141..c5edaa01 100644 --- a/systemd.spec +++ b/systemd.spec @@ -24,6 +24,11 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%ifarch %{ix86} x86_64 aarch64 +%define has_efi 1 +%else +%define has_efi 0 +%endif Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd @@ -1186,6 +1191,9 @@ cflags -Wl,--hash-size=8599 LDFLAGS --disable-static \ %if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif +%if ! 0%{has_efi} + --disable-efi \ %endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ @@ -1642,7 +1650,6 @@ exit 0 /bin/systemd-ask-password /bin/systemctl %{_bindir}/systemd-sleep-grub -%{_bindir}/bootctl %{_bindir}/busctl %{_bindir}/kernel-install %{_bindir}/hostnamectl @@ -1730,7 +1737,10 @@ exit 0 %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%if 0%{has_efi} +%{_bindir}/bootctl %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator From 241c864105352a9e6f91326ad928627674cf25e90e5986ba19d12fb376f5cf60 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 12 Jun 2014 10:21:33 +0000 Subject: [PATCH 24/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=672 --- systemd-mini.changes | 13 +++++++++++++ systemd-mini.spec | 42 ++++++++++++++++++++++++++++++++++++++++++ systemd.changes | 13 +++++++++++++ systemd.spec | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index 57433928..666e1a76 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de + +- Add workaround for bnc#882393 by adding the systemd update utmp + runlevel service to the wanted unit of e.g. the graphical target +- Add some later on created files to our file list + +------------------------------------------------------------------- +Thu Jun 12 03:33:01 UTC 2014 - jlee@suse.com + +- Generate %{_libexecdir}/modules-load.d/efivars.conf so we load efivars + module at boot time not from udev (bnc#881559). + ------------------------------------------------------------------- Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index b263d4a0..eee57673 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1316,6 +1316,12 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +%if 0%{has_efi} +cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/efivars.conf +# load efivars module at boot time +efivars +EOF +%endif # To avoid making life hard for Factory developers, don't package the # kernel.core_pattern setting until systemd-coredump is a part of an actual @@ -1440,6 +1446,26 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +# Some files which may created by us or by the admin later on +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ + machine-id machine-info hostname \ + systemd/system/runlevel2.target \ + systemd/system/runlevel3.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel5.target +do + > %{buildroot}%{_sysconfdir}/$ghost +done + +# Workaround for bug #882393 +for runlevel in poweroff rescue multi-user graphical reboot +do + mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants + ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ +done + %find_lang systemd %pre @@ -1758,6 +1784,9 @@ exit 0 %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf +%if 0%{has_efi} +%{_libexecdir}/modules-load.d/efivars.conf +%endif %dir %{_libexecdir}/tmpfiles.d %dir %{_sysconfdir}/tmpfiles.d @@ -1791,6 +1820,19 @@ exit 0 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +# Some files which may created by us +%dir %{_sysconfdir}/X11/xorg.conf.d +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf +%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf +%ghost %config(noreplace) %{_sysconfdir}/locale.conf +%ghost %config(noreplace) %{_sysconfdir}/machine-id +%ghost %config(noreplace) %{_sysconfdir}/machine-info +%ghost %config(noreplace) %{_sysconfdir}/hostname +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target + %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service diff --git a/systemd.changes b/systemd.changes index 57433928..666e1a76 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de + +- Add workaround for bnc#882393 by adding the systemd update utmp + runlevel service to the wanted unit of e.g. the graphical target +- Add some later on created files to our file list + +------------------------------------------------------------------- +Thu Jun 12 03:33:01 UTC 2014 - jlee@suse.com + +- Generate %{_libexecdir}/modules-load.d/efivars.conf so we load efivars + module at boot time not from udev (bnc#881559). + ------------------------------------------------------------------- Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index c5edaa01..e06896ee 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1311,6 +1311,12 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +%if 0%{has_efi} +cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/efivars.conf +# load efivars module at boot time +efivars +EOF +%endif # To avoid making life hard for Factory developers, don't package the # kernel.core_pattern setting until systemd-coredump is a part of an actual @@ -1435,6 +1441,26 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +# Some files which may created by us or by the admin later on +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ + machine-id machine-info hostname \ + systemd/system/runlevel2.target \ + systemd/system/runlevel3.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel5.target +do + > %{buildroot}%{_sysconfdir}/$ghost +done + +# Workaround for bug #882393 +for runlevel in poweroff rescue multi-user graphical reboot +do + mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants + ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ +done + %find_lang systemd %pre @@ -1753,6 +1779,9 @@ exit 0 %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf +%if 0%{has_efi} +%{_libexecdir}/modules-load.d/efivars.conf +%endif %dir %{_libexecdir}/tmpfiles.d %dir %{_sysconfdir}/tmpfiles.d @@ -1786,6 +1815,19 @@ exit 0 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +# Some files which may created by us +%dir %{_sysconfdir}/X11/xorg.conf.d +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf +%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf +%ghost %config(noreplace) %{_sysconfdir}/locale.conf +%ghost %config(noreplace) %{_sysconfdir}/machine-id +%ghost %config(noreplace) %{_sysconfdir}/machine-info +%ghost %config(noreplace) %{_sysconfdir}/hostname +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target + %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service From 5c7a4bd51be24d63bcfa01ad571d7fa98f6354afa528b647840e2946ee60bd5f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 12 Jun 2014 12:30:27 +0000 Subject: [PATCH 25/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=673 --- ...-Ignore-devices-with-SYSTEMD_READY-0.patch | 32 +++++++++++++++++++ systemd-mini.changes | 8 +++++ systemd-mini.spec | 3 ++ systemd.changes | 8 +++++ systemd.spec | 3 ++ 5 files changed, 54 insertions(+) create mode 100644 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch diff --git a/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch b/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch new file mode 100644 index 00000000..09c5202c --- /dev/null +++ b/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch @@ -0,0 +1,32 @@ +From c9af1be90db5a29ac86605c67bc2bb4bc5780520 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 12 Jun 2014 12:25:03 +0200 +Subject: [PATCH] 99-systemd.rules: Ignore devices with 'SYSTEMD_READY=0' + +Whenever a rule sets 'SYSTEMD_READY=0' it tries to indicate +that systemd should ignore this device. So we should not +set the 'systemd' tag in these cases; otherwise systemd +will pick up the device. + +References: bnc#881942 + +Signed-off-by: Hannes Reinecke +--- + rules/99-systemd.rules.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index db72373..11ee262 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -11,6 +11,7 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270 + + KERNEL=="vport*", TAG+="systemd" + ++SUBSYSTEM=="block", KERNEL!="ram*", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end" + SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd" + SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" + +-- +1.8.4.5 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 666e1a76..4cacd7ea 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de + +- Add patch + 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch + from Hannes Reinecke to avoid a race condition between variable + 'SYSTEMD_READY=0' and 'systemd' tag within udev rules (bnc#881942) + ------------------------------------------------------------------- Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index eee57673..70b36178 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -633,6 +633,8 @@ Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch # PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1105,6 +1107,7 @@ cp %{SOURCE7} m4/ %patch1032 -p1 %patch1033 -p1 %patch1034 -p1 +%patch1035 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 666e1a76..4cacd7ea 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de + +- Add patch + 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch + from Hannes Reinecke to avoid a race condition between variable + 'SYSTEMD_READY=0' and 'systemd' tag within udev rules (bnc#881942) + ------------------------------------------------------------------- Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index e06896ee..b86edc92 100644 --- a/systemd.spec +++ b/systemd.spec @@ -628,6 +628,8 @@ Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch # PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1100,6 +1102,7 @@ cp %{SOURCE7} m4/ %patch1032 -p1 %patch1033 -p1 %patch1034 -p1 +%patch1035 -p1 # ensure generate files are removed rm -f units/emergency.service From 132beef50c6c3ec2bae416649cbea23343b35563de2112ff2d2e8c98869131ec Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 17 Jun 2014 12:09:34 +0000 Subject: [PATCH 26/43] Accepting request 237758 from home:rmilasan:branches:Base:System - rules: disable usage of dev_id in persistent rules (bnc#882714). add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch - Disable patch (bnc#882714). 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch - rules: disable usage of dev_id in persistent rules (bnc#882714). add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch - Disable patch (bnc#882714). 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch OBS-URL: https://build.opensuse.org/request/show/237758 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=674 --- ...sable-usage-of-dev_id-in-persistent-rules.patch | 14 ++++++++++++++ systemd-mini.changes | 8 ++++++++ systemd-mini.spec | 9 +++++++-- systemd.changes | 8 ++++++++ systemd.spec | 9 +++++++-- 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch diff --git a/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch b/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch new file mode 100644 index 00000000..d26c49c0 --- /dev/null +++ b/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch @@ -0,0 +1,14 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- systemd-210.orig/src/udev/rule_generator/75-persistent-net-generator.rules ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -68,7 +68,8 @@ ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="glob + ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" + + # match interface dev_id +-ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++# disable due to bnc#882714 ++# ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" + + # do not use "locally administered" MAC address + ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" diff --git a/systemd-mini.changes b/systemd-mini.changes index 4cacd7ea..e31567ba 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com + +- rules: disable usage of dev_id in persistent rules (bnc#882714). + add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +- Disable patch (bnc#882714). + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 70b36178..806b9150 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -608,7 +608,8 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# disable due to bnc#882714 +# Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 @@ -635,6 +636,8 @@ Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch # PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +# PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1094,7 +1097,8 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 -%patch1022 -p1 +# disable due to bnc#882714 +# %patch1022 -p1 %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 @@ -1108,6 +1112,7 @@ cp %{SOURCE7} m4/ %patch1033 -p1 %patch1034 -p1 %patch1035 -p1 +%patch1036 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 4cacd7ea..e31567ba 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com + +- rules: disable usage of dev_id in persistent rules (bnc#882714). + add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +- Disable patch (bnc#882714). + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index b86edc92..43d29325 100644 --- a/systemd.spec +++ b/systemd.spec @@ -603,7 +603,8 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# disable due to bnc#882714 +# Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 @@ -630,6 +631,8 @@ Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch # PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +# PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1089,7 +1092,8 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 -%patch1022 -p1 +# disable due to bnc#882714 +# %patch1022 -p1 %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 @@ -1103,6 +1107,7 @@ cp %{SOURCE7} m4/ %patch1033 -p1 %patch1034 -p1 %patch1035 -p1 +%patch1036 -p1 # ensure generate files are removed rm -f units/emergency.service From 98f7eac227c78481410b63e18818f1553675213943ea072a274a5780dd706bc7 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Tue, 17 Jun 2014 12:21:33 +0000 Subject: [PATCH 27/43] Accepting request 237824 from home:rmilasan:branches:Base:System remove patch 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch OBS-URL: https://build.opensuse.org/request/show/237824 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=676 --- ...um-API-and-all-assumptions-about-seq.patch | 1443 ----------------- 1 file changed, 1443 deletions(-) delete mode 100644 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch diff --git a/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch deleted file mode 100644 index db403e31..00000000 --- a/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +++ /dev/null @@ -1,1443 +0,0 @@ -From 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sat, 12 Apr 2014 22:35:50 -0700 -Subject: [PATCH] udev: remove seqnum API and all assumptions about seqnums - -The way the kernel namespaces have been implemented breaks assumptions -udev made regarding uevent sequence numbers. Creating devices in a -namespace "steals" uevents and its sequence numbers from the host. It -confuses the "udevadmin settle" logic, which might block until util a -timeout is reached, even when no uevent is pending. - -Remove any assumptions about sequence numbers and deprecate libudev's -API exposing these numbers; none of that can reliably be used anymore -when namespaces are involved. - -Signed-off-by: Robert Milasan ---- - Makefile.am | 6 +- - man/udevadm.xml | 22 -- - src/libudev/libudev-monitor.c | 17 +- - src/libudev/libudev-queue-private.c | 406 ------------------------------------ - src/libudev/libudev-queue.c | 302 ++------------------------- - src/libudev/libudev.h | 10 +- - src/shared/udev-util.h | 2 - - src/test/test-libudev.c | 24 --- - src/udev/udev-ctrl.c | 2 +- - src/udev/udevadm-settle.c | 131 ++---------- - src/udev/udevd.c | 59 +++--- - 11 files changed, 84 insertions(+), 897 deletions(-) - delete mode 100644 src/libudev/libudev-queue-private.c - -Index: systemd-210/Makefile.am -=================================================================== ---- systemd-210.orig/Makefile.am -+++ systemd-210/Makefile.am -@@ -2520,8 +2520,7 @@ noinst_LTLIBRARIES += \ - - libudev_internal_la_SOURCES =\ - $(libudev_la_SOURCES) \ -- src/libudev/libudev-device-private.c \ -- src/libudev/libudev-queue-private.c -+ src/libudev/libudev-device-private.c - - libudev_internal_la_CFLAGS = \ - $(AM_CFLAGS) \ -@@ -5063,6 +5062,9 @@ test_libsystemd_sym_LDADD = \ - - test_libudev_sym_SOURCES = \ - test-libudev-sym.c -+test_libudev_sym_CFLAGS = \ -+ $(AM_CFLAGS) \ -+ -Wno-deprecated-declarations - test_libudev_sym_LDADD = \ - libudev.la - -Index: systemd-210/man/udevadm.xml -=================================================================== ---- systemd-210.orig/man/udevadm.xml -+++ systemd-210/man/udevadm.xml -@@ -339,21 +339,6 @@ - - - -- -- -- -- Wait only for events after the given sequence -- number. -- -- -- -- -- -- -- Wait only for events before the given sequence number. -- -- -- - - - -@@ -361,13 +346,6 @@ - - - -- -- -- -- Do not print any output, like the remaining queue entries when reaching the timeout. -- -- -- - - - -Index: systemd-210/src/libudev/libudev-monitor.c -=================================================================== ---- systemd-210.orig/src/libudev/libudev-monitor.c -+++ systemd-210/src/libudev/libudev-monitor.c -@@ -147,21 +147,6 @@ static bool udev_has_devtmpfs(struct ude - return false; - } - --/* we consider udev running when we have running udev service */ --static bool udev_has_service(struct udev *udev) { -- struct udev_queue *queue; -- bool active; -- -- queue = udev_queue_new(udev); -- if (!queue) -- return false; -- -- active = udev_queue_get_udev_is_active(queue); -- udev_queue_unref(queue); -- -- return active; --} -- - struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd) - { - struct udev_monitor *udev_monitor; -@@ -185,7 +170,7 @@ struct udev_monitor *udev_monitor_new_fr - * We do not set a netlink multicast group here, so the socket - * will not receive any messages. - */ -- if (!udev_has_service(udev) && !udev_has_devtmpfs(udev)) { -+ if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) { - udev_dbg(udev, "the udev service seems not to be active, disable the monitor\n"); - group = UDEV_MONITOR_NONE; - } else -Index: systemd-210/src/libudev/libudev-queue-private.c -=================================================================== ---- systemd-210.orig/src/libudev/libudev-queue-private.c -+++ /dev/null -@@ -1,406 +0,0 @@ --/*** -- This file is part of systemd. -- -- Copyright 2008-2012 Kay Sievers -- Copyright 2009 Alan Jenkins -- -- systemd is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- systemd 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 -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with systemd; If not, see . --***/ -- --/* -- * DISCLAIMER - The file format mentioned here is private to udev/libudev, -- * and may be changed without notice. -- * -- * The udev event queue is exported as a binary log file. -- * Each log record consists of a sequence number followed by the device path. -- * -- * When a new event is queued, its details are appended to the log. -- * When the event finishes, a second record is appended to the log -- * with the same sequence number but a devpath len of 0. -- * -- * Example: -- * { 0x0000000000000001 } -- * { 0x0000000000000001, 0x0019, "/devices/virtual/mem/null" }, -- * { 0x0000000000000002, 0x001b, "/devices/virtual/mem/random" }, -- * { 0x0000000000000001, 0x0000 }, -- * { 0x0000000000000003, 0x0019, "/devices/virtual/mem/zero" }, -- * -- * Events 2 and 3 are still queued, but event 1 has finished. -- * -- * The queue does not grow indefinitely. It is periodically re-created -- * to remove finished events. Atomic rename() makes this transparent to readers. -- * -- * The queue file starts with a single sequence number which specifies the -- * minimum sequence number in the log that follows. Any events prior to this -- * sequence number have already finished. -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "libudev.h" --#include "libudev-private.h" -- --static int rebuild_queue_file(struct udev_queue_export *udev_queue_export); -- --struct udev_queue_export { -- struct udev *udev; -- int queued_count; /* number of unfinished events exported in queue file */ -- FILE *queue_file; -- unsigned long long int seqnum_max; /* earliest sequence number in queue file */ -- unsigned long long int seqnum_min; /* latest sequence number in queue file */ -- int waste_bytes; /* queue file bytes wasted on finished events */ --}; -- --struct udev_queue_export *udev_queue_export_new(struct udev *udev) --{ -- struct udev_queue_export *udev_queue_export; -- unsigned long long int initial_seqnum; -- -- if (udev == NULL) -- return NULL; -- -- udev_queue_export = new0(struct udev_queue_export, 1); -- if (udev_queue_export == NULL) -- return NULL; -- udev_queue_export->udev = udev; -- -- initial_seqnum = udev_get_kernel_seqnum(udev); -- udev_queue_export->seqnum_min = initial_seqnum; -- udev_queue_export->seqnum_max = initial_seqnum; -- -- udev_queue_export_cleanup(udev_queue_export); -- if (rebuild_queue_file(udev_queue_export) != 0) { -- free(udev_queue_export); -- return NULL; -- } -- -- return udev_queue_export; --} -- --struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export) --{ -- if (udev_queue_export == NULL) -- return NULL; -- if (udev_queue_export->queue_file != NULL) -- fclose(udev_queue_export->queue_file); -- free(udev_queue_export); -- return NULL; --} -- --void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) --{ -- if (udev_queue_export == NULL) -- return; -- unlink("/run/udev/queue.tmp"); -- unlink("/run/udev/queue.bin"); --} -- --static int skip_to(FILE *file, long offset) --{ -- long old_offset; -- -- /* fseek may drop buffered data, avoid it for small seeks */ -- old_offset = ftell(file); -- if (offset > old_offset && offset - old_offset <= BUFSIZ) { -- size_t skip_bytes = offset - old_offset; -- char *buf = alloca(skip_bytes); -- -- if (fread(buf, skip_bytes, 1, file) != skip_bytes) -- return -1; -- } -- -- return fseek(file, offset, SEEK_SET); --} -- --struct queue_devpaths { -- unsigned int devpaths_first; /* index of first queued event */ -- unsigned int devpaths_size; -- long devpaths[]; /* seqnum -> offset of devpath in queue file (or 0) */ --}; -- --/* -- * Returns a table mapping seqnum to devpath file offset for currently queued events. -- * devpaths[i] represents the event with seqnum = i + udev_queue_export->seqnum_min. -- */ --static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_export) --{ -- struct queue_devpaths *devpaths; -- unsigned long long int range; -- long devpath_offset; -- ssize_t devpath_len; -- unsigned long long int seqnum; -- unsigned long long int n; -- unsigned int i; -- -- /* seek to the first event in the file */ -- rewind(udev_queue_export->queue_file); -- udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum); -- -- /* allocate the table */ -- range = udev_queue_export->seqnum_min - udev_queue_export->seqnum_max; -- if (range - 1 > INT_MAX) { -- udev_err(udev_queue_export->udev, "queue file overflow\n"); -- return NULL; -- } -- devpaths = malloc0(sizeof(struct queue_devpaths) + (range + 1) * sizeof(long)); -- if (devpaths == NULL) -- return NULL; -- devpaths->devpaths_size = range + 1; -- -- /* read all records and populate the table */ -- for (;;) { -- if (udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum) < 0) -- break; -- n = seqnum - udev_queue_export->seqnum_max; -- if (n >= devpaths->devpaths_size) -- goto read_error; -- -- devpath_offset = ftell(udev_queue_export->queue_file); -- devpath_len = udev_queue_skip_devpath(udev_queue_export->queue_file); -- if (devpath_len < 0) -- goto read_error; -- -- if (devpath_len > 0) -- devpaths->devpaths[n] = devpath_offset; -- else -- devpaths->devpaths[n] = 0; -- } -- -- /* find first queued event */ -- for (i = 0; i < devpaths->devpaths_size; i++) { -- if (devpaths->devpaths[i] != 0) -- break; -- } -- devpaths->devpaths_first = i; -- -- return devpaths; -- --read_error: -- udev_err(udev_queue_export->udev, "queue file corrupted\n"); -- free(devpaths); -- return NULL; --} -- --static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) --{ -- unsigned long long int seqnum; -- struct queue_devpaths *devpaths = NULL; -- FILE *new_queue_file = NULL; -- unsigned int i; -- -- /* read old queue file */ -- if (udev_queue_export->queue_file != NULL) { -- devpaths = build_index(udev_queue_export); -- if (devpaths != NULL) -- udev_queue_export->seqnum_max += devpaths->devpaths_first; -- } -- if (devpaths == NULL) { -- udev_queue_export->queued_count = 0; -- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; -- } -- -- /* create new queue file */ -- new_queue_file = fopen("/run/udev/queue.tmp", "w+e"); -- if (new_queue_file == NULL) -- goto error; -- seqnum = udev_queue_export->seqnum_max; -- fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file); -- -- /* copy unfinished events only to the new file */ -- if (devpaths != NULL) { -- for (i = devpaths->devpaths_first; i < devpaths->devpaths_size; i++) { -- char devpath[UTIL_PATH_SIZE]; -- int err; -- unsigned short devpath_len; -- -- if (devpaths->devpaths[i] != 0) -- { -- skip_to(udev_queue_export->queue_file, devpaths->devpaths[i]); -- err = udev_queue_read_devpath(udev_queue_export->queue_file, devpath, sizeof(devpath)); -- devpath_len = err; -- -- fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file); -- fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file); -- fwrite(devpath, 1, devpath_len, new_queue_file); -- } -- seqnum++; -- } -- free(devpaths); -- devpaths = NULL; -- } -- fflush(new_queue_file); -- if (ferror(new_queue_file)) -- goto error; -- -- /* rename the new file on top of the old one */ -- if (rename("/run/udev/queue.tmp", "/run/udev/queue.bin") != 0) -- goto error; -- -- if (udev_queue_export->queue_file != NULL) -- fclose(udev_queue_export->queue_file); -- udev_queue_export->queue_file = new_queue_file; -- udev_queue_export->waste_bytes = 0; -- -- return 0; -- --error: -- udev_err(udev_queue_export->udev, "failed to create queue file: %m\n"); -- udev_queue_export_cleanup(udev_queue_export); -- -- if (udev_queue_export->queue_file != NULL) { -- fclose(udev_queue_export->queue_file); -- udev_queue_export->queue_file = NULL; -- } -- if (new_queue_file != NULL) -- fclose(new_queue_file); -- -- if (devpaths != NULL) -- free(devpaths); -- udev_queue_export->queued_count = 0; -- udev_queue_export->waste_bytes = 0; -- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; -- -- return -1; --} -- --static int write_queue_record(struct udev_queue_export *udev_queue_export, -- unsigned long long int seqnum, const char *devpath, size_t devpath_len) --{ -- unsigned short len; -- -- if (udev_queue_export->queue_file == NULL) -- return -1; -- -- if (fwrite(&seqnum, sizeof(unsigned long long int), 1, udev_queue_export->queue_file) != 1) -- goto write_error; -- -- len = (devpath_len < USHRT_MAX) ? devpath_len : USHRT_MAX; -- if (fwrite(&len, sizeof(unsigned short), 1, udev_queue_export->queue_file) != 1) -- goto write_error; -- if (len > 0) { -- if (fwrite(devpath, 1, len, udev_queue_export->queue_file) != len) -- goto write_error; -- } -- -- /* *must* flush output; caller may fork */ -- if (fflush(udev_queue_export->queue_file) != 0) -- goto write_error; -- -- return 0; -- --write_error: -- /* if we failed half way through writing a record to a file, -- we should not try to write any further records to it. */ -- udev_err(udev_queue_export->udev, "error writing to queue file: %m\n"); -- fclose(udev_queue_export->queue_file); -- udev_queue_export->queue_file = NULL; -- -- return -1; --} -- --enum device_state { -- DEVICE_QUEUED, -- DEVICE_FINISHED, --}; -- --static inline size_t queue_record_size(size_t devpath_len) --{ -- return sizeof(unsigned long long int) + sizeof(unsigned short int) + devpath_len; --} -- --static int update_queue(struct udev_queue_export *udev_queue_export, -- struct udev_device *udev_device, enum device_state state) --{ -- unsigned long long int seqnum = udev_device_get_seqnum(udev_device); -- const char *devpath = NULL; -- size_t devpath_len = 0; -- int bytes; -- int err; -- -- /* FINISHED records have a zero length devpath */ -- if (state == DEVICE_QUEUED) { -- devpath = udev_device_get_devpath(udev_device); -- devpath_len = strlen(devpath); -- } -- -- /* recover from an earlier failed rebuild */ -- if (udev_queue_export->queue_file == NULL) { -- if (rebuild_queue_file(udev_queue_export) != 0) -- return -1; -- } -- -- /* if we're removing the last event from the queue, that's the best time to rebuild it */ -- if (state != DEVICE_QUEUED && udev_queue_export->queued_count == 1) { -- /* we don't need to read the old queue file */ -- fclose(udev_queue_export->queue_file); -- udev_queue_export->queue_file = NULL; -- rebuild_queue_file(udev_queue_export); -- return 0; -- } -- -- /* try to rebuild the queue files before they grow larger than one page. */ -- bytes = ftell(udev_queue_export->queue_file) + queue_record_size(devpath_len); -- if ((udev_queue_export->waste_bytes > bytes / 2) && bytes > 4096) -- rebuild_queue_file(udev_queue_export); -- -- /* don't record a finished event, if we already dropped the event in a failed rebuild */ -- if (seqnum < udev_queue_export->seqnum_max) -- return 0; -- -- /* now write to the queue */ -- if (state == DEVICE_QUEUED) { -- udev_queue_export->queued_count++; -- udev_queue_export->seqnum_min = seqnum; -- } else { -- udev_queue_export->waste_bytes += queue_record_size(devpath_len) + queue_record_size(0); -- udev_queue_export->queued_count--; -- } -- err = write_queue_record(udev_queue_export, seqnum, devpath, devpath_len); -- -- /* try to handle ENOSPC */ -- if (err != 0 && udev_queue_export->queued_count == 0) { -- udev_queue_export_cleanup(udev_queue_export); -- err = rebuild_queue_file(udev_queue_export); -- } -- -- return err; --} -- --static int update(struct udev_queue_export *udev_queue_export, -- struct udev_device *udev_device, enum device_state state) --{ -- if (update_queue(udev_queue_export, udev_device, state) != 0) -- return -1; -- -- return 0; --} -- --int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) --{ -- return update(udev_queue_export, udev_device, DEVICE_QUEUED); --} -- --int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) --{ -- return update(udev_queue_export, udev_device, DEVICE_FINISHED); --} -Index: systemd-210/src/libudev/libudev-queue.c -=================================================================== ---- systemd-210.orig/src/libudev/libudev-queue.c -+++ systemd-210/src/libudev/libudev-queue.c -@@ -24,8 +24,6 @@ - #include - #include - #include --#include --#include - #include - #include - -@@ -36,10 +34,7 @@ - * SECTION:libudev-queue - * @short_description: access to currently active events - * -- * The udev daemon processes events asynchronously. All events which do not have -- * interdependencies run in parallel. This exports the current state of the -- * event processing queue, and the current event sequence numbers from the kernel -- * and the udev daemon. -+ * This exports the current state of the udev processing queue. - */ - - /** -@@ -50,7 +45,6 @@ - struct udev_queue { - struct udev *udev; - int refcount; -- struct udev_list queue_list; - }; - - /** -@@ -72,9 +66,9 @@ _public_ struct udev_queue *udev_queue_n - udev_queue = new0(struct udev_queue, 1); - if (udev_queue == NULL) - return NULL; -+ - udev_queue->refcount = 1; - udev_queue->udev = udev; -- udev_list_init(udev, &udev_queue->queue_list, false); - return udev_queue; - } - -@@ -90,6 +84,7 @@ _public_ struct udev_queue *udev_queue_r - { - if (udev_queue == NULL) - return NULL; -+ - udev_queue->refcount++; - return udev_queue; - } -@@ -107,10 +102,11 @@ _public_ struct udev_queue *udev_queue_u - { - if (udev_queue == NULL) - return NULL; -+ - udev_queue->refcount--; - if (udev_queue->refcount > 0) - return NULL; -- udev_list_cleanup(&udev_queue->queue_list); -+ - free(udev_queue); - return NULL; - } -@@ -130,141 +126,30 @@ _public_ struct udev *udev_queue_get_ude - return udev_queue->udev; - } - --unsigned long long int udev_get_kernel_seqnum(struct udev *udev) --{ -- unsigned long long int seqnum; -- int fd; -- char buf[32]; -- ssize_t len; -- -- fd = open("/sys/kernel/uevent_seqnum", O_RDONLY|O_CLOEXEC); -- if (fd < 0) -- return 0; -- len = read(fd, buf, sizeof(buf)); -- close(fd); -- if (len <= 2) -- return 0; -- buf[len-1] = '\0'; -- seqnum = strtoull(buf, NULL, 10); -- return seqnum; --} -- - /** - * udev_queue_get_kernel_seqnum: - * @udev_queue: udev queue context - * -- * Get the current kernel event sequence number. -+ * This function is deprecated. - * -- * Returns: the sequence number. -+ * Returns: 0. - **/ - _public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) - { -- unsigned long long int seqnum; -- -- if (udev_queue == NULL) -- return -EINVAL; -- -- seqnum = udev_get_kernel_seqnum(udev_queue->udev); -- return seqnum; --} -- --int udev_queue_read_seqnum(FILE *queue_file, unsigned long long int *seqnum) --{ -- if (fread(seqnum, sizeof(unsigned long long int), 1, queue_file) != 1) -- return -1; -- - return 0; - } - --ssize_t udev_queue_skip_devpath(FILE *queue_file) --{ -- unsigned short int len; -- -- if (fread(&len, sizeof(unsigned short int), 1, queue_file) == 1) { -- char *devpath = alloca(len); -- -- /* use fread to skip, fseek might drop buffered data */ -- if (fread(devpath, 1, len, queue_file) == len) -- return len; -- } -- -- return -1; --} -- --ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t size) --{ -- unsigned short int read_bytes = 0; -- unsigned short int len; -- -- if (fread(&len, sizeof(unsigned short int), 1, queue_file) != 1) -- return -1; -- -- read_bytes = (len < size - 1) ? len : size - 1; -- if (fread(devpath, 1, read_bytes, queue_file) != read_bytes) -- return -1; -- devpath[read_bytes] = '\0'; -- -- /* if devpath was too long, skip unread characters */ -- if (read_bytes != len) { -- unsigned short int skip_bytes = len - read_bytes; -- char *buf = alloca(skip_bytes); -- -- if (fread(buf, 1, skip_bytes, queue_file) != skip_bytes) -- return -1; -- } -- -- return read_bytes; --} -- --static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long int *seqnum_start) --{ -- FILE *queue_file; -- -- queue_file = fopen("/run/udev/queue.bin", "re"); -- if (queue_file == NULL) -- return NULL; -- -- if (udev_queue_read_seqnum(queue_file, seqnum_start) < 0) { -- udev_err(udev_queue->udev, "corrupt queue file\n"); -- fclose(queue_file); -- return NULL; -- } -- -- return queue_file; --} -- - /** - * udev_queue_get_udev_seqnum: - * @udev_queue: udev queue context - * -- * Get the last known udev event sequence number. -+ * This function is deprecated. - * -- * Returns: the sequence number. -+ * Returns: 0. - **/ - _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) - { -- unsigned long long int seqnum_udev; -- FILE *queue_file; -- -- queue_file = open_queue_file(udev_queue, &seqnum_udev); -- if (queue_file == NULL) -- return 0; -- -- for (;;) { -- unsigned long long int seqnum; -- ssize_t devpath_len; -- -- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) -- break; -- devpath_len = udev_queue_skip_devpath(queue_file); -- if (devpath_len < 0) -- break; -- if (devpath_len > 0) -- seqnum_udev = seqnum; -- } -- -- fclose(queue_file); -- return seqnum_udev; -+ return 0; - } - - /** -@@ -277,15 +162,7 @@ _public_ unsigned long long int udev_que - **/ - _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) - { -- unsigned long long int seqnum_start; -- FILE *queue_file; -- -- queue_file = open_queue_file(udev_queue, &seqnum_start); -- if (queue_file == NULL) -- return 0; -- -- fclose(queue_file); -- return 1; -+ return access("/run/udev/control", F_OK) >= 0; - } - - /** -@@ -298,48 +175,7 @@ _public_ int udev_queue_get_udev_is_acti - **/ - _public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) - { -- unsigned long long int seqnum_kernel; -- unsigned long long int seqnum_udev = 0; -- int queued = 0; -- int is_empty = 0; -- FILE *queue_file; -- -- if (udev_queue == NULL) -- return -EINVAL; -- queue_file = open_queue_file(udev_queue, &seqnum_udev); -- if (queue_file == NULL) -- return 1; -- -- for (;;) { -- unsigned long long int seqnum; -- ssize_t devpath_len; -- -- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) -- break; -- devpath_len = udev_queue_skip_devpath(queue_file); -- if (devpath_len < 0) -- break; -- -- if (devpath_len > 0) { -- queued++; -- seqnum_udev = seqnum; -- } else { -- queued--; -- } -- } -- -- if (queued > 0) -- goto out; -- -- seqnum_kernel = udev_queue_get_kernel_seqnum(udev_queue); -- if (seqnum_udev < seqnum_kernel) -- goto out; -- -- is_empty = 1; -- --out: -- fclose(queue_file); -- return is_empty; -+ return access("/run/udev/queue", F_OK) >= 0; - } - - /** -@@ -348,63 +184,15 @@ out: - * @start: first event sequence number - * @end: last event sequence number - * -- * Check if udev is currently processing any events in a given sequence number range. -+ * This function is deprecated, it just returns the result of -+ * udev_queue_get_queue_is_empty(). - * -- * Returns: a flag indicating if any of the sequence numbers in the given range is currently active. -+ * Returns: a flag indicating if udev is currently handling events. - **/ - _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, - unsigned long long int start, unsigned long long int end) - { -- unsigned long long int seqnum; -- ssize_t devpath_len; -- int unfinished; -- FILE *queue_file; -- -- if (udev_queue == NULL) -- return -EINVAL; -- queue_file = open_queue_file(udev_queue, &seqnum); -- if (queue_file == NULL) -- return 1; -- if (start < seqnum) -- start = seqnum; -- if (start > end) { -- fclose(queue_file); -- return 1; -- } -- if (end - start > INT_MAX - 1) { -- fclose(queue_file); -- return -EOVERFLOW; -- } -- -- /* -- * we might start with 0, and handle the initial seqnum -- * only when we find an entry in the queue file -- **/ -- unfinished = end - start; -- -- do { -- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) -- break; -- devpath_len = udev_queue_skip_devpath(queue_file); -- if (devpath_len < 0) -- break; -- -- /* -- * we might start with an empty or re-build queue file, where -- * the initial seqnum is not recorded as finished -- */ -- if (start == seqnum && devpath_len > 0) -- unfinished++; -- -- if (devpath_len == 0) { -- if (seqnum >= start && seqnum <= end) -- unfinished--; -- } -- } while (unfinished > 0); -- -- fclose(queue_file); -- -- return (unfinished == 0); -+ return udev_queue_get_queue_is_empty(udev_queue); - } - - /** -@@ -412,69 +200,25 @@ _public_ int udev_queue_get_seqnum_seque - * @udev_queue: udev queue context - * @seqnum: sequence number - * -- * Check if udev is currently processing a given sequence number. -+ * This function is deprecated, it just returns the result of -+ * udev_queue_get_queue_is_empty(). - * -- * Returns: a flag indicating if the given sequence number is currently active. -+ * Returns: a flag indicating if udev is currently handling events. - **/ - _public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) - { -- if (!udev_queue_get_seqnum_sequence_is_finished(udev_queue, seqnum, seqnum)) -- return 0; -- -- return 1; -+ return udev_queue_get_queue_is_empty(udev_queue); - } - - /** - * udev_queue_get_queued_list_entry: - * @udev_queue: udev queue context - * -- * Get the first entry of the list of queued events. -+ * This function is deprecated. - * -- * Returns: a udev_list_entry. -+ * Returns: NULL. - **/ - _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) - { -- unsigned long long int seqnum; -- FILE *queue_file; -- -- if (udev_queue == NULL) -- return NULL; -- udev_list_cleanup(&udev_queue->queue_list); -- -- queue_file = open_queue_file(udev_queue, &seqnum); -- if (queue_file == NULL) -- return NULL; -- -- for (;;) { -- char syspath[UTIL_PATH_SIZE]; -- char *s; -- size_t l; -- ssize_t len; -- char seqnum_str[32]; -- struct udev_list_entry *list_entry; -- -- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) -- break; -- snprintf(seqnum_str, sizeof(seqnum_str), "%llu", seqnum); -- -- s = syspath; -- l = strpcpy(&s, sizeof(syspath), "/sys"); -- len = udev_queue_read_devpath(queue_file, s, l); -- if (len < 0) -- break; -- -- if (len > 0) { -- udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str); -- } else { -- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) { -- if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) { -- udev_list_entry_delete(list_entry); -- break; -- } -- } -- } -- } -- fclose(queue_file); -- -- return udev_list_get_entry(&udev_queue->queue_list); -+ return NULL; - } -Index: systemd-210/src/libudev/libudev.h -=================================================================== ---- systemd-210.orig/src/libudev/libudev.h -+++ systemd-210/src/libudev/libudev.h -@@ -170,14 +170,14 @@ struct udev_queue *udev_queue_ref(struct - struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue); - struct udev *udev_queue_get_udev(struct udev_queue *udev_queue); - struct udev_queue *udev_queue_new(struct udev *udev); --unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue); --unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue); -+unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); -+unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); - int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); - int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); --int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum); -+int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) __attribute__ ((deprecated)); - int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, -- unsigned long long int start, unsigned long long int end); --struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue); -+ unsigned long long int start, unsigned long long int end) __attribute__ ((deprecated)); -+struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) __attribute__ ((deprecated)); - - /* - * udev_hwdb -Index: systemd-210/src/shared/udev-util.h -=================================================================== ---- systemd-210.orig/src/shared/udev-util.h -+++ systemd-210/src/shared/udev-util.h -@@ -31,7 +31,6 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ - DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); - DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); - DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); --DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); - - #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) - #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) -@@ -40,5 +39,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ - #define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) - #define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) - #define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp) --#define _cleanup_udev_queue_unref_ _cleanup_(udev_queue_unrefp) - #define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup) -Index: systemd-210/src/test/test-libudev.c -=================================================================== ---- systemd-210.orig/src/test/test-libudev.c -+++ systemd-210/src/test/test-libudev.c -@@ -303,38 +303,14 @@ out: - - static int test_queue(struct udev *udev) { - struct udev_queue *udev_queue; -- unsigned long long int seqnum; -- struct udev_list_entry *list_entry; - - udev_queue = udev_queue_new(udev); - if (udev_queue == NULL) - return -1; -- seqnum = udev_queue_get_kernel_seqnum(udev_queue); -- printf("seqnum kernel: %llu\n", seqnum); -- seqnum = udev_queue_get_udev_seqnum(udev_queue); -- printf("seqnum udev : %llu\n", seqnum); - - if (udev_queue_get_queue_is_empty(udev_queue)) - printf("queue is empty\n"); -- printf("get queue list\n"); -- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) -- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); -- printf("\n"); -- printf("get queue list again\n"); -- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) -- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); -- printf("\n"); - -- list_entry = udev_queue_get_queued_list_entry(udev_queue); -- if (list_entry != NULL) { -- printf("event [%llu] is queued\n", seqnum); -- seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10); -- if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum)) -- printf("event [%llu] is not finished\n", seqnum); -- else -- printf("event [%llu] is finished\n", seqnum); -- } -- printf("\n"); - udev_queue_unref(udev_queue); - return 0; - } -Index: systemd-210/src/udev/udev-ctrl.c -=================================================================== ---- systemd-210.orig/src/udev/udev-ctrl.c -+++ systemd-210/src/udev/udev-ctrl.c -@@ -275,7 +275,7 @@ static int ctrl_send(struct udev_ctrl *u - - pfd[0].fd = uctrl->sock; - pfd[0].events = POLLIN; -- r = poll(pfd, 1, timeout * 1000); -+ r = poll(pfd, 1, timeout * MSEC_PER_SEC); - if (r < 0) { - if (errno == EINTR) - continue; -Index: systemd-210/src/udev/udevadm-settle.c -=================================================================== ---- systemd-210.orig/src/udev/udevadm-settle.c -+++ systemd-210/src/udev/udevadm-settle.c -@@ -41,42 +41,28 @@ - static void help(void) { - printf("Usage: udevadm settle OPTIONS\n" - " -t,--timeout= maximum time to wait for events\n" -- " -s,--seq-start= first seqnum to wait for\n" -- " -e,--seq-end= last seqnum to wait for\n" - " -E,--exit-if-exists= stop waiting if file exists\n" -- " -q,--quiet do not print list after timeout\n" - " -h,--help\n\n"); - } - - static int adm_settle(struct udev *udev, int argc, char *argv[]) - { - static const struct option options[] = { -- { "seq-start", required_argument, NULL, 's' }, -- { "seq-end", required_argument, NULL, 'e' }, -+ { "seq-start", required_argument, NULL, '\0' }, /* removed */ -+ { "seq-end", required_argument, NULL, '\0' }, /* removed */ - { "timeout", required_argument, NULL, 't' }, - { "exit-if-exists", required_argument, NULL, 'E' }, -- { "quiet", no_argument, NULL, 'q' }, -+ { "quiet", no_argument, NULL, 'q' }, /* removed */ - { "help", no_argument, NULL, 'h' }, - {} - }; -- usec_t start_usec = now(CLOCK_MONOTONIC); -- usec_t start = 0; -- usec_t end = 0; -- int quiet = 0; - const char *exists = NULL; - unsigned int timeout = 120; - struct pollfd pfd[1] = { {.fd = -1}, }; -- _cleanup_udev_queue_unref_ struct udev_queue *udev_queue = NULL; - int rc = EXIT_FAILURE, c; - -- while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) -+ while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) { - switch (c) { -- case 's': -- start = strtoull(optarg, NULL, 0); -- break; -- case 'e': -- end = strtoull(optarg, NULL, 0); -- break; - case 't': { - int r; - -@@ -91,9 +77,6 @@ static int adm_settle(struct udev *udev, - case 'E': - exists = optarg; - break; -- case 'q': -- quiet = 1; -- break; - case 'h': - help(); - exit(EXIT_SUCCESS); -@@ -102,44 +85,13 @@ static int adm_settle(struct udev *udev, - default: - assert_not_reached("Unknown argument"); - } -+ } - - if (optind < argc) { - fprintf(stderr, "Extraneous argument: '%s'\n", argv[optind]); - exit(EXIT_FAILURE); - } - -- udev_queue = udev_queue_new(udev); -- if (udev_queue == NULL) -- exit(2); -- -- if (start > 0) { -- unsigned long long kernel_seq; -- -- kernel_seq = udev_queue_get_kernel_seqnum(udev_queue); -- -- /* unless specified, the last event is the current kernel seqnum */ -- if (end == 0) -- end = udev_queue_get_kernel_seqnum(udev_queue); -- -- if (start > end) { -- log_error("seq-start larger than seq-end, ignoring"); -- start = 0; -- end = 0; -- } -- -- if (start > kernel_seq || end > kernel_seq) { -- log_error("seq-start or seq-end larger than current kernel value, ignoring"); -- start = 0; -- end = 0; -- } -- log_debug("start=%llu end=%llu current=%llu", (unsigned long long)start, (unsigned long long)end, kernel_seq); -- } else { -- if (end > 0) { -- log_error("seq-end needs seq-start parameter, ignoring"); -- end = 0; -- } -- } -- - /* guarantee that the udev daemon isn't pre-processing */ - if (getuid() == 0) { - struct udev_ctrl *uctrl; -@@ -160,73 +112,34 @@ static int adm_settle(struct udev *udev, - pfd[0].fd = inotify_init1(IN_CLOEXEC); - if (pfd[0].fd < 0) { - log_error("inotify_init failed: %m"); -- } else { -- if (inotify_add_watch(pfd[0].fd, "/run/udev" , IN_MOVED_TO) < 0) { -- log_error("watching /run/udev failed"); -- close(pfd[0].fd); -- pfd[0].fd = -1; -- } -+ goto out; - } - -- for (;;) { -- struct stat statbuf; -+ if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { -+ log_debug("watching /run/udev failed"); -+ goto out; -+ } - -- if (exists != NULL && stat(exists, &statbuf) == 0) { -+ for (;;) { -+ if (exists && access(exists, F_OK) >= 0) { - rc = EXIT_SUCCESS; - break; - } - -- if (start > 0) { -- /* if asked for, wait for a specific sequence of events */ -- if (udev_queue_get_seqnum_sequence_is_finished(udev_queue, start, end) == 1) { -- rc = EXIT_SUCCESS; -- break; -- } -- } else { -- /* exit if queue is empty */ -- if (udev_queue_get_queue_is_empty(udev_queue)) { -- rc = EXIT_SUCCESS; -- break; -- } -- } -- -- if (pfd[0].fd >= 0) { -- int delay; -- -- if (exists != NULL || start > 0) -- delay = 100; -- else -- delay = 1000; -- /* wake up after delay, or immediately after the queue is rebuilt */ -- if (poll(pfd, 1, delay) > 0 && pfd[0].revents & POLLIN) { -- char buf[sizeof(struct inotify_event) + PATH_MAX]; -- -- read(pfd[0].fd, buf, sizeof(buf)); -- } -- } else { -- sleep(1); -+ /* exit if queue is empty */ -+ if (access("/run/udev/queue", F_OK) < 0) { -+ rc = EXIT_SUCCESS; -+ break; - } - -- if (timeout > 0) { -- usec_t age_usec; -+ /* wake up when "queue" file is deleted */ -+ if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN) { -+ char buf[sizeof(struct inotify_event) + PATH_MAX]; - -- age_usec = now(CLOCK_MONOTONIC) - start_usec; -- if (age_usec / (1000 * 1000) >= timeout) { -- struct udev_list_entry *list_entry; -- -- if (!quiet && udev_queue_get_queued_list_entry(udev_queue) != NULL) { -- log_debug("timeout waiting for udev queue"); -- printf("\nudevadm settle - timeout of %i seconds reached, the event queue contains:\n", timeout); -- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) -- printf(" %s (%s)\n", -- udev_list_entry_get_name(list_entry), -- udev_list_entry_get_value(list_entry)); -- } -- -- break; -- } -+ read(pfd[0].fd, buf, sizeof(buf)); - } - } -+ - out: - if (pfd[0].fd >= 0) - close(pfd[0].fd); -@@ -236,5 +149,5 @@ out: - const struct udevadm_cmd udevadm_settle = { - .name = "settle", - .cmd = adm_settle, -- .help = "wait for the event queue to finish", -+ .help = "wait for pending udev events", - }; -Index: systemd-210/src/udev/udevd.c -=================================================================== ---- systemd-210.orig/src/udev/udevd.c -+++ systemd-210/src/udev/udevd.c -@@ -61,7 +61,6 @@ void udev_main_log(struct udev *udev, in - } - - static struct udev_rules *rules; --static struct udev_queue_export *udev_queue_export; - static struct udev_ctrl *udev_ctrl; - static struct udev_monitor *monitor; - static int worker_watch[2] = { -1, -1 }; -@@ -140,14 +139,9 @@ static inline struct worker *node_to_wor - return container_of(node, struct worker, node); - } - --static void event_queue_delete(struct event *event, bool export) -+static void event_queue_delete(struct event *event) - { - udev_list_node_remove(&event->node); -- -- if (export) { -- udev_queue_export_device_finished(udev_queue_export, event->dev); -- log_debug("seq %llu done with %i", udev_device_get_seqnum(event->dev), event->exitcode); -- } - udev_device_unref(event->dev); - free(event); - } -@@ -226,7 +220,6 @@ static void worker_new(struct event *eve - free(worker); - worker_list_cleanup(udev); - event_queue_cleanup(udev, EVENT_UNDEF); -- udev_queue_export_unref(udev_queue_export); - udev_monitor_unref(monitor); - udev_ctrl_unref(udev_ctrl); - close(fd_signal); -@@ -477,7 +470,6 @@ static int event_queue_insert(struct ude - event->nodelay = true; - #endif - -- udev_queue_export_device_queued(udev_queue_export, dev); - log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), - udev_device_get_action(dev), udev_device_get_subsystem(dev)); - -@@ -608,7 +600,7 @@ static void event_queue_cleanup(struct u - if (match_type != EVENT_UNDEF && match_type != event->state) - continue; - -- event_queue_delete(event, false); -+ event_queue_delete(event); - } - } - -@@ -633,7 +625,7 @@ static void worker_returned(int fd_worke - /* worker returned */ - if (worker->event) { - worker->event->exitcode = msg.exitcode; -- event_queue_delete(worker->event, true); -+ event_queue_delete(worker->event); - worker->event = NULL; - } - if (worker->state != WORKER_KILLED) -@@ -825,7 +817,8 @@ static void handle_signal(struct udev *u - log_error("worker [%u] failed while handling '%s'", - pid, worker->event->devpath); - worker->event->exitcode = -32; -- event_queue_delete(worker->event, true); -+ event_queue_delete(worker->event); -+ - /* drop reference taken for state 'running' */ - worker_unref(worker); - } -@@ -1104,14 +1097,7 @@ int main(int argc, char *argv[]) - goto exit; - } - -- udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024); -- -- /* create queue file before signalling 'ready', to make sure we block 'settle' */ -- udev_queue_export = udev_queue_export_new(udev); -- if (udev_queue_export == NULL) { -- log_error("error creating queue file"); -- goto exit; -- } -+ udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024); - - if (daemonize) { - pid_t pid; -@@ -1269,12 +1255,12 @@ int main(int argc, char *argv[]) - worker_kill(udev); - - /* exit after all has cleaned up */ -- if (udev_list_node_is_empty(&event_list) && udev_list_node_is_empty(&worker_list)) -+ if (udev_list_node_is_empty(&event_list) && children == 0) - break; - - /* timeout at exit for workers to finish */ -- timeout = 30 * 1000; -- } else if (udev_list_node_is_empty(&event_list) && !children) { -+ timeout = 30 * MSEC_PER_SEC; -+ } else if (udev_list_node_is_empty(&event_list) && children == 0) { - /* we are idle */ - timeout = -1; - -@@ -1283,8 +1269,20 @@ int main(int argc, char *argv[]) - cg_kill(SYSTEMD_CGROUP_CONTROLLER, udev_cgroup, SIGKILL, false, true, NULL); - } else { - /* kill idle or hanging workers */ -- timeout = 3 * 1000; -+ timeout = 3 * MSEC_PER_SEC; - } -+ -+ /* tell settle that we are busy or idle */ -+ if (!udev_list_node_is_empty(&event_list)) { -+ int fd; -+ -+ fd = open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); -+ if (fd >= 0) -+ close(fd); -+ } else { -+ unlink("/run/udev/queue"); -+ } -+ - fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), timeout); - if (fdcount < 0) - continue; -@@ -1311,18 +1309,18 @@ int main(int argc, char *argv[]) - if (worker->state != WORKER_RUNNING) - continue; - -- if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * 1000 * 1000) { -+ if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) { - log_error("worker [%u] %s timeout; kill it", worker->pid, - worker->event ? worker->event->devpath : ""); - kill(worker->pid, SIGKILL); - worker->state = WORKER_KILLED; -+ - /* drop reference taken for state 'running' */ - worker_unref(worker); - if (worker->event) { -- log_error("seq %llu '%s' killed", -- udev_device_get_seqnum(worker->event->dev), worker->event->devpath); -+ log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath); - worker->event->exitcode = -64; -- event_queue_delete(worker->event, true); -+ event_queue_delete(worker->event); - worker->event = NULL; - } - } -@@ -1345,7 +1343,7 @@ int main(int argc, char *argv[]) - } - - /* check for changed config, every 3 seconds at most */ -- if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * 1000 * 1000) { -+ if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * USEC_PER_SEC) { - if (udev_rules_check_timestamp(rules)) - reload = true; - if (udev_builtin_validate(udev)) -@@ -1420,8 +1418,8 @@ int main(int argc, char *argv[]) - - rc = EXIT_SUCCESS; - exit: -- udev_queue_export_cleanup(udev_queue_export); - udev_ctrl_cleanup(udev_ctrl); -+ unlink("/run/udev/queue"); - exit_daemonize: - if (fd_ep >= 0) - close(fd_ep); -@@ -1436,7 +1434,6 @@ exit_daemonize: - if (worker_watch[WRITE_END] >= 0) - close(worker_watch[WRITE_END]); - udev_monitor_unref(monitor); -- udev_queue_export_unref(udev_queue_export); - udev_ctrl_connection_unref(ctrl_conn); - udev_ctrl_unref(udev_ctrl); - label_finish(); From 76216677f83baa7a53765b295e0f8ab4177944352cb08fe9b8d47f340f070f52 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 17 Jun 2014 15:09:13 +0000 Subject: [PATCH 28/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=677 --- 0001-core-fix-invalid-free-in-killall.patch | 32 +++++++++++++++++++ ...x-invalid-free-in-enable_name_policy.patch | 30 +++++++++++++++++ ...l-fix-invalid-free-in-unit_file_mask.patch | 30 +++++++++++++++++ systemd-mini.changes | 8 +++++ systemd-mini.spec | 9 ++++++ systemd.changes | 8 +++++ systemd.spec | 9 ++++++ 7 files changed, 126 insertions(+) create mode 100644 0001-core-fix-invalid-free-in-killall.patch create mode 100644 0002-udev-fix-invalid-free-in-enable_name_policy.patch create mode 100644 0003-install-fix-invalid-free-in-unit_file_mask.patch diff --git a/0001-core-fix-invalid-free-in-killall.patch b/0001-core-fix-invalid-free-in-killall.patch new file mode 100644 index 00000000..23d527e8 --- /dev/null +++ b/0001-core-fix-invalid-free-in-killall.patch @@ -0,0 +1,32 @@ +From 3e09eb5c83e56bc0184bd9d9c44f76047464f77c Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:19 +0200 +Subject: [PATCH] core: fix invalid free() in killall() + +static int killall(....) in ./src/core/killall.c tries to get "s" +initialized by calling get_process_comm(...) which calls +read_one_line_file(...) which if it fails will mean it is left +uninitialized. +It is then used in argument to strna(s) call where it is +dereferenced(!), in addition to nothing else initializing it before +the scope it is in finishes. +--- + src/core/killall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/killall.c src/core/killall.c +index 57ed41c..eab48f7 100644 +--- src/core/killall.c ++++ src/core/killall.c +@@ -168,7 +168,7 @@ static int killall(int sig, Set *pids, bool send_sighup) { + continue; + + if (sig == SIGKILL) { +- _cleanup_free_ char *s; ++ _cleanup_free_ char *s = NULL; + + get_process_comm(pid, &s); + log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s)); +-- +1.7.9.2 + diff --git a/0002-udev-fix-invalid-free-in-enable_name_policy.patch b/0002-udev-fix-invalid-free-in-enable_name_policy.patch new file mode 100644 index 00000000..4afdb7ce --- /dev/null +++ b/0002-udev-fix-invalid-free-in-enable_name_policy.patch @@ -0,0 +1,30 @@ +From f8a0bb5285024b6ce372c3157e761e6543ebdcd2 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:21 +0200 +Subject: [PATCH] udev: fix invalid free() in enable_name_policy() + +static bool enable_name_policy(...) in ./src/udev/net/link-config.c +calls proc_cmdline(...) to get "line" initialized, but +proc_cmdline(...) does not guarantee that atleast when both +conditions (detect_container(NULL) > 0) and +read_full_file(...) returned < 0. +--- + src/udev/net/link-config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/udev/net/link-config.c src/udev/net/link-config.c +index a9acc3d..7a9d01b 100644 +--- src/udev/net/link-config.c ++++ src/udev/net/link-config.c +@@ -185,7 +185,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) { + } + + static bool enable_name_policy(void) { +- _cleanup_free_ char *line; ++ _cleanup_free_ char *line = NULL; + char *w, *state; + int r; + size_t l; +-- +1.7.9.2 + diff --git a/0003-install-fix-invalid-free-in-unit_file_mask.patch b/0003-install-fix-invalid-free-in-unit_file_mask.patch new file mode 100644 index 00000000..0fe0581b --- /dev/null +++ b/0003-install-fix-invalid-free-in-unit_file_mask.patch @@ -0,0 +1,30 @@ +From 223217749e57996336d5730b0a28716cca56d45d Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:18 +0200 +Subject: [PATCH] install: fix invalid free() in unit_file_mask() + +int unit_file_mask(...) in ./src/shared/install.c calls +get_config_path(...) which can in 4 error cases return without setting +"ret", and thus "prefix" can be uninitialized when unit_file_mask(...) +finishes (which it does directly after the error is returned from +get_config_path(...)). +--- + src/shared/install.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/shared/install.c src/shared/install.c +index 487d0f6..f562063 100644 +--- src/shared/install.c ++++ src/shared/install.c +@@ -563,7 +563,7 @@ int unit_file_mask( + unsigned *n_changes) { + + char **i; +- _cleanup_free_ char *prefix; ++ _cleanup_free_ char *prefix = NULL; + int r; + + assert(scope >= 0); +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index e31567ba..3f886386 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-core-fix-invalid-free-in-killall.patch + 0002-udev-fix-invalid-free-in-enable_name_policy.patch + 0003-install-fix-invalid-free-in-unit_file_mask.patch + ------------------------------------------------------------------- Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 806b9150..2392c88a 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -558,6 +558,12 @@ Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch # PATCH-FIX-UPSTREAM added at 2014/06/11 Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch278: 0001-core-fix-invalid-free-in-killall.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch # UDEV PATCHES # ============ @@ -1073,6 +1079,9 @@ cp %{SOURCE7} m4/ %patch275 -p0 %patch276 -p0 %patch277 -p0 +%patch278 -p0 +%patch279 -p0 +%patch280 -p0 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index e31567ba..3f886386 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-core-fix-invalid-free-in-killall.patch + 0002-udev-fix-invalid-free-in-enable_name_policy.patch + 0003-install-fix-invalid-free-in-unit_file_mask.patch + ------------------------------------------------------------------- Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 43d29325..24114d0d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -553,6 +553,12 @@ Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch # PATCH-FIX-UPSTREAM added at 2014/06/11 Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch278: 0001-core-fix-invalid-free-in-killall.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch # UDEV PATCHES # ============ @@ -1068,6 +1074,9 @@ cp %{SOURCE7} m4/ %patch275 -p0 %patch276 -p0 %patch277 -p0 +%patch278 -p0 +%patch279 -p0 +%patch280 -p0 # udev patches %patch1001 -p1 From bd651eeb8d64477ef95152ce10fbef7bbdcda7804fd32632cd9cac6ec57dcee6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 Jun 2014 13:10:45 +0000 Subject: [PATCH 29/43] Readd patch 1022 and add 1037-udev-exclude-cd-dvd-from-block-device.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=678 --- ...um-API-and-all-assumptions-about-seq.patch | 1445 +++++++++++++++++ ...dev-exclude-cd-dvd-from-block-device.patch | 14 + systemd-mini.changes | 8 + systemd-mini.spec | 9 +- systemd.changes | 8 + systemd.spec | 9 +- 6 files changed, 1485 insertions(+), 8 deletions(-) create mode 100644 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch create mode 100644 1037-udev-exclude-cd-dvd-from-block-device.patch diff --git a/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch new file mode 100644 index 00000000..39e385c0 --- /dev/null +++ b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch @@ -0,0 +1,1445 @@ +From 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 12 Apr 2014 22:35:50 -0700 +Subject: [PATCH] udev: remove seqnum API and all assumptions about seqnums + +The way the kernel namespaces have been implemented breaks assumptions +udev made regarding uevent sequence numbers. Creating devices in a +namespace "steals" uevents and its sequence numbers from the host. It +confuses the "udevadmin settle" logic, which might block until util a +timeout is reached, even when no uevent is pending. + +Remove any assumptions about sequence numbers and deprecate libudev's +API exposing these numbers; none of that can reliably be used anymore +when namespaces are involved. +--- + Makefile.am | 6 +- + man/udevadm.xml | 22 -- + src/libudev/libudev-monitor.c | 17 +- + src/libudev/libudev-queue-private.c | 406 ----------------------------------- + src/libudev/libudev-queue.c | 302 ++------------------------ + src/libudev/libudev.h | 10 +- + src/shared/udev-util.h | 2 - + src/test/test-libudev.c | 24 --- + src/udev/udev-ctrl.c | 2 +- + src/udev/udevadm-settle.c | 131 ++--------- + src/udev/udevd.c | 59 +++-- + 11 files changed, 84 insertions(+), 897 deletions(-) + delete mode 100644 src/libudev/libudev-queue-private.c + +diff --git Makefile.am Makefile.am +index 5d84605..0ad1729 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2587,8 +2587,7 @@ noinst_LTLIBRARIES += \ + + libudev_internal_la_SOURCES =\ + $(libudev_la_SOURCES) \ +- src/libudev/libudev-device-private.c \ +- src/libudev/libudev-queue-private.c ++ src/libudev/libudev-device-private.c + + libudev_internal_la_CFLAGS = \ + $(AM_CFLAGS) \ +@@ -5169,6 +5168,9 @@ test_libsystemd_sym_LDADD = \ + + test_libudev_sym_SOURCES = \ + test-libudev-sym.c ++test_libudev_sym_CFLAGS = \ ++ $(AM_CFLAGS) \ ++ -Wno-deprecated-declarations + test_libudev_sym_LDADD = \ + libudev.la + +diff --git man/udevadm.xml man/udevadm.xml +index 21d1443..fbfa85a 100644 +--- a/man/udevadm.xml ++++ b/man/udevadm.xml +@@ -339,21 +339,6 @@ + + + +- +- +- +- Wait only for events after the given sequence +- number. +- +- +- +- +- +- +- Wait only for events before the given sequence number. +- +- +- + + + +@@ -361,13 +346,6 @@ + + + +- +- +- +- Do not print any output, like the remaining queue entries when reaching the timeout. +- +- +- + + + +diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c +index ba1b04d..3f7436b 100644 +--- a/src/libudev/libudev-monitor.c ++++ b/src/libudev/libudev-monitor.c +@@ -146,21 +146,6 @@ static bool udev_has_devtmpfs(struct udev *udev) { + return false; + } + +-/* we consider udev running when we have running udev service */ +-static bool udev_has_service(struct udev *udev) { +- struct udev_queue *queue; +- bool active; +- +- queue = udev_queue_new(udev); +- if (!queue) +- return false; +- +- active = udev_queue_get_udev_is_active(queue); +- udev_queue_unref(queue); +- +- return active; +-} +- + struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd) + { + struct udev_monitor *udev_monitor; +@@ -184,7 +169,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c + * We do not set a netlink multicast group here, so the socket + * will not receive any messages. + */ +- if (!udev_has_service(udev) && !udev_has_devtmpfs(udev)) { ++ if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) { + udev_dbg(udev, "the udev service seems not to be active, disable the monitor\n"); + group = UDEV_MONITOR_NONE; + } else +diff --git src/libudev/libudev-queue-private.c src/libudev/libudev-queue-private.c +deleted file mode 100644 +index d5a2b50..0000000 +--- a/src/libudev/libudev-queue-private.c ++++ /dev/null +@@ -1,406 +0,0 @@ +-/*** +- This file is part of systemd. +- +- Copyright 2008-2012 Kay Sievers +- Copyright 2009 Alan Jenkins +- +- systemd is free software; you can redistribute it and/or modify it +- under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2.1 of the License, or +- (at your option) any later version. +- +- systemd 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 +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public License +- along with systemd; If not, see . +-***/ +- +-/* +- * DISCLAIMER - The file format mentioned here is private to udev/libudev, +- * and may be changed without notice. +- * +- * The udev event queue is exported as a binary log file. +- * Each log record consists of a sequence number followed by the device path. +- * +- * When a new event is queued, its details are appended to the log. +- * When the event finishes, a second record is appended to the log +- * with the same sequence number but a devpath len of 0. +- * +- * Example: +- * { 0x0000000000000001 } +- * { 0x0000000000000001, 0x0019, "/devices/virtual/mem/null" }, +- * { 0x0000000000000002, 0x001b, "/devices/virtual/mem/random" }, +- * { 0x0000000000000001, 0x0000 }, +- * { 0x0000000000000003, 0x0019, "/devices/virtual/mem/zero" }, +- * +- * Events 2 and 3 are still queued, but event 1 has finished. +- * +- * The queue does not grow indefinitely. It is periodically re-created +- * to remove finished events. Atomic rename() makes this transparent to readers. +- * +- * The queue file starts with a single sequence number which specifies the +- * minimum sequence number in the log that follows. Any events prior to this +- * sequence number have already finished. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "libudev.h" +-#include "libudev-private.h" +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export); +- +-struct udev_queue_export { +- struct udev *udev; +- int queued_count; /* number of unfinished events exported in queue file */ +- FILE *queue_file; +- unsigned long long int seqnum_max; /* earliest sequence number in queue file */ +- unsigned long long int seqnum_min; /* latest sequence number in queue file */ +- int waste_bytes; /* queue file bytes wasted on finished events */ +-}; +- +-struct udev_queue_export *udev_queue_export_new(struct udev *udev) +-{ +- struct udev_queue_export *udev_queue_export; +- unsigned long long int initial_seqnum; +- +- if (udev == NULL) +- return NULL; +- +- udev_queue_export = new0(struct udev_queue_export, 1); +- if (udev_queue_export == NULL) +- return NULL; +- udev_queue_export->udev = udev; +- +- initial_seqnum = udev_get_kernel_seqnum(udev); +- udev_queue_export->seqnum_min = initial_seqnum; +- udev_queue_export->seqnum_max = initial_seqnum; +- +- udev_queue_export_cleanup(udev_queue_export); +- if (rebuild_queue_file(udev_queue_export) != 0) { +- free(udev_queue_export); +- return NULL; +- } +- +- return udev_queue_export; +-} +- +-struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return NULL; +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- free(udev_queue_export); +- return NULL; +-} +- +-void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return; +- unlink("/run/udev/queue.tmp"); +- unlink("/run/udev/queue.bin"); +-} +- +-static int skip_to(FILE *file, long offset) +-{ +- long old_offset; +- +- /* fseek may drop buffered data, avoid it for small seeks */ +- old_offset = ftell(file); +- if (offset > old_offset && offset - old_offset <= BUFSIZ) { +- size_t skip_bytes = offset - old_offset; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, skip_bytes, 1, file) != skip_bytes) +- return -1; +- } +- +- return fseek(file, offset, SEEK_SET); +-} +- +-struct queue_devpaths { +- unsigned int devpaths_first; /* index of first queued event */ +- unsigned int devpaths_size; +- long devpaths[]; /* seqnum -> offset of devpath in queue file (or 0) */ +-}; +- +-/* +- * Returns a table mapping seqnum to devpath file offset for currently queued events. +- * devpaths[i] represents the event with seqnum = i + udev_queue_export->seqnum_min. +- */ +-static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_export) +-{ +- struct queue_devpaths *devpaths; +- unsigned long long int range; +- long devpath_offset; +- ssize_t devpath_len; +- unsigned long long int seqnum; +- unsigned long long int n; +- unsigned int i; +- +- /* seek to the first event in the file */ +- rewind(udev_queue_export->queue_file); +- udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum); +- +- /* allocate the table */ +- range = udev_queue_export->seqnum_min - udev_queue_export->seqnum_max; +- if (range - 1 > INT_MAX) { +- udev_err(udev_queue_export->udev, "queue file overflow\n"); +- return NULL; +- } +- devpaths = malloc0(sizeof(struct queue_devpaths) + (range + 1) * sizeof(long)); +- if (devpaths == NULL) +- return NULL; +- devpaths->devpaths_size = range + 1; +- +- /* read all records and populate the table */ +- for (;;) { +- if (udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum) < 0) +- break; +- n = seqnum - udev_queue_export->seqnum_max; +- if (n >= devpaths->devpaths_size) +- goto read_error; +- +- devpath_offset = ftell(udev_queue_export->queue_file); +- devpath_len = udev_queue_skip_devpath(udev_queue_export->queue_file); +- if (devpath_len < 0) +- goto read_error; +- +- if (devpath_len > 0) +- devpaths->devpaths[n] = devpath_offset; +- else +- devpaths->devpaths[n] = 0; +- } +- +- /* find first queued event */ +- for (i = 0; i < devpaths->devpaths_size; i++) { +- if (devpaths->devpaths[i] != 0) +- break; +- } +- devpaths->devpaths_first = i; +- +- return devpaths; +- +-read_error: +- udev_err(udev_queue_export->udev, "queue file corrupted\n"); +- free(devpaths); +- return NULL; +-} +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) +-{ +- unsigned long long int seqnum; +- struct queue_devpaths *devpaths = NULL; +- FILE *new_queue_file = NULL; +- unsigned int i; +- +- /* read old queue file */ +- if (udev_queue_export->queue_file != NULL) { +- devpaths = build_index(udev_queue_export); +- if (devpaths != NULL) +- udev_queue_export->seqnum_max += devpaths->devpaths_first; +- } +- if (devpaths == NULL) { +- udev_queue_export->queued_count = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- } +- +- /* create new queue file */ +- new_queue_file = fopen("/run/udev/queue.tmp", "w+e"); +- if (new_queue_file == NULL) +- goto error; +- seqnum = udev_queue_export->seqnum_max; +- fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file); +- +- /* copy unfinished events only to the new file */ +- if (devpaths != NULL) { +- for (i = devpaths->devpaths_first; i < devpaths->devpaths_size; i++) { +- char devpath[UTIL_PATH_SIZE]; +- int err; +- unsigned short devpath_len; +- +- if (devpaths->devpaths[i] != 0) +- { +- skip_to(udev_queue_export->queue_file, devpaths->devpaths[i]); +- err = udev_queue_read_devpath(udev_queue_export->queue_file, devpath, sizeof(devpath)); +- devpath_len = err; +- +- fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file); +- fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file); +- fwrite(devpath, 1, devpath_len, new_queue_file); +- } +- seqnum++; +- } +- free(devpaths); +- devpaths = NULL; +- } +- fflush(new_queue_file); +- if (ferror(new_queue_file)) +- goto error; +- +- /* rename the new file on top of the old one */ +- if (rename("/run/udev/queue.tmp", "/run/udev/queue.bin") != 0) +- goto error; +- +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = new_queue_file; +- udev_queue_export->waste_bytes = 0; +- +- return 0; +- +-error: +- udev_err(udev_queue_export->udev, "failed to create queue file: %m\n"); +- udev_queue_export_cleanup(udev_queue_export); +- +- if (udev_queue_export->queue_file != NULL) { +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- } +- if (new_queue_file != NULL) +- fclose(new_queue_file); +- +- if (devpaths != NULL) +- free(devpaths); +- udev_queue_export->queued_count = 0; +- udev_queue_export->waste_bytes = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- +- return -1; +-} +- +-static int write_queue_record(struct udev_queue_export *udev_queue_export, +- unsigned long long int seqnum, const char *devpath, size_t devpath_len) +-{ +- unsigned short len; +- +- if (udev_queue_export->queue_file == NULL) +- return -1; +- +- if (fwrite(&seqnum, sizeof(unsigned long long int), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- +- len = (devpath_len < USHRT_MAX) ? devpath_len : USHRT_MAX; +- if (fwrite(&len, sizeof(unsigned short), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- if (len > 0) { +- if (fwrite(devpath, 1, len, udev_queue_export->queue_file) != len) +- goto write_error; +- } +- +- /* *must* flush output; caller may fork */ +- if (fflush(udev_queue_export->queue_file) != 0) +- goto write_error; +- +- return 0; +- +-write_error: +- /* if we failed half way through writing a record to a file, +- we should not try to write any further records to it. */ +- udev_err(udev_queue_export->udev, "error writing to queue file: %m\n"); +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- +- return -1; +-} +- +-enum device_state { +- DEVICE_QUEUED, +- DEVICE_FINISHED, +-}; +- +-static inline size_t queue_record_size(size_t devpath_len) +-{ +- return sizeof(unsigned long long int) + sizeof(unsigned short int) + devpath_len; +-} +- +-static int update_queue(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- unsigned long long int seqnum = udev_device_get_seqnum(udev_device); +- const char *devpath = NULL; +- size_t devpath_len = 0; +- int bytes; +- int err; +- +- /* FINISHED records have a zero length devpath */ +- if (state == DEVICE_QUEUED) { +- devpath = udev_device_get_devpath(udev_device); +- devpath_len = strlen(devpath); +- } +- +- /* recover from an earlier failed rebuild */ +- if (udev_queue_export->queue_file == NULL) { +- if (rebuild_queue_file(udev_queue_export) != 0) +- return -1; +- } +- +- /* if we're removing the last event from the queue, that's the best time to rebuild it */ +- if (state != DEVICE_QUEUED && udev_queue_export->queued_count == 1) { +- /* we don't need to read the old queue file */ +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- rebuild_queue_file(udev_queue_export); +- return 0; +- } +- +- /* try to rebuild the queue files before they grow larger than one page. */ +- bytes = ftell(udev_queue_export->queue_file) + queue_record_size(devpath_len); +- if ((udev_queue_export->waste_bytes > bytes / 2) && bytes > 4096) +- rebuild_queue_file(udev_queue_export); +- +- /* don't record a finished event, if we already dropped the event in a failed rebuild */ +- if (seqnum < udev_queue_export->seqnum_max) +- return 0; +- +- /* now write to the queue */ +- if (state == DEVICE_QUEUED) { +- udev_queue_export->queued_count++; +- udev_queue_export->seqnum_min = seqnum; +- } else { +- udev_queue_export->waste_bytes += queue_record_size(devpath_len) + queue_record_size(0); +- udev_queue_export->queued_count--; +- } +- err = write_queue_record(udev_queue_export, seqnum, devpath, devpath_len); +- +- /* try to handle ENOSPC */ +- if (err != 0 && udev_queue_export->queued_count == 0) { +- udev_queue_export_cleanup(udev_queue_export); +- err = rebuild_queue_file(udev_queue_export); +- } +- +- return err; +-} +- +-static int update(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- if (update_queue(udev_queue_export, udev_device, state) != 0) +- return -1; +- +- return 0; +-} +- +-int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_QUEUED); +-} +- +-int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_FINISHED); +-} +diff --git src/libudev/libudev-queue.c src/libudev/libudev-queue.c +index 2cb4d67..eb0e096 100644 +--- a/src/libudev/libudev-queue.c ++++ b/src/libudev/libudev-queue.c +@@ -24,8 +24,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + +@@ -36,10 +34,7 @@ + * SECTION:libudev-queue + * @short_description: access to currently active events + * +- * The udev daemon processes events asynchronously. All events which do not have +- * interdependencies run in parallel. This exports the current state of the +- * event processing queue, and the current event sequence numbers from the kernel +- * and the udev daemon. ++ * This exports the current state of the udev processing queue. + */ + + /** +@@ -50,7 +45,6 @@ + struct udev_queue { + struct udev *udev; + int refcount; +- struct udev_list queue_list; + }; + + /** +@@ -72,9 +66,9 @@ _public_ struct udev_queue *udev_queue_new(struct udev *udev) + udev_queue = new0(struct udev_queue, 1); + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount = 1; + udev_queue->udev = udev; +- udev_list_init(udev, &udev_queue->queue_list, false); + return udev_queue; + } + +@@ -90,6 +84,7 @@ _public_ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue) + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount++; + return udev_queue; + } +@@ -107,10 +102,11 @@ _public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue) + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount--; + if (udev_queue->refcount > 0) + return NULL; +- udev_list_cleanup(&udev_queue->queue_list); ++ + free(udev_queue); + return NULL; + } +@@ -130,141 +126,30 @@ _public_ struct udev *udev_queue_get_udev(struct udev_queue *udev_queue) + return udev_queue->udev; + } + +-unsigned long long int udev_get_kernel_seqnum(struct udev *udev) +-{ +- unsigned long long int seqnum; +- int fd; +- char buf[32]; +- ssize_t len; +- +- fd = open("/sys/kernel/uevent_seqnum", O_RDONLY|O_CLOEXEC); +- if (fd < 0) +- return 0; +- len = read(fd, buf, sizeof(buf)); +- close(fd); +- if (len <= 2) +- return 0; +- buf[len-1] = '\0'; +- seqnum = strtoull(buf, NULL, 10); +- return seqnum; +-} +- + /** + * udev_queue_get_kernel_seqnum: + * @udev_queue: udev queue context + * +- * Get the current kernel event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- +- if (udev_queue == NULL) +- return -EINVAL; +- +- seqnum = udev_get_kernel_seqnum(udev_queue->udev); +- return seqnum; +-} +- +-int udev_queue_read_seqnum(FILE *queue_file, unsigned long long int *seqnum) +-{ +- if (fread(seqnum, sizeof(unsigned long long int), 1, queue_file) != 1) +- return -1; +- + return 0; + } + +-ssize_t udev_queue_skip_devpath(FILE *queue_file) +-{ +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) == 1) { +- char *devpath = alloca(len); +- +- /* use fread to skip, fseek might drop buffered data */ +- if (fread(devpath, 1, len, queue_file) == len) +- return len; +- } +- +- return -1; +-} +- +-ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t size) +-{ +- unsigned short int read_bytes = 0; +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) != 1) +- return -1; +- +- read_bytes = (len < size - 1) ? len : size - 1; +- if (fread(devpath, 1, read_bytes, queue_file) != read_bytes) +- return -1; +- devpath[read_bytes] = '\0'; +- +- /* if devpath was too long, skip unread characters */ +- if (read_bytes != len) { +- unsigned short int skip_bytes = len - read_bytes; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, 1, skip_bytes, queue_file) != skip_bytes) +- return -1; +- } +- +- return read_bytes; +-} +- +-static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long int *seqnum_start) +-{ +- FILE *queue_file; +- +- queue_file = fopen("/run/udev/queue.bin", "re"); +- if (queue_file == NULL) +- return NULL; +- +- if (udev_queue_read_seqnum(queue_file, seqnum_start) < 0) { +- udev_err(udev_queue->udev, "corrupt queue file\n"); +- fclose(queue_file); +- return NULL; +- } +- +- return queue_file; +-} +- + /** + * udev_queue_get_udev_seqnum: + * @udev_queue: udev queue context + * +- * Get the last known udev event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_udev; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 0; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- if (devpath_len > 0) +- seqnum_udev = seqnum; +- } +- +- fclose(queue_file); +- return seqnum_udev; ++ return 0; + } + + /** +@@ -277,15 +162,7 @@ _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *ud + **/ + _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_start; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_start); +- if (queue_file == NULL) +- return 0; +- +- fclose(queue_file); +- return 1; ++ return access("/run/udev/control", F_OK) >= 0; + } + + /** +@@ -298,48 +175,7 @@ _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) + **/ + _public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_kernel; +- unsigned long long int seqnum_udev = 0; +- int queued = 0; +- int is_empty = 0; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 1; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- if (devpath_len > 0) { +- queued++; +- seqnum_udev = seqnum; +- } else { +- queued--; +- } +- } +- +- if (queued > 0) +- goto out; +- +- seqnum_kernel = udev_queue_get_kernel_seqnum(udev_queue); +- if (seqnum_udev < seqnum_kernel) +- goto out; +- +- is_empty = 1; +- +-out: +- fclose(queue_file); +- return is_empty; ++ return access("/run/udev/queue", F_OK) >= 0; + } + + /** +@@ -348,63 +184,15 @@ out: + * @start: first event sequence number + * @end: last event sequence number + * +- * Check if udev is currently processing any events in a given sequence number range. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if any of the sequence numbers in the given range is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, + unsigned long long int start, unsigned long long int end) + { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- int unfinished; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return 1; +- if (start < seqnum) +- start = seqnum; +- if (start > end) { +- fclose(queue_file); +- return 1; +- } +- if (end - start > INT_MAX - 1) { +- fclose(queue_file); +- return -EOVERFLOW; +- } +- +- /* +- * we might start with 0, and handle the initial seqnum +- * only when we find an entry in the queue file +- **/ +- unfinished = end - start; +- +- do { +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- /* +- * we might start with an empty or re-build queue file, where +- * the initial seqnum is not recorded as finished +- */ +- if (start == seqnum && devpath_len > 0) +- unfinished++; +- +- if (devpath_len == 0) { +- if (seqnum >= start && seqnum <= end) +- unfinished--; +- } +- } while (unfinished > 0); +- +- fclose(queue_file); +- +- return (unfinished == 0); ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** +@@ -412,69 +200,25 @@ _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_ + * @udev_queue: udev queue context + * @seqnum: sequence number + * +- * Check if udev is currently processing a given sequence number. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if the given sequence number is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) + { +- if (!udev_queue_get_seqnum_sequence_is_finished(udev_queue, seqnum, seqnum)) +- return 0; +- +- return 1; ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** + * udev_queue_get_queued_list_entry: + * @udev_queue: udev queue context + * +- * Get the first entry of the list of queued events. ++ * This function is deprecated. + * +- * Returns: a udev_list_entry. ++ * Returns: NULL. + **/ + _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return NULL; +- udev_list_cleanup(&udev_queue->queue_list); +- +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return NULL; +- +- for (;;) { +- char syspath[UTIL_PATH_SIZE]; +- char *s; +- size_t l; +- ssize_t len; +- char seqnum_str[32]; +- struct udev_list_entry *list_entry; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- snprintf(seqnum_str, sizeof(seqnum_str), "%llu", seqnum); +- +- s = syspath; +- l = strpcpy(&s, sizeof(syspath), "/sys"); +- len = udev_queue_read_devpath(queue_file, s, l); +- if (len < 0) +- break; +- +- if (len > 0) { +- udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str); +- } else { +- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) { +- if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) { +- udev_list_entry_delete(list_entry); +- break; +- } +- } +- } +- } +- fclose(queue_file); +- +- return udev_list_get_entry(&udev_queue->queue_list); ++ return NULL; + } +diff --git src/libudev/libudev.h src/libudev/libudev.h +index b9b8f13..ceb89bd 100644 +--- a/src/libudev/libudev.h ++++ b/src/libudev/libudev.h +@@ -170,14 +170,14 @@ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue); + struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue); + struct udev *udev_queue_get_udev(struct udev_queue *udev_queue); + struct udev_queue *udev_queue_new(struct udev *udev); +-unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue); +-unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue); ++unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); ++unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); + int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); +-int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum); ++int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) __attribute__ ((deprecated)); + int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, +- unsigned long long int start, unsigned long long int end); +-struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue); ++ unsigned long long int start, unsigned long long int end) __attribute__ ((deprecated)); ++struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + + /* + * udev_hwdb +diff --git src/shared/udev-util.h src/shared/udev-util.h +index 40f8b77..5f09ce1 100644 +--- a/src/shared/udev-util.h ++++ b/src/shared/udev-util.h +@@ -31,7 +31,6 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); +-DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); + + #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) + #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) +@@ -40,5 +39,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); + #define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) + #define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) + #define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp) +-#define _cleanup_udev_queue_unref_ _cleanup_(udev_queue_unrefp) + #define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup) +diff --git src/test/test-libudev.c src/test/test-libudev.c +index c233b1e..f5c8bc7 100644 +--- a/src/test/test-libudev.c ++++ b/src/test/test-libudev.c +@@ -303,38 +303,14 @@ out: + + static int test_queue(struct udev *udev) { + struct udev_queue *udev_queue; +- unsigned long long int seqnum; +- struct udev_list_entry *list_entry; + + udev_queue = udev_queue_new(udev); + if (udev_queue == NULL) + return -1; +- seqnum = udev_queue_get_kernel_seqnum(udev_queue); +- printf("seqnum kernel: %llu\n", seqnum); +- seqnum = udev_queue_get_udev_seqnum(udev_queue); +- printf("seqnum udev : %llu\n", seqnum); + + if (udev_queue_get_queue_is_empty(udev_queue)) + printf("queue is empty\n"); +- printf("get queue list\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); +- printf("get queue list again\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); + +- list_entry = udev_queue_get_queued_list_entry(udev_queue); +- if (list_entry != NULL) { +- printf("event [%llu] is queued\n", seqnum); +- seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10); +- if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum)) +- printf("event [%llu] is not finished\n", seqnum); +- else +- printf("event [%llu] is finished\n", seqnum); +- } +- printf("\n"); + udev_queue_unref(udev_queue); + return 0; + } +diff --git src/udev/udev-ctrl.c src/udev/udev-ctrl.c +index 1e91ec2..74bbd3a 100644 +--- a/src/udev/udev-ctrl.c ++++ b/src/udev/udev-ctrl.c +@@ -275,7 +275,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int + + pfd[0].fd = uctrl->sock; + pfd[0].events = POLLIN; +- r = poll(pfd, 1, timeout * 1000); ++ r = poll(pfd, 1, timeout * MSEC_PER_SEC); + if (r < 0) { + if (errno == EINTR) + continue; +diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c +index 927ea2a..65fc35f 100644 +--- a/src/udev/udevadm-settle.c ++++ b/src/udev/udevadm-settle.c +@@ -41,42 +41,28 @@ + static void help(void) { + printf("Usage: udevadm settle OPTIONS\n" + " -t,--timeout= maximum time to wait for events\n" +- " -s,--seq-start= first seqnum to wait for\n" +- " -e,--seq-end= last seqnum to wait for\n" + " -E,--exit-if-exists= stop waiting if file exists\n" +- " -q,--quiet do not print list after timeout\n" + " -h,--help\n\n"); + } + + static int adm_settle(struct udev *udev, int argc, char *argv[]) + { + static const struct option options[] = { +- { "seq-start", required_argument, NULL, 's' }, +- { "seq-end", required_argument, NULL, 'e' }, ++ { "seq-start", required_argument, NULL, '\0' }, /* removed */ ++ { "seq-end", required_argument, NULL, '\0' }, /* removed */ + { "timeout", required_argument, NULL, 't' }, + { "exit-if-exists", required_argument, NULL, 'E' }, +- { "quiet", no_argument, NULL, 'q' }, ++ { "quiet", no_argument, NULL, 'q' }, /* removed */ + { "help", no_argument, NULL, 'h' }, + {} + }; +- usec_t start_usec = now(CLOCK_MONOTONIC); +- usec_t start = 0; +- usec_t end = 0; +- int quiet = 0; + const char *exists = NULL; + unsigned int timeout = 120; + struct pollfd pfd[1] = { {.fd = -1}, }; +- _cleanup_udev_queue_unref_ struct udev_queue *udev_queue = NULL; + int rc = EXIT_FAILURE, c; + +- while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) ++ while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) { + switch (c) { +- case 's': +- start = strtoull(optarg, NULL, 0); +- break; +- case 'e': +- end = strtoull(optarg, NULL, 0); +- break; + case 't': { + int r; + +@@ -91,9 +77,6 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + case 'E': + exists = optarg; + break; +- case 'q': +- quiet = 1; +- break; + case 'h': + help(); + exit(EXIT_SUCCESS); +@@ -102,44 +85,13 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + default: + assert_not_reached("Unknown argument"); + } ++ } + + if (optind < argc) { + fprintf(stderr, "Extraneous argument: '%s'\n", argv[optind]); + exit(EXIT_FAILURE); + } + +- udev_queue = udev_queue_new(udev); +- if (udev_queue == NULL) +- exit(2); +- +- if (start > 0) { +- unsigned long long kernel_seq; +- +- kernel_seq = udev_queue_get_kernel_seqnum(udev_queue); +- +- /* unless specified, the last event is the current kernel seqnum */ +- if (end == 0) +- end = udev_queue_get_kernel_seqnum(udev_queue); +- +- if (start > end) { +- log_error("seq-start larger than seq-end, ignoring"); +- start = 0; +- end = 0; +- } +- +- if (start > kernel_seq || end > kernel_seq) { +- log_error("seq-start or seq-end larger than current kernel value, ignoring"); +- start = 0; +- end = 0; +- } +- log_debug("start=%llu end=%llu current=%llu", (unsigned long long)start, (unsigned long long)end, kernel_seq); +- } else { +- if (end > 0) { +- log_error("seq-end needs seq-start parameter, ignoring"); +- end = 0; +- } +- } +- + /* guarantee that the udev daemon isn't pre-processing */ + if (getuid() == 0) { + struct udev_ctrl *uctrl; +@@ -160,73 +112,34 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + pfd[0].fd = inotify_init1(IN_CLOEXEC); + if (pfd[0].fd < 0) { + log_error("inotify_init failed: %m"); +- } else { +- if (inotify_add_watch(pfd[0].fd, "/run/udev" , IN_MOVED_TO) < 0) { +- log_error("watching /run/udev failed"); +- close(pfd[0].fd); +- pfd[0].fd = -1; +- } ++ goto out; + } + +- for (;;) { +- struct stat statbuf; ++ if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { ++ log_debug("watching /run/udev failed"); ++ goto out; ++ } + +- if (exists != NULL && stat(exists, &statbuf) == 0) { ++ for (;;) { ++ if (exists && access(exists, F_OK) >= 0) { + rc = EXIT_SUCCESS; + break; + } + +- if (start > 0) { +- /* if asked for, wait for a specific sequence of events */ +- if (udev_queue_get_seqnum_sequence_is_finished(udev_queue, start, end) == 1) { +- rc = EXIT_SUCCESS; +- break; +- } +- } else { +- /* exit if queue is empty */ +- if (udev_queue_get_queue_is_empty(udev_queue)) { +- rc = EXIT_SUCCESS; +- break; +- } +- } +- +- if (pfd[0].fd >= 0) { +- int delay; +- +- if (exists != NULL || start > 0) +- delay = 100; +- else +- delay = 1000; +- /* wake up after delay, or immediately after the queue is rebuilt */ +- if (poll(pfd, 1, delay) > 0 && pfd[0].revents & POLLIN) { +- char buf[sizeof(struct inotify_event) + PATH_MAX]; +- +- read(pfd[0].fd, buf, sizeof(buf)); +- } +- } else { +- sleep(1); ++ /* exit if queue is empty */ ++ if (access("/run/udev/queue", F_OK) < 0) { ++ rc = EXIT_SUCCESS; ++ break; + } + +- if (timeout > 0) { +- usec_t age_usec; ++ /* wake up when "queue" file is deleted */ ++ if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN) { ++ char buf[sizeof(struct inotify_event) + PATH_MAX]; + +- age_usec = now(CLOCK_MONOTONIC) - start_usec; +- if (age_usec / (1000 * 1000) >= timeout) { +- struct udev_list_entry *list_entry; +- +- if (!quiet && udev_queue_get_queued_list_entry(udev_queue) != NULL) { +- log_debug("timeout waiting for udev queue"); +- printf("\nudevadm settle - timeout of %i seconds reached, the event queue contains:\n", timeout); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf(" %s (%s)\n", +- udev_list_entry_get_name(list_entry), +- udev_list_entry_get_value(list_entry)); +- } +- +- break; +- } ++ read(pfd[0].fd, buf, sizeof(buf)); + } + } ++ + out: + if (pfd[0].fd >= 0) + close(pfd[0].fd); +@@ -236,5 +149,5 @@ out: + const struct udevadm_cmd udevadm_settle = { + .name = "settle", + .cmd = adm_settle, +- .help = "wait for the event queue to finish", ++ .help = "wait for pending udev events", + }; +diff --git src/udev/udevd.c src/udev/udevd.c +index f21c227..f9ee368 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -60,7 +60,6 @@ void udev_main_log(struct udev *udev, int priority, + } + + static struct udev_rules *rules; +-static struct udev_queue_export *udev_queue_export; + static struct udev_ctrl *udev_ctrl; + static struct udev_monitor *monitor; + static int worker_watch[2] = { -1, -1 }; +@@ -139,14 +138,9 @@ static inline struct worker *node_to_worker(struct udev_list_node *node) + return container_of(node, struct worker, node); + } + +-static void event_queue_delete(struct event *event, bool export) ++static void event_queue_delete(struct event *event) + { + udev_list_node_remove(&event->node); +- +- if (export) { +- udev_queue_export_device_finished(udev_queue_export, event->dev); +- log_debug("seq %llu done with %i", udev_device_get_seqnum(event->dev), event->exitcode); +- } + udev_device_unref(event->dev); + free(event); + } +@@ -225,7 +219,6 @@ static void worker_new(struct event *event) + free(worker); + worker_list_cleanup(udev); + event_queue_cleanup(udev, EVENT_UNDEF); +- udev_queue_export_unref(udev_queue_export); + udev_monitor_unref(monitor); + udev_ctrl_unref(udev_ctrl); + close(fd_signal); +@@ -449,7 +442,6 @@ static int event_queue_insert(struct udev_device *dev) + event->nodelay = true; + #endif + +- udev_queue_export_device_queued(udev_queue_export, dev); + log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), + udev_device_get_action(dev), udev_device_get_subsystem(dev)); + +@@ -580,7 +572,7 @@ static void event_queue_cleanup(struct udev *udev, enum event_state match_type) + if (match_type != EVENT_UNDEF && match_type != event->state) + continue; + +- event_queue_delete(event, false); ++ event_queue_delete(event); + } + } + +@@ -605,7 +597,7 @@ static void worker_returned(int fd_worker) + /* worker returned */ + if (worker->event) { + worker->event->exitcode = msg.exitcode; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + if (worker->state != WORKER_KILLED) +@@ -797,7 +789,8 @@ static void handle_signal(struct udev *udev, int signo) + log_error("worker [%u] failed while handling '%s'", + pid, worker->event->devpath); + worker->event->exitcode = -32; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + } +@@ -1076,14 +1069,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024); +- +- /* create queue file before signalling 'ready', to make sure we block 'settle' */ +- udev_queue_export = udev_queue_export_new(udev); +- if (udev_queue_export == NULL) { +- log_error("error creating queue file"); +- goto exit; +- } ++ udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024); + + if (daemonize) { + pid_t pid; +@@ -1241,12 +1227,12 @@ int main(int argc, char *argv[]) + worker_kill(udev); + + /* exit after all has cleaned up */ +- if (udev_list_node_is_empty(&event_list) && udev_list_node_is_empty(&worker_list)) ++ if (udev_list_node_is_empty(&event_list) && children == 0) + break; + + /* timeout at exit for workers to finish */ +- timeout = 30 * 1000; +- } else if (udev_list_node_is_empty(&event_list) && !children) { ++ timeout = 30 * MSEC_PER_SEC; ++ } else if (udev_list_node_is_empty(&event_list) && children == 0) { + /* we are idle */ + timeout = -1; + +@@ -1255,8 +1241,20 @@ int main(int argc, char *argv[]) + cg_kill(SYSTEMD_CGROUP_CONTROLLER, udev_cgroup, SIGKILL, false, true, NULL); + } else { + /* kill idle or hanging workers */ +- timeout = 3 * 1000; ++ timeout = 3 * MSEC_PER_SEC; + } ++ ++ /* tell settle that we are busy or idle */ ++ if (!udev_list_node_is_empty(&event_list)) { ++ int fd; ++ ++ fd = open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); ++ if (fd >= 0) ++ close(fd); ++ } else { ++ unlink("/run/udev/queue"); ++ } ++ + fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), timeout); + if (fdcount < 0) + continue; +@@ -1283,18 +1281,18 @@ int main(int argc, char *argv[]) + if (worker->state != WORKER_RUNNING) + continue; + +- if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) { + log_error("worker [%u] %s timeout; kill it", worker->pid, + worker->event ? worker->event->devpath : ""); + kill(worker->pid, SIGKILL); + worker->state = WORKER_KILLED; ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + if (worker->event) { +- log_error("seq %llu '%s' killed", +- udev_device_get_seqnum(worker->event->dev), worker->event->devpath); ++ log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath); + worker->event->exitcode = -64; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + } +@@ -1317,7 +1315,7 @@ int main(int argc, char *argv[]) + } + + /* check for changed config, every 3 seconds at most */ +- if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * USEC_PER_SEC) { + if (udev_rules_check_timestamp(rules)) + reload = true; + if (udev_builtin_validate(udev)) +@@ -1390,8 +1388,8 @@ int main(int argc, char *argv[]) + + rc = EXIT_SUCCESS; + exit: +- udev_queue_export_cleanup(udev_queue_export); + udev_ctrl_cleanup(udev_ctrl); ++ unlink("/run/udev/queue"); + exit_daemonize: + if (fd_ep >= 0) + close(fd_ep); +@@ -1406,7 +1404,6 @@ exit_daemonize: + if (worker_watch[WRITE_END] >= 0) + close(worker_watch[WRITE_END]); + udev_monitor_unref(monitor); +- udev_queue_export_unref(udev_queue_export); + udev_ctrl_connection_unref(ctrl_conn); + udev_ctrl_unref(udev_ctrl); + label_finish(); +-- +1.7.9.2 + diff --git a/1037-udev-exclude-cd-dvd-from-block-device.patch b/1037-udev-exclude-cd-dvd-from-block-device.patch new file mode 100644 index 00000000..0b8d68ff --- /dev/null +++ b/1037-udev-exclude-cd-dvd-from-block-device.patch @@ -0,0 +1,14 @@ +Exclude cd/dvd as well (bnc#882714) + +--- systemd-210/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c 2014-06-18 12:53:34.454235577 +0000 +@@ -744,7 +744,8 @@ static int synthesize_change(struct udev + + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && +- !startswith(udev_device_get_sysname(dev), "dm-")) { ++ !startswith(udev_device_get_sysname(dev), "dm-") && ++ !startswith(udev_device_get_sysname(dev), "sr")) { + bool part_table_read = false; + bool has_partitions = false; + int fd; diff --git a/systemd-mini.changes b/systemd-mini.changes index 3f886386..ddad6785 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de + +- Do not generate synthesize change for cd/dvd (bnc#882714, comment #51) + add patch 1037-udev-exclude-cd-dvd-from-block-device.patch from + Roberts suggestion as well as readd + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 2392c88a..13903ddd 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -614,8 +614,7 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -# disable due to bnc#882714 -# Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 @@ -644,6 +643,8 @@ Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch # PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +# PATCH-FIX-SUSE See bnc#882714 comment #51 +Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1106,8 +1107,7 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 -# disable due to bnc#882714 -# %patch1022 -p1 +%patch1022 -p1 %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 @@ -1122,6 +1122,7 @@ cp %{SOURCE7} m4/ %patch1034 -p1 %patch1035 -p1 %patch1036 -p1 +%patch1037 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 3f886386..ddad6785 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de + +- Do not generate synthesize change for cd/dvd (bnc#882714, comment #51) + add patch 1037-udev-exclude-cd-dvd-from-block-device.patch from + Roberts suggestion as well as readd + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 24114d0d..acd8e204 100644 --- a/systemd.spec +++ b/systemd.spec @@ -609,8 +609,7 @@ Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch # PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch Patch1021: 1021-udev-re-add-persistent-net-rules.patch # PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch -# disable due to bnc#882714 -# Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch # PATCH-FIX-UPSTREAM added at 2014/06/03 @@ -639,6 +638,8 @@ Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch # PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +# PATCH-FIX-SUSE See bnc#882714 comment #51 +Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1101,8 +1102,7 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 -# disable due to bnc#882714 -# %patch1022 -p1 +%patch1022 -p1 %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 @@ -1117,6 +1117,7 @@ cp %{SOURCE7} m4/ %patch1034 -p1 %patch1035 -p1 %patch1036 -p1 +%patch1037 -p1 # ensure generate files are removed rm -f units/emergency.service From 09aaae7186b8f12fcac047d22ea66336fc2ae546c19aba00c203de018305968e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 Jun 2014 13:37:26 +0000 Subject: [PATCH 30/43] Add 0001-detect-s390-virt.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=679 --- 0001-detect-s390-virt.patch | 34 ++++++++++++++++++++++++++++++++++ systemd-mini.changes | 6 ++++++ systemd-mini.spec | 3 +++ systemd.changes | 6 ++++++ systemd.spec | 3 +++ 5 files changed, 52 insertions(+) create mode 100644 0001-detect-s390-virt.patch diff --git a/0001-detect-s390-virt.patch b/0001-detect-s390-virt.patch new file mode 100644 index 00000000..7e6f1390 --- /dev/null +++ b/0001-detect-s390-virt.patch @@ -0,0 +1,34 @@ +bnc#880438 - systemd-detect-virt doesn't work on System z + +--- systemd-210/src/shared/virt.c ++++ systemd-210/src/shared/virt.c 2014-06-17 08:03:30.152489353 +0000 +@@ -196,6 +196,29 @@ + } else + return r; + ++#if defined(__s390x__) ++ /* First layer virtualization (PR/SM) is always present on s390x */ ++ _id = "PR/SM"; ++ r = 1; ++ ++ /* Check for second layer virtualization */ ++ _cleanup_fclose_ FILE *f = NULL; ++ char line[LINE_MAX]; ++ f = fopen("/proc/sysinfo", "re"); ++ if (f) { ++ FOREACH_LINE(line, f, return -errno) { ++ if (startswith(line, "VM00 Control Program:")) { ++ if (strstr(line,"z/VM")) ++ _id = "z/VM"; ++ ++ break; ++ } ++ } ++ } ++ ++ goto finish; ++#endif ++ + /* this will set _id to "other" and return 0 for unknown hypervisors */ + r = detect_vm_cpuid(&_id); + if (r != 0) diff --git a/systemd-mini.changes b/systemd-mini.changes index ddad6785..b9be5413 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + ------------------------------------------------------------------- Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 13903ddd..35293d88 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -564,6 +564,8 @@ Patch278: 0001-core-fix-invalid-free-in-killall.patch Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch +# PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) +Patch281: 0001-detect-s390-virt.patch # UDEV PATCHES # ============ @@ -1083,6 +1085,7 @@ cp %{SOURCE7} m4/ %patch278 -p0 %patch279 -p0 %patch280 -p0 +%patch281 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index ddad6785..b9be5413 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + ------------------------------------------------------------------- Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index acd8e204..7d50e9ca 100644 --- a/systemd.spec +++ b/systemd.spec @@ -559,6 +559,8 @@ Patch278: 0001-core-fix-invalid-free-in-killall.patch Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch +# PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) +Patch281: 0001-detect-s390-virt.patch # UDEV PATCHES # ============ @@ -1078,6 +1080,7 @@ cp %{SOURCE7} m4/ %patch278 -p0 %patch279 -p0 %patch280 -p0 +%patch281 -p1 # udev patches %patch1001 -p1 From 087d78212d3e6d6f6029c1844c538278dda8edd1364498f190e793971b374f1c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 24 Jun 2014 10:02:12 +0000 Subject: [PATCH 31/43] Accepting request 238415 from home:arvidjaar:bnc:883565:Factory Backport of 0404c609 (bnc#883565) OBS-URL: https://build.opensuse.org/request/show/238415 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=680 --- ...network-should-be-equivalent-to-netw.patch | 51 +++++++++++++++++++ insserv-generator.patch | 20 ++++---- systemd.changes | 9 ++++ systemd.spec | 3 ++ 4 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch diff --git a/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch b/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch new file mode 100644 index 00000000..06371697 --- /dev/null +++ b/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch @@ -0,0 +1,51 @@ +From 0404c609f399b2092a3de52eef9d75b0dc12e94c Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Mon, 12 May 2014 21:26:54 +0200 +Subject: [PATCH] core: sysvcompat - $network should be equivalent to + network-online, rather than network target +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Most likely the facility needed is actual connectivity, rather than whether or not the +network managment daemon is running. + +We also need to explicitly pull in the network-online.target, as it is not active by +default. + +This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default +as part of network-online.target, and only delay boot when some service actively pulls it in. + +See: + +Cc: Pavel Šimerda +Cc: Michal Sekletar +--- + TODO | 4 ---- + src/core/service.c | 8 ++++++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +Modified by Andrey Borzenkov for openSUSE. +Index: systemd-210/src/core/service.c +=================================================================== +--- systemd-210.orig/src/core/service.c ++++ systemd-210/src/core/service.c +@@ -404,7 +404,7 @@ static int sysv_translate_facility(const + static const char * const table[] = { + /* LSB defined facilities */ + "local_fs", NULL, +- "network", SPECIAL_NETWORK_TARGET, ++ "network", SPECIAL_NETWORK_ONLINE_TARGET, + "named", SPECIAL_NSS_LOOKUP_TARGET, + "portmap", SPECIAL_RPCBIND_TARGET, + "remote_fs", SPECIAL_REMOTE_FS_TARGET, +@@ -881,6 +881,9 @@ static int service_load_sysv_path(Servic + if (r == 0) + continue; + ++ if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET) && d == UNIT_AFTER && e == _UNIT_DEPENDENCY_INVALID) ++ e = UNIT_WANTS; ++ + if (e != _UNIT_DEPENDENCY_INVALID) + r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true); + else diff --git a/insserv-generator.patch b/insserv-generator.patch index f1a2452f..5525222a 100644 --- a/insserv-generator.patch +++ b/insserv-generator.patch @@ -13,11 +13,11 @@ systemd unit drop-in files to add dependencies create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/insserv-generator.c -Index: systemd-208/Makefile.am +Index: systemd-210/Makefile.am =================================================================== ---- systemd-208.orig/Makefile.am -+++ systemd-208/Makefile.am -@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \ +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -343,6 +343,7 @@ rootlibexec_PROGRAMS = \ systemd-socket-proxyd systemgenerator_PROGRAMS = \ @@ -25,7 +25,7 @@ Index: systemd-208/Makefile.am systemd-getty-generator \ systemd-fstab-generator \ systemd-system-update-generator -@@ -1658,6 +1659,14 @@ systemd_delta_LDADD = \ +@@ -1728,6 +1729,14 @@ systemd_delta_LDADD = \ libsystemd-shared.la # ------------------------------------------------------------------------------ @@ -40,10 +40,10 @@ Index: systemd-208/Makefile.am systemd_getty_generator_SOURCES = \ src/getty-generator/getty-generator.c -Index: systemd-208/src/insserv-generator/Makefile +Index: systemd-210/src/insserv-generator/Makefile =================================================================== --- /dev/null -+++ systemd-208/src/insserv-generator/Makefile ++++ systemd-210/src/insserv-generator/Makefile @@ -0,0 +1,28 @@ +# This file is part of systemd. +# @@ -73,10 +73,10 @@ Index: systemd-208/src/insserv-generator/Makefile + $(MAKE) -C .. clean + +.PHONY: all clean -Index: systemd-208/src/insserv-generator/insserv-generator.c +Index: systemd-210/src/insserv-generator/insserv-generator.c =================================================================== --- /dev/null -+++ systemd-208/src/insserv-generator/insserv-generator.c ++++ systemd-210/src/insserv-generator/insserv-generator.c @@ -0,0 +1,312 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -146,7 +146,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c + static const char * const table[] = { + /* LSB defined facilities */ + "local_fs", NULL, -+ "network", SPECIAL_NETWORK_TARGET, ++ "network", SPECIAL_NETWORK_ONLINE_TARGET, + "named", SPECIAL_NSS_LOOKUP_TARGET, + "portmap", SPECIAL_RPCBIND_TARGET, + "remote_fs", SPECIAL_REMOTE_FS_TARGET, diff --git a/systemd.changes b/systemd.changes index b9be5413..662c2939 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com + +- make sure legacy services that depend on network are started after + network is available (bnc#883565) + * 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch + * update insserv-generator.patch to translate $network into + network-online.target + ------------------------------------------------------------------- Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 7d50e9ca..11add832 100644 --- a/systemd.spec +++ b/systemd.spec @@ -561,6 +561,8 @@ Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch # PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) Patch281: 0001-detect-s390-virt.patch +# PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available +Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch # UDEV PATCHES # ============ @@ -1081,6 +1083,7 @@ cp %{SOURCE7} m4/ %patch279 -p0 %patch280 -p0 %patch281 -p1 +%patch282 -p1 # udev patches %patch1001 -p1 From 935ea4d229b897215badd7987973430b42fe3f51cfbd6be24bddcc1ac05103ee Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 24 Jun 2014 11:34:12 +0000 Subject: [PATCH 32/43] More work e.g. for bnc #881125 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=681 --- ...sctl.service.in-run-after-load-modul.patch | 29 ++ ...g-caps-so-that-GetAddresses-can-work.patch | 18 + ...emd-tmpfiles-clean.service-after-tim.patch | 26 + ...rator-properly-escape-instance-names.patch | 39 ++ 0005-po-add-Greek-translation.patch | 436 +++++++++++++++++ ...base-of-Bluetooth-company-identifier.patch | 82 ++++ 0007-po-add-German-translation.patch | 448 ++++++++++++++++++ ...Reset-signal-mask-on-re-exec-to-init.patch | 37 +- ...an-up-signal-reset-logic-when-reexec.patch | 50 ++ ...t-fuse.sshfs-as-a-network-filesystem.patch | 25 + ...d-pthread-flag-for-libsystemd-shared.patch | 28 ++ ...-avoid-misleading-error-message-when.patch | 42 ++ ...are-applied-after-modules-are-loaded.patch | 19 - getty-generator-with-serial-3270-tty.patch | 34 -- systemd-mini.changes | 36 ++ systemd-mini.spec | 52 +- systemd.changes | 27 ++ systemd.spec | 49 +- 18 files changed, 1392 insertions(+), 85 deletions(-) create mode 100644 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch create mode 100644 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch create mode 100644 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch create mode 100644 0004-getty-generator-properly-escape-instance-names.patch create mode 100644 0005-po-add-Greek-translation.patch create mode 100644 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch create mode 100644 0007-po-add-German-translation.patch rename 0001-systemd-empty-sigmask-on-reexec.patch => 0008-Reset-signal-mask-on-re-exec-to-init.patch (53%) create mode 100644 0009-core-clean-up-signal-reset-logic-when-reexec.patch create mode 100644 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch create mode 100644 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch create mode 100644 0012-core-transaction-avoid-misleading-error-message-when.patch delete mode 100644 ensure-sysctl-are-applied-after-modules-are-loaded.patch delete mode 100644 getty-generator-with-serial-3270-tty.patch diff --git a/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch b/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch new file mode 100644 index 00000000..6c60f8b7 --- /dev/null +++ b/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch @@ -0,0 +1,29 @@ +Based on 0b73eab7a2185ae0377650e3fdb8208347a8a575 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sat, 23 Mar 2013 03:54:16 +0100 +Subject: [PATCH] units/systemd-sysctl.service.in: run after load-modules + +Modules might or will register new sysctl options. + +[zj: This mechanism of adding modules just to reliably set sysctl +attributes is not ideal. Nevertheless, sysctl for dynamically created +attributes is simply broken, and this is the easiest workaround.] + +https://bugzilla.redhat.com/show_bug.cgi?id=1022977 +https://bugzilla.novell.com/show_bug.cgi?id=725412 +--- + units/systemd-sysctl.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git units/systemd-sysctl.service.in units/systemd-sysctl.service.in +index 5c7c5d7..ade9dc3 100644 +--- units/systemd-sysctl.service.in ++++ units/systemd-sysctl.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service + DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-readahead-collect.service systemd-readahead-replay.service ++After=systemd-modules-load.service + Before=sysinit.target shutdown.target + ConditionPathIsReadWrite=/proc/sys/ + ConditionDirectoryNotEmpty=|/lib/sysctl.d diff --git a/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch b/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch new file mode 100644 index 00000000..58189d0f --- /dev/null +++ b/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch @@ -0,0 +1,18 @@ +Basedo n a55954297dade7b432fd3a4f328f23261621ff79 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 19 Jun 2014 19:53:16 +0200 +Subject: [PATCH] units: add missing caps so that GetAddresses() can work + +--- + units/systemd-machined.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- units/systemd-machined.service.in ++++ units/systemd-machined.service.in 2014-06-24 11:26:19.554235869 +0000 +@@ -15,5 +15,5 @@ After=machine.slice + [Service] + ExecStart=@rootlibexecdir@/systemd-machined + BusName=org.freedesktop.machine1 +-CapabilityBoundingSet=CAP_KILL ++CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID + WatchdogSec=1min diff --git a/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch b/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch new file mode 100644 index 00000000..5f466ea6 --- /dev/null +++ b/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch @@ -0,0 +1,26 @@ +Based on 497d1986c13032f1ef8f4592bb7ed8d3aa321a47 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 20 Jun 2014 00:15:39 +0200 +Subject: [PATCH] units: order systemd-tmpfiles-clean.service after + time-sync.target + +That way, on systems lacking an RTC we don't false start removing aged +files too early. +--- + units/systemd-tmpfiles-clean.service.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- units/systemd-tmpfiles-clean.service.in ++++ units/systemd-tmpfiles-clean.service.in 2014-06-24 10:47:57.398235644 +0000 +@@ -10,8 +10,9 @@ Description=Cleanup of Temporary Directo + Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) + DefaultDependencies=no + Wants=local-fs.target +-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target +-Before=sysinit.target shutdown.target ++Conflicts=shutdown.target ++After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target time-sync.target ++Before=shutdown.target + ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/etc/tmpfiles.d diff --git a/0004-getty-generator-properly-escape-instance-names.patch b/0004-getty-generator-properly-escape-instance-names.patch new file mode 100644 index 00000000..26feb694 --- /dev/null +++ b/0004-getty-generator-properly-escape-instance-names.patch @@ -0,0 +1,39 @@ +From a2ae516a25dafe41e0cd296ab7b5d022fa62b95f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 19 Jun 2014 22:02:55 -0400 +Subject: [PATCH] getty-generator: properly escape instance names + +Otherwise the add_symlink() function tries to make directories for +each slash even for the slash after the @ symbol in the final link +name, failing for /dev/3270/tty1. + +Based on a patch by Werner Fink . +--- + src/getty-generator/getty-generator.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git src/getty-generator/getty-generator.c src/getty-generator/getty-generator.c +index 35cd858..7d4b546 100644 +--- src/getty-generator/getty-generator.c ++++ src/getty-generator/getty-generator.c +@@ -67,7 +67,7 @@ static int add_serial_getty(const char *tty) { + + log_debug("Automatically adding serial getty for /dev/%s.", tty); + +- n = unit_name_replace_instance("serial-getty@.service", tty); ++ n = unit_name_from_path_instance("serial-getty", tty, ".service"); + if (!n) + return log_oom(); + +@@ -81,7 +81,7 @@ static int add_container_getty(const char *tty) { + + log_debug("Automatically adding container getty for /dev/pts/%s.", tty); + +- n = unit_name_replace_instance("container-getty@.service", tty); ++ n = unit_name_from_path_instance("container-getty", tty, ".service"); + if (!n) + return log_oom(); + +-- +1.7.9.2 + diff --git a/0005-po-add-Greek-translation.patch b/0005-po-add-Greek-translation.patch new file mode 100644 index 00000000..029ce4fa --- /dev/null +++ b/0005-po-add-Greek-translation.patch @@ -0,0 +1,436 @@ +From 3d89c35c2ae08c3fbf1a037c4df54c8e5ae56faf Mon Sep 17 00:00:00 2001 +From: Dimitris Spingos +Date: Wed, 7 May 2014 18:27:02 +0200 +Subject: [PATCH] po: add Greek translation + +https://bugs.freedesktop.org/show_bug.cgi?id=78064 +--- + po/LINGUAS | 3 +- + po/el.po | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 406 insertions(+), 1 deletion(-) + create mode 100644 po/el.po + +diff --git po/LINGUAS po/LINGUAS +index 0301751..820ca82 100644 +--- po/LINGUAS ++++ po/LINGUAS +@@ -1,4 +1,5 @@ ++el + fr ++it + pl + ru +-it +diff --git po/el.po po/el.po +new file mode 100644 +index 0000000..1570565 +--- /dev/null ++++ po/el.po +@@ -0,0 +1,404 @@ ++# Greek translation for systemd. ++# Copyright (C) 2014 systemd's COPYRIGHT HOLDER ++# This file is distributed under the same license as the systemd package. ++# Dimitris Spingos , 2014. ++# Dimitris Spingos (Δημήτρης Σπίγγος) , 2014. ++msgid "" ++msgstr "" ++"Project-Id-Version: systemd master\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=sys" ++"temd&keywords=I18N+L10N&component=general\n" ++"POT-Creation-Date: 2014-04-25 15:51+0000\n" ++"PO-Revision-Date: 2014-04-29 09:17+0300\n" ++"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) \n" ++"Language-Team: team@lists.gnome.gr\n" ++"Language: el\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++"X-Generator: Virtaal 0.7.0\n" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:1 ++msgid "Set host name" ++msgstr "Ορισμός ονόματος οικοδεσπότη" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:2 ++msgid "Authentication is required to set the local host name." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε τοπικά όνομα οικοδεσπότη." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:3 ++msgid "Set static host name" ++msgstr "Ορισμός στατικού ονόματος οικοδεσπότη" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:4 ++msgid "" ++"Authentication is required to set the statically configured local host name, " ++"as well as the pretty host name." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε το στατικά ρυθμισμένο όνομα τοπικού " ++"οικοδεσπότη, καθώς και το pretty όνομα οικοδεσπότη." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:5 ++msgid "Set machine information" ++msgstr "Ορισμός πληροφοριών μηχανής" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:6 ++msgid "Authentication is required to set local machine information." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε πληροφορίες τοπικής μηχανής." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:1 ++msgid "Set system locale" ++msgstr "Ορισμός τοπικών ρυθμίσεων συστήματος" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:2 ++msgid "Authentication is required to set the system locale." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε τις τοπικές ρυθμίσεις του συστήματος." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:3 ++msgid "Set system keyboard settings" ++msgstr "Ορισμός ρυθμίσεων πληκτρολογίου συστήματος" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:4 ++msgid "Authentication is required to set the system keyboard settings." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε τις ρυθμίσεις πληκτρολογίου του " ++"συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:1 ++msgid "Allow applications to inhibit system shutdown" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τον τερματισμό του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:2 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"shutdown." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει τον " ++"τερματισμό του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:3 ++msgid "Allow applications to delay system shutdown" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να καθυστερούν τον τερματισμό του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:4 ++msgid "" ++"Authentication is required to allow an application to delay system shutdown." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει " ++"τον τερματισμό του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:5 ++msgid "Allow applications to inhibit system sleep" ++msgstr "Να επιτρέπεται στις εφαρμογές να αποτρέπουν την ύπνωση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:6 ++msgid "" ++"Authentication is required to allow an application to inhibit system sleep." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"ύπνωση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:7 ++msgid "Allow applications to delay system sleep" ++msgstr "Να επιτρέπεται στις εφαρμογές να καθυστερούν την ύπνωση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:8 ++msgid "" ++"Authentication is required to allow an application to delay system sleep." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει " ++"την ύπνωση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:9 ++msgid "Allow applications to inhibit automatic system suspend" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν την αυτόματη αναστολή του " ++"συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:10 ++msgid "" ++"Authentication is required to allow an application to inhibit automatic " ++"system suspend." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"αυτόματη αναστολή του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:11 ++msgid "Allow applications to inhibit system handling of the power key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"ενεργοποίησης του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:12 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the power key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου ενεργοποίησης του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:13 ++msgid "Allow applications to inhibit system handling of the suspend key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"αναστολής του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:14 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the suspend key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου αναστολής του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:15 ++msgid "Allow applications to inhibit system handling of the hibernate key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"αδρανοποίησης του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:16 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the hibernate key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου αδρανοποίησης του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:17 ++msgid "Allow applications to inhibit system handling of the lid switch" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του διακόπτη " ++"καλύμματος του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:18 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the lid switch." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του διακόπτη καλύμματος του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:19 ++msgid "Allow non-logged-in users to run programs" ++msgstr "Να επιτρέπεται σε μη συνδεμένους χρήστες να εκτελούν προγράμματα" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:20 ++msgid "" ++"Authentication is required to allow a non-logged-in user to run programs." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μη συνδεμένους χρήστες να " ++"εκτελούν προγράμματα." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:21 ++msgid "Allow attaching devices to seats" ++msgstr "Να επιτρέπεται η προσάρτηση συσκευών στους σταθμούς εργασίας" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:22 ++msgid "Authentication is required for attaching a device to a seat." ++msgstr "" ++"Απαιτείται πιστοποίηση για προσάρτηση μιας συσκευής σε έναν σταθμό εργασίας." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:23 ++msgid "Flush device to seat attachments" ++msgstr "Αφαίρεση συσκευής από προσαρτήσεις σταθμού εργασίας" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:24 ++msgid "" ++"Authentication is required for resetting how devices are attached to seats." ++msgstr "" ++"Απαιτείται πιστοποίηση για επαναφορά του τρόπου που οι συσκευές προσαρτώνται " ++"στους σταθμούς εργασίας." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:25 ++msgid "Power off the system" ++msgstr "Σβήσιμο του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:26 ++msgid "Authentication is required for powering off the system." ++msgstr "Απαιτείται πιστοποίηση για την σβήσιμο του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:27 ++msgid "Power off the system while other users are logged in" ++msgstr "Σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:28 ++msgid "" ++"Authentication is required for powering off the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι " ++"συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:29 ++msgid "Power off the system while an application asked to inhibit it" ++msgstr "Απενεργοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:30 ++msgid "" ++"Authentication is required for powering off the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για απενεργοποίηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:31 ++msgid "Reboot the system" ++msgstr "Επανεκκίνηση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:32 ++msgid "Authentication is required for rebooting the system." ++msgstr "Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:33 ++msgid "Reboot the system while other users are logged in" ++msgstr "Επανεκκίνηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:34 ++msgid "" ++"Authentication is required for rebooting the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ άλλοι χρήστες " ++"είναι συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:35 ++msgid "Reboot the system while an application asked to inhibit it" ++msgstr "Επανεκκίνηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:36 ++msgid "" ++"Authentication is required for rebooting the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:37 ++msgid "Suspend the system" ++msgstr "Αναστολή του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:38 ++msgid "Authentication is required for suspending the system." ++msgstr "Απαιτείται πιστοποίηση για την αναστολή του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:39 ++msgid "Suspend the system while other users are logged in" ++msgstr "Αναστολή του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:40 ++msgid "" ++"Authentication is required for suspending the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ άλλοι χρήστες είναι " ++"συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:41 ++msgid "Suspend the system while an application asked to inhibit it" ++msgstr "Αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:42 ++msgid "" ++"Authentication is required for suspending the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε " ++"να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:43 ++msgid "Hibernate the system" ++msgstr "Αδρανοποίηση του συτήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:44 ++msgid "Authentication is required for hibernating the system." ++msgstr "Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:45 ++msgid "Hibernate the system while other users are logged in" ++msgstr "Αδρανοποίηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:46 ++msgid "" ++"Authentication is required for hibernating the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ άλλοι χρήστες " ++"είναι συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:47 ++msgid "Hibernate the system while an application asked to inhibit it" ++msgstr "Αδρανοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:48 ++msgid "" ++"Authentication is required for hibernating the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1 ++msgid "Set system time" ++msgstr "Ορισμός ώρας συστήματος" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:2 ++msgid "Authentication is required to set the system time." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε την ώρα του συστήματος." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:3 ++msgid "Set system timezone" ++msgstr "Ορισμός ζώνης ώρας συστήματος" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:4 ++msgid "Authentication is required to set the system timezone." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε την ώρα ζώνης του συστήματος." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:5 ++msgid "Set RTC to local timezone or UTC" ++msgstr "Ορισμός RTC στην τοπική ζώνη ώρας ή UTC" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:6 ++msgid "" ++"Authentication is required to control whether the RTC stores the local or " ++"UTC time." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ελέγξετε αν το RTC αποθηκεύει την τοπική ή την " ++"ώρα UTC." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:7 ++msgid "Turn network time synchronization on or off" ++msgstr "Ενεργοποίηση/Απενεργοποίηση συγχρονισμού ώρας δικτύου" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:8 ++msgid "" ++"Authentication is required to control whether network time synchronization " ++"shall be enabled." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ελέγξετε αν ο συγχρονισμός ώρας δικτύου θα " ++"ενεργοποιηθεί." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1 ++msgid "Send passphrase back to system" ++msgstr "Αποστολή του συνθηματικού πίσω στο σύστημα" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:2 ++msgid "" ++"Authentication is required to send the entered passphrase back to the system." ++msgstr "" ++"Απαιτείται πιστοποίηση για αποστολή του εισερχόμενου συνθηματικού πίσω στο " ++"σύστημα." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3 ++msgid "Privileged system and service manager access" ++msgstr "Προνομιούχος πρόσβαση διαχειριστή συστήματος και υπηρεσίας" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4 ++msgid "Authentication is required to access the system and service manager." ++msgstr "" ++"Απαιτείται πιστοποίηση για να προσπελάσετε τον διαχειριστή συστήματος και " ++"υπηρεσιών." +-- +1.7.9.2 + diff --git a/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 00000000..c4e89bb1 --- /dev/null +++ b/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,82 @@ +From 7cfa80f07e94c3e48703d145ef03a73dd6e7b983 Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Wed, 18 Jun 2014 13:55:32 +0200 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 42 ++++++++++++++++++++++++++++++--- + 1 file changed, 39 insertions(+), 3 deletions(-) + +diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb +index a65c7db..377748a 100644 +--- hwdb/20-bluetooth-vendor-product.hwdb ++++ hwdb/20-bluetooth-vendor-product.hwdb +@@ -115,7 +115,7 @@ bluetooth:v0024* + ID_VENDOR_FROM_DATABASE=Alcatel + + bluetooth:v0025* +- ID_VENDOR_FROM_DATABASE=Philips Semiconductors ++ ID_VENDOR_FROM_DATABASE=NXP Semiconductors (formerly Philips Semiconductors) + + bluetooth:v0026* + ID_VENDOR_FROM_DATABASE=C Technologies +@@ -427,7 +427,7 @@ bluetooth:v008B* + ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC + + bluetooth:v008C* +- ID_VENDOR_FROM_DATABASE=Qualcomm Retail Solutions, Inc. (formerly Qualcomm Labs, Inc.) ++ ID_VENDOR_FROM_DATABASE=Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.) + + bluetooth:v008D* + ID_VENDOR_FROM_DATABASE=Zscan Software +@@ -1006,10 +1006,46 @@ bluetooth:v014C* + ID_VENDOR_FROM_DATABASE=Mesh-Net Ltd + + bluetooth:v014D* +- ID_VENDOR_FROM_DATABASE=HUIZHOU DESAY SV AUTOMOTIVE CO., LTD. ++ ID_VENDOR_FROM_DATABASE=Huizhou Desay SV Automotive CO., LTD. + + bluetooth:v014E* + ID_VENDOR_FROM_DATABASE=Tangerine, Inc. + + bluetooth:v014F* + ID_VENDOR_FROM_DATABASE=B&W Group Ltd. ++ ++bluetooth:v0150* ++ ID_VENDOR_FROM_DATABASE=Pioneer Corporation ++ ++bluetooth:v0151* ++ ID_VENDOR_FROM_DATABASE=OnBeep ++ ++bluetooth:v0152* ++ ID_VENDOR_FROM_DATABASE=Vernier Software & Technology ++ ++bluetooth:v0153* ++ ID_VENDOR_FROM_DATABASE=ROL Ergo ++ ++bluetooth:v0154* ++ ID_VENDOR_FROM_DATABASE=Pebble Technology ++ ++bluetooth:v0155* ++ ID_VENDOR_FROM_DATABASE=NETATMO ++ ++bluetooth:v0156* ++ ID_VENDOR_FROM_DATABASE=Accumulate AB ++ ++bluetooth:v0157* ++ ID_VENDOR_FROM_DATABASE=Anhui Huami Information Technology Co., Ltd. ++ ++bluetooth:v0158* ++ ID_VENDOR_FROM_DATABASE=Inmite s.r.o. ++ ++bluetooth:v0159* ++ ID_VENDOR_FROM_DATABASE=ChefSteps, Inc. ++ ++bluetooth:v015A* ++ ID_VENDOR_FROM_DATABASE=micus AG ++ ++bluetooth:v015B* ++ ID_VENDOR_FROM_DATABASE=Biomedical Research Ltd. +-- +1.7.9.2 + diff --git a/0007-po-add-German-translation.patch b/0007-po-add-German-translation.patch new file mode 100644 index 00000000..d653c8ff --- /dev/null +++ b/0007-po-add-German-translation.patch @@ -0,0 +1,448 @@ +From 351e57652a7d9a51f9064c089794d13801eaee73 Mon Sep 17 00:00:00 2001 +From: Benjamin Steinwender +Date: Sun, 8 Jun 2014 18:39:50 +0200 +Subject: [PATCH] po: add German translation + +https://bugs.freedesktop.org/show_bug.cgi?id=79430 +--- + po/LINGUAS | 1 + + po/de.po | 418 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 419 insertions(+) + create mode 100644 po/de.po + +diff --git po/LINGUAS po/LINGUAS +index 820ca82..2cb0f30 100644 +--- po/LINGUAS ++++ po/LINGUAS +@@ -1,3 +1,4 @@ ++de + el + fr + it +diff --git po/de.po po/de.po +new file mode 100644 +index 0000000..a41e33d +--- /dev/null ++++ po/de.po +@@ -0,0 +1,418 @@ ++# German translation for systemd. ++# Copyright (C) 2014 systemd's COPYRIGHT HOLDER ++# This file is distributed under the same license as the systemd package. ++# Christian Kirbach , 2014. ++# Benjamin Steinwender , 2014. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: systemd master\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?" ++"product=systemd&keywords=I18N+L10N&component=general\n" ++"POT-Creation-Date: 2014-06-02 10:25+0000\n" ++"PO-Revision-Date: 2014-06-02 22:43+0100\n" ++"Last-Translator: Benjamin Steinwender \n" ++"Language-Team: German \n" ++"Language: de\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++"X-Generator: Poedit 1.6.5\n" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:1 ++msgid "Set host name" ++msgstr "Rechnername festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:2 ++msgid "Authentication is required to set the local host name." ++msgstr "Legitimierung ist zum Festlegen des lokalen Rechnernamens notwendig" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:3 ++msgid "Set static host name" ++msgstr "Statischen Rechnernamen festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:4 ++msgid "" ++"Authentication is required to set the statically configured local host name, " ++"as well as the pretty host name." ++msgstr "" ++"Authentifizierung ist erforderlich, um den statisch geänderten, lokalen " ++"Rechnernamen, sowie den beschönigten Rechnernamen festzulegen." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:5 ++msgid "Set machine information" ++msgstr "Maschinen-Information festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:6 ++msgid "Authentication is required to set local machine information." ++msgstr "" ++"Legitimierung ist zum Festlegen der lokalen Maschinen-Information " ++"erforderlich." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:1 ++msgid "Set system locale" ++msgstr "Die lokale Sprachumgebung festlegen" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:2 ++msgid "Authentication is required to set the system locale." ++msgstr "" ++"Legitimierung ist zum Festlegen der systemweiten Spracheinstellungen " ++"erforderlich." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:3 ++msgid "Set system keyboard settings" ++msgstr "Tastatureinstellungen des Systems festlegen" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:4 ++msgid "Authentication is required to set the system keyboard settings." ++msgstr "" ++"Legitimierung ist zum Festlegen der Tastatureinstellungen des Systems " ++"erforderlich." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:1 ++msgid "Allow applications to inhibit system shutdown" ++msgstr "Anwendungen dürfen das Herunterfahren des Systems unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:2 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"shutdown." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Herunterfahren des Systems " ++"zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:3 ++msgid "Allow applications to delay system shutdown" ++msgstr "Anwendungen dürfen das Herunterfahren des Systems verzögern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:4 ++msgid "" ++"Authentication is required to allow an application to delay system shutdown." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Verzögern des Herunterfahren " ++"des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:5 ++msgid "Allow applications to inhibit system sleep" ++msgstr "Anwendungen dürfen den Bereitschaftsmodus unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:6 ++msgid "" ++"Authentication is required to allow an application to inhibit system sleep." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden des " ++"Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:7 ++msgid "Allow applications to delay system sleep" ++msgstr "Anwendungen dürfen den Bereitschaftsmodus verzögern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:8 ++msgid "" ++"Authentication is required to allow an application to delay system sleep." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Verzögern des " ++"Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:9 ++msgid "Allow applications to inhibit automatic system suspend" ++msgstr "Anwendungen dürfen den automatischen Bereitschaftsmodus unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:10 ++msgid "" ++"Authentication is required to allow an application to inhibit automatic " ++"system suspend." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Unterbinden des " ++"automatischen Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:11 ++msgid "Allow applications to inhibit system handling of the power key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Ein-/Ausschaltknopfs des Systems " ++"unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:12 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the power key." ++msgstr "" ++"Legitmierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung " ++"der Ein-/Ausschaltknopfs des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:13 ++msgid "Allow applications to inhibit system handling of the suspend key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Bereitschaftsknopfs des Systems " ++"unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:14 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the suspend key." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Bereitschaftsknopfes des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:15 ++msgid "Allow applications to inhibit system handling of the hibernate key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Knopfs für den Ruhezustand unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:16 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the hibernate key." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Knopfs für den Ruhezustand zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:17 ++msgid "Allow applications to inhibit system handling of the lid switch" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Notebookdeckelschalters unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:18 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the lid switch." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Notebookdeckelschalters des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:19 ++msgid "Allow non-logged-in users to run programs" ++msgstr "Nicht angemeldete Benutzer dürfen Programme ausführen" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:20 ++msgid "" ++"Authentication is required to allow a non-logged-in user to run programs." ++msgstr "" ++"Legitimierung ist erforderlich, damit nicht angemeldete Benutzer Programme " ++"ausführen dürfen." ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:21 ++msgid "Allow attaching devices to seats" ++msgstr "Das Anschließen von Geräten an Arbeitsstationen erlauben" ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:22 ++msgid "Authentication is required for attaching a device to a seat." ++msgstr "" ++"Legitimierung ist zum Anschließen eines Geräts an eine Arbeitsstation " ++"notwendig." ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:23 ++msgid "Flush device to seat attachments" ++msgstr "Zurücksetzen der an eine Arbeitsstation angeschlossenen Geräte" ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:24 ++msgid "" ++"Authentication is required for resetting how devices are attached to seats." ++msgstr "" ++"Legitimierung ist zum Zurücksetzen notwendig, wie Geräte an eine " ++"Arbeitsstation angeschlossen werden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:25 ++msgid "Power off the system" ++msgstr "Das System ausschalten" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:26 ++msgid "Authentication is required for powering off the system." ++msgstr "Legitimierung ist zum Ausschalten des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:27 ++msgid "Power off the system while other users are logged in" ++msgstr "Das System herunter fahren, während andere Benutzer angemeldet sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:28 ++msgid "" ++"Authentication is required for powering off the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Herunterfahren des Systems notwendig, während andere " ++"Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:29 ++msgid "Power off the system while an application asked to inhibit it" ++msgstr "" ++"Das System ausschalten, während eine Anwendung anfordert es zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:30 ++msgid "" ++"Authentication is required for powering off the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Ausschalten des Systems notwendig, während eine " ++"Anwendung anfordert es zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:31 ++msgid "Reboot the system" ++msgstr "Das System neu starten" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:32 ++msgid "Authentication is required for rebooting the system." ++msgstr "Legitimierung ist zum Neustart des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:33 ++msgid "Reboot the system while other users are logged in" ++msgstr "Das Systems neu starten, während andere Benutzer angemeldet sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:34 ++msgid "" ++"Authentication is required for rebooting the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Neustart des Systems notwendig, während andere " ++"Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:35 ++msgid "Reboot the system while an application asked to inhibit it" ++msgstr "" ++"Das System neu starten, während eine Anwendung anfordert es zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:36 ++msgid "" ++"Authentication is required for rebooting the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Neustart des Systems notwendig, während eine Anwendung " ++"anforderte es zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:37 ++msgid "Suspend the system" ++msgstr "Das System in Bereitschaft versetzen" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:38 ++msgid "Authentication is required for suspending the system." ++msgstr "Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:39 ++msgid "Suspend the system while other users are logged in" ++msgstr "" ++"Das System in Bereitschaft versetzen, während andere Benutzer angemeldet " ++"sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:40 ++msgid "" ++"Authentication is required for suspending the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, " ++"während andere Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:41 ++msgid "Suspend the system while an application asked to inhibit it" ++msgstr "" ++"Das System in Bereitschaft versetzen, während eine Anwendung anfordert dies " ++"zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:42 ++msgid "" ++"Authentication is required for suspending the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, " ++"während eine Anwendung anfordert dies zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:43 ++msgid "Hibernate the system" ++msgstr "Den Ruhezustand des Systems aktivieren" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:44 ++msgid "Authentication is required for hibernating the system." ++msgstr "" ++"Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:45 ++msgid "Hibernate the system while other users are logged in" ++msgstr "" ++"Den Ruhezustand des Systems aktivieren, während andere Benutzer angemeldet " ++"sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:46 ++msgid "" ++"Authentication is required for hibernating the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig, " ++"während andere Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:47 ++msgid "Hibernate the system while an application asked to inhibit it" ++msgstr "" ++"Das System in den Ruhezustand versetzen, während eine Anwendung wünscht dies " ++"zu verhindern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:48 ++msgid "" ++"Authentication is required for hibernating the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Versetzen des System in den Ruhezustand notwendig, " ++"während eine Anwendung wünscht dies zu verhindern." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1 ++msgid "Set system time" ++msgstr "Die Systemzeit festlegen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:2 ++msgid "Authentication is required to set the system time." ++msgstr "Legitimierung ist zum Festlegen der Systemzeit notwendig." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:3 ++msgid "Set system timezone" ++msgstr "Die Systemzeitzone festlegen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:4 ++msgid "Authentication is required to set the system timezone." ++msgstr "Legitimierung ist zum Festlegen der Systemzeitzone notwendig." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:5 ++msgid "Set RTC to local timezone or UTC" ++msgstr "Echtzeituhr auf lokale Zeitzone oder UTC setzen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:6 ++msgid "" ++"Authentication is required to control whether the RTC stores the local or " ++"UTC time." ++msgstr "" ++"Legitimierung ist notwendig zum Festlegen, ob die Echtzeituhr auf lokale " ++"Zeitzone oder UTC eingestellt ist." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:7 ++msgid "Turn network time synchronization on or off" ++msgstr "Netzwerkzeitabgeich ein- oder ausschalten" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:8 ++msgid "" ++"Authentication is required to control whether network time synchronization " ++"shall be enabled." ++msgstr "" ++"Legitimierung ist zum Festlegen, ob Netzwerkzeitabgeich eingeschaltet sein " ++"soll, erforderlich." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1 ++msgid "Send passphrase back to system" ++msgstr "Passphrase zurück an das System senden" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:2 ++msgid "" ++"Authentication is required to send the entered passphrase back to the system." ++msgstr "" ++"Legitimierung ist zum Senden des eingegebenen Kennworts zurück an das System " ++"notwendig." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3 ++msgid "Privileged system and service manager access" ++msgstr "Privilegierter Zugriff auf die System- und Dienstverwaltung" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4 ++msgid "Authentication is required to access the system and service manager." ++msgstr "" ++"Legitimierung ist notwendig für den Zugriff auf die System- und " ++"Dienstverwaltung." +-- +1.7.9.2 + diff --git a/0001-systemd-empty-sigmask-on-reexec.patch b/0008-Reset-signal-mask-on-re-exec-to-init.patch similarity index 53% rename from 0001-systemd-empty-sigmask-on-reexec.patch rename to 0008-Reset-signal-mask-on-re-exec-to-init.patch index f4f3ac92..9fe7d1ea 100644 --- a/0001-systemd-empty-sigmask-on-reexec.patch +++ b/0008-Reset-signal-mask-on-re-exec-to-init.patch @@ -1,16 +1,23 @@ -Process 1 (aka init) needs to be started with an empty signal mask. That -includes the process 1 that's started after the initrd is finished. When the -initrd is using systemd (as it does with dracut based initrds) then it is -systemd that calls the real init. Normally this is systemd again, except -when the user uses for instance "init=/bin/bash" on the kernel command line. +From 5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a Mon Sep 17 00:00:00 2001 +From: Ruediger Oertel +Date: Fri, 13 Jun 2014 16:41:06 +0200 +Subject: [PATCH] Reset signal-mask on re-exec to init=.. +Process 1 (aka init) needs to be started with an empty signal mask. +That includes the process 1 that's started after the initrd is finished. +When the initrd is using systemd (as it does with dracut based initrds) +then it is systemd that calls the real init. Normally this is systemd +again, except when the user uses for instance "init=/bin/bash" on the +kernel command line. --- - main.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + src/core/main.c | 8 ++++++++ + 1 file changed, 8 insertions(+) +diff --git src/core/main.c src/core/main.c +index 3aac5d1..3e57f07 100644 --- src/core/main.c -+++ src/core/main.c 2014-02-27 13:54:21.922236495 +0000 -@@ -1780,6 +1780,7 @@ finish: ++++ src/core/main.c +@@ -1843,6 +1843,7 @@ finish: if (reexecute) { const char **args; unsigned i, args_size; @@ -18,25 +25,27 @@ when the user uses for instance "init=/bin/bash" on the kernel command line. /* Close and disarm the watchdog, so that the new * instance can reinitialize it, but doesn't get -@@ -1863,6 +1864,11 @@ finish: +@@ -1926,6 +1927,11 @@ finish: args[i++] = NULL; assert(i <= args_size); + /* reenable any blocked signals, especially important + * if we switch from initial ramdisk to init=... */ + sigemptyset(&ss); -+ sigprocmask(SIG_SETMASK,&ss,&o_ss); ++ sigprocmask(SIG_SETMASK, &ss, &o_ss); + if (switch_root_init) { args[0] = switch_root_init; execv(args[0], (char* const*) args); -@@ -1881,6 +1887,9 @@ finish: +@@ -1944,6 +1950,8 @@ finish: log_error("Failed to execute /bin/sh, giving up: %m"); } else log_warning("Failed to execute /sbin/init, giving up: %m"); + -+ /* back to saved state if reexec failed */ -+ sigprocmask(SIG_SETMASK,&o_ss,NULL); ++ sigprocmask(SIG_SETMASK, &o_ss, NULL); } if (arg_serialization) { +-- +1.7.9.2 + diff --git a/0009-core-clean-up-signal-reset-logic-when-reexec.patch b/0009-core-clean-up-signal-reset-logic-when-reexec.patch new file mode 100644 index 00000000..cfe54186 --- /dev/null +++ b/0009-core-clean-up-signal-reset-logic-when-reexec.patch @@ -0,0 +1,50 @@ +From 9bfcda9528636914aef3e0ab91191bb81654c83d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 20 Jun 2014 16:58:21 +0200 +Subject: [PATCH] core: clean-up signal reset logic when reexec + +There's no need to save the old sigmask, if we are going to die. Let's +simplify this. Also, reset all the signal handlers, so that we don't +leave SIG_IGN set for some of them across reexec. +--- + src/core/main.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git src/core/main.c src/core/main.c +index 863ba52..6981e72 100644 +--- src/core/main.c ++++ src/core/main.c +@@ -1824,7 +1824,7 @@ finish: + if (reexecute) { + const char **args; + unsigned i, args_size; +- sigset_t ss, o_ss; ++ sigset_t ss; + + /* Close and disarm the watchdog, so that the new + * instance can reinitialize it, but doesn't get +@@ -1910,8 +1910,10 @@ finish: + + /* reenable any blocked signals, especially important + * if we switch from initial ramdisk to init=... */ +- sigemptyset(&ss); +- sigprocmask(SIG_SETMASK, &ss, &o_ss); ++ reset_all_signal_handlers(); ++ ++ assert_se(sigemptyset(&ss) == 0); ++ assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0); + + if (switch_root_init) { + args[0] = switch_root_init; +@@ -1931,8 +1933,6 @@ finish: + log_error("Failed to execute /bin/sh, giving up: %m"); + } else + log_warning("Failed to execute /sbin/init, giving up: %m"); +- +- sigprocmask(SIG_SETMASK, &o_ss, NULL); + } + + if (arg_serialization) { +-- +1.7.9.2 + diff --git a/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch b/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch new file mode 100644 index 00000000..e99c1a0d --- /dev/null +++ b/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch @@ -0,0 +1,25 @@ +From da92ca5eb506d513033e0c7a85daf25a7e1c9d0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 20 Jun 2014 22:43:49 -0400 +Subject: [PATCH] util: treat fuse.sshfs as a network filesystem + +https://bugs.freedesktop.org/show_bug.cgi?id=73727 +--- + src/shared/util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git src/shared/util.c src/shared/util.c +index 882a690..dbdb692 100644 +--- src/shared/util.c ++++ src/shared/util.c +@@ -1514,6 +1514,7 @@ bool fstype_is_network(const char *fstype) { + static const char table[] = + "cifs\0" + "smbfs\0" ++ "sshfs\0" + "ncpfs\0" + "ncp\0" + "nfs\0" +-- +1.7.9.2 + diff --git a/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch b/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch new file mode 100644 index 00000000..325f04a9 --- /dev/null +++ b/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch @@ -0,0 +1,28 @@ +From 8e75477abdd838d3beddc5fd1c6a7707b22748b6 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Sat, 21 Jun 2014 22:07:09 +0200 +Subject: [PATCH] build-sys: add -pthread flag for libsystemd-shared + +src/shared/async.c uses pthread so it will fail at link time if we link +only to libsystemd-shared and use async +--- + Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git Makefile.am Makefile.am +index c7653ea..00db82d 100644 +--- Makefile.am ++++ Makefile.am +@@ -837,7 +837,8 @@ nodist_libsystemd_shared_la_SOURCES = \ + + libsystemd_shared_la_CFLAGS = \ + $(AM_CFLAGS) \ +- $(SECCOMP_CFLAGS) ++ $(SECCOMP_CFLAGS) \ ++ -pthread + + # ------------------------------------------------------------------------------ + noinst_LTLIBRARIES += \ +-- +1.7.9.2 + diff --git a/0012-core-transaction-avoid-misleading-error-message-when.patch b/0012-core-transaction-avoid-misleading-error-message-when.patch new file mode 100644 index 00000000..03021cd2 --- /dev/null +++ b/0012-core-transaction-avoid-misleading-error-message-when.patch @@ -0,0 +1,42 @@ +Based on 04ef5b03f64d3824a51a2a903548af029a006744 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 22 Jun 2014 14:04:23 -0400 +Subject: [PATCH] core/transaction: avoid misleading error message when unit + not found + +There's no point in telling the user to look at the logs when +an attempt to load the unit file failed with ENOENT. + +https://bugzilla.redhat.com/show_bug.cgi?id=996133 +--- + TODO | 4 ---- + src/core/transaction.c | 18 ++++++++++++------ + 2 files changed, 12 insertions(+), 10 deletions(-) + +--- src/core/transaction.c ++++ src/core/transaction.c 2014-06-24 11:18:42.746235805 +0000 +@@ -865,12 +865,18 @@ int transaction_add_job_and_dependencies + } + + if (type != JOB_STOP && unit->load_state == UNIT_ERROR) { +- sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, +- "Unit %s failed to load: %s. " +- "See system logs and 'systemctl status %s' for details.", +- unit->id, +- strerror(-unit->load_error), +- unit->id); ++ if (unit->load_error == -ENOENT) ++ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, ++ "Unit %s failed to load: %s.", ++ unit->id, ++ strerror(-unit->load_error)); ++ else ++ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, ++ "Unit %s failed to load: %s. " ++ "See system logs and 'systemctl status %s' for details.", ++ unit->id, ++ strerror(-unit->load_error), ++ unit->id); + return -EINVAL; + } + diff --git a/ensure-sysctl-are-applied-after-modules-are-loaded.patch b/ensure-sysctl-are-applied-after-modules-are-loaded.patch deleted file mode 100644 index a672f33c..00000000 --- a/ensure-sysctl-are-applied-after-modules-are-loaded.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Frederic Crozat -Date: Mon, 9 Jan 2012 17:01:22 +0000 -Subject: ensure sysctl are applied after modules are loaded - -(bnc#725412) ---- - units/systemd-sysctl.service.in | 1 + - 1 file changed, 1 insertion(+) - ---- systemd-206_git201308300826.orig/units/systemd-sysctl.service.in -+++ systemd-206_git201308300826/units/systemd-sysctl.service.in -@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service - DefaultDependencies=no - Conflicts=shutdown.target - After=systemd-readahead-collect.service systemd-readahead-replay.service -+After=systemd-modules-load.service - Before=sysinit.target shutdown.target - ConditionPathIsReadWrite=/proc/sys/ - ConditionDirectoryNotEmpty=|/lib/sysctl.d diff --git a/getty-generator-with-serial-3270-tty.patch b/getty-generator-with-serial-3270-tty.patch deleted file mode 100644 index 41a2e278..00000000 --- a/getty-generator-with-serial-3270-tty.patch +++ /dev/null @@ -1,34 +0,0 @@ -The path for the serial 3270 console looks like (dev/)3270/tty1 which -causes trouble in the systemd-getty-generator as the add_symlink() -tries to make directories for each slash even for the slash after -the @ symbol in the final link name. - ---- - getty-generator.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- systemd-210/src/getty-generator/getty-generator.c -+++ systemd-210/src/getty-generator/getty-generator.c 2014-03-14 14:13:09.296463091 +0000 -@@ -67,6 +67,7 @@ static int add_symlink(const char *fserv - - static int add_serial_getty(const char *tty) { - _cleanup_free_ char *n = NULL; -+ char *at; - - assert(tty); - -@@ -76,6 +77,14 @@ static int add_serial_getty(const char * - if (!n) - return log_oom(); - -+ if ((at = strchr(n, '@'))) { -+ char *sl; -+ while (*(++at) && (sl = strchr(at, '/'))) { -+ *sl = '-'; -+ at = sl; -+ } -+ } -+ - return add_symlink("serial-getty@.service", n); - } - diff --git a/systemd-mini.changes b/systemd-mini.changes index b9be5413..0d46688d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de + +- Replace patches + 0001-systemd-empty-sigmask-on-reexec.patch with + upstream 0008-Reset-signal-mask-on-re-exec-to-init.patch + ensure-sysctl-are-applied-after-modules-are-loaded.patch with + upstream 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch + getty-generator-with-serial-3270-tty.patch with + upstream 0004-getty-generator-properly-escape-instance-names.patch +- Add upstream patches + 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch + 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch + 0005-po-add-Greek-translation.patch + 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch + 0007-po-add-German-translation.patch + 0009-core-clean-up-signal-reset-logic-when-reexec.patch + 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch + 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch + 0012-core-transaction-avoid-misleading-error-message-when.patch + +------------------------------------------------------------------- +Tue Jun 24 10:04:21 UTC 2014 - werner@suse.de + +- Invert of the boolean for locking scheme of fsck (bnc#881125) +- Remove the ghost entry /etc/hostname and require the netcfg + +------------------------------------------------------------------- +Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com + +- make sure legacy services that depend on network are started after + network is available (bnc#883565) + * 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch + * update insserv-generator.patch to translate $network into + network-online.target + ------------------------------------------------------------------- Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 35293d88..146b7ac7 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -135,6 +135,7 @@ Requires: kmod >= 14 %else Requires: kmod >= 15 %endif +Requires: netcfg Requires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding @@ -184,13 +185,14 @@ Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch13: 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch -# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file -Patch19: getty-generator-with-serial-3270-tty.patch +# PATCH-FIX-UPSTREAM Avoid error message about not existing getty@3270 file +Patch19: 0004-getty-generator-properly-escape-instance-names.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -240,8 +242,8 @@ Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch91: plymouth-quit-and-wait-for-emergency-service.patch # PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488) Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -# PATCH-FIX-SUSE 0001-systemd-empty-sigmask-on-reexec.patch werner@suse.com -Patch114: 0001-systemd-empty-sigmask-on-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch114: 0008-Reset-signal-mask-on-re-exec-to-init.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com @@ -566,6 +568,26 @@ Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch # PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) Patch281: 0001-detect-s390-virt.patch +# PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available +Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch283: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch284: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch285: 0005-po-add-Greek-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch286: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch287: 0007-po-add-German-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch288: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch289: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch290: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch291: 0012-core-transaction-avoid-misleading-error-message-when.patch # UDEV PATCHES # ============ @@ -888,12 +910,12 @@ cp %{SOURCE7} m4/ %patch8 -p1 %patch9 -p1 %patch12 -p1 -%patch13 -p1 +%patch13 -p0 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 -%patch19 -p1 +%patch19 -p0 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -1086,6 +1108,16 @@ cp %{SOURCE7} m4/ %patch279 -p0 %patch280 -p0 %patch281 -p1 +%patch282 -p1 +%patch283 -p0 +%patch284 -p0 +%patch285 -p0 +%patch286 -p0 +%patch287 -p0 +%patch288 -p0 +%patch289 -p0 +%patch290 -p0 +%patch291 -p0 # udev patches %patch1001 -p1 @@ -1136,6 +1168,9 @@ PATH=${PATH}:/sbin:/usr/sbin PATH_FSCK=$(type -p fsck) if grep -q /run/fsck/%%s\\.lock $PATH_FSCK then + echo Found new $PATH_FSCK that is allow private locking +else + echo Found old $PATH_FSCK that is disable flock for this one sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c fi @@ -1470,7 +1505,7 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' # Some files which may created by us or by the admin later on mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ - machine-id machine-info hostname \ + machine-id machine-info \ systemd/system/runlevel2.target \ systemd/system/runlevel3.target \ systemd/system/runlevel4.target \ @@ -1848,7 +1883,6 @@ exit 0 %ghost %config(noreplace) %{_sysconfdir}/locale.conf %ghost %config(noreplace) %{_sysconfdir}/machine-id %ghost %config(noreplace) %{_sysconfdir}/machine-info -%ghost %config(noreplace) %{_sysconfdir}/hostname %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target diff --git a/systemd.changes b/systemd.changes index 662c2939..0d46688d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de + +- Replace patches + 0001-systemd-empty-sigmask-on-reexec.patch with + upstream 0008-Reset-signal-mask-on-re-exec-to-init.patch + ensure-sysctl-are-applied-after-modules-are-loaded.patch with + upstream 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch + getty-generator-with-serial-3270-tty.patch with + upstream 0004-getty-generator-properly-escape-instance-names.patch +- Add upstream patches + 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch + 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch + 0005-po-add-Greek-translation.patch + 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch + 0007-po-add-German-translation.patch + 0009-core-clean-up-signal-reset-logic-when-reexec.patch + 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch + 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch + 0012-core-transaction-avoid-misleading-error-message-when.patch + +------------------------------------------------------------------- +Tue Jun 24 10:04:21 UTC 2014 - werner@suse.de + +- Invert of the boolean for locking scheme of fsck (bnc#881125) +- Remove the ghost entry /etc/hostname and require the netcfg + ------------------------------------------------------------------- Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com diff --git a/systemd.spec b/systemd.spec index 11add832..28601524 100644 --- a/systemd.spec +++ b/systemd.spec @@ -130,6 +130,7 @@ Requires: kmod >= 14 %else Requires: kmod >= 15 %endif +Requires: netcfg Requires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding @@ -179,13 +180,14 @@ Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch13: 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch -# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file -Patch19: getty-generator-with-serial-3270-tty.patch +# PATCH-FIX-UPSTREAM Avoid error message about not existing getty@3270 file +Patch19: 0004-getty-generator-properly-escape-instance-names.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -235,8 +237,8 @@ Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch91: plymouth-quit-and-wait-for-emergency-service.patch # PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488) Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -# PATCH-FIX-SUSE 0001-systemd-empty-sigmask-on-reexec.patch werner@suse.com -Patch114: 0001-systemd-empty-sigmask-on-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch114: 0008-Reset-signal-mask-on-re-exec-to-init.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com @@ -563,6 +565,24 @@ Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch Patch281: 0001-detect-s390-virt.patch # PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch283: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch284: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch285: 0005-po-add-Greek-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch286: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch287: 0007-po-add-German-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch288: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch289: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch290: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch291: 0012-core-transaction-avoid-misleading-error-message-when.patch # UDEV PATCHES # ============ @@ -885,12 +905,12 @@ cp %{SOURCE7} m4/ %patch8 -p1 %patch9 -p1 %patch12 -p1 -%patch13 -p1 +%patch13 -p0 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 -%patch19 -p1 +%patch19 -p0 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -1084,6 +1104,15 @@ cp %{SOURCE7} m4/ %patch280 -p0 %patch281 -p1 %patch282 -p1 +%patch283 -p0 +%patch284 -p0 +%patch285 -p0 +%patch286 -p0 +%patch287 -p0 +%patch288 -p0 +%patch289 -p0 +%patch290 -p0 +%patch291 -p0 # udev patches %patch1001 -p1 @@ -1134,6 +1163,9 @@ PATH=${PATH}:/sbin:/usr/sbin PATH_FSCK=$(type -p fsck) if grep -q /run/fsck/%%s\\.lock $PATH_FSCK then + echo Found new $PATH_FSCK that is allow private locking +else + echo Found old $PATH_FSCK that is disable flock for this one sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c fi @@ -1468,7 +1500,7 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' # Some files which may created by us or by the admin later on mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ - machine-id machine-info hostname \ + machine-id machine-info \ systemd/system/runlevel2.target \ systemd/system/runlevel3.target \ systemd/system/runlevel4.target \ @@ -1846,7 +1878,6 @@ exit 0 %ghost %config(noreplace) %{_sysconfdir}/locale.conf %ghost %config(noreplace) %{_sysconfdir}/machine-id %ghost %config(noreplace) %{_sysconfdir}/machine-info -%ghost %config(noreplace) %{_sysconfdir}/hostname %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target From 685e6f5790ff958d55d7d5d0c864adf4b7fa68f66ececf50e90aea5dcb7aeeb7 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Tue, 24 Jun 2014 11:57:06 +0000 Subject: [PATCH 33/43] Accepting request 238484 from home:rmilasan:branches:Base:System - Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch to 1038-udev-fix-invalid-free-in-enable_name_policy.patch - Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch to 1038-udev-fix-invalid-free-in-enable_name_policy.patch OBS-URL: https://build.opensuse.org/request/show/238484 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=682 --- ...x-invalid-free-in-enable_name_policy.patch | 0 systemd-mini.changes | 6 ++++ systemd-mini.spec | 34 +++++++++---------- systemd.changes | 6 ++++ systemd.spec | 34 +++++++++---------- 5 files changed, 46 insertions(+), 34 deletions(-) rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch => 1038-udev-fix-invalid-free-in-enable_name_policy.patch (100%) diff --git a/0002-udev-fix-invalid-free-in-enable_name_policy.patch b/1038-udev-fix-invalid-free-in-enable_name_policy.patch similarity index 100% rename from 0002-udev-fix-invalid-free-in-enable_name_policy.patch rename to 1038-udev-fix-invalid-free-in-enable_name_policy.patch diff --git a/systemd-mini.changes b/systemd-mini.changes index 0d46688d..981c8c3d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com + +- Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch + to 1038-udev-fix-invalid-free-in-enable_name_policy.patch + ------------------------------------------------------------------- Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 146b7ac7..a1b46519 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -563,31 +563,29 @@ Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 Patch278: 0001-core-fix-invalid-free-in-killall.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 -Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch -# PATCH-FIX-UPSTREAM added at 2014/06/17 -Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch +Patch279: 0003-install-fix-invalid-free-in-unit_file_mask.patch # PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) -Patch281: 0001-detect-s390-virt.patch +Patch280: 0001-detect-s390-virt.patch # PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available -Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +Patch281: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch283: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +Patch282: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch284: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +Patch283: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch285: 0005-po-add-Greek-translation.patch +Patch284: 0005-po-add-Greek-translation.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch286: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch285: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch287: 0007-po-add-German-translation.patch +Patch286: 0007-po-add-German-translation.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch288: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +Patch287: 0009-core-clean-up-signal-reset-logic-when-reexec.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch289: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch290: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch291: 0012-core-transaction-avoid-misleading-error-message-when.patch +Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch # UDEV PATCHES # ============ @@ -669,6 +667,8 @@ Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch # PATCH-FIX-SUSE See bnc#882714 comment #51 Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch +# PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch +Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1106,9 +1106,9 @@ cp %{SOURCE7} m4/ %patch277 -p0 %patch278 -p0 %patch279 -p0 -%patch280 -p0 +%patch280 -p1 %patch281 -p1 -%patch282 -p1 +%patch282 -p0 %patch283 -p0 %patch284 -p0 %patch285 -p0 @@ -1117,7 +1117,6 @@ cp %{SOURCE7} m4/ %patch288 -p0 %patch289 -p0 %patch290 -p0 -%patch291 -p0 # udev patches %patch1001 -p1 @@ -1158,6 +1157,7 @@ cp %{SOURCE7} m4/ %patch1035 -p1 %patch1036 -p1 %patch1037 -p1 +%patch1038 -p0 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 0d46688d..981c8c3d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com + +- Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch + to 1038-udev-fix-invalid-free-in-enable_name_policy.patch + ------------------------------------------------------------------- Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 28601524..c38fac87 100644 --- a/systemd.spec +++ b/systemd.spec @@ -558,31 +558,29 @@ Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 Patch278: 0001-core-fix-invalid-free-in-killall.patch # PATCH-FIX-UPSTREAM added at 2014/06/17 -Patch279: 0002-udev-fix-invalid-free-in-enable_name_policy.patch -# PATCH-FIX-UPSTREAM added at 2014/06/17 -Patch280: 0003-install-fix-invalid-free-in-unit_file_mask.patch +Patch279: 0003-install-fix-invalid-free-in-unit_file_mask.patch # PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) -Patch281: 0001-detect-s390-virt.patch +Patch280: 0001-detect-s390-virt.patch # PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available -Patch282: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +Patch281: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch283: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +Patch282: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch284: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +Patch283: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch285: 0005-po-add-Greek-translation.patch +Patch284: 0005-po-add-Greek-translation.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch286: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch285: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch287: 0007-po-add-German-translation.patch +Patch286: 0007-po-add-German-translation.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch288: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +Patch287: 0009-core-clean-up-signal-reset-logic-when-reexec.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch289: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch290: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 -Patch291: 0012-core-transaction-avoid-misleading-error-message-when.patch +Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch # UDEV PATCHES # ============ @@ -664,6 +662,8 @@ Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch # PATCH-FIX-SUSE See bnc#882714 comment #51 Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch +# PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch +Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1101,9 +1101,9 @@ cp %{SOURCE7} m4/ %patch277 -p0 %patch278 -p0 %patch279 -p0 -%patch280 -p0 +%patch280 -p1 %patch281 -p1 -%patch282 -p1 +%patch282 -p0 %patch283 -p0 %patch284 -p0 %patch285 -p0 @@ -1112,7 +1112,6 @@ cp %{SOURCE7} m4/ %patch288 -p0 %patch289 -p0 %patch290 -p0 -%patch291 -p0 # udev patches %patch1001 -p1 @@ -1153,6 +1152,7 @@ cp %{SOURCE7} m4/ %patch1035 -p1 %patch1036 -p1 %patch1037 -p1 +%patch1038 -p0 # ensure generate files are removed rm -f units/emergency.service From b22c9c974e96d91f5f763c609cbe1bcbfcf1a026a43d405ee0a6a695c5f3d05c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 24 Jun 2014 12:05:21 +0000 Subject: [PATCH 34/43] Also support 13.1 for now OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=683 --- systemd.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/systemd.spec b/systemd.spec index c38fac87..0bc178d3 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1169,6 +1169,17 @@ else sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c fi +%if 0%{?suse_version} <= 1310 +# +# Older versions like oS 13.1 do not distinguish between +# network.target and network-online.target +# +for f in src/core/service.c src/insserv-generator/insserv-generator.c +do + sed -ri '/"network",.*SPECIAL_NETWORK_ONLINE_TARGET,/{ s/SPECIAL_NETWORK_ONLINE_TARGET/SPECIAL_NETWORK_TARGET/}' $f +done +%endif + %build cflags () { From 1d4069aad5520d169dc3893cb689d09d24461dd9a2d1627e9d16915a1c918f7b Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 25 Jun 2014 14:14:00 +0000 Subject: [PATCH 35/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=684 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 16 ++++++++++++++++ systemd.changes | 5 +++++ systemd.spec | 5 +++++ 4 files changed, 31 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index 981c8c3d..3fac462e 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de + +- Temporary disable patch 1022 (bnc#884271 and bnc#882714 + ------------------------------------------------------------------- Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index a1b46519..8a79d06c 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -31,6 +31,7 @@ %else %define has_efi 0 %endif +%bcond_with udevsettle Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd @@ -1141,7 +1142,11 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} %patch1022 -p1 +%endif +%endif %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 @@ -1174,6 +1179,17 @@ else sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c fi +%if 0%{?suse_version} <= 1310 +# +# Older versions like oS 13.1 do not distinguish between +# network.target and network-online.target +# +for f in src/core/service.c src/insserv-generator/insserv-generator.c +do + sed -ri '/"network",.*SPECIAL_NETWORK_ONLINE_TARGET,/{ s/SPECIAL_NETWORK_ONLINE_TARGET/SPECIAL_NETWORK_TARGET/}' $f +done +%endif + %build cflags () { diff --git a/systemd.changes b/systemd.changes index 981c8c3d..3fac462e 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de + +- Temporary disable patch 1022 (bnc#884271 and bnc#882714 + ------------------------------------------------------------------- Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 0bc178d3..69dc275b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -29,6 +29,7 @@ %else %define has_efi 0 %endif +%bcond_with udevsettle Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd @@ -1136,7 +1137,11 @@ cp %{SOURCE7} m4/ %patch1019 -p0 %patch1020 -p0 %patch1021 -p1 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} %patch1022 -p1 +%endif +%endif %patch1023 -p0 %patch1024 -p0 %patch1025 -p1 From 975d6edbb54f401a29f89495cc18cddc9f66d90153cc50f4e0db7dcd47f94e19 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 25 Jun 2014 17:08:46 +0000 Subject: [PATCH 36/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=685 --- ...le-fixed-return-code-for-empty-queue.patch | 34 +++++++++++++++++++ systemd-mini.changes | 8 +++++ systemd-mini.spec | 3 ++ systemd.changes | 8 +++++ systemd.spec | 3 ++ 5 files changed, 56 insertions(+) create mode 100644 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch diff --git a/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch b/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch new file mode 100644 index 00000000..2760970f --- /dev/null +++ b/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch @@ -0,0 +1,34 @@ +From 83be2c398589a3d64db5999cfd5527c5219bff46 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 20 May 2014 12:25:16 +0200 +Subject: [PATCH] udevadm-settle: fixed return code for empty queue + +If the udev queue is empty and "/run/udev/queue" does not exist, +"udevadm settle" would return with EXIT_FAILURE, because the inotify on +"/run/udev/queue" would fail with ENOENT. + +This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case. +--- + src/udev/udevadm-settle.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c +index 65fc35f..66fd843 100644 +--- src/udev/udevadm-settle.c ++++ src/udev/udevadm-settle.c +@@ -116,7 +116,11 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + } + + if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { +- log_debug("watching /run/udev failed"); ++ /* If it does not exist, we don't have to wait */ ++ if (errno == ENOENT) ++ rc = EXIT_SUCCESS; ++ else ++ log_debug("watching /run/udev/queue failed"); + goto out; + } + +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 3fac462e..0e3eb4a4 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de + +- Add upstream patch + 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it + fixes udevadm settle exit code which may had roken dracut scripts + (bnc#884271 comment#18) + ------------------------------------------------------------------- Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 8a79d06c..a3e49883 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -670,6 +670,8 @@ Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch # PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1163,6 +1165,7 @@ cp %{SOURCE7} m4/ %patch1036 -p1 %patch1037 -p1 %patch1038 -p0 +%patch1039 -p0 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 3fac462e..0e3eb4a4 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de + +- Add upstream patch + 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it + fixes udevadm settle exit code which may had roken dracut scripts + (bnc#884271 comment#18) + ------------------------------------------------------------------- Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 69dc275b..e10ce7c0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -665,6 +665,8 @@ Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch # PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1158,6 +1160,7 @@ cp %{SOURCE7} m4/ %patch1036 -p1 %patch1037 -p1 %patch1038 -p0 +%patch1039 -p0 # ensure generate files are removed rm -f units/emergency.service From db528b8d264e018c7b7b58cfb512e4e5b7648bd3b6b97da57203a79fb78f5d18 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 25 Jun 2014 17:12:37 +0000 Subject: [PATCH 37/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=686 --- systemd-mini.spec | 4 ++++ systemd.spec | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/systemd-mini.spec b/systemd-mini.spec index a3e49883..7af41c6a 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1165,7 +1165,11 @@ cp %{SOURCE7} m4/ %patch1036 -p1 %patch1037 -p1 %patch1038 -p0 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} %patch1039 -p0 +%endif +%endif # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.spec b/systemd.spec index e10ce7c0..1f56d7bb 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1160,7 +1160,11 @@ cp %{SOURCE7} m4/ %patch1036 -p1 %patch1037 -p1 %patch1038 -p0 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} %patch1039 -p0 +%endif +%endif # ensure generate files are removed rm -f units/emergency.service From 9a3b778504f9e1201d89af97ed906e95c99a8885e961174e7aed7d1cefcab67e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 25 Jun 2014 17:30:32 +0000 Subject: [PATCH 38/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=687 --- ...py-character-maps-not-just-fonts-fro.patch | 56 +++++++++++++++++++ ...nvironment-fields-passed-in-for-tran.patch | 27 +++++++++ ...-put-the-cached-result-of-use_smack-.patch | 32 +++++++++++ ...-add-unit-dependency-on-dev-null-dev.patch | 53 ++++++++++++++++++ 0005-man-fix-path-in-crypttab-5.patch | 26 +++++++++ systemd-mini.changes | 10 ++++ systemd-mini.spec | 15 +++++ systemd.changes | 10 ++++ systemd.spec | 15 +++++ 9 files changed, 244 insertions(+) create mode 100644 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch create mode 100644 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch create mode 100644 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch create mode 100644 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch create mode 100644 0005-man-fix-path-in-crypttab-5.patch diff --git a/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch b/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch new file mode 100644 index 00000000..bf379908 --- /dev/null +++ b/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch @@ -0,0 +1,56 @@ +From ff452e76e2c0f89a32542b7179bb2fd538335933 Mon Sep 17 00:00:00 2001 +From: Carl Schaefer +Date: Mon, 23 Jun 2014 18:23:48 +0200 +Subject: [PATCH] vconsole: also copy character maps (not just fonts) from vt1 + to vt2, vt3, ... + +https://bugs.freedesktop.org/show_bug.cgi?id=78796 +--- + src/vconsole/vconsole-setup.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git src/vconsole/vconsole-setup.c src/vconsole/vconsole-setup.c +index 0f2b706..e0c4050 100644 +--- src/vconsole/vconsole-setup.c ++++ src/vconsole/vconsole-setup.c +@@ -180,6 +180,10 @@ static int font_load(const char *vc, const char *font, const char *map, const ch + */ + static void font_copy_to_all_vcs(int fd) { + struct vt_stat vcs = {}; ++ unsigned char map8[E_TABSZ]; ++ unsigned short map16[E_TABSZ]; ++ struct unimapdesc unimapd; ++ struct unipair unipairs[USHRT_MAX]; + int i, r; + + /* get active, and 16 bit mask of used VT numbers */ +@@ -209,6 +213,26 @@ static void font_copy_to_all_vcs(int fd) { + cfo.op = KD_FONT_OP_COPY; + cfo.height = vcs.v_active-1; /* tty1 == index 0 */ + ioctl(vcfd, KDFONTOP, &cfo); ++ ++ /* copy map of 8bit chars */ ++ if (ioctl(fd, GIO_SCRNMAP, map8) >= 0) ++ ioctl(vcfd, PIO_SCRNMAP, map8); ++ ++ /* copy map of 8bit chars -> 16bit Unicode values */ ++ if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0) ++ ioctl(vcfd, PIO_UNISCRNMAP, map16); ++ ++ /* copy unicode translation table */ ++ /* unimapd is a ushort count and a pointer to an ++ array of struct unipair { ushort, ushort } */ ++ unimapd.entries = unipairs; ++ unimapd.entry_ct = USHRT_MAX; ++ if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) { ++ struct unimapinit adv = { 0, 0, 0 }; ++ ++ ioctl(vcfd, PIO_UNIMAPCLR, &adv); ++ ioctl(vcfd, PIO_UNIMAP, &unimapd); ++ } + } + } + +-- +1.7.9.2 + diff --git a/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch b/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch new file mode 100644 index 00000000..ec455770 --- /dev/null +++ b/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch @@ -0,0 +1,27 @@ +From cdd7b7dfd44649b204c43e907f03d4294de4f28a Mon Sep 17 00:00:00 2001 +From: Hristo Venev +Date: Mon, 23 Jun 2014 18:53:04 +0200 +Subject: [PATCH] core: make sure Environment fields passed in for transient + units are properly written to unit files + +https://bugs.freedesktop.org/show_bug.cgi?id=76744 +--- + src/core/dbus-execute.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/dbus-execute.c src/core/dbus-execute.c +index cb9a077..ecbadd7 100644 +--- src/core/dbus-execute.c ++++ src/core/dbus-execute.c +@@ -848,7 +848,7 @@ int bus_exec_context_set_transient_property( + strv_free(c->environment); + c->environment = e; + +- joined = strv_join(c->environment, " "); ++ joined = strv_join_quoted(c->environment); + if (!joined) + return -ENOMEM; + +-- +1.7.9.2 + diff --git a/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch b/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch new file mode 100644 index 00000000..8305035f --- /dev/null +++ b/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch @@ -0,0 +1,32 @@ +From d1d8e5d49f3149d03ceb94d1d2f6c14e7abccb6f Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Tue, 22 Apr 2014 10:33:25 +0200 +Subject: [PATCH] core: You can not put the cached result of use_smack fct, as + we are not sure the "/sys" is mounted. So we should mount + "sys" before "/proc" + +https://bugs.freedesktop.org/show_bug.cgi?id=77646 +--- + src/core/mount-setup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git src/core/mount-setup.c src/core/mount-setup.c +index ae8447c..991bfdf 100644 +--- src/core/mount-setup.c ++++ src/core/mount-setup.c +@@ -67,10 +67,10 @@ typedef struct MountPoint { + #define N_EARLY_MOUNT 5 + + static const MountPoint mount_table[] = { +- { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +- NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_FATAL|MNT_IN_CONTAINER }, ++ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, ++ NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, + NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +-- +1.7.9.2 + diff --git a/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch b/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch new file mode 100644 index 00000000..4bed22a5 --- /dev/null +++ b/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch @@ -0,0 +1,53 @@ +Based on bde29068aa3815c88190a91e9867605a0aeaf9c4 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 23 Jun 2014 19:18:44 +0200 +Subject: [PATCH] cryptsetup: don't add unit dependency on /dev/null devices + when it is listed as password file + +As special magic, don't create device dependencies for /dev/null. Of +course, there might be similar devices we might want to include, but +given that none of them really make sense to specify as password source +there's really no point in checking for anything else here. + +https://bugs.freedesktop.org/show_bug.cgi?id=75816 +--- + src/cryptsetup/cryptsetup-generator.c | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +--- src/cryptsetup/cryptsetup-generator.c ++++ src/cryptsetup/cryptsetup-generator.c 2014-06-25 17:24:14.338237375 +0000 +@@ -29,6 +29,7 @@ + #include "mkdir.h" + #include "strv.h" + #include "fileio.h" ++#include "path-util.h" + + static const char *arg_dest = "/tmp"; + static bool arg_enabled = true; +@@ -141,14 +142,18 @@ static int create_disk( + if (uu == NULL) + return log_oom(); + +- if (is_device_path(uu)) { +- _cleanup_free_ char *dd = unit_name_from_path(uu, ".device"); +- if (dd == NULL) +- return log_oom(); +- +- fprintf(f, "After=%1$s\nRequires=%1$s\n", dd); +- } else +- fprintf(f, "RequiresMountsFor=%s\n", password); ++ if (!path_equal(uu, "/dev/null")) { ++ if (is_device_path(uu)) { ++ _cleanup_free_ char *dd; ++ ++ dd = unit_name_from_path(uu, ".device"); ++ if (!dd) ++ return log_oom(); ++ ++ fprintf(f, "After=%1$s\nRequires=%1$s\n", dd); ++ } else ++ fprintf(f, "RequiresMountsFor=%s\n", password); ++ } + } + } + diff --git a/0005-man-fix-path-in-crypttab-5.patch b/0005-man-fix-path-in-crypttab-5.patch new file mode 100644 index 00000000..d0aef604 --- /dev/null +++ b/0005-man-fix-path-in-crypttab-5.patch @@ -0,0 +1,26 @@ +From 9fcdf32294e66f91d2a177f73a77049832768311 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 23 Jun 2014 23:07:53 -0400 +Subject: [PATCH] man: fix path in crypttab(5) + +https://bugs.freedesktop.org/show_bug.cgi?id=75816 +--- + man/crypttab.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git man/crypttab.xml man/crypttab.xml +index 668e51d..9030015 100644 +--- man/crypttab.xml ++++ man/crypttab.xml +@@ -369,7 +369,7 @@ + luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b + swap /dev/sda7 /dev/urandom swap + truecrypt /dev/sda2 /etc/container_password tcrypt +-hidden /mnt/tc_hidden /null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile ++hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile + + + +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 0e3eb4a4..229c9971 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch + 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch + 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch + 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch + 0005-man-fix-path-in-crypttab-5.patch + ------------------------------------------------------------------- Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 7af41c6a..a04089d4 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -587,6 +587,16 @@ Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch291: 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch292: 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch295: 0005-man-fix-path-in-crypttab-5.patch # UDEV PATCHES # ============ @@ -1120,6 +1130,11 @@ cp %{SOURCE7} m4/ %patch288 -p0 %patch289 -p0 %patch290 -p0 +%patch291 -p0 +%patch292 -p0 +%patch293 -p0 +%patch294 -p0 +%patch295 -p0 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 0e3eb4a4..229c9971 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch + 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch + 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch + 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch + 0005-man-fix-path-in-crypttab-5.patch + ------------------------------------------------------------------- Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 1f56d7bb..32db278e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -582,6 +582,16 @@ Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch # PATCH-FIX-UPSTREAM added at 2014/06/24 Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch291: 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch292: 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch295: 0005-man-fix-path-in-crypttab-5.patch # UDEV PATCHES # ============ @@ -1115,6 +1125,11 @@ cp %{SOURCE7} m4/ %patch288 -p0 %patch289 -p0 %patch290 -p0 +%patch291 -p0 +%patch292 -p0 +%patch293 -p0 +%patch294 -p0 +%patch295 -p0 # udev patches %patch1001 -p1 From 91a77644299f1ed6a5e5b038ccb54f68b838e008401801a3421cdd5f5407c164 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Wed, 25 Jun 2014 18:17:16 +0000 Subject: [PATCH 39/43] Accepting request 238695 from home:rmilasan:branches:Base:System - rules: re-enable dev_id conditionally in persistent rules (bnc#884403 and bnc#882714). Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch - Temporary disable patch 1022 (bnc#884271 and bnc#882714). - rules: re-enable dev_id conditionally in persistent rules (bnc#884403 and bnc#882714). Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch - Temporary disable patch 1022 (bnc#884271 and bnc#882714). OBS-URL: https://build.opensuse.org/request/show/238695 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=688 --- ...ev_id-conditionally-in-persistent-rules.patch | 16 ++++++++++++++++ systemd-mini.changes | 9 ++++++++- systemd-mini.spec | 3 +++ systemd.changes | 9 ++++++++- systemd.spec | 3 +++ 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch diff --git a/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch b/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch new file mode 100644 index 00000000..e203d8d3 --- /dev/null +++ b/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch @@ -0,0 +1,16 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- systemd-210.orig/src/udev/rule_generator/75-persistent-net-generator.rules ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -68,8 +68,9 @@ ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="glob + ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" + + # match interface dev_id +-# disable due to bnc#882714 +-# ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++# HACK: for s390x, if layer2 == 0, dont use dev_id ++ENV{LAYER2}="1", TEST=="device/layer2", ENV{LAYER2}="$attr{device/layer2}" ++ENV{LAYER2}!="0", ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" + + # do not use "locally administered" MAC address + ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" diff --git a/systemd-mini.changes b/systemd-mini.changes index 229c9971..21c28d21 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com + +- rules: re-enable dev_id conditionally in persistent rules + (bnc#884403 and bnc#882714). + Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch + ------------------------------------------------------------------- Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de @@ -19,7 +26,7 @@ Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de ------------------------------------------------------------------- Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de -- Temporary disable patch 1022 (bnc#884271 and bnc#882714 +- Temporary disable patch 1022 (bnc#884271 and bnc#882714). ------------------------------------------------------------------- Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index a04089d4..c691d2b2 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -682,6 +682,8 @@ Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +# PATCH-FIX-SUSE 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch (bnc#884403 and bnc#882714) +Patch1040: 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1185,6 +1187,7 @@ cp %{SOURCE7} m4/ %patch1039 -p0 %endif %endif +%patch1040 -p1 # ensure generate files are removed rm -f units/emergency.service diff --git a/systemd.changes b/systemd.changes index 229c9971..21c28d21 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com + +- rules: re-enable dev_id conditionally in persistent rules + (bnc#884403 and bnc#882714). + Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch + ------------------------------------------------------------------- Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de @@ -19,7 +26,7 @@ Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de ------------------------------------------------------------------- Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de -- Temporary disable patch 1022 (bnc#884271 and bnc#882714 +- Temporary disable patch 1022 (bnc#884271 and bnc#882714). ------------------------------------------------------------------- Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 32db278e..06dab006 100644 --- a/systemd.spec +++ b/systemd.spec @@ -677,6 +677,8 @@ Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch # PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +# PATCH-FIX-SUSE 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch (bnc#884403 and bnc#882714) +Patch1040: 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1180,6 +1182,7 @@ cp %{SOURCE7} m4/ %patch1039 -p0 %endif %endif +%patch1040 -p1 # ensure generate files are removed rm -f units/emergency.service From 1cb6cef6fb644031eee05521098112a3c17f01d3eafdd8b8b05d4cb14ea9b1e2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 26 Jun 2014 06:46:39 +0000 Subject: [PATCH 40/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=689 --- ...ork-online.target-after-network.targ.patch | 20 +++++++++++++++++++ systemd-mini.changes | 7 +++++++ systemd-mini.spec | 3 +++ systemd.changes | 7 +++++++ systemd.spec | 3 +++ 5 files changed, 40 insertions(+) create mode 100644 0001-units-order-network-online.target-after-network.targ.patch diff --git a/0001-units-order-network-online.target-after-network.targ.patch b/0001-units-order-network-online.target-after-network.targ.patch new file mode 100644 index 00000000..d09fa29e --- /dev/null +++ b/0001-units-order-network-online.target-after-network.targ.patch @@ -0,0 +1,20 @@ +Based on 58e027023b47b32e42cf93dd4a629b869ee1ef25 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 11 Jun 2014 14:58:32 +0200 +Subject: [PATCH] units: order network-online.target after network.target + +There might be implementations around where the network-online logic +might not talk to any network configuration service (and thus not have +to wait for it), hence let's explicitly order network-online.target +after network.target to avoid any ambiguities. +--- + units/network-online.target | 1 + + 1 file changed, 1 insertion(+) + +--- units/network-online.target ++++ units/network-online.target 2014-06-26 00:00:00.000000000 +0000 +@@ -9,3 +9,4 @@ + Description=Network is Online + Documentation=man:systemd.special(7) + Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget ++After=network.target diff --git a/systemd-mini.changes b/systemd-mini.changes index 21c28d21..2959085d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-units-order-network-online.target-after-network.targ.patch + to make sure that etwork-online.target follows network.target + ------------------------------------------------------------------- Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index c691d2b2..bf733d82 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -597,6 +597,8 @@ Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch # PATCH-FIX-UPSTREAM added at 2014/06/25 Patch295: 0005-man-fix-path-in-crypttab-5.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch296: 0001-units-order-network-online.target-after-network.targ.patch # UDEV PATCHES # ============ @@ -1137,6 +1139,7 @@ cp %{SOURCE7} m4/ %patch293 -p0 %patch294 -p0 %patch295 -p0 +%patch296 -p0 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 21c28d21..2959085d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-units-order-network-online.target-after-network.targ.patch + to make sure that etwork-online.target follows network.target + ------------------------------------------------------------------- Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 06dab006..cfaac1d7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -592,6 +592,8 @@ Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch # PATCH-FIX-UPSTREAM added at 2014/06/25 Patch295: 0005-man-fix-path-in-crypttab-5.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch296: 0001-units-order-network-online.target-after-network.targ.patch # UDEV PATCHES # ============ @@ -1132,6 +1134,7 @@ cp %{SOURCE7} m4/ %patch293 -p0 %patch294 -p0 %patch295 -p0 +%patch296 -p0 # udev patches %patch1001 -p1 From 84a063d7dbb5c1b46a0c4f9858714582a09e150e22d634d76050b9f100cfc5b7 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 26 Jun 2014 09:31:57 +0000 Subject: [PATCH 41/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=690 --- ...e-use-correct-format-string-for-UIDs.patch | 20 ++++ ...-fix-cycle-break-attempts-outside-tr.patch | 42 ++++++++ ...fsck-implementation-linked-to-bin-tr.patch | 98 +++++++++++++++++++ systemd-mini.changes | 8 ++ systemd-mini.spec | 9 ++ systemd.changes | 8 ++ systemd.spec | 9 ++ 7 files changed, 194 insertions(+) create mode 100644 0001-core-use-correct-format-string-for-UIDs.patch create mode 100644 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch create mode 100644 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch diff --git a/0001-core-use-correct-format-string-for-UIDs.patch b/0001-core-use-correct-format-string-for-UIDs.patch new file mode 100644 index 00000000..f0906df0 --- /dev/null +++ b/0001-core-use-correct-format-string-for-UIDs.patch @@ -0,0 +1,20 @@ +Based on d6239dc4b0cf55a953d6c40890859b85d504ef19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?= +Date: Wed, 25 Jun 2014 14:54:48 +0200 +Subject: [PATCH] core: use correct format string for UIDs + +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- src/core/main.c ++++ src/core/main.c 2014-06-26 09:29:28.182235325 +0000 +@@ -1526,7 +1526,7 @@ int main(int argc, char *argv[]) { + + } else { + _cleanup_free_ char *t = uid_to_name(getuid()); +- log_debug(PACKAGE_STRING " running in user mode for user "PID_FMT"/%s. (" SYSTEMD_FEATURES ")", ++ log_debug(PACKAGE_STRING " running in user mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", + getuid(), t); + } + diff --git a/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch b/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch new file mode 100644 index 00000000..61888e5f --- /dev/null +++ b/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch @@ -0,0 +1,42 @@ +From 375ae4aa4d2f89ae8afdd27e9f2b8336fcc2a046 Mon Sep 17 00:00:00 2001 +From: Uoti Urpala +Date: Mon, 23 Jun 2014 16:50:03 +0300 +Subject: [PATCH] core/transaction: fix cycle break attempts outside + transaction + +Patch fixes some incorrect-looking code in transaction.c. +It could fix cases where Debian users with bad package configurations +had systemd go into an infinite loop printing messages about breaking an +ordering cycle, though I have not reproduced that problem myself. + +transaction_verify_order_one() considers jobs/units outside current +transaction when checking whether ordering dependencies cause cycles. +It would also incorrectly try to break cycles at these jobs; this +cannot work, as the break action is to remove the job from the +transaction, which is a no-op if the job isn't part of the transaction +to begin with. The unit_matters_to_anchor() test also looks like it +would not work correctly for non-transaction jobs. Add a check to +verify that the unit is part of the transaction before considering a +job a candidate for deletion. + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259 +--- + src/core/transaction.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/transaction.c src/core/transaction.c +index d23a45c..805d40a 100644 +--- src/core/transaction.c ++++ src/core/transaction.c +@@ -381,7 +381,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + "Found dependency on %s/%s", + k->unit->id, job_type_to_string(k->type)); + +- if (!delete && ++ if (!delete && hashmap_get(tr->jobs, k->unit) && + !unit_matters_to_anchor(k->unit, k)) { + /* Ok, we can drop this one, so let's + * do so. */ +-- +1.7.9.2 + diff --git a/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch b/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch new file mode 100644 index 00000000..8c53718c --- /dev/null +++ b/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch @@ -0,0 +1,98 @@ +Based on 571d0134bd464444567cf4eb0d2ed8df40045f36 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 24 Jun 2014 19:37:22 +0200 +Subject: [PATCH] fsck: consider a fsck implementation linked to /bin/true + non-existant + +--- + src/fsck/fsck.c | 32 ++++++++++++++++++++++---------- + src/shared/path-util.c | 26 +++++++++++++++----------- + 2 files changed, 37 insertions(+), 21 deletions(-) + +--- src/fsck/fsck.c ++++ src/fsck/fsck.c 2014-06-26 09:19:58.591864710 +0000 +@@ -280,16 +280,28 @@ int main(int argc, char *argv[]) { + + type = udev_device_get_property_value(udev_device, "ID_FS_TYPE"); + if (type) { +- const char *checker = strappenda("/sbin/fsck.", type); +- r = access(checker, X_OK); +- if (r < 0) { +- if (errno == ENOENT) { +- log_info("%s doesn't exist, not checking file system on %s", +- checker, device); +- return EXIT_SUCCESS; +- } else +- log_warning("%s cannot be used for %s: %m", +- checker, device); ++ _cleanup_free_ char *p = NULL, *d = NULL; ++ const char *checker = strappenda("fsck.", type); ++ r = find_binary(checker, &p); ++ if (r == -ENOENT) { ++ log_info("fsck.%s doesn't exist, not checking file system on %s", ++ type, device); ++ return EXIT_SUCCESS; ++ } else if (r < 0) { ++ log_warning("fsck.%s cannot be used for %s: %m", ++ type, device); ++ return r; ++ } ++ ++ /* An fsck that is linked to /bin/true is a non-existant fsck */ ++ r = readlink_malloc(p, &d); ++ if (r >= 0 && ++ (path_equal(d, "/bin/true") || ++ path_equal(d, "/usr/bin/true") || ++ path_equal(d, "/dev/null"))) { ++ log_info("fsck.%s doesn't exist, not checking file system on %s", ++ type, device); ++ return EXIT_SUCCESS; + } + } + +--- src/shared/path-util.c ++++ src/shared/path-util.c 2014-06-26 09:14:15.651559638 +0000 +@@ -425,19 +425,21 @@ int path_is_os_tree(const char *path) { + + int find_binary(const char *name, char **filename) { + assert(name); +- assert(filename); + +- if (strchr(name, '/')) { +- char *p; ++ if (is_path(name)) { ++ if (access(name, X_OK) < 0) ++ return -errno; ++ ++ if (filename) { ++ char *p; + +- if (path_is_absolute(name)) +- p = strdup(name); +- else + p = path_make_absolute_cwd(name); +- if (!p) +- return -ENOMEM; ++ if (!p) ++ return -ENOMEM; ++ ++ *filename = p; ++ } + +- *filename = p; + return 0; + } else { + const char *path; +@@ -463,8 +465,10 @@ int find_binary(const char *name, char * + continue; + } + +- path_kill_slashes(p); +- *filename = p; ++ if (filename) { ++ path_kill_slashes(p); ++ *filename = p; ++ } + + return 0; + } diff --git a/systemd-mini.changes b/systemd-mini.changes index 2959085d..8c966d91 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de + +- Add upstream patchs + 0001-core-use-correct-format-string-for-UIDs.patch + 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch + 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch + ------------------------------------------------------------------- Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index bf733d82..e8b092c2 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -599,6 +599,12 @@ Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch Patch295: 0005-man-fix-path-in-crypttab-5.patch # PATCH-FIX-UPSTREAM added at 2014/06/26 Patch296: 0001-units-order-network-online.target-after-network.targ.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch297: 0001-core-use-correct-format-string-for-UIDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch298: 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch299: 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch # UDEV PATCHES # ============ @@ -1140,6 +1146,9 @@ cp %{SOURCE7} m4/ %patch294 -p0 %patch295 -p0 %patch296 -p0 +%patch297 -p0 +%patch298 -p0 +%patch299 -p0 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 2959085d..8c966d91 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de + +- Add upstream patchs + 0001-core-use-correct-format-string-for-UIDs.patch + 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch + 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch + ------------------------------------------------------------------- Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index cfaac1d7..c4c26840 100644 --- a/systemd.spec +++ b/systemd.spec @@ -594,6 +594,12 @@ Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch Patch295: 0005-man-fix-path-in-crypttab-5.patch # PATCH-FIX-UPSTREAM added at 2014/06/26 Patch296: 0001-units-order-network-online.target-after-network.targ.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch297: 0001-core-use-correct-format-string-for-UIDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch298: 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch299: 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch # UDEV PATCHES # ============ @@ -1135,6 +1141,9 @@ cp %{SOURCE7} m4/ %patch294 -p0 %patch295 -p0 %patch296 -p0 +%patch297 -p0 +%patch298 -p0 +%patch299 -p0 # udev patches %patch1001 -p1 From c805279f148f83b53644f1d2e4dd929fd50c31ba9987075632ce4c9e74fcaa88 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 26 Jun 2014 10:03:25 +0000 Subject: [PATCH 42/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=691 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 4 ++++ systemd.changes | 5 +++++ systemd.spec | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index 8c966d91..18b34998 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de + +- Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc + ------------------------------------------------------------------- Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index e8b092c2..15e40108 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -157,7 +157,11 @@ Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz +%if ! 0%{?bootstrap} Source1: systemd-rpmlintrc +%else +Source1: systemd-mini-rpmlintrc +%endif Source2: localfs.service Source3: systemd-sysv-convert Source6: baselibs.conf diff --git a/systemd.changes b/systemd.changes index 8c966d91..18b34998 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de + +- Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc + ------------------------------------------------------------------- Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index c4c26840..55ff9a7d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -152,7 +152,11 @@ Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz +%if ! 0%{?bootstrap} Source1: systemd-rpmlintrc +%else +Source1: systemd-mini-rpmlintrc +%endif Source2: localfs.service Source3: systemd-sysv-convert Source6: baselibs.conf From 70041adb9828a1c7f490a1bcc5c59d4b936b12206cd55b8b7592e921f255c4da Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 27 Jun 2014 08:18:35 +0000 Subject: [PATCH 43/43] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=692 --- 0001-detect-s390-virt.patch | 7 ++++--- systemd-mini.changes | 5 +++++ systemd.changes | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/0001-detect-s390-virt.patch b/0001-detect-s390-virt.patch index 7e6f1390..3a437118 100644 --- a/0001-detect-s390-virt.patch +++ b/0001-detect-s390-virt.patch @@ -1,8 +1,8 @@ bnc#880438 - systemd-detect-virt doesn't work on System z --- systemd-210/src/shared/virt.c -+++ systemd-210/src/shared/virt.c 2014-06-17 08:03:30.152489353 +0000 -@@ -196,6 +196,29 @@ ++++ systemd-210/src/shared/virt.c 2014-06-26 07:55:30.081608729 +0000 +@@ -196,6 +196,30 @@ } else return r; @@ -20,7 +20,8 @@ bnc#880438 - systemd-detect-virt doesn't work on System z + if (startswith(line, "VM00 Control Program:")) { + if (strstr(line,"z/VM")) + _id = "z/VM"; -+ ++ else if (strstr(line,"KVM/Linux")) ++ _id = "KVM"; + break; + } + } diff --git a/systemd-mini.changes b/systemd-mini.changes index 18b34998..da40a9c5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 27 08:17:47 UTC 2014 - werner@suse.de + +- Update of patch 0001-detect-s390-virt.patch (bnc#880438) + ------------------------------------------------------------------- Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de diff --git a/systemd.changes b/systemd.changes index 18b34998..da40a9c5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 27 08:17:47 UTC 2014 - werner@suse.de + +- Update of patch 0001-detect-s390-virt.patch (bnc#880438) + ------------------------------------------------------------------- Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de